@stencil/core 5.0.0-beta.25 → 5.0.0-beta.27
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-9wOO56Ye.mjs} +14 -8
- package/dist/compiler/browser.d.ts +3 -1
- package/dist/compiler/browser.js +163 -68
- 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-CWxGH9sX.mjs → compiler-CBXVJZa8.mjs} +236 -91
- package/dist/declarations/stencil-public-compiler.d.ts +3 -1
- package/dist/{index-CxpWC93f.d.mts → index-C6wSdMIj.d.mts} +1 -1
- package/dist/{index-C41EOWaQ.d.mts → index-DMJOS1Fo.d.mts} +3 -1
- package/dist/index.mjs +1 -1
- package/dist/jsx-runtime.mjs +1 -1
- package/dist/{node-Bz2SOK7_.mjs → node-DomivDBh.mjs} +36 -13
- package/dist/runtime/client/lazy.js +15 -8
- package/dist/runtime/client/runtime.js +15 -8
- package/dist/runtime/index.js +15 -8
- package/dist/runtime/server/index.mjs +15 -8
- 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 +16 -9
- package/package.json +4 -4
|
@@ -2194,17 +2194,23 @@ const vdomFnUtils = {
|
|
|
2194
2194
|
* Convert a {@link d.VNode} to a {@link d.ChildNode} in order to present a
|
|
2195
2195
|
* friendlier public interface (hence, 'convertToPublic').
|
|
2196
2196
|
*
|
|
2197
|
-
*
|
|
2197
|
+
* Functional components receive primitive children unwrapped, so those
|
|
2198
|
+
* become text-only child nodes.
|
|
2199
|
+
*
|
|
2200
|
+
* @param node the virtual DOM node (or primitive child) to convert
|
|
2198
2201
|
* @returns a converted child node
|
|
2199
2202
|
*/
|
|
2200
|
-
const convertToPublic = (node) =>
|
|
2203
|
+
const convertToPublic = (node) => typeof node !== "object" ? {
|
|
2204
|
+
vtag: null,
|
|
2205
|
+
vtext: String(node)
|
|
2206
|
+
} : {
|
|
2201
2207
|
vattrs: node.$attrs$,
|
|
2202
2208
|
vchildren: node.$children$,
|
|
2203
2209
|
vkey: node.$key$,
|
|
2204
2210
|
vname: node.$name$,
|
|
2205
2211
|
vtag: node.$tag$,
|
|
2206
2212
|
vtext: node.$text$
|
|
2207
|
-
}
|
|
2213
|
+
};
|
|
2208
2214
|
/**
|
|
2209
2215
|
* Convert a {@link d.ChildNode} back to an equivalent {@link d.VNode} in
|
|
2210
2216
|
* order to use the resulting object in the virtual DOM. The initial object was
|
|
@@ -2221,11 +2227,11 @@ const convertToPrivate = (node) => {
|
|
|
2221
2227
|
if (node.vname) vnodeData.name = node.vname;
|
|
2222
2228
|
return h(node.vtag, vnodeData, ...node.vchildren || []);
|
|
2223
2229
|
}
|
|
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;
|
|
2230
|
+
const vnode = newVNode(node.vtag ?? null, node.vtext);
|
|
2231
|
+
vnode.$attrs$ = node.vattrs ?? null;
|
|
2232
|
+
vnode.$children$ = node.vchildren ?? null;
|
|
2233
|
+
vnode.$key$ = node.vkey ?? null;
|
|
2234
|
+
vnode.$name$ = node.vname ?? null;
|
|
2229
2235
|
return vnode;
|
|
2230
2236
|
};
|
|
2231
2237
|
/**
|
|
@@ -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
|
/**
|
package/dist/compiler/browser.js
CHANGED
|
@@ -1844,7 +1844,7 @@ const validateComponentTag = (tag) => {
|
|
|
1844
1844
|
};
|
|
1845
1845
|
//#endregion
|
|
1846
1846
|
//#region src/version.ts
|
|
1847
|
-
const version = "5.0.0-beta.
|
|
1847
|
+
const version = "5.0.0-beta.27";
|
|
1848
1848
|
//#endregion
|
|
1849
1849
|
//#region src/compiler/events.ts
|
|
1850
1850
|
const buildEvents = () => {
|
|
@@ -3922,6 +3922,20 @@ const parsePropertyAtRuleDescriptors = (node) => {
|
|
|
3922
3922
|
initialValue
|
|
3923
3923
|
};
|
|
3924
3924
|
};
|
|
3925
|
+
/** `--name: docs`, `--name - docs` (as `@attr`/`@slot` use) or `--name docs`. */
|
|
3926
|
+
const CUSTOM_PROPERTY_TAG_RE = /^(--[\w-]+)\s*(?::|-(?=\s))?(.*)$/;
|
|
3927
|
+
/**
|
|
3928
|
+
* @param text the text after a `@prop`/`@cssprop` tag
|
|
3929
|
+
* @returns the custom property name and description, or `undefined` if `text` doesn't start
|
|
3930
|
+
* with a custom property name
|
|
3931
|
+
*/
|
|
3932
|
+
const parseCustomPropertyTag = (text) => {
|
|
3933
|
+
const match = text.trim().match(CUSTOM_PROPERTY_TAG_RE);
|
|
3934
|
+
return match ? {
|
|
3935
|
+
name: match[1],
|
|
3936
|
+
docs: match[2].trim()
|
|
3937
|
+
} : void 0;
|
|
3938
|
+
};
|
|
3925
3939
|
//#endregion
|
|
3926
3940
|
//#region src/compiler/docs/style-docs.ts
|
|
3927
3941
|
/**
|
|
@@ -3935,7 +3949,8 @@ const parsePropertyAtRuleDescriptors = (node) => {
|
|
|
3935
3949
|
* 2. A doc-commented `--foo: value;` declaration inside the component's "root" rule - `:host`
|
|
3936
3950
|
* for `shadow`/`scoped` encapsulation, or the component's own tag selector for `none`.
|
|
3937
3951
|
* 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.
|
|
3952
|
+
* surfaced as `syntax`/`default`. Not scoped - `@property` is a global registration. For a
|
|
3953
|
+
* property already documented by 1 or 2, it still supplies `syntax`/`default`.
|
|
3939
3954
|
*
|
|
3940
3955
|
* @param styleDocs the array to hold formatted CSS docstrings
|
|
3941
3956
|
* @param styleText the CSS text we're working with
|
|
@@ -3996,10 +4011,17 @@ function parseScopedAndNativeStyleDocs(styleDocs, styleText, mode, tag, encapsul
|
|
|
3996
4011
|
});
|
|
3997
4012
|
root.walkAtRules("property", (node) => {
|
|
3998
4013
|
const propName = node.params.trim();
|
|
3999
|
-
if (!propName.startsWith("--")
|
|
4014
|
+
if (!propName.startsWith("--")) return;
|
|
4000
4015
|
const { syntax, initialValue } = parsePropertyAtRuleDescriptors(node);
|
|
4001
4016
|
const prev = node.prev();
|
|
4002
4017
|
const docs = prev && prev.type === "comment" && isJsDocComment(prev.text) ? normalizeJsDocText(prev.text) : "";
|
|
4018
|
+
const existing = styleDocs.find((styleDoc) => styleDoc.name === propName);
|
|
4019
|
+
if (existing) {
|
|
4020
|
+
existing.docs ||= docs;
|
|
4021
|
+
if (syntax) existing.syntax ??= syntax;
|
|
4022
|
+
if (initialValue) existing.default ??= initialValue;
|
|
4023
|
+
return;
|
|
4024
|
+
}
|
|
4003
4025
|
styleDocs.push({
|
|
4004
4026
|
name: propName,
|
|
4005
4027
|
docs,
|
|
@@ -4026,12 +4048,10 @@ function parseCssComment(styleDocs, comment, mode) {
|
|
|
4026
4048
|
}).join(" ").replace(/\t/g, " ").trim();
|
|
4027
4049
|
while (comment.includes(" ")) comment = comment.replace(" ", " ");
|
|
4028
4050
|
comment.split(CSS_PROP_ANNOTATION_RE).forEach((d) => {
|
|
4029
|
-
const
|
|
4030
|
-
if (!
|
|
4031
|
-
const splt = cssDocument.split(`:`);
|
|
4051
|
+
const prop = parseCustomPropertyTag(d);
|
|
4052
|
+
if (!prop) return;
|
|
4032
4053
|
const styleDoc = {
|
|
4033
|
-
|
|
4034
|
-
docs: (splt.shift() && splt.join(`:`)).trim(),
|
|
4054
|
+
...prop,
|
|
4035
4055
|
annotation: "prop",
|
|
4036
4056
|
mode
|
|
4037
4057
|
};
|
|
@@ -10380,6 +10400,7 @@ const resetModuleLegacy = (moduleFile) => {
|
|
|
10380
10400
|
moduleFile.externalImports.length = 0;
|
|
10381
10401
|
moduleFile.isCollectionDependency = false;
|
|
10382
10402
|
moduleFile.localImports.length = 0;
|
|
10403
|
+
moduleFile.functionalComponentDeps.length = 0;
|
|
10383
10404
|
moduleFile.originalCollectionComponentPath = null;
|
|
10384
10405
|
moduleFile.originalImports.length = 0;
|
|
10385
10406
|
moduleFile.hasVdomXlink = false;
|
|
@@ -13658,12 +13679,18 @@ const gatherVdomMeta = (m, args, typeChecker) => {
|
|
|
13658
13679
|
};
|
|
13659
13680
|
//#endregion
|
|
13660
13681
|
//#region src/compiler/transformers/static-to-meta/call-expression.ts
|
|
13661
|
-
|
|
13682
|
+
/**
|
|
13683
|
+
* @param m the module or component to record vdom metadata on
|
|
13684
|
+
* @param node the call expression to parse
|
|
13685
|
+
* @param typeChecker used to resolve functional components / JSX-returning calls to their source
|
|
13686
|
+
* @param moduleFile the module to record those dependencies on; defaults to `m` when it's a module
|
|
13687
|
+
*/
|
|
13688
|
+
const parseCallExpression = (m, node, typeChecker, moduleFile = "functionalComponentDeps" in m ? m : void 0) => {
|
|
13662
13689
|
if (node.arguments != null && node.arguments.length > 0) {
|
|
13663
|
-
if (ts$1.isIdentifier(node.expression)) visitCallExpressionArgs(m, node.expression, node.arguments, typeChecker);
|
|
13690
|
+
if (ts$1.isIdentifier(node.expression)) visitCallExpressionArgs(m, node.expression, node.arguments, typeChecker, moduleFile);
|
|
13664
13691
|
else if (ts$1.isPropertyAccessExpression(node.expression)) {
|
|
13665
13692
|
const n = node.expression.name;
|
|
13666
|
-
if (ts$1.isIdentifier(n) && n) visitCallExpressionArgs(m, n, node.arguments, typeChecker);
|
|
13693
|
+
if (ts$1.isIdentifier(n) && n) visitCallExpressionArgs(m, n, node.arguments, typeChecker, moduleFile);
|
|
13667
13694
|
}
|
|
13668
13695
|
} else if (ts$1.isPropertyAccessExpression(node.expression)) {
|
|
13669
13696
|
if (ts$1.isIdentifier(node.expression.name)) {
|
|
@@ -13673,24 +13700,20 @@ const parseCallExpression = (m, node, typeChecker) => {
|
|
|
13673
13700
|
if (!declarations || declarations.length === 0) return;
|
|
13674
13701
|
const sourceFile = declarations[0].getSourceFile();
|
|
13675
13702
|
if (!sourceFile) return;
|
|
13676
|
-
|
|
13677
|
-
const moduleFile = m;
|
|
13678
|
-
if (moduleFile.functionalComponentDeps) {
|
|
13679
|
-
if (!moduleFile.functionalComponentDeps.includes(sourceFilePath)) moduleFile.functionalComponentDeps.push(sourceFilePath);
|
|
13680
|
-
}
|
|
13703
|
+
addFunctionalComponentDep(moduleFile, sourceFile);
|
|
13681
13704
|
}
|
|
13682
13705
|
}
|
|
13683
13706
|
};
|
|
13684
|
-
const visitCallExpressionArgs = (m, callExpressionName, args, typeChecker) => {
|
|
13707
|
+
const visitCallExpressionArgs = (m, callExpressionName, args, typeChecker, moduleFile) => {
|
|
13685
13708
|
const fnName = callExpressionName.escapedText;
|
|
13686
13709
|
if (fnName === "h" || fnName === "__stencil_h" || fnName === "createElement") {
|
|
13687
|
-
visitCallExpressionArg(m, args[0], typeChecker);
|
|
13710
|
+
visitCallExpressionArg(m, args[0], typeChecker, moduleFile);
|
|
13688
13711
|
if (fnName === "h" || fnName === "__stencil_h") gatherVdomMeta(m, args, typeChecker);
|
|
13689
13712
|
} else if (fnName === "jsx" || fnName === "jsxs" || fnName === "_jsx" || fnName === "_jsxs") {
|
|
13690
|
-
visitCallExpressionArg(m, args[0], typeChecker);
|
|
13713
|
+
visitCallExpressionArg(m, args[0], typeChecker, moduleFile);
|
|
13691
13714
|
gatherVdomMeta(m, args, typeChecker);
|
|
13692
13715
|
if (args.length > 2 && args[2]) m.hasVdomKey = true;
|
|
13693
|
-
} else if (args.length > 1 && fnName === "createElementNS") visitCallExpressionArg(m, args[1], typeChecker);
|
|
13716
|
+
} else if (args.length > 1 && fnName === "createElementNS") visitCallExpressionArg(m, args[1], typeChecker, moduleFile);
|
|
13694
13717
|
else if (fnName === "require" && args.length > 0 && m.originalImports) {
|
|
13695
13718
|
const arg = args[0];
|
|
13696
13719
|
if (ts$1.isStringLiteral(arg)) {
|
|
@@ -13698,7 +13721,7 @@ const visitCallExpressionArgs = (m, callExpressionName, args, typeChecker) => {
|
|
|
13698
13721
|
}
|
|
13699
13722
|
}
|
|
13700
13723
|
};
|
|
13701
|
-
const visitCallExpressionArg = (m, arg, typeChecker) => {
|
|
13724
|
+
const visitCallExpressionArg = (m, arg, typeChecker, moduleFile) => {
|
|
13702
13725
|
if (ts$1.isStringLiteral(arg)) {
|
|
13703
13726
|
let tag = arg.text;
|
|
13704
13727
|
if (typeof tag === "string") {
|
|
@@ -13706,31 +13729,31 @@ const visitCallExpressionArg = (m, arg, typeChecker) => {
|
|
|
13706
13729
|
m.htmlTagNames.push(tag);
|
|
13707
13730
|
if (tag.includes("-")) m.potentialCmpRefs.push(tag);
|
|
13708
13731
|
}
|
|
13709
|
-
} else if (typeChecker && ts$1.isIdentifier(arg)) resolveFunctionalComponentDep(
|
|
13732
|
+
} else if (typeChecker && ts$1.isIdentifier(arg)) resolveFunctionalComponentDep(moduleFile, arg, typeChecker);
|
|
13710
13733
|
};
|
|
13711
13734
|
/**
|
|
13712
13735
|
* Resolves a functional component identifier to its source file and tracks it
|
|
13713
13736
|
* as a dependency so that build-conditionals can be properly propagated.
|
|
13737
|
+
* Follows import / re-export aliases through to the declaring file.
|
|
13714
13738
|
*
|
|
13715
|
-
* @param
|
|
13739
|
+
* @param moduleFile the module to track the dependency on
|
|
13716
13740
|
* @param identifier the identifier node representing the functional component
|
|
13717
13741
|
* @param typeChecker the TypeScript type checker for symbol resolution
|
|
13718
13742
|
*/
|
|
13719
|
-
const resolveFunctionalComponentDep = (
|
|
13743
|
+
const resolveFunctionalComponentDep = (moduleFile, identifier, typeChecker) => {
|
|
13744
|
+
if (!moduleFile) return;
|
|
13720
13745
|
try {
|
|
13721
13746
|
const symbol = typeChecker.getSymbolAtLocation(identifier);
|
|
13722
13747
|
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
|
-
}
|
|
13748
|
+
const sourceFile = (symbol.flags & ts$1.SymbolFlags.Alias ? typeChecker.getAliasedSymbol(symbol) : symbol).declarations?.[0]?.getSourceFile();
|
|
13749
|
+
if (sourceFile) addFunctionalComponentDep(moduleFile, sourceFile);
|
|
13732
13750
|
} catch {}
|
|
13733
13751
|
};
|
|
13752
|
+
const addFunctionalComponentDep = (moduleFile, sourceFile) => {
|
|
13753
|
+
const deps = moduleFile?.functionalComponentDeps;
|
|
13754
|
+
const sourceFilePath = normalizePath(sourceFile.fileName);
|
|
13755
|
+
if (deps && !deps.includes(sourceFilePath)) deps.push(sourceFilePath);
|
|
13756
|
+
};
|
|
13734
13757
|
//#endregion
|
|
13735
13758
|
//#region src/compiler/transformers/component-build-conditionals.ts
|
|
13736
13759
|
const setComponentBuildConditionals = (cmpMeta) => {
|
|
@@ -14107,6 +14130,13 @@ function findReExport(sourceFile, className) {
|
|
|
14107
14130
|
}
|
|
14108
14131
|
}
|
|
14109
14132
|
/**
|
|
14133
|
+
* @param sourceFile the (barrel) source file to scan
|
|
14134
|
+
* @returns the module specifiers of its `export * from './x'` statements, in order
|
|
14135
|
+
*/
|
|
14136
|
+
function findStarReExportSpecifiers(sourceFile) {
|
|
14137
|
+
return sourceFile.statements.flatMap((stmt) => ts$1.isExportDeclaration(stmt) && !stmt.exportClause && !stmt.isTypeOnly && stmt.moduleSpecifier && ts$1.isStringLiteral(stmt.moduleSpecifier) ? [stmt.moduleSpecifier.text] : []);
|
|
14138
|
+
}
|
|
14139
|
+
/**
|
|
14110
14140
|
* Finds `name`'s import in `sourceFile` and returns its module and origin name (before any `as`
|
|
14111
14141
|
* aliasing; `'default'` for a default import).
|
|
14112
14142
|
* @param sourceFile the source file to scan for a matching import
|
|
@@ -14233,12 +14263,20 @@ function findClassInJsModule(config, compilerCtx, source, className, hopsRemaini
|
|
|
14233
14263
|
};
|
|
14234
14264
|
}
|
|
14235
14265
|
if (hopsRemaining <= 0) return;
|
|
14266
|
+
const readReExported = (moduleSpecifier) => {
|
|
14267
|
+
const resolvedFileName = tsResolveModuleName(config, compilerCtx, moduleSpecifier, source.fileName)?.resolvedModule?.resolvedFileName;
|
|
14268
|
+
return resolvedFileName ? readJsSourceFile(config, resolvedFileName) : void 0;
|
|
14269
|
+
};
|
|
14236
14270
|
const reExport = findReExport(source, className);
|
|
14237
|
-
if (
|
|
14238
|
-
|
|
14239
|
-
|
|
14240
|
-
|
|
14241
|
-
|
|
14271
|
+
if (reExport) {
|
|
14272
|
+
const nextSource = readReExported(reExport.moduleSpecifier);
|
|
14273
|
+
return nextSource && findClassInJsModule(config, compilerCtx, nextSource, reExport.localName, hopsRemaining - 1);
|
|
14274
|
+
}
|
|
14275
|
+
for (const moduleSpecifier of findStarReExportSpecifiers(source)) {
|
|
14276
|
+
const nextSource = readReExported(moduleSpecifier);
|
|
14277
|
+
const found = nextSource && findClassInJsModule(config, compilerCtx, nextSource, className, hopsRemaining - 1);
|
|
14278
|
+
if (found) return found;
|
|
14279
|
+
}
|
|
14242
14280
|
}
|
|
14243
14281
|
/**
|
|
14244
14282
|
* Filters `dedupeMembers` down to entries not already present in `staticMembers`
|
|
@@ -14333,7 +14371,8 @@ function convertDiskSourceFileDecorators(sourceFile, config, target = ts$1.Scrip
|
|
|
14333
14371
|
/**
|
|
14334
14372
|
* Resolves an `extends` target through a module specifier: resolves the
|
|
14335
14373
|
* 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
|
|
14374
|
+
* own ancestors) to `dependentClasses`. Follows one level of re-export (barrel file, named or
|
|
14375
|
+
* `export *`) when the
|
|
14337
14376
|
* declaration isn't found directly in the resolved module.
|
|
14338
14377
|
* @param compilerCtx the current compiler context
|
|
14339
14378
|
* @param buildCtx the current build context
|
|
@@ -14354,7 +14393,9 @@ function resolveAndProcessExtendedClass(compilerCtx, buildCtx, classDeclaration,
|
|
|
14354
14393
|
let keepLooking = true;
|
|
14355
14394
|
const foundFile = tsResolveModuleName(buildCtx.config, compilerCtx, moduleSpecifier, currentSource.fileName);
|
|
14356
14395
|
if (!foundFile?.resolvedModule || !className) return;
|
|
14357
|
-
|
|
14396
|
+
const resolvedFileName = foundFile.resolvedModule.resolvedFileName;
|
|
14397
|
+
let foundSource = compilerCtx.moduleMap.get(resolvedFileName)?.staticSourceFile;
|
|
14398
|
+
if (!foundSource && isJsFile(currentSource.fileName) && isJsFile(resolvedFileName)) foundSource = readJsSourceFile(buildCtx.config, resolvedFileName);
|
|
14358
14399
|
if (!foundSource) {
|
|
14359
14400
|
foundSource = tsGetSourceFile(buildCtx.config, foundFile);
|
|
14360
14401
|
if (!foundSource) {
|
|
@@ -14368,7 +14409,7 @@ function resolveAndProcessExtendedClass(compilerCtx, buildCtx, classDeclaration,
|
|
|
14368
14409
|
}
|
|
14369
14410
|
const matchedStatement = findStatementByName(foundSource, className);
|
|
14370
14411
|
if (!matchedStatement) {
|
|
14371
|
-
const reExport = barrelHopsRemaining > 0 ? findReExport(foundSource, className) : void 0;
|
|
14412
|
+
const reExport = barrelHopsRemaining > 0 ? findReExport(foundSource, className) ?? findStarReExportOf(buildCtx.config, compilerCtx, foundSource, className) : void 0;
|
|
14372
14413
|
if (reExport) return resolveAndProcessExtendedClass(compilerCtx, buildCtx, classDeclaration, foundSource, reExport.moduleSpecifier, reExport.localName, dependentClasses, typeChecker, ogModule, targetScriptTarget, barrelHopsRemaining - 1, originalModuleSpecifier, originalContainingFile);
|
|
14373
14414
|
const err = buildWarn(buildCtx.diagnostics);
|
|
14374
14415
|
err.messageText = `Unable to find "${className}" in the imported module "${moduleSpecifier}".
|
|
@@ -14378,12 +14419,22 @@ function resolveAndProcessExtendedClass(compilerCtx, buildCtx, classDeclaration,
|
|
|
14378
14419
|
}
|
|
14379
14420
|
let foundClassDeclaration = matchedStatement ? ts$1.isClassDeclaration(matchedStatement) ? matchedStatement : void 0 : void 0;
|
|
14380
14421
|
let foundClassSource = foundSource;
|
|
14381
|
-
|
|
14422
|
+
const findInJsEntry = () => {
|
|
14423
|
+
if (!isDtsFile(foundSource.fileName) || isLocalModule(originalModuleSpecifier)) return;
|
|
14424
|
+
const jsSource = resolveModuleJsEntry(buildCtx.config, compilerCtx, originalModuleSpecifier, originalContainingFile);
|
|
14425
|
+
return jsSource && findClassInJsModule(buildCtx.config, compilerCtx, jsSource, className);
|
|
14426
|
+
};
|
|
14427
|
+
if (foundClassDeclaration) {
|
|
14428
|
+
const foundInJs = findInJsEntry();
|
|
14429
|
+
if (foundInJs) {
|
|
14430
|
+
foundClassDeclaration = foundInJs.classNode;
|
|
14431
|
+
foundClassSource = foundInJs.sourceFile;
|
|
14432
|
+
}
|
|
14433
|
+
} else if (matchedStatement) {
|
|
14382
14434
|
foundClassDeclaration = findClassWalk(matchedStatement);
|
|
14383
14435
|
keepLooking = false;
|
|
14384
|
-
if (!foundClassDeclaration
|
|
14385
|
-
const
|
|
14386
|
-
const foundInJs = jsSource && findClassInJsModule(buildCtx.config, compilerCtx, jsSource, className);
|
|
14436
|
+
if (!foundClassDeclaration) {
|
|
14437
|
+
const foundInJs = findInJsEntry();
|
|
14387
14438
|
if (foundInJs) {
|
|
14388
14439
|
foundClassDeclaration = foundInJs.classNode;
|
|
14389
14440
|
foundClassSource = foundInJs.sourceFile;
|
|
@@ -14401,6 +14452,27 @@ function resolveAndProcessExtendedClass(compilerCtx, buildCtx, classDeclaration,
|
|
|
14401
14452
|
}
|
|
14402
14453
|
return foundClassDeclaration;
|
|
14403
14454
|
}
|
|
14455
|
+
/**
|
|
14456
|
+
* Finds the first `export * from './x'` in `barrel` whose target declares `className` directly.
|
|
14457
|
+
* @param config the current Stencil validated config
|
|
14458
|
+
* @param compilerCtx the current compiler context
|
|
14459
|
+
* @param barrel the source file to scan
|
|
14460
|
+
* @param className the declaration name to look for
|
|
14461
|
+
* @returns the re-export to follow, in `findReExport`'s shape, or `undefined`
|
|
14462
|
+
*/
|
|
14463
|
+
function findStarReExportOf(config, compilerCtx, barrel, className) {
|
|
14464
|
+
for (const moduleSpecifier of findStarReExportSpecifiers(barrel)) {
|
|
14465
|
+
const resolved = tsResolveModuleName(config, compilerCtx, moduleSpecifier, barrel.fileName);
|
|
14466
|
+
const fileName = resolved?.resolvedModule?.resolvedFileName;
|
|
14467
|
+
if (!fileName) continue;
|
|
14468
|
+
const target = compilerCtx.moduleMap.get(fileName)?.staticSourceFile ?? (isJsFile(fileName) ? readJsSourceFile(config, fileName) : tsGetSourceFile(config, resolved));
|
|
14469
|
+
if (target && findStatementByName(target, className)) return {
|
|
14470
|
+
moduleSpecifier,
|
|
14471
|
+
localName: className
|
|
14472
|
+
};
|
|
14473
|
+
}
|
|
14474
|
+
}
|
|
14475
|
+
const isJsFile = (fileName) => /\.[cm]?js$/.test(fileName);
|
|
14404
14476
|
function convertDtsToJs(declarationSourceFile, compilerCtx) {
|
|
14405
14477
|
const jsPath = normalizePath(declarationSourceFile.replace(/\.d\.ts$/, ".js").replace("/types/", "/collection/"));
|
|
14406
14478
|
return compilerCtx.moduleMap.get(jsPath)?.staticSourceFile;
|
|
@@ -14837,7 +14909,7 @@ function reclassifyGlobalTypeReferences(members, declaringSf, declaringPath, res
|
|
|
14837
14909
|
}
|
|
14838
14910
|
/**
|
|
14839
14911
|
* 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
|
|
14912
|
+
* re-export (barrel file, named or `export *`) via `resolveImport` - matching `compiler-ctx-merge.ts`'s equivalent
|
|
14841
14913
|
* one-hop fallback (see `findReExport` in `shared.ts` for why it's capped at one hop).
|
|
14842
14914
|
*
|
|
14843
14915
|
* @param sf the source file to search
|
|
@@ -14854,20 +14926,25 @@ function findDeclarationOrReExport(sf, path, name, resolveImport) {
|
|
|
14854
14926
|
sourceFile: sf,
|
|
14855
14927
|
path
|
|
14856
14928
|
};
|
|
14857
|
-
const
|
|
14858
|
-
|
|
14859
|
-
|
|
14860
|
-
|
|
14861
|
-
|
|
14862
|
-
|
|
14863
|
-
|
|
14864
|
-
|
|
14865
|
-
|
|
14866
|
-
|
|
14867
|
-
|
|
14868
|
-
|
|
14869
|
-
path: resolvedPath
|
|
14929
|
+
const findIn = (moduleSpecifier, localName) => {
|
|
14930
|
+
const resolved = resolveImport(moduleSpecifier, path);
|
|
14931
|
+
if (!resolved) return void 0;
|
|
14932
|
+
const { code, path: resolvedPath } = resolved;
|
|
14933
|
+
const isTs = resolvedPath.endsWith(".tsx") || resolvedPath.endsWith(".ts");
|
|
14934
|
+
const reExportSf = ts$1.createSourceFile(resolvedPath, code, ts$1.ScriptTarget.ESNext, true, isTs ? ts$1.ScriptKind.TSX : ts$1.ScriptKind.JS);
|
|
14935
|
+
const statement = findStatementByName(reExportSf, localName);
|
|
14936
|
+
return statement && {
|
|
14937
|
+
statement,
|
|
14938
|
+
sourceFile: reExportSf,
|
|
14939
|
+
path: resolvedPath
|
|
14940
|
+
};
|
|
14870
14941
|
};
|
|
14942
|
+
const reExport = findReExport(sf, name);
|
|
14943
|
+
if (reExport) return findIn(reExport.moduleSpecifier, reExport.localName);
|
|
14944
|
+
for (const moduleSpecifier of findStarReExportSpecifiers(sf)) {
|
|
14945
|
+
const found = findIn(moduleSpecifier, name);
|
|
14946
|
+
if (found) return found;
|
|
14947
|
+
}
|
|
14871
14948
|
}
|
|
14872
14949
|
/**
|
|
14873
14950
|
* Recursively resolves a class's `extends` heritage into a flat, deduplicated
|
|
@@ -15443,7 +15520,7 @@ const parseStaticComponentMeta = (compilerCtx, typeChecker, cmpNode, moduleFile,
|
|
|
15443
15520
|
};
|
|
15444
15521
|
if (!isCollectionDependency) validateComponentMembers(cmpNode, buildCtx);
|
|
15445
15522
|
const visitComponentChildNode = (node) => {
|
|
15446
|
-
if (ts$1.isCallExpression(node)) parseCallExpression(cmp, node, typeChecker);
|
|
15523
|
+
if (ts$1.isCallExpression(node)) parseCallExpression(cmp, node, typeChecker, moduleFile);
|
|
15447
15524
|
else if (ts$1.isStringLiteral(node)) parseStringLiteral(cmp, node);
|
|
15448
15525
|
node.forEachChild(visitComponentChildNode);
|
|
15449
15526
|
};
|
|
@@ -15664,6 +15741,9 @@ const updateModule = (config, compilerCtx, buildCtx, tsSourceFile, sourceFileTex
|
|
|
15664
15741
|
} else if (ts$1.isImportDeclaration(node)) {
|
|
15665
15742
|
parseModuleImport(config, compilerCtx, buildCtx, moduleFile, srcDirPath, node, true);
|
|
15666
15743
|
return;
|
|
15744
|
+
} else if (ts$1.isExportDeclaration(node)) {
|
|
15745
|
+
parseModuleReExport(moduleFile, srcDirPath, node);
|
|
15746
|
+
return;
|
|
15667
15747
|
} else if (ts$1.isCallExpression(node)) parseCallExpression(moduleFile, node, typeChecker);
|
|
15668
15748
|
else if (ts$1.isStringLiteral(node)) parseStringLiteral(moduleFile, node);
|
|
15669
15749
|
else if (ts$1.isVariableStatement(node)) node.declarationList.declarations.forEach((declaration) => {
|
|
@@ -15834,18 +15914,32 @@ const addExternalImport = (config, compilerCtx, buildCtx, moduleFile, containing
|
|
|
15834
15914
|
//#region src/compiler/transformers/static-to-meta/import.ts
|
|
15835
15915
|
const parseModuleImport = (config, compilerCtx, buildCtx, moduleFile, dirPath, importNode, resolveCollections) => {
|
|
15836
15916
|
if (importNode.moduleSpecifier && ts$1.isStringLiteral(importNode.moduleSpecifier)) {
|
|
15837
|
-
|
|
15917
|
+
const importPath = importNode.moduleSpecifier.text;
|
|
15838
15918
|
if (!moduleFile.originalImports.includes(importPath)) moduleFile.originalImports.push(importPath);
|
|
15839
15919
|
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);
|
|
15920
|
+
const localPath = resolveLocalImportPath(dirPath, importPath);
|
|
15921
|
+
if (localPath) moduleFile.localImports.push(localPath);
|
|
15922
|
+
else addExternalImport(config, compilerCtx, buildCtx, moduleFile, moduleFile.sourceFilePath, importPath, resolveCollections, !importNode.importClause);
|
|
15847
15923
|
}
|
|
15848
15924
|
};
|
|
15925
|
+
/**
|
|
15926
|
+
* Record a local `export … from './x'` re-export as a local import, so build conditionals
|
|
15927
|
+
* propagate through barrel files. Bare-specifier re-exports are left alone.
|
|
15928
|
+
*
|
|
15929
|
+
* @param moduleFile the module containing the re-export
|
|
15930
|
+
* @param dirPath the module's (normalized) directory
|
|
15931
|
+
* @param exportNode the export declaration
|
|
15932
|
+
*/
|
|
15933
|
+
const parseModuleReExport = (moduleFile, dirPath, exportNode) => {
|
|
15934
|
+
if (exportNode.moduleSpecifier && ts$1.isStringLiteral(exportNode.moduleSpecifier)) {
|
|
15935
|
+
const localPath = resolveLocalImportPath(dirPath, exportNode.moduleSpecifier.text);
|
|
15936
|
+
if (localPath && !moduleFile.localImports.includes(localPath)) moduleFile.localImports.push(localPath);
|
|
15937
|
+
}
|
|
15938
|
+
};
|
|
15939
|
+
const resolveLocalImportPath = (dirPath, importPath) => {
|
|
15940
|
+
if (isAbsolute(importPath)) return normalizePath(importPath);
|
|
15941
|
+
if (importPath.startsWith(".")) return normalizePath(join$1(dirPath, importPath));
|
|
15942
|
+
};
|
|
15849
15943
|
//#endregion
|
|
15850
15944
|
//#region src/compiler/transformers/static-to-meta/visitor.ts
|
|
15851
15945
|
const convertStaticToMeta = (config, compilerCtx, buildCtx, typeChecker, collection, transformOpts) => {
|
|
@@ -15855,6 +15949,7 @@ const convertStaticToMeta = (config, compilerCtx, buildCtx, typeChecker, collect
|
|
|
15855
15949
|
const visitNode = (node) => {
|
|
15856
15950
|
if (ts$1.isClassDeclaration(node)) return parseStaticComponentMeta(compilerCtx, typeChecker, node, moduleFile, buildCtx, transformOpts);
|
|
15857
15951
|
else if (ts$1.isImportDeclaration(node)) parseModuleImport(config, compilerCtx, buildCtx, moduleFile, dirPath, node, !transformOpts.isolatedModules);
|
|
15952
|
+
else if (ts$1.isExportDeclaration(node)) parseModuleReExport(moduleFile, dirPath, node);
|
|
15858
15953
|
else if (ts$1.isCallExpression(node)) parseCallExpression(moduleFile, node, typeChecker);
|
|
15859
15954
|
else if (ts$1.isStringLiteral(node)) parseStringLiteral(moduleFile, node);
|
|
15860
15955
|
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-DMJOS1Fo.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-CBXVJZa8.mjs";
|
|
2
|
+
import { a as LOG_LEVELS, i as CustomElementsExportBehaviorOptions } from "../node-DomivDBh.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-DMJOS1Fo.mjs";
|
|
2
2
|
//#region src/utils/byte-size.d.ts
|
|
3
3
|
/**
|
|
4
4
|
* Used to learn the size of a string in bytes.
|