@stencil/core 5.0.0-beta.26 → 5.0.0-beta.28
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/{client-CVXS3JZ-.mjs → client-BYvfR_Hx.mjs} +24 -10
- package/dist/compiler/browser.d.ts +4 -2
- package/dist/compiler/browser.js +163 -69
- package/dist/compiler/index.d.mts +1 -1
- package/dist/compiler/index.mjs +2 -2
- package/dist/compiler/utils/index.d.mts +1 -1
- package/dist/{compiler-D7LTP5Hp.mjs → compiler-BQcDWWEp.mjs} +253 -92
- package/dist/declarations/stencil-public-compiler.d.ts +4 -2
- package/dist/{index-CxpWC93f.d.mts → index-BGUOG9Wc.d.mts} +5 -1
- package/dist/{index-C41EOWaQ.d.mts → index-BogZpjP2.d.mts} +4 -2
- package/dist/index.mjs +1 -1
- package/dist/jsx-runtime.mjs +1 -1
- package/dist/{node-Bz2SOK7_.mjs → node-CvPPhnWO.mjs} +36 -13
- package/dist/runtime/client/lazy.js +24 -10
- package/dist/runtime/client/runtime.d.ts +4 -0
- package/dist/runtime/client/runtime.js +24 -10
- package/dist/runtime/index.js +24 -10
- package/dist/runtime/server/index.mjs +14 -8
- package/dist/signals/index.js +0 -1
- 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 +3 -1
- package/dist/testing/index.mjs +15 -9
- package/package.json +4 -4
|
@@ -172,10 +172,18 @@ const SERVER_BUILD_FLAGS = {
|
|
|
172
172
|
};
|
|
173
173
|
//#endregion
|
|
174
174
|
//#region src/client/client-build.ts
|
|
175
|
+
/**
|
|
176
|
+
* `isDev` / `isTesting` are getters, not copies: the transpile path (e.g. `@stencil/unplugin`)
|
|
177
|
+
* sets `BUILD.*` overrides from each component module, which runs after this module is evaluated.
|
|
178
|
+
*/
|
|
175
179
|
const Build = {
|
|
176
180
|
...CLIENT_BUILD_FLAGS,
|
|
177
|
-
isDev
|
|
178
|
-
|
|
181
|
+
get isDev() {
|
|
182
|
+
return BUILD.isDev;
|
|
183
|
+
},
|
|
184
|
+
get isTesting() {
|
|
185
|
+
return BUILD.isTesting;
|
|
186
|
+
}
|
|
179
187
|
};
|
|
180
188
|
//#endregion
|
|
181
189
|
//#region src/client/client-host-ref.ts
|
|
@@ -2194,17 +2202,23 @@ const vdomFnUtils = {
|
|
|
2194
2202
|
* Convert a {@link d.VNode} to a {@link d.ChildNode} in order to present a
|
|
2195
2203
|
* friendlier public interface (hence, 'convertToPublic').
|
|
2196
2204
|
*
|
|
2197
|
-
*
|
|
2205
|
+
* Functional components receive primitive children unwrapped, so those
|
|
2206
|
+
* become text-only child nodes.
|
|
2207
|
+
*
|
|
2208
|
+
* @param node the virtual DOM node (or primitive child) to convert
|
|
2198
2209
|
* @returns a converted child node
|
|
2199
2210
|
*/
|
|
2200
|
-
const convertToPublic = (node) =>
|
|
2211
|
+
const convertToPublic = (node) => typeof node !== "object" ? {
|
|
2212
|
+
vtag: null,
|
|
2213
|
+
vtext: String(node)
|
|
2214
|
+
} : {
|
|
2201
2215
|
vattrs: node.$attrs$,
|
|
2202
2216
|
vchildren: node.$children$,
|
|
2203
2217
|
vkey: node.$key$,
|
|
2204
2218
|
vname: node.$name$,
|
|
2205
2219
|
vtag: node.$tag$,
|
|
2206
2220
|
vtext: node.$text$
|
|
2207
|
-
}
|
|
2221
|
+
};
|
|
2208
2222
|
/**
|
|
2209
2223
|
* Convert a {@link d.ChildNode} back to an equivalent {@link d.VNode} in
|
|
2210
2224
|
* order to use the resulting object in the virtual DOM. The initial object was
|
|
@@ -2221,11 +2235,11 @@ const convertToPrivate = (node) => {
|
|
|
2221
2235
|
if (node.vname) vnodeData.name = node.vname;
|
|
2222
2236
|
return h(node.vtag, vnodeData, ...node.vchildren || []);
|
|
2223
2237
|
}
|
|
2224
|
-
const vnode = newVNode(node.vtag, node.vtext);
|
|
2225
|
-
vnode.$attrs$ = node.vattrs;
|
|
2226
|
-
vnode.$children$ = node.vchildren;
|
|
2227
|
-
vnode.$key$ = node.vkey;
|
|
2228
|
-
vnode.$name$ = node.vname;
|
|
2238
|
+
const vnode = newVNode(node.vtag ?? null, node.vtext);
|
|
2239
|
+
vnode.$attrs$ = node.vattrs ?? null;
|
|
2240
|
+
vnode.$children$ = node.vchildren ?? null;
|
|
2241
|
+
vnode.$key$ = node.vkey ?? null;
|
|
2242
|
+
vnode.$name$ = node.vname ?? null;
|
|
2229
2243
|
return vnode;
|
|
2230
2244
|
};
|
|
2231
2245
|
/**
|
|
@@ -638,7 +638,9 @@ interface CopyTask {
|
|
|
638
638
|
/**
|
|
639
639
|
* Additional glob patterns to exclude from the copy operation, merged with
|
|
640
640
|
* the built-in defaults: `__mocks__`, `__fixtures__`, `dist`, hidden dirs,
|
|
641
|
-
* `.ds_store`, `.gitignore`, `desktop.ini`, `thumbs.db`.
|
|
641
|
+
* `.ds_store`, `.gitignore`, `desktop.ini`, `thumbs.db`. For a directory
|
|
642
|
+
* `src`, patterns match paths relative to that directory; an explicitly
|
|
643
|
+
* named `src` file is never ignored.
|
|
642
644
|
*/
|
|
643
645
|
ignore?: string[];
|
|
644
646
|
/**
|
|
@@ -926,7 +928,7 @@ interface TranspileOptions {
|
|
|
926
928
|
* transpile time — config-driven flags that are not derived from component
|
|
927
929
|
* scanning or runtime environment detection.
|
|
928
930
|
*/
|
|
929
|
-
type BuildOverrideKeys = 'hotModuleReplacement' | 'signalBacking' | 'vdomSignals' | 'lightDomPatches' | 'slotChildNodes' | 'slotCloneNode' | 'slotDomMutations' | 'slotTextContent' | 'lifecycleDOMEvents' | 'initializeNextTick';
|
|
931
|
+
type BuildOverrideKeys = 'isDev' | 'isTesting' | 'hotModuleReplacement' | 'signalBacking' | 'vdomSignals' | 'lightDomPatches' | 'slotChildNodes' | 'slotCloneNode' | 'slotDomMutations' | 'slotTextContent' | 'lifecycleDOMEvents' | 'initializeNextTick';
|
|
930
932
|
/**
|
|
931
933
|
* Subset of Stencil's BUILD feature flags that can be overridden at transpile
|
|
932
934
|
* time. Derived from {@link BuildConditionals} via `Pick` so the field list
|
package/dist/compiler/browser.js
CHANGED
|
@@ -1182,7 +1182,6 @@ const BUILD = {
|
|
|
1182
1182
|
asyncLoading: true,
|
|
1183
1183
|
asyncQueue: false
|
|
1184
1184
|
};
|
|
1185
|
-
BUILD.isDev, BUILD.isTesting;
|
|
1186
1185
|
BUILD.isTesting;
|
|
1187
1186
|
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/
|
|
1188
1187
|
(typeof window !== "undefined" ? window : {}).HTMLElement;
|
|
@@ -1844,7 +1843,7 @@ const validateComponentTag = (tag) => {
|
|
|
1844
1843
|
};
|
|
1845
1844
|
//#endregion
|
|
1846
1845
|
//#region src/version.ts
|
|
1847
|
-
const version = "5.0.0-beta.
|
|
1846
|
+
const version = "5.0.0-beta.28";
|
|
1848
1847
|
//#endregion
|
|
1849
1848
|
//#region src/compiler/events.ts
|
|
1850
1849
|
const buildEvents = () => {
|
|
@@ -3922,6 +3921,20 @@ const parsePropertyAtRuleDescriptors = (node) => {
|
|
|
3922
3921
|
initialValue
|
|
3923
3922
|
};
|
|
3924
3923
|
};
|
|
3924
|
+
/** `--name: docs`, `--name - docs` (as `@attr`/`@slot` use) or `--name docs`. */
|
|
3925
|
+
const CUSTOM_PROPERTY_TAG_RE = /^(--[\w-]+)\s*(?::|-(?=\s))?(.*)$/;
|
|
3926
|
+
/**
|
|
3927
|
+
* @param text the text after a `@prop`/`@cssprop` tag
|
|
3928
|
+
* @returns the custom property name and description, or `undefined` if `text` doesn't start
|
|
3929
|
+
* with a custom property name
|
|
3930
|
+
*/
|
|
3931
|
+
const parseCustomPropertyTag = (text) => {
|
|
3932
|
+
const match = text.trim().match(CUSTOM_PROPERTY_TAG_RE);
|
|
3933
|
+
return match ? {
|
|
3934
|
+
name: match[1],
|
|
3935
|
+
docs: match[2].trim()
|
|
3936
|
+
} : void 0;
|
|
3937
|
+
};
|
|
3925
3938
|
//#endregion
|
|
3926
3939
|
//#region src/compiler/docs/style-docs.ts
|
|
3927
3940
|
/**
|
|
@@ -3935,7 +3948,8 @@ const parsePropertyAtRuleDescriptors = (node) => {
|
|
|
3935
3948
|
* 2. A doc-commented `--foo: value;` declaration inside the component's "root" rule - `:host`
|
|
3936
3949
|
* for `shadow`/`scoped` encapsulation, or the component's own tag selector for `none`.
|
|
3937
3950
|
* 3. A native `@property --foo { ... }` at-rule, with the `syntax`/`initial-value` descriptors
|
|
3938
|
-
* surfaced as `syntax`/`default`. Not scoped - `@property` is a global registration.
|
|
3951
|
+
* surfaced as `syntax`/`default`. Not scoped - `@property` is a global registration. For a
|
|
3952
|
+
* property already documented by 1 or 2, it still supplies `syntax`/`default`.
|
|
3939
3953
|
*
|
|
3940
3954
|
* @param styleDocs the array to hold formatted CSS docstrings
|
|
3941
3955
|
* @param styleText the CSS text we're working with
|
|
@@ -3996,10 +4010,17 @@ function parseScopedAndNativeStyleDocs(styleDocs, styleText, mode, tag, encapsul
|
|
|
3996
4010
|
});
|
|
3997
4011
|
root.walkAtRules("property", (node) => {
|
|
3998
4012
|
const propName = node.params.trim();
|
|
3999
|
-
if (!propName.startsWith("--")
|
|
4013
|
+
if (!propName.startsWith("--")) return;
|
|
4000
4014
|
const { syntax, initialValue } = parsePropertyAtRuleDescriptors(node);
|
|
4001
4015
|
const prev = node.prev();
|
|
4002
4016
|
const docs = prev && prev.type === "comment" && isJsDocComment(prev.text) ? normalizeJsDocText(prev.text) : "";
|
|
4017
|
+
const existing = styleDocs.find((styleDoc) => styleDoc.name === propName);
|
|
4018
|
+
if (existing) {
|
|
4019
|
+
existing.docs ||= docs;
|
|
4020
|
+
if (syntax) existing.syntax ??= syntax;
|
|
4021
|
+
if (initialValue) existing.default ??= initialValue;
|
|
4022
|
+
return;
|
|
4023
|
+
}
|
|
4003
4024
|
styleDocs.push({
|
|
4004
4025
|
name: propName,
|
|
4005
4026
|
docs,
|
|
@@ -4026,12 +4047,10 @@ function parseCssComment(styleDocs, comment, mode) {
|
|
|
4026
4047
|
}).join(" ").replace(/\t/g, " ").trim();
|
|
4027
4048
|
while (comment.includes(" ")) comment = comment.replace(" ", " ");
|
|
4028
4049
|
comment.split(CSS_PROP_ANNOTATION_RE).forEach((d) => {
|
|
4029
|
-
const
|
|
4030
|
-
if (!
|
|
4031
|
-
const splt = cssDocument.split(`:`);
|
|
4050
|
+
const prop = parseCustomPropertyTag(d);
|
|
4051
|
+
if (!prop) return;
|
|
4032
4052
|
const styleDoc = {
|
|
4033
|
-
|
|
4034
|
-
docs: (splt.shift() && splt.join(`:`)).trim(),
|
|
4053
|
+
...prop,
|
|
4035
4054
|
annotation: "prop",
|
|
4036
4055
|
mode
|
|
4037
4056
|
};
|
|
@@ -10380,6 +10399,7 @@ const resetModuleLegacy = (moduleFile) => {
|
|
|
10380
10399
|
moduleFile.externalImports.length = 0;
|
|
10381
10400
|
moduleFile.isCollectionDependency = false;
|
|
10382
10401
|
moduleFile.localImports.length = 0;
|
|
10402
|
+
moduleFile.functionalComponentDeps.length = 0;
|
|
10383
10403
|
moduleFile.originalCollectionComponentPath = null;
|
|
10384
10404
|
moduleFile.originalImports.length = 0;
|
|
10385
10405
|
moduleFile.hasVdomXlink = false;
|
|
@@ -13658,12 +13678,18 @@ const gatherVdomMeta = (m, args, typeChecker) => {
|
|
|
13658
13678
|
};
|
|
13659
13679
|
//#endregion
|
|
13660
13680
|
//#region src/compiler/transformers/static-to-meta/call-expression.ts
|
|
13661
|
-
|
|
13681
|
+
/**
|
|
13682
|
+
* @param m the module or component to record vdom metadata on
|
|
13683
|
+
* @param node the call expression to parse
|
|
13684
|
+
* @param typeChecker used to resolve functional components / JSX-returning calls to their source
|
|
13685
|
+
* @param moduleFile the module to record those dependencies on; defaults to `m` when it's a module
|
|
13686
|
+
*/
|
|
13687
|
+
const parseCallExpression = (m, node, typeChecker, moduleFile = "functionalComponentDeps" in m ? m : void 0) => {
|
|
13662
13688
|
if (node.arguments != null && node.arguments.length > 0) {
|
|
13663
|
-
if (ts$1.isIdentifier(node.expression)) visitCallExpressionArgs(m, node.expression, node.arguments, typeChecker);
|
|
13689
|
+
if (ts$1.isIdentifier(node.expression)) visitCallExpressionArgs(m, node.expression, node.arguments, typeChecker, moduleFile);
|
|
13664
13690
|
else if (ts$1.isPropertyAccessExpression(node.expression)) {
|
|
13665
13691
|
const n = node.expression.name;
|
|
13666
|
-
if (ts$1.isIdentifier(n) && n) visitCallExpressionArgs(m, n, node.arguments, typeChecker);
|
|
13692
|
+
if (ts$1.isIdentifier(n) && n) visitCallExpressionArgs(m, n, node.arguments, typeChecker, moduleFile);
|
|
13667
13693
|
}
|
|
13668
13694
|
} else if (ts$1.isPropertyAccessExpression(node.expression)) {
|
|
13669
13695
|
if (ts$1.isIdentifier(node.expression.name)) {
|
|
@@ -13673,24 +13699,20 @@ const parseCallExpression = (m, node, typeChecker) => {
|
|
|
13673
13699
|
if (!declarations || declarations.length === 0) return;
|
|
13674
13700
|
const sourceFile = declarations[0].getSourceFile();
|
|
13675
13701
|
if (!sourceFile) return;
|
|
13676
|
-
|
|
13677
|
-
const moduleFile = m;
|
|
13678
|
-
if (moduleFile.functionalComponentDeps) {
|
|
13679
|
-
if (!moduleFile.functionalComponentDeps.includes(sourceFilePath)) moduleFile.functionalComponentDeps.push(sourceFilePath);
|
|
13680
|
-
}
|
|
13702
|
+
addFunctionalComponentDep(moduleFile, sourceFile);
|
|
13681
13703
|
}
|
|
13682
13704
|
}
|
|
13683
13705
|
};
|
|
13684
|
-
const visitCallExpressionArgs = (m, callExpressionName, args, typeChecker) => {
|
|
13706
|
+
const visitCallExpressionArgs = (m, callExpressionName, args, typeChecker, moduleFile) => {
|
|
13685
13707
|
const fnName = callExpressionName.escapedText;
|
|
13686
13708
|
if (fnName === "h" || fnName === "__stencil_h" || fnName === "createElement") {
|
|
13687
|
-
visitCallExpressionArg(m, args[0], typeChecker);
|
|
13709
|
+
visitCallExpressionArg(m, args[0], typeChecker, moduleFile);
|
|
13688
13710
|
if (fnName === "h" || fnName === "__stencil_h") gatherVdomMeta(m, args, typeChecker);
|
|
13689
13711
|
} else if (fnName === "jsx" || fnName === "jsxs" || fnName === "_jsx" || fnName === "_jsxs") {
|
|
13690
|
-
visitCallExpressionArg(m, args[0], typeChecker);
|
|
13712
|
+
visitCallExpressionArg(m, args[0], typeChecker, moduleFile);
|
|
13691
13713
|
gatherVdomMeta(m, args, typeChecker);
|
|
13692
13714
|
if (args.length > 2 && args[2]) m.hasVdomKey = true;
|
|
13693
|
-
} else if (args.length > 1 && fnName === "createElementNS") visitCallExpressionArg(m, args[1], typeChecker);
|
|
13715
|
+
} else if (args.length > 1 && fnName === "createElementNS") visitCallExpressionArg(m, args[1], typeChecker, moduleFile);
|
|
13694
13716
|
else if (fnName === "require" && args.length > 0 && m.originalImports) {
|
|
13695
13717
|
const arg = args[0];
|
|
13696
13718
|
if (ts$1.isStringLiteral(arg)) {
|
|
@@ -13698,7 +13720,7 @@ const visitCallExpressionArgs = (m, callExpressionName, args, typeChecker) => {
|
|
|
13698
13720
|
}
|
|
13699
13721
|
}
|
|
13700
13722
|
};
|
|
13701
|
-
const visitCallExpressionArg = (m, arg, typeChecker) => {
|
|
13723
|
+
const visitCallExpressionArg = (m, arg, typeChecker, moduleFile) => {
|
|
13702
13724
|
if (ts$1.isStringLiteral(arg)) {
|
|
13703
13725
|
let tag = arg.text;
|
|
13704
13726
|
if (typeof tag === "string") {
|
|
@@ -13706,31 +13728,31 @@ const visitCallExpressionArg = (m, arg, typeChecker) => {
|
|
|
13706
13728
|
m.htmlTagNames.push(tag);
|
|
13707
13729
|
if (tag.includes("-")) m.potentialCmpRefs.push(tag);
|
|
13708
13730
|
}
|
|
13709
|
-
} else if (typeChecker && ts$1.isIdentifier(arg)) resolveFunctionalComponentDep(
|
|
13731
|
+
} else if (typeChecker && ts$1.isIdentifier(arg)) resolveFunctionalComponentDep(moduleFile, arg, typeChecker);
|
|
13710
13732
|
};
|
|
13711
13733
|
/**
|
|
13712
13734
|
* Resolves a functional component identifier to its source file and tracks it
|
|
13713
13735
|
* as a dependency so that build-conditionals can be properly propagated.
|
|
13736
|
+
* Follows import / re-export aliases through to the declaring file.
|
|
13714
13737
|
*
|
|
13715
|
-
* @param
|
|
13738
|
+
* @param moduleFile the module to track the dependency on
|
|
13716
13739
|
* @param identifier the identifier node representing the functional component
|
|
13717
13740
|
* @param typeChecker the TypeScript type checker for symbol resolution
|
|
13718
13741
|
*/
|
|
13719
|
-
const resolveFunctionalComponentDep = (
|
|
13742
|
+
const resolveFunctionalComponentDep = (moduleFile, identifier, typeChecker) => {
|
|
13743
|
+
if (!moduleFile) return;
|
|
13720
13744
|
try {
|
|
13721
13745
|
const symbol = typeChecker.getSymbolAtLocation(identifier);
|
|
13722
13746
|
if (!symbol) return;
|
|
13723
|
-
const
|
|
13724
|
-
if (
|
|
13725
|
-
const sourceFile = declarations[0].getSourceFile();
|
|
13726
|
-
if (!sourceFile) return;
|
|
13727
|
-
const sourceFilePath = normalizePath(sourceFile.fileName);
|
|
13728
|
-
const moduleFile = m;
|
|
13729
|
-
if (moduleFile.functionalComponentDeps) {
|
|
13730
|
-
if (!moduleFile.functionalComponentDeps.includes(sourceFilePath)) moduleFile.functionalComponentDeps.push(sourceFilePath);
|
|
13731
|
-
}
|
|
13747
|
+
const sourceFile = (symbol.flags & ts$1.SymbolFlags.Alias ? typeChecker.getAliasedSymbol(symbol) : symbol).declarations?.[0]?.getSourceFile();
|
|
13748
|
+
if (sourceFile) addFunctionalComponentDep(moduleFile, sourceFile);
|
|
13732
13749
|
} catch {}
|
|
13733
13750
|
};
|
|
13751
|
+
const addFunctionalComponentDep = (moduleFile, sourceFile) => {
|
|
13752
|
+
const deps = moduleFile?.functionalComponentDeps;
|
|
13753
|
+
const sourceFilePath = normalizePath(sourceFile.fileName);
|
|
13754
|
+
if (deps && !deps.includes(sourceFilePath)) deps.push(sourceFilePath);
|
|
13755
|
+
};
|
|
13734
13756
|
//#endregion
|
|
13735
13757
|
//#region src/compiler/transformers/component-build-conditionals.ts
|
|
13736
13758
|
const setComponentBuildConditionals = (cmpMeta) => {
|
|
@@ -14107,6 +14129,13 @@ function findReExport(sourceFile, className) {
|
|
|
14107
14129
|
}
|
|
14108
14130
|
}
|
|
14109
14131
|
/**
|
|
14132
|
+
* @param sourceFile the (barrel) source file to scan
|
|
14133
|
+
* @returns the module specifiers of its `export * from './x'` statements, in order
|
|
14134
|
+
*/
|
|
14135
|
+
function findStarReExportSpecifiers(sourceFile) {
|
|
14136
|
+
return sourceFile.statements.flatMap((stmt) => ts$1.isExportDeclaration(stmt) && !stmt.exportClause && !stmt.isTypeOnly && stmt.moduleSpecifier && ts$1.isStringLiteral(stmt.moduleSpecifier) ? [stmt.moduleSpecifier.text] : []);
|
|
14137
|
+
}
|
|
14138
|
+
/**
|
|
14110
14139
|
* Finds `name`'s import in `sourceFile` and returns its module and origin name (before any `as`
|
|
14111
14140
|
* aliasing; `'default'` for a default import).
|
|
14112
14141
|
* @param sourceFile the source file to scan for a matching import
|
|
@@ -14233,12 +14262,20 @@ function findClassInJsModule(config, compilerCtx, source, className, hopsRemaini
|
|
|
14233
14262
|
};
|
|
14234
14263
|
}
|
|
14235
14264
|
if (hopsRemaining <= 0) return;
|
|
14265
|
+
const readReExported = (moduleSpecifier) => {
|
|
14266
|
+
const resolvedFileName = tsResolveModuleName(config, compilerCtx, moduleSpecifier, source.fileName)?.resolvedModule?.resolvedFileName;
|
|
14267
|
+
return resolvedFileName ? readJsSourceFile(config, resolvedFileName) : void 0;
|
|
14268
|
+
};
|
|
14236
14269
|
const reExport = findReExport(source, className);
|
|
14237
|
-
if (
|
|
14238
|
-
|
|
14239
|
-
|
|
14240
|
-
|
|
14241
|
-
|
|
14270
|
+
if (reExport) {
|
|
14271
|
+
const nextSource = readReExported(reExport.moduleSpecifier);
|
|
14272
|
+
return nextSource && findClassInJsModule(config, compilerCtx, nextSource, reExport.localName, hopsRemaining - 1);
|
|
14273
|
+
}
|
|
14274
|
+
for (const moduleSpecifier of findStarReExportSpecifiers(source)) {
|
|
14275
|
+
const nextSource = readReExported(moduleSpecifier);
|
|
14276
|
+
const found = nextSource && findClassInJsModule(config, compilerCtx, nextSource, className, hopsRemaining - 1);
|
|
14277
|
+
if (found) return found;
|
|
14278
|
+
}
|
|
14242
14279
|
}
|
|
14243
14280
|
/**
|
|
14244
14281
|
* Filters `dedupeMembers` down to entries not already present in `staticMembers`
|
|
@@ -14333,7 +14370,8 @@ function convertDiskSourceFileDecorators(sourceFile, config, target = ts$1.Scrip
|
|
|
14333
14370
|
/**
|
|
14334
14371
|
* Resolves an `extends` target through a module specifier: resolves the
|
|
14335
14372
|
* module, finds the named class/mixin-factory export, and adds it (and its
|
|
14336
|
-
* own ancestors) to `dependentClasses`. Follows one level of re-export (barrel file
|
|
14373
|
+
* own ancestors) to `dependentClasses`. Follows one level of re-export (barrel file, named or
|
|
14374
|
+
* `export *`) when the
|
|
14337
14375
|
* declaration isn't found directly in the resolved module.
|
|
14338
14376
|
* @param compilerCtx the current compiler context
|
|
14339
14377
|
* @param buildCtx the current build context
|
|
@@ -14354,7 +14392,9 @@ function resolveAndProcessExtendedClass(compilerCtx, buildCtx, classDeclaration,
|
|
|
14354
14392
|
let keepLooking = true;
|
|
14355
14393
|
const foundFile = tsResolveModuleName(buildCtx.config, compilerCtx, moduleSpecifier, currentSource.fileName);
|
|
14356
14394
|
if (!foundFile?.resolvedModule || !className) return;
|
|
14357
|
-
|
|
14395
|
+
const resolvedFileName = foundFile.resolvedModule.resolvedFileName;
|
|
14396
|
+
let foundSource = compilerCtx.moduleMap.get(resolvedFileName)?.staticSourceFile;
|
|
14397
|
+
if (!foundSource && isJsFile(currentSource.fileName) && isJsFile(resolvedFileName)) foundSource = readJsSourceFile(buildCtx.config, resolvedFileName);
|
|
14358
14398
|
if (!foundSource) {
|
|
14359
14399
|
foundSource = tsGetSourceFile(buildCtx.config, foundFile);
|
|
14360
14400
|
if (!foundSource) {
|
|
@@ -14368,7 +14408,7 @@ function resolveAndProcessExtendedClass(compilerCtx, buildCtx, classDeclaration,
|
|
|
14368
14408
|
}
|
|
14369
14409
|
const matchedStatement = findStatementByName(foundSource, className);
|
|
14370
14410
|
if (!matchedStatement) {
|
|
14371
|
-
const reExport = barrelHopsRemaining > 0 ? findReExport(foundSource, className) : void 0;
|
|
14411
|
+
const reExport = barrelHopsRemaining > 0 ? findReExport(foundSource, className) ?? findStarReExportOf(buildCtx.config, compilerCtx, foundSource, className) : void 0;
|
|
14372
14412
|
if (reExport) return resolveAndProcessExtendedClass(compilerCtx, buildCtx, classDeclaration, foundSource, reExport.moduleSpecifier, reExport.localName, dependentClasses, typeChecker, ogModule, targetScriptTarget, barrelHopsRemaining - 1, originalModuleSpecifier, originalContainingFile);
|
|
14373
14413
|
const err = buildWarn(buildCtx.diagnostics);
|
|
14374
14414
|
err.messageText = `Unable to find "${className}" in the imported module "${moduleSpecifier}".
|
|
@@ -14378,12 +14418,22 @@ function resolveAndProcessExtendedClass(compilerCtx, buildCtx, classDeclaration,
|
|
|
14378
14418
|
}
|
|
14379
14419
|
let foundClassDeclaration = matchedStatement ? ts$1.isClassDeclaration(matchedStatement) ? matchedStatement : void 0 : void 0;
|
|
14380
14420
|
let foundClassSource = foundSource;
|
|
14381
|
-
|
|
14421
|
+
const findInJsEntry = () => {
|
|
14422
|
+
if (!isDtsFile(foundSource.fileName) || isLocalModule(originalModuleSpecifier)) return;
|
|
14423
|
+
const jsSource = resolveModuleJsEntry(buildCtx.config, compilerCtx, originalModuleSpecifier, originalContainingFile);
|
|
14424
|
+
return jsSource && findClassInJsModule(buildCtx.config, compilerCtx, jsSource, className);
|
|
14425
|
+
};
|
|
14426
|
+
if (foundClassDeclaration) {
|
|
14427
|
+
const foundInJs = findInJsEntry();
|
|
14428
|
+
if (foundInJs) {
|
|
14429
|
+
foundClassDeclaration = foundInJs.classNode;
|
|
14430
|
+
foundClassSource = foundInJs.sourceFile;
|
|
14431
|
+
}
|
|
14432
|
+
} else if (matchedStatement) {
|
|
14382
14433
|
foundClassDeclaration = findClassWalk(matchedStatement);
|
|
14383
14434
|
keepLooking = false;
|
|
14384
|
-
if (!foundClassDeclaration
|
|
14385
|
-
const
|
|
14386
|
-
const foundInJs = jsSource && findClassInJsModule(buildCtx.config, compilerCtx, jsSource, className);
|
|
14435
|
+
if (!foundClassDeclaration) {
|
|
14436
|
+
const foundInJs = findInJsEntry();
|
|
14387
14437
|
if (foundInJs) {
|
|
14388
14438
|
foundClassDeclaration = foundInJs.classNode;
|
|
14389
14439
|
foundClassSource = foundInJs.sourceFile;
|
|
@@ -14401,6 +14451,27 @@ function resolveAndProcessExtendedClass(compilerCtx, buildCtx, classDeclaration,
|
|
|
14401
14451
|
}
|
|
14402
14452
|
return foundClassDeclaration;
|
|
14403
14453
|
}
|
|
14454
|
+
/**
|
|
14455
|
+
* Finds the first `export * from './x'` in `barrel` whose target declares `className` directly.
|
|
14456
|
+
* @param config the current Stencil validated config
|
|
14457
|
+
* @param compilerCtx the current compiler context
|
|
14458
|
+
* @param barrel the source file to scan
|
|
14459
|
+
* @param className the declaration name to look for
|
|
14460
|
+
* @returns the re-export to follow, in `findReExport`'s shape, or `undefined`
|
|
14461
|
+
*/
|
|
14462
|
+
function findStarReExportOf(config, compilerCtx, barrel, className) {
|
|
14463
|
+
for (const moduleSpecifier of findStarReExportSpecifiers(barrel)) {
|
|
14464
|
+
const resolved = tsResolveModuleName(config, compilerCtx, moduleSpecifier, barrel.fileName);
|
|
14465
|
+
const fileName = resolved?.resolvedModule?.resolvedFileName;
|
|
14466
|
+
if (!fileName) continue;
|
|
14467
|
+
const target = compilerCtx.moduleMap.get(fileName)?.staticSourceFile ?? (isJsFile(fileName) ? readJsSourceFile(config, fileName) : tsGetSourceFile(config, resolved));
|
|
14468
|
+
if (target && findStatementByName(target, className)) return {
|
|
14469
|
+
moduleSpecifier,
|
|
14470
|
+
localName: className
|
|
14471
|
+
};
|
|
14472
|
+
}
|
|
14473
|
+
}
|
|
14474
|
+
const isJsFile = (fileName) => /\.[cm]?js$/.test(fileName);
|
|
14404
14475
|
function convertDtsToJs(declarationSourceFile, compilerCtx) {
|
|
14405
14476
|
const jsPath = normalizePath(declarationSourceFile.replace(/\.d\.ts$/, ".js").replace("/types/", "/collection/"));
|
|
14406
14477
|
return compilerCtx.moduleMap.get(jsPath)?.staticSourceFile;
|
|
@@ -14837,7 +14908,7 @@ function reclassifyGlobalTypeReferences(members, declaringSf, declaringPath, res
|
|
|
14837
14908
|
}
|
|
14838
14909
|
/**
|
|
14839
14910
|
* Looks for `name` as a direct top-level declaration in `sf`; if not found, follows one level of
|
|
14840
|
-
* re-export (barrel file) via `resolveImport` - matching `compiler-ctx-merge.ts`'s equivalent
|
|
14911
|
+
* re-export (barrel file, named or `export *`) via `resolveImport` - matching `compiler-ctx-merge.ts`'s equivalent
|
|
14841
14912
|
* one-hop fallback (see `findReExport` in `shared.ts` for why it's capped at one hop).
|
|
14842
14913
|
*
|
|
14843
14914
|
* @param sf the source file to search
|
|
@@ -14854,20 +14925,25 @@ function findDeclarationOrReExport(sf, path, name, resolveImport) {
|
|
|
14854
14925
|
sourceFile: sf,
|
|
14855
14926
|
path
|
|
14856
14927
|
};
|
|
14857
|
-
const
|
|
14858
|
-
|
|
14859
|
-
|
|
14860
|
-
|
|
14861
|
-
|
|
14862
|
-
|
|
14863
|
-
|
|
14864
|
-
|
|
14865
|
-
|
|
14866
|
-
|
|
14867
|
-
|
|
14868
|
-
|
|
14869
|
-
path: resolvedPath
|
|
14928
|
+
const findIn = (moduleSpecifier, localName) => {
|
|
14929
|
+
const resolved = resolveImport(moduleSpecifier, path);
|
|
14930
|
+
if (!resolved) return void 0;
|
|
14931
|
+
const { code, path: resolvedPath } = resolved;
|
|
14932
|
+
const isTs = resolvedPath.endsWith(".tsx") || resolvedPath.endsWith(".ts");
|
|
14933
|
+
const reExportSf = ts$1.createSourceFile(resolvedPath, code, ts$1.ScriptTarget.ESNext, true, isTs ? ts$1.ScriptKind.TSX : ts$1.ScriptKind.JS);
|
|
14934
|
+
const statement = findStatementByName(reExportSf, localName);
|
|
14935
|
+
return statement && {
|
|
14936
|
+
statement,
|
|
14937
|
+
sourceFile: reExportSf,
|
|
14938
|
+
path: resolvedPath
|
|
14939
|
+
};
|
|
14870
14940
|
};
|
|
14941
|
+
const reExport = findReExport(sf, name);
|
|
14942
|
+
if (reExport) return findIn(reExport.moduleSpecifier, reExport.localName);
|
|
14943
|
+
for (const moduleSpecifier of findStarReExportSpecifiers(sf)) {
|
|
14944
|
+
const found = findIn(moduleSpecifier, name);
|
|
14945
|
+
if (found) return found;
|
|
14946
|
+
}
|
|
14871
14947
|
}
|
|
14872
14948
|
/**
|
|
14873
14949
|
* Recursively resolves a class's `extends` heritage into a flat, deduplicated
|
|
@@ -15443,7 +15519,7 @@ const parseStaticComponentMeta = (compilerCtx, typeChecker, cmpNode, moduleFile,
|
|
|
15443
15519
|
};
|
|
15444
15520
|
if (!isCollectionDependency) validateComponentMembers(cmpNode, buildCtx);
|
|
15445
15521
|
const visitComponentChildNode = (node) => {
|
|
15446
|
-
if (ts$1.isCallExpression(node)) parseCallExpression(cmp, node, typeChecker);
|
|
15522
|
+
if (ts$1.isCallExpression(node)) parseCallExpression(cmp, node, typeChecker, moduleFile);
|
|
15447
15523
|
else if (ts$1.isStringLiteral(node)) parseStringLiteral(cmp, node);
|
|
15448
15524
|
node.forEachChild(visitComponentChildNode);
|
|
15449
15525
|
};
|
|
@@ -15664,6 +15740,9 @@ const updateModule = (config, compilerCtx, buildCtx, tsSourceFile, sourceFileTex
|
|
|
15664
15740
|
} else if (ts$1.isImportDeclaration(node)) {
|
|
15665
15741
|
parseModuleImport(config, compilerCtx, buildCtx, moduleFile, srcDirPath, node, true);
|
|
15666
15742
|
return;
|
|
15743
|
+
} else if (ts$1.isExportDeclaration(node)) {
|
|
15744
|
+
parseModuleReExport(moduleFile, srcDirPath, node);
|
|
15745
|
+
return;
|
|
15667
15746
|
} else if (ts$1.isCallExpression(node)) parseCallExpression(moduleFile, node, typeChecker);
|
|
15668
15747
|
else if (ts$1.isStringLiteral(node)) parseStringLiteral(moduleFile, node);
|
|
15669
15748
|
else if (ts$1.isVariableStatement(node)) node.declarationList.declarations.forEach((declaration) => {
|
|
@@ -15834,18 +15913,32 @@ const addExternalImport = (config, compilerCtx, buildCtx, moduleFile, containing
|
|
|
15834
15913
|
//#region src/compiler/transformers/static-to-meta/import.ts
|
|
15835
15914
|
const parseModuleImport = (config, compilerCtx, buildCtx, moduleFile, dirPath, importNode, resolveCollections) => {
|
|
15836
15915
|
if (importNode.moduleSpecifier && ts$1.isStringLiteral(importNode.moduleSpecifier)) {
|
|
15837
|
-
|
|
15916
|
+
const importPath = importNode.moduleSpecifier.text;
|
|
15838
15917
|
if (!moduleFile.originalImports.includes(importPath)) moduleFile.originalImports.push(importPath);
|
|
15839
15918
|
if (importPath === "@stencil/core/signals") moduleFile.hasSignalsImport = true;
|
|
15840
|
-
|
|
15841
|
-
|
|
15842
|
-
|
|
15843
|
-
} else if (importPath.startsWith(".")) {
|
|
15844
|
-
importPath = normalizePath(join$1(dirPath, importPath));
|
|
15845
|
-
moduleFile.localImports.push(importPath);
|
|
15846
|
-
} else addExternalImport(config, compilerCtx, buildCtx, moduleFile, moduleFile.sourceFilePath, importPath, resolveCollections, !importNode.importClause);
|
|
15919
|
+
const localPath = resolveLocalImportPath(dirPath, importPath);
|
|
15920
|
+
if (localPath) moduleFile.localImports.push(localPath);
|
|
15921
|
+
else addExternalImport(config, compilerCtx, buildCtx, moduleFile, moduleFile.sourceFilePath, importPath, resolveCollections, !importNode.importClause);
|
|
15847
15922
|
}
|
|
15848
15923
|
};
|
|
15924
|
+
/**
|
|
15925
|
+
* Record a local `export … from './x'` re-export as a local import, so build conditionals
|
|
15926
|
+
* propagate through barrel files. Bare-specifier re-exports are left alone.
|
|
15927
|
+
*
|
|
15928
|
+
* @param moduleFile the module containing the re-export
|
|
15929
|
+
* @param dirPath the module's (normalized) directory
|
|
15930
|
+
* @param exportNode the export declaration
|
|
15931
|
+
*/
|
|
15932
|
+
const parseModuleReExport = (moduleFile, dirPath, exportNode) => {
|
|
15933
|
+
if (exportNode.moduleSpecifier && ts$1.isStringLiteral(exportNode.moduleSpecifier)) {
|
|
15934
|
+
const localPath = resolveLocalImportPath(dirPath, exportNode.moduleSpecifier.text);
|
|
15935
|
+
if (localPath && !moduleFile.localImports.includes(localPath)) moduleFile.localImports.push(localPath);
|
|
15936
|
+
}
|
|
15937
|
+
};
|
|
15938
|
+
const resolveLocalImportPath = (dirPath, importPath) => {
|
|
15939
|
+
if (isAbsolute(importPath)) return normalizePath(importPath);
|
|
15940
|
+
if (importPath.startsWith(".")) return normalizePath(join$1(dirPath, importPath));
|
|
15941
|
+
};
|
|
15849
15942
|
//#endregion
|
|
15850
15943
|
//#region src/compiler/transformers/static-to-meta/visitor.ts
|
|
15851
15944
|
const convertStaticToMeta = (config, compilerCtx, buildCtx, typeChecker, collection, transformOpts) => {
|
|
@@ -15855,6 +15948,7 @@ const convertStaticToMeta = (config, compilerCtx, buildCtx, typeChecker, collect
|
|
|
15855
15948
|
const visitNode = (node) => {
|
|
15856
15949
|
if (ts$1.isClassDeclaration(node)) return parseStaticComponentMeta(compilerCtx, typeChecker, node, moduleFile, buildCtx, transformOpts);
|
|
15857
15950
|
else if (ts$1.isImportDeclaration(node)) parseModuleImport(config, compilerCtx, buildCtx, moduleFile, dirPath, node, !transformOpts.isolatedModules);
|
|
15951
|
+
else if (ts$1.isExportDeclaration(node)) parseModuleReExport(moduleFile, dirPath, node);
|
|
15858
15952
|
else if (ts$1.isCallExpression(node)) parseCallExpression(moduleFile, node, typeChecker);
|
|
15859
15953
|
else if (ts$1.isStringLiteral(node)) parseStringLiteral(moduleFile, node);
|
|
15860
15954
|
return ts$1.visitEachChild(node, visitNode, transformCtx);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as CompilerFsStats, $n as WorkerMainController, $t as OutputTargetBuild, A as BuildOverrides, An as ResolveModuleIdResults, At as HotModuleReplacement, B as CompilerEventBuildLog, Bn as SsrFactoryOptions, Bt as Logger, C as BuildEmitEvents, Cn as PluginTransformResults, Cr as JsonDocsStyle, Ct as DevServerEditor, D as BuildOnEventRemove, Dn as PrerenderResults, Dr as JsonDocsValue, Dt as HistoryApiFallback, E as BuildNoChangeResults, En as PrerenderOptions, Er as JsonDocsUsage, Et as FsWatchResults, F as Compiler, Fn as SerializeDocumentOptions, Ft as LazyRequire, G as CompilerEventFileAdd, Gn as TransformOptions, Gt as OptimizeCssInput, H as CompilerEventBuildStart, Hn as StencilDevServerConfig, Ht as LoggerTimeSpan, I as CompilerBuildResults, In as ServiceWorkerConfig, It as LightDomPatches, J as CompilerEventFsChange, Jn as TranspileResults, Jt as OptimizeJsOutput, K as CompilerEventFileDelete, Kn as TranspileOnlyResults, Kt as OptimizeCssOutput, L as CompilerBuildStart, Ln as SitemapXmpOpts, Lt as LoadConfigInit, M as CliInitOptions, Mn as RobotsTxtOpts, Mt as HydrateFactoryOptions, N as CompileScriptMinifyOptions, Nn as RobotsTxtResults, Nt as HydratedFlag, O as BuildOnEvents, On as PrerenderStartOptions, Or as StyleDoc, Ot as HmrGlobalStyleUpdate, P as CompileTarget, Pn as RolldownConfig, Pt as LOG_LEVELS, Q as CompilerFileWatcherEvent, Qn as WatcherCloseResults, Qt as OutputTargetBaseNext, R as CompilerDependency, Rn as SitemapXmpResults, Rt as LoadConfigResults, S as AutoprefixerOptions, Sn as PluginCtx, Sr as JsonDocsSlot, St as DevServerConfig, T as BuildLog, Tn as PrerenderHydrateOptions, Tr as JsonDocsTypeLibrary, Tt as DocsReadmeCustomColumn, U as CompilerEventDirAdd, Un as StencilDocsConfig, Ut as ModeConfig, V as CompilerEventBuildNoChange, Vn as StencilConfig, Vt as LoggerLineUpdater, W as CompilerEventDirDelete, Wn as SystemDetails, Wt as NodeResolveConfig, X as CompilerFileWatcher, Xn as ValidatedConfig, Xt as OutputTargetAssets, Y as CompilerEventName, Yn as UnvalidatedConfig, Yt as OutputTarget, Z as CompilerFileWatcherCallback, Zn as ValidatedOutputTargetWww, Zt as OutputTargetBase, _ as PrintLine, _n as OutputTargetWww, _r as JsonDocsListener, _t as CopyTask, a as ComponentCompilerEvent, an as OutputTargetDocsCustom, at as CompilerSystemRealpathResults, b as SsrResults, bn as PlatformPath, br as JsonDocsPart, bt as CustomElementsExportBehaviorOptions, c as ComponentCompilerMethod, cn as OutputTargetDocsReadme, ct as CompilerSystemRemoveFileResults, d as ComponentCompilerTypeReferences, dn as OutputTargetLoaderBundle, dr as JsonDocMethodParameter, dt as CompilerSystemWriteFileResults, en as OutputTargetCollection, er as WorkerOptions, et as CompilerRequest, f as ComponentGlobalStyle, fn as OutputTargetSsr, fr as JsonDocs, ft as CompilerWatcher, g as PrerenderUrlResults, gn as OutputTargetTypes, gr as JsonDocsEvent, gt as CopyResults, h as PackageJsonData, hn as OutputTargetStats, hr as JsonDocsDependencyGraph, ht as ConfigCompat, i as CompilerWorkerContext, in as OutputTargetDocsAgentSkill, it as CompilerSystemCreateDirectoryResults, j as BuildResultsComponentGraph, jn as ResolveModuleOptions, jt as HydrateDocumentOptions, k as BuildOutput, kn as ResolveModuleIdOptions, kr as FsWriteResults, kt as HmrStyleUpdate, l as ComponentCompilerProperty, ln as OutputTargetDocsVscode, lr as UserBuildConditionals, lt as CompilerSystemRenameResults, m as LazyBundlesRuntimeData, mn as OutputTargetStandalone, mr as JsonDocsCustomState, mt as ConfigBundle, nn as OutputTargetCustom, nt as CompilerSystem, o as ComponentCompilerListener, on as OutputTargetDocsCustomElementsManifest, ot as CompilerSystemRemoveDirectoryOptions, pn as OutputTargetSsrWasm, pr as JsonDocsComponent, pt as Config, q as CompilerEventFileUpdate, qn as TranspileOptions, qt as OptimizeJsInput, r as CompilerCtx, rn as OutputTargetDistLazy, rt as CompilerSystemCreateDirectoryOptions, s as ComponentCompilerMeta, sn as OutputTargetDocsJson, st as CompilerSystemRemoveDirectoryResults, t as BuildCtx, tn as OutputTargetCopy, tt as CompilerRequestResponse, u as ComponentCompilerState, un as OutputTargetGlobalStyle, ut as CompilerSystemRenamedPath, vn as PageReloadStrategy, vr as JsonDocsMethod, vt as Credentials, w as BuildEvents, wn as PrerenderConfig, wr as JsonDocsTag, wt as Diagnostic, x as WorkerMsgHandler, xn as Plugin, xr as JsonDocsProp, xt as DevServer, yn as ParsedPath, yr as JsonDocsMethodReturn, yt as CustomElementsExportBehavior, z as CompilerEventBuildFinish, zn as SsrDocumentOptions, zt as LogLevel } from "../index-
|
|
1
|
+
import { $ as CompilerFsStats, $n as WorkerMainController, $t as OutputTargetBuild, A as BuildOverrides, An as ResolveModuleIdResults, At as HotModuleReplacement, B as CompilerEventBuildLog, Bn as SsrFactoryOptions, Bt as Logger, C as BuildEmitEvents, Cn as PluginTransformResults, Cr as JsonDocsStyle, Ct as DevServerEditor, D as BuildOnEventRemove, Dn as PrerenderResults, Dr as JsonDocsValue, Dt as HistoryApiFallback, E as BuildNoChangeResults, En as PrerenderOptions, Er as JsonDocsUsage, Et as FsWatchResults, F as Compiler, Fn as SerializeDocumentOptions, Ft as LazyRequire, G as CompilerEventFileAdd, Gn as TransformOptions, Gt as OptimizeCssInput, H as CompilerEventBuildStart, Hn as StencilDevServerConfig, Ht as LoggerTimeSpan, I as CompilerBuildResults, In as ServiceWorkerConfig, It as LightDomPatches, J as CompilerEventFsChange, Jn as TranspileResults, Jt as OptimizeJsOutput, K as CompilerEventFileDelete, Kn as TranspileOnlyResults, Kt as OptimizeCssOutput, L as CompilerBuildStart, Ln as SitemapXmpOpts, Lt as LoadConfigInit, M as CliInitOptions, Mn as RobotsTxtOpts, Mt as HydrateFactoryOptions, N as CompileScriptMinifyOptions, Nn as RobotsTxtResults, Nt as HydratedFlag, O as BuildOnEvents, On as PrerenderStartOptions, Or as StyleDoc, Ot as HmrGlobalStyleUpdate, P as CompileTarget, Pn as RolldownConfig, Pt as LOG_LEVELS, Q as CompilerFileWatcherEvent, Qn as WatcherCloseResults, Qt as OutputTargetBaseNext, R as CompilerDependency, Rn as SitemapXmpResults, Rt as LoadConfigResults, S as AutoprefixerOptions, Sn as PluginCtx, Sr as JsonDocsSlot, St as DevServerConfig, T as BuildLog, Tn as PrerenderHydrateOptions, Tr as JsonDocsTypeLibrary, Tt as DocsReadmeCustomColumn, U as CompilerEventDirAdd, Un as StencilDocsConfig, Ut as ModeConfig, V as CompilerEventBuildNoChange, Vn as StencilConfig, Vt as LoggerLineUpdater, W as CompilerEventDirDelete, Wn as SystemDetails, Wt as NodeResolveConfig, X as CompilerFileWatcher, Xn as ValidatedConfig, Xt as OutputTargetAssets, Y as CompilerEventName, Yn as UnvalidatedConfig, Yt as OutputTarget, Z as CompilerFileWatcherCallback, Zn as ValidatedOutputTargetWww, Zt as OutputTargetBase, _ as PrintLine, _n as OutputTargetWww, _r as JsonDocsListener, _t as CopyTask, a as ComponentCompilerEvent, an as OutputTargetDocsCustom, at as CompilerSystemRealpathResults, b as SsrResults, bn as PlatformPath, br as JsonDocsPart, bt as CustomElementsExportBehaviorOptions, c as ComponentCompilerMethod, cn as OutputTargetDocsReadme, ct as CompilerSystemRemoveFileResults, d as ComponentCompilerTypeReferences, dn as OutputTargetLoaderBundle, dr as JsonDocMethodParameter, dt as CompilerSystemWriteFileResults, en as OutputTargetCollection, er as WorkerOptions, et as CompilerRequest, f as ComponentGlobalStyle, fn as OutputTargetSsr, fr as JsonDocs, ft as CompilerWatcher, g as PrerenderUrlResults, gn as OutputTargetTypes, gr as JsonDocsEvent, gt as CopyResults, h as PackageJsonData, hn as OutputTargetStats, hr as JsonDocsDependencyGraph, ht as ConfigCompat, i as CompilerWorkerContext, in as OutputTargetDocsAgentSkill, it as CompilerSystemCreateDirectoryResults, j as BuildResultsComponentGraph, jn as ResolveModuleOptions, jt as HydrateDocumentOptions, k as BuildOutput, kn as ResolveModuleIdOptions, kr as FsWriteResults, kt as HmrStyleUpdate, l as ComponentCompilerProperty, ln as OutputTargetDocsVscode, lr as UserBuildConditionals, lt as CompilerSystemRenameResults, m as LazyBundlesRuntimeData, mn as OutputTargetStandalone, mr as JsonDocsCustomState, mt as ConfigBundle, nn as OutputTargetCustom, nt as CompilerSystem, o as ComponentCompilerListener, on as OutputTargetDocsCustomElementsManifest, ot as CompilerSystemRemoveDirectoryOptions, pn as OutputTargetSsrWasm, pr as JsonDocsComponent, pt as Config, q as CompilerEventFileUpdate, qn as TranspileOptions, qt as OptimizeJsInput, r as CompilerCtx, rn as OutputTargetDistLazy, rt as CompilerSystemCreateDirectoryOptions, s as ComponentCompilerMeta, sn as OutputTargetDocsJson, st as CompilerSystemRemoveDirectoryResults, t as BuildCtx, tn as OutputTargetCopy, tt as CompilerRequestResponse, u as ComponentCompilerState, un as OutputTargetGlobalStyle, ut as CompilerSystemRenamedPath, vn as PageReloadStrategy, vr as JsonDocsMethod, vt as Credentials, w as BuildEvents, wn as PrerenderConfig, wr as JsonDocsTag, wt as Diagnostic, x as WorkerMsgHandler, xn as Plugin, xr as JsonDocsProp, xt as DevServer, yn as ParsedPath, yr as JsonDocsMethodReturn, yt as CustomElementsExportBehavior, z as CompilerEventBuildFinish, zn as SsrDocumentOptions, zt as LogLevel } from "../index-BogZpjP2.mjs";
|
|
2
2
|
import ts from "typescript";
|
|
3
3
|
import { Plugin as Plugin$1 } from "rolldown";
|
|
4
4
|
//#region src/version.d.ts
|
package/dist/compiler/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { A as version, C as hasStencilHydrateImport, D as parseCssOnlyComponents, E as replaceStencilHydrateImport, M as scopeCss, O as buildId, S as hasStencilGlobalsImport, T as replaceStencilGlobalsImport, _ as cmpMetaToDocsComponent, a as createPrerenderer, b as buildHydrateCss, c as createWorkerContext, d as nodeRequire, f as optimizeCss, g as generateManifest, h as generateComponentTypesFile, i as createSystem, j as versions, k as vermoji, l as createWorkerMessageHandler, m as validateHydrated, n as transpile, o as loadConfig, p as validateConfig, r as transpileSync, s as createCompiler, t as ts, u as optimizeJs, v as getScopeId, w as replaceStencilCssComponentsImport, x as hasStencilCssComponentsImport, y as foldBuildFlags } from "../compiler-
|
|
2
|
-
import { a as LOG_LEVELS, i as CustomElementsExportBehaviorOptions } from "../node-
|
|
1
|
+
import { A as version, C as hasStencilHydrateImport, D as parseCssOnlyComponents, E as replaceStencilHydrateImport, M as scopeCss, O as buildId, S as hasStencilGlobalsImport, T as replaceStencilGlobalsImport, _ as cmpMetaToDocsComponent, a as createPrerenderer, b as buildHydrateCss, c as createWorkerContext, d as nodeRequire, f as optimizeCss, g as generateManifest, h as generateComponentTypesFile, i as createSystem, j as versions, k as vermoji, l as createWorkerMessageHandler, m as validateHydrated, n as transpile, o as loadConfig, p as validateConfig, r as transpileSync, s as createCompiler, t as ts, u as optimizeJs, v as getScopeId, w as replaceStencilCssComponentsImport, x as hasStencilCssComponentsImport, y as foldBuildFlags } from "../compiler-BQcDWWEp.mjs";
|
|
2
|
+
import { a as LOG_LEVELS, i as CustomElementsExportBehaviorOptions } from "../node-CvPPhnWO.mjs";
|
|
3
3
|
export { CustomElementsExportBehaviorOptions, LOG_LEVELS, buildHydrateCss, buildId, cmpMetaToDocsComponent, createCompiler, createPrerenderer, createSystem, createWorkerContext, createWorkerMessageHandler, foldBuildFlags, generateComponentTypesFile, generateManifest, getScopeId, hasStencilCssComponentsImport, hasStencilGlobalsImport, hasStencilHydrateImport, loadConfig, nodeRequire, optimizeCss, optimizeJs, parseCssOnlyComponents, replaceStencilCssComponentsImport, replaceStencilGlobalsImport, replaceStencilHydrateImport, scopeCss, transpile, transpileSync, ts, validateConfig, validateHydrated, vermoji, version, versions };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $i as CUSTOM, $r as filterActiveTargets, Ai as buildWarn, Ar as ModeValidationError, Bi as loadTypeScriptDiagnostics, Br as isJsFile, Ca as TYPES, Ci as isOutputTargetWww, Da as XLINK_NS, Di as TASK_CANCELED_MSG, Ea as WWW, Ei as shouldExcludeComponent, Fi as escapeHtml, Fr as createJsVarName, Gi as formatLazyBundleRuntimeMeta, Gr as readOnlyArrayHasStringMember, Hi as isRolldownError, Hr as isTsFile, Ii as normalizeDiagnostics, Ir as generatePreamble, Ji as CMP_FLAGS, Jr as getSourceMappingUrlForEndOfFile, Ki as stringifyRuntimeData, Kr as readPackageJson, Li as splitLineBreaks, Lr as getTextDocs, Mi as hasError, Mr as validateComponentTag, Ni as hasWarning, Nr as ParsePackageJsonResult, Oi as buildError, Pi as shouldIgnoreError, Pr as addDocBlock, Qi as COPY, Qr as FilterComponentsResult, Ri as augmentDiagnosticWithNode, Rr as hasDependency, Sa as SVG_NS, Si as isOutputTargetTypes, Ta as WATCH_FLAGS, Ti as relativeImport, Ui as loadRolldownDiagnostics, Ur as isTsxFile, Vi as createOnWarnFn, Vr as isJsxFile, Wi as formatComponentRuntimeMeta, Wr as parsePackageJson, Xi as COLLECTION_APP_DATA_FILE_NAME, Xr as rolldownToStencilSourceMap, Yi as COLLECTION, Yr as getSourceMappingUrlLinker, Zi as COLLECTION_MANIFEST_FILE_NAME, Zr as result_d_exports, _a as SSR, _i as isOutputTargetLoaderBundle, aa as DOCS_JSON, ai as isOutputTargetCollection, ba as STATS, bi as isOutputTargetStandalone, ca as EVENT_FLAGS, ci as isOutputTargetDistLazy, da as HOST_FLAGS, di as isOutputTargetDocsCustom, ea as DEFAULT_STYLE_MODE, ei as filterExcludedComponents, fa as HTML_NS, fi as isOutputTargetDocsCustomElementsManifest, ga as NODE_TYPES, gi as isOutputTargetGlobalStyle, ha as MEMBER_FLAGS, hi as isOutputTargetDocsVscode, ia as DOCS_CUSTOM_ELEMENTS_MANIFEST, ii as isOutputTargetAssets, ji as catchError, jr as validateComponentModes, ki as buildJsonFileError, la as GENERATED_DTS, li as isOutputTargetDocs, ma as LOADER_BUNDLE, mi as isOutputTargetDocsReadme, na as DOCS_AGENT_SKILL, ni as getComponentsDtsTypesFilePath, oa as DOCS_README, oi as isOutputTargetCopy, pa as LISTENER_FLAGS, pi as isOutputTargetDocsJson, qi as ASSETS, qr as getInlineSourceMappingUrlLinker, ra as DOCS_CUSTOM, ri as getComponentsFromModules, sa as DOCS_VSCODE, si as isOutputTargetCustom, ta as DIST_LAZY, ti as getComponentsDtsSrcFilePath, ua as GLOBAL_STYLE, ui as isOutputTargetDocsAgentSkill, va as SSR_WASM, vi as isOutputTargetSsr, wa as VALID_CONFIG_OUTPUT_TARGETS, wi as isValidConfigOutputTarget, xa as STYLE_EXT, xi as isOutputTargetStats, ya as STANDALONE, yi as isOutputTargetSsrWasm, zi as loadTypeScriptDiagnostic, zr as isDtsFile } from "../../index-
|
|
1
|
+
import { $i as CUSTOM, $r as filterActiveTargets, Ai as buildWarn, Ar as ModeValidationError, Bi as loadTypeScriptDiagnostics, Br as isJsFile, Ca as TYPES, Ci as isOutputTargetWww, Da as XLINK_NS, Di as TASK_CANCELED_MSG, Ea as WWW, Ei as shouldExcludeComponent, Fi as escapeHtml, Fr as createJsVarName, Gi as formatLazyBundleRuntimeMeta, Gr as readOnlyArrayHasStringMember, Hi as isRolldownError, Hr as isTsFile, Ii as normalizeDiagnostics, Ir as generatePreamble, Ji as CMP_FLAGS, Jr as getSourceMappingUrlForEndOfFile, Ki as stringifyRuntimeData, Kr as readPackageJson, Li as splitLineBreaks, Lr as getTextDocs, Mi as hasError, Mr as validateComponentTag, Ni as hasWarning, Nr as ParsePackageJsonResult, Oi as buildError, Pi as shouldIgnoreError, Pr as addDocBlock, Qi as COPY, Qr as FilterComponentsResult, Ri as augmentDiagnosticWithNode, Rr as hasDependency, Sa as SVG_NS, Si as isOutputTargetTypes, Ta as WATCH_FLAGS, Ti as relativeImport, Ui as loadRolldownDiagnostics, Ur as isTsxFile, Vi as createOnWarnFn, Vr as isJsxFile, Wi as formatComponentRuntimeMeta, Wr as parsePackageJson, Xi as COLLECTION_APP_DATA_FILE_NAME, Xr as rolldownToStencilSourceMap, Yi as COLLECTION, Yr as getSourceMappingUrlLinker, Zi as COLLECTION_MANIFEST_FILE_NAME, Zr as result_d_exports, _a as SSR, _i as isOutputTargetLoaderBundle, aa as DOCS_JSON, ai as isOutputTargetCollection, ba as STATS, bi as isOutputTargetStandalone, ca as EVENT_FLAGS, ci as isOutputTargetDistLazy, da as HOST_FLAGS, di as isOutputTargetDocsCustom, ea as DEFAULT_STYLE_MODE, ei as filterExcludedComponents, fa as HTML_NS, fi as isOutputTargetDocsCustomElementsManifest, ga as NODE_TYPES, gi as isOutputTargetGlobalStyle, ha as MEMBER_FLAGS, hi as isOutputTargetDocsVscode, ia as DOCS_CUSTOM_ELEMENTS_MANIFEST, ii as isOutputTargetAssets, ji as catchError, jr as validateComponentModes, ki as buildJsonFileError, la as GENERATED_DTS, li as isOutputTargetDocs, ma as LOADER_BUNDLE, mi as isOutputTargetDocsReadme, na as DOCS_AGENT_SKILL, ni as getComponentsDtsTypesFilePath, oa as DOCS_README, oi as isOutputTargetCopy, pa as LISTENER_FLAGS, pi as isOutputTargetDocsJson, qi as ASSETS, qr as getInlineSourceMappingUrlLinker, ra as DOCS_CUSTOM, ri as getComponentsFromModules, sa as DOCS_VSCODE, si as isOutputTargetCustom, ta as DIST_LAZY, ti as getComponentsDtsSrcFilePath, ua as GLOBAL_STYLE, ui as isOutputTargetDocsAgentSkill, va as SSR_WASM, vi as isOutputTargetSsr, wa as VALID_CONFIG_OUTPUT_TARGETS, wi as isValidConfigOutputTarget, xa as STYLE_EXT, xi as isOutputTargetStats, ya as STANDALONE, yi as isOutputTargetSsrWasm, zi as loadTypeScriptDiagnostic, zr as isDtsFile } from "../../index-BogZpjP2.mjs";
|
|
2
2
|
//#region src/utils/byte-size.d.ts
|
|
3
3
|
/**
|
|
4
4
|
* Used to learn the size of a string in bytes.
|