@stencil/core 5.0.0-rc.0 → 5.0.0-rc.10
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-ClM4H9-P.mjs → client-DkvdNuPu.mjs} +12 -10
- package/dist/compiler/browser.d.ts +23 -5
- package/dist/compiler/browser.js +99 -17
- package/dist/compiler/index.d.mts +2 -2
- package/dist/compiler/index.mjs +2 -2
- package/dist/compiler/utils/index.d.mts +1 -1
- package/dist/compiler/utils/index.mjs +3 -3
- package/dist/{compiler-DFanjq9z.mjs → compiler-ChKFuRry.mjs} +329 -126
- package/dist/declarations/stencil-public-compiler.d.ts +25 -7
- package/dist/{helpers-Cpp3qc3u.mjs → helpers-pTCZhNi0.mjs} +5 -0
- package/dist/{index-DvfFOkiJ.d.mts → index-BxnfbT3a.d.mts} +30 -7
- package/dist/{index-aBMJC5F9.d.mts → index-xOwTL_5Z.d.mts} +1 -1
- package/dist/index.mjs +1 -1
- package/dist/jsx-runtime.mjs +1 -1
- package/dist/{node-DJP8JuAS.mjs → node-C59vQZNg.mjs} +3 -3
- package/dist/runtime/client/lazy.js +211 -161
- package/dist/runtime/client/runtime.js +211 -161
- package/dist/runtime/index.js +211 -161
- package/dist/runtime/server/index.mjs +211 -161
- package/dist/runtime/server/runner.mjs +82 -7
- 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.mjs +207 -160
- package/dist/{util-C-H1H84W.mjs → util-CP6-333M.mjs} +1 -1
- package/dist/{validation-ByYYKvnS.mjs → validation-C1mr0klL.mjs} +2 -2
- package/package.json +4 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as HOST_FLAGS, C as CMP_FLAGS, G as NODE_TYPES, Z as SVG_NS, o as isComplexType, s as isDef, x as queryNonceMetaTagContent } from "./helpers-
|
|
1
|
+
import { B as HOST_FLAGS, C as CMP_FLAGS, G as NODE_TYPES, Z as SVG_NS, o as isComplexType, s as isDef, x as queryNonceMetaTagContent } from "./helpers-pTCZhNi0.mjs";
|
|
2
2
|
import * as SignalsCore from "@preact/signals-core";
|
|
3
3
|
//#region src/app-data/index.ts
|
|
4
4
|
/**
|
|
@@ -785,7 +785,7 @@ const attachStyles = (hostRef) => {
|
|
|
785
785
|
else if (BUILD.hydrateServerSide && BUILD.shadowModeClosed && flags & CMP_FLAGS.shadowNeedsScopedCss && flags & CMP_FLAGS.shadowModeClosed) styleContainerNode = elm;
|
|
786
786
|
else styleContainerNode = elm.getRootNode();
|
|
787
787
|
const scopeId = addStyle(styleContainerNode, cmpMeta, hostRef.$modeName$);
|
|
788
|
-
if ((BUILD.shadowDom || BUILD.scoped) && BUILD.cssAnnotations && flags & CMP_FLAGS.needsScopedEncapsulation) {
|
|
788
|
+
if ((BUILD.shadowDom || BUILD.scoped) && BUILD.cssAnnotations && flags & (CMP_FLAGS.needsScopedEncapsulation | CMP_FLAGS.shadowNeedsScopedCss)) {
|
|
789
789
|
elm["s-sc"] = scopeId;
|
|
790
790
|
elm.classList.add(scopeId + "-h");
|
|
791
791
|
}
|
|
@@ -800,10 +800,6 @@ const attachStyles = (hostRef) => {
|
|
|
800
800
|
*/
|
|
801
801
|
const getScopeId = (cmp, mode) => "sc-" + (BUILD.mode && mode && cmp.$flags$ & CMP_FLAGS.hasMode ? cmp.$tagName$ + "-" + mode : cmp.$tagName$);
|
|
802
802
|
//#endregion
|
|
803
|
-
//#region src/runtime/signals-core.ts
|
|
804
|
-
const getCore = () => globalThis[Symbol.for("stencil.preact-signals-core")] ??= SignalsCore;
|
|
805
|
-
const effect = (fn, options) => getCore().effect(fn, options);
|
|
806
|
-
//#endregion
|
|
807
803
|
//#region src/runtime/event-emitter.ts
|
|
808
804
|
/**
|
|
809
805
|
* Helper function to create & dispatch a custom Event on a provided target
|
|
@@ -1735,7 +1731,9 @@ render() {
|
|
|
1735
1731
|
checkSlotFallbackVisibility = false;
|
|
1736
1732
|
checkSlotRelocate = !useNativeShadowDom && !!(cmpMeta.$flags$ & CMP_FLAGS.hasSlot);
|
|
1737
1733
|
}
|
|
1734
|
+
if (BUILD.serializer) hostRef.$flags$ |= HOST_FLAGS.isReflecting;
|
|
1738
1735
|
patch(oldVNode, rootVnode, isInitialLoad);
|
|
1736
|
+
if (BUILD.serializer) hostRef.$flags$ &= ~HOST_FLAGS.isReflecting;
|
|
1739
1737
|
if (BUILD.slotRelocation) {
|
|
1740
1738
|
plt.$flags$ |= PLATFORM_FLAGS.isTmpDisconnected;
|
|
1741
1739
|
if (checkSlotRelocate) {
|
|
@@ -1851,10 +1849,10 @@ const scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
|
1851
1849
|
attachToAncestor(hostRef, hostRef.$ancestorComponent$);
|
|
1852
1850
|
const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
|
|
1853
1851
|
if (isInitialLoad) {
|
|
1854
|
-
const pendingConnects = BUILD.asyncLoading ? hostRef.$hostElement$["s-pc"] : void 0;
|
|
1855
|
-
if (pendingConnects && pendingConnects.length > 0) return Promise.all(pendingConnects).then(dispatch).catch(dispatch);
|
|
1856
1852
|
queueMicrotask(() => {
|
|
1857
|
-
|
|
1853
|
+
const pendingConnects = BUILD.asyncLoading ? hostRef.$hostElement$["s-pc"] : void 0;
|
|
1854
|
+
if (pendingConnects && pendingConnects.length > 0) Promise.all(pendingConnects).then(dispatch, dispatch);
|
|
1855
|
+
else dispatch();
|
|
1858
1856
|
});
|
|
1859
1857
|
return;
|
|
1860
1858
|
}
|
|
@@ -2157,6 +2155,10 @@ const serverSideConnected = (elm) => {
|
|
|
2157
2155
|
}
|
|
2158
2156
|
};
|
|
2159
2157
|
//#endregion
|
|
2158
|
+
//#region src/runtime/signals-core.ts
|
|
2159
|
+
const getCore = () => globalThis[Symbol.for("stencil.preact-signals-core")] ??= SignalsCore;
|
|
2160
|
+
const effect = (fn, options) => getCore().effect(fn, options);
|
|
2161
|
+
//#endregion
|
|
2160
2162
|
//#region src/runtime/signals.ts
|
|
2161
2163
|
/**
|
|
2162
2164
|
* Duck-type check for Signal objects. Cross-bundle-safe (no instanceof).
|
|
@@ -2175,7 +2177,7 @@ const isSignalLike = (v) => v !== null && typeof v === "object" && typeof v.peek
|
|
|
2175
2177
|
* Modified for Stencil's compiler and vdom
|
|
2176
2178
|
*/
|
|
2177
2179
|
const h = (nodeName, vnodeData, ...children) => {
|
|
2178
|
-
if (typeof nodeName === "string") nodeName = transformTag(nodeName);
|
|
2180
|
+
if (typeof nodeName === "string" && nodeName.includes("-")) nodeName = transformTag(nodeName);
|
|
2179
2181
|
let child = null;
|
|
2180
2182
|
let key = null;
|
|
2181
2183
|
let slotName = null;
|
|
@@ -885,10 +885,18 @@ interface TranspileOptions {
|
|
|
885
885
|
*/
|
|
886
886
|
additionalTagTransformers?: boolean;
|
|
887
887
|
/**
|
|
888
|
-
* Callback used to resolve
|
|
889
|
-
*
|
|
890
|
-
*
|
|
891
|
-
*
|
|
888
|
+
* Callback used to resolve imported source during a single-file transpile.
|
|
889
|
+
* Return the resolved absolute path and source text of that module, or `null`
|
|
890
|
+
* to leave the specifier unresolved.
|
|
891
|
+
*
|
|
892
|
+
* It is called in two situations, told apart by `context.kind`:
|
|
893
|
+
* - **inheritance** (`context` is `undefined`): a component's `extends` clause
|
|
894
|
+
* references a class from another module, so the compiler can merge the
|
|
895
|
+
* parent's metadata.
|
|
896
|
+
* - **`'type-info'`**: the file uses `resolveVar()`, so the compiler follows its
|
|
897
|
+
* imports (and theirs) to read constants declared elsewhere. The returned
|
|
898
|
+
* module is only used for type information - it is never emitted or treated
|
|
899
|
+
* as a base class.
|
|
892
900
|
*
|
|
893
901
|
* @example
|
|
894
902
|
* ```ts
|
|
@@ -900,7 +908,7 @@ interface TranspileOptions {
|
|
|
900
908
|
* });
|
|
901
909
|
* ```
|
|
902
910
|
*/
|
|
903
|
-
resolveImport?: (specifier: string, importer: string) => {
|
|
911
|
+
resolveImport?: (specifier: string, importer: string, context?: ResolveImportContext) => {
|
|
904
912
|
code: string;
|
|
905
913
|
path: string;
|
|
906
914
|
} | null;
|
|
@@ -949,6 +957,16 @@ interface TranspileResults {
|
|
|
949
957
|
outputFilePath: string;
|
|
950
958
|
styleDocs?: StyleDoc[];
|
|
951
959
|
}
|
|
960
|
+
/**
|
|
961
|
+
* Extra information passed as the third argument of {@link TranspileOptions.resolveImport}.
|
|
962
|
+
*/
|
|
963
|
+
interface ResolveImportContext {
|
|
964
|
+
/**
|
|
965
|
+
* `'type-info'` when the module is only needed for type information (e.g. `resolveVar()`
|
|
966
|
+
* reading a constant declared in another file).
|
|
967
|
+
*/
|
|
968
|
+
kind: 'type-info';
|
|
969
|
+
}
|
|
952
970
|
//#endregion
|
|
953
971
|
//#region src/declarations/stencil-private.d.ts
|
|
954
972
|
interface PrintLine {
|
package/dist/compiler/browser.js
CHANGED
|
@@ -1845,7 +1845,7 @@ const validateComponentTag = (tag) => {
|
|
|
1845
1845
|
};
|
|
1846
1846
|
//#endregion
|
|
1847
1847
|
//#region src/version.ts
|
|
1848
|
-
const version = "5.0.0-rc.
|
|
1848
|
+
const version = "5.0.0-rc.10";
|
|
1849
1849
|
//#endregion
|
|
1850
1850
|
//#region src/compiler/events.ts
|
|
1851
1851
|
const buildEvents = () => {
|
|
@@ -3888,6 +3888,33 @@ const validateConfig = (userConfig = {}, bootstrapConfig) => {
|
|
|
3888
3888
|
*/
|
|
3889
3889
|
const isJsDocComment = (commentText) => commentText.startsWith("*") || commentText.startsWith("!");
|
|
3890
3890
|
/**
|
|
3891
|
+
* An explicit `@prop` annotation tag in a CSS docstring. `@cssprop`/`@cssproperty` are also
|
|
3892
|
+
* recognized as synonyms (the more common names in other web-component-analyzer/docgen
|
|
3893
|
+
* ecosystems).
|
|
3894
|
+
*/
|
|
3895
|
+
const CSS_PROP_ANNOTATION_RE = /@(?:cssproperty|cssprop|prop)\b/;
|
|
3896
|
+
/**
|
|
3897
|
+
* An annotation tag that documents something by name (`@prop --x`, `@slot name`, ...) rather
|
|
3898
|
+
* than describing the node below its comment.
|
|
3899
|
+
*/
|
|
3900
|
+
const CSS_ANNOTATION_TAG_RE = /@(?:component|cssproperty|cssprop|prop|attr|slot)\b/;
|
|
3901
|
+
const INTERNAL_TAG_RE = /@internal\b/;
|
|
3902
|
+
/**
|
|
3903
|
+
* Whether a comment marks the node immediately following it as internal - excluded from docs,
|
|
3904
|
+
* matching `@internal` on component members.
|
|
3905
|
+
* @param commentText a postcss `Comment` node's `.text`
|
|
3906
|
+
* @returns `true` if the comment is a JSDoc-style comment holding an `@internal` tag
|
|
3907
|
+
*/
|
|
3908
|
+
const isInternalDocComment = (commentText) => isJsDocComment(commentText) && INTERNAL_TAG_RE.test(commentText);
|
|
3909
|
+
/**
|
|
3910
|
+
* Whether a comment describes the node immediately following it (a declaration, rule or
|
|
3911
|
+
* at-rule). A comment holding annotation tags documents the things it names instead, and an
|
|
3912
|
+
* `@internal` comment hides the node.
|
|
3913
|
+
* @param commentText a postcss `Comment` node's `.text`
|
|
3914
|
+
* @returns `true` if the comment is a JSDoc-style description of the next node
|
|
3915
|
+
*/
|
|
3916
|
+
const isNodeDocComment = (commentText) => isJsDocComment(commentText) && !CSS_ANNOTATION_TAG_RE.test(commentText) && !INTERNAL_TAG_RE.test(commentText);
|
|
3917
|
+
/**
|
|
3891
3918
|
* Strip the leading `*`/`!` marker and per-line `*` prefixes, returning trimmed lines.
|
|
3892
3919
|
* @param commentText a postcss `Comment` node's `.text`
|
|
3893
3920
|
* @returns the comment's lines, delimiters and leading `*`s stripped
|
|
@@ -4001,7 +4028,7 @@ function parseScopedAndNativeStyleDocs(styleDocs, styleText, mode, tag, encapsul
|
|
|
4001
4028
|
const child = children[i];
|
|
4002
4029
|
if (child.type !== "decl" || !child.prop.startsWith("--") || hasName(child.prop)) continue;
|
|
4003
4030
|
const prev = children[i - 1];
|
|
4004
|
-
if (!prev || prev.type !== "comment" || !
|
|
4031
|
+
if (!prev || prev.type !== "comment" || !isNodeDocComment(prev.text)) continue;
|
|
4005
4032
|
styleDocs.push({
|
|
4006
4033
|
name: child.prop,
|
|
4007
4034
|
docs: normalizeJsDocText(prev.text),
|
|
@@ -4013,9 +4040,10 @@ function parseScopedAndNativeStyleDocs(styleDocs, styleText, mode, tag, encapsul
|
|
|
4013
4040
|
root.walkAtRules("property", (node) => {
|
|
4014
4041
|
const propName = node.params.trim();
|
|
4015
4042
|
if (!propName.startsWith("--")) return;
|
|
4016
|
-
const { syntax, initialValue } = parsePropertyAtRuleDescriptors(node);
|
|
4017
4043
|
const prev = node.prev();
|
|
4018
|
-
const
|
|
4044
|
+
const isInternal = prev?.type === "comment" && isInternalDocComment(prev.text);
|
|
4045
|
+
const { syntax, initialValue } = parsePropertyAtRuleDescriptors(node);
|
|
4046
|
+
const docs = prev && prev.type === "comment" && isNodeDocComment(prev.text) ? normalizeJsDocText(prev.text) : "";
|
|
4019
4047
|
const existing = styleDocs.find((styleDoc) => styleDoc.name === propName);
|
|
4020
4048
|
if (existing) {
|
|
4021
4049
|
existing.docs ||= docs;
|
|
@@ -4023,6 +4051,7 @@ function parseScopedAndNativeStyleDocs(styleDocs, styleText, mode, tag, encapsul
|
|
|
4023
4051
|
if (initialValue) existing.default ??= initialValue;
|
|
4024
4052
|
return;
|
|
4025
4053
|
}
|
|
4054
|
+
if (isInternal) return;
|
|
4026
4055
|
styleDocs.push({
|
|
4027
4056
|
name: propName,
|
|
4028
4057
|
docs,
|
|
@@ -4068,12 +4097,6 @@ const CSS_DOC_START = /\/\*(\*|!)/;
|
|
|
4068
4097
|
* Closing syntax for a CSS docstring
|
|
4069
4098
|
*/
|
|
4070
4099
|
const CSS_DOC_END = "*/";
|
|
4071
|
-
/**
|
|
4072
|
-
* The `@prop` annotation we support within CSS docstrings. `@cssprop`/`@cssproperty` are also
|
|
4073
|
-
* recognized as synonyms (the more common names in other web-component-analyzer/docgen
|
|
4074
|
-
* ecosystems).
|
|
4075
|
-
*/
|
|
4076
|
-
const CSS_PROP_ANNOTATION_RE = /@(?:cssproperty|cssprop|prop)\b/;
|
|
4077
4100
|
//#endregion
|
|
4078
4101
|
//#region src/compiler/sys/browser-stubs/browserslist.ts
|
|
4079
4102
|
const browserslist = (_query) => [];
|
|
@@ -4140,6 +4163,7 @@ const autoprefixCss = async (cssText, opts, filePath, minify = false) => {
|
|
|
4140
4163
|
};
|
|
4141
4164
|
if (typeof e.name === "string") diagnostic.header = e.name;
|
|
4142
4165
|
if (typeof e.message === "string") diagnostic.messageText = e.message;
|
|
4166
|
+
if (e.data?.type === "SelectorError" && e.loc && typeof e.loc.line === "number") diagnostic.messageText = getSelectorErrorMessage(typeof e.source === "string" ? e.source : cssText, e.loc, diagnostic.messageText, e.data.value?.type);
|
|
4143
4167
|
if (filePath) diagnostic.absFilePath = filePath;
|
|
4144
4168
|
else if (typeof e.fileName === "string" && e.fileName !== "style.css") diagnostic.absFilePath = e.fileName;
|
|
4145
4169
|
if (e.loc && typeof e.loc.line === "number") {
|
|
@@ -4169,6 +4193,25 @@ const autoprefixCss = async (cssText, opts, filePath, minify = false) => {
|
|
|
4169
4193
|
return output;
|
|
4170
4194
|
};
|
|
4171
4195
|
/**
|
|
4196
|
+
* Lightning CSS selector errors (e.g. `Invalid state`) don't name the selector, and for
|
|
4197
|
+
* preprocessed styles the reported line is in the compiled CSS, not the source file.
|
|
4198
|
+
* @param sourceText the CSS that failed to parse
|
|
4199
|
+
* @param loc the 1-based error location reported by Lightning CSS
|
|
4200
|
+
* @param loc.line the error line
|
|
4201
|
+
* @param loc.column the error column
|
|
4202
|
+
* @param message the original error message
|
|
4203
|
+
* @param errorType the Lightning CSS selector error type
|
|
4204
|
+
* @returns a message that includes the offending selector
|
|
4205
|
+
*/
|
|
4206
|
+
const getSelectorErrorMessage = (sourceText, loc, message, errorType) => {
|
|
4207
|
+
const offset = sourceText.split("\n").slice(0, loc.line - 1).reduce((acc, line) => acc + line.length + 1, 0) + (loc.column ?? 1) - 1;
|
|
4208
|
+
const start = Math.max(sourceText.lastIndexOf("{", offset), sourceText.lastIndexOf("}", offset), sourceText.lastIndexOf(";", offset));
|
|
4209
|
+
const end = sourceText.indexOf("{", offset);
|
|
4210
|
+
const selector = sourceText.slice(start + 1, end === -1 ? void 0 : end).trim();
|
|
4211
|
+
if (!selector) return message;
|
|
4212
|
+
return `Invalid CSS selector "${selector}": ${message}.${errorType === "InvalidState" ? ` A pseudo-class can't follow a pseudo-element (e.g. \`::before:dir(rtl)\`); move it before (\`:dir(rtl)::before\`).` : ""}`;
|
|
4213
|
+
};
|
|
4214
|
+
/**
|
|
4172
4215
|
* Default browserslist targets used when autoprefixing CSS.
|
|
4173
4216
|
* Targets ES2017 browsers (2022+) only.
|
|
4174
4217
|
*/
|
|
@@ -16244,8 +16287,27 @@ const transpileModule = (config, input, transformOpts) => {
|
|
|
16244
16287
|
if (tsCompilerOptions.jsx != null && !isAutomaticRuntime && !isString$1(tsCompilerOptions.jsxFragmentFactory)) tsCompilerOptions.jsxFragmentFactory = "Fragment";
|
|
16245
16288
|
if (tsCompilerOptions.paths && !isString$1(tsCompilerOptions.baseUrl)) tsCompilerOptions.baseUrl = ".";
|
|
16246
16289
|
const sourceFile = ts$1.createSourceFile(sourceFilePath, input, tsCompilerOptions.target);
|
|
16247
|
-
const
|
|
16248
|
-
|
|
16290
|
+
const importedSources = /* @__PURE__ */ new Map();
|
|
16291
|
+
const resolveImport = input.includes("resolveVar(") ? transformOpts.resolveImport : void 0;
|
|
16292
|
+
const resolveViaCallback = (specifier, containingFile) => {
|
|
16293
|
+
let resolved = null;
|
|
16294
|
+
try {
|
|
16295
|
+
resolved = resolveImport(specifier, containingFile, { kind: "type-info" });
|
|
16296
|
+
} catch {}
|
|
16297
|
+
if (!resolved) return void 0;
|
|
16298
|
+
const extension = getResolvedExtension(resolved.path);
|
|
16299
|
+
if (!extension) return void 0;
|
|
16300
|
+
const resolvedFileName = normalizePath(resolved.path.split("?")[0]);
|
|
16301
|
+
if (resolvedFileName !== normalizePath(sourceFilePath) && !importedSources.has(resolvedFileName)) importedSources.set(resolvedFileName, ts$1.createSourceFile(resolvedFileName, resolved.code, tsCompilerOptions.target, true));
|
|
16302
|
+
return {
|
|
16303
|
+
resolvedFileName,
|
|
16304
|
+
extension,
|
|
16305
|
+
isExternalLibraryImport: false
|
|
16306
|
+
};
|
|
16307
|
+
};
|
|
16308
|
+
if (resolveImport) tsCompilerOptions.noResolve = false;
|
|
16309
|
+
const compilerHost = {
|
|
16310
|
+
getSourceFile: (fileName) => normalizePath(fileName) === normalizePath(sourceFilePath) ? sourceFile : importedSources.get(normalizePath(fileName)),
|
|
16249
16311
|
writeFile: (name, text) => {
|
|
16250
16312
|
if (name.endsWith(".js.map") || name.endsWith(".mjs.map")) results.map = text;
|
|
16251
16313
|
else if (name.endsWith(".js") || name.endsWith(".mjs")) results.code = text;
|
|
@@ -16255,11 +16317,13 @@ const transpileModule = (config, input, transformOpts) => {
|
|
|
16255
16317
|
getCanonicalFileName: (fileName) => fileName,
|
|
16256
16318
|
getCurrentDirectory: () => transformOpts.currentDirectory || (typeof process !== "undefined" ? process.cwd() : "/"),
|
|
16257
16319
|
getNewLine: () => ts$1.sys && ts$1.sys.newLine || "\n",
|
|
16258
|
-
fileExists: (fileName) => normalizePath(fileName) === normalizePath(sourceFilePath),
|
|
16320
|
+
fileExists: (fileName) => normalizePath(fileName) === normalizePath(sourceFilePath) || importedSources.has(normalizePath(fileName)),
|
|
16259
16321
|
readFile: () => "",
|
|
16260
16322
|
directoryExists: () => true,
|
|
16261
|
-
getDirectories: () => []
|
|
16262
|
-
|
|
16323
|
+
getDirectories: () => [],
|
|
16324
|
+
...resolveImport ? { resolveModuleNameLiterals: (moduleLiterals, containingFile) => moduleLiterals.map((literal) => ({ resolvedModule: resolveViaCallback(literal.text, containingFile) })) } : {}
|
|
16325
|
+
};
|
|
16326
|
+
const program = ts$1.createProgram([sourceFilePath], tsCompilerOptions, compilerHost);
|
|
16263
16327
|
const typeChecker = program.getTypeChecker();
|
|
16264
16328
|
const transformers = {
|
|
16265
16329
|
before: [
|
|
@@ -16276,18 +16340,36 @@ const transpileModule = (config, input, transformOpts) => {
|
|
|
16276
16340
|
}
|
|
16277
16341
|
if (transformOpts.componentExport === "customelement" || transformOpts.componentExport === "module") transformers.after.push(nativeComponentTransform(compilerCtx, transformOpts, buildCtx));
|
|
16278
16342
|
else transformers.after.push(lazyComponentTransform(compilerCtx, transformOpts, buildCtx));
|
|
16279
|
-
program.emit(
|
|
16343
|
+
program.emit(sourceFile, void 0, void 0, false, transformers);
|
|
16280
16344
|
if (transformOpts.buildOverrides && results.code) {
|
|
16281
16345
|
const mutations = Object.entries(transformOpts.buildOverrides).filter(([, v]) => v !== void 0).map(([k, v]) => `__stencilBUILD.${k}=${v};`).join("");
|
|
16282
16346
|
if (mutations) results.code = `import{BUILD as __stencilBUILD}from"${STENCIL_APP_DATA_ID}";\n${mutations}\n` + results.code;
|
|
16283
16347
|
}
|
|
16284
|
-
const tsDiagnostics = [...program.getSyntacticDiagnostics()];
|
|
16348
|
+
const tsDiagnostics = [...program.getSyntacticDiagnostics(sourceFile)];
|
|
16285
16349
|
if (config.validateTypes) tsDiagnostics.push(...program.getOptionsDiagnostics());
|
|
16286
16350
|
buildCtx.diagnostics.push(...loadTypeScriptDiagnostics(tsDiagnostics));
|
|
16287
16351
|
results.diagnostics.push(...buildCtx.diagnostics);
|
|
16288
16352
|
results.moduleFile = compilerCtx.moduleMap.get(results.sourceFilePath);
|
|
16289
16353
|
return results;
|
|
16290
16354
|
};
|
|
16355
|
+
/**
|
|
16356
|
+
* Maps a `resolveImport` result path to the TypeScript extension the program should parse it
|
|
16357
|
+
* as. Only TypeScript sources are taken - `noLib`/no `allowJs` means anything else would be
|
|
16358
|
+
* dropped by the program anyway, so it stays unresolved exactly as it did before.
|
|
16359
|
+
*
|
|
16360
|
+
* @param path the resolved path returned by the `resolveImport` callback
|
|
16361
|
+
* @returns the matching `ts.Extension`, or `undefined` if the file can't add type info
|
|
16362
|
+
*/
|
|
16363
|
+
const getResolvedExtension = (path) => {
|
|
16364
|
+
const bare = path.split("?")[0];
|
|
16365
|
+
if (bare.endsWith(".d.ts")) return ts$1.Extension.Dts;
|
|
16366
|
+
if (bare.endsWith(".d.mts")) return ts$1.Extension.Dmts;
|
|
16367
|
+
if (bare.endsWith(".d.cts")) return ts$1.Extension.Dcts;
|
|
16368
|
+
if (bare.endsWith(".tsx")) return ts$1.Extension.Tsx;
|
|
16369
|
+
if (bare.endsWith(".mts")) return ts$1.Extension.Mts;
|
|
16370
|
+
if (bare.endsWith(".cts")) return ts$1.Extension.Cts;
|
|
16371
|
+
if (bare.endsWith(".ts")) return ts$1.Extension.Ts;
|
|
16372
|
+
};
|
|
16291
16373
|
const getScriptTargetKind = (transformOpts) => {
|
|
16292
16374
|
const target = transformOpts.target && transformOpts.target.toUpperCase();
|
|
16293
16375
|
if (isNumber$1(ts$1.ScriptTarget[target])) return ts$1.ScriptTarget[target];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as CompilerFsStats, $n as
|
|
1
|
+
import { $ as CompilerFsStats, $n as WatcherCloseResults, $t as OutputTargetBuild, A as BuildOverrides, An as ResolveModuleIdOptions, Ar as FsWriteResults, At as HotModuleReplacement, B as CompilerEventBuildLog, Bn as SsrDocumentOptions, Bt as Logger, C as BuildEmitEvents, Cn as PluginTransformResults, Cr as JsonDocsSlot, Ct as DevServerEditor, D as BuildOnEventRemove, Dn as PrerenderResults, Dr as JsonDocsUsage, Dt as HistoryApiFallback, E as BuildNoChangeResults, En as PrerenderOptions, Er as JsonDocsTypeLibrary, Et as FsWatchResults, F as Compiler, Fn as RolldownConfig, Ft as LazyRequire, G as CompilerEventFileAdd, Gn as SystemDetails, Gt as OptimizeCssInput, H as CompilerEventBuildStart, Hn as StencilConfig, Ht as LoggerTimeSpan, I as CompilerBuildResults, In as SerializeDocumentOptions, It as LightDomPatches, J as CompilerEventFsChange, Jn as TranspileOptions, Jt as OptimizeJsOutput, K as CompilerEventFileDelete, Kn as TransformOptions, Kt as OptimizeCssOutput, L as CompilerBuildStart, Ln as ServiceWorkerConfig, Lt as LoadConfigInit, M as CliInitOptions, Mn as ResolveModuleOptions, Mt as HydrateFactoryOptions, N as CompileScriptMinifyOptions, Nn as RobotsTxtOpts, Nt as HydratedFlag, O as BuildOnEvents, On as PrerenderStartOptions, Or as JsonDocsValue, Ot as HmrGlobalStyleUpdate, P as CompileTarget, Pn as RobotsTxtResults, Pt as LOG_LEVELS, Q as CompilerFileWatcherEvent, Qn as ValidatedOutputTargetWww, Qt as OutputTargetBaseNext, R as CompilerDependency, Rn as SitemapXmpOpts, Rt as LoadConfigResults, S as AutoprefixerOptions, Sn as PluginCtx, Sr as JsonDocsProp, St as DevServerConfig, T as BuildLog, Tn as PrerenderHydrateOptions, Tr as JsonDocsTag, Tt as DocsReadmeCustomColumn, U as CompilerEventDirAdd, Un as StencilDevServerConfig, Ut as ModeConfig, V as CompilerEventBuildNoChange, Vn as SsrFactoryOptions, Vt as LoggerLineUpdater, W as CompilerEventDirDelete, Wn as StencilDocsConfig, Wt as NodeResolveConfig, X as CompilerFileWatcher, Xn as UnvalidatedConfig, Xt as OutputTargetAssets, Y as CompilerEventName, Yn as TranspileResults, Yt as OutputTarget, Z as CompilerFileWatcherCallback, Zn as ValidatedConfig, Zt as OutputTargetBase, _ as PrintLine, _n as OutputTargetWww, _r as JsonDocsEvent, _t as CopyTask, a as ComponentCompilerEvent, an as OutputTargetDocsCustom, at as CompilerSystemRealpathResults, b as SsrResults, bn as PlatformPath, br as JsonDocsMethodReturn, bt as CustomElementsExportBehaviorOptions, c as ComponentCompilerMethod, cn as OutputTargetDocsReadme, ct as CompilerSystemRemoveFileResults, d as ComponentCompilerTypeReferences, dn as OutputTargetLoaderBundle, dt as CompilerSystemWriteFileResults, en as OutputTargetCollection, er as WorkerMainController, et as CompilerRequest, f as ComponentGlobalStyle, fn as OutputTargetSsr, fr as JsonDocMethodParameter, ft as CompilerWatcher, g as PrerenderUrlResults, gn as OutputTargetTypes, gr as JsonDocsDependencyGraph, gt as CopyResults, h as PackageJsonData, hn as OutputTargetStats, hr as JsonDocsCustomState, ht as ConfigCompat, i as CompilerWorkerContext, in as OutputTargetDocsAgentSkill, it as CompilerSystemCreateDirectoryResults, j as BuildResultsComponentGraph, jn as ResolveModuleIdResults, jt as HydrateDocumentOptions, k as BuildOutput, kn as ResolveImportContext, kr as StyleDoc, kt as HmrStyleUpdate, l as ComponentCompilerProperty, ln as OutputTargetDocsVscode, lt as CompilerSystemRenameResults, m as LazyBundlesRuntimeData, mn as OutputTargetStandalone, mr as JsonDocsComponent, mt as ConfigBundle, nn as OutputTargetCustom, nt as CompilerSystem, o as ComponentCompilerListener, on as OutputTargetDocsCustomElementsManifest, ot as CompilerSystemRemoveDirectoryOptions, pn as OutputTargetSsrWasm, pr as JsonDocs, pt as Config, q as CompilerEventFileUpdate, qn as TranspileOnlyResults, 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, tr as WorkerOptions, tt as CompilerRequestResponse, u as ComponentCompilerState, un as OutputTargetGlobalStyle, ur as UserBuildConditionals, ut as CompilerSystemRenamedPath, vn as PageReloadStrategy, vr as JsonDocsListener, vt as Credentials, w as BuildEvents, wn as PrerenderConfig, wr as JsonDocsStyle, wt as Diagnostic, x as WorkerMsgHandler, xn as Plugin, xr as JsonDocsPart, xt as DevServer, yn as ParsedPath, yr as JsonDocsMethod, yt as CustomElementsExportBehavior, z as CompilerEventBuildFinish, zn as SitemapXmpResults, zt as LogLevel } from "../index-BxnfbT3a.mjs";
|
|
2
2
|
import ts from "typescript";
|
|
3
3
|
import { Plugin as Plugin$1 } from "rolldown";
|
|
4
4
|
//#region src/version.d.ts
|
|
@@ -461,4 +461,4 @@ declare const validateConfig: (userConfig: UnvalidatedConfig, bootstrapConfig: L
|
|
|
461
461
|
*/
|
|
462
462
|
declare const validateHydrated: (config: UnvalidatedConfig) => HydratedFlag | null;
|
|
463
463
|
//#endregion
|
|
464
|
-
export { AutoprefixerOptions, type BuildCtx, BuildEmitEvents, BuildEvents, BuildLog, BuildNoChangeResults, BuildOnEventRemove, BuildOnEvents, BuildOutput, BuildOverrides, BuildResultsComponentGraph, CliInitOptions, CompileScriptMinifyOptions, CompileTarget, Compiler, CompilerBuildResults, CompilerBuildStart, type CompilerCtx, CompilerDependency, CompilerEventBuildFinish, CompilerEventBuildLog, CompilerEventBuildNoChange, CompilerEventBuildStart, CompilerEventDirAdd, CompilerEventDirDelete, CompilerEventFileAdd, CompilerEventFileDelete, CompilerEventFileUpdate, CompilerEventFsChange, CompilerEventName, CompilerFileWatcher, CompilerFileWatcherCallback, CompilerFileWatcherEvent, CompilerFsStats, CompilerRequest, CompilerRequestResponse, CompilerSystem, CompilerSystemCreateDirectoryOptions, CompilerSystemCreateDirectoryResults, CompilerSystemRealpathResults, CompilerSystemRemoveDirectoryOptions, CompilerSystemRemoveDirectoryResults, CompilerSystemRemoveFileResults, CompilerSystemRenameResults, CompilerSystemRenamedPath, CompilerSystemWriteFileResults, CompilerWatcher, type ComponentCompilerEvent, type ComponentCompilerListener, type ComponentCompilerMeta, type ComponentCompilerMethod, type ComponentCompilerProperty, type ComponentCompilerState, type ComponentCompilerTypeReferences, type ComponentGlobalStyle, type ComponentTypesConfig, Config, ConfigBundle, ConfigCompat, CopyResults, CopyTask, Credentials, CustomElementsExportBehavior, CustomElementsExportBehaviorOptions, type CustomElementsManifest, DevServer, DevServerConfig, DevServerEditor, Diagnostic, DocsReadmeCustomColumn, FsWatchResults, type FsWriteResults, HistoryApiFallback, HmrGlobalStyleUpdate, HmrStyleUpdate, HotModuleReplacement, HydrateDocumentOptions, HydrateFactoryOptions, HydratedFlag, JsonDocMethodParameter, JsonDocs, JsonDocsComponent, JsonDocsCustomState, JsonDocsDependencyGraph, JsonDocsEvent, JsonDocsListener, JsonDocsMethod, JsonDocsMethodReturn, JsonDocsPart, JsonDocsProp, JsonDocsSlot, JsonDocsStyle, JsonDocsTag, JsonDocsTypeLibrary, JsonDocsUsage, JsonDocsValue, LOG_LEVELS, type LazyBundlesRuntimeData, LazyRequire, LightDomPatches, LoadConfigInit, LoadConfigResults, LogLevel, Logger, LoggerLineUpdater, LoggerTimeSpan, ModeConfig, NodeResolveConfig, OptimizeCssInput, OptimizeCssOutput, OptimizeJsInput, OptimizeJsOutput, OutputTarget, OutputTargetAssets, OutputTargetBase, OutputTargetBaseNext, OutputTargetBuild, OutputTargetCollection, OutputTargetCopy, OutputTargetCustom, OutputTargetDistLazy, OutputTargetDocsAgentSkill, OutputTargetDocsCustom, OutputTargetDocsCustomElementsManifest, OutputTargetDocsJson, OutputTargetDocsReadme, OutputTargetDocsVscode, OutputTargetGlobalStyle, OutputTargetLoaderBundle, OutputTargetSsr, OutputTargetSsrWasm, OutputTargetStandalone, OutputTargetStats, OutputTargetTypes, OutputTargetWww, type PackageJsonData, PageReloadStrategy, ParsedPath, PlatformPath, Plugin, PluginCtx, PluginTransformResults, PrerenderConfig, PrerenderHydrateOptions, PrerenderOptions, PrerenderResults, PrerenderStartOptions, type PrerenderUrlResults, type PrintLine, ResolveModuleIdOptions, ResolveModuleIdResults, ResolveModuleOptions, RobotsTxtOpts, RobotsTxtResults, RolldownConfig, SerializeDocumentOptions, ServiceWorkerConfig, SitemapXmpOpts, SitemapXmpResults, SsrDocumentOptions, SsrFactoryOptions, type SsrResults, StencilConfig, StencilDevServerConfig, StencilDocsConfig, StyleDoc, SystemDetails, TransformOptions, TranspileOnlyResults, TranspileOptions, TranspileResults, UnvalidatedConfig, ValidatedConfig, ValidatedOutputTargetWww, WatcherCloseResults, WorkerMainController, WorkerOptions, 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 };
|
|
464
|
+
export { AutoprefixerOptions, type BuildCtx, BuildEmitEvents, BuildEvents, BuildLog, BuildNoChangeResults, BuildOnEventRemove, BuildOnEvents, BuildOutput, BuildOverrides, BuildResultsComponentGraph, CliInitOptions, CompileScriptMinifyOptions, CompileTarget, Compiler, CompilerBuildResults, CompilerBuildStart, type CompilerCtx, CompilerDependency, CompilerEventBuildFinish, CompilerEventBuildLog, CompilerEventBuildNoChange, CompilerEventBuildStart, CompilerEventDirAdd, CompilerEventDirDelete, CompilerEventFileAdd, CompilerEventFileDelete, CompilerEventFileUpdate, CompilerEventFsChange, CompilerEventName, CompilerFileWatcher, CompilerFileWatcherCallback, CompilerFileWatcherEvent, CompilerFsStats, CompilerRequest, CompilerRequestResponse, CompilerSystem, CompilerSystemCreateDirectoryOptions, CompilerSystemCreateDirectoryResults, CompilerSystemRealpathResults, CompilerSystemRemoveDirectoryOptions, CompilerSystemRemoveDirectoryResults, CompilerSystemRemoveFileResults, CompilerSystemRenameResults, CompilerSystemRenamedPath, CompilerSystemWriteFileResults, CompilerWatcher, type ComponentCompilerEvent, type ComponentCompilerListener, type ComponentCompilerMeta, type ComponentCompilerMethod, type ComponentCompilerProperty, type ComponentCompilerState, type ComponentCompilerTypeReferences, type ComponentGlobalStyle, type ComponentTypesConfig, Config, ConfigBundle, ConfigCompat, CopyResults, CopyTask, Credentials, CustomElementsExportBehavior, CustomElementsExportBehaviorOptions, type CustomElementsManifest, DevServer, DevServerConfig, DevServerEditor, Diagnostic, DocsReadmeCustomColumn, FsWatchResults, type FsWriteResults, HistoryApiFallback, HmrGlobalStyleUpdate, HmrStyleUpdate, HotModuleReplacement, HydrateDocumentOptions, HydrateFactoryOptions, HydratedFlag, JsonDocMethodParameter, JsonDocs, JsonDocsComponent, JsonDocsCustomState, JsonDocsDependencyGraph, JsonDocsEvent, JsonDocsListener, JsonDocsMethod, JsonDocsMethodReturn, JsonDocsPart, JsonDocsProp, JsonDocsSlot, JsonDocsStyle, JsonDocsTag, JsonDocsTypeLibrary, JsonDocsUsage, JsonDocsValue, LOG_LEVELS, type LazyBundlesRuntimeData, LazyRequire, LightDomPatches, LoadConfigInit, LoadConfigResults, LogLevel, Logger, LoggerLineUpdater, LoggerTimeSpan, ModeConfig, NodeResolveConfig, OptimizeCssInput, OptimizeCssOutput, OptimizeJsInput, OptimizeJsOutput, OutputTarget, OutputTargetAssets, OutputTargetBase, OutputTargetBaseNext, OutputTargetBuild, OutputTargetCollection, OutputTargetCopy, OutputTargetCustom, OutputTargetDistLazy, OutputTargetDocsAgentSkill, OutputTargetDocsCustom, OutputTargetDocsCustomElementsManifest, OutputTargetDocsJson, OutputTargetDocsReadme, OutputTargetDocsVscode, OutputTargetGlobalStyle, OutputTargetLoaderBundle, OutputTargetSsr, OutputTargetSsrWasm, OutputTargetStandalone, OutputTargetStats, OutputTargetTypes, OutputTargetWww, type PackageJsonData, PageReloadStrategy, ParsedPath, PlatformPath, Plugin, PluginCtx, PluginTransformResults, PrerenderConfig, PrerenderHydrateOptions, PrerenderOptions, PrerenderResults, PrerenderStartOptions, type PrerenderUrlResults, type PrintLine, ResolveImportContext, ResolveModuleIdOptions, ResolveModuleIdResults, ResolveModuleOptions, RobotsTxtOpts, RobotsTxtResults, RolldownConfig, SerializeDocumentOptions, ServiceWorkerConfig, SitemapXmpOpts, SitemapXmpResults, SsrDocumentOptions, SsrFactoryOptions, type SsrResults, StencilConfig, StencilDevServerConfig, StencilDocsConfig, StyleDoc, SystemDetails, TransformOptions, TranspileOnlyResults, TranspileOptions, TranspileResults, UnvalidatedConfig, ValidatedConfig, ValidatedOutputTargetWww, WatcherCloseResults, WorkerMainController, WorkerOptions, 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 };
|
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-ChKFuRry.mjs";
|
|
2
|
+
import { a as LOG_LEVELS, i as CustomElementsExportBehaviorOptions } from "../node-C59vQZNg.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
|
|
1
|
+
import { $i as COLLECTION, $r as rolldownToStencilSourceMap, Aa as WWW, Ai as shouldExcludeComponent, Bi as normalizeDiagnostics, Br as isDtsFile, Ca as STANDALONE, Ci as isOutputTargetSsrWasm, Da as TYPES, Di as isOutputTargetWww, Ea as SVG_NS, Ei as isOutputTargetTypes, Fi as catchError, Fr as addDocBlock, Gi as createOnWarnFn, Gr as parsePackageJson, Hi as augmentDiagnosticWithNode, Hr as isJsxFile, Ii as hasError, Ir as createJsVarName, Ji as formatComponentRuntimeMeta, Jr as getInlineSourceMappingUrlLinker, Ki as isRolldownError, Kr as readOnlyArrayHasStringMember, Li as hasWarning, Lr as generatePreamble, Mi as buildError, Mr as validateComponentModes, Ni as buildJsonFileError, Nr as validateComponentTag, Oa as VALID_CONFIG_OUTPUT_TARGETS, Oi as isValidConfigOutputTarget, Pi as buildWarn, Pr as ParsePackageJsonResult, Qi as CMP_FLAGS, Qr as relativizeSourceMap, Ri as shouldIgnoreError, Rr as getTextDocs, Sa as SSR_WASM, Si as isOutputTargetSsr, Ta as STYLE_EXT, Ti as isOutputTargetStats, Ui as loadTypeScriptDiagnostic, Ur as isTsFile, Vi as splitLineBreaks, Vr as isJsFile, Wi as loadTypeScriptDiagnostics, Wr as isTsxFile, Xi as stringifyRuntimeData, Xr as getSourceMappingUrlForEndOfFile, Yi as formatLazyBundleRuntimeMeta, Yr as getRolldownSourceMapOptions, Zi as ASSETS, Zr as getSourceMappingUrlLinker, _a as LISTENER_FLAGS, _i as isOutputTargetDocsReadme, aa as DIST_LAZY, ai as getComponentsDtsTypesFilePath, ba as NODE_TYPES, bi as isOutputTargetLoaderBundle, ca as DOCS_CUSTOM_ELEMENTS_MANIFEST, ci as isOutputTargetCollection, da as DOCS_VSCODE, di as isOutputTargetDistLazy, ea as COLLECTION_APP_DATA_FILE_NAME, ei as result_d_exports, fa as EVENT_FLAGS, fi as isOutputTargetDocs, ga as HTML_NS, gi as isOutputTargetDocsJson, ha as HOST_FLAGS, hi as isOutputTargetDocsCustomElementsManifest, ia as DEFAULT_STYLE_MODE, ii as getComponentsDtsSrcFilePath, ja as XLINK_NS, ji as TASK_CANCELED_MSG, jr as ModeValidationError, ka as WATCH_FLAGS, ki as relativeImport, la as DOCS_JSON, li as isOutputTargetCopy, ma as GLOBAL_STYLE, mi as isOutputTargetDocsCustom, na as COPY, ni as filterActiveTargets, oa as DOCS_AGENT_SKILL, oi as getComponentsFromModules, pa as GENERATED_DTS, pi as isOutputTargetDocsAgentSkill, qi as loadRolldownDiagnostics, qr as readPackageJson, ra as CUSTOM, ri as filterExcludedComponents, sa as DOCS_CUSTOM, si as isOutputTargetAssets, ta as COLLECTION_MANIFEST_FILE_NAME, ti as FilterComponentsResult, ua as DOCS_README, ui as isOutputTargetCustom, va as LOADER_BUNDLE, vi as isOutputTargetDocsVscode, wa as STATS, wi as isOutputTargetStandalone, xa as SSR, xi as isOutputTargetServerRenderer, ya as MEMBER_FLAGS, yi as isOutputTargetGlobalStyle, zi as escapeHtml, zr as hasDependency } from "../../index-BxnfbT3a.mjs";
|
|
2
2
|
//#region src/utils/byte-size.d.ts
|
|
3
3
|
/**
|
|
4
4
|
* Used to learn the size of a string in bytes.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as VALID_CONFIG_OUTPUT_TARGETS, A as DIST_LAZY, B as HOST_FLAGS, C as CMP_FLAGS, D as COPY, E as COLLECTION_MANIFEST_FILE_NAME, F as DOCS_README, G as NODE_TYPES, H as LISTENER_FLAGS, I as DOCS_VSCODE, J as STANDALONE, K as SSR, L as EVENT_FLAGS, M as DOCS_CUSTOM, N as DOCS_CUSTOM_ELEMENTS_MANIFEST, O as CUSTOM, P as DOCS_JSON, Q as TYPES, R as GENERATED_DTS, S as ASSETS, T as COLLECTION_APP_DATA_FILE_NAME, U as LOADER_BUNDLE, V as HTML_NS, W as MEMBER_FLAGS, X as STYLE_EXT, Y as STATS, Z as SVG_NS, _ as toCamelCase, a as isBoolean, b as unique, c as isFunction, d as isObject, et as WATCH_FLAGS, f as isString, g as sortBy, h as pluck, i as fromEntries, j as DOCS_AGENT_SKILL, k as DEFAULT_STYLE_MODE, l as isIterable, m as noop, n as escapeWithPattern, nt as XLINK_NS, o as isComplexType, p as mergeIntoWith, q as SSR_WASM, r as flatOne, s as isDef, t as dashToPascalCase, tt as WWW, u as isNumber, v as toDashCase, w as COLLECTION, x as queryNonceMetaTagContent, y as toTitleCase, z as GLOBAL_STYLE } from "../../helpers-
|
|
2
|
-
import { C as isRootPath, D as byteSize, E as stringifyRuntimeData, O as escapeRegExpSpecialCharacters, S as splitLineBreaks, T as formatLazyBundleRuntimeMeta, _ as createOnWarnFn, a as getRolldownSourceMapOptions, b as escapeHtml, c as relativizeSourceMap, g as loadTypeScriptDiagnostics, h as loadTypeScriptDiagnostic, i as getInlineSourceMappingUrlLinker, l as rolldownToStencilSourceMap, m as augmentDiagnosticWithNode, n as validateComponentTag, o as getSourceMappingUrlForEndOfFile, p as result_exports, r as isRemoteUrl, s as getSourceMappingUrlLinker, t as validateComponentModes, v as isRolldownError, w as formatComponentRuntimeMeta, x as normalizeDiagnostics, y as loadRolldownDiagnostics } from "../../validation-
|
|
3
|
-
import { $ as buildWarn, A as isOutputTargetDocsVscode, B as isValidConfigOutputTarget, C as isOutputTargetDistLazy, D as isOutputTargetDocsCustomElementsManifest, E as isOutputTargetDocsCustom, F as isOutputTargetSsrWasm, G as normalizeFsPath, H as shouldExcludeComponent, I as isOutputTargetStandalone, J as relative, K as normalizeFsPathQuery, L as isOutputTargetStats, M as isOutputTargetLoaderBundle, N as isOutputTargetServerRenderer, O as isOutputTargetDocsJson, P as isOutputTargetSsr, Q as buildJsonFileError, R as isOutputTargetTypes, S as isOutputTargetCustom, T as isOutputTargetDocsAgentSkill, U as join, V as relativeImport, W as normalize, X as TASK_CANCELED_MSG, Y as resolve, Z as buildError, _ as getComponentsDtsTypesFilePath, a as hasDependency, b as isOutputTargetCollection, c as isJsxFile, d as parsePackageJson, et as catchError, f as readOnlyArrayHasStringMember, g as getComponentsDtsSrcFilePath, h as filterExcludedComponents, i as getTextDocs, it as isGlob, j as isOutputTargetGlobalStyle, k as isOutputTargetDocsReadme, l as isTsFile, m as filterActiveTargets, n as createJsVarName, nt as hasWarning, o as isDtsFile, p as readPackageJson, q as normalizePath, r as generatePreamble, rt as shouldIgnoreError, s as isJsFile, t as addDocBlock, tt as hasError, u as isTsxFile, v as getComponentsFromModules, w as isOutputTargetDocs, x as isOutputTargetCopy, y as isOutputTargetAssets, z as isOutputTargetWww } from "../../util-
|
|
1
|
+
import { $ as VALID_CONFIG_OUTPUT_TARGETS, A as DIST_LAZY, B as HOST_FLAGS, C as CMP_FLAGS, D as COPY, E as COLLECTION_MANIFEST_FILE_NAME, F as DOCS_README, G as NODE_TYPES, H as LISTENER_FLAGS, I as DOCS_VSCODE, J as STANDALONE, K as SSR, L as EVENT_FLAGS, M as DOCS_CUSTOM, N as DOCS_CUSTOM_ELEMENTS_MANIFEST, O as CUSTOM, P as DOCS_JSON, Q as TYPES, R as GENERATED_DTS, S as ASSETS, T as COLLECTION_APP_DATA_FILE_NAME, U as LOADER_BUNDLE, V as HTML_NS, W as MEMBER_FLAGS, X as STYLE_EXT, Y as STATS, Z as SVG_NS, _ as toCamelCase, a as isBoolean, b as unique, c as isFunction, d as isObject, et as WATCH_FLAGS, f as isString, g as sortBy, h as pluck, i as fromEntries, j as DOCS_AGENT_SKILL, k as DEFAULT_STYLE_MODE, l as isIterable, m as noop, n as escapeWithPattern, nt as XLINK_NS, o as isComplexType, p as mergeIntoWith, q as SSR_WASM, r as flatOne, s as isDef, t as dashToPascalCase, tt as WWW, u as isNumber, v as toDashCase, w as COLLECTION, x as queryNonceMetaTagContent, y as toTitleCase, z as GLOBAL_STYLE } from "../../helpers-pTCZhNi0.mjs";
|
|
2
|
+
import { C as isRootPath, D as byteSize, E as stringifyRuntimeData, O as escapeRegExpSpecialCharacters, S as splitLineBreaks, T as formatLazyBundleRuntimeMeta, _ as createOnWarnFn, a as getRolldownSourceMapOptions, b as escapeHtml, c as relativizeSourceMap, g as loadTypeScriptDiagnostics, h as loadTypeScriptDiagnostic, i as getInlineSourceMappingUrlLinker, l as rolldownToStencilSourceMap, m as augmentDiagnosticWithNode, n as validateComponentTag, o as getSourceMappingUrlForEndOfFile, p as result_exports, r as isRemoteUrl, s as getSourceMappingUrlLinker, t as validateComponentModes, v as isRolldownError, w as formatComponentRuntimeMeta, x as normalizeDiagnostics, y as loadRolldownDiagnostics } from "../../validation-C1mr0klL.mjs";
|
|
3
|
+
import { $ as buildWarn, A as isOutputTargetDocsVscode, B as isValidConfigOutputTarget, C as isOutputTargetDistLazy, D as isOutputTargetDocsCustomElementsManifest, E as isOutputTargetDocsCustom, F as isOutputTargetSsrWasm, G as normalizeFsPath, H as shouldExcludeComponent, I as isOutputTargetStandalone, J as relative, K as normalizeFsPathQuery, L as isOutputTargetStats, M as isOutputTargetLoaderBundle, N as isOutputTargetServerRenderer, O as isOutputTargetDocsJson, P as isOutputTargetSsr, Q as buildJsonFileError, R as isOutputTargetTypes, S as isOutputTargetCustom, T as isOutputTargetDocsAgentSkill, U as join, V as relativeImport, W as normalize, X as TASK_CANCELED_MSG, Y as resolve, Z as buildError, _ as getComponentsDtsTypesFilePath, a as hasDependency, b as isOutputTargetCollection, c as isJsxFile, d as parsePackageJson, et as catchError, f as readOnlyArrayHasStringMember, g as getComponentsDtsSrcFilePath, h as filterExcludedComponents, i as getTextDocs, it as isGlob, j as isOutputTargetGlobalStyle, k as isOutputTargetDocsReadme, l as isTsFile, m as filterActiveTargets, n as createJsVarName, nt as hasWarning, o as isDtsFile, p as readPackageJson, q as normalizePath, r as generatePreamble, rt as shouldIgnoreError, s as isJsFile, t as addDocBlock, tt as hasError, u as isTsxFile, v as getComponentsFromModules, w as isOutputTargetDocs, x as isOutputTargetCopy, y as isOutputTargetAssets, z as isOutputTargetWww } from "../../util-CP6-333M.mjs";
|
|
4
4
|
export { ASSETS, CMP_FLAGS, COLLECTION, COLLECTION_APP_DATA_FILE_NAME, COLLECTION_MANIFEST_FILE_NAME, COPY, CUSTOM, DEFAULT_STYLE_MODE, DIST_LAZY, DOCS_AGENT_SKILL, DOCS_CUSTOM, DOCS_CUSTOM_ELEMENTS_MANIFEST, DOCS_JSON, DOCS_README, DOCS_VSCODE, EVENT_FLAGS, GENERATED_DTS, GLOBAL_STYLE, HOST_FLAGS, HTML_NS, LISTENER_FLAGS, LOADER_BUNDLE, MEMBER_FLAGS, NODE_TYPES, SSR, SSR_WASM, STANDALONE, STATS, STYLE_EXT, SVG_NS, TASK_CANCELED_MSG, TYPES, VALID_CONFIG_OUTPUT_TARGETS, WATCH_FLAGS, WWW, XLINK_NS, addDocBlock, augmentDiagnosticWithNode, buildError, buildJsonFileError, buildWarn, byteSize, catchError, createJsVarName, createOnWarnFn, dashToPascalCase, escapeHtml, escapeRegExpSpecialCharacters, escapeWithPattern, filterActiveTargets, filterExcludedComponents, flatOne, formatComponentRuntimeMeta, formatLazyBundleRuntimeMeta, fromEntries, generatePreamble, getComponentsDtsSrcFilePath, getComponentsDtsTypesFilePath, getComponentsFromModules, getInlineSourceMappingUrlLinker, getRolldownSourceMapOptions, getSourceMappingUrlForEndOfFile, getSourceMappingUrlLinker, getTextDocs, hasDependency, hasError, hasWarning, isBoolean, isComplexType, isDef, isDtsFile, isFunction, isGlob, isIterable, isJsFile, isJsxFile, isNumber, isObject, isOutputTargetAssets, isOutputTargetCollection, isOutputTargetCopy, isOutputTargetCustom, isOutputTargetDistLazy, isOutputTargetDocs, isOutputTargetDocsAgentSkill, isOutputTargetDocsCustom, isOutputTargetDocsCustomElementsManifest, isOutputTargetDocsJson, isOutputTargetDocsReadme, isOutputTargetDocsVscode, isOutputTargetGlobalStyle, isOutputTargetLoaderBundle, isOutputTargetServerRenderer, isOutputTargetSsr, isOutputTargetSsrWasm, isOutputTargetStandalone, isOutputTargetStats, isOutputTargetTypes, isOutputTargetWww, isRemoteUrl, isRolldownError, isRootPath, isString, isTsFile, isTsxFile, isValidConfigOutputTarget, join, loadRolldownDiagnostics, loadTypeScriptDiagnostic, loadTypeScriptDiagnostics, mergeIntoWith, noop, normalize, normalizeDiagnostics, normalizeFsPath, normalizeFsPathQuery, normalizePath, parsePackageJson, pluck, queryNonceMetaTagContent, readOnlyArrayHasStringMember, readPackageJson, relative, relativeImport, relativizeSourceMap, resolve, result_exports as result, rolldownToStencilSourceMap, shouldExcludeComponent, shouldIgnoreError, sortBy, splitLineBreaks, stringifyRuntimeData, toCamelCase, toDashCase, toTitleCase, unique, validateComponentModes, validateComponentTag };
|