@stencil/core 5.0.0-rc.1 → 5.0.0-rc.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{client-BMtGBEQV.mjs → client-QadqfKfL.mjs} +32 -17
- package/dist/compiler/browser.d.ts +28 -5
- package/dist/compiler/browser.js +102 -19
- 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-C_Y38j4m.mjs → compiler-DlA2VsX7.mjs} +335 -130
- package/dist/declarations/stencil-public-compiler.d.ts +30 -7
- package/dist/{helpers-pTCZhNi0.mjs → helpers-k8xQHE77.mjs} +5 -1
- package/dist/{index-CFiy6MZ3.d.mts → index-BDAZsQzV.d.mts} +34 -7
- package/dist/{index-CViiWNQ9.d.mts → index-BS1JKKvz.d.mts} +1 -1
- package/dist/index.mjs +1 -1
- package/dist/jsx-runtime.mjs +1 -1
- package/dist/{node-Bkq8vRnu.mjs → node-BR2GYgzY.mjs} +3 -3
- package/dist/runtime/client/lazy.js +231 -178
- package/dist/runtime/client/runtime.js +231 -178
- package/dist/runtime/index.js +231 -178
- package/dist/runtime/server/index.mjs +231 -178
- 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.d.mts +5 -0
- package/dist/testing/index.mjs +228 -177
- package/dist/{util-CP6-333M.mjs → util-Cj2D3x_h.mjs} +1 -1
- package/dist/{validation-C1mr0klL.mjs → validation-GfBzquhJ.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-k8xQHE77.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
|
|
@@ -1844,6 +1840,17 @@ const attachToAncestor = (hostRef, ancestorComponent) => {
|
|
|
1844
1840
|
if (ancestorComponent["s-pc"]) ancestorComponent["s-pc"].push(ensureFirstConnectPromise(hostRef));
|
|
1845
1841
|
}
|
|
1846
1842
|
};
|
|
1843
|
+
/**
|
|
1844
|
+
* Release the ancestor waiting on this component's update (registered by {@link attachToAncestor}).
|
|
1845
|
+
*
|
|
1846
|
+
* @param hostRef the component's host reference
|
|
1847
|
+
*/
|
|
1848
|
+
const resolveAncestorWait = (hostRef) => {
|
|
1849
|
+
if (BUILD.asyncLoading && hostRef.$onRenderResolve$) {
|
|
1850
|
+
hostRef.$onRenderResolve$();
|
|
1851
|
+
hostRef.$onRenderResolve$ = void 0;
|
|
1852
|
+
}
|
|
1853
|
+
};
|
|
1847
1854
|
const scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
1848
1855
|
if (BUILD.updatable) hostRef.$flags$ |= HOST_FLAGS.isQueuedForUpdate;
|
|
1849
1856
|
if (BUILD.asyncLoading && hostRef.$flags$ & HOST_FLAGS.isWaitingForChildren) {
|
|
@@ -1853,10 +1860,10 @@ const scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
|
1853
1860
|
attachToAncestor(hostRef, hostRef.$ancestorComponent$);
|
|
1854
1861
|
const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
|
|
1855
1862
|
if (isInitialLoad) {
|
|
1856
|
-
const pendingConnects = BUILD.asyncLoading ? hostRef.$hostElement$["s-pc"] : void 0;
|
|
1857
|
-
if (pendingConnects && pendingConnects.length > 0) return Promise.all(pendingConnects).then(dispatch).catch(dispatch);
|
|
1858
1863
|
queueMicrotask(() => {
|
|
1859
|
-
|
|
1864
|
+
const pendingConnects = BUILD.asyncLoading ? hostRef.$hostElement$["s-pc"] : void 0;
|
|
1865
|
+
if (pendingConnects && pendingConnects.length > 0) Promise.all(pendingConnects).then(dispatch, dispatch);
|
|
1866
|
+
else dispatch();
|
|
1860
1867
|
});
|
|
1861
1868
|
return;
|
|
1862
1869
|
}
|
|
@@ -1909,8 +1916,9 @@ const dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
1909
1916
|
if (BUILD.updatable && hostRef.$queuedPropChanges$) {
|
|
1910
1917
|
const changes = hostRef.$queuedPropChanges$;
|
|
1911
1918
|
hostRef.$queuedPropChanges$ = void 0;
|
|
1912
|
-
if (safeCall(instance, "componentShouldUpdate", changes, elm) === false) {
|
|
1919
|
+
if (safeCall(instance, "componentShouldUpdate", changes, elm) === false && !(hostRef.$flags$ & HOST_FLAGS.isUpdateForced)) {
|
|
1913
1920
|
hostRef.$flags$ &= ~HOST_FLAGS.isQueuedForUpdate;
|
|
1921
|
+
resolveAncestorWait(hostRef);
|
|
1914
1922
|
return;
|
|
1915
1923
|
}
|
|
1916
1924
|
}
|
|
@@ -2036,7 +2044,10 @@ const callRender = (hostRef, instance, elm, isInitialLoad) => {
|
|
|
2036
2044
|
* method, so we can call the method immediately. If not, check before calling it.
|
|
2037
2045
|
*/
|
|
2038
2046
|
instance = allRenderFn ? instance.render() : instance.render && instance.render();
|
|
2039
|
-
if (updatable)
|
|
2047
|
+
if (updatable) {
|
|
2048
|
+
hostRef.$flags$ &= ~(HOST_FLAGS.isQueuedForUpdate | HOST_FLAGS.isUpdateForced);
|
|
2049
|
+
hostRef.$queuedPropChanges$ = void 0;
|
|
2050
|
+
}
|
|
2040
2051
|
if (updatable || lazyLoad) hostRef.$flags$ |= HOST_FLAGS.hasRendered;
|
|
2041
2052
|
if (BUILD.hasRenderFn || BUILD.reflect) {
|
|
2042
2053
|
if (BUILD.vdomRender || BUILD.reflect) {
|
|
@@ -2087,10 +2098,7 @@ const postUpdateComponent = (hostRef) => {
|
|
|
2087
2098
|
}
|
|
2088
2099
|
if (BUILD.method && BUILD.lazyLoad) hostRef.$onInstanceResolve$(elm);
|
|
2089
2100
|
if (BUILD.asyncLoading) {
|
|
2090
|
-
|
|
2091
|
-
hostRef.$onRenderResolve$();
|
|
2092
|
-
hostRef.$onRenderResolve$ = void 0;
|
|
2093
|
-
}
|
|
2101
|
+
resolveAncestorWait(hostRef);
|
|
2094
2102
|
if (hostRef.$flags$ & HOST_FLAGS.needsRerender) nextTick(() => scheduleUpdate(hostRef, false));
|
|
2095
2103
|
hostRef.$flags$ &= ~(HOST_FLAGS.isWaitingForChildren | HOST_FLAGS.needsRerender);
|
|
2096
2104
|
}
|
|
@@ -2099,7 +2107,10 @@ const forceUpdate = (ref) => {
|
|
|
2099
2107
|
if (BUILD.updatable && (Build.isBrowser || Build.isTesting)) {
|
|
2100
2108
|
const hostRef = getHostRef(ref);
|
|
2101
2109
|
const isConnected = hostRef?.$hostElement$?.isConnected;
|
|
2102
|
-
if (isConnected &&
|
|
2110
|
+
if (isConnected && hostRef.$flags$ & HOST_FLAGS.hasRendered) {
|
|
2111
|
+
hostRef.$flags$ |= HOST_FLAGS.isUpdateForced;
|
|
2112
|
+
if (!(hostRef.$flags$ & HOST_FLAGS.isQueuedForUpdate)) scheduleUpdate(hostRef, false);
|
|
2113
|
+
}
|
|
2103
2114
|
return isConnected;
|
|
2104
2115
|
}
|
|
2105
2116
|
return false;
|
|
@@ -2159,6 +2170,10 @@ const serverSideConnected = (elm) => {
|
|
|
2159
2170
|
}
|
|
2160
2171
|
};
|
|
2161
2172
|
//#endregion
|
|
2173
|
+
//#region src/runtime/signals-core.ts
|
|
2174
|
+
const getCore = () => globalThis[Symbol.for("stencil.preact-signals-core")] ??= SignalsCore;
|
|
2175
|
+
const effect = (fn, options) => getCore().effect(fn, options);
|
|
2176
|
+
//#endregion
|
|
2162
2177
|
//#region src/runtime/signals.ts
|
|
2163
2178
|
/**
|
|
2164
2179
|
* Duck-type check for Signal objects. Cross-bundle-safe (no instanceof).
|
|
@@ -2177,7 +2192,7 @@ const isSignalLike = (v) => v !== null && typeof v === "object" && typeof v.peek
|
|
|
2177
2192
|
* Modified for Stencil's compiler and vdom
|
|
2178
2193
|
*/
|
|
2179
2194
|
const h = (nodeName, vnodeData, ...children) => {
|
|
2180
|
-
if (typeof nodeName === "string") nodeName = transformTag(nodeName);
|
|
2195
|
+
if (typeof nodeName === "string" && nodeName.includes("-")) nodeName = transformTag(nodeName);
|
|
2181
2196
|
let child = null;
|
|
2182
2197
|
let key = null;
|
|
2183
2198
|
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 {
|
|
@@ -1133,6 +1151,11 @@ interface ComponentCompilerFeatures {
|
|
|
1133
1151
|
* - any lifecycle methods, including `render()`
|
|
1134
1152
|
*/
|
|
1135
1153
|
isPlain: boolean;
|
|
1154
|
+
/**
|
|
1155
|
+
* `true` for a CSS-only component: a `@component`-marked stylesheet with no backing JS
|
|
1156
|
+
* class. The element is never defined/upgraded, so it only has the attributes its CSS reads.
|
|
1157
|
+
*/
|
|
1158
|
+
isCssOnly: boolean;
|
|
1136
1159
|
/**
|
|
1137
1160
|
* A collection of tag names of web components that a component references in its JSX/h() function
|
|
1138
1161
|
*/
|
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.11";
|
|
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
|
*/
|
|
@@ -15683,6 +15726,7 @@ const parseStaticComponentMeta = (compilerCtx, typeChecker, cmpNode, moduleFile,
|
|
|
15683
15726
|
hasSignalsImport: false,
|
|
15684
15727
|
hasWatchCallback: false,
|
|
15685
15728
|
isPlain: false,
|
|
15729
|
+
isCssOnly: false,
|
|
15686
15730
|
htmlAttrNames: [],
|
|
15687
15731
|
htmlTagNames: [],
|
|
15688
15732
|
htmlParts: [],
|
|
@@ -16244,8 +16288,27 @@ const transpileModule = (config, input, transformOpts) => {
|
|
|
16244
16288
|
if (tsCompilerOptions.jsx != null && !isAutomaticRuntime && !isString$1(tsCompilerOptions.jsxFragmentFactory)) tsCompilerOptions.jsxFragmentFactory = "Fragment";
|
|
16245
16289
|
if (tsCompilerOptions.paths && !isString$1(tsCompilerOptions.baseUrl)) tsCompilerOptions.baseUrl = ".";
|
|
16246
16290
|
const sourceFile = ts$1.createSourceFile(sourceFilePath, input, tsCompilerOptions.target);
|
|
16247
|
-
const
|
|
16248
|
-
|
|
16291
|
+
const importedSources = /* @__PURE__ */ new Map();
|
|
16292
|
+
const resolveImport = input.includes("resolveVar(") ? transformOpts.resolveImport : void 0;
|
|
16293
|
+
const resolveViaCallback = (specifier, containingFile) => {
|
|
16294
|
+
let resolved = null;
|
|
16295
|
+
try {
|
|
16296
|
+
resolved = resolveImport(specifier, containingFile, { kind: "type-info" });
|
|
16297
|
+
} catch {}
|
|
16298
|
+
if (!resolved) return void 0;
|
|
16299
|
+
const extension = getResolvedExtension(resolved.path);
|
|
16300
|
+
if (!extension) return void 0;
|
|
16301
|
+
const resolvedFileName = normalizePath(resolved.path.split("?")[0]);
|
|
16302
|
+
if (resolvedFileName !== normalizePath(sourceFilePath) && !importedSources.has(resolvedFileName)) importedSources.set(resolvedFileName, ts$1.createSourceFile(resolvedFileName, resolved.code, tsCompilerOptions.target, true));
|
|
16303
|
+
return {
|
|
16304
|
+
resolvedFileName,
|
|
16305
|
+
extension,
|
|
16306
|
+
isExternalLibraryImport: false
|
|
16307
|
+
};
|
|
16308
|
+
};
|
|
16309
|
+
if (resolveImport) tsCompilerOptions.noResolve = false;
|
|
16310
|
+
const compilerHost = {
|
|
16311
|
+
getSourceFile: (fileName) => normalizePath(fileName) === normalizePath(sourceFilePath) ? sourceFile : importedSources.get(normalizePath(fileName)),
|
|
16249
16312
|
writeFile: (name, text) => {
|
|
16250
16313
|
if (name.endsWith(".js.map") || name.endsWith(".mjs.map")) results.map = text;
|
|
16251
16314
|
else if (name.endsWith(".js") || name.endsWith(".mjs")) results.code = text;
|
|
@@ -16255,11 +16318,13 @@ const transpileModule = (config, input, transformOpts) => {
|
|
|
16255
16318
|
getCanonicalFileName: (fileName) => fileName,
|
|
16256
16319
|
getCurrentDirectory: () => transformOpts.currentDirectory || (typeof process !== "undefined" ? process.cwd() : "/"),
|
|
16257
16320
|
getNewLine: () => ts$1.sys && ts$1.sys.newLine || "\n",
|
|
16258
|
-
fileExists: (fileName) => normalizePath(fileName) === normalizePath(sourceFilePath),
|
|
16321
|
+
fileExists: (fileName) => normalizePath(fileName) === normalizePath(sourceFilePath) || importedSources.has(normalizePath(fileName)),
|
|
16259
16322
|
readFile: () => "",
|
|
16260
16323
|
directoryExists: () => true,
|
|
16261
|
-
getDirectories: () => []
|
|
16262
|
-
|
|
16324
|
+
getDirectories: () => [],
|
|
16325
|
+
...resolveImport ? { resolveModuleNameLiterals: (moduleLiterals, containingFile) => moduleLiterals.map((literal) => ({ resolvedModule: resolveViaCallback(literal.text, containingFile) })) } : {}
|
|
16326
|
+
};
|
|
16327
|
+
const program = ts$1.createProgram([sourceFilePath], tsCompilerOptions, compilerHost);
|
|
16263
16328
|
const typeChecker = program.getTypeChecker();
|
|
16264
16329
|
const transformers = {
|
|
16265
16330
|
before: [
|
|
@@ -16276,18 +16341,36 @@ const transpileModule = (config, input, transformOpts) => {
|
|
|
16276
16341
|
}
|
|
16277
16342
|
if (transformOpts.componentExport === "customelement" || transformOpts.componentExport === "module") transformers.after.push(nativeComponentTransform(compilerCtx, transformOpts, buildCtx));
|
|
16278
16343
|
else transformers.after.push(lazyComponentTransform(compilerCtx, transformOpts, buildCtx));
|
|
16279
|
-
program.emit(
|
|
16344
|
+
program.emit(sourceFile, void 0, void 0, false, transformers);
|
|
16280
16345
|
if (transformOpts.buildOverrides && results.code) {
|
|
16281
16346
|
const mutations = Object.entries(transformOpts.buildOverrides).filter(([, v]) => v !== void 0).map(([k, v]) => `__stencilBUILD.${k}=${v};`).join("");
|
|
16282
16347
|
if (mutations) results.code = `import{BUILD as __stencilBUILD}from"${STENCIL_APP_DATA_ID}";\n${mutations}\n` + results.code;
|
|
16283
16348
|
}
|
|
16284
|
-
const tsDiagnostics = [...program.getSyntacticDiagnostics()];
|
|
16349
|
+
const tsDiagnostics = [...program.getSyntacticDiagnostics(sourceFile)];
|
|
16285
16350
|
if (config.validateTypes) tsDiagnostics.push(...program.getOptionsDiagnostics());
|
|
16286
16351
|
buildCtx.diagnostics.push(...loadTypeScriptDiagnostics(tsDiagnostics));
|
|
16287
16352
|
results.diagnostics.push(...buildCtx.diagnostics);
|
|
16288
16353
|
results.moduleFile = compilerCtx.moduleMap.get(results.sourceFilePath);
|
|
16289
16354
|
return results;
|
|
16290
16355
|
};
|
|
16356
|
+
/**
|
|
16357
|
+
* Maps a `resolveImport` result path to the TypeScript extension the program should parse it
|
|
16358
|
+
* as. Only TypeScript sources are taken - `noLib`/no `allowJs` means anything else would be
|
|
16359
|
+
* dropped by the program anyway, so it stays unresolved exactly as it did before.
|
|
16360
|
+
*
|
|
16361
|
+
* @param path the resolved path returned by the `resolveImport` callback
|
|
16362
|
+
* @returns the matching `ts.Extension`, or `undefined` if the file can't add type info
|
|
16363
|
+
*/
|
|
16364
|
+
const getResolvedExtension = (path) => {
|
|
16365
|
+
const bare = path.split("?")[0];
|
|
16366
|
+
if (bare.endsWith(".d.ts")) return ts$1.Extension.Dts;
|
|
16367
|
+
if (bare.endsWith(".d.mts")) return ts$1.Extension.Dmts;
|
|
16368
|
+
if (bare.endsWith(".d.cts")) return ts$1.Extension.Dcts;
|
|
16369
|
+
if (bare.endsWith(".tsx")) return ts$1.Extension.Tsx;
|
|
16370
|
+
if (bare.endsWith(".mts")) return ts$1.Extension.Mts;
|
|
16371
|
+
if (bare.endsWith(".cts")) return ts$1.Extension.Cts;
|
|
16372
|
+
if (bare.endsWith(".ts")) return ts$1.Extension.Ts;
|
|
16373
|
+
};
|
|
16291
16374
|
const getScriptTargetKind = (transformOpts) => {
|
|
16292
16375
|
const target = transformOpts.target && transformOpts.target.toUpperCase();
|
|
16293
16376
|
if (isNumber$1(ts$1.ScriptTarget[target])) return ts$1.ScriptTarget[target];
|
|
@@ -16864,8 +16947,8 @@ const generateComponentTypes = (cmp, typeImportData, areTypesInternal, signalBac
|
|
|
16864
16947
|
...eventAttributes,
|
|
16865
16948
|
...formAssociatedAttrs
|
|
16866
16949
|
], true, areTypesInternal);
|
|
16867
|
-
const elementInterface = hasMethodConflicts ? generateElementInterfaceWithConflictResolution(htmlElementName, tagNameAsPascal, conflictingMethods, htmlElementEventListenerProperties, cmp.docs) : generateStandardElementInterface(htmlElementName, tagNameAsPascal, htmlElementEventListenerProperties, cmp.docs);
|
|
16868
|
-
if (signalBacking && cmp.properties.length > 0) {
|
|
16950
|
+
const elementInterface = cmp.isCssOnly ? [addDocBlock(` interface ${htmlElementName} extends HTMLElement {`, cmp.docs, 4), ` }`] : hasMethodConflicts ? generateElementInterfaceWithConflictResolution(htmlElementName, tagNameAsPascal, conflictingMethods, htmlElementEventListenerProperties, cmp.docs) : generateStandardElementInterface(htmlElementName, tagNameAsPascal, htmlElementEventListenerProperties, cmp.docs);
|
|
16951
|
+
if (signalBacking && !cmp.isCssOnly && cmp.properties.length > 0) {
|
|
16869
16952
|
const signalsPropNames = (areTypesInternal ? cmp.properties : cmp.properties.filter((p) => !p.internal)).map((p) => `"${p.name}"`).join(" | ");
|
|
16870
16953
|
if (signalsPropNames) elementInterface.splice(-1, 0, ` readonly [STENCIL_SIGNALS_SYMBOL]?: ReadonlyMap<${signalsPropNames}, ReadonlySignal<unknown>>;`);
|
|
16871
16954
|
}
|
|
@@ -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-BDAZsQzV.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-DlA2VsX7.mjs";
|
|
2
|
+
import { a as LOG_LEVELS, i as CustomElementsExportBehaviorOptions } from "../node-BR2GYgzY.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-BDAZsQzV.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-k8xQHE77.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-GfBzquhJ.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-Cj2D3x_h.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 };
|