@stencil/core 4.18.1 → 4.18.2-dev.1716241403.fb9ef91
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/cli/index.cjs +1 -1
- package/cli/index.js +1 -1
- package/cli/package.json +1 -1
- package/compiler/package.json +1 -1
- package/compiler/stencil.js +836 -670
- package/dev-server/client/index.js +1 -1
- package/dev-server/client/package.json +1 -1
- package/dev-server/connector.html +2 -2
- package/dev-server/index.js +1 -1
- package/dev-server/package.json +1 -1
- package/dev-server/server-process.js +52 -40
- package/internal/app-data/package.json +1 -1
- package/internal/client/index.js +23 -9
- package/internal/client/package.json +1 -1
- package/internal/client/patch-browser.js +1 -1
- package/internal/hydrate/index.js +23 -9
- package/internal/hydrate/package.json +1 -1
- package/internal/hydrate/runner.js +1 -1
- package/internal/package.json +1 -1
- package/internal/stencil-private.d.ts +1 -0
- package/internal/stencil-public-runtime.d.ts +2 -8
- package/internal/testing/index.js +22 -8
- package/internal/testing/package.json +1 -1
- package/mock-doc/index.cjs +1 -1
- package/mock-doc/index.js +1 -1
- package/mock-doc/package.json +1 -1
- package/package.json +3 -3
- package/screenshot/index.js +1 -1
- package/screenshot/package.json +1 -1
- package/screenshot/pixel-match.js +1 -1
- package/sys/node/autoprefixer.js +2 -2
- package/sys/node/glob.js +1 -1
- package/sys/node/index.js +1 -1
- package/sys/node/node-fetch.js +10 -2
- package/sys/node/package.json +1 -1
- package/sys/node/worker.js +1 -1
- package/testing/index.js +21 -3
- package/testing/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Stencil Hydrate Platform v4.18.
|
|
2
|
+
Stencil Hydrate Platform v4.18.2-dev.1716241403.fb9ef91 | MIT Licensed | https://stenciljs.com
|
|
3
3
|
*/
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
5
5
|
var __export = (target, all) => {
|
|
@@ -1405,6 +1405,11 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
1405
1405
|
const elm = hostRef.$hostElement$;
|
|
1406
1406
|
const endSchedule = createTime("scheduleUpdate", hostRef.$cmpMeta$.$tagName$);
|
|
1407
1407
|
const instance = BUILD11.lazyLoad ? hostRef.$lazyInstance$ : elm;
|
|
1408
|
+
if (!instance) {
|
|
1409
|
+
throw new Error(
|
|
1410
|
+
`Can't render component <${elm.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`
|
|
1411
|
+
);
|
|
1412
|
+
}
|
|
1408
1413
|
let maybePromise;
|
|
1409
1414
|
if (isInitialLoad) {
|
|
1410
1415
|
if (BUILD11.lazyLoad && BUILD11.hostListener) {
|
|
@@ -1635,7 +1640,10 @@ var emitLifecycleEvent = (elm, lifecycleName) => {
|
|
|
1635
1640
|
});
|
|
1636
1641
|
}
|
|
1637
1642
|
};
|
|
1638
|
-
var addHydratedFlag = (elm) =>
|
|
1643
|
+
var addHydratedFlag = (elm) => {
|
|
1644
|
+
var _a, _b;
|
|
1645
|
+
return BUILD11.hydratedClass ? elm.classList.add((_a = BUILD11.hydratedSelectorName) != null ? _a : "hydrated") : BUILD11.hydratedAttribute ? elm.setAttribute((_b = BUILD11.hydratedSelectorName) != null ? _b : "hydrated", "") : void 0;
|
|
1646
|
+
};
|
|
1639
1647
|
var serverSideConnected = (elm) => {
|
|
1640
1648
|
const children = elm.children;
|
|
1641
1649
|
if (children != null) {
|
|
@@ -1839,16 +1847,18 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1839
1847
|
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1840
1848
|
const bundleId = cmpMeta.$lazyBundleId$;
|
|
1841
1849
|
if ((BUILD14.lazyLoad || BUILD14.hydrateClientSide) && bundleId) {
|
|
1842
|
-
|
|
1843
|
-
if (
|
|
1850
|
+
const CstrImport = loadModule(cmpMeta, hostRef, hmrVersionId);
|
|
1851
|
+
if (CstrImport && "then" in CstrImport) {
|
|
1844
1852
|
const endLoad = uniqueTime(
|
|
1845
1853
|
`st:load:${cmpMeta.$tagName$}:${hostRef.$modeName$}`,
|
|
1846
1854
|
`[Stencil] Load module for <${cmpMeta.$tagName$}>`
|
|
1847
1855
|
);
|
|
1848
|
-
Cstr = await
|
|
1856
|
+
Cstr = await CstrImport;
|
|
1849
1857
|
endLoad();
|
|
1858
|
+
} else {
|
|
1859
|
+
Cstr = CstrImport;
|
|
1850
1860
|
}
|
|
1851
|
-
if (
|
|
1861
|
+
if (!Cstr) {
|
|
1852
1862
|
throw new Error(`Constructor for "${cmpMeta.$tagName$}#${hostRef.$modeName$}" was not found`);
|
|
1853
1863
|
}
|
|
1854
1864
|
if (BUILD14.member && !Cstr.isProxied) {
|
|
@@ -1877,12 +1887,16 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1877
1887
|
fireConnectedCallback(hostRef.$lazyInstance$);
|
|
1878
1888
|
} else {
|
|
1879
1889
|
Cstr = elm.constructor;
|
|
1880
|
-
|
|
1890
|
+
const cmpTag = elm.localName;
|
|
1891
|
+
customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
|
|
1881
1892
|
}
|
|
1882
|
-
if (BUILD14.style && Cstr.style) {
|
|
1893
|
+
if (BUILD14.style && Cstr && Cstr.style) {
|
|
1883
1894
|
let style = Cstr.style;
|
|
1884
1895
|
if (BUILD14.mode && typeof style !== "string") {
|
|
1885
|
-
|
|
1896
|
+
hostRef.$modeName$ = computeMode(elm);
|
|
1897
|
+
if (hostRef.$modeName$) {
|
|
1898
|
+
style = style[hostRef.$modeName$];
|
|
1899
|
+
}
|
|
1886
1900
|
if (BUILD14.hydrateServerSide && hostRef.$modeName$) {
|
|
1887
1901
|
elm.setAttribute("s-mode", hostRef.$modeName$);
|
|
1888
1902
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stencil/core/internal/hydrate",
|
|
3
|
-
"version": "4.18.
|
|
3
|
+
"version": "4.18.2-dev.1716241403.fb9ef91",
|
|
4
4
|
"description": "Stencil internal hydrate platform to be imported by the Stencil Compiler. Breaking changes can and will happen at any time.",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"private": true
|
package/internal/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stencil/core/internal",
|
|
3
|
-
"version": "4.18.
|
|
3
|
+
"version": "4.18.2-dev.1716241403.fb9ef91",
|
|
4
4
|
"description": "Stencil internals only to be imported by the Stencil Compiler. Breaking changes can and will happen at any time.",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"types": "./index.d.ts",
|
|
@@ -126,6 +126,7 @@ export interface BuildConditionals extends Partial<BuildFeatures> {
|
|
|
126
126
|
cloneNodeFix?: boolean;
|
|
127
127
|
hydratedAttribute?: boolean;
|
|
128
128
|
hydratedClass?: boolean;
|
|
129
|
+
hydratedSelectorName?: string;
|
|
129
130
|
initializeNextTick?: boolean;
|
|
130
131
|
scriptDataOpts?: boolean;
|
|
131
132
|
shadowDomShim?: boolean;
|
|
@@ -795,7 +795,6 @@ export declare namespace JSXBase {
|
|
|
795
795
|
cite?: string;
|
|
796
796
|
}
|
|
797
797
|
interface ButtonHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
798
|
-
autoFocus?: boolean;
|
|
799
798
|
disabled?: boolean;
|
|
800
799
|
form?: string;
|
|
801
800
|
formAction?: string;
|
|
@@ -922,8 +921,6 @@ export declare namespace JSXBase {
|
|
|
922
921
|
autocapitalize?: string;
|
|
923
922
|
autoComplete?: string;
|
|
924
923
|
autocomplete?: string;
|
|
925
|
-
autoFocus?: boolean;
|
|
926
|
-
autofocus?: boolean | string;
|
|
927
924
|
capture?: string;
|
|
928
925
|
checked?: boolean;
|
|
929
926
|
crossOrigin?: string;
|
|
@@ -980,8 +977,6 @@ export declare namespace JSXBase {
|
|
|
980
977
|
popoverTarget?: string;
|
|
981
978
|
}
|
|
982
979
|
interface KeygenHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
983
|
-
autoFocus?: boolean;
|
|
984
|
-
autofocus?: boolean | string;
|
|
985
980
|
challenge?: string;
|
|
986
981
|
disabled?: boolean;
|
|
987
982
|
form?: string;
|
|
@@ -1130,7 +1125,6 @@ export declare namespace JSXBase {
|
|
|
1130
1125
|
type?: string;
|
|
1131
1126
|
}
|
|
1132
1127
|
interface SelectHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1133
|
-
autoFocus?: boolean;
|
|
1134
1128
|
disabled?: boolean;
|
|
1135
1129
|
form?: string;
|
|
1136
1130
|
multiple?: boolean;
|
|
@@ -1165,8 +1159,6 @@ export declare namespace JSXBase {
|
|
|
1165
1159
|
interface TextareaHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1166
1160
|
autoComplete?: string;
|
|
1167
1161
|
autocomplete?: string;
|
|
1168
|
-
autoFocus?: boolean;
|
|
1169
|
-
autofocus?: boolean | string;
|
|
1170
1162
|
cols?: number;
|
|
1171
1163
|
disabled?: boolean;
|
|
1172
1164
|
form?: string;
|
|
@@ -1219,6 +1211,8 @@ export declare namespace JSXBase {
|
|
|
1219
1211
|
interface HTMLAttributes<T = HTMLElement> extends DOMAttributes<T> {
|
|
1220
1212
|
innerHTML?: string;
|
|
1221
1213
|
accessKey?: string;
|
|
1214
|
+
autoFocus?: boolean;
|
|
1215
|
+
autofocus?: boolean | string;
|
|
1222
1216
|
class?: string | {
|
|
1223
1217
|
[className: string]: boolean;
|
|
1224
1218
|
};
|
|
@@ -1510,6 +1510,11 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
1510
1510
|
const elm = hostRef.$hostElement$;
|
|
1511
1511
|
const endSchedule = createTime("scheduleUpdate", hostRef.$cmpMeta$.$tagName$);
|
|
1512
1512
|
const instance = import_app_data11.BUILD.lazyLoad ? hostRef.$lazyInstance$ : elm;
|
|
1513
|
+
if (!instance) {
|
|
1514
|
+
throw new Error(
|
|
1515
|
+
`Can't render component <${elm.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`
|
|
1516
|
+
);
|
|
1517
|
+
}
|
|
1513
1518
|
let maybePromise;
|
|
1514
1519
|
if (isInitialLoad) {
|
|
1515
1520
|
if (import_app_data11.BUILD.lazyLoad && import_app_data11.BUILD.hostListener) {
|
|
@@ -1740,7 +1745,10 @@ var emitLifecycleEvent = (elm, lifecycleName) => {
|
|
|
1740
1745
|
});
|
|
1741
1746
|
}
|
|
1742
1747
|
};
|
|
1743
|
-
var addHydratedFlag = (elm) =>
|
|
1748
|
+
var addHydratedFlag = (elm) => {
|
|
1749
|
+
var _a, _b;
|
|
1750
|
+
return import_app_data11.BUILD.hydratedClass ? elm.classList.add((_a = import_app_data11.BUILD.hydratedSelectorName) != null ? _a : "hydrated") : import_app_data11.BUILD.hydratedAttribute ? elm.setAttribute((_b = import_app_data11.BUILD.hydratedSelectorName) != null ? _b : "hydrated", "") : void 0;
|
|
1751
|
+
};
|
|
1744
1752
|
var serverSideConnected = (elm) => {
|
|
1745
1753
|
const children = elm.children;
|
|
1746
1754
|
if (children != null) {
|
|
@@ -1944,16 +1952,18 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1944
1952
|
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1945
1953
|
const bundleId = cmpMeta.$lazyBundleId$;
|
|
1946
1954
|
if ((import_app_data14.BUILD.lazyLoad || import_app_data14.BUILD.hydrateClientSide) && bundleId) {
|
|
1947
|
-
|
|
1948
|
-
if (
|
|
1955
|
+
const CstrImport = loadModule(cmpMeta, hostRef, hmrVersionId);
|
|
1956
|
+
if (CstrImport && "then" in CstrImport) {
|
|
1949
1957
|
const endLoad = uniqueTime(
|
|
1950
1958
|
`st:load:${cmpMeta.$tagName$}:${hostRef.$modeName$}`,
|
|
1951
1959
|
`[Stencil] Load module for <${cmpMeta.$tagName$}>`
|
|
1952
1960
|
);
|
|
1953
|
-
Cstr = await
|
|
1961
|
+
Cstr = await CstrImport;
|
|
1954
1962
|
endLoad();
|
|
1963
|
+
} else {
|
|
1964
|
+
Cstr = CstrImport;
|
|
1955
1965
|
}
|
|
1956
|
-
if (
|
|
1966
|
+
if (!Cstr) {
|
|
1957
1967
|
throw new Error(`Constructor for "${cmpMeta.$tagName$}#${hostRef.$modeName$}" was not found`);
|
|
1958
1968
|
}
|
|
1959
1969
|
if (import_app_data14.BUILD.member && !Cstr.isProxied) {
|
|
@@ -1982,12 +1992,16 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1982
1992
|
fireConnectedCallback(hostRef.$lazyInstance$);
|
|
1983
1993
|
} else {
|
|
1984
1994
|
Cstr = elm.constructor;
|
|
1985
|
-
|
|
1995
|
+
const cmpTag = elm.localName;
|
|
1996
|
+
customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
|
|
1986
1997
|
}
|
|
1987
|
-
if (import_app_data14.BUILD.style && Cstr.style) {
|
|
1998
|
+
if (import_app_data14.BUILD.style && Cstr && Cstr.style) {
|
|
1988
1999
|
let style = Cstr.style;
|
|
1989
2000
|
if (import_app_data14.BUILD.mode && typeof style !== "string") {
|
|
1990
|
-
|
|
2001
|
+
hostRef.$modeName$ = computeMode(elm);
|
|
2002
|
+
if (hostRef.$modeName$) {
|
|
2003
|
+
style = style[hostRef.$modeName$];
|
|
2004
|
+
}
|
|
1991
2005
|
if (import_app_data14.BUILD.hydrateServerSide && hostRef.$modeName$) {
|
|
1992
2006
|
elm.setAttribute("s-mode", hostRef.$modeName$);
|
|
1993
2007
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stencil/core/internal/testing",
|
|
3
|
-
"version": "4.18.
|
|
3
|
+
"version": "4.18.2-dev.1716241403.fb9ef91",
|
|
4
4
|
"description": "Stencil internal testing platform to be imported by the Stencil Compiler. Breaking changes can and will happen at any time.",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"private": true
|
package/mock-doc/index.cjs
CHANGED
package/mock-doc/index.js
CHANGED
package/mock-doc/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stencil/core",
|
|
3
|
-
"version": "4.18.
|
|
3
|
+
"version": "4.18.2-dev.1716241403.fb9ef91",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "./internal/stencil-core/index.cjs",
|
|
6
6
|
"module": "./internal/stencil-core/index.js",
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
"execa": "8.0.1",
|
|
99
99
|
"exit": "^0.1.2",
|
|
100
100
|
"fs-extra": "^11.0.0",
|
|
101
|
-
"glob": "10.3.
|
|
101
|
+
"glob": "10.3.12",
|
|
102
102
|
"graceful-fs": "~4.2.6",
|
|
103
103
|
"jest": "^27.4.5",
|
|
104
104
|
"jest-cli": "^27.4.5",
|
|
@@ -113,13 +113,13 @@
|
|
|
113
113
|
"open": "^9.0.0",
|
|
114
114
|
"open-in-editor": "2.2.0",
|
|
115
115
|
"parse5": "7.1.2",
|
|
116
|
+
"path-scurry": "1.10.2",
|
|
116
117
|
"pixelmatch": "5.3.0",
|
|
117
118
|
"postcss": "^8.2.8",
|
|
118
119
|
"prettier": "3.2.4",
|
|
119
120
|
"prompts": "2.4.2",
|
|
120
121
|
"puppeteer": "^21.0.0",
|
|
121
122
|
"rollup": "2.56.3",
|
|
122
|
-
"rollup-plugin-sourcemaps": "^0.6.3",
|
|
123
123
|
"semver": "^7.3.7",
|
|
124
124
|
"terser": "5.31.0",
|
|
125
125
|
"typescript": "~5.4.0",
|
package/screenshot/index.js
CHANGED
package/screenshot/package.json
CHANGED