@stencil/core 4.41.2 → 4.41.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 +37 -5
- 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 +36 -9
- package/internal/client/package.json +1 -1
- package/internal/client/patch-browser.js +1 -1
- package/internal/hydrate/index.js +88 -9
- package/internal/hydrate/package.json +1 -1
- package/internal/hydrate/runner.js +11 -23
- package/internal/package.json +1 -1
- package/internal/testing/index.js +35 -8
- package/internal/testing/package.json +1 -1
- package/mock-doc/index.cjs +11 -23
- package/mock-doc/index.d.ts +4 -3
- package/mock-doc/index.js +11 -23
- 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 +27 -27
- 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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Stencil Hydrate Platform v4.41.
|
|
2
|
+
Stencil Hydrate Platform v4.41.3 | MIT Licensed | https://stenciljs.com
|
|
3
3
|
*/
|
|
4
4
|
var __create = Object.create;
|
|
5
5
|
var __defProp = Object.defineProperty;
|
|
@@ -2392,7 +2392,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
2392
2392
|
} else if (BUILD12.vdomKey && memberName === "key") {
|
|
2393
2393
|
} else if (BUILD12.vdomRef && memberName === "ref") {
|
|
2394
2394
|
if (newValue) {
|
|
2395
|
-
newValue
|
|
2395
|
+
queueRefAttachment(newValue, elm);
|
|
2396
2396
|
}
|
|
2397
2397
|
} else if (BUILD12.vdomListener && (BUILD12.lazyLoad ? !isProp : !elm.__lookupSetter__(memberName)) && memberName[0] === "o" && memberName[1] === "n") {
|
|
2398
2398
|
if (memberName[2] === "-") {
|
|
@@ -2521,6 +2521,8 @@ var useNativeShadowDom = false;
|
|
|
2521
2521
|
var checkSlotFallbackVisibility = false;
|
|
2522
2522
|
var checkSlotRelocate = false;
|
|
2523
2523
|
var isSvgMode = false;
|
|
2524
|
+
var refCallbacksToRemove = [];
|
|
2525
|
+
var refCallbacksToAttach = [];
|
|
2524
2526
|
var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
2525
2527
|
var _a;
|
|
2526
2528
|
const newVNode2 = newParentVNode.$children$[childIndex];
|
|
@@ -2907,10 +2909,25 @@ var markSlotContentForRelocation = (elm) => {
|
|
|
2907
2909
|
};
|
|
2908
2910
|
var nullifyVNodeRefs = (vNode) => {
|
|
2909
2911
|
if (BUILD14.vdomRef) {
|
|
2910
|
-
vNode.$attrs$ && vNode.$attrs$.ref
|
|
2912
|
+
if (vNode.$attrs$ && vNode.$attrs$.ref) {
|
|
2913
|
+
refCallbacksToRemove.push(() => vNode.$attrs$.ref(null));
|
|
2914
|
+
}
|
|
2911
2915
|
vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
|
|
2912
2916
|
}
|
|
2913
2917
|
};
|
|
2918
|
+
var queueRefAttachment = (refCallback, elm) => {
|
|
2919
|
+
if (BUILD14.vdomRef) {
|
|
2920
|
+
refCallbacksToAttach.push(() => refCallback(elm));
|
|
2921
|
+
}
|
|
2922
|
+
};
|
|
2923
|
+
var flushQueuedRefCallbacks = () => {
|
|
2924
|
+
if (BUILD14.vdomRef) {
|
|
2925
|
+
refCallbacksToRemove.forEach((cb) => cb());
|
|
2926
|
+
refCallbacksToRemove.length = 0;
|
|
2927
|
+
refCallbacksToAttach.forEach((cb) => cb());
|
|
2928
|
+
refCallbacksToAttach.length = 0;
|
|
2929
|
+
}
|
|
2930
|
+
};
|
|
2914
2931
|
var insertBefore = (parent, newNode, reference, isInitialLoad) => {
|
|
2915
2932
|
if (BUILD14.slotRelocation) {
|
|
2916
2933
|
if (BUILD14.scoped && typeof newNode["s-sn"] === "string" && !!newNode["s-sr"] && !!newNode["s-cr"]) {
|
|
@@ -3099,6 +3116,7 @@ render() {
|
|
|
3099
3116
|
}
|
|
3100
3117
|
}
|
|
3101
3118
|
contentRef = void 0;
|
|
3119
|
+
flushQueuedRefCallbacks();
|
|
3102
3120
|
};
|
|
3103
3121
|
var slotReferenceDebugNode = (slotVNode) => {
|
|
3104
3122
|
var _a;
|
|
@@ -3433,13 +3451,22 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
3433
3451
|
if ((!BUILD16.lazyLoad || !(flags & 8 /* isConstructingInstance */) || oldVal === void 0) && didValueChange) {
|
|
3434
3452
|
hostRef.$instanceValues$.set(propName, newVal);
|
|
3435
3453
|
if (BUILD16.serializer && BUILD16.reflect && cmpMeta.$attrsToReflect$) {
|
|
3436
|
-
if (
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
const [
|
|
3440
|
-
|
|
3454
|
+
if (cmpMeta.$serializers$ && cmpMeta.$serializers$[propName]) {
|
|
3455
|
+
const runSerializer = (inst) => {
|
|
3456
|
+
let attrVal = newVal;
|
|
3457
|
+
for (const serializer of cmpMeta.$serializers$[propName]) {
|
|
3458
|
+
const [[methodName]] = Object.entries(serializer);
|
|
3459
|
+
attrVal = inst[methodName](attrVal, propName);
|
|
3460
|
+
}
|
|
3461
|
+
hostRef.$serializerValues$.set(propName, attrVal);
|
|
3462
|
+
};
|
|
3463
|
+
if (instance) {
|
|
3464
|
+
runSerializer(instance);
|
|
3465
|
+
} else {
|
|
3466
|
+
hostRef.$fetchedCbList$.push(() => {
|
|
3467
|
+
runSerializer(hostRef.$lazyInstance$);
|
|
3468
|
+
});
|
|
3441
3469
|
}
|
|
3442
|
-
hostRef.$serializerValues$.set(propName, attrVal);
|
|
3443
3470
|
}
|
|
3444
3471
|
}
|
|
3445
3472
|
if (BUILD16.isDev) {
|
|
@@ -4366,6 +4393,55 @@ function setTagTransformer(transformer) {
|
|
|
4366
4393
|
tagTransformer = transformer;
|
|
4367
4394
|
}
|
|
4368
4395
|
|
|
4396
|
+
// src/runtime/vdom/jsx-dev-runtime.ts
|
|
4397
|
+
function jsxDEV(type, props, key, _isStaticChildren, _source, _self) {
|
|
4398
|
+
const propsObj = props || {};
|
|
4399
|
+
const { children, ...rest } = propsObj;
|
|
4400
|
+
let vnodeData = rest;
|
|
4401
|
+
if (key !== void 0 && !("key" in rest)) {
|
|
4402
|
+
vnodeData = { ...rest, key };
|
|
4403
|
+
}
|
|
4404
|
+
if (vnodeData && Object.keys(vnodeData).length === 0) {
|
|
4405
|
+
vnodeData = null;
|
|
4406
|
+
}
|
|
4407
|
+
if (children !== void 0) {
|
|
4408
|
+
if (Array.isArray(children)) {
|
|
4409
|
+
return h(type, vnodeData, ...children);
|
|
4410
|
+
}
|
|
4411
|
+
if (typeof children === "object" && children !== null && "$flags$" in children) {
|
|
4412
|
+
return h(type, vnodeData, children);
|
|
4413
|
+
}
|
|
4414
|
+
return h(type, vnodeData, children);
|
|
4415
|
+
}
|
|
4416
|
+
return h(type, vnodeData);
|
|
4417
|
+
}
|
|
4418
|
+
|
|
4419
|
+
// src/runtime/vdom/jsx-runtime.ts
|
|
4420
|
+
function jsx(type, props, key) {
|
|
4421
|
+
const propsObj = props || {};
|
|
4422
|
+
const { children, ...rest } = propsObj;
|
|
4423
|
+
let vnodeData = rest;
|
|
4424
|
+
if (key !== void 0 && !("key" in rest)) {
|
|
4425
|
+
vnodeData = { ...rest, key };
|
|
4426
|
+
}
|
|
4427
|
+
if (vnodeData && Object.keys(vnodeData).length === 0) {
|
|
4428
|
+
vnodeData = null;
|
|
4429
|
+
}
|
|
4430
|
+
if (children !== void 0) {
|
|
4431
|
+
if (Array.isArray(children)) {
|
|
4432
|
+
return h(type, vnodeData, ...children);
|
|
4433
|
+
}
|
|
4434
|
+
if (typeof children === "object" && children !== null && "$flags$" in children) {
|
|
4435
|
+
return h(type, vnodeData, children);
|
|
4436
|
+
}
|
|
4437
|
+
return h(type, vnodeData, children);
|
|
4438
|
+
}
|
|
4439
|
+
return h(type, vnodeData);
|
|
4440
|
+
}
|
|
4441
|
+
function jsxs(type, props, key) {
|
|
4442
|
+
return jsx(type, props, key);
|
|
4443
|
+
}
|
|
4444
|
+
|
|
4369
4445
|
// src/runtime/vdom/vdom-annotations.ts
|
|
4370
4446
|
var insertVdomAnnotations = (doc, staticComponents) => {
|
|
4371
4447
|
if (doc != null) {
|
|
@@ -6494,6 +6570,9 @@ export {
|
|
|
6494
6570
|
hydrateApp,
|
|
6495
6571
|
insertVdomAnnotations,
|
|
6496
6572
|
isMemberInElement,
|
|
6573
|
+
jsx,
|
|
6574
|
+
jsxDEV,
|
|
6575
|
+
jsxs,
|
|
6497
6576
|
loadModule,
|
|
6498
6577
|
modeResolutionChain,
|
|
6499
6578
|
needsScopedSSR,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stencil/core/internal/hydrate",
|
|
3
|
-
"version": "4.41.
|
|
3
|
+
"version": "4.41.3",
|
|
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
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Stencil Hydrate Runner v4.41.
|
|
2
|
+
Stencil Hydrate Runner v4.41.3 | MIT Licensed | https://stenciljs.com
|
|
3
3
|
*/
|
|
4
4
|
var __create = Object.create;
|
|
5
5
|
var __defProp = Object.defineProperty;
|
|
@@ -11013,14 +11013,19 @@ var MockNode2 = class {
|
|
|
11013
11013
|
nodeType;
|
|
11014
11014
|
ownerDocument;
|
|
11015
11015
|
parentNode;
|
|
11016
|
-
|
|
11016
|
+
_childNodes = [];
|
|
11017
11017
|
constructor(ownerDocument, nodeType, nodeName, nodeValue) {
|
|
11018
11018
|
this.ownerDocument = ownerDocument;
|
|
11019
11019
|
this.nodeType = nodeType;
|
|
11020
11020
|
this.nodeName = nodeName;
|
|
11021
11021
|
this._nodeValue = nodeValue;
|
|
11022
11022
|
this.parentNode = null;
|
|
11023
|
-
|
|
11023
|
+
}
|
|
11024
|
+
get childNodes() {
|
|
11025
|
+
return this._childNodes;
|
|
11026
|
+
}
|
|
11027
|
+
set childNodes(value) {
|
|
11028
|
+
this._childNodes = value;
|
|
11024
11029
|
}
|
|
11025
11030
|
appendChild(newNode) {
|
|
11026
11031
|
if (newNode.nodeType === 11 /* DOCUMENT_FRAGMENT_NODE */) {
|
|
@@ -13600,16 +13605,7 @@ var MockWindow = class {
|
|
|
13600
13605
|
return dispatchEvent(this, ev);
|
|
13601
13606
|
}
|
|
13602
13607
|
get Element() {
|
|
13603
|
-
|
|
13604
|
-
const ownerDocument = this.document;
|
|
13605
|
-
this.__elementCstr = class extends MockElement {
|
|
13606
|
-
constructor() {
|
|
13607
|
-
super(ownerDocument, "");
|
|
13608
|
-
throw new Error("Illegal constructor: cannot construct Element");
|
|
13609
|
-
}
|
|
13610
|
-
};
|
|
13611
|
-
}
|
|
13612
|
-
return this.__elementCstr;
|
|
13608
|
+
return MockElement;
|
|
13613
13609
|
}
|
|
13614
13610
|
fetch(input, init) {
|
|
13615
13611
|
if (typeof fetch === "function") {
|
|
@@ -13728,16 +13724,7 @@ var MockWindow = class {
|
|
|
13728
13724
|
};
|
|
13729
13725
|
}
|
|
13730
13726
|
get Node() {
|
|
13731
|
-
|
|
13732
|
-
const ownerDocument = this.document;
|
|
13733
|
-
this.__nodeCstr = class extends MockNode2 {
|
|
13734
|
-
constructor() {
|
|
13735
|
-
super(ownerDocument, 0, "test", "");
|
|
13736
|
-
throw new Error("Illegal constructor: cannot construct Node");
|
|
13737
|
-
}
|
|
13738
|
-
};
|
|
13739
|
-
}
|
|
13740
|
-
return this.__nodeCstr;
|
|
13727
|
+
return MockNode2;
|
|
13741
13728
|
}
|
|
13742
13729
|
get NodeList() {
|
|
13743
13730
|
if (this.__nodeListCstr == null) {
|
|
@@ -14404,6 +14391,7 @@ var DOC_KEY_KEEPERS = /* @__PURE__ */ new Set([
|
|
|
14404
14391
|
"ownerDocument",
|
|
14405
14392
|
"parentNode",
|
|
14406
14393
|
"childNodes",
|
|
14394
|
+
"_childNodes",
|
|
14407
14395
|
"_shadowRoot"
|
|
14408
14396
|
]);
|
|
14409
14397
|
function getElementById(elm, id) {
|
package/internal/package.json
CHANGED
|
@@ -4166,7 +4166,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
4166
4166
|
} else if (import_app_data11.BUILD.vdomKey && memberName === "key") {
|
|
4167
4167
|
} else if (import_app_data11.BUILD.vdomRef && memberName === "ref") {
|
|
4168
4168
|
if (newValue) {
|
|
4169
|
-
newValue
|
|
4169
|
+
queueRefAttachment(newValue, elm);
|
|
4170
4170
|
}
|
|
4171
4171
|
} else if (import_app_data11.BUILD.vdomListener && (import_app_data11.BUILD.lazyLoad ? !isProp : !elm.__lookupSetter__(memberName)) && memberName[0] === "o" && memberName[1] === "n") {
|
|
4172
4172
|
if (memberName[2] === "-") {
|
|
@@ -4295,6 +4295,8 @@ var useNativeShadowDom = false;
|
|
|
4295
4295
|
var checkSlotFallbackVisibility = false;
|
|
4296
4296
|
var checkSlotRelocate = false;
|
|
4297
4297
|
var isSvgMode = false;
|
|
4298
|
+
var refCallbacksToRemove = [];
|
|
4299
|
+
var refCallbacksToAttach = [];
|
|
4298
4300
|
var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
4299
4301
|
var _a;
|
|
4300
4302
|
const newVNode2 = newParentVNode.$children$[childIndex];
|
|
@@ -4681,10 +4683,25 @@ var markSlotContentForRelocation = (elm) => {
|
|
|
4681
4683
|
};
|
|
4682
4684
|
var nullifyVNodeRefs = (vNode) => {
|
|
4683
4685
|
if (import_app_data13.BUILD.vdomRef) {
|
|
4684
|
-
vNode.$attrs$ && vNode.$attrs$.ref
|
|
4686
|
+
if (vNode.$attrs$ && vNode.$attrs$.ref) {
|
|
4687
|
+
refCallbacksToRemove.push(() => vNode.$attrs$.ref(null));
|
|
4688
|
+
}
|
|
4685
4689
|
vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
|
|
4686
4690
|
}
|
|
4687
4691
|
};
|
|
4692
|
+
var queueRefAttachment = (refCallback, elm) => {
|
|
4693
|
+
if (import_app_data13.BUILD.vdomRef) {
|
|
4694
|
+
refCallbacksToAttach.push(() => refCallback(elm));
|
|
4695
|
+
}
|
|
4696
|
+
};
|
|
4697
|
+
var flushQueuedRefCallbacks = () => {
|
|
4698
|
+
if (import_app_data13.BUILD.vdomRef) {
|
|
4699
|
+
refCallbacksToRemove.forEach((cb) => cb());
|
|
4700
|
+
refCallbacksToRemove.length = 0;
|
|
4701
|
+
refCallbacksToAttach.forEach((cb) => cb());
|
|
4702
|
+
refCallbacksToAttach.length = 0;
|
|
4703
|
+
}
|
|
4704
|
+
};
|
|
4688
4705
|
var insertBefore = (parent, newNode, reference, isInitialLoad) => {
|
|
4689
4706
|
if (import_app_data13.BUILD.slotRelocation) {
|
|
4690
4707
|
if (import_app_data13.BUILD.scoped && typeof newNode["s-sn"] === "string" && !!newNode["s-sr"] && !!newNode["s-cr"]) {
|
|
@@ -4873,6 +4890,7 @@ render() {
|
|
|
4873
4890
|
}
|
|
4874
4891
|
}
|
|
4875
4892
|
contentRef = void 0;
|
|
4893
|
+
flushQueuedRefCallbacks();
|
|
4876
4894
|
};
|
|
4877
4895
|
var slotReferenceDebugNode = (slotVNode) => {
|
|
4878
4896
|
var _a;
|
|
@@ -5207,13 +5225,22 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
5207
5225
|
if ((!import_app_data15.BUILD.lazyLoad || !(flags & 8 /* isConstructingInstance */) || oldVal === void 0) && didValueChange) {
|
|
5208
5226
|
hostRef.$instanceValues$.set(propName, newVal);
|
|
5209
5227
|
if (import_app_data15.BUILD.serializer && import_app_data15.BUILD.reflect && cmpMeta.$attrsToReflect$) {
|
|
5210
|
-
if (
|
|
5211
|
-
|
|
5212
|
-
|
|
5213
|
-
const [
|
|
5214
|
-
|
|
5228
|
+
if (cmpMeta.$serializers$ && cmpMeta.$serializers$[propName]) {
|
|
5229
|
+
const runSerializer = (inst) => {
|
|
5230
|
+
let attrVal = newVal;
|
|
5231
|
+
for (const serializer of cmpMeta.$serializers$[propName]) {
|
|
5232
|
+
const [[methodName]] = Object.entries(serializer);
|
|
5233
|
+
attrVal = inst[methodName](attrVal, propName);
|
|
5234
|
+
}
|
|
5235
|
+
hostRef.$serializerValues$.set(propName, attrVal);
|
|
5236
|
+
};
|
|
5237
|
+
if (instance) {
|
|
5238
|
+
runSerializer(instance);
|
|
5239
|
+
} else {
|
|
5240
|
+
hostRef.$fetchedCbList$.push(() => {
|
|
5241
|
+
runSerializer(hostRef.$lazyInstance$);
|
|
5242
|
+
});
|
|
5215
5243
|
}
|
|
5216
|
-
hostRef.$serializerValues$.set(propName, attrVal);
|
|
5217
5244
|
}
|
|
5218
5245
|
}
|
|
5219
5246
|
if (import_app_data15.BUILD.isDev) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stencil/core/internal/testing",
|
|
3
|
-
"version": "4.41.
|
|
3
|
+
"version": "4.41.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.41.
|
|
2
|
+
Stencil Mock Doc (CommonJS) v4.41.3 | MIT Licensed | https://stenciljs.com
|
|
3
3
|
*/
|
|
4
4
|
"use strict";
|
|
5
5
|
var __defProp = Object.defineProperty;
|
|
@@ -6656,14 +6656,19 @@ var MockNode2 = class {
|
|
|
6656
6656
|
nodeType;
|
|
6657
6657
|
ownerDocument;
|
|
6658
6658
|
parentNode;
|
|
6659
|
-
|
|
6659
|
+
_childNodes = [];
|
|
6660
6660
|
constructor(ownerDocument, nodeType, nodeName, nodeValue) {
|
|
6661
6661
|
this.ownerDocument = ownerDocument;
|
|
6662
6662
|
this.nodeType = nodeType;
|
|
6663
6663
|
this.nodeName = nodeName;
|
|
6664
6664
|
this._nodeValue = nodeValue;
|
|
6665
6665
|
this.parentNode = null;
|
|
6666
|
-
|
|
6666
|
+
}
|
|
6667
|
+
get childNodes() {
|
|
6668
|
+
return this._childNodes;
|
|
6669
|
+
}
|
|
6670
|
+
set childNodes(value) {
|
|
6671
|
+
this._childNodes = value;
|
|
6667
6672
|
}
|
|
6668
6673
|
appendChild(newNode) {
|
|
6669
6674
|
if (newNode.nodeType === 11 /* DOCUMENT_FRAGMENT_NODE */) {
|
|
@@ -9286,16 +9291,7 @@ var MockWindow = class {
|
|
|
9286
9291
|
return dispatchEvent(this, ev);
|
|
9287
9292
|
}
|
|
9288
9293
|
get Element() {
|
|
9289
|
-
|
|
9290
|
-
const ownerDocument = this.document;
|
|
9291
|
-
this.__elementCstr = class extends MockElement {
|
|
9292
|
-
constructor() {
|
|
9293
|
-
super(ownerDocument, "");
|
|
9294
|
-
throw new Error("Illegal constructor: cannot construct Element");
|
|
9295
|
-
}
|
|
9296
|
-
};
|
|
9297
|
-
}
|
|
9298
|
-
return this.__elementCstr;
|
|
9294
|
+
return MockElement;
|
|
9299
9295
|
}
|
|
9300
9296
|
fetch(input, init) {
|
|
9301
9297
|
if (typeof fetch === "function") {
|
|
@@ -9414,16 +9410,7 @@ var MockWindow = class {
|
|
|
9414
9410
|
};
|
|
9415
9411
|
}
|
|
9416
9412
|
get Node() {
|
|
9417
|
-
|
|
9418
|
-
const ownerDocument = this.document;
|
|
9419
|
-
this.__nodeCstr = class extends MockNode2 {
|
|
9420
|
-
constructor() {
|
|
9421
|
-
super(ownerDocument, 0, "test", "");
|
|
9422
|
-
throw new Error("Illegal constructor: cannot construct Node");
|
|
9423
|
-
}
|
|
9424
|
-
};
|
|
9425
|
-
}
|
|
9426
|
-
return this.__nodeCstr;
|
|
9413
|
+
return MockNode2;
|
|
9427
9414
|
}
|
|
9428
9415
|
get NodeList() {
|
|
9429
9416
|
if (this.__nodeListCstr == null) {
|
|
@@ -10103,6 +10090,7 @@ var DOC_KEY_KEEPERS = /* @__PURE__ */ new Set([
|
|
|
10103
10090
|
"ownerDocument",
|
|
10104
10091
|
"parentNode",
|
|
10105
10092
|
"childNodes",
|
|
10093
|
+
"_childNodes",
|
|
10106
10094
|
"_shadowRoot"
|
|
10107
10095
|
]);
|
|
10108
10096
|
function getElementById(elm, id) {
|
package/mock-doc/index.d.ts
CHANGED
|
@@ -492,8 +492,9 @@ declare class MockNode {
|
|
|
492
492
|
nodeType: number;
|
|
493
493
|
ownerDocument: any;
|
|
494
494
|
parentNode: MockNode | null;
|
|
495
|
-
childNodes: MockNode[];
|
|
496
495
|
constructor(ownerDocument: any, nodeType: number, nodeName: string | null, nodeValue: string | null);
|
|
496
|
+
get childNodes(): MockNode[];
|
|
497
|
+
set childNodes(value: MockNode[]);
|
|
497
498
|
appendChild(newNode: MockNode): MockNode;
|
|
498
499
|
append(...items: (MockNode | string)[]): void;
|
|
499
500
|
prepend(...items: (MockNode | string)[]): void;
|
|
@@ -1009,7 +1010,7 @@ declare class MockWindow {
|
|
|
1009
1010
|
get DOMTokenList(): any;
|
|
1010
1011
|
set DOMTokenList(domTokenListCstr: any);
|
|
1011
1012
|
dispatchEvent(ev: MockEvent): boolean;
|
|
1012
|
-
get Element():
|
|
1013
|
+
get Element(): typeof MockElement;
|
|
1013
1014
|
fetch(input: any, init?: any): any;
|
|
1014
1015
|
focus(): any;
|
|
1015
1016
|
getComputedStyle(_: any): any;
|
|
@@ -1035,7 +1036,7 @@ declare class MockWindow {
|
|
|
1035
1036
|
dispatchEvent: (_ev: any) => void;
|
|
1036
1037
|
onchange: ((this: MediaQueryList, ev: MediaQueryListEvent) => any) | null;
|
|
1037
1038
|
};
|
|
1038
|
-
get Node():
|
|
1039
|
+
get Node(): typeof MockNode;
|
|
1039
1040
|
get NodeList(): any;
|
|
1040
1041
|
get navigator(): any;
|
|
1041
1042
|
set navigator(nav: any);
|
package/mock-doc/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
Stencil Mock Doc v4.41.
|
|
2
|
+
Stencil Mock Doc v4.41.3 | 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;
|
|
@@ -6604,14 +6604,19 @@ var MockNode2 = class {
|
|
|
6604
6604
|
nodeType;
|
|
6605
6605
|
ownerDocument;
|
|
6606
6606
|
parentNode;
|
|
6607
|
-
|
|
6607
|
+
_childNodes = [];
|
|
6608
6608
|
constructor(ownerDocument, nodeType, nodeName, nodeValue) {
|
|
6609
6609
|
this.ownerDocument = ownerDocument;
|
|
6610
6610
|
this.nodeType = nodeType;
|
|
6611
6611
|
this.nodeName = nodeName;
|
|
6612
6612
|
this._nodeValue = nodeValue;
|
|
6613
6613
|
this.parentNode = null;
|
|
6614
|
-
|
|
6614
|
+
}
|
|
6615
|
+
get childNodes() {
|
|
6616
|
+
return this._childNodes;
|
|
6617
|
+
}
|
|
6618
|
+
set childNodes(value) {
|
|
6619
|
+
this._childNodes = value;
|
|
6615
6620
|
}
|
|
6616
6621
|
appendChild(newNode) {
|
|
6617
6622
|
if (newNode.nodeType === 11 /* DOCUMENT_FRAGMENT_NODE */) {
|
|
@@ -9234,16 +9239,7 @@ var MockWindow = class {
|
|
|
9234
9239
|
return dispatchEvent(this, ev);
|
|
9235
9240
|
}
|
|
9236
9241
|
get Element() {
|
|
9237
|
-
|
|
9238
|
-
const ownerDocument = this.document;
|
|
9239
|
-
this.__elementCstr = class extends MockElement {
|
|
9240
|
-
constructor() {
|
|
9241
|
-
super(ownerDocument, "");
|
|
9242
|
-
throw new Error("Illegal constructor: cannot construct Element");
|
|
9243
|
-
}
|
|
9244
|
-
};
|
|
9245
|
-
}
|
|
9246
|
-
return this.__elementCstr;
|
|
9242
|
+
return MockElement;
|
|
9247
9243
|
}
|
|
9248
9244
|
fetch(input, init) {
|
|
9249
9245
|
if (typeof fetch === "function") {
|
|
@@ -9362,16 +9358,7 @@ var MockWindow = class {
|
|
|
9362
9358
|
};
|
|
9363
9359
|
}
|
|
9364
9360
|
get Node() {
|
|
9365
|
-
|
|
9366
|
-
const ownerDocument = this.document;
|
|
9367
|
-
this.__nodeCstr = class extends MockNode2 {
|
|
9368
|
-
constructor() {
|
|
9369
|
-
super(ownerDocument, 0, "test", "");
|
|
9370
|
-
throw new Error("Illegal constructor: cannot construct Node");
|
|
9371
|
-
}
|
|
9372
|
-
};
|
|
9373
|
-
}
|
|
9374
|
-
return this.__nodeCstr;
|
|
9361
|
+
return MockNode2;
|
|
9375
9362
|
}
|
|
9376
9363
|
get NodeList() {
|
|
9377
9364
|
if (this.__nodeListCstr == null) {
|
|
@@ -10051,6 +10038,7 @@ var DOC_KEY_KEEPERS = /* @__PURE__ */ new Set([
|
|
|
10051
10038
|
"ownerDocument",
|
|
10052
10039
|
"parentNode",
|
|
10053
10040
|
"childNodes",
|
|
10041
|
+
"_childNodes",
|
|
10054
10042
|
"_shadowRoot"
|
|
10055
10043
|
]);
|
|
10056
10044
|
function getElementById(elm, id) {
|
package/mock-doc/package.json
CHANGED
package/package.json
CHANGED
package/screenshot/index.js
CHANGED
package/screenshot/package.json
CHANGED