@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/mock-doc/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
Stencil Mock Doc v4.42.
|
|
2
|
+
Stencil Mock Doc v4.42.1 | MIT Licensed | https://stenciljs.com
|
|
3
3
|
*/
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
5
5
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
@@ -7764,6 +7764,8 @@ function createElement(ownerDocument, tagName) {
|
|
|
7764
7764
|
return new MockImageElement(ownerDocument);
|
|
7765
7765
|
case "input":
|
|
7766
7766
|
return new MockInputElement(ownerDocument);
|
|
7767
|
+
case "label":
|
|
7768
|
+
return new MockLabelElement(ownerDocument);
|
|
7767
7769
|
case "link":
|
|
7768
7770
|
return new MockLinkElement(ownerDocument);
|
|
7769
7771
|
case "meta":
|
|
@@ -7842,6 +7844,9 @@ var MockButtonElement = class extends MockHTMLElement {
|
|
|
7842
7844
|
constructor(ownerDocument) {
|
|
7843
7845
|
super(ownerDocument, "button");
|
|
7844
7846
|
}
|
|
7847
|
+
get labels() {
|
|
7848
|
+
return getLabelsForElement(this);
|
|
7849
|
+
}
|
|
7845
7850
|
};
|
|
7846
7851
|
patchPropAttributes(
|
|
7847
7852
|
MockButtonElement.prototype,
|
|
@@ -7889,6 +7894,9 @@ var MockInputElement = class extends MockHTMLElement {
|
|
|
7889
7894
|
}
|
|
7890
7895
|
return null;
|
|
7891
7896
|
}
|
|
7897
|
+
get labels() {
|
|
7898
|
+
return getLabelsForElement(this);
|
|
7899
|
+
}
|
|
7892
7900
|
};
|
|
7893
7901
|
patchPropAttributes(
|
|
7894
7902
|
MockInputElement.prototype,
|
|
@@ -7937,6 +7945,26 @@ var MockFormElement = class extends MockHTMLElement {
|
|
|
7937
7945
|
patchPropAttributes(MockFormElement.prototype, {
|
|
7938
7946
|
name: String
|
|
7939
7947
|
});
|
|
7948
|
+
var MockLabelElement = class extends MockHTMLElement {
|
|
7949
|
+
constructor(ownerDocument) {
|
|
7950
|
+
super(ownerDocument, "label");
|
|
7951
|
+
}
|
|
7952
|
+
get htmlFor() {
|
|
7953
|
+
return this.getAttributeNS(null, "for") || "";
|
|
7954
|
+
}
|
|
7955
|
+
set htmlFor(value) {
|
|
7956
|
+
this.setAttributeNS(null, "for", value);
|
|
7957
|
+
}
|
|
7958
|
+
get control() {
|
|
7959
|
+
var _a, _b;
|
|
7960
|
+
const forAttr = this.htmlFor;
|
|
7961
|
+
if (forAttr) {
|
|
7962
|
+
return (_b = (_a = this.ownerDocument) == null ? void 0 : _a.getElementById(forAttr)) != null ? _b : null;
|
|
7963
|
+
}
|
|
7964
|
+
const labelableSelector = 'button, input:not([type="hidden"]), meter, output, progress, select, textarea';
|
|
7965
|
+
return this.querySelector(labelableSelector);
|
|
7966
|
+
}
|
|
7967
|
+
};
|
|
7940
7968
|
var MockLinkElement = class extends MockHTMLElement {
|
|
7941
7969
|
constructor(ownerDocument) {
|
|
7942
7970
|
super(ownerDocument, "link");
|
|
@@ -8347,6 +8375,30 @@ function fullUrl(elm, attrName) {
|
|
|
8347
8375
|
}
|
|
8348
8376
|
return val.replace(/\'|\"/g, "").trim();
|
|
8349
8377
|
}
|
|
8378
|
+
function getLabelsForElement(elm) {
|
|
8379
|
+
const labels = [];
|
|
8380
|
+
const id = elm.id;
|
|
8381
|
+
const doc = elm.ownerDocument;
|
|
8382
|
+
if (doc) {
|
|
8383
|
+
if (id) {
|
|
8384
|
+
const allLabels = doc.getElementsByTagName("label");
|
|
8385
|
+
for (let i = 0; i < allLabels.length; i++) {
|
|
8386
|
+
const label = allLabels[i];
|
|
8387
|
+
if (label.htmlFor === id) {
|
|
8388
|
+
labels.push(label);
|
|
8389
|
+
}
|
|
8390
|
+
}
|
|
8391
|
+
}
|
|
8392
|
+
let parent = elm.parentNode;
|
|
8393
|
+
while (parent) {
|
|
8394
|
+
if (parent.nodeName === "LABEL" && !labels.includes(parent)) {
|
|
8395
|
+
labels.push(parent);
|
|
8396
|
+
}
|
|
8397
|
+
parent = parent.parentNode;
|
|
8398
|
+
}
|
|
8399
|
+
}
|
|
8400
|
+
return labels;
|
|
8401
|
+
}
|
|
8350
8402
|
function patchPropAttributes(prototype, attrs, defaults = {}) {
|
|
8351
8403
|
Object.keys(attrs).forEach((propName) => {
|
|
8352
8404
|
const attr = attrs[propName];
|
|
@@ -9080,7 +9132,6 @@ var MockWindow = class {
|
|
|
9080
9132
|
__timeouts;
|
|
9081
9133
|
__history;
|
|
9082
9134
|
__elementCstr;
|
|
9083
|
-
__htmlElementCstr;
|
|
9084
9135
|
__charDataCstr;
|
|
9085
9136
|
__docTypeCstr;
|
|
9086
9137
|
__docCstr;
|
|
@@ -9287,27 +9338,10 @@ var MockWindow = class {
|
|
|
9287
9338
|
return JSON;
|
|
9288
9339
|
}
|
|
9289
9340
|
get HTMLElement() {
|
|
9290
|
-
|
|
9291
|
-
const ownerDocument = this.document;
|
|
9292
|
-
this.__htmlElementCstr = class extends MockHTMLElement {
|
|
9293
|
-
constructor() {
|
|
9294
|
-
super(ownerDocument, "");
|
|
9295
|
-
const observedAttributes = this.constructor.observedAttributes;
|
|
9296
|
-
if (Array.isArray(observedAttributes) && typeof this.attributeChangedCallback === "function") {
|
|
9297
|
-
observedAttributes.forEach((attrName) => {
|
|
9298
|
-
const attrValue = this.getAttribute(attrName);
|
|
9299
|
-
if (attrValue != null) {
|
|
9300
|
-
this.attributeChangedCallback(attrName, null, attrValue);
|
|
9301
|
-
}
|
|
9302
|
-
});
|
|
9303
|
-
}
|
|
9304
|
-
}
|
|
9305
|
-
};
|
|
9306
|
-
}
|
|
9307
|
-
return this.__htmlElementCstr;
|
|
9341
|
+
return MockHTMLElement;
|
|
9308
9342
|
}
|
|
9309
|
-
|
|
9310
|
-
|
|
9343
|
+
get SVGElement() {
|
|
9344
|
+
return MockSVGElement;
|
|
9311
9345
|
}
|
|
9312
9346
|
get IntersectionObserver() {
|
|
9313
9347
|
return MockIntersectionObserver;
|
package/mock-doc/package.json
CHANGED
package/package.json
CHANGED
package/screenshot/index.js
CHANGED
package/screenshot/package.json
CHANGED
|
@@ -3,8 +3,8 @@ exports.id = 460;
|
|
|
3
3
|
exports.ids = [460];
|
|
4
4
|
exports.modules = {
|
|
5
5
|
|
|
6
|
-
/***/ 460
|
|
7
|
-
|
|
6
|
+
/***/ 460
|
|
7
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
8
8
|
|
|
9
9
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
10
10
|
/* harmony export */ toFormData: () => (/* binding */ toFormData)
|
|
@@ -445,7 +445,7 @@ async function toFormData(Body, ct) {
|
|
|
445
445
|
}
|
|
446
446
|
|
|
447
447
|
|
|
448
|
-
/***/ }
|
|
448
|
+
/***/ }
|
|
449
449
|
|
|
450
450
|
};
|
|
451
451
|
;
|