@stencil/core 4.22.2 → 4.22.3
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 +4 -4
- 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/index.js +18 -14
- package/internal/client/package.json +1 -1
- package/internal/client/patch-browser.js +1 -1
- package/internal/hydrate/index.js +18 -14
- package/internal/hydrate/package.json +1 -1
- package/internal/hydrate/runner.js +4 -1
- package/internal/package.json +1 -1
- package/internal/testing/index.js +17 -13
- package/internal/testing/package.json +1 -1
- package/mock-doc/index.cjs +4 -1
- package/mock-doc/index.js +4 -1
- 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/index.js +12 -12
- package/sys/node/package.json +1 -1
- package/sys/node/worker.js +1 -1
- package/testing/index.js +1 -1
- package/testing/package.json +1 -1
|
@@ -1680,7 +1680,7 @@ var updateElementScopeIds = (element, parent, iterateChildNodes = false) => {
|
|
|
1680
1680
|
if (element && parent && element.nodeType === 1 /* ElementNode */) {
|
|
1681
1681
|
const scopeIds = new Set(findScopeIds(parent).filter(Boolean));
|
|
1682
1682
|
if (scopeIds.size) {
|
|
1683
|
-
(_a = element.classList) == null ? void 0 : _a.add(...element["s-scs"] =
|
|
1683
|
+
(_a = element.classList) == null ? void 0 : _a.add(...element["s-scs"] = Array.from(scopeIds));
|
|
1684
1684
|
if (element["s-ol"] || iterateChildNodes) {
|
|
1685
1685
|
for (const childNode of Array.from(element.childNodes)) {
|
|
1686
1686
|
updateElementScopeIds(childNode, element, true);
|
|
@@ -2166,24 +2166,24 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
2166
2166
|
var _a, _b;
|
|
2167
2167
|
const prototype = Cstr.prototype;
|
|
2168
2168
|
if (import_app_data13.BUILD.formAssociated && cmpMeta.$flags$ & 64 /* formAssociated */ && flags & 1 /* isElementConstructor */) {
|
|
2169
|
-
FORM_ASSOCIATED_CUSTOM_ELEMENT_CALLBACKS.forEach(
|
|
2170
|
-
|
|
2169
|
+
FORM_ASSOCIATED_CUSTOM_ELEMENT_CALLBACKS.forEach((cbName) => {
|
|
2170
|
+
const originalFormAssociatedCallback = prototype[cbName];
|
|
2171
|
+
Object.defineProperty(prototype, cbName, {
|
|
2171
2172
|
value(...args) {
|
|
2172
2173
|
const hostRef = getHostRef(this);
|
|
2173
|
-
const
|
|
2174
|
-
const instance = import_app_data13.BUILD.lazyLoad ? hostRef.$lazyInstance$ : elm;
|
|
2174
|
+
const instance = import_app_data13.BUILD.lazyLoad ? hostRef.$lazyInstance$ : this;
|
|
2175
2175
|
if (!instance) {
|
|
2176
|
-
hostRef.$onReadyPromise$.then((
|
|
2177
|
-
const cb =
|
|
2178
|
-
typeof cb === "function" && cb.call(
|
|
2176
|
+
hostRef.$onReadyPromise$.then((asyncInstance) => {
|
|
2177
|
+
const cb = asyncInstance[cbName];
|
|
2178
|
+
typeof cb === "function" && cb.call(asyncInstance, ...args);
|
|
2179
2179
|
});
|
|
2180
2180
|
} else {
|
|
2181
|
-
const cb = instance[cbName];
|
|
2181
|
+
const cb = import_app_data13.BUILD.lazyLoad ? instance[cbName] : originalFormAssociatedCallback;
|
|
2182
2182
|
typeof cb === "function" && cb.call(instance, ...args);
|
|
2183
2183
|
}
|
|
2184
2184
|
}
|
|
2185
|
-
})
|
|
2186
|
-
);
|
|
2185
|
+
});
|
|
2186
|
+
});
|
|
2187
2187
|
}
|
|
2188
2188
|
if (import_app_data13.BUILD.member && cmpMeta.$members$ || import_app_data13.BUILD.watchCallback && (cmpMeta.$watchers$ || Cstr.watchers)) {
|
|
2189
2189
|
if (import_app_data13.BUILD.watchCallback && Cstr.watchers && !cmpMeta.$watchers$) {
|
|
@@ -2830,13 +2830,17 @@ var proxyCustomElement = (Cstr, compactMeta) => {
|
|
|
2830
2830
|
}
|
|
2831
2831
|
const originalConnectedCallback = Cstr.prototype.connectedCallback;
|
|
2832
2832
|
const originalDisconnectedCallback = Cstr.prototype.disconnectedCallback;
|
|
2833
|
+
let hasHostListenerAttached = false;
|
|
2833
2834
|
Object.assign(Cstr.prototype, {
|
|
2834
2835
|
__registerHost() {
|
|
2835
2836
|
registerHost(this, cmpMeta);
|
|
2836
2837
|
},
|
|
2837
2838
|
connectedCallback() {
|
|
2838
|
-
|
|
2839
|
-
|
|
2839
|
+
if (!hasHostListenerAttached) {
|
|
2840
|
+
const hostRef = getHostRef(this);
|
|
2841
|
+
addHostEventListeners(this, hostRef, cmpMeta.$listeners$, false);
|
|
2842
|
+
hasHostListenerAttached = true;
|
|
2843
|
+
}
|
|
2840
2844
|
connectedCallback(this);
|
|
2841
2845
|
if (import_app_data18.BUILD.connectedCallback && originalConnectedCallback) {
|
|
2842
2846
|
originalConnectedCallback.call(this);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stencil/core/internal/testing",
|
|
3
|
-
"version": "4.22.
|
|
3
|
+
"version": "4.22.3",
|
|
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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
Stencil Mock Doc (CommonJS) v4.22.
|
|
2
|
+
Stencil Mock Doc (CommonJS) v4.22.3 | MIT Licensed | https://stenciljs.com
|
|
3
3
|
*/
|
|
4
4
|
"use strict";
|
|
5
5
|
var __defProp = Object.defineProperty;
|
|
@@ -7844,6 +7844,9 @@ var MockAnchorElement = class extends MockHTMLElement {
|
|
|
7844
7844
|
this.setAttribute("href", value);
|
|
7845
7845
|
}
|
|
7846
7846
|
get pathname() {
|
|
7847
|
+
if (!this.href) {
|
|
7848
|
+
return "";
|
|
7849
|
+
}
|
|
7847
7850
|
return new URL(this.href).pathname;
|
|
7848
7851
|
}
|
|
7849
7852
|
};
|
package/mock-doc/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
Stencil Mock Doc v4.22.
|
|
2
|
+
Stencil Mock Doc v4.22.3 | MIT Licensed | https://stenciljs.com
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
// src/runtime/runtime-constants.ts
|
|
@@ -7791,6 +7791,9 @@ var MockAnchorElement = class extends MockHTMLElement {
|
|
|
7791
7791
|
this.setAttribute("href", value);
|
|
7792
7792
|
}
|
|
7793
7793
|
get pathname() {
|
|
7794
|
+
if (!this.href) {
|
|
7795
|
+
return "";
|
|
7796
|
+
}
|
|
7794
7797
|
return new URL(this.href).pathname;
|
|
7795
7798
|
}
|
|
7796
7799
|
};
|
package/mock-doc/package.json
CHANGED
package/package.json
CHANGED
package/screenshot/index.js
CHANGED
package/screenshot/package.json
CHANGED