@stencil/core 4.24.0 → 4.25.0-dev.1737694903.66340b2
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 +5 -6
- 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 +361 -346
- package/internal/client/package.json +1 -1
- package/internal/client/patch-browser.js +1 -1
- package/internal/hydrate/index.js +371 -326
- package/internal/hydrate/package.json +1 -1
- package/internal/hydrate/runner.js +102 -33
- package/internal/package.json +1 -1
- package/internal/testing/index.js +30 -25
- package/internal/testing/package.json +1 -1
- package/mock-doc/index.cjs +67 -3
- package/mock-doc/index.d.ts +9 -0
- package/mock-doc/index.js +67 -3
- 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/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 +2 -2
- package/testing/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stencil/core/internal/hydrate",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.25.0-dev.1737694903.66340b2",
|
|
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.
|
|
2
|
+
Stencil Hydrate Runner v4.25.0-dev.1737694903.66340b2 | MIT Licensed | https://stenciljs.com
|
|
3
3
|
*/
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
5
5
|
var __export = (target, all) => {
|
|
@@ -11923,6 +11923,10 @@ function createElement(ownerDocument, tagName) {
|
|
|
11923
11923
|
return new MockMetaElement(ownerDocument);
|
|
11924
11924
|
case "script":
|
|
11925
11925
|
return new MockScriptElement(ownerDocument);
|
|
11926
|
+
case "slot":
|
|
11927
|
+
return new MockSlotElement(ownerDocument);
|
|
11928
|
+
case "slot-fb":
|
|
11929
|
+
return new MockHTMLElement(ownerDocument, tagName);
|
|
11926
11930
|
case "style":
|
|
11927
11931
|
return new MockStyleElement(ownerDocument);
|
|
11928
11932
|
case "template":
|
|
@@ -11931,8 +11935,6 @@ function createElement(ownerDocument, tagName) {
|
|
|
11931
11935
|
return new MockTitleElement(ownerDocument);
|
|
11932
11936
|
case "ul":
|
|
11933
11937
|
return new MockUListElement(ownerDocument);
|
|
11934
|
-
case "slot-fb":
|
|
11935
|
-
return new MockHTMLElement(ownerDocument, tagName);
|
|
11936
11938
|
}
|
|
11937
11939
|
if (ownerDocument != null && tagName.includes("-")) {
|
|
11938
11940
|
const win2 = ownerDocument.defaultView;
|
|
@@ -12352,6 +12354,68 @@ var MockUListElement = class extends MockHTMLElement {
|
|
|
12352
12354
|
super(ownerDocument, "ul");
|
|
12353
12355
|
}
|
|
12354
12356
|
};
|
|
12357
|
+
var MockSlotElement = class _MockSlotElement extends MockHTMLElement {
|
|
12358
|
+
constructor(ownerDocument) {
|
|
12359
|
+
super(ownerDocument, "slot");
|
|
12360
|
+
}
|
|
12361
|
+
assignedNodes(opts) {
|
|
12362
|
+
let nodesToReturn = [];
|
|
12363
|
+
const ownerHost = this.getRootNode().host;
|
|
12364
|
+
if (!ownerHost) return nodesToReturn;
|
|
12365
|
+
if (ownerHost.childNodes.length) {
|
|
12366
|
+
if (this.name) {
|
|
12367
|
+
nodesToReturn = ownerHost.childNodes.filter(
|
|
12368
|
+
(n) => n.nodeType === 1 /* ELEMENT_NODE */ && n.getAttribute("slot") === this.name
|
|
12369
|
+
);
|
|
12370
|
+
} else {
|
|
12371
|
+
nodesToReturn = ownerHost.childNodes.filter(
|
|
12372
|
+
(n) => n.nodeType === 1 /* ELEMENT_NODE */ && !n.getAttribute("slot") || n.nodeType !== 1 /* ELEMENT_NODE */
|
|
12373
|
+
);
|
|
12374
|
+
}
|
|
12375
|
+
if (nodesToReturn.length) return nodesToReturn;
|
|
12376
|
+
}
|
|
12377
|
+
if (!(opts == null ? void 0 : opts.flatten)) return this.childNodes.filter((n) => !(n instanceof _MockSlotElement));
|
|
12378
|
+
return this.childNodes.reduce(
|
|
12379
|
+
(acc, node) => {
|
|
12380
|
+
if (node instanceof _MockSlotElement) {
|
|
12381
|
+
acc.push(...node.assignedNodes(opts));
|
|
12382
|
+
} else {
|
|
12383
|
+
acc.push(node);
|
|
12384
|
+
}
|
|
12385
|
+
return acc;
|
|
12386
|
+
},
|
|
12387
|
+
[]
|
|
12388
|
+
);
|
|
12389
|
+
}
|
|
12390
|
+
assignedElements(opts) {
|
|
12391
|
+
let elesToReturn = [];
|
|
12392
|
+
const ownerHost = this.getRootNode().host;
|
|
12393
|
+
if (!ownerHost) return elesToReturn;
|
|
12394
|
+
if (ownerHost.children.length) {
|
|
12395
|
+
if (this.name) {
|
|
12396
|
+
elesToReturn = ownerHost.children.filter((n) => n.getAttribute("slot") == this.name);
|
|
12397
|
+
} else {
|
|
12398
|
+
elesToReturn = ownerHost.children.filter((n) => !n.getAttribute("slot"));
|
|
12399
|
+
}
|
|
12400
|
+
if (elesToReturn.length) return elesToReturn;
|
|
12401
|
+
}
|
|
12402
|
+
if (!(opts == null ? void 0 : opts.flatten)) return this.children.filter((n) => !(n instanceof _MockSlotElement));
|
|
12403
|
+
return this.children.reduce(
|
|
12404
|
+
(acc, node) => {
|
|
12405
|
+
if (node instanceof _MockSlotElement) {
|
|
12406
|
+
acc.push(...node.assignedElements(opts));
|
|
12407
|
+
} else {
|
|
12408
|
+
acc.push(node);
|
|
12409
|
+
}
|
|
12410
|
+
return acc;
|
|
12411
|
+
},
|
|
12412
|
+
[]
|
|
12413
|
+
);
|
|
12414
|
+
}
|
|
12415
|
+
};
|
|
12416
|
+
patchPropAttributes(MockSlotElement.prototype, {
|
|
12417
|
+
name: String
|
|
12418
|
+
});
|
|
12355
12419
|
var CanvasRenderingContext = class {
|
|
12356
12420
|
constructor(context, contextAttributes) {
|
|
12357
12421
|
this.context = context;
|
|
@@ -14121,15 +14185,20 @@ var Build = {
|
|
|
14121
14185
|
};
|
|
14122
14186
|
|
|
14123
14187
|
// src/client/client-host-ref.ts
|
|
14188
|
+
import { BUILD as BUILD3 } from "@stencil/core/internal/app-data";
|
|
14189
|
+
|
|
14190
|
+
// src/utils/es2022-rewire-class-members.ts
|
|
14124
14191
|
import { BUILD as BUILD2 } from "@stencil/core/internal/app-data";
|
|
14125
|
-
|
|
14192
|
+
|
|
14193
|
+
// src/client/client-host-ref.ts
|
|
14194
|
+
var hostRefs = BUILD3.hotModuleReplacement ? window.__STENCIL_HOSTREFS__ || (window.__STENCIL_HOSTREFS__ = /* @__PURE__ */ new WeakMap()) : /* @__PURE__ */ new WeakMap();
|
|
14126
14195
|
|
|
14127
14196
|
// src/client/client-load-module.ts
|
|
14128
|
-
import { BUILD as
|
|
14197
|
+
import { BUILD as BUILD5 } from "@stencil/core/internal/app-data";
|
|
14129
14198
|
|
|
14130
14199
|
// src/client/client-log.ts
|
|
14131
|
-
import { BUILD as
|
|
14132
|
-
var STENCIL_DEV_MODE =
|
|
14200
|
+
import { BUILD as BUILD4 } from "@stencil/core/internal/app-data";
|
|
14201
|
+
var STENCIL_DEV_MODE = BUILD4.isTesting ? ["STENCIL:"] : [
|
|
14133
14202
|
"%cstencil",
|
|
14134
14203
|
"color: white;background:#4c47ff;font-weight: bold; font-size:10px; padding:2px 6px; border-radius: 5px"
|
|
14135
14204
|
];
|
|
@@ -14138,16 +14207,16 @@ var STENCIL_DEV_MODE = BUILD3.isTesting ? ["STENCIL:"] : [
|
|
|
14138
14207
|
var modeResolutionChain = [];
|
|
14139
14208
|
|
|
14140
14209
|
// src/client/client-task-queue.ts
|
|
14141
|
-
import { BUILD as
|
|
14210
|
+
import { BUILD as BUILD7 } from "@stencil/core/internal/app-data";
|
|
14142
14211
|
|
|
14143
14212
|
// src/client/client-window.ts
|
|
14144
|
-
import { BUILD as
|
|
14213
|
+
import { BUILD as BUILD6 } from "@stencil/core/internal/app-data";
|
|
14145
14214
|
var win = typeof window !== "undefined" ? window : {};
|
|
14146
14215
|
var doc = win.document || { head: {} };
|
|
14147
14216
|
var H = win.HTMLElement || class {
|
|
14148
14217
|
};
|
|
14149
|
-
var supportsShadow =
|
|
14150
|
-
var supportsConstructableStylesheets =
|
|
14218
|
+
var supportsShadow = BUILD6.shadowDom;
|
|
14219
|
+
var supportsConstructableStylesheets = BUILD6.constructableCSS ? /* @__PURE__ */ (() => {
|
|
14151
14220
|
try {
|
|
14152
14221
|
new CSSStyleSheet();
|
|
14153
14222
|
return typeof new CSSStyleSheet().replaceSync === "function";
|
|
@@ -14157,10 +14226,10 @@ var supportsConstructableStylesheets = BUILD5.constructableCSS ? /* @__PURE__ */
|
|
|
14157
14226
|
})() : false;
|
|
14158
14227
|
|
|
14159
14228
|
// src/client/index.ts
|
|
14160
|
-
import { BUILD as
|
|
14229
|
+
import { BUILD as BUILD29, Env, NAMESPACE as NAMESPACE2 } from "@stencil/core/internal/app-data";
|
|
14161
14230
|
|
|
14162
14231
|
// src/runtime/bootstrap-custom-element.ts
|
|
14163
|
-
import { BUILD as
|
|
14232
|
+
import { BUILD as BUILD26 } from "@stencil/core/internal/app-data";
|
|
14164
14233
|
|
|
14165
14234
|
// src/utils/helpers.ts
|
|
14166
14235
|
var isString = (v) => typeof v === "string";
|
|
@@ -14253,69 +14322,69 @@ var unwrapErr = (result) => {
|
|
|
14253
14322
|
};
|
|
14254
14323
|
|
|
14255
14324
|
// src/runtime/connected-callback.ts
|
|
14256
|
-
import { BUILD as
|
|
14325
|
+
import { BUILD as BUILD24 } from "@stencil/core/internal/app-data";
|
|
14257
14326
|
|
|
14258
14327
|
// src/runtime/client-hydrate.ts
|
|
14259
|
-
import { BUILD as
|
|
14328
|
+
import { BUILD as BUILD12 } from "@stencil/core/internal/app-data";
|
|
14260
14329
|
|
|
14261
14330
|
// src/runtime/dom-extras.ts
|
|
14262
|
-
import { BUILD as
|
|
14331
|
+
import { BUILD as BUILD9 } from "@stencil/core/internal/app-data";
|
|
14263
14332
|
|
|
14264
14333
|
// src/runtime/slot-polyfill-utils.ts
|
|
14265
|
-
import { BUILD as
|
|
14334
|
+
import { BUILD as BUILD8 } from "@stencil/core/internal/app-data";
|
|
14266
14335
|
|
|
14267
14336
|
// src/runtime/profile.ts
|
|
14268
|
-
import { BUILD as
|
|
14337
|
+
import { BUILD as BUILD10 } from "@stencil/core/internal/app-data";
|
|
14269
14338
|
|
|
14270
14339
|
// src/runtime/vdom/h.ts
|
|
14271
|
-
import { BUILD as
|
|
14340
|
+
import { BUILD as BUILD11 } from "@stencil/core/internal/app-data";
|
|
14272
14341
|
|
|
14273
14342
|
// src/runtime/initialize-component.ts
|
|
14274
|
-
import { BUILD as
|
|
14343
|
+
import { BUILD as BUILD23 } from "@stencil/core/internal/app-data";
|
|
14275
14344
|
|
|
14276
14345
|
// src/runtime/mode.ts
|
|
14277
14346
|
var setMode = (handler) => modeResolutionChain.push(handler);
|
|
14278
14347
|
|
|
14279
14348
|
// src/runtime/proxy-component.ts
|
|
14280
|
-
import { BUILD as
|
|
14349
|
+
import { BUILD as BUILD22 } from "@stencil/core/internal/app-data";
|
|
14281
14350
|
|
|
14282
14351
|
// src/runtime/set-value.ts
|
|
14283
|
-
import { BUILD as
|
|
14352
|
+
import { BUILD as BUILD21 } from "@stencil/core/internal/app-data";
|
|
14284
14353
|
|
|
14285
14354
|
// src/runtime/parse-property-value.ts
|
|
14286
|
-
import { BUILD as
|
|
14355
|
+
import { BUILD as BUILD13 } from "@stencil/core/internal/app-data";
|
|
14287
14356
|
|
|
14288
14357
|
// src/runtime/update-component.ts
|
|
14289
|
-
import { BUILD as
|
|
14358
|
+
import { BUILD as BUILD20, NAMESPACE } from "@stencil/core/internal/app-data";
|
|
14290
14359
|
|
|
14291
14360
|
// src/runtime/event-emitter.ts
|
|
14292
|
-
import { BUILD as
|
|
14361
|
+
import { BUILD as BUILD15 } from "@stencil/core/internal/app-data";
|
|
14293
14362
|
|
|
14294
14363
|
// src/runtime/element.ts
|
|
14295
|
-
import { BUILD as
|
|
14364
|
+
import { BUILD as BUILD14 } from "@stencil/core/internal/app-data";
|
|
14296
14365
|
|
|
14297
14366
|
// src/runtime/styles.ts
|
|
14298
|
-
import { BUILD as
|
|
14367
|
+
import { BUILD as BUILD16 } from "@stencil/core/internal/app-data";
|
|
14299
14368
|
|
|
14300
14369
|
// src/runtime/vdom/vdom-render.ts
|
|
14301
|
-
import { BUILD as
|
|
14370
|
+
import { BUILD as BUILD19 } from "@stencil/core/internal/app-data";
|
|
14302
14371
|
|
|
14303
14372
|
// src/runtime/vdom/update-element.ts
|
|
14304
|
-
import { BUILD as
|
|
14373
|
+
import { BUILD as BUILD18 } from "@stencil/core/internal/app-data";
|
|
14305
14374
|
|
|
14306
14375
|
// src/runtime/vdom/set-accessor.ts
|
|
14307
|
-
import { BUILD as
|
|
14376
|
+
import { BUILD as BUILD17 } from "@stencil/core/internal/app-data";
|
|
14308
14377
|
var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
14309
14378
|
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
14310
14379
|
|
|
14311
14380
|
// src/runtime/disconnected-callback.ts
|
|
14312
|
-
import { BUILD as
|
|
14381
|
+
import { BUILD as BUILD25 } from "@stencil/core/internal/app-data";
|
|
14313
14382
|
|
|
14314
14383
|
// src/runtime/bootstrap-lazy.ts
|
|
14315
|
-
import { BUILD as
|
|
14384
|
+
import { BUILD as BUILD27 } from "@stencil/core/internal/app-data";
|
|
14316
14385
|
|
|
14317
14386
|
// src/runtime/host-listener.ts
|
|
14318
|
-
import { BUILD as
|
|
14387
|
+
import { BUILD as BUILD28 } from "@stencil/core/internal/app-data";
|
|
14319
14388
|
|
|
14320
14389
|
// src/compiler/html/canonical-link.ts
|
|
14321
14390
|
var updateCanonicalLink = (doc2, href) => {
|
package/internal/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stencil/core/internal",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.25.0-dev.1737694903.66340b2",
|
|
4
4
|
"description": "Stencil internals only to be imported by the Stencil Compiler. Breaking changes can and will happen at any time.",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"types": "./index.d.ts",
|
|
@@ -2502,23 +2502,23 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
2502
2502
|
if (import_app_data13.BUILD.lazyLoad && import_app_data13.BUILD.hostListener) {
|
|
2503
2503
|
hostRef.$flags$ |= 256 /* isListenReady */;
|
|
2504
2504
|
if (hostRef.$queuedListeners$) {
|
|
2505
|
-
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
|
|
2505
|
+
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event, elm));
|
|
2506
2506
|
hostRef.$queuedListeners$ = void 0;
|
|
2507
2507
|
}
|
|
2508
2508
|
}
|
|
2509
2509
|
emitLifecycleEvent(elm, "componentWillLoad");
|
|
2510
2510
|
if (import_app_data13.BUILD.cmpWillLoad) {
|
|
2511
|
-
maybePromise = safeCall(instance, "componentWillLoad");
|
|
2511
|
+
maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
|
|
2512
2512
|
}
|
|
2513
2513
|
} else {
|
|
2514
2514
|
emitLifecycleEvent(elm, "componentWillUpdate");
|
|
2515
2515
|
if (import_app_data13.BUILD.cmpWillUpdate) {
|
|
2516
|
-
maybePromise = safeCall(instance, "componentWillUpdate");
|
|
2516
|
+
maybePromise = safeCall(instance, "componentWillUpdate", void 0, elm);
|
|
2517
2517
|
}
|
|
2518
2518
|
}
|
|
2519
2519
|
emitLifecycleEvent(elm, "componentWillRender");
|
|
2520
2520
|
if (import_app_data13.BUILD.cmpWillRender) {
|
|
2521
|
-
maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender"));
|
|
2521
|
+
maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender", void 0, elm));
|
|
2522
2522
|
}
|
|
2523
2523
|
endSchedule();
|
|
2524
2524
|
return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
|
|
@@ -2631,7 +2631,7 @@ var postUpdateComponent = (hostRef) => {
|
|
|
2631
2631
|
if (import_app_data13.BUILD.isDev) {
|
|
2632
2632
|
hostRef.$flags$ |= 1024 /* devOnRender */;
|
|
2633
2633
|
}
|
|
2634
|
-
safeCall(instance, "componentDidRender");
|
|
2634
|
+
safeCall(instance, "componentDidRender", void 0, elm);
|
|
2635
2635
|
if (import_app_data13.BUILD.isDev) {
|
|
2636
2636
|
hostRef.$flags$ &= ~1024 /* devOnRender */;
|
|
2637
2637
|
}
|
|
@@ -2646,7 +2646,7 @@ var postUpdateComponent = (hostRef) => {
|
|
|
2646
2646
|
if (import_app_data13.BUILD.isDev) {
|
|
2647
2647
|
hostRef.$flags$ |= 2048 /* devOnDidLoad */;
|
|
2648
2648
|
}
|
|
2649
|
-
safeCall(instance, "componentDidLoad");
|
|
2649
|
+
safeCall(instance, "componentDidLoad", void 0, elm);
|
|
2650
2650
|
if (import_app_data13.BUILD.isDev) {
|
|
2651
2651
|
hostRef.$flags$ &= ~2048 /* devOnDidLoad */;
|
|
2652
2652
|
}
|
|
@@ -2664,7 +2664,7 @@ var postUpdateComponent = (hostRef) => {
|
|
|
2664
2664
|
if (import_app_data13.BUILD.isDev) {
|
|
2665
2665
|
hostRef.$flags$ |= 1024 /* devOnRender */;
|
|
2666
2666
|
}
|
|
2667
|
-
safeCall(instance, "componentDidUpdate");
|
|
2667
|
+
safeCall(instance, "componentDidUpdate", void 0, elm);
|
|
2668
2668
|
if (import_app_data13.BUILD.isDev) {
|
|
2669
2669
|
hostRef.$flags$ &= ~1024 /* devOnRender */;
|
|
2670
2670
|
}
|
|
@@ -2709,12 +2709,12 @@ var appDidLoad = (who) => {
|
|
|
2709
2709
|
performance.measure(`[Stencil] ${import_app_data13.NAMESPACE} initial load (by ${who})`, "st:app:start");
|
|
2710
2710
|
}
|
|
2711
2711
|
};
|
|
2712
|
-
var safeCall = (instance, method, arg) => {
|
|
2712
|
+
var safeCall = (instance, method, arg, elm) => {
|
|
2713
2713
|
if (instance && instance[method]) {
|
|
2714
2714
|
try {
|
|
2715
2715
|
return instance[method](arg);
|
|
2716
2716
|
} catch (e) {
|
|
2717
|
-
consoleError(e);
|
|
2717
|
+
consoleError(e, elm);
|
|
2718
2718
|
}
|
|
2719
2719
|
}
|
|
2720
2720
|
return void 0;
|
|
@@ -2817,6 +2817,12 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
2817
2817
|
var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
2818
2818
|
var _a, _b;
|
|
2819
2819
|
const prototype = Cstr.prototype;
|
|
2820
|
+
if (import_app_data15.BUILD.isTesting) {
|
|
2821
|
+
if (prototype.done) {
|
|
2822
|
+
return;
|
|
2823
|
+
}
|
|
2824
|
+
prototype.done = true;
|
|
2825
|
+
}
|
|
2820
2826
|
if (import_app_data15.BUILD.formAssociated && cmpMeta.$flags$ & 64 /* formAssociated */ && flags & 1 /* isElementConstructor */) {
|
|
2821
2827
|
FORM_ASSOCIATED_CUSTOM_ELEMENT_CALLBACKS.forEach((cbName) => {
|
|
2822
2828
|
const originalFormAssociatedCallback = prototype[cbName];
|
|
@@ -2876,8 +2882,8 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
2876
2882
|
(flags & 1 /* isElementConstructor */) === 0 && // if the class has a setter, then the Element can update instance values, so ignore
|
|
2877
2883
|
(cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0 && // the element is not constructing
|
|
2878
2884
|
(ref && ref.$flags$ & 8 /* isConstructingInstance */) === 0 && // the member is a prop
|
|
2879
|
-
(
|
|
2880
|
-
(
|
|
2885
|
+
(memberFlags & 31 /* Prop */) !== 0 && // the member is not mutable
|
|
2886
|
+
(memberFlags & 1024 /* Mutable */) === 0
|
|
2881
2887
|
) {
|
|
2882
2888
|
consoleDevWarn(
|
|
2883
2889
|
`@Prop() "${memberName}" on <${cmpMeta.$tagName$}> is immutable but was modified from within the component.
|
|
@@ -3000,8 +3006,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
3000
3006
|
let Cstr;
|
|
3001
3007
|
if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
|
|
3002
3008
|
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
3003
|
-
|
|
3004
|
-
if ((import_app_data16.BUILD.lazyLoad || import_app_data16.BUILD.hydrateClientSide) && bundleId) {
|
|
3009
|
+
if (import_app_data16.BUILD.lazyLoad || import_app_data16.BUILD.hydrateClientSide) {
|
|
3005
3010
|
const CstrImport = loadModule(cmpMeta, hostRef, hmrVersionId);
|
|
3006
3011
|
if (CstrImport && "then" in CstrImport) {
|
|
3007
3012
|
const endLoad = uniqueTime(
|
|
@@ -3030,7 +3035,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
3030
3035
|
try {
|
|
3031
3036
|
new Cstr(hostRef);
|
|
3032
3037
|
} catch (e) {
|
|
3033
|
-
consoleError(e);
|
|
3038
|
+
consoleError(e, elm);
|
|
3034
3039
|
}
|
|
3035
3040
|
if (import_app_data16.BUILD.member) {
|
|
3036
3041
|
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
@@ -3039,7 +3044,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
3039
3044
|
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
3040
3045
|
}
|
|
3041
3046
|
endNewInstance();
|
|
3042
|
-
fireConnectedCallback(hostRef.$lazyInstance
|
|
3047
|
+
fireConnectedCallback(hostRef.$lazyInstance$, elm);
|
|
3043
3048
|
} else {
|
|
3044
3049
|
Cstr = elm.constructor;
|
|
3045
3050
|
const cmpTag = elm.localName;
|
|
@@ -3078,9 +3083,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
3078
3083
|
schedule();
|
|
3079
3084
|
}
|
|
3080
3085
|
};
|
|
3081
|
-
var fireConnectedCallback = (instance) => {
|
|
3086
|
+
var fireConnectedCallback = (instance, elm) => {
|
|
3082
3087
|
if (import_app_data16.BUILD.lazyLoad && import_app_data16.BUILD.connectedCallback) {
|
|
3083
|
-
safeCall(instance, "connectedCallback");
|
|
3088
|
+
safeCall(instance, "connectedCallback", void 0, elm);
|
|
3084
3089
|
}
|
|
3085
3090
|
};
|
|
3086
3091
|
|
|
@@ -3141,9 +3146,9 @@ var connectedCallback = (elm) => {
|
|
|
3141
3146
|
} else {
|
|
3142
3147
|
addHostEventListeners(elm, hostRef, cmpMeta.$listeners$, false);
|
|
3143
3148
|
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
3144
|
-
fireConnectedCallback(hostRef.$lazyInstance
|
|
3149
|
+
fireConnectedCallback(hostRef.$lazyInstance$, elm);
|
|
3145
3150
|
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
3146
|
-
hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance
|
|
3151
|
+
hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$, elm));
|
|
3147
3152
|
}
|
|
3148
3153
|
}
|
|
3149
3154
|
endConnected();
|
|
@@ -3159,12 +3164,12 @@ var setContentReference = (elm) => {
|
|
|
3159
3164
|
|
|
3160
3165
|
// src/runtime/disconnected-callback.ts
|
|
3161
3166
|
var import_app_data18 = require("@stencil/core/internal/app-data");
|
|
3162
|
-
var disconnectInstance = (instance) => {
|
|
3167
|
+
var disconnectInstance = (instance, elm) => {
|
|
3163
3168
|
if (import_app_data18.BUILD.lazyLoad && import_app_data18.BUILD.disconnectedCallback) {
|
|
3164
|
-
safeCall(instance, "disconnectedCallback");
|
|
3169
|
+
safeCall(instance, "disconnectedCallback", void 0, elm || instance);
|
|
3165
3170
|
}
|
|
3166
3171
|
if (import_app_data18.BUILD.cmpDidUnload) {
|
|
3167
|
-
safeCall(instance, "componentDidUnload");
|
|
3172
|
+
safeCall(instance, "componentDidUnload", void 0, elm || instance);
|
|
3168
3173
|
}
|
|
3169
3174
|
};
|
|
3170
3175
|
var disconnectedCallback = async (elm) => {
|
|
@@ -3179,9 +3184,9 @@ var disconnectedCallback = async (elm) => {
|
|
|
3179
3184
|
if (!import_app_data18.BUILD.lazyLoad) {
|
|
3180
3185
|
disconnectInstance(elm);
|
|
3181
3186
|
} else if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
3182
|
-
disconnectInstance(hostRef.$lazyInstance
|
|
3187
|
+
disconnectInstance(hostRef.$lazyInstance$, elm);
|
|
3183
3188
|
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
3184
|
-
hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance
|
|
3189
|
+
hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$, elm));
|
|
3185
3190
|
}
|
|
3186
3191
|
}
|
|
3187
3192
|
if (rootAppliedStyles.has(elm)) {
|
|
@@ -3544,7 +3549,7 @@ var hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
|
3544
3549
|
hostRef.$hostElement$[methodName](ev);
|
|
3545
3550
|
}
|
|
3546
3551
|
} catch (e) {
|
|
3547
|
-
consoleError(e);
|
|
3552
|
+
consoleError(e, hostRef.$hostElement$);
|
|
3548
3553
|
}
|
|
3549
3554
|
};
|
|
3550
3555
|
var getHostListenerTarget = (elm, flags) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stencil/core/internal/testing",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.25.0-dev.1737694903.66340b2",
|
|
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.
|
|
2
|
+
Stencil Mock Doc (CommonJS) v4.25.0-dev.1737694903.66340b2 | MIT Licensed | https://stenciljs.com
|
|
3
3
|
*/
|
|
4
4
|
"use strict";
|
|
5
5
|
var __defProp = Object.defineProperty;
|
|
@@ -7795,6 +7795,10 @@ function createElement(ownerDocument, tagName) {
|
|
|
7795
7795
|
return new MockMetaElement(ownerDocument);
|
|
7796
7796
|
case "script":
|
|
7797
7797
|
return new MockScriptElement(ownerDocument);
|
|
7798
|
+
case "slot":
|
|
7799
|
+
return new MockSlotElement(ownerDocument);
|
|
7800
|
+
case "slot-fb":
|
|
7801
|
+
return new MockHTMLElement(ownerDocument, tagName);
|
|
7798
7802
|
case "style":
|
|
7799
7803
|
return new MockStyleElement(ownerDocument);
|
|
7800
7804
|
case "template":
|
|
@@ -7803,8 +7807,6 @@ function createElement(ownerDocument, tagName) {
|
|
|
7803
7807
|
return new MockTitleElement(ownerDocument);
|
|
7804
7808
|
case "ul":
|
|
7805
7809
|
return new MockUListElement(ownerDocument);
|
|
7806
|
-
case "slot-fb":
|
|
7807
|
-
return new MockHTMLElement(ownerDocument, tagName);
|
|
7808
7810
|
}
|
|
7809
7811
|
if (ownerDocument != null && tagName.includes("-")) {
|
|
7810
7812
|
const win = ownerDocument.defaultView;
|
|
@@ -8224,6 +8226,68 @@ var MockUListElement = class extends MockHTMLElement {
|
|
|
8224
8226
|
super(ownerDocument, "ul");
|
|
8225
8227
|
}
|
|
8226
8228
|
};
|
|
8229
|
+
var MockSlotElement = class _MockSlotElement extends MockHTMLElement {
|
|
8230
|
+
constructor(ownerDocument) {
|
|
8231
|
+
super(ownerDocument, "slot");
|
|
8232
|
+
}
|
|
8233
|
+
assignedNodes(opts) {
|
|
8234
|
+
let nodesToReturn = [];
|
|
8235
|
+
const ownerHost = this.getRootNode().host;
|
|
8236
|
+
if (!ownerHost) return nodesToReturn;
|
|
8237
|
+
if (ownerHost.childNodes.length) {
|
|
8238
|
+
if (this.name) {
|
|
8239
|
+
nodesToReturn = ownerHost.childNodes.filter(
|
|
8240
|
+
(n) => n.nodeType === 1 /* ELEMENT_NODE */ && n.getAttribute("slot") === this.name
|
|
8241
|
+
);
|
|
8242
|
+
} else {
|
|
8243
|
+
nodesToReturn = ownerHost.childNodes.filter(
|
|
8244
|
+
(n) => n.nodeType === 1 /* ELEMENT_NODE */ && !n.getAttribute("slot") || n.nodeType !== 1 /* ELEMENT_NODE */
|
|
8245
|
+
);
|
|
8246
|
+
}
|
|
8247
|
+
if (nodesToReturn.length) return nodesToReturn;
|
|
8248
|
+
}
|
|
8249
|
+
if (!(opts == null ? void 0 : opts.flatten)) return this.childNodes.filter((n) => !(n instanceof _MockSlotElement));
|
|
8250
|
+
return this.childNodes.reduce(
|
|
8251
|
+
(acc, node) => {
|
|
8252
|
+
if (node instanceof _MockSlotElement) {
|
|
8253
|
+
acc.push(...node.assignedNodes(opts));
|
|
8254
|
+
} else {
|
|
8255
|
+
acc.push(node);
|
|
8256
|
+
}
|
|
8257
|
+
return acc;
|
|
8258
|
+
},
|
|
8259
|
+
[]
|
|
8260
|
+
);
|
|
8261
|
+
}
|
|
8262
|
+
assignedElements(opts) {
|
|
8263
|
+
let elesToReturn = [];
|
|
8264
|
+
const ownerHost = this.getRootNode().host;
|
|
8265
|
+
if (!ownerHost) return elesToReturn;
|
|
8266
|
+
if (ownerHost.children.length) {
|
|
8267
|
+
if (this.name) {
|
|
8268
|
+
elesToReturn = ownerHost.children.filter((n) => n.getAttribute("slot") == this.name);
|
|
8269
|
+
} else {
|
|
8270
|
+
elesToReturn = ownerHost.children.filter((n) => !n.getAttribute("slot"));
|
|
8271
|
+
}
|
|
8272
|
+
if (elesToReturn.length) return elesToReturn;
|
|
8273
|
+
}
|
|
8274
|
+
if (!(opts == null ? void 0 : opts.flatten)) return this.children.filter((n) => !(n instanceof _MockSlotElement));
|
|
8275
|
+
return this.children.reduce(
|
|
8276
|
+
(acc, node) => {
|
|
8277
|
+
if (node instanceof _MockSlotElement) {
|
|
8278
|
+
acc.push(...node.assignedElements(opts));
|
|
8279
|
+
} else {
|
|
8280
|
+
acc.push(node);
|
|
8281
|
+
}
|
|
8282
|
+
return acc;
|
|
8283
|
+
},
|
|
8284
|
+
[]
|
|
8285
|
+
);
|
|
8286
|
+
}
|
|
8287
|
+
};
|
|
8288
|
+
patchPropAttributes(MockSlotElement.prototype, {
|
|
8289
|
+
name: String
|
|
8290
|
+
});
|
|
8227
8291
|
var CanvasRenderingContext = class {
|
|
8228
8292
|
constructor(context, contextAttributes) {
|
|
8229
8293
|
this.context = context;
|
package/mock-doc/index.d.ts
CHANGED
|
@@ -312,6 +312,15 @@ declare class MockTitleElement extends MockHTMLElement {
|
|
|
312
312
|
declare class MockUListElement extends MockHTMLElement {
|
|
313
313
|
constructor(ownerDocument: any);
|
|
314
314
|
}
|
|
315
|
+
declare class MockSlotElement extends MockHTMLElement {
|
|
316
|
+
constructor(ownerDocument: any);
|
|
317
|
+
assignedNodes(opts?: {
|
|
318
|
+
flatten: boolean;
|
|
319
|
+
}): (MockNode | Node)[];
|
|
320
|
+
assignedElements(opts?: {
|
|
321
|
+
flatten: boolean;
|
|
322
|
+
}): (Element | MockHTMLElement)[];
|
|
323
|
+
}
|
|
315
324
|
type CanvasContext = '2d' | 'webgl' | 'webgl2' | 'bitmaprenderer';
|
|
316
325
|
declare class CanvasRenderingContext {
|
|
317
326
|
context: CanvasContext;
|
package/mock-doc/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
Stencil Mock Doc v4.
|
|
2
|
+
Stencil Mock Doc v4.25.0-dev.1737694903.66340b2 | MIT Licensed | https://stenciljs.com
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
// src/runtime/runtime-constants.ts
|
|
@@ -7742,6 +7742,10 @@ function createElement(ownerDocument, tagName) {
|
|
|
7742
7742
|
return new MockMetaElement(ownerDocument);
|
|
7743
7743
|
case "script":
|
|
7744
7744
|
return new MockScriptElement(ownerDocument);
|
|
7745
|
+
case "slot":
|
|
7746
|
+
return new MockSlotElement(ownerDocument);
|
|
7747
|
+
case "slot-fb":
|
|
7748
|
+
return new MockHTMLElement(ownerDocument, tagName);
|
|
7745
7749
|
case "style":
|
|
7746
7750
|
return new MockStyleElement(ownerDocument);
|
|
7747
7751
|
case "template":
|
|
@@ -7750,8 +7754,6 @@ function createElement(ownerDocument, tagName) {
|
|
|
7750
7754
|
return new MockTitleElement(ownerDocument);
|
|
7751
7755
|
case "ul":
|
|
7752
7756
|
return new MockUListElement(ownerDocument);
|
|
7753
|
-
case "slot-fb":
|
|
7754
|
-
return new MockHTMLElement(ownerDocument, tagName);
|
|
7755
7757
|
}
|
|
7756
7758
|
if (ownerDocument != null && tagName.includes("-")) {
|
|
7757
7759
|
const win = ownerDocument.defaultView;
|
|
@@ -8171,6 +8173,68 @@ var MockUListElement = class extends MockHTMLElement {
|
|
|
8171
8173
|
super(ownerDocument, "ul");
|
|
8172
8174
|
}
|
|
8173
8175
|
};
|
|
8176
|
+
var MockSlotElement = class _MockSlotElement extends MockHTMLElement {
|
|
8177
|
+
constructor(ownerDocument) {
|
|
8178
|
+
super(ownerDocument, "slot");
|
|
8179
|
+
}
|
|
8180
|
+
assignedNodes(opts) {
|
|
8181
|
+
let nodesToReturn = [];
|
|
8182
|
+
const ownerHost = this.getRootNode().host;
|
|
8183
|
+
if (!ownerHost) return nodesToReturn;
|
|
8184
|
+
if (ownerHost.childNodes.length) {
|
|
8185
|
+
if (this.name) {
|
|
8186
|
+
nodesToReturn = ownerHost.childNodes.filter(
|
|
8187
|
+
(n) => n.nodeType === 1 /* ELEMENT_NODE */ && n.getAttribute("slot") === this.name
|
|
8188
|
+
);
|
|
8189
|
+
} else {
|
|
8190
|
+
nodesToReturn = ownerHost.childNodes.filter(
|
|
8191
|
+
(n) => n.nodeType === 1 /* ELEMENT_NODE */ && !n.getAttribute("slot") || n.nodeType !== 1 /* ELEMENT_NODE */
|
|
8192
|
+
);
|
|
8193
|
+
}
|
|
8194
|
+
if (nodesToReturn.length) return nodesToReturn;
|
|
8195
|
+
}
|
|
8196
|
+
if (!(opts == null ? void 0 : opts.flatten)) return this.childNodes.filter((n) => !(n instanceof _MockSlotElement));
|
|
8197
|
+
return this.childNodes.reduce(
|
|
8198
|
+
(acc, node) => {
|
|
8199
|
+
if (node instanceof _MockSlotElement) {
|
|
8200
|
+
acc.push(...node.assignedNodes(opts));
|
|
8201
|
+
} else {
|
|
8202
|
+
acc.push(node);
|
|
8203
|
+
}
|
|
8204
|
+
return acc;
|
|
8205
|
+
},
|
|
8206
|
+
[]
|
|
8207
|
+
);
|
|
8208
|
+
}
|
|
8209
|
+
assignedElements(opts) {
|
|
8210
|
+
let elesToReturn = [];
|
|
8211
|
+
const ownerHost = this.getRootNode().host;
|
|
8212
|
+
if (!ownerHost) return elesToReturn;
|
|
8213
|
+
if (ownerHost.children.length) {
|
|
8214
|
+
if (this.name) {
|
|
8215
|
+
elesToReturn = ownerHost.children.filter((n) => n.getAttribute("slot") == this.name);
|
|
8216
|
+
} else {
|
|
8217
|
+
elesToReturn = ownerHost.children.filter((n) => !n.getAttribute("slot"));
|
|
8218
|
+
}
|
|
8219
|
+
if (elesToReturn.length) return elesToReturn;
|
|
8220
|
+
}
|
|
8221
|
+
if (!(opts == null ? void 0 : opts.flatten)) return this.children.filter((n) => !(n instanceof _MockSlotElement));
|
|
8222
|
+
return this.children.reduce(
|
|
8223
|
+
(acc, node) => {
|
|
8224
|
+
if (node instanceof _MockSlotElement) {
|
|
8225
|
+
acc.push(...node.assignedElements(opts));
|
|
8226
|
+
} else {
|
|
8227
|
+
acc.push(node);
|
|
8228
|
+
}
|
|
8229
|
+
return acc;
|
|
8230
|
+
},
|
|
8231
|
+
[]
|
|
8232
|
+
);
|
|
8233
|
+
}
|
|
8234
|
+
};
|
|
8235
|
+
patchPropAttributes(MockSlotElement.prototype, {
|
|
8236
|
+
name: String
|
|
8237
|
+
});
|
|
8174
8238
|
var CanvasRenderingContext = class {
|
|
8175
8239
|
constructor(context, contextAttributes) {
|
|
8176
8240
|
this.context = context;
|
package/mock-doc/package.json
CHANGED