@stencil/core 2.10.0 → 2.11.0-0

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.
@@ -1,10 +1,10 @@
1
- const _parenSuffix = ")(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))?([^,{]*)", _cssColonHostRe = new RegExp("(-shadowcsshost" + _parenSuffix, "gim"), _cssColonHostContextRe = new RegExp("(-shadowcsscontext" + _parenSuffix, "gim"), _cssColonSlottedRe = new RegExp("(-shadowcssslotted" + _parenSuffix, "gim"), _polyfillHostNoCombinatorRe = /-shadowcsshost-no-combinator([^\s]*)/, _shadowDOMSelectorsRe = [ /::shadow/g, /::content/g ], _polyfillHostRe = /-shadowcsshost/gim, _colonHostRe = /:host/gim, _colonSlottedRe = /::slotted/gim, _colonHostContextRe = /:host-context/gim, _commentRe = /\/\*\s*[\s\S]*?\*\//g, _commentWithHashRe = /\/\*\s*#\s*source(Mapping)?URL=[\s\S]+?\*\//g, _ruleRe = /(\s*)([^;\{\}]+?)(\s*)((?:{%BLOCK%}?\s*;?)|(?:\s*;))/g, _curlyRe = /([{}])/g, processRules = (e, t) => {
2
- const s = escapeBlocks(e);
3
- let o = 0;
4
- return s.escapedString.replace(_ruleRe, ((...e) => {
1
+ const _parenSuffix = ")(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))?([^,{]*)", _cssColonHostRe = new RegExp("(-shadowcsshost" + _parenSuffix, "gim"), _cssColonHostContextRe = new RegExp("(-shadowcsscontext" + _parenSuffix, "gim"), _cssColonSlottedRe = new RegExp("(-shadowcssslotted" + _parenSuffix, "gim"), _polyfillHostNoCombinatorRe = /-shadowcsshost-no-combinator([^\s]*)/, _shadowDOMSelectorsRe = [ /::shadow/g, /::content/g ], _polyfillHostRe = /-shadowcsshost/gim, _colonHostRe = /:host/gim, _colonSlottedRe = /::slotted/gim, _colonHostContextRe = /:host-context/gim, _commentRe = /\/\*\s*[\s\S]*?\*\//g, _commentWithHashRe = /\/\*\s*#\s*source(Mapping)?URL=[\s\S]+?\*\//g, _ruleRe = /(\s*)([^;\{\}]+?)(\s*)((?:{%BLOCK%}?\s*;?)|(?:\s*;))/g, _curlyRe = /([{}])/g, _selectorPartsRe = /(^.*?[^\\])??((:+)(.*)|$)/, processRules = (e, t) => {
2
+ const o = escapeBlocks(e);
3
+ let s = 0;
4
+ return o.escapedString.replace(_ruleRe, ((...e) => {
5
5
  const c = e[2];
6
6
  let r = "", n = e[4], l = "";
7
- n && n.startsWith("{%BLOCK%") && (r = s.blocks[o++], n = n.substring("%BLOCK%".length + 1),
7
+ n && n.startsWith("{%BLOCK%") && (r = o.blocks[s++], n = n.substring("%BLOCK%".length + 1),
8
8
  l = "{");
9
9
  const a = t({
10
10
  selector: c,
@@ -13,111 +13,108 @@ const _parenSuffix = ")(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))?([^,{]*)", _cssColo
13
13
  return `${e[1]}${a.selector}${e[3]}${l}${a.content}${n}`;
14
14
  }));
15
15
  }, escapeBlocks = e => {
16
- const t = e.split(_curlyRe), s = [], o = [];
16
+ const t = e.split(_curlyRe), o = [], s = [];
17
17
  let c = 0, r = [];
18
18
  for (let e = 0; e < t.length; e++) {
19
19
  const n = t[e];
20
- "}" === n && c--, c > 0 ? r.push(n) : (r.length > 0 && (o.push(r.join("")), s.push("%BLOCK%"),
21
- r = []), s.push(n)), "{" === n && c++;
20
+ "}" === n && c--, c > 0 ? r.push(n) : (r.length > 0 && (s.push(r.join("")), o.push("%BLOCK%"),
21
+ r = []), o.push(n)), "{" === n && c++;
22
22
  }
23
- return r.length > 0 && (o.push(r.join("")), s.push("%BLOCK%")), {
24
- escapedString: s.join(""),
25
- blocks: o
23
+ return r.length > 0 && (s.push(r.join("")), o.push("%BLOCK%")), {
24
+ escapedString: o.join(""),
25
+ blocks: s
26
26
  };
27
- }, convertColonRule = (e, t, s) => e.replace(t, ((...e) => {
27
+ }, convertColonRule = (e, t, o) => e.replace(t, ((...e) => {
28
28
  if (e[2]) {
29
- const t = e[2].split(","), o = [];
29
+ const t = e[2].split(","), s = [];
30
30
  for (let c = 0; c < t.length; c++) {
31
31
  const r = t[c].trim();
32
32
  if (!r) break;
33
- o.push(s("-shadowcsshost-no-combinator", r, e[3]));
33
+ s.push(o("-shadowcsshost-no-combinator", r, e[3]));
34
34
  }
35
- return o.join(",");
35
+ return s.join(",");
36
36
  }
37
37
  return "-shadowcsshost-no-combinator" + e[3];
38
- })), colonHostPartReplacer = (e, t, s) => e + t.replace("-shadowcsshost", "") + s, colonHostContextPartReplacer = (e, t, s) => t.indexOf("-shadowcsshost") > -1 ? colonHostPartReplacer(e, t, s) : e + t + s + ", " + t + " " + e + s, scopeSelectors = (e, t, s, o, c) => processRules(e, (e => {
38
+ })), colonHostPartReplacer = (e, t, o) => e + t.replace("-shadowcsshost", "") + o, colonHostContextPartReplacer = (e, t, o) => t.indexOf("-shadowcsshost") > -1 ? colonHostPartReplacer(e, t, o) : e + t + o + ", " + t + " " + e + o, injectScopingSelector = (e, t) => e.replace(_selectorPartsRe, ((e, o = "", s, c = "", r = "") => o + t + c + r)), scopeSelectors = (e, t, o, s, c) => processRules(e, (e => {
39
39
  let c = e.selector, r = e.content;
40
- return "@" !== e.selector[0] ? c = ((e, t, s, o) => e.split(",").map((e => o && e.indexOf("." + o) > -1 ? e.trim() : ((e, t) => !(e => (e = e.replace(/\[/g, "\\[").replace(/\]/g, "\\]"),
41
- new RegExp("^(" + e + ")([>\\s~+[.,{:][\\s\\S]*)?$", "m")))(t).test(e))(e, t) ? ((e, t, s) => {
42
- const o = "." + (t = t.replace(/\[is=([^\]]*)\]/g, ((e, ...t) => t[0]))), c = e => {
40
+ return "@" !== e.selector[0] ? c = ((e, t, o, s) => e.split(",").map((e => s && e.indexOf("." + s) > -1 ? e.trim() : ((e, t) => !(e => (e = e.replace(/\[/g, "\\[").replace(/\]/g, "\\]"),
41
+ new RegExp("^(" + e + ")([>\\s~+[.,{:][\\s\\S]*)?$", "m")))(t).test(e))(e, t) ? ((e, t, o) => {
42
+ const s = "." + (t = t.replace(/\[is=([^\]]*)\]/g, ((e, ...t) => t[0]))), c = e => {
43
43
  let c = e.trim();
44
44
  if (!c) return "";
45
- if (e.indexOf("-shadowcsshost-no-combinator") > -1) c = ((e, t, s) => {
45
+ if (e.indexOf("-shadowcsshost-no-combinator") > -1) c = ((e, t, o) => {
46
46
  if (_polyfillHostRe.lastIndex = 0, _polyfillHostRe.test(e)) {
47
- const t = `.${s}`;
48
- return e.replace(_polyfillHostNoCombinatorRe, ((e, s) => s.replace(/([^:]*)(:*)(.*)/, ((e, s, o, c) => s + t + o + c)))).replace(_polyfillHostRe, t + " ");
47
+ const t = `.${o}`;
48
+ return e.replace(_polyfillHostNoCombinatorRe, ((e, o) => injectScopingSelector(o, t))).replace(_polyfillHostRe, t + " ");
49
49
  }
50
50
  return t + " " + e;
51
- })(e, t, s); else {
51
+ })(e, t, o); else {
52
52
  const t = e.replace(_polyfillHostRe, "");
53
- if (t.length > 0) {
54
- const e = t.match(/([^:]*)(:*)(.*)/);
55
- e && (c = e[1] + o + e[2] + e[3]);
56
- }
53
+ t.length > 0 && (c = injectScopingSelector(t, s));
57
54
  }
58
55
  return c;
59
56
  }, r = (e => {
60
57
  const t = [];
61
- let s, o = 0;
62
- return s = (e = e.replace(/(\[[^\]]*\])/g, ((e, s) => {
63
- const c = `__ph-${o}__`;
64
- return t.push(s), o++, c;
65
- }))).replace(/(:nth-[-\w]+)(\([^)]+\))/g, ((e, s, c) => {
66
- const r = `__ph-${o}__`;
67
- return t.push(c), o++, s + r;
58
+ let o, s = 0;
59
+ return o = (e = e.replace(/(\[[^\]]*\])/g, ((e, o) => {
60
+ const c = `__ph-${s}__`;
61
+ return t.push(o), s++, c;
62
+ }))).replace(/(:nth-[-\w]+)(\([^)]+\))/g, ((e, o, c) => {
63
+ const r = `__ph-${s}__`;
64
+ return t.push(c), s++, o + r;
68
65
  })), {
69
- content: s,
66
+ content: o,
70
67
  placeholders: t
71
68
  };
72
69
  })(e);
73
70
  let n, l = "", a = 0;
74
- const p = /( |>|\+|~(?!=))\s*/g;
75
- let i = !((e = r.content).indexOf("-shadowcsshost-no-combinator") > -1);
76
- for (;null !== (n = p.exec(e)); ) {
77
- const t = n[1], s = e.slice(a, n.index).trim();
78
- i = i || s.indexOf("-shadowcsshost-no-combinator") > -1, l += `${i ? c(s) : s} ${t} `,
79
- a = p.lastIndex;
71
+ const i = /( |>|\+|~(?!=))\s*/g;
72
+ let p = !((e = r.content).indexOf("-shadowcsshost-no-combinator") > -1);
73
+ for (;null !== (n = i.exec(e)); ) {
74
+ const t = n[1], o = e.slice(a, n.index).trim();
75
+ p = p || o.indexOf("-shadowcsshost-no-combinator") > -1, l += `${p ? c(o) : o} ${t} `,
76
+ a = i.lastIndex;
80
77
  }
81
78
  const h = e.substring(a);
82
- return i = i || h.indexOf("-shadowcsshost-no-combinator") > -1, l += i ? c(h) : h,
79
+ return p = p || h.indexOf("-shadowcsshost-no-combinator") > -1, l += p ? c(h) : h,
83
80
  u = r.placeholders, l.replace(/__ph-(\d+)__/g, ((e, t) => u[+t]));
84
81
  var u;
85
- })(e, t, s).trim() : e.trim())).join(", "))(e.selector, t, s, o) : (e.selector.startsWith("@media") || e.selector.startsWith("@supports") || e.selector.startsWith("@page") || e.selector.startsWith("@document")) && (r = scopeSelectors(e.content, t, s, o)),
82
+ })(e, t, o).trim() : e.trim())).join(", "))(e.selector, t, o, s) : (e.selector.startsWith("@media") || e.selector.startsWith("@supports") || e.selector.startsWith("@page") || e.selector.startsWith("@document")) && (r = scopeSelectors(e.content, t, o, s)),
86
83
  {
87
84
  selector: c.replace(/\s{2,}/g, " ").trim(),
88
85
  content: r
89
86
  };
90
- })), scopeCss = (e, t, s) => {
91
- const o = t + "-h", c = t + "-s", r = e.match(_commentWithHashRe) || [];
87
+ })), scopeCss = (e, t, o) => {
88
+ const s = t + "-h", c = t + "-s", r = e.match(_commentWithHashRe) || [];
92
89
  e = e.replace(_commentRe, "");
93
90
  const n = [];
94
- if (s) {
91
+ if (o) {
95
92
  const t = e => {
96
- const t = `/*!@___${n.length}___*/`, s = `/*!@${e.selector}*/`;
93
+ const t = `/*!@___${n.length}___*/`, o = `/*!@${e.selector}*/`;
97
94
  return n.push({
98
95
  placeholder: t,
99
- comment: s
96
+ comment: o
100
97
  }), e.selector = t + e.selector, e;
101
98
  };
102
99
  e = processRules(e, (e => "@" !== e.selector[0] ? t(e) : e.selector.startsWith("@media") || e.selector.startsWith("@supports") || e.selector.startsWith("@page") || e.selector.startsWith("@document") ? (e.content = processRules(e.content, t),
103
100
  e) : e));
104
101
  }
105
- const l = ((e, t, s, o, c) => {
102
+ const l = ((e, t, o, s, c) => {
106
103
  const r = ((e, t) => {
107
- const s = "." + t + " > ", o = [];
104
+ const o = "." + t + " > ", s = [];
108
105
  return e = e.replace(_cssColonSlottedRe, ((...e) => {
109
106
  if (e[2]) {
110
- const t = e[2].trim(), c = e[3], r = s + t + c;
107
+ const t = e[2].trim(), c = e[3], r = o + t + c;
111
108
  let n = "";
112
109
  for (let t = e[4] - 1; t >= 0; t--) {
113
- const s = e[5][t];
114
- if ("}" === s || "," === s) break;
115
- n = s + n;
110
+ const o = e[5][t];
111
+ if ("}" === o || "," === o) break;
112
+ n = o + n;
116
113
  }
117
114
  const l = n + r, a = `${n.trimRight()}${r.trim()}`;
118
115
  if (l.trim() !== a.trim()) {
119
116
  const e = `${a}, ${l}`;
120
- o.push({
117
+ s.push({
121
118
  orgSelector: l,
122
119
  updatedSelector: e
123
120
  });
@@ -126,18 +123,18 @@ const _parenSuffix = ")(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))?([^,{]*)", _cssColo
126
123
  }
127
124
  return "-shadowcsshost-no-combinator" + e[3];
128
125
  })), {
129
- selectors: o,
126
+ selectors: s,
130
127
  cssText: e
131
128
  };
132
- })(e = (e => convertColonRule(e, _cssColonHostContextRe, colonHostContextPartReplacer))(e = (e => convertColonRule(e, _cssColonHostRe, colonHostPartReplacer))(e = e.replace(_colonHostContextRe, "-shadowcsscontext").replace(_colonHostRe, "-shadowcsshost").replace(_colonSlottedRe, "-shadowcssslotted"))), o);
129
+ })(e = (e => convertColonRule(e, _cssColonHostContextRe, colonHostContextPartReplacer))(e = (e => convertColonRule(e, _cssColonHostRe, colonHostPartReplacer))(e = e.replace(_colonHostContextRe, "-shadowcsscontext").replace(_colonHostRe, "-shadowcsshost").replace(_colonSlottedRe, "-shadowcssslotted"))), s);
133
130
  return e = (e => _shadowDOMSelectorsRe.reduce(((e, t) => e.replace(t, " ")), e))(e = r.cssText),
134
- t && (e = scopeSelectors(e, t, s, o)), {
135
- cssText: (e = (e = e.replace(/-shadowcsshost-no-combinator/g, `.${s}`)).replace(/>\s*\*\s+([^{, ]+)/gm, " $1 ")).trim(),
131
+ t && (e = scopeSelectors(e, t, o, s)), {
132
+ cssText: (e = (e = e.replace(/-shadowcsshost-no-combinator/g, `.${o}`)).replace(/>\s*\*\s+([^{, ]+)/gm, " $1 ")).trim(),
136
133
  slottedSelectors: r.selectors
137
134
  };
138
- })(e, t, o, c);
139
- return e = [ l.cssText, ...r ].join("\n"), s && n.forEach((({placeholder: t, comment: s}) => {
140
- e = e.replace(t, s);
135
+ })(e, t, s, c);
136
+ return e = [ l.cssText, ...r ].join("\n"), o && n.forEach((({placeholder: t, comment: o}) => {
137
+ e = e.replace(t, o);
141
138
  })), l.slottedSelectors.forEach((t => {
142
139
  e = e.replace(t.orgSelector, t.updatedSelector);
143
140
  })), e;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/internal",
3
- "version": "2.10.0",
3
+ "version": "2.11.0-0",
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",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/internal/testing",
3
- "version": "2.10.0",
3
+ "version": "2.11.0-0",
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
@@ -1,10 +1,10 @@
1
- const _parenSuffix = ")(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))?([^,{]*)", _cssColonHostRe = new RegExp("(-shadowcsshost" + _parenSuffix, "gim"), _cssColonHostContextRe = new RegExp("(-shadowcsscontext" + _parenSuffix, "gim"), _cssColonSlottedRe = new RegExp("(-shadowcssslotted" + _parenSuffix, "gim"), _polyfillHostNoCombinatorRe = /-shadowcsshost-no-combinator([^\s]*)/, _shadowDOMSelectorsRe = [ /::shadow/g, /::content/g ], _polyfillHostRe = /-shadowcsshost/gim, _colonHostRe = /:host/gim, _colonSlottedRe = /::slotted/gim, _colonHostContextRe = /:host-context/gim, _commentRe = /\/\*\s*[\s\S]*?\*\//g, _commentWithHashRe = /\/\*\s*#\s*source(Mapping)?URL=[\s\S]+?\*\//g, _ruleRe = /(\s*)([^;\{\}]+?)(\s*)((?:{%BLOCK%}?\s*;?)|(?:\s*;))/g, _curlyRe = /([{}])/g, processRules = (e, t) => {
2
- const s = escapeBlocks(e);
3
- let o = 0;
4
- return s.escapedString.replace(_ruleRe, ((...e) => {
1
+ const _parenSuffix = ")(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))?([^,{]*)", _cssColonHostRe = new RegExp("(-shadowcsshost" + _parenSuffix, "gim"), _cssColonHostContextRe = new RegExp("(-shadowcsscontext" + _parenSuffix, "gim"), _cssColonSlottedRe = new RegExp("(-shadowcssslotted" + _parenSuffix, "gim"), _polyfillHostNoCombinatorRe = /-shadowcsshost-no-combinator([^\s]*)/, _shadowDOMSelectorsRe = [ /::shadow/g, /::content/g ], _polyfillHostRe = /-shadowcsshost/gim, _colonHostRe = /:host/gim, _colonSlottedRe = /::slotted/gim, _colonHostContextRe = /:host-context/gim, _commentRe = /\/\*\s*[\s\S]*?\*\//g, _commentWithHashRe = /\/\*\s*#\s*source(Mapping)?URL=[\s\S]+?\*\//g, _ruleRe = /(\s*)([^;\{\}]+?)(\s*)((?:{%BLOCK%}?\s*;?)|(?:\s*;))/g, _curlyRe = /([{}])/g, _selectorPartsRe = /(^.*?[^\\])??((:+)(.*)|$)/, processRules = (e, t) => {
2
+ const o = escapeBlocks(e);
3
+ let s = 0;
4
+ return o.escapedString.replace(_ruleRe, ((...e) => {
5
5
  const c = e[2];
6
6
  let r = "", n = e[4], l = "";
7
- n && n.startsWith("{%BLOCK%") && (r = s.blocks[o++], n = n.substring("%BLOCK%".length + 1),
7
+ n && n.startsWith("{%BLOCK%") && (r = o.blocks[s++], n = n.substring("%BLOCK%".length + 1),
8
8
  l = "{");
9
9
  const a = t({
10
10
  selector: c,
@@ -13,60 +13,57 @@ const _parenSuffix = ")(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))?([^,{]*)", _cssColo
13
13
  return `${e[1]}${a.selector}${e[3]}${l}${a.content}${n}`;
14
14
  }));
15
15
  }, escapeBlocks = e => {
16
- const t = e.split(_curlyRe), s = [], o = [];
16
+ const t = e.split(_curlyRe), o = [], s = [];
17
17
  let c = 0, r = [];
18
18
  for (let e = 0; e < t.length; e++) {
19
19
  const n = t[e];
20
- "}" === n && c--, c > 0 ? r.push(n) : (r.length > 0 && (o.push(r.join("")), s.push("%BLOCK%"),
21
- r = []), s.push(n)), "{" === n && c++;
20
+ "}" === n && c--, c > 0 ? r.push(n) : (r.length > 0 && (s.push(r.join("")), o.push("%BLOCK%"),
21
+ r = []), o.push(n)), "{" === n && c++;
22
22
  }
23
- return r.length > 0 && (o.push(r.join("")), s.push("%BLOCK%")), {
24
- escapedString: s.join(""),
25
- blocks: o
23
+ return r.length > 0 && (s.push(r.join("")), o.push("%BLOCK%")), {
24
+ escapedString: o.join(""),
25
+ blocks: s
26
26
  };
27
- }, convertColonRule = (e, t, s) => e.replace(t, ((...e) => {
27
+ }, convertColonRule = (e, t, o) => e.replace(t, ((...e) => {
28
28
  if (e[2]) {
29
- const t = e[2].split(","), o = [];
29
+ const t = e[2].split(","), s = [];
30
30
  for (let c = 0; c < t.length; c++) {
31
31
  const r = t[c].trim();
32
32
  if (!r) break;
33
- o.push(s("-shadowcsshost-no-combinator", r, e[3]));
33
+ s.push(o("-shadowcsshost-no-combinator", r, e[3]));
34
34
  }
35
- return o.join(",");
35
+ return s.join(",");
36
36
  }
37
37
  return "-shadowcsshost-no-combinator" + e[3];
38
- })), colonHostPartReplacer = (e, t, s) => e + t.replace("-shadowcsshost", "") + s, colonHostContextPartReplacer = (e, t, s) => t.indexOf("-shadowcsshost") > -1 ? colonHostPartReplacer(e, t, s) : e + t + s + ", " + t + " " + e + s, scopeSelectors = (e, t, s, o, c) => processRules(e, (e => {
38
+ })), colonHostPartReplacer = (e, t, o) => e + t.replace("-shadowcsshost", "") + o, colonHostContextPartReplacer = (e, t, o) => t.indexOf("-shadowcsshost") > -1 ? colonHostPartReplacer(e, t, o) : e + t + o + ", " + t + " " + e + o, injectScopingSelector = (e, t) => e.replace(_selectorPartsRe, ((e, o = "", s, c = "", r = "") => o + t + c + r)), scopeSelectors = (e, t, o, s, c) => processRules(e, (e => {
39
39
  let c = e.selector, r = e.content;
40
- return "@" !== e.selector[0] ? c = ((e, t, s, o) => e.split(",").map((e => o && e.indexOf("." + o) > -1 ? e.trim() : ((e, t) => !(e => (e = e.replace(/\[/g, "\\[").replace(/\]/g, "\\]"),
41
- new RegExp("^(" + e + ")([>\\s~+[.,{:][\\s\\S]*)?$", "m")))(t).test(e))(e, t) ? ((e, t, s) => {
42
- const o = "." + (t = t.replace(/\[is=([^\]]*)\]/g, ((e, ...t) => t[0]))), c = e => {
40
+ return "@" !== e.selector[0] ? c = ((e, t, o, s) => e.split(",").map((e => s && e.indexOf("." + s) > -1 ? e.trim() : ((e, t) => !(e => (e = e.replace(/\[/g, "\\[").replace(/\]/g, "\\]"),
41
+ new RegExp("^(" + e + ")([>\\s~+[.,{:][\\s\\S]*)?$", "m")))(t).test(e))(e, t) ? ((e, t, o) => {
42
+ const s = "." + (t = t.replace(/\[is=([^\]]*)\]/g, ((e, ...t) => t[0]))), c = e => {
43
43
  let c = e.trim();
44
44
  if (!c) return "";
45
- if (e.indexOf("-shadowcsshost-no-combinator") > -1) c = ((e, t, s) => {
45
+ if (e.indexOf("-shadowcsshost-no-combinator") > -1) c = ((e, t, o) => {
46
46
  if (_polyfillHostRe.lastIndex = 0, _polyfillHostRe.test(e)) {
47
- const t = `.${s}`;
48
- return e.replace(_polyfillHostNoCombinatorRe, ((e, s) => s.replace(/([^:]*)(:*)(.*)/, ((e, s, o, c) => s + t + o + c)))).replace(_polyfillHostRe, t + " ");
47
+ const t = `.${o}`;
48
+ return e.replace(_polyfillHostNoCombinatorRe, ((e, o) => injectScopingSelector(o, t))).replace(_polyfillHostRe, t + " ");
49
49
  }
50
50
  return t + " " + e;
51
- })(e, t, s); else {
51
+ })(e, t, o); else {
52
52
  const t = e.replace(_polyfillHostRe, "");
53
- if (t.length > 0) {
54
- const e = t.match(/([^:]*)(:*)(.*)/);
55
- e && (c = e[1] + o + e[2] + e[3]);
56
- }
53
+ t.length > 0 && (c = injectScopingSelector(t, s));
57
54
  }
58
55
  return c;
59
56
  }, r = (e => {
60
57
  const t = [];
61
- let s, o = 0;
62
- return s = (e = e.replace(/(\[[^\]]*\])/g, ((e, s) => {
63
- const c = `__ph-${o}__`;
64
- return t.push(s), o++, c;
65
- }))).replace(/(:nth-[-\w]+)(\([^)]+\))/g, ((e, s, c) => {
66
- const r = `__ph-${o}__`;
67
- return t.push(c), o++, s + r;
58
+ let o, s = 0;
59
+ return o = (e = e.replace(/(\[[^\]]*\])/g, ((e, o) => {
60
+ const c = `__ph-${s}__`;
61
+ return t.push(o), s++, c;
62
+ }))).replace(/(:nth-[-\w]+)(\([^)]+\))/g, ((e, o, c) => {
63
+ const r = `__ph-${s}__`;
64
+ return t.push(c), s++, o + r;
68
65
  })), {
69
- content: s,
66
+ content: o,
70
67
  placeholders: t
71
68
  };
72
69
  })(e);
@@ -74,52 +71,52 @@ const _parenSuffix = ")(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))?([^,{]*)", _cssColo
74
71
  const i = /( |>|\+|~(?!=))\s*/g;
75
72
  let p = !((e = r.content).indexOf("-shadowcsshost-no-combinator") > -1);
76
73
  for (;null !== (n = i.exec(e)); ) {
77
- const t = n[1], s = e.slice(a, n.index).trim();
78
- p = p || s.indexOf("-shadowcsshost-no-combinator") > -1, l += `${p ? c(s) : s} ${t} `,
74
+ const t = n[1], o = e.slice(a, n.index).trim();
75
+ p = p || o.indexOf("-shadowcsshost-no-combinator") > -1, l += `${p ? c(o) : o} ${t} `,
79
76
  a = i.lastIndex;
80
77
  }
81
78
  const h = e.substring(a);
82
79
  return p = p || h.indexOf("-shadowcsshost-no-combinator") > -1, l += p ? c(h) : h,
83
80
  u = r.placeholders, l.replace(/__ph-(\d+)__/g, ((e, t) => u[+t]));
84
81
  var u;
85
- })(e, t, s).trim() : e.trim())).join(", "))(e.selector, t, s, o) : (e.selector.startsWith("@media") || e.selector.startsWith("@supports") || e.selector.startsWith("@page") || e.selector.startsWith("@document")) && (r = scopeSelectors(e.content, t, s, o)),
82
+ })(e, t, o).trim() : e.trim())).join(", "))(e.selector, t, o, s) : (e.selector.startsWith("@media") || e.selector.startsWith("@supports") || e.selector.startsWith("@page") || e.selector.startsWith("@document")) && (r = scopeSelectors(e.content, t, o, s)),
86
83
  {
87
84
  selector: c.replace(/\s{2,}/g, " ").trim(),
88
85
  content: r
89
86
  };
90
87
  }));
91
88
 
92
- exports.scopeCss = (e, t, s) => {
93
- const o = t + "-h", c = t + "-s", r = e.match(_commentWithHashRe) || [];
89
+ exports.scopeCss = (e, t, o) => {
90
+ const s = t + "-h", c = t + "-s", r = e.match(_commentWithHashRe) || [];
94
91
  e = e.replace(_commentRe, "");
95
92
  const n = [];
96
- if (s) {
93
+ if (o) {
97
94
  const t = e => {
98
- const t = `/*!@___${n.length}___*/`, s = `/*!@${e.selector}*/`;
95
+ const t = `/*!@___${n.length}___*/`, o = `/*!@${e.selector}*/`;
99
96
  return n.push({
100
97
  placeholder: t,
101
- comment: s
98
+ comment: o
102
99
  }), e.selector = t + e.selector, e;
103
100
  };
104
101
  e = processRules(e, (e => "@" !== e.selector[0] ? t(e) : e.selector.startsWith("@media") || e.selector.startsWith("@supports") || e.selector.startsWith("@page") || e.selector.startsWith("@document") ? (e.content = processRules(e.content, t),
105
102
  e) : e));
106
103
  }
107
- const l = ((e, t, s, o, c) => {
104
+ const l = ((e, t, o, s, c) => {
108
105
  const r = ((e, t) => {
109
- const s = "." + t + " > ", o = [];
106
+ const o = "." + t + " > ", s = [];
110
107
  return e = e.replace(_cssColonSlottedRe, ((...e) => {
111
108
  if (e[2]) {
112
- const t = e[2].trim(), c = e[3], r = s + t + c;
109
+ const t = e[2].trim(), c = e[3], r = o + t + c;
113
110
  let n = "";
114
111
  for (let t = e[4] - 1; t >= 0; t--) {
115
- const s = e[5][t];
116
- if ("}" === s || "," === s) break;
117
- n = s + n;
112
+ const o = e[5][t];
113
+ if ("}" === o || "," === o) break;
114
+ n = o + n;
118
115
  }
119
116
  const l = n + r, a = `${n.trimRight()}${r.trim()}`;
120
117
  if (l.trim() !== a.trim()) {
121
118
  const e = `${a}, ${l}`;
122
- o.push({
119
+ s.push({
123
120
  orgSelector: l,
124
121
  updatedSelector: e
125
122
  });
@@ -128,18 +125,18 @@ exports.scopeCss = (e, t, s) => {
128
125
  }
129
126
  return "-shadowcsshost-no-combinator" + e[3];
130
127
  })), {
131
- selectors: o,
128
+ selectors: s,
132
129
  cssText: e
133
130
  };
134
- })(e = (e => convertColonRule(e, _cssColonHostContextRe, colonHostContextPartReplacer))(e = (e => convertColonRule(e, _cssColonHostRe, colonHostPartReplacer))(e = e.replace(_colonHostContextRe, "-shadowcsscontext").replace(_colonHostRe, "-shadowcsshost").replace(_colonSlottedRe, "-shadowcssslotted"))), o);
131
+ })(e = (e => convertColonRule(e, _cssColonHostContextRe, colonHostContextPartReplacer))(e = (e => convertColonRule(e, _cssColonHostRe, colonHostPartReplacer))(e = e.replace(_colonHostContextRe, "-shadowcsscontext").replace(_colonHostRe, "-shadowcsshost").replace(_colonSlottedRe, "-shadowcssslotted"))), s);
135
132
  return e = (e => _shadowDOMSelectorsRe.reduce(((e, t) => e.replace(t, " ")), e))(e = r.cssText),
136
- t && (e = scopeSelectors(e, t, s, o)), {
137
- cssText: (e = (e = e.replace(/-shadowcsshost-no-combinator/g, `.${s}`)).replace(/>\s*\*\s+([^{, ]+)/gm, " $1 ")).trim(),
133
+ t && (e = scopeSelectors(e, t, o, s)), {
134
+ cssText: (e = (e = e.replace(/-shadowcsshost-no-combinator/g, `.${o}`)).replace(/>\s*\*\s+([^{, ]+)/gm, " $1 ")).trim(),
138
135
  slottedSelectors: r.selectors
139
136
  };
140
- })(e, t, o, c);
141
- return e = [ l.cssText, ...r ].join("\n"), s && n.forEach((({placeholder: t, comment: s}) => {
142
- e = e.replace(t, s);
137
+ })(e, t, s, c);
138
+ return e = [ l.cssText, ...r ].join("\n"), o && n.forEach((({placeholder: t, comment: o}) => {
139
+ e = e.replace(t, o);
143
140
  })), l.slottedSelectors.forEach((t => {
144
141
  e = e.replace(t.orgSelector, t.updatedSelector);
145
142
  })), e;
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Stencil Mock Doc (CommonJS) v2.10.0 | MIT Licensed | https://stenciljs.com
2
+ Stencil Mock Doc (CommonJS) v2.11.0-0 | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  var mockDoc = (function(exports) {
5
5
  'use strict';
package/mock-doc/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Stencil Mock Doc v2.10.0 | MIT Licensed | https://stenciljs.com
2
+ Stencil Mock Doc v2.11.0-0 | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  const CONTENT_REF_ID = 'r';
5
5
  const ORG_LOCATION_ID = 'o';
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/mock-doc",
3
- "version": "2.10.0",
3
+ "version": "2.11.0-0",
4
4
  "description": "Mock window, document and DOM outside of a browser environment.",
5
5
  "main": "./index.cjs",
6
6
  "module": "./index.js",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core",
3
- "version": "2.10.0",
3
+ "version": "2.11.0-0",
4
4
  "license": "MIT",
5
5
  "main": "./internal/stencil-core/index.cjs",
6
6
  "module": "./internal/stencil-core/index.js",
@@ -148,5 +148,9 @@
148
148
  "pwa",
149
149
  "progressive web app"
150
150
  ],
151
- "prettier": "@ionic/prettier-config"
151
+ "prettier": "@ionic/prettier-config",
152
+ "volta": {
153
+ "node": "16.13.0",
154
+ "npm": "8.1.1"
155
+ }
152
156
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/screenshot",
3
- "version": "2.10.0",
3
+ "version": "2.11.0-0",
4
4
  "description": "Stencil Screenshot.",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",
package/sys/node/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Stencil Node System v2.10.0 | MIT Licensed | https://stenciljs.com
2
+ Stencil Node System v2.11.0-0 | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  function _interopDefaultLegacy(e) {
5
5
  return e && "object" == typeof e && "default" in e ? e : {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/sys/node",
3
- "version": "2.10.0",
3
+ "version": "2.11.0-0",
4
4
  "description": "Stencil Node System.",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Stencil Node System Worker v2.10.0 | MIT Licensed | https://stenciljs.com
2
+ Stencil Node System Worker v2.11.0-0 | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  function _interopNamespace(e) {
5
5
  if (e && e.__esModule) return e;
package/testing/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Stencil Testing v2.10.0 | MIT Licensed | https://stenciljs.com
2
+ Stencil Testing v2.11.0-0 | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  function _lazyRequire(e) {
5
5
  return new Proxy({}, {
@@ -2858,7 +2858,7 @@ const createSystem = e => {
2858
2858
  u("/");
2859
2859
  const S = {
2860
2860
  name: "in-memory",
2861
- version: "2.10.0",
2861
+ version: "2.11.0-0",
2862
2862
  events: o,
2863
2863
  access: async e => c(e),
2864
2864
  accessSync: c,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/testing",
3
- "version": "2.10.0",
3
+ "version": "2.11.0-0",
4
4
  "description": "Stencil testing suite.",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",