@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
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
function queryNonceMetaTagContent(e) {
|
|
2
|
+
var t, o, n;
|
|
3
|
+
return null !== (n = null === (o = null === (t = e.head) || void 0 === t ? void 0 : t.querySelector('meta[name="csp-nonce"]')) || void 0 === o ? void 0 : o.getAttribute("content")) && void 0 !== n ? n : void 0;
|
|
4
|
+
}
|
|
5
|
+
|
|
1
6
|
function componentOnReady() {
|
|
2
7
|
return getHostRef(this).$onReadyPromise$;
|
|
3
8
|
}
|
|
@@ -316,26 +321,28 @@ const createTime = (e, t = "") => {
|
|
|
316
321
|
let n = styles.get(e);
|
|
317
322
|
n = t, styles.set(e, n);
|
|
318
323
|
}, addStyle = (e, t, o, n) => {
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
if (
|
|
324
|
+
var s;
|
|
325
|
+
let l = getScopeId(t, o);
|
|
326
|
+
const a = styles.get(l);
|
|
327
|
+
if (!BUILD.attachStyles) return l;
|
|
328
|
+
if (e = 11 === e.nodeType ? e : doc, a) if ("string" == typeof a) {
|
|
323
329
|
e = e.head || e;
|
|
324
|
-
let o,
|
|
325
|
-
if (
|
|
326
|
-
if (BUILD.hydrateClientSide && e.host && (o = e.querySelector(`[sty-id="${
|
|
330
|
+
let o, r = rootAppliedStyles.get(e);
|
|
331
|
+
if (r || rootAppliedStyles.set(e, r = new Set), !r.has(l)) {
|
|
332
|
+
if (BUILD.hydrateClientSide && e.host && (o = e.querySelector(`[sty-id="${l}"]`))) o.innerHTML = a; else {
|
|
327
333
|
if (BUILD.cssVarShim && plt.$cssShim$) {
|
|
328
|
-
o = plt.$cssShim$.createHostStyle(n,
|
|
334
|
+
o = plt.$cssShim$.createHostStyle(n, l, a, !!(10 & t.$flags$));
|
|
329
335
|
const e = o["s-sc"];
|
|
330
|
-
e && (
|
|
331
|
-
} else o = doc.createElement("style"), o.innerHTML =
|
|
332
|
-
(
|
|
336
|
+
e && (l = e, r = null);
|
|
337
|
+
} else o = doc.createElement("style"), o.innerHTML = a;
|
|
338
|
+
const i = null !== (s = plt.$nonce$) && void 0 !== s ? s : queryNonceMetaTagContent(doc);
|
|
339
|
+
null != i && o.setAttribute("nonce", i), (BUILD.hydrateServerSide || BUILD.hotModuleReplacement) && o.setAttribute("sty-id", l),
|
|
333
340
|
e.insertBefore(o, e.querySelector("link"));
|
|
334
341
|
}
|
|
335
|
-
|
|
342
|
+
r && r.add(l);
|
|
336
343
|
}
|
|
337
|
-
} else BUILD.constructableCSS && !e.adoptedStyleSheets.includes(
|
|
338
|
-
return
|
|
344
|
+
} else BUILD.constructableCSS && !e.adoptedStyleSheets.includes(a) && (e.adoptedStyleSheets = [ ...e.adoptedStyleSheets, a ]);
|
|
345
|
+
return l;
|
|
339
346
|
}, attachStyles = e => {
|
|
340
347
|
const t = e.$cmpMeta$, o = e.$hostElement$, n = t.$flags$, s = createTime("attachStyles", t.$tagName$), l = addStyle(BUILD.shadowDom && supportsShadow && o.shadowRoot ? o.shadowRoot : o.getRootNode(), t, e.$modeName$, o);
|
|
341
348
|
(BUILD.shadowDom || BUILD.scoped) && BUILD.cssAnnotations && 10 & n && (o["s-sc"] = l,
|
|
@@ -855,6 +862,7 @@ const callRender = (e, t, o) => {
|
|
|
855
862
|
for (;(e = e.nextSibling) && e["s-sn"] === t; ) o.push(e);
|
|
856
863
|
return o;
|
|
857
864
|
}, bootstrapLazy = (e, t = {}) => {
|
|
865
|
+
var o;
|
|
858
866
|
BUILD.profile && performance.mark && performance.mark("st:app:start"), (() => {
|
|
859
867
|
if (BUILD.devTools) {
|
|
860
868
|
const e = win.stencil = win.stencil || {}, t = e.inspect;
|
|
@@ -902,29 +910,29 @@ const callRender = (e, t, o) => {
|
|
|
902
910
|
};
|
|
903
911
|
}
|
|
904
912
|
})();
|
|
905
|
-
const
|
|
906
|
-
let
|
|
913
|
+
const n = createTime("bootstrapLazy"), s = [], l = t.exclude || [], a = win.customElements, r = doc.head, i = r.querySelector("meta[charset]"), d = doc.createElement("style"), c = [], $ = doc.querySelectorAll("[sty-id]");
|
|
914
|
+
let m, p = !0, h = 0;
|
|
907
915
|
if (Object.assign(plt, t), plt.$resourcesUrl$ = new URL(t.resourcesUrl || "./", doc.baseURI).href,
|
|
908
916
|
BUILD.asyncQueue && t.syncQueue && (plt.$flags$ |= 4), BUILD.hydrateClientSide && (plt.$flags$ |= 2),
|
|
909
|
-
BUILD.hydrateClientSide && BUILD.shadowDom) for (;
|
|
910
|
-
e.map((e => {
|
|
917
|
+
BUILD.hydrateClientSide && BUILD.shadowDom) for (;h < $.length; h++) registerStyle($[h].getAttribute("sty-id"), $[h].innerHTML.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g, "$1{"));
|
|
918
|
+
if (e.map((e => {
|
|
911
919
|
e[1].map((o => {
|
|
912
|
-
const
|
|
920
|
+
const n = {
|
|
913
921
|
$flags$: o[0],
|
|
914
922
|
$tagName$: o[1],
|
|
915
923
|
$members$: o[2],
|
|
916
924
|
$listeners$: o[3]
|
|
917
925
|
};
|
|
918
|
-
BUILD.member && (
|
|
919
|
-
BUILD.reflect && (
|
|
920
|
-
BUILD.shadowDom && !supportsShadow && 1 &
|
|
921
|
-
const r = BUILD.transformTagName && t.transformTagName ? t.transformTagName(
|
|
926
|
+
BUILD.member && (n.$members$ = o[2]), BUILD.hostListener && (n.$listeners$ = o[3]),
|
|
927
|
+
BUILD.reflect && (n.$attrsToReflect$ = []), BUILD.watchCallback && (n.$watchers$ = {}),
|
|
928
|
+
BUILD.shadowDom && !supportsShadow && 1 & n.$flags$ && (n.$flags$ |= 8);
|
|
929
|
+
const r = BUILD.transformTagName && t.transformTagName ? t.transformTagName(n.$tagName$) : n.$tagName$, i = class extends HTMLElement {
|
|
922
930
|
constructor(e) {
|
|
923
|
-
super(e), registerHost(e = this,
|
|
924
|
-
BUILD.slotChildNodesFix && patchChildSlotNodes(e,
|
|
931
|
+
super(e), registerHost(e = this, n), BUILD.shadowDom && 1 & n.$flags$ && (BUILD.hydrateServerSide || "shadowRoot" in e || (e.shadowRoot = e)),
|
|
932
|
+
BUILD.slotChildNodesFix && patchChildSlotNodes(e, n);
|
|
925
933
|
}
|
|
926
934
|
connectedCallback() {
|
|
927
|
-
|
|
935
|
+
m && (clearTimeout(m), m = null), p ? c.push(this) : plt.jmp((() => connectedCallback(this)));
|
|
928
936
|
}
|
|
929
937
|
disconnectedCallback() {
|
|
930
938
|
plt.jmp((() => disconnectedCallback(this)));
|
|
@@ -940,14 +948,17 @@ const callRender = (e, t, o) => {
|
|
|
940
948
|
n.$flags$ = 1, e["s-hmr-load"] = () => {
|
|
941
949
|
delete e["s-hmr-load"];
|
|
942
950
|
}, initializeComponent(e, n, t);
|
|
943
|
-
})(this,
|
|
944
|
-
}), BUILD.scopedSlotTextContentFix && patchTextContent(i.prototype,
|
|
945
|
-
|
|
951
|
+
})(this, n);
|
|
952
|
+
}), BUILD.scopedSlotTextContentFix && patchTextContent(i.prototype, n), n.$lazyBundleId$ = e[0],
|
|
953
|
+
l.includes(r) || a.get(r) || (s.push(r), a.define(r, proxyComponent(i, n, 1)));
|
|
946
954
|
}));
|
|
947
|
-
})), BUILD.invisiblePrehydration && (BUILD.hydratedClass || BUILD.hydratedAttribute)
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
955
|
+
})), BUILD.invisiblePrehydration && (BUILD.hydratedClass || BUILD.hydratedAttribute)) {
|
|
956
|
+
d.innerHTML = s + "{visibility:hidden}.hydrated{visibility:inherit}", d.setAttribute("data-styles", "");
|
|
957
|
+
const e = null !== (o = plt.$nonce$) && void 0 !== o ? o : queryNonceMetaTagContent(doc);
|
|
958
|
+
null != e && d.setAttribute("nonce", e), r.insertBefore(d, i ? i.nextSibling : r.firstChild);
|
|
959
|
+
}
|
|
960
|
+
p = !1, c.length ? c.map((e => e.connectedCallback())) : BUILD.profile ? plt.jmp((() => m = setTimeout(appDidLoad, 30, "timeout"))) : plt.jmp((() => m = setTimeout(appDidLoad, 30))),
|
|
961
|
+
n();
|
|
951
962
|
}, getConnect = (e, t) => {
|
|
952
963
|
const o = () => {
|
|
953
964
|
let e = doc.querySelector(t);
|
|
@@ -975,7 +986,7 @@ const callRender = (e, t, o) => {
|
|
|
975
986
|
} catch (e) {
|
|
976
987
|
consoleError(e);
|
|
977
988
|
}
|
|
978
|
-
}, getHostListenerTarget = (e, t) => BUILD.hostListenerTargetDocument && 4 & t ? doc : BUILD.hostListenerTargetWindow && 8 & t ? win : BUILD.hostListenerTargetBody && 16 & t ? doc.body : BUILD.hostListenerTargetParent && 32 & t ? e.parentElement : e, hostListenerOpts = e => 0 != (2 & e), insertVdomAnnotations = (e, t) => {
|
|
989
|
+
}, getHostListenerTarget = (e, t) => BUILD.hostListenerTargetDocument && 4 & t ? doc : BUILD.hostListenerTargetWindow && 8 & t ? win : BUILD.hostListenerTargetBody && 16 & t ? doc.body : BUILD.hostListenerTargetParent && 32 & t ? e.parentElement : e, hostListenerOpts = e => 0 != (2 & e), setNonce = e => plt.$nonce$ = e, insertVdomAnnotations = (e, t) => {
|
|
979
990
|
if (null != e) {
|
|
980
991
|
const o = {
|
|
981
992
|
hostIds: 0,
|
|
@@ -1129,4 +1140,4 @@ const cmpModules = new Map, getModule = e => {
|
|
|
1129
1140
|
isTesting: !1
|
|
1130
1141
|
}, styles = new Map, modeResolutionChain = [];
|
|
1131
1142
|
|
|
1132
|
-
export { Build, Context, Fragment, Host, addHostEventListeners, bootstrapLazy, cmpModules, connectedCallback, consoleDevError, consoleDevInfo, consoleDevWarn, consoleError, createEvent, defineCustomElement, disconnectedCallback, doc, forceModeUpdate, forceUpdate$1 as forceUpdate, getAssetPath, getConnect, getContext, getElement, getHostRef, getMode, getRenderingRef, getValue, hAsync as h, hydrateApp, insertVdomAnnotations, isMemberInElement, loadModule, modeResolutionChain, nextTick, parsePropertyValue, plt, postUpdateComponent, proxyComponent, proxyCustomElement, readTask, registerComponents, registerHost, registerInstance, renderVdom, setAssetPath, setErrorHandler, setMode, setPlatformHelpers, setValue, styles, supportsConstructableStylesheets, supportsListenerOptions, supportsShadow, win, writeTask };
|
|
1143
|
+
export { Build, Context, Fragment, Host, addHostEventListeners, bootstrapLazy, cmpModules, connectedCallback, consoleDevError, consoleDevInfo, consoleDevWarn, consoleError, createEvent, defineCustomElement, disconnectedCallback, doc, forceModeUpdate, forceUpdate$1 as forceUpdate, getAssetPath, getConnect, getContext, getElement, getHostRef, getMode, getRenderingRef, getValue, hAsync as h, hydrateApp, insertVdomAnnotations, isMemberInElement, loadModule, modeResolutionChain, nextTick, parsePropertyValue, plt, postUpdateComponent, proxyComponent, proxyCustomElement, readTask, registerComponents, registerHost, registerInstance, renderVdom, setAssetPath, setErrorHandler, setMode, setNonce, setPlatformHelpers, setValue, styles, supportsConstructableStylesheets, supportsListenerOptions, supportsShadow, win, writeTask };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stencil/core/internal/hydrate",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.22.1",
|
|
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
|
@@ -1445,6 +1445,11 @@ export interface PlatformRuntime {
|
|
|
1445
1445
|
$flags$: number;
|
|
1446
1446
|
$orgLocNodes$?: Map<string, RenderNode>;
|
|
1447
1447
|
$resourcesUrl$: string;
|
|
1448
|
+
/**
|
|
1449
|
+
* The nonce value to be applied to all script/style tags at runtime.
|
|
1450
|
+
* If `null`, the nonce attribute will not be applied.
|
|
1451
|
+
*/
|
|
1452
|
+
$nonce$?: string | null;
|
|
1448
1453
|
jmp: (c: Function) => any;
|
|
1449
1454
|
raf: (c: FrameRequestCallback) => number;
|
|
1450
1455
|
ael: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
|
|
@@ -2071,6 +2076,11 @@ export interface NewSpecPageOptions {
|
|
|
2071
2076
|
*/
|
|
2072
2077
|
attachStyles?: boolean;
|
|
2073
2078
|
strictBuild?: boolean;
|
|
2079
|
+
/**
|
|
2080
|
+
* Default values to be set on the platform runtime object (@see PlatformRuntime) when creating
|
|
2081
|
+
* the spec page.
|
|
2082
|
+
*/
|
|
2083
|
+
platform?: Partial<PlatformRuntime>;
|
|
2074
2084
|
}
|
|
2075
2085
|
/**
|
|
2076
2086
|
* A record of `TypesMemberNameData` entities.
|
|
@@ -1659,7 +1659,7 @@ export interface EmulateViewport {
|
|
|
1659
1659
|
* in this array without good reason!
|
|
1660
1660
|
*/
|
|
1661
1661
|
export declare const LOG_LEVELS: readonly ["debug", "info", "warn", "error"];
|
|
1662
|
-
export type LogLevel = typeof LOG_LEVELS[number];
|
|
1662
|
+
export type LogLevel = (typeof LOG_LEVELS)[number];
|
|
1663
1663
|
/**
|
|
1664
1664
|
* Common logger to be used by the compiler, dev-server and CLI. The CLI will use a
|
|
1665
1665
|
* NodeJS based console logging and colors, and the web will use browser based
|
|
@@ -257,6 +257,15 @@ export declare function getAssetPath(path: string): string;
|
|
|
257
257
|
* @returns the set path
|
|
258
258
|
*/
|
|
259
259
|
export declare function setAssetPath(path: string): string;
|
|
260
|
+
/**
|
|
261
|
+
* Used to specify a nonce value that corresponds with an application's
|
|
262
|
+
* [Content Security Policy (CSP)](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP).
|
|
263
|
+
* When set, the nonce will be added to all dynamically created script and style tags at runtime.
|
|
264
|
+
* Alternatively, the nonce value can be set on a `meta` tag in the DOM head
|
|
265
|
+
* (<meta name="csp-nonce" content="{ nonce value here }" />) and will result in the same behavior.
|
|
266
|
+
* @param nonce The value to be used for the nonce attribute.
|
|
267
|
+
*/
|
|
268
|
+
export declare function setNonce(nonce: string): void;
|
|
260
269
|
/**
|
|
261
270
|
* Retrieve a Stencil element for a given reference
|
|
262
271
|
* @param ref the ref to get the Stencil element for
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
function queryNonceMetaTagContent(e) {
|
|
2
|
+
var t, a, o;
|
|
3
|
+
return null !== (o = null === (a = null === (t = e.head) || void 0 === t ? void 0 : t.querySelector('meta[name="csp-nonce"]')) || void 0 === a ? void 0 : a.getAttribute("content")) && void 0 !== o ? o : void 0;
|
|
4
|
+
}
|
|
5
|
+
|
|
1
6
|
function writeTask(e) {
|
|
2
7
|
queuedWriteTasks.push(e);
|
|
3
8
|
}
|
|
@@ -213,26 +218,28 @@ const createTime = (e, t = "") => {
|
|
|
213
218
|
let o = styles.get(e);
|
|
214
219
|
o = t, styles.set(e, o);
|
|
215
220
|
}, addStyle = (e, t, a, o) => {
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
if (
|
|
221
|
+
var s;
|
|
222
|
+
let n = getScopeId(t, a);
|
|
223
|
+
const l = styles.get(n);
|
|
224
|
+
if (!appData.BUILD.attachStyles) return n;
|
|
225
|
+
if (e = 11 === e.nodeType ? e : doc, l) if ("string" == typeof l) {
|
|
220
226
|
e = e.head || e;
|
|
221
|
-
let a,
|
|
222
|
-
if (
|
|
223
|
-
if (appData.BUILD.hydrateClientSide && e.host && (a = e.querySelector(`[sty-id="${
|
|
227
|
+
let a, r = rootAppliedStyles.get(e);
|
|
228
|
+
if (r || rootAppliedStyles.set(e, r = new Set), !r.has(n)) {
|
|
229
|
+
if (appData.BUILD.hydrateClientSide && e.host && (a = e.querySelector(`[sty-id="${n}"]`))) a.innerHTML = l; else {
|
|
224
230
|
if (appData.BUILD.cssVarShim && plt.$cssShim$) {
|
|
225
|
-
a = plt.$cssShim$.createHostStyle(o,
|
|
231
|
+
a = plt.$cssShim$.createHostStyle(o, n, l, !!(10 & t.$flags$));
|
|
226
232
|
const e = a["s-sc"];
|
|
227
|
-
e && (
|
|
228
|
-
} else a = doc.createElement("style"), a.innerHTML =
|
|
229
|
-
(
|
|
233
|
+
e && (n = e, r = null);
|
|
234
|
+
} else a = doc.createElement("style"), a.innerHTML = l;
|
|
235
|
+
const p = null !== (s = plt.$nonce$) && void 0 !== s ? s : queryNonceMetaTagContent(doc);
|
|
236
|
+
null != p && a.setAttribute("nonce", p), (appData.BUILD.hydrateServerSide || appData.BUILD.hotModuleReplacement) && a.setAttribute("sty-id", n),
|
|
230
237
|
e.insertBefore(a, e.querySelector("link"));
|
|
231
238
|
}
|
|
232
|
-
|
|
239
|
+
r && r.add(n);
|
|
233
240
|
}
|
|
234
|
-
} else appData.BUILD.constructableCSS && !e.adoptedStyleSheets.includes(
|
|
235
|
-
return
|
|
241
|
+
} else appData.BUILD.constructableCSS && !e.adoptedStyleSheets.includes(l) && (e.adoptedStyleSheets = [ ...e.adoptedStyleSheets, l ]);
|
|
242
|
+
return n;
|
|
236
243
|
}, attachStyles = e => {
|
|
237
244
|
const t = e.$cmpMeta$, a = e.$hostElement$, o = t.$flags$, s = createTime("attachStyles", t.$tagName$), n = addStyle(appData.BUILD.shadowDom && exports.supportsShadow && a.shadowRoot ? a.shadowRoot : a.getRootNode(), t, e.$modeName$, a);
|
|
238
245
|
(appData.BUILD.shadowDom || appData.BUILD.scoped) && appData.BUILD.cssAnnotations && 10 & o && (a["s-sc"] = n,
|
|
@@ -884,6 +891,7 @@ Object.defineProperty(exports, "Env", {
|
|
|
884
891
|
isTesting: !0
|
|
885
892
|
}, exports.Context = Context, exports.Fragment = (e, t) => t, exports.Host = Host,
|
|
886
893
|
exports.addHostEventListeners = addHostEventListeners, exports.bootstrapLazy = (e, t = {}) => {
|
|
894
|
+
var a;
|
|
887
895
|
appData.BUILD.profile && performance.mark && performance.mark("st:app:start"), (() => {
|
|
888
896
|
if (appData.BUILD.devTools) {
|
|
889
897
|
const e = win.stencil = win.stencil || {}, t = e.inspect;
|
|
@@ -931,34 +939,34 @@ exports.addHostEventListeners = addHostEventListeners, exports.bootstrapLazy = (
|
|
|
931
939
|
};
|
|
932
940
|
}
|
|
933
941
|
})();
|
|
934
|
-
const
|
|
935
|
-
let
|
|
942
|
+
const o = createTime("bootstrapLazy"), s = [], n = t.exclude || [], l = win.customElements, r = doc.head, p = r.querySelector("meta[charset]"), i = doc.createElement("style"), d = [], c = doc.querySelectorAll("[sty-id]");
|
|
943
|
+
let $, u = !0, m = 0;
|
|
936
944
|
if (Object.assign(plt, t), plt.$resourcesUrl$ = new URL(t.resourcesUrl || "./", doc.baseURI).href,
|
|
937
945
|
appData.BUILD.asyncQueue && t.syncQueue && (plt.$flags$ |= 4), appData.BUILD.hydrateClientSide && (plt.$flags$ |= 2),
|
|
938
|
-
appData.BUILD.hydrateClientSide && appData.BUILD.shadowDom) for (;
|
|
939
|
-
e.map((e => {
|
|
946
|
+
appData.BUILD.hydrateClientSide && appData.BUILD.shadowDom) for (;m < c.length; m++) registerStyle(c[m].getAttribute("sty-id"), c[m].innerHTML.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g, "$1{"));
|
|
947
|
+
if (e.map((e => {
|
|
940
948
|
e[1].map((a => {
|
|
941
|
-
const
|
|
949
|
+
const o = {
|
|
942
950
|
$flags$: a[0],
|
|
943
951
|
$tagName$: a[1],
|
|
944
952
|
$members$: a[2],
|
|
945
953
|
$listeners$: a[3]
|
|
946
954
|
};
|
|
947
|
-
appData.BUILD.member && (
|
|
948
|
-
appData.BUILD.reflect && (
|
|
949
|
-
appData.BUILD.shadowDom && !exports.supportsShadow && 1 &
|
|
950
|
-
const r = appData.BUILD.transformTagName && t.transformTagName ? t.transformTagName(
|
|
955
|
+
appData.BUILD.member && (o.$members$ = a[2]), appData.BUILD.hostListener && (o.$listeners$ = a[3]),
|
|
956
|
+
appData.BUILD.reflect && (o.$attrsToReflect$ = []), appData.BUILD.watchCallback && (o.$watchers$ = {}),
|
|
957
|
+
appData.BUILD.shadowDom && !exports.supportsShadow && 1 & o.$flags$ && (o.$flags$ |= 8);
|
|
958
|
+
const r = appData.BUILD.transformTagName && t.transformTagName ? t.transformTagName(o.$tagName$) : o.$tagName$, p = class extends HTMLElement {
|
|
951
959
|
constructor(e) {
|
|
952
|
-
super(e), registerHost(e = this,
|
|
960
|
+
super(e), registerHost(e = this, o), appData.BUILD.shadowDom && 1 & o.$flags$ && (exports.supportsShadow ? appData.BUILD.shadowDelegatesFocus ? e.attachShadow({
|
|
953
961
|
mode: "open",
|
|
954
|
-
delegatesFocus: !!(16 &
|
|
962
|
+
delegatesFocus: !!(16 & o.$flags$)
|
|
955
963
|
}) : e.attachShadow({
|
|
956
964
|
mode: "open"
|
|
957
965
|
}) : appData.BUILD.hydrateServerSide || "shadowRoot" in e || (e.shadowRoot = e)),
|
|
958
|
-
appData.BUILD.slotChildNodesFix && patchChildSlotNodes(e,
|
|
966
|
+
appData.BUILD.slotChildNodesFix && patchChildSlotNodes(e, o);
|
|
959
967
|
}
|
|
960
968
|
connectedCallback() {
|
|
961
|
-
|
|
969
|
+
$ && (clearTimeout($), $ = null), u ? d.push(this) : plt.jmp((() => connectedCallback(this)));
|
|
962
970
|
}
|
|
963
971
|
disconnectedCallback() {
|
|
964
972
|
plt.jmp((() => disconnectedCallback(this)));
|
|
@@ -974,14 +982,17 @@ exports.addHostEventListeners = addHostEventListeners, exports.bootstrapLazy = (
|
|
|
974
982
|
o.$flags$ = 1, e["s-hmr-load"] = () => {
|
|
975
983
|
delete e["s-hmr-load"];
|
|
976
984
|
}, initializeComponent(e, o, t);
|
|
977
|
-
})(this,
|
|
978
|
-
}), appData.BUILD.scopedSlotTextContentFix && patchTextContent(p.prototype,
|
|
979
|
-
|
|
985
|
+
})(this, o);
|
|
986
|
+
}), appData.BUILD.scopedSlotTextContentFix && patchTextContent(p.prototype, o),
|
|
987
|
+
o.$lazyBundleId$ = e[0], n.includes(r) || l.get(r) || (s.push(r), l.define(r, proxyComponent(p, o, 1)));
|
|
980
988
|
}));
|
|
981
|
-
})), appData.BUILD.invisiblePrehydration && (appData.BUILD.hydratedClass || appData.BUILD.hydratedAttribute)
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
989
|
+
})), appData.BUILD.invisiblePrehydration && (appData.BUILD.hydratedClass || appData.BUILD.hydratedAttribute)) {
|
|
990
|
+
i.innerHTML = s + "{visibility:hidden}.hydrated{visibility:inherit}", i.setAttribute("data-styles", "");
|
|
991
|
+
const e = null !== (a = plt.$nonce$) && void 0 !== a ? a : queryNonceMetaTagContent(doc);
|
|
992
|
+
null != e && i.setAttribute("nonce", e), r.insertBefore(i, p ? p.nextSibling : r.firstChild);
|
|
993
|
+
}
|
|
994
|
+
u = !1, d.length ? d.map((e => e.connectedCallback())) : appData.BUILD.profile ? plt.jmp((() => $ = setTimeout(appDidLoad, 30, "timeout"))) : plt.jmp((() => $ = setTimeout(appDidLoad, 30))),
|
|
995
|
+
o();
|
|
985
996
|
}, exports.connectedCallback = connectedCallback, exports.consoleDevError = consoleDevError,
|
|
986
997
|
exports.consoleDevInfo = (...e) => {}, exports.consoleDevWarn = consoleDevWarn,
|
|
987
998
|
exports.consoleError = consoleError, exports.createEvent = (e, t, a) => {
|
|
@@ -1069,16 +1080,17 @@ exports.readTask = readTask, exports.registerComponents = e => {
|
|
|
1069
1080
|
return t.$lazyInstance$ = e, hostRefs.set(e, t);
|
|
1070
1081
|
}, exports.registerModule = function registerModule(e, t) {
|
|
1071
1082
|
moduleLoaded.set(e, t);
|
|
1072
|
-
}, exports.renderVdom = renderVdom, exports.resetPlatform = function resetPlatform() {
|
|
1083
|
+
}, exports.renderVdom = renderVdom, exports.resetPlatform = function resetPlatform(e = {}) {
|
|
1073
1084
|
win && "function" == typeof win.close && win.close(), hostRefs.clear(), styles.clear(),
|
|
1074
|
-
plt.$flags$ = 0, Object.keys(Context).forEach((e => delete Context[e])),
|
|
1075
|
-
plt.$orgLocNodes$
|
|
1076
|
-
function
|
|
1085
|
+
plt.$flags$ = 0, Object.keys(Context).forEach((e => delete Context[e])), Object.assign(plt, e),
|
|
1086
|
+
null != plt.$orgLocNodes$ && (plt.$orgLocNodes$.clear(), plt.$orgLocNodes$ = void 0),
|
|
1087
|
+
win.location.href = plt.$resourcesUrl$ = "http://testing.stenciljs.com/", function t() {
|
|
1077
1088
|
queuedTicks.length = 0, queuedWriteTasks.length = 0, queuedReadTasks.length = 0,
|
|
1078
1089
|
moduleLoaded.clear(), queuedLoadModules.length = 0, caughtErrors.length = 0;
|
|
1079
1090
|
}(), stopAutoApplyChanges(), cstrs.clear();
|
|
1080
1091
|
}, exports.setAssetPath = e => plt.$resourcesUrl$ = e, exports.setErrorHandler = e => customError = e,
|
|
1081
|
-
exports.setMode = e => modeResolutionChain.push(e), exports.
|
|
1092
|
+
exports.setMode = e => modeResolutionChain.push(e), exports.setNonce = e => plt.$nonce$ = e,
|
|
1093
|
+
exports.setPlatformHelpers = e => {
|
|
1082
1094
|
Object.assign(plt, e);
|
|
1083
1095
|
}, exports.setPlatformOptions = e => Object.assign(plt, e), exports.setSupportsShadowDom = e => {
|
|
1084
1096
|
exports.supportsShadow = e;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stencil/core/internal/testing",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.22.1",
|
|
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": "2.
|
|
3
|
+
"version": "2.22.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "./internal/stencil-core/index.cjs",
|
|
6
6
|
"module": "./internal/stencil-core/index.js",
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"eslint-config-prettier": "^8.5.0",
|
|
92
92
|
"eslint-plugin-jest": "^27.0.4",
|
|
93
93
|
"eslint-plugin-jsdoc": "^39.3.1",
|
|
94
|
-
"eslint-plugin-simple-import-sort": "^
|
|
94
|
+
"eslint-plugin-simple-import-sort": "^9.0.0",
|
|
95
95
|
"execa": "4.1.0",
|
|
96
96
|
"exit": "^0.1.2",
|
|
97
97
|
"fs-extra": "^11.0.0",
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
"path-browserify": "^1.0.1",
|
|
115
115
|
"pixelmatch": "5.3.0",
|
|
116
116
|
"postcss": "^8.2.8",
|
|
117
|
-
"prettier": "2.8.
|
|
117
|
+
"prettier": "2.8.3",
|
|
118
118
|
"prompts": "2.4.2",
|
|
119
119
|
"puppeteer": "~10.0.0",
|
|
120
120
|
"rollup": "2.42.3",
|