@stencil/core 2.21.0 → 2.22.1
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 +2 -2
- package/cli/index.js +2 -2
- package/cli/package.json +1 -1
- package/compiler/package.json +1 -1
- package/compiler/stencil.js +26 -7
- package/compiler/stencil.min.js +2 -2
- package/dependencies.json +1 -1
- 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 +2 -2
- package/internal/app-data/package.json +1 -1
- package/internal/client/css-shim.js +1 -1
- package/internal/client/dom.js +1 -1
- package/internal/client/index.js +33 -2
- package/internal/client/package.json +1 -1
- package/internal/client/patch-browser.js +19 -1
- package/internal/client/patch-esm.js +1 -1
- package/internal/client/shadow-css.js +1 -1
- package/internal/hydrate/index.js +46 -35
- package/internal/hydrate/package.json +1 -1
- package/internal/package.json +1 -1
- package/internal/stencil-core/index.d.ts +1 -0
- package/internal/stencil-private.d.ts +10 -0
- package/internal/stencil-public-compiler.d.ts +1 -1
- package/internal/stencil-public-runtime.d.ts +9 -0
- package/internal/testing/index.js +51 -39
- 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/package.json +1 -1
- package/sys/node/autoprefixer.js +1 -1
- package/sys/node/index.js +1 -1
- package/sys/node/package.json +1 -1
- package/sys/node/worker.js +1 -1
- package/testing/index.js +35 -34
- package/testing/package.json +1 -1
package/sys/node/index.js
CHANGED
package/sys/node/package.json
CHANGED
package/sys/node/worker.js
CHANGED
package/testing/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
Stencil Testing v2.
|
|
2
|
+
Stencil Testing v2.22.1 | MIT Licensed | https://stenciljs.com
|
|
3
3
|
*/
|
|
4
4
|
function _lazyRequire(e) {
|
|
5
5
|
return new Proxy({}, {
|
|
@@ -2961,7 +2961,7 @@ const COMMON_DIR_MODULE_EXTS = [ ".tsx", ".ts", ".mjs", ".js", ".jsx", ".json",
|
|
|
2961
2961
|
d("/");
|
|
2962
2962
|
const C = {
|
|
2963
2963
|
name: "in-memory",
|
|
2964
|
-
version: "2.
|
|
2964
|
+
version: "2.22.1",
|
|
2965
2965
|
events: a,
|
|
2966
2966
|
access: async e => u(e),
|
|
2967
2967
|
accessSync: u,
|
|
@@ -3982,27 +3982,28 @@ exports.createJestPuppeteerEnvironment = function createJestPuppeteerEnvironment
|
|
|
3982
3982
|
}
|
|
3983
3983
|
return t;
|
|
3984
3984
|
}, exports.newSpecPage = async function newSpecPage(e) {
|
|
3985
|
+
var t;
|
|
3985
3986
|
if (null == e) throw new Error("NewSpecPageOptions required");
|
|
3986
|
-
testing.resetPlatform(
|
|
3987
|
-
e.
|
|
3988
|
-
testing.setSupportsShadowDom(!1)) : (e.includeAnnotations = !!e.includeAnnotations,
|
|
3987
|
+
testing.resetPlatform(null !== (t = e.platform) && void 0 !== t ? t : {}), resetBuildConditionals(appData.BUILD),
|
|
3988
|
+
Array.isArray(e.components) && testing.registerComponents(e.components), e.hydrateClientSide && (e.includeAnnotations = !0),
|
|
3989
|
+
e.hydrateServerSide ? (e.includeAnnotations = !0, testing.setSupportsShadowDom(!1)) : (e.includeAnnotations = !!e.includeAnnotations,
|
|
3989
3990
|
!1 === e.supportsShadowDom ? testing.setSupportsShadowDom(!1) : testing.setSupportsShadowDom(!0)),
|
|
3990
3991
|
appData.BUILD.cssAnnotations = e.includeAnnotations;
|
|
3991
|
-
const
|
|
3992
|
+
const r = new Set;
|
|
3992
3993
|
testing.win.__stencil_spec_options = e;
|
|
3993
|
-
const
|
|
3994
|
+
const s = testing.win.document, n = {
|
|
3994
3995
|
win: testing.win,
|
|
3995
|
-
doc:
|
|
3996
|
-
body:
|
|
3996
|
+
doc: s,
|
|
3997
|
+
body: s.body,
|
|
3997
3998
|
build: appData.BUILD,
|
|
3998
3999
|
styles: testing.styles,
|
|
3999
|
-
setContent: e => (
|
|
4000
|
+
setContent: e => (s.body.innerHTML = e, testing.flushAll()),
|
|
4000
4001
|
waitForChanges: testing.flushAll,
|
|
4001
4002
|
flushLoadModule: testing.flushLoadModule,
|
|
4002
4003
|
flushQueue: testing.flushQueue
|
|
4003
|
-
},
|
|
4004
|
+
}, o = e.components.map((e => {
|
|
4004
4005
|
if (null == e.COMPILER_META) throw new Error('Invalid component class: Missing static "COMPILER_META" property.');
|
|
4005
|
-
|
|
4006
|
+
r.add(e.COMPILER_META.tagName), e.isProxied = !1, function t(e) {
|
|
4006
4007
|
var t, r, s, n, o, i;
|
|
4007
4008
|
"function" == typeof (null === (t = e.prototype) || void 0 === t ? void 0 : t.__componentWillLoad) && (e.prototype.componentWillLoad = e.prototype.__componentWillLoad,
|
|
4008
4009
|
e.prototype.__componentWillLoad = null), "function" == typeof (null === (r = e.prototype) || void 0 === r ? void 0 : r.__componentWillUpdate) && (e.prototype.componentWillUpdate = e.prototype.__componentWillUpdate,
|
|
@@ -4040,7 +4041,7 @@ exports.createJestPuppeteerEnvironment = function createJestPuppeteerEnvironment
|
|
|
4040
4041
|
return trimFalsy([ r, e.tagName, Object.keys(s).length > 0 ? s : void 0, n.length > 0 ? n : void 0 ]);
|
|
4041
4042
|
})(e, !0))) ])(s, [ e.COMPILER_META ]);
|
|
4042
4043
|
return o;
|
|
4043
|
-
})),
|
|
4044
|
+
})), i = (e => {
|
|
4044
4045
|
const t = e.some((e => e.htmlTagNames.includes("slot"))), r = e.some((e => "shadow" === e.encapsulation)), s = e.some((e => "shadow" !== e.encapsulation && e.htmlTagNames.includes("slot"))), n = {
|
|
4045
4046
|
allRenderFn: e.every((e => e.hasRenderFn)),
|
|
4046
4047
|
cmpDidLoad: e.some((e => e.hasComponentDidLoadFn)),
|
|
@@ -4100,24 +4101,24 @@ exports.createJestPuppeteerEnvironment = function createJestPuppeteerEnvironment
|
|
|
4100
4101
|
return n.asyncLoading = n.cmpWillUpdate || n.cmpWillLoad || n.cmpWillRender, n.vdomAttribute = n.vdomAttribute || n.reflect,
|
|
4101
4102
|
n.vdomPropOrAttr = n.vdomPropOrAttr || n.reflect, n;
|
|
4102
4103
|
})(e.components.map((e => e.COMPILER_META)));
|
|
4103
|
-
if (e.strictBuild ? Object.assign(appData.BUILD,
|
|
4104
|
-
!0 ===
|
|
4104
|
+
if (e.strictBuild ? Object.assign(appData.BUILD, i) : Object.keys(i).forEach((e => {
|
|
4105
|
+
!0 === i[e] && (appData.BUILD[e] = !0);
|
|
4105
4106
|
})), appData.BUILD.asyncLoading = !0, e.hydrateClientSide ? (appData.BUILD.hydrateClientSide = !0,
|
|
4106
4107
|
appData.BUILD.hydrateServerSide = !1) : e.hydrateServerSide && (appData.BUILD.hydrateServerSide = !0,
|
|
4107
4108
|
appData.BUILD.hydrateClientSide = !1), appData.BUILD.cloneNodeFix = !1, appData.BUILD.shadowDomShim = !1,
|
|
4108
|
-
appData.BUILD.safari10 = !1, appData.BUILD.attachStyles = !!e.attachStyles, "string" == typeof e.url && (
|
|
4109
|
-
"string" == typeof e.direction &&
|
|
4110
|
-
"string" == typeof e.language &&
|
|
4109
|
+
appData.BUILD.safari10 = !1, appData.BUILD.attachStyles = !!e.attachStyles, "string" == typeof e.url && (n.win.location.href = e.url),
|
|
4110
|
+
"string" == typeof e.direction && n.doc.documentElement.setAttribute("dir", e.direction),
|
|
4111
|
+
"string" == typeof e.language && n.doc.documentElement.setAttribute("lang", e.language),
|
|
4111
4112
|
"string" == typeof e.cookie) try {
|
|
4112
|
-
|
|
4113
|
+
n.doc.cookie = e.cookie;
|
|
4113
4114
|
} catch (e) {}
|
|
4114
4115
|
if ("string" == typeof e.referrer) try {
|
|
4115
|
-
|
|
4116
|
+
n.doc.referrer = e.referrer;
|
|
4116
4117
|
} catch (e) {}
|
|
4117
4118
|
if ("string" == typeof e.userAgent) try {
|
|
4118
|
-
|
|
4119
|
+
n.win.navigator.userAgent = e.userAgent;
|
|
4119
4120
|
} catch (e) {}
|
|
4120
|
-
if (testing.bootstrapLazy(
|
|
4121
|
+
if (testing.bootstrapLazy(o), "function" == typeof e.template) {
|
|
4121
4122
|
const t = {
|
|
4122
4123
|
$ancestorComponent$: void 0,
|
|
4123
4124
|
$flags$: 0,
|
|
@@ -4126,26 +4127,26 @@ exports.createJestPuppeteerEnvironment = function createJestPuppeteerEnvironment
|
|
|
4126
4127
|
$flags$: 0,
|
|
4127
4128
|
$tagName$: "body"
|
|
4128
4129
|
},
|
|
4129
|
-
$hostElement$:
|
|
4130
|
+
$hostElement$: n.body
|
|
4130
4131
|
};
|
|
4131
4132
|
testing.renderVdom(t, e.template());
|
|
4132
|
-
} else "string" == typeof e.html && (
|
|
4133
|
-
!1 !== e.flushQueue && await
|
|
4134
|
-
let
|
|
4135
|
-
return Object.defineProperty(
|
|
4133
|
+
} else "string" == typeof e.html && (n.body.innerHTML = e.html);
|
|
4134
|
+
!1 !== e.flushQueue && await n.waitForChanges();
|
|
4135
|
+
let a = null;
|
|
4136
|
+
return Object.defineProperty(n, "root", {
|
|
4136
4137
|
get() {
|
|
4137
|
-
if (null ==
|
|
4138
|
-
const e =
|
|
4138
|
+
if (null == a && (a = findRootComponent(r, n.body)), null != a) return a;
|
|
4139
|
+
const e = n.body.firstElementChild;
|
|
4139
4140
|
return null != e ? e : null;
|
|
4140
4141
|
}
|
|
4141
|
-
}), Object.defineProperty(
|
|
4142
|
+
}), Object.defineProperty(n, "rootInstance", {
|
|
4142
4143
|
get() {
|
|
4143
|
-
const e = testing.getHostRef(
|
|
4144
|
+
const e = testing.getHostRef(n.root);
|
|
4144
4145
|
return null != e ? e.$lazyInstance$ : null;
|
|
4145
4146
|
}
|
|
4146
|
-
}), e.hydrateServerSide && testing.insertVdomAnnotations(
|
|
4147
|
-
|
|
4148
|
-
Promise.resolve())),
|
|
4147
|
+
}), e.hydrateServerSide && testing.insertVdomAnnotations(s, []), e.autoApplyChanges && (testing.startAutoApplyChanges(),
|
|
4148
|
+
n.waitForChanges = () => (console.error('waitForChanges() cannot be used manually if the "startAutoApplyChanges" option is enabled'),
|
|
4149
|
+
Promise.resolve())), n;
|
|
4149
4150
|
}, exports.shuffleArray = function shuffleArray(e) {
|
|
4150
4151
|
let t, r, s = e.length;
|
|
4151
4152
|
for (;0 !== s; ) r = Math.floor(Math.random() * s), s -= 1, t = e[s], e[s] = e[r],
|