@stencil/core 2.9.0-0 → 2.11.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.
Files changed (71) hide show
  1. package/cli/index.cjs +14 -3
  2. package/cli/index.js +14 -3
  3. package/cli/package.json +1 -1
  4. package/compiler/lib.dom.d.ts +263 -648
  5. package/compiler/lib.dom.iterable.d.ts +1 -5
  6. package/compiler/lib.es2015.core.d.ts +2 -2
  7. package/compiler/lib.es2015.iterable.d.ts +1 -1
  8. package/compiler/lib.es2015.symbol.wellknown.d.ts +10 -10
  9. package/compiler/lib.es2018.asynciterable.d.ts +1 -1
  10. package/compiler/lib.es2020.bigint.d.ts +1 -1
  11. package/compiler/lib.es2020.intl.d.ts +6 -7
  12. package/compiler/lib.es2020.symbol.wellknown.d.ts +1 -1
  13. package/compiler/lib.es2021.d.ts +24 -0
  14. package/compiler/lib.es2021.full.d.ts +25 -0
  15. package/compiler/lib.es2021.promise.d.ts +43 -0
  16. package/compiler/lib.es2021.string.d.ts +35 -0
  17. package/compiler/lib.es2021.weakref.d.ts +75 -0
  18. package/compiler/lib.es5.d.ts +9 -9
  19. package/compiler/lib.esnext.d.ts +1 -4
  20. package/compiler/lib.esnext.promise.d.ts +26 -26
  21. package/compiler/lib.esnext.string.d.ts +18 -18
  22. package/compiler/lib.esnext.weakref.d.ts +58 -58
  23. package/compiler/lib.webworker.d.ts +98 -153
  24. package/compiler/lib.webworker.iterable.d.ts +1 -1
  25. package/compiler/package.json +1 -1
  26. package/compiler/stencil.js +762 -747
  27. package/compiler/stencil.min.js +2 -2
  28. package/dependencies.json +6 -1
  29. package/dev-server/client/index.js +1 -1
  30. package/dev-server/client/package.json +1 -1
  31. package/dev-server/connector.html +2 -2
  32. package/dev-server/index.js +1 -1
  33. package/dev-server/package.json +1 -1
  34. package/dev-server/server-process.js +2 -2
  35. package/internal/app-data/package.json +1 -1
  36. package/internal/client/css-shim.js +1 -1
  37. package/internal/client/dom.js +1 -1
  38. package/internal/client/index.js +119 -102
  39. package/internal/client/package.json +1 -1
  40. package/internal/client/patch-browser.js +1 -1
  41. package/internal/client/patch-esm.js +1 -1
  42. package/internal/client/shadow-css.js +9 -10
  43. package/internal/hydrate/index.js +44 -40
  44. package/internal/hydrate/package.json +1 -1
  45. package/internal/hydrate/shadow-css.js +59 -62
  46. package/internal/index.js +1 -0
  47. package/internal/package.json +1 -1
  48. package/internal/stencil-private.d.ts +38 -0
  49. package/internal/stencil-public-compiler.d.ts +5 -2
  50. package/internal/testing/index.js +54 -47
  51. package/internal/testing/package.json +1 -1
  52. package/internal/testing/shadow-css.js +54 -57
  53. package/mock-doc/index.cjs +4 -1
  54. package/mock-doc/index.d.ts +7 -6
  55. package/mock-doc/index.js +4 -1
  56. package/mock-doc/package.json +1 -1
  57. package/package.json +13 -5
  58. package/readme.md +2 -2
  59. package/screenshot/index.js +1 -1
  60. package/screenshot/package.json +1 -1
  61. package/sys/node/index.js +2 -2
  62. package/sys/node/package.json +1 -1
  63. package/sys/node/worker.js +1 -1
  64. package/testing/index.js +9 -5
  65. package/testing/mocks.d.ts +1 -5
  66. package/testing/package.json +1 -1
  67. package/testing/testing-sys.d.ts +6 -1
  68. package/screenshot/index.js.map +0 -1
  69. package/sys/deno/index.js +0 -1791
  70. package/sys/deno/node-compat.js +0 -2654
  71. package/sys/deno/worker.js +0 -44
@@ -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.9.0-0 | MIT Licensed | https://stenciljs.com
2
+ Stencil Mock Doc (CommonJS) v2.11.0 | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  var mockDoc = (function(exports) {
5
5
  'use strict';
@@ -2566,6 +2566,9 @@ class MockAnchorElement extends MockHTMLElement {
2566
2566
  set href(value) {
2567
2567
  this.setAttribute('href', value);
2568
2568
  }
2569
+ get pathname() {
2570
+ return new URL(this.href).pathname;
2571
+ }
2569
2572
  }
2570
2573
  class MockButtonElement extends MockHTMLElement {
2571
2574
  constructor(ownerDocument) {
@@ -166,6 +166,7 @@ declare class MockAnchorElement extends MockHTMLElement {
166
166
  constructor(ownerDocument: any);
167
167
  get href(): string;
168
168
  set href(value: string);
169
+ get pathname(): string;
169
170
  }
170
171
  declare class MockButtonElement extends MockHTMLElement {
171
172
  constructor(ownerDocument: any);
@@ -399,17 +400,17 @@ declare class MockNode {
399
400
  prepend(...items: (MockNode | string)[]): void;
400
401
  cloneNode(deep?: boolean): MockNode;
401
402
  compareDocumentPosition(_other: MockNode): number;
402
- get firstChild(): MockNode;
403
+ get firstChild(): MockNode | null;
403
404
  insertBefore(newNode: MockNode, referenceNode: MockNode): MockNode;
404
405
  get isConnected(): boolean;
405
406
  isSameNode(node: any): boolean;
406
- get lastChild(): MockNode;
407
- get nextSibling(): MockNode;
407
+ get lastChild(): MockNode | null;
408
+ get nextSibling(): MockNode | null;
408
409
  get nodeValue(): string;
409
410
  set nodeValue(value: string);
410
411
  get parentElement(): any;
411
412
  set parentElement(value: any);
412
- get previousSibling(): MockNode;
413
+ get previousSibling(): MockNode | null;
413
414
  contains(otherNode: MockNode): boolean;
414
415
  removeChild(childNode: MockNode): MockNode;
415
416
  remove(): void;
@@ -451,7 +452,7 @@ declare class MockElement extends MockNode {
451
452
  get dir(): string;
452
453
  set dir(value: string);
453
454
  dispatchEvent(ev: MockEvent): boolean;
454
- get firstElementChild(): MockElement;
455
+ get firstElementChild(): MockElement | null;
455
456
  getAttribute(attrName: string): any;
456
457
  getAttributeNS(namespaceURI: string, attrName: string): string;
457
458
  getBoundingClientRect(): {
@@ -486,7 +487,7 @@ declare class MockElement extends MockNode {
486
487
  set hidden(isHidden: boolean);
487
488
  get lang(): string;
488
489
  set lang(value: string);
489
- get lastElementChild(): MockElement;
490
+ get lastElementChild(): MockElement | null;
490
491
  matches(selector: string): boolean;
491
492
  get nextElementSibling(): any;
492
493
  get outerHTML(): string;
package/mock-doc/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Stencil Mock Doc v2.9.0-0 | MIT Licensed | https://stenciljs.com
2
+ Stencil Mock Doc v2.11.0 | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  const CONTENT_REF_ID = 'r';
5
5
  const ORG_LOCATION_ID = 'o';
@@ -2563,6 +2563,9 @@ class MockAnchorElement extends MockHTMLElement {
2563
2563
  set href(value) {
2564
2564
  this.setAttribute('href', value);
2565
2565
  }
2566
+ get pathname() {
2567
+ return new URL(this.href).pathname;
2568
+ }
2566
2569
  }
2567
2570
  class MockButtonElement extends MockHTMLElement {
2568
2571
  constructor(ownerDocument) {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/mock-doc",
3
- "version": "2.9.0-0",
3
+ "version": "2.11.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.9.0-0",
3
+ "version": "2.11.0",
4
4
  "license": "MIT",
5
5
  "main": "./internal/stencil-core/index.cjs",
6
6
  "module": "./internal/stencil-core/index.js",
@@ -9,6 +9,7 @@
9
9
  "stencil": "bin/stencil"
10
10
  },
11
11
  "files": [
12
+ "!**/*.map",
12
13
  "bin/",
13
14
  "cli/",
14
15
  "compiler/",
@@ -21,9 +22,10 @@
21
22
  "testing/"
22
23
  ],
23
24
  "scripts": {
25
+ "clean": "rm -rf build/ cli/ compiler/ dev-server/ internal/ mock-doc/ sys/ testing/ && npm run clean-scripts",
26
+ "clean-scripts": "rm -rf scripts/build",
24
27
  "start": "npm run watch",
25
- "build": "node scripts && npm run tsc.prod && npm run rollup.prod.ci",
26
- "build.prod": "node scripts && npm run tsc.scripts && npm run tsc.prod && npm run rollup.prod.ci",
28
+ "build": "node scripts --prepare && npm run tsc.prod && npm run rollup.prod.ci",
27
29
  "watch": "node scripts && npm run tsc && concurrently \"npm run rollup.watch\" \"npm run tsc.watch\"",
28
30
  "release": "node scripts --release --publish",
29
31
  "release.prepare": "node scripts --release --prepare",
@@ -101,6 +103,7 @@
101
103
  "jest-environment-node": "^26.6.2",
102
104
  "listr": "^0.14.3",
103
105
  "magic-string": "^0.25.7",
106
+ "merge-source-map": "^1.1.0",
104
107
  "mime-db": "^1.46.0",
105
108
  "minimatch": "3.0.4",
106
109
  "node-fetch": "2.6.1",
@@ -114,12 +117,13 @@
114
117
  "prompts": "2.4.0",
115
118
  "puppeteer": "~10.0.0",
116
119
  "rollup": "2.42.3",
120
+ "rollup-plugin-sourcemaps": "^0.6.3",
117
121
  "semiver": "^1.1.0",
118
122
  "semver": "7.3.4",
119
123
  "sizzle": "^2.3.6",
120
124
  "terser": "5.6.1",
121
125
  "tslib": "^2.1.0",
122
- "typescript": "4.2.3",
126
+ "typescript": "4.3.5",
123
127
  "webpack": "^4.46.0",
124
128
  "ws": "7.4.6"
125
129
  },
@@ -144,5 +148,9 @@
144
148
  "pwa",
145
149
  "progressive web app"
146
150
  ],
147
- "prettier": "@ionic/prettier-config"
151
+ "prettier": "@ionic/prettier-config",
152
+ "volta": {
153
+ "node": "16.13.0",
154
+ "npm": "8.1.1"
155
+ }
148
156
  }
package/readme.md CHANGED
@@ -123,13 +123,13 @@ Stencil is a tool developers use to create Web Components with some powerful fea
123
123
 
124
124
  ## License
125
125
 
126
- - [MIT](https://raw.githubusercontent.com/ionic-team/stencil/master/LICENSE.md)
126
+ - [MIT](https://raw.githubusercontent.com/ionic-team/stencil/main/LICENSE.md)
127
127
 
128
128
 
129
129
  [npm-badge]: https://img.shields.io/npm/v/@stencil/core.svg
130
130
  [npm-badge-url]: https://www.npmjs.com/package/@stencil/core
131
131
  [npm-license]: https://img.shields.io/npm/l/@stencil/core.svg
132
- [npm-license-url]: https://github.com/ionic-team/stencil/blob/master/LICENSE
132
+ [npm-license-url]: https://github.com/ionic-team/stencil/blob/main/LICENSE
133
133
  [circle-badge]: https://circleci.com/gh/ionic-team/stencil.svg?style=shield
134
134
  [circle-badge-url]: https://circleci.com/gh/ionic-team/stencil
135
135
  [browserstack-badge]: https://www.browserstack.com/automate/badge.svg?badge_key=WVNVbkRJdDBJQnBEMzZuWUdlMEZuTjlPUm9sOHZsSVNkUlJTRkJVQkx0ST0tLTFhbk5jRUNEVWxJL1J0SVR0WUFndnc9PQ==--90c84981a2ed2ede760ca48fbfc3fdd5b71d3e5e
@@ -636,7 +636,7 @@ function createLocalCompareApp(namespace, appSrcUrl, imagesUrl, jsonpUrl, a, b)
636
636
  <meta http-equiv="x-ua-compatible" content="IE=Edge">
637
637
  <link href="${appSrcUrl}/build/app.css" rel="stylesheet">
638
638
  <script type="module" src="${appSrcUrl}/build/app.esm.js"></script>
639
- <script nomodule src="${appSrcUrl}/build/app.js"></script>
639
+ <script nomodule src="${appSrcUrl}/build/app.js"></script>
640
640
  <link rel="icon" type="image/x-icon" href="${appSrcUrl}/assets/favicon.ico">
641
641
  </head>
642
642
  <body>
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/screenshot",
3
- "version": "2.9.0-0",
3
+ "version": "2.11.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.9.0-0 | MIT Licensed | https://stenciljs.com
2
+ Stencil Node System v2.11.0 | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  function _interopDefaultLegacy(e) {
5
5
  return e && "object" == typeof e && "default" in e ? e : {
@@ -700,7 +700,7 @@ fn = new Intl.Collator(0, {
700
700
  numeric: 1
701
701
  }).compare;
702
702
 
703
- const REGISTRY_URL = "https://registry.npmjs.org/@stencil/core", CHANGELOG = "https://github.com/ionic-team/stencil/blob/master/CHANGELOG.md", ARROW = "→", BOX_TOP_LEFT = "╭", BOX_TOP_RIGHT = "╮", BOX_BOTTOM_LEFT = "╰", BOX_BOTTOM_RIGHT = "╯", BOX_VERTICAL = "│", BOX_HORIZONTAL = "─", PADDING = 2, INDENT = " ";
703
+ const REGISTRY_URL = "https://registry.npmjs.org/@stencil/core", CHANGELOG = "https://github.com/ionic-team/stencil/blob/main/CHANGELOG.md", ARROW = "→", BOX_TOP_LEFT = "╭", BOX_TOP_RIGHT = "╮", BOX_BOTTOM_LEFT = "╰", BOX_BOTTOM_RIGHT = "╯", BOX_VERTICAL = "│", BOX_HORIZONTAL = "─", PADDING = 2, INDENT = " ";
704
704
 
705
705
  exit = function e(t, r) {
706
706
  function n() {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/sys/node",
3
- "version": "2.9.0-0",
3
+ "version": "2.11.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.9.0-0 | MIT Licensed | https://stenciljs.com
2
+ Stencil Node System Worker v2.11.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.9.0-0 | MIT Licensed | https://stenciljs.com
2
+ Stencil Testing v2.11.0 | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  function _lazyRequire(e) {
5
5
  return new Proxy({}, {
@@ -397,7 +397,8 @@ function mockConfig(e) {
397
397
  extras: {},
398
398
  nodeResolve: {
399
399
  customResolveOptions: {}
400
- }
400
+ },
401
+ sourceMap: !0
401
402
  };
402
403
  }
403
404
 
@@ -2857,7 +2858,7 @@ const createSystem = e => {
2857
2858
  u("/");
2858
2859
  const S = {
2859
2860
  name: "in-memory",
2860
- version: "2.9.0-0",
2861
+ version: "2.11.0",
2861
2862
  events: o,
2862
2863
  access: async e => c(e),
2863
2864
  accessSync: c,
@@ -3140,7 +3141,7 @@ const createSystem = e => {
3140
3141
  const r = e;
3141
3142
  return (...e) => (t++, r.apply(r, e));
3142
3143
  };
3143
- return r.access = s(r.access), r.accessSync = s(r.accessSync), r.homeDir = s(r.homeDir),
3144
+ if (r.access = s(r.access), r.accessSync = s(r.accessSync), r.homeDir = s(r.homeDir),
3144
3145
  r.readFile = s(r.readFile), r.readFileSync = s(r.readFileSync), r.readDir = s(r.readDir),
3145
3146
  r.readDirSync = s(r.readDirSync), r.stat = s(r.stat), r.statSync = s(r.statSync),
3146
3147
  r.copyFile = n(r.copyFile), r.createDir = n(r.createDir), r.createDirSync = n(r.createDirSync),
@@ -3158,7 +3159,10 @@ const createSystem = e => {
3158
3159
  t = e;
3159
3160
  }
3160
3161
  }
3161
- });
3162
+ }), !function i(e) {
3163
+ return "diskReads" in e && "diskWrites" in e;
3164
+ }(r)) throw new Error("could not generate TestingSystem");
3165
+ return r;
3162
3166
  };
3163
3167
 
3164
3168
  class TestingLogger {
@@ -5,10 +5,6 @@ export declare function mockCompilerCtx(config?: Config): CompilerCtx;
5
5
  export declare function mockBuildCtx(config?: Config, compilerCtx?: CompilerCtx): BuildCtx;
6
6
  export declare function mockCache(config?: Config, compilerCtx?: CompilerCtx): Cache;
7
7
  export declare function mockLogger(): TestingLogger;
8
- export interface TestingSystem extends CompilerSystem {
9
- diskReads: number;
10
- diskWrites: number;
11
- }
12
- export declare function mockStencilSystem(): TestingSystem;
8
+ export declare function mockStencilSystem(): CompilerSystem;
13
9
  export declare function mockDocument(html?: string): Document;
14
10
  export declare function mockWindow(html?: string): Window;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/testing",
3
- "version": "2.9.0-0",
3
+ "version": "2.11.0",
4
4
  "description": "Stencil testing suite.",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",
@@ -1 +1,6 @@
1
- export declare const createTestingSystem: () => any;
1
+ import type { CompilerSystem } from '@stencil/core/internal';
2
+ export interface TestingSystem extends CompilerSystem {
3
+ diskReads: number;
4
+ diskWrites: number;
5
+ }
6
+ export declare const createTestingSystem: () => TestingSystem;