@stencil/core 5.0.0-beta.9 → 5.0.0-rc.0
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/app-data/index.d.ts +1 -1
- package/dist/app-data/index.js +1 -0
- package/dist/{client-BRu0GtRn.mjs → client-ClM4H9-P.mjs} +204 -76
- package/dist/compiler/browser.d.ts +120 -81
- package/dist/compiler/browser.js +964 -402
- package/dist/compiler/index.d.mts +110 -2
- package/dist/compiler/index.mjs +3 -3
- package/dist/compiler/utils/index.d.mts +2 -2
- package/dist/compiler/utils/index.mjs +3 -3
- package/dist/{compiler-wLrjuSOK.mjs → compiler-DFanjq9z.mjs} +5300 -3005
- package/dist/declarations/stencil-public-compiler.d.ts +178 -133
- package/dist/declarations/stencil-public-docs.d.ts +23 -0
- package/dist/declarations/stencil-public-runtime.d.ts +81 -59
- package/dist/{index-BvF31nqP.d.mts → index-DvfFOkiJ.d.mts} +220 -133
- package/dist/{index-BXAcVN2j.d.ts → index-XQHZl0MW.d.ts} +70 -57
- package/dist/{index-BAP9T4CB.d.mts → index-aBMJC5F9.d.mts} +6 -2
- package/dist/index.d.mts +3 -0
- package/dist/index.mjs +1 -1
- package/dist/jsx-runtime.d.mts +6 -0
- package/dist/jsx-runtime.mjs +1 -1
- package/dist/{node-75gQKkFz.mjs → node-DJP8JuAS.mjs} +42 -48
- package/dist/runtime/client/lazy.js +522 -262
- package/dist/runtime/client/runtime.d.ts +100 -68
- package/dist/runtime/client/runtime.js +522 -262
- package/dist/runtime/index.d.ts +6 -6
- package/dist/runtime/index.js +521 -261
- package/dist/runtime/server/index.d.mts +36 -12
- package/dist/runtime/server/index.mjs +635 -304
- package/dist/runtime/server/runner.d.mts +49 -6
- package/dist/runtime/server/runner.mjs +385 -87
- package/dist/signals/index.d.ts +11 -2
- package/dist/signals/index.js +15 -35
- 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 +152 -124
- package/dist/testing/index.mjs +535 -269
- package/dist/{util-IKfWWLJo.mjs → util-C-H1H84W.mjs} +8 -1
- package/dist/{validation-DAdGTrys.mjs → validation-ByYYKvnS.mjs} +37 -3
- package/package.json +8 -4
|
@@ -476,6 +476,13 @@ const isOutputTargetLoaderBundle = (o) => o.type === LOADER_BUNDLE;
|
|
|
476
476
|
const isOutputTargetStandalone = (o) => o.type === STANDALONE;
|
|
477
477
|
const isOutputTargetSsr = (o) => o.type === "ssr";
|
|
478
478
|
const isOutputTargetSsrWasm = (o) => o.type === SSR_WASM;
|
|
479
|
+
/**
|
|
480
|
+
* Whether an output target renders components on the server (`ssr` or `ssr-wasm`).
|
|
481
|
+
* When one is present, client builds must be able to hydrate server-rendered markup.
|
|
482
|
+
* @param o the output target to check
|
|
483
|
+
* @returns true if the output target server-renders components
|
|
484
|
+
*/
|
|
485
|
+
const isOutputTargetServerRenderer = (o) => isOutputTargetSsr(o) || isOutputTargetSsrWasm(o);
|
|
479
486
|
const isOutputTargetCollection = (o) => o.type === COLLECTION;
|
|
480
487
|
const isOutputTargetTypes = (o) => o.type === TYPES;
|
|
481
488
|
const isOutputTargetGlobalStyle = (o) => o.type === GLOBAL_STYLE;
|
|
@@ -721,4 +728,4 @@ const SKIP_DEPS = ["@stencil/core"];
|
|
|
721
728
|
*/
|
|
722
729
|
const readOnlyArrayHasStringMember = (readOnlyArray, maybeMember) => readOnlyArray.includes(maybeMember);
|
|
723
730
|
//#endregion
|
|
724
|
-
export {
|
|
731
|
+
export { buildWarn as $, isOutputTargetDocsVscode as A, isValidConfigOutputTarget as B, isOutputTargetDistLazy as C, isOutputTargetDocsCustomElementsManifest as D, isOutputTargetDocsCustom as E, isOutputTargetSsrWasm as F, normalizeFsPath as G, shouldExcludeComponent as H, isOutputTargetStandalone as I, relative$1 as J, normalizeFsPathQuery as K, isOutputTargetStats as L, isOutputTargetLoaderBundle as M, isOutputTargetServerRenderer as N, isOutputTargetDocsJson as O, isOutputTargetSsr as P, buildJsonFileError as Q, isOutputTargetTypes as R, isOutputTargetCustom as S, isOutputTargetDocsAgentSkill as T, join$1 as U, relativeImport as V, normalize as W, TASK_CANCELED_MSG as X, resolve$1 as Y, buildError as Z, getComponentsDtsTypesFilePath as _, hasDependency as a, isOutputTargetCollection as b, isJsxFile as c, parsePackageJson as d, catchError as et, readOnlyArrayHasStringMember as f, getComponentsDtsSrcFilePath as g, filterExcludedComponents as h, getTextDocs as i, isGlob as it, isOutputTargetGlobalStyle as j, isOutputTargetDocsReadme as k, isTsFile as l, filterActiveTargets as m, createJsVarName as n, hasWarning as nt, isDtsFile as o, readPackageJson as p, normalizePath as q, generatePreamble as r, shouldIgnoreError as rt, isJsFile as s, addDocBlock as t, hasError as tt, isTsxFile as u, getComponentsFromModules as v, isOutputTargetDocs as w, isOutputTargetCopy as x, isOutputTargetAssets as y, isOutputTargetWww as z };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-BhDjJH2R.mjs";
|
|
2
2
|
import { C as CMP_FLAGS, H as LISTENER_FLAGS, W as MEMBER_FLAGS, et as WATCH_FLAGS, f as isString, l as isIterable, y as toTitleCase } from "./helpers-Cpp3qc3u.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import { $ as buildWarn, J as relative$1, Y as resolve$1, q as normalizePath } from "./util-C-H1H84W.mjs";
|
|
4
|
+
import nodePath from "node:path";
|
|
4
5
|
//#region src/utils/regular-expression.ts
|
|
5
6
|
/**
|
|
6
7
|
* Utility function that will escape all regular expression special characters in a string.
|
|
@@ -66,7 +67,8 @@ const formatComponentRuntimeMeta = (compilerMeta, includeMethods) => {
|
|
|
66
67
|
hostListeners.length > 0 ? hostListeners : void 0,
|
|
67
68
|
Object.keys(watchers).length > 0 ? watchers : void 0,
|
|
68
69
|
Object.keys(serializers).length > 0 ? serializers : void 0,
|
|
69
|
-
Object.keys(deserializers).length > 0 ? deserializers : void 0
|
|
70
|
+
Object.keys(deserializers).length > 0 ? deserializers : void 0,
|
|
71
|
+
compilerMeta.encapsulation === "shadow" ? compilerMeta.shadowReferenceTarget : void 0
|
|
70
72
|
]);
|
|
71
73
|
};
|
|
72
74
|
const stringifyRuntimeData = (data) => {
|
|
@@ -712,6 +714,38 @@ const getInlineSourceMappingUrlLinker = (sourceMapContents) => {
|
|
|
712
714
|
const getSourceMappingUrlForEndOfFile = (url) => {
|
|
713
715
|
return `\n${getSourceMappingUrlLinker(url)}.map`;
|
|
714
716
|
};
|
|
717
|
+
/**
|
|
718
|
+
* Rolldown source map output options. Stencil appends its own `sourceMappingURL` comment, so the map
|
|
719
|
+
* is `hidden`. A chunk can be written to several directories, so `sources` are made absolute here
|
|
720
|
+
* (query strings stripped) and relative to each destination by {@link relativizeSourceMap}.
|
|
721
|
+
* Virtual modules have no file and keep their id.
|
|
722
|
+
*
|
|
723
|
+
* @param config the validated Stencil configuration
|
|
724
|
+
* @returns the source map options to spread into Rolldown's output options
|
|
725
|
+
*/
|
|
726
|
+
const getRolldownSourceMapOptions = (config) => ({
|
|
727
|
+
sourcemap: config.sourceMap ? "hidden" : false,
|
|
728
|
+
sourcemapPathTransform: (relativeSourcePath, sourcemapPath) => {
|
|
729
|
+
const absPath = resolve$1(nodePath.dirname(sourcemapPath), relativeSourcePath.split("?")[0]);
|
|
730
|
+
return config.sys.accessSync(absPath) ? absPath : relative$1(process.cwd(), absPath);
|
|
731
|
+
}
|
|
732
|
+
});
|
|
733
|
+
/**
|
|
734
|
+
* Makes a source map's absolute `sources` relative to where the map is written, and names the
|
|
735
|
+
* file it maps.
|
|
736
|
+
*
|
|
737
|
+
* @param sourceMap the source map, with absolute `sources` from {@link getRolldownSourceMapOptions}
|
|
738
|
+
* @param filePath the path the mapped `.js` file is written to
|
|
739
|
+
* @returns the source map to write next to `filePath`
|
|
740
|
+
*/
|
|
741
|
+
const relativizeSourceMap = (sourceMap, filePath) => {
|
|
742
|
+
const dir = nodePath.dirname(filePath);
|
|
743
|
+
return {
|
|
744
|
+
...sourceMap,
|
|
745
|
+
file: nodePath.basename(filePath),
|
|
746
|
+
sources: sourceMap.sources.map((source) => nodePath.isAbsolute(source) ? relative$1(dir, source) : normalizePath(source, false))
|
|
747
|
+
};
|
|
748
|
+
};
|
|
715
749
|
//#endregion
|
|
716
750
|
//#region src/utils/url-paths.ts
|
|
717
751
|
/**
|
|
@@ -788,4 +822,4 @@ const validateComponentTag = (tag) => {
|
|
|
788
822
|
if (tag.lastIndexOf("-") === tag.length - 1) return `"${tag}" tag cannot end with a dash (-)`;
|
|
789
823
|
};
|
|
790
824
|
//#endregion
|
|
791
|
-
export {
|
|
825
|
+
export { isRootPath as C, byteSize as D, stringifyRuntimeData as E, escapeRegExpSpecialCharacters as O, splitLineBreaks as S, formatLazyBundleRuntimeMeta as T, createOnWarnFn as _, getRolldownSourceMapOptions as a, escapeHtml as b, relativizeSourceMap as c, map as d, ok as f, loadTypeScriptDiagnostics as g, loadTypeScriptDiagnostic as h, getInlineSourceMappingUrlLinker as i, rolldownToStencilSourceMap as l, augmentDiagnosticWithNode as m, validateComponentTag as n, getSourceMappingUrlForEndOfFile as o, result_exports as p, isRemoteUrl as r, getSourceMappingUrlLinker as s, validateComponentModes as t, err as u, isRolldownError as v, formatComponentRuntimeMeta as w, normalizeDiagnostics as x, loadRolldownDiagnostics as y };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stencil/core",
|
|
3
|
-
"version": "5.0.0-
|
|
3
|
+
"version": "5.0.0-rc.0",
|
|
4
4
|
"description": "A Compiler for Web Components and Progressive Web Apps",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"components",
|
|
@@ -117,6 +117,7 @@
|
|
|
117
117
|
"magic-string": "^0.30.21",
|
|
118
118
|
"picomatch": "^4.0.5",
|
|
119
119
|
"postcss": "^8.5.26",
|
|
120
|
+
"postcss-nesting": "^14.0.1",
|
|
120
121
|
"postcss-safe-parser": "^7.0.1",
|
|
121
122
|
"postcss-selector-parser": "^7.1.5",
|
|
122
123
|
"resolve": "^1.22.12",
|
|
@@ -125,9 +126,9 @@
|
|
|
125
126
|
"terser": "^5.50.0",
|
|
126
127
|
"tinyglobby": "^0.2.17",
|
|
127
128
|
"typescript": ">5.0.0 <7.0.0",
|
|
128
|
-
"@stencil/cli": "5.0.0-
|
|
129
|
-
"@stencil/
|
|
130
|
-
"@stencil/
|
|
129
|
+
"@stencil/cli": "5.0.0-rc.0",
|
|
130
|
+
"@stencil/mock-doc": "5.0.0-rc.0",
|
|
131
|
+
"@stencil/dev-server": "5.0.0-rc.0"
|
|
131
132
|
},
|
|
132
133
|
"devDependencies": {
|
|
133
134
|
"@ionic/prettier-config": "^4.0.0",
|
|
@@ -137,6 +138,9 @@
|
|
|
137
138
|
"vitest": "^4.1.10",
|
|
138
139
|
"vitest-environment-stencil": "^1.14.0"
|
|
139
140
|
},
|
|
141
|
+
"engines": {
|
|
142
|
+
"node": ">=22.0.0"
|
|
143
|
+
},
|
|
140
144
|
"volta": {
|
|
141
145
|
"extends": "../../package.json"
|
|
142
146
|
},
|