@stencil/core 4.42.0 → 4.42.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 +1 -1
- package/cli/index.js +1 -1
- package/cli/package.json +1 -1
- package/compiler/package.json +1 -1
- package/compiler/stencil.js +117 -20
- 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/app-globals/package.json +1 -1
- package/internal/client/index.js +201 -166
- package/internal/client/package.json +1 -1
- package/internal/client/patch-browser.js +1 -1
- package/internal/client/shadow-css.js +1 -1
- package/internal/hydrate/index.js +202 -167
- package/internal/hydrate/package.json +1 -1
- package/internal/hydrate/runner.js +56 -22
- package/internal/package.json +1 -1
- package/internal/stencil-core/index.d.ts +1 -0
- package/internal/stencil-private.d.ts +6 -0
- package/internal/stencil-public-runtime.d.ts +0 -4
- package/internal/testing/index.js +201 -166
- package/internal/testing/package.json +1 -1
- package/mock-doc/index.cjs +56 -22
- package/mock-doc/index.d.ts +10 -2
- package/mock-doc/index.js +56 -22
- package/mock-doc/package.json +1 -1
- package/package.json +1 -1
- package/screenshot/index.js +1 -1
- package/screenshot/package.json +1 -1
- package/screenshot/pixel-match.js +1 -1
- package/sys/node/460.node-fetch.js +3 -3
- package/sys/node/autoprefixer.js +2 -2
- package/sys/node/glob.js +1 -1
- package/sys/node/graceful-fs.js +1 -1
- package/sys/node/index.js +28 -28
- package/sys/node/node-fetch.js +4 -4
- package/sys/node/package.json +1 -1
- package/sys/node/prompts.js +1 -1
- package/sys/node/worker.js +1 -1
- package/testing/index.js +2 -1
- package/testing/package.json +1 -1
package/internal/client/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Stencil Client Platform v4.42.
|
|
2
|
+
Stencil Client Platform v4.42.1 | MIT Licensed | https://stenciljs.com
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
// src/client/client-build.ts
|
|
@@ -2150,7 +2150,7 @@ var scopeCss = (cssText, scopeId2, commentOriginalSelector) => {
|
|
|
2150
2150
|
});
|
|
2151
2151
|
}
|
|
2152
2152
|
scoped.slottedSelectors.forEach((slottedSelector) => {
|
|
2153
|
-
const regex = new RegExp(escapeRegExpSpecialCharacters(slottedSelector.orgSelector), "g");
|
|
2153
|
+
const regex = new RegExp(escapeRegExpSpecialCharacters(slottedSelector.orgSelector) + "(?=\\s*[,{]|$)", "g");
|
|
2154
2154
|
cssText = cssText.replace(regex, slottedSelector.updatedSelector);
|
|
2155
2155
|
});
|
|
2156
2156
|
cssText = expandPartSelectors(cssText);
|
|
@@ -2413,7 +2413,20 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
2413
2413
|
}
|
|
2414
2414
|
}
|
|
2415
2415
|
} else if (BUILD18.vdomPropOrAttr && memberName[0] === "a" && memberName.startsWith("attr:")) {
|
|
2416
|
-
const
|
|
2416
|
+
const propName = memberName.slice(5);
|
|
2417
|
+
let attrName;
|
|
2418
|
+
if (BUILD18.member) {
|
|
2419
|
+
const hostRef = getHostRef(elm);
|
|
2420
|
+
if (hostRef && hostRef.$cmpMeta$ && hostRef.$cmpMeta$.$members$) {
|
|
2421
|
+
const memberMeta = hostRef.$cmpMeta$.$members$[propName];
|
|
2422
|
+
if (memberMeta && memberMeta[1]) {
|
|
2423
|
+
attrName = memberMeta[1];
|
|
2424
|
+
}
|
|
2425
|
+
}
|
|
2426
|
+
}
|
|
2427
|
+
if (!attrName) {
|
|
2428
|
+
attrName = propName.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
2429
|
+
}
|
|
2417
2430
|
if (newValue == null || newValue === false) {
|
|
2418
2431
|
if (newValue !== false || elm.getAttribute(attrName) === "") {
|
|
2419
2432
|
elm.removeAttribute(attrName);
|
|
@@ -3269,7 +3282,7 @@ var updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
|
3269
3282
|
if (childrenPromises.length === 0) {
|
|
3270
3283
|
postUpdate();
|
|
3271
3284
|
} else {
|
|
3272
|
-
Promise.all(childrenPromises).then(postUpdate);
|
|
3285
|
+
Promise.all(childrenPromises).then(postUpdate).catch(postUpdate);
|
|
3273
3286
|
hostRef.$flags$ |= 4 /* isWaitingForChildren */;
|
|
3274
3287
|
childrenPromises.length = 0;
|
|
3275
3288
|
}
|
|
@@ -3530,13 +3543,16 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
3530
3543
|
});
|
|
3531
3544
|
}
|
|
3532
3545
|
}
|
|
3533
|
-
if (BUILD22.updatable &&
|
|
3546
|
+
if (BUILD22.updatable && flags & 2 /* hasRendered */) {
|
|
3534
3547
|
if (instance.componentShouldUpdate) {
|
|
3535
|
-
|
|
3548
|
+
const shouldUpdate = instance.componentShouldUpdate(newVal, oldVal, propName);
|
|
3549
|
+
if (shouldUpdate === false && !(flags & 16 /* isQueuedForUpdate */)) {
|
|
3536
3550
|
return;
|
|
3537
3551
|
}
|
|
3538
3552
|
}
|
|
3539
|
-
|
|
3553
|
+
if (!(flags & 16 /* isQueuedForUpdate */)) {
|
|
3554
|
+
scheduleUpdate(hostRef, false);
|
|
3555
|
+
}
|
|
3540
3556
|
}
|
|
3541
3557
|
}
|
|
3542
3558
|
};
|
|
@@ -3784,94 +3800,105 @@ More information: https://stenciljs.com/docs/properties#prop-mutability`
|
|
|
3784
3800
|
// src/runtime/initialize-component.ts
|
|
3785
3801
|
var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
3786
3802
|
let Cstr;
|
|
3787
|
-
|
|
3788
|
-
hostRef.$flags$
|
|
3789
|
-
|
|
3790
|
-
|
|
3791
|
-
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
|
|
3801
|
-
|
|
3802
|
-
|
|
3803
|
-
|
|
3804
|
-
|
|
3805
|
-
|
|
3803
|
+
try {
|
|
3804
|
+
if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
|
|
3805
|
+
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
3806
|
+
const bundleId = cmpMeta.$lazyBundleId$;
|
|
3807
|
+
if (BUILD24.lazyLoad && bundleId) {
|
|
3808
|
+
const CstrImport = loadModule(cmpMeta, hostRef, hmrVersionId);
|
|
3809
|
+
if (CstrImport && "then" in CstrImport) {
|
|
3810
|
+
const endLoad = uniqueTime(
|
|
3811
|
+
`st:load:${cmpMeta.$tagName$}:${hostRef.$modeName$}`,
|
|
3812
|
+
`[Stencil] Load module for <${cmpMeta.$tagName$}>`
|
|
3813
|
+
);
|
|
3814
|
+
Cstr = await CstrImport;
|
|
3815
|
+
endLoad();
|
|
3816
|
+
} else {
|
|
3817
|
+
Cstr = CstrImport;
|
|
3818
|
+
}
|
|
3819
|
+
if (!Cstr) {
|
|
3820
|
+
throw new Error(`Constructor for "${cmpMeta.$tagName$}#${hostRef.$modeName$}" was not found`);
|
|
3821
|
+
}
|
|
3822
|
+
if (BUILD24.member && !Cstr.isProxied) {
|
|
3823
|
+
if (BUILD24.propChangeCallback) {
|
|
3824
|
+
cmpMeta.$watchers$ = Cstr.watchers;
|
|
3825
|
+
cmpMeta.$serializers$ = Cstr.serializers;
|
|
3826
|
+
cmpMeta.$deserializers$ = Cstr.deserializers;
|
|
3827
|
+
}
|
|
3828
|
+
proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
|
|
3829
|
+
Cstr.isProxied = true;
|
|
3830
|
+
}
|
|
3831
|
+
const endNewInstance = createTime("createInstance", cmpMeta.$tagName$);
|
|
3832
|
+
if (BUILD24.member) {
|
|
3833
|
+
hostRef.$flags$ |= 8 /* isConstructingInstance */;
|
|
3834
|
+
}
|
|
3835
|
+
try {
|
|
3836
|
+
new Cstr(hostRef);
|
|
3837
|
+
} catch (e) {
|
|
3838
|
+
consoleError(e, elm);
|
|
3839
|
+
}
|
|
3840
|
+
if (BUILD24.member) {
|
|
3841
|
+
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
3842
|
+
}
|
|
3806
3843
|
if (BUILD24.propChangeCallback) {
|
|
3807
|
-
|
|
3808
|
-
cmpMeta.$serializers$ = Cstr.serializers;
|
|
3809
|
-
cmpMeta.$deserializers$ = Cstr.deserializers;
|
|
3844
|
+
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
3810
3845
|
}
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
}
|
|
3818
|
-
try {
|
|
3819
|
-
new Cstr(hostRef);
|
|
3820
|
-
} catch (e) {
|
|
3821
|
-
consoleError(e, elm);
|
|
3822
|
-
}
|
|
3823
|
-
if (BUILD24.member) {
|
|
3824
|
-
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
3825
|
-
}
|
|
3826
|
-
if (BUILD24.propChangeCallback) {
|
|
3827
|
-
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
3828
|
-
}
|
|
3829
|
-
endNewInstance();
|
|
3830
|
-
const needsDeferredCallback = BUILD24.slotRelocation && cmpMeta.$flags$ & 4 /* hasSlotRelocation */;
|
|
3831
|
-
if (!needsDeferredCallback) {
|
|
3832
|
-
fireConnectedCallback(hostRef.$lazyInstance$, elm);
|
|
3833
|
-
} else {
|
|
3834
|
-
hostRef.$deferredConnectedCallback$ = true;
|
|
3835
|
-
}
|
|
3836
|
-
} else {
|
|
3837
|
-
Cstr = elm.constructor;
|
|
3838
|
-
const cmpTag = elm.localName;
|
|
3839
|
-
customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
|
|
3840
|
-
}
|
|
3841
|
-
if (BUILD24.style && Cstr && Cstr.style) {
|
|
3842
|
-
let style;
|
|
3843
|
-
if (typeof Cstr.style === "string") {
|
|
3844
|
-
style = Cstr.style;
|
|
3845
|
-
} else if (BUILD24.mode && typeof Cstr.style !== "string") {
|
|
3846
|
-
hostRef.$modeName$ = computeMode(elm);
|
|
3847
|
-
if (hostRef.$modeName$) {
|
|
3848
|
-
style = Cstr.style[hostRef.$modeName$];
|
|
3846
|
+
endNewInstance();
|
|
3847
|
+
const needsDeferredCallback = BUILD24.slotRelocation && cmpMeta.$flags$ & 4 /* hasSlotRelocation */;
|
|
3848
|
+
if (!needsDeferredCallback) {
|
|
3849
|
+
fireConnectedCallback(hostRef.$lazyInstance$, elm);
|
|
3850
|
+
} else {
|
|
3851
|
+
hostRef.$deferredConnectedCallback$ = true;
|
|
3849
3852
|
}
|
|
3850
|
-
|
|
3851
|
-
|
|
3853
|
+
} else {
|
|
3854
|
+
Cstr = elm.constructor;
|
|
3855
|
+
const cmpTag = elm.localName;
|
|
3856
|
+
customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
|
|
3857
|
+
}
|
|
3858
|
+
if (BUILD24.style && Cstr && Cstr.style) {
|
|
3859
|
+
let style;
|
|
3860
|
+
if (typeof Cstr.style === "string") {
|
|
3861
|
+
style = Cstr.style;
|
|
3862
|
+
} else if (BUILD24.mode && typeof Cstr.style !== "string") {
|
|
3863
|
+
hostRef.$modeName$ = computeMode(elm);
|
|
3864
|
+
if (hostRef.$modeName$) {
|
|
3865
|
+
style = Cstr.style[hostRef.$modeName$];
|
|
3866
|
+
}
|
|
3867
|
+
if (BUILD24.hydrateServerSide && hostRef.$modeName$) {
|
|
3868
|
+
elm.setAttribute("s-mode", hostRef.$modeName$);
|
|
3869
|
+
}
|
|
3852
3870
|
}
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
|
|
3858
|
-
|
|
3859
|
-
|
|
3860
|
-
|
|
3861
|
-
|
|
3871
|
+
const scopeId2 = getScopeId(cmpMeta, hostRef.$modeName$);
|
|
3872
|
+
if (!styles.has(scopeId2) || BUILD24.hotModuleReplacement && hmrVersionId) {
|
|
3873
|
+
const endRegisterStyles = createTime("registerStyles", cmpMeta.$tagName$);
|
|
3874
|
+
if (BUILD24.hydrateServerSide && BUILD24.shadowDom) {
|
|
3875
|
+
if (cmpMeta.$flags$ & 128 /* shadowNeedsScopedCss */) {
|
|
3876
|
+
style = scopeCss(style, scopeId2, true);
|
|
3877
|
+
} else if (needsScopedSSR()) {
|
|
3878
|
+
style = expandPartSelectors(style);
|
|
3879
|
+
}
|
|
3862
3880
|
}
|
|
3881
|
+
registerStyle(scopeId2, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
|
|
3882
|
+
endRegisterStyles();
|
|
3863
3883
|
}
|
|
3864
|
-
registerStyle(scopeId2, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
|
|
3865
|
-
endRegisterStyles();
|
|
3866
3884
|
}
|
|
3867
3885
|
}
|
|
3868
|
-
|
|
3869
|
-
|
|
3870
|
-
|
|
3871
|
-
|
|
3872
|
-
|
|
3873
|
-
|
|
3874
|
-
|
|
3886
|
+
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
3887
|
+
const schedule = () => scheduleUpdate(hostRef, true);
|
|
3888
|
+
if (BUILD24.asyncLoading && ancestorComponent && ancestorComponent["s-rc"]) {
|
|
3889
|
+
ancestorComponent["s-rc"].push(schedule);
|
|
3890
|
+
} else {
|
|
3891
|
+
schedule();
|
|
3892
|
+
}
|
|
3893
|
+
} catch (e) {
|
|
3894
|
+
consoleError(e, elm);
|
|
3895
|
+
if (BUILD24.asyncLoading && hostRef.$onRenderResolve$) {
|
|
3896
|
+
hostRef.$onRenderResolve$();
|
|
3897
|
+
hostRef.$onRenderResolve$ = void 0;
|
|
3898
|
+
}
|
|
3899
|
+
if (BUILD24.asyncLoading && hostRef.$onReadyResolve$) {
|
|
3900
|
+
hostRef.$onReadyResolve$(elm);
|
|
3901
|
+
}
|
|
3875
3902
|
}
|
|
3876
3903
|
};
|
|
3877
3904
|
var fireConnectedCallback = (instance, elm) => {
|
|
@@ -4003,91 +4030,99 @@ var proxyCustomElement = (Cstr, compactMeta) => {
|
|
|
4003
4030
|
$flags$: compactMeta[0],
|
|
4004
4031
|
$tagName$: compactMeta[1]
|
|
4005
4032
|
};
|
|
4006
|
-
|
|
4007
|
-
|
|
4008
|
-
|
|
4009
|
-
if (BUILD27.hostListener) {
|
|
4010
|
-
cmpMeta.$listeners$ = compactMeta[3];
|
|
4011
|
-
}
|
|
4012
|
-
if (BUILD27.propChangeCallback) {
|
|
4013
|
-
cmpMeta.$watchers$ = Cstr.$watchers$;
|
|
4014
|
-
cmpMeta.$deserializers$ = Cstr.$deserializers$;
|
|
4015
|
-
cmpMeta.$serializers$ = Cstr.$serializers$;
|
|
4016
|
-
}
|
|
4017
|
-
if (BUILD27.reflect) {
|
|
4018
|
-
cmpMeta.$attrsToReflect$ = [];
|
|
4019
|
-
}
|
|
4020
|
-
if (BUILD27.shadowDom && !supportsShadow && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
4021
|
-
cmpMeta.$flags$ |= 8 /* needsShadowDomShim */;
|
|
4022
|
-
}
|
|
4023
|
-
if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) && cmpMeta.$flags$ & 256 /* hasSlot */) {
|
|
4024
|
-
if (BUILD27.experimentalSlotFixes) {
|
|
4025
|
-
patchPseudoShadowDom(Cstr.prototype);
|
|
4026
|
-
} else {
|
|
4027
|
-
if (BUILD27.slotChildNodesFix) {
|
|
4028
|
-
patchChildSlotNodes(Cstr.prototype);
|
|
4029
|
-
}
|
|
4030
|
-
if (BUILD27.cloneNodeFix) {
|
|
4031
|
-
patchCloneNode(Cstr.prototype);
|
|
4032
|
-
}
|
|
4033
|
-
if (BUILD27.appendChildSlotFix) {
|
|
4034
|
-
patchSlotAppendChild(Cstr.prototype);
|
|
4035
|
-
}
|
|
4036
|
-
if (BUILD27.scopedSlotTextContentFix && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
|
|
4037
|
-
patchTextContent(Cstr.prototype);
|
|
4038
|
-
}
|
|
4033
|
+
try {
|
|
4034
|
+
if (BUILD27.member) {
|
|
4035
|
+
cmpMeta.$members$ = compactMeta[2];
|
|
4039
4036
|
}
|
|
4040
|
-
|
|
4041
|
-
|
|
4042
|
-
|
|
4043
|
-
|
|
4044
|
-
|
|
4045
|
-
|
|
4046
|
-
|
|
4047
|
-
|
|
4048
|
-
|
|
4049
|
-
|
|
4050
|
-
|
|
4051
|
-
|
|
4052
|
-
|
|
4053
|
-
|
|
4054
|
-
|
|
4055
|
-
|
|
4056
|
-
|
|
4057
|
-
|
|
4037
|
+
if (BUILD27.hostListener) {
|
|
4038
|
+
cmpMeta.$listeners$ = compactMeta[3];
|
|
4039
|
+
}
|
|
4040
|
+
if (BUILD27.propChangeCallback) {
|
|
4041
|
+
cmpMeta.$watchers$ = Cstr.$watchers$;
|
|
4042
|
+
cmpMeta.$deserializers$ = Cstr.$deserializers$;
|
|
4043
|
+
cmpMeta.$serializers$ = Cstr.$serializers$;
|
|
4044
|
+
}
|
|
4045
|
+
if (BUILD27.reflect) {
|
|
4046
|
+
cmpMeta.$attrsToReflect$ = [];
|
|
4047
|
+
}
|
|
4048
|
+
if (BUILD27.shadowDom && !supportsShadow && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
4049
|
+
cmpMeta.$flags$ |= 8 /* needsShadowDomShim */;
|
|
4050
|
+
}
|
|
4051
|
+
if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) && cmpMeta.$flags$ & 256 /* hasSlot */) {
|
|
4052
|
+
if (BUILD27.experimentalSlotFixes) {
|
|
4053
|
+
patchPseudoShadowDom(Cstr.prototype);
|
|
4054
|
+
} else {
|
|
4055
|
+
if (BUILD27.slotChildNodesFix) {
|
|
4056
|
+
patchChildSlotNodes(Cstr.prototype);
|
|
4057
|
+
}
|
|
4058
|
+
if (BUILD27.cloneNodeFix) {
|
|
4059
|
+
patchCloneNode(Cstr.prototype);
|
|
4060
|
+
}
|
|
4061
|
+
if (BUILD27.appendChildSlotFix) {
|
|
4062
|
+
patchSlotAppendChild(Cstr.prototype);
|
|
4063
|
+
}
|
|
4064
|
+
if (BUILD27.scopedSlotTextContentFix && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
|
|
4065
|
+
patchTextContent(Cstr.prototype);
|
|
4058
4066
|
}
|
|
4059
|
-
addHostEventListeners(this, hostRef, cmpMeta.$listeners$, false);
|
|
4060
|
-
this.__hasHostListenerAttached = true;
|
|
4061
|
-
}
|
|
4062
|
-
connectedCallback(this);
|
|
4063
|
-
if (originalConnectedCallback) {
|
|
4064
|
-
originalConnectedCallback.call(this);
|
|
4065
|
-
}
|
|
4066
|
-
},
|
|
4067
|
-
disconnectedCallback() {
|
|
4068
|
-
disconnectedCallback(this);
|
|
4069
|
-
if (originalDisconnectedCallback) {
|
|
4070
|
-
originalDisconnectedCallback.call(this);
|
|
4071
4067
|
}
|
|
4072
|
-
}
|
|
4073
|
-
|
|
4074
|
-
|
|
4075
|
-
|
|
4076
|
-
|
|
4077
|
-
|
|
4078
|
-
|
|
4079
|
-
|
|
4080
|
-
|
|
4081
|
-
|
|
4068
|
+
} else if (BUILD27.cloneNodeFix) {
|
|
4069
|
+
patchCloneNode(Cstr.prototype);
|
|
4070
|
+
}
|
|
4071
|
+
if (BUILD27.hydrateClientSide && BUILD27.shadowDom) {
|
|
4072
|
+
hydrateScopedToShadow();
|
|
4073
|
+
}
|
|
4074
|
+
const originalConnectedCallback = Cstr.prototype.connectedCallback;
|
|
4075
|
+
const originalDisconnectedCallback = Cstr.prototype.disconnectedCallback;
|
|
4076
|
+
Object.assign(Cstr.prototype, {
|
|
4077
|
+
__hasHostListenerAttached: false,
|
|
4078
|
+
__registerHost() {
|
|
4079
|
+
registerHost(this, cmpMeta);
|
|
4080
|
+
},
|
|
4081
|
+
connectedCallback() {
|
|
4082
|
+
if (!this.__hasHostListenerAttached) {
|
|
4083
|
+
const hostRef = getHostRef(this);
|
|
4084
|
+
if (!hostRef) {
|
|
4085
|
+
return;
|
|
4082
4086
|
}
|
|
4087
|
+
addHostEventListeners(this, hostRef, cmpMeta.$listeners$, false);
|
|
4088
|
+
this.__hasHostListenerAttached = true;
|
|
4089
|
+
}
|
|
4090
|
+
connectedCallback(this);
|
|
4091
|
+
if (originalConnectedCallback) {
|
|
4092
|
+
originalConnectedCallback.call(this);
|
|
4093
|
+
}
|
|
4094
|
+
},
|
|
4095
|
+
disconnectedCallback() {
|
|
4096
|
+
disconnectedCallback(this);
|
|
4097
|
+
if (originalDisconnectedCallback) {
|
|
4098
|
+
originalDisconnectedCallback.call(this);
|
|
4099
|
+
}
|
|
4100
|
+
},
|
|
4101
|
+
__attachShadow() {
|
|
4102
|
+
if (supportsShadow) {
|
|
4103
|
+
if (!this.shadowRoot) {
|
|
4104
|
+
createShadowRoot.call(this, cmpMeta);
|
|
4105
|
+
} else {
|
|
4106
|
+
if (this.shadowRoot.mode !== "open") {
|
|
4107
|
+
throw new Error(
|
|
4108
|
+
`Unable to re-use existing shadow root for ${cmpMeta.$tagName$}! Mode is set to ${this.shadowRoot.mode} but Stencil only supports open shadow roots.`
|
|
4109
|
+
);
|
|
4110
|
+
}
|
|
4111
|
+
}
|
|
4112
|
+
} else {
|
|
4113
|
+
this.shadowRoot = this;
|
|
4083
4114
|
}
|
|
4084
|
-
} else {
|
|
4085
|
-
this.shadowRoot = this;
|
|
4086
4115
|
}
|
|
4087
|
-
}
|
|
4088
|
-
|
|
4089
|
-
|
|
4090
|
-
|
|
4116
|
+
});
|
|
4117
|
+
Object.defineProperty(Cstr, "is", {
|
|
4118
|
+
value: cmpMeta.$tagName$,
|
|
4119
|
+
configurable: true
|
|
4120
|
+
});
|
|
4121
|
+
return proxyComponent(Cstr, cmpMeta, 1 /* isElementConstructor */ | 2 /* proxyState */);
|
|
4122
|
+
} catch (e) {
|
|
4123
|
+
consoleError(e);
|
|
4124
|
+
return Cstr;
|
|
4125
|
+
}
|
|
4091
4126
|
};
|
|
4092
4127
|
var forceModeUpdate = (elm) => {
|
|
4093
4128
|
if (BUILD27.style && BUILD27.mode && !BUILD27.lazyLoad) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stencil/core/internal/client",
|
|
3
|
-
"version": "4.42.
|
|
3
|
+
"version": "4.42.1",
|
|
4
4
|
"description": "Stencil internal client platform to be imported by the Stencil Compiler and internal runtime. Breaking changes can and will happen at any time.",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"exports": "./index.js",
|
|
@@ -402,7 +402,7 @@ var scopeCss = (cssText, scopeId, commentOriginalSelector) => {
|
|
|
402
402
|
});
|
|
403
403
|
}
|
|
404
404
|
scoped.slottedSelectors.forEach((slottedSelector) => {
|
|
405
|
-
const regex = new RegExp(escapeRegExpSpecialCharacters(slottedSelector.orgSelector), "g");
|
|
405
|
+
const regex = new RegExp(escapeRegExpSpecialCharacters(slottedSelector.orgSelector) + "(?=\\s*[,{]|$)", "g");
|
|
406
406
|
cssText = cssText.replace(regex, slottedSelector.updatedSelector);
|
|
407
407
|
});
|
|
408
408
|
cssText = expandPartSelectors(cssText);
|