@stencil/core 4.40.0 → 4.40.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 +4 -1
- package/cli/index.js +4 -1
- package/cli/package.json +1 -1
- package/compiler/package.json +1 -1
- package/compiler/stencil.js +41 -38
- 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 +5 -2
- package/internal/app-data/package.json +1 -1
- package/internal/app-globals/package.json +1 -1
- package/internal/client/index.js +4 -1
- package/internal/client/package.json +1 -1
- package/internal/client/patch-browser.js +1 -1
- package/internal/hydrate/index.js +1 -1
- package/internal/hydrate/package.json +1 -1
- package/internal/hydrate/runner.js +35 -33
- package/internal/package.json +1 -1
- package/internal/testing/package.json +1 -1
- package/mock-doc/index.cjs +1 -1
- package/mock-doc/index.js +1 -1
- package/mock-doc/package.json +1 -1
- package/package.json +1 -1
- package/screenshot/index.js +4 -1
- package/screenshot/package.json +1 -1
- package/screenshot/pixel-match.js +1 -1
- package/sys/node/index.js +10 -10
- 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,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stencil/core/internal/hydrate",
|
|
3
|
-
"version": "4.40.
|
|
3
|
+
"version": "4.40.1",
|
|
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.40.
|
|
2
|
+
Stencil Hydrate Runner v4.40.1 | MIT Licensed | https://stenciljs.com
|
|
3
3
|
*/
|
|
4
4
|
var __create = Object.create;
|
|
5
5
|
var __defProp = Object.defineProperty;
|
|
@@ -324,6 +324,9 @@ var H = win.HTMLElement || class {
|
|
|
324
324
|
var supportsShadow = BUILD6.shadowDom;
|
|
325
325
|
var supportsConstructableStylesheets = BUILD6.constructableCSS ? /* @__PURE__ */ (() => {
|
|
326
326
|
try {
|
|
327
|
+
if (!win.document.adoptedStyleSheets) {
|
|
328
|
+
return false;
|
|
329
|
+
}
|
|
327
330
|
new CSSStyleSheet();
|
|
328
331
|
return typeof new CSSStyleSheet().replaceSync === "function";
|
|
329
332
|
} catch (e) {
|
|
@@ -16497,7 +16500,7 @@ var parseCss = (css, filePath) => {
|
|
|
16497
16500
|
const stylesheet = () => {
|
|
16498
16501
|
const rulesList = rules();
|
|
16499
16502
|
return {
|
|
16500
|
-
type:
|
|
16503
|
+
type: 15 /* StyleSheet */,
|
|
16501
16504
|
stylesheet: {
|
|
16502
16505
|
source: filePath,
|
|
16503
16506
|
rules: rulesList
|
|
@@ -16636,7 +16639,7 @@ var parseCss = (css, filePath) => {
|
|
|
16636
16639
|
const style = comments().concat(rules());
|
|
16637
16640
|
if (!close()) return error(`@supports missing '}'`);
|
|
16638
16641
|
return pos({
|
|
16639
|
-
type:
|
|
16642
|
+
type: 16 /* Supports */,
|
|
16640
16643
|
supports,
|
|
16641
16644
|
rules: style
|
|
16642
16645
|
});
|
|
@@ -16653,49 +16656,38 @@ var parseCss = (css, filePath) => {
|
|
|
16653
16656
|
rules: style
|
|
16654
16657
|
});
|
|
16655
16658
|
};
|
|
16656
|
-
const
|
|
16659
|
+
const atquery = (name) => {
|
|
16657
16660
|
const pos = position();
|
|
16658
|
-
const
|
|
16661
|
+
const regex = new RegExp("^@" + name + " *([^{]+)");
|
|
16662
|
+
const m = match2(regex);
|
|
16659
16663
|
if (!m) return null;
|
|
16660
16664
|
const media = trim(m[1]);
|
|
16661
|
-
if (!open()) return error(
|
|
16665
|
+
if (!open()) return error(`@${name} missing '{'`);
|
|
16662
16666
|
const style = comments().concat(rules());
|
|
16663
|
-
if (!close()) return error(
|
|
16667
|
+
if (!close()) return error(`@${name} missing '}'`);
|
|
16664
16668
|
return pos({
|
|
16665
|
-
type: 10 /* Media */,
|
|
16669
|
+
type: name === "media" ? 10 /* Media */ : 11 /* Container */,
|
|
16666
16670
|
media,
|
|
16667
16671
|
rules: style
|
|
16668
16672
|
});
|
|
16669
16673
|
};
|
|
16670
|
-
const
|
|
16674
|
+
const nestedAtQuery = (name) => {
|
|
16671
16675
|
const pos = position();
|
|
16672
|
-
const
|
|
16676
|
+
const regex = new RegExp("^@" + name + " *([^{]+)");
|
|
16677
|
+
const m = match2(regex);
|
|
16673
16678
|
if (!m) return null;
|
|
16674
16679
|
const media = trim(m[1]);
|
|
16675
16680
|
const decls = declarations();
|
|
16676
16681
|
if (!decls) return null;
|
|
16677
16682
|
return pos({
|
|
16678
|
-
type: 10 /* Media */,
|
|
16683
|
+
type: name === "media" ? 10 /* Media */ : name === "container" ? 11 /* Container */ : 16 /* Supports */,
|
|
16679
16684
|
media,
|
|
16680
16685
|
declarations: decls
|
|
16681
16686
|
});
|
|
16682
16687
|
};
|
|
16683
|
-
const nestedAtsupports = () => {
|
|
16684
|
-
const pos = position();
|
|
16685
|
-
const m = match2(/^@supports *([^{]+)/);
|
|
16686
|
-
if (!m) return null;
|
|
16687
|
-
const supports = trim(m[1]);
|
|
16688
|
-
const decls = declarations();
|
|
16689
|
-
if (!decls) return null;
|
|
16690
|
-
return pos({
|
|
16691
|
-
type: 15 /* Supports */,
|
|
16692
|
-
supports,
|
|
16693
|
-
declarations: decls
|
|
16694
|
-
});
|
|
16695
|
-
};
|
|
16696
16688
|
const nestedAtrule = () => {
|
|
16697
16689
|
if (css[0] !== "@") return null;
|
|
16698
|
-
return
|
|
16690
|
+
return nestedAtQuery("media") || nestedAtQuery("supports") || nestedAtQuery("container");
|
|
16699
16691
|
};
|
|
16700
16692
|
const atcustommedia = () => {
|
|
16701
16693
|
const pos = position();
|
|
@@ -16721,7 +16713,7 @@ var parseCss = (css, filePath) => {
|
|
|
16721
16713
|
}
|
|
16722
16714
|
if (!close()) return error(`@page missing '}'`);
|
|
16723
16715
|
return pos({
|
|
16724
|
-
type:
|
|
16716
|
+
type: 13 /* Page */,
|
|
16725
16717
|
selectors: sel,
|
|
16726
16718
|
declarations: decls
|
|
16727
16719
|
});
|
|
@@ -16774,10 +16766,10 @@ var parseCss = (css, filePath) => {
|
|
|
16774
16766
|
};
|
|
16775
16767
|
const atimport = compileAtrule("import", 7 /* Import */);
|
|
16776
16768
|
const atcharset = compileAtrule("charset", 0 /* Charset */);
|
|
16777
|
-
const atnamespace = compileAtrule("namespace",
|
|
16769
|
+
const atnamespace = compileAtrule("namespace", 12 /* Namespace */);
|
|
16778
16770
|
const atrule = () => {
|
|
16779
16771
|
if (css[0] !== "@") return null;
|
|
16780
|
-
return atkeyframes() ||
|
|
16772
|
+
return atkeyframes() || atquery("media") || atquery("container") || atcustommedia() || atsupports() || atimport() || atcharset() || atnamespace() || atdocument() || atpage() || athost() || atfontface();
|
|
16781
16773
|
};
|
|
16782
16774
|
const rule = () => {
|
|
16783
16775
|
const pos = position();
|
|
@@ -16833,7 +16825,7 @@ var parseCss = (css, filePath) => {
|
|
|
16833
16825
|
}
|
|
16834
16826
|
if (!close()) return error(`missing '}'`);
|
|
16835
16827
|
return pos({
|
|
16836
|
-
type:
|
|
16828
|
+
type: 14 /* Rule */,
|
|
16837
16829
|
selectors: sel,
|
|
16838
16830
|
declarations: decls,
|
|
16839
16831
|
rules: nestedRules.length > 0 ? nestedRules : null
|
|
@@ -16939,7 +16931,7 @@ var serializeCssVisitNode = (opts, node, index, len) => {
|
|
|
16939
16931
|
if (nodeType === 4 /* Declaration */) {
|
|
16940
16932
|
return serializeCssDeclaration(node, index, len);
|
|
16941
16933
|
}
|
|
16942
|
-
if (nodeType ===
|
|
16934
|
+
if (nodeType === 14 /* Rule */) {
|
|
16943
16935
|
return serializeCssRule(opts, node);
|
|
16944
16936
|
}
|
|
16945
16937
|
if (nodeType === 1 /* Comment */) {
|
|
@@ -16952,6 +16944,9 @@ var serializeCssVisitNode = (opts, node, index, len) => {
|
|
|
16952
16944
|
if (nodeType === 10 /* Media */) {
|
|
16953
16945
|
return serializeCssMedia(opts, node);
|
|
16954
16946
|
}
|
|
16947
|
+
if (nodeType === 11 /* Container */) {
|
|
16948
|
+
return serializeCssContainer(opts, node);
|
|
16949
|
+
}
|
|
16955
16950
|
if (nodeType === 8 /* KeyFrames */) {
|
|
16956
16951
|
return serializeCssKeyframes(opts, node);
|
|
16957
16952
|
}
|
|
@@ -16961,7 +16956,7 @@ var serializeCssVisitNode = (opts, node, index, len) => {
|
|
|
16961
16956
|
if (nodeType === 5 /* FontFace */) {
|
|
16962
16957
|
return serializeCssFontFace(opts, node);
|
|
16963
16958
|
}
|
|
16964
|
-
if (nodeType ===
|
|
16959
|
+
if (nodeType === 16 /* Supports */) {
|
|
16965
16960
|
return serializeCssSupports(opts, node);
|
|
16966
16961
|
}
|
|
16967
16962
|
if (nodeType === 7 /* Import */) {
|
|
@@ -16970,7 +16965,7 @@ var serializeCssVisitNode = (opts, node, index, len) => {
|
|
|
16970
16965
|
if (nodeType === 0 /* Charset */) {
|
|
16971
16966
|
return "@charset " + node.charset + ";";
|
|
16972
16967
|
}
|
|
16973
|
-
if (nodeType ===
|
|
16968
|
+
if (nodeType === 13 /* Page */) {
|
|
16974
16969
|
return serializeCssPage(opts, node);
|
|
16975
16970
|
}
|
|
16976
16971
|
if (nodeType === 6 /* Host */) {
|
|
@@ -16982,7 +16977,7 @@ var serializeCssVisitNode = (opts, node, index, len) => {
|
|
|
16982
16977
|
if (nodeType === 3 /* Document */) {
|
|
16983
16978
|
return serializeCssDocument(opts, node);
|
|
16984
16979
|
}
|
|
16985
|
-
if (nodeType ===
|
|
16980
|
+
if (nodeType === 12 /* Namespace */) {
|
|
16986
16981
|
return "@namespace " + node.namespace + ";";
|
|
16987
16982
|
}
|
|
16988
16983
|
return "";
|
|
@@ -17112,6 +17107,13 @@ var serializeCssSupports = (opts, node) => {
|
|
|
17112
17107
|
}
|
|
17113
17108
|
return "@supports " + node.supports + "{" + supportsCss + "}";
|
|
17114
17109
|
};
|
|
17110
|
+
var serializeCssContainer = (opts, node) => {
|
|
17111
|
+
const containerCss = node.declarations ? serializeCssMapVisit(opts, node.declarations) : serializeCssMapVisit(opts, node.rules);
|
|
17112
|
+
if (containerCss === "") {
|
|
17113
|
+
return "";
|
|
17114
|
+
}
|
|
17115
|
+
return "@container " + removeMediaWhitespace(node.media) + "{" + containerCss + "}";
|
|
17116
|
+
};
|
|
17115
17117
|
var serializeCssPage = (opts, node) => {
|
|
17116
17118
|
var _a2, _b;
|
|
17117
17119
|
const sel = (_b = (_a2 = node.selectors) == null ? void 0 : _a2.join(", ")) != null ? _b : "";
|
package/internal/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stencil/core/internal/testing",
|
|
3
|
-
"version": "4.40.
|
|
3
|
+
"version": "4.40.1",
|
|
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
package/mock-doc/index.js
CHANGED
package/mock-doc/package.json
CHANGED
package/package.json
CHANGED
package/screenshot/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Stencil Screenshot v4.40.
|
|
2
|
+
Stencil Screenshot v4.40.1 | MIT Licensed | https://stenciljs.com
|
|
3
3
|
*/
|
|
4
4
|
"use strict";
|
|
5
5
|
var __create = Object.create;
|
|
@@ -2265,6 +2265,9 @@ var H = win.HTMLElement || class {
|
|
|
2265
2265
|
var supportsShadow = BUILD.shadowDom;
|
|
2266
2266
|
var supportsConstructableStylesheets = BUILD.constructableCSS ? /* @__PURE__ */ (() => {
|
|
2267
2267
|
try {
|
|
2268
|
+
if (!win.document.adoptedStyleSheets) {
|
|
2269
|
+
return false;
|
|
2270
|
+
}
|
|
2268
2271
|
new CSSStyleSheet();
|
|
2269
2272
|
return typeof new CSSStyleSheet().replaceSync === "function";
|
|
2270
2273
|
} catch (e) {
|
package/screenshot/package.json
CHANGED