@stencil/core 4.35.3-dev.1751864631.58bc2b5 → 4.35.3-dev.1752037473.56fe6e3
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/app-globals/package.json +1 -1
- package/internal/client/index.js +20 -4
- package/internal/client/package.json +1 -1
- package/internal/client/patch-browser.js +1 -1
- package/internal/hydrate/index.js +20 -4
- package/internal/hydrate/package.json +1 -1
- package/internal/hydrate/runner.js +8 -1
- package/internal/package.json +1 -1
- package/internal/testing/index.js +20 -3
- package/internal/testing/package.json +1 -1
- package/mock-doc/index.cjs +8 -1
- package/mock-doc/index.js +8 -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 +8 -8
- package/sys/node/package.json +1 -1
- package/sys/node/worker.js +1 -1
- package/testing/index.js +2 -1
- package/testing/package.json +1 -1
|
@@ -80,6 +80,7 @@ __export(index_exports, {
|
|
|
80
80
|
styles: () => styles,
|
|
81
81
|
supportsConstructableStylesheets: () => supportsConstructableStylesheets,
|
|
82
82
|
supportsListenerOptions: () => supportsListenerOptions,
|
|
83
|
+
supportsMutableAdoptedStyleSheets: () => supportsMutableAdoptedStyleSheets,
|
|
83
84
|
supportsShadow: () => supportsShadow,
|
|
84
85
|
win: () => win,
|
|
85
86
|
writeTask: () => writeTask
|
|
@@ -310,6 +311,7 @@ var setPlatformHelpers = (helpers) => {
|
|
|
310
311
|
};
|
|
311
312
|
var supportsListenerOptions = true;
|
|
312
313
|
var supportsConstructableStylesheets = false;
|
|
314
|
+
var supportsMutableAdoptedStyleSheets = false;
|
|
313
315
|
var setSupportsShadowDom = (supports) => {
|
|
314
316
|
supportsShadow = supports;
|
|
315
317
|
};
|
|
@@ -609,7 +611,13 @@ function createShadowRoot(cmpMeta) {
|
|
|
609
611
|
delegatesFocus: !!(cmpMeta.$flags$ & 16 /* shadowDelegatesFocus */)
|
|
610
612
|
}) : this.attachShadow({ mode: "open" });
|
|
611
613
|
if (globalStyleSheet === void 0) globalStyleSheet = (_a = createStyleSheetIfNeededAndSupported(globalStyles)) != null ? _a : null;
|
|
612
|
-
if (globalStyleSheet)
|
|
614
|
+
if (globalStyleSheet) {
|
|
615
|
+
if (supportsMutableAdoptedStyleSheets) {
|
|
616
|
+
shadowRoot.adoptedStyleSheets.push(globalStyleSheet);
|
|
617
|
+
} else {
|
|
618
|
+
shadowRoot.adoptedStyleSheets = [...shadowRoot.adoptedStyleSheets, globalStyleSheet];
|
|
619
|
+
}
|
|
620
|
+
}
|
|
613
621
|
}
|
|
614
622
|
|
|
615
623
|
// src/utils/util.ts
|
|
@@ -1322,7 +1330,11 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
1322
1330
|
if (supportsConstructableStylesheets) {
|
|
1323
1331
|
const stylesheet = new CSSStyleSheet();
|
|
1324
1332
|
stylesheet.replaceSync(style);
|
|
1325
|
-
|
|
1333
|
+
if (supportsMutableAdoptedStyleSheets) {
|
|
1334
|
+
styleContainerNode.adoptedStyleSheets.unshift(stylesheet);
|
|
1335
|
+
} else {
|
|
1336
|
+
styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
|
|
1337
|
+
}
|
|
1326
1338
|
} else {
|
|
1327
1339
|
const existingStyleContainer = styleContainerNode.querySelector("style");
|
|
1328
1340
|
if (existingStyleContainer) {
|
|
@@ -1347,7 +1359,11 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
1347
1359
|
}
|
|
1348
1360
|
}
|
|
1349
1361
|
} else if (import_app_data5.BUILD.constructableCSS && !styleContainerNode.adoptedStyleSheets.includes(style)) {
|
|
1350
|
-
|
|
1362
|
+
if (supportsMutableAdoptedStyleSheets) {
|
|
1363
|
+
styleContainerNode.adoptedStyleSheets.push(style);
|
|
1364
|
+
} else {
|
|
1365
|
+
styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
|
|
1366
|
+
}
|
|
1351
1367
|
}
|
|
1352
1368
|
}
|
|
1353
1369
|
return scopeId2;
|
|
@@ -4531,6 +4547,7 @@ var scopedSSR = false;
|
|
|
4531
4547
|
styles,
|
|
4532
4548
|
supportsConstructableStylesheets,
|
|
4533
4549
|
supportsListenerOptions,
|
|
4550
|
+
supportsMutableAdoptedStyleSheets,
|
|
4534
4551
|
supportsShadow,
|
|
4535
4552
|
win,
|
|
4536
4553
|
writeTask
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stencil/core/internal/testing",
|
|
3
|
-
"version": "4.35.3-dev.
|
|
3
|
+
"version": "4.35.3-dev.1752037473.56fe6e3",
|
|
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.35.3-dev.
|
|
2
|
+
Stencil Mock Doc (CommonJS) v4.35.3-dev.1752037473.56fe6e3 | MIT Licensed | https://stenciljs.com
|
|
3
3
|
*/
|
|
4
4
|
"use strict";
|
|
5
5
|
var __defProp = Object.defineProperty;
|
|
@@ -6263,6 +6263,11 @@ function* streamToHtml(node, opts, output) {
|
|
|
6263
6263
|
const mode = ` shadowrootmode="open"`;
|
|
6264
6264
|
yield mode;
|
|
6265
6265
|
output.currentLineWidth += mode.length;
|
|
6266
|
+
if (node.delegatesFocus) {
|
|
6267
|
+
const delegatesFocusAttr = " shadowrootdelegatesfocus";
|
|
6268
|
+
yield delegatesFocusAttr;
|
|
6269
|
+
output.currentLineWidth += delegatesFocusAttr.length;
|
|
6270
|
+
}
|
|
6266
6271
|
}
|
|
6267
6272
|
const attrsLength = node.attributes.length;
|
|
6268
6273
|
const attributes = opts.prettyHtml && attrsLength > 1 ? cloneAttributes(node.attributes, true) : node.attributes;
|
|
@@ -6828,7 +6833,9 @@ var MockElement = class extends MockNode2 {
|
|
|
6828
6833
|
addEventListener(this, type, handler);
|
|
6829
6834
|
}
|
|
6830
6835
|
attachShadow(_opts) {
|
|
6836
|
+
var _a;
|
|
6831
6837
|
const shadowRoot = this.ownerDocument.createDocumentFragment();
|
|
6838
|
+
shadowRoot.delegatesFocus = (_a = _opts.delegatesFocus) != null ? _a : false;
|
|
6832
6839
|
this.shadowRoot = shadowRoot;
|
|
6833
6840
|
return shadowRoot;
|
|
6834
6841
|
}
|
package/mock-doc/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
Stencil Mock Doc v4.35.3-dev.
|
|
2
|
+
Stencil Mock Doc v4.35.3-dev.1752037473.56fe6e3 | MIT Licensed | https://stenciljs.com
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
// src/runtime/runtime-constants.ts
|
|
@@ -6210,6 +6210,11 @@ function* streamToHtml(node, opts, output) {
|
|
|
6210
6210
|
const mode = ` shadowrootmode="open"`;
|
|
6211
6211
|
yield mode;
|
|
6212
6212
|
output.currentLineWidth += mode.length;
|
|
6213
|
+
if (node.delegatesFocus) {
|
|
6214
|
+
const delegatesFocusAttr = " shadowrootdelegatesfocus";
|
|
6215
|
+
yield delegatesFocusAttr;
|
|
6216
|
+
output.currentLineWidth += delegatesFocusAttr.length;
|
|
6217
|
+
}
|
|
6213
6218
|
}
|
|
6214
6219
|
const attrsLength = node.attributes.length;
|
|
6215
6220
|
const attributes = opts.prettyHtml && attrsLength > 1 ? cloneAttributes(node.attributes, true) : node.attributes;
|
|
@@ -6775,7 +6780,9 @@ var MockElement = class extends MockNode2 {
|
|
|
6775
6780
|
addEventListener(this, type, handler);
|
|
6776
6781
|
}
|
|
6777
6782
|
attachShadow(_opts) {
|
|
6783
|
+
var _a;
|
|
6778
6784
|
const shadowRoot = this.ownerDocument.createDocumentFragment();
|
|
6785
|
+
shadowRoot.delegatesFocus = (_a = _opts.delegatesFocus) != null ? _a : false;
|
|
6779
6786
|
this.shadowRoot = shadowRoot;
|
|
6780
6787
|
return shadowRoot;
|
|
6781
6788
|
}
|
package/mock-doc/package.json
CHANGED
package/package.json
CHANGED
package/screenshot/index.js
CHANGED
package/screenshot/package.json
CHANGED