@stencil/core 2.18.0 → 2.19.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 (66) hide show
  1. package/cli/index.cjs +275 -218
  2. package/cli/index.d.ts +3 -0
  3. package/cli/index.js +275 -218
  4. package/cli/package.json +1 -1
  5. package/compiler/package.json +1 -1
  6. package/compiler/stencil.d.ts +2 -2
  7. package/compiler/stencil.js +49510 -47947
  8. package/compiler/stencil.min.js +2 -2
  9. package/dependencies.json +1 -1
  10. package/dev-server/client/index.d.ts +2 -2
  11. package/dev-server/client/index.js +241 -241
  12. package/dev-server/client/package.json +1 -1
  13. package/dev-server/connector.html +3 -3
  14. package/dev-server/index.d.ts +1 -1
  15. package/dev-server/index.js +2 -2
  16. package/dev-server/package.json +1 -1
  17. package/dev-server/server-process.js +1230 -1199
  18. package/internal/app-data/package.json +1 -1
  19. package/internal/client/css-shim.js +2 -2
  20. package/internal/client/dom.js +1 -1
  21. package/internal/client/index.js +619 -601
  22. package/internal/client/package.json +1 -1
  23. package/internal/client/patch-browser.js +1 -1
  24. package/internal/client/patch-esm.js +1 -1
  25. package/internal/client/polyfills/css-shim.js +1 -1
  26. package/internal/client/shadow-css.js +1 -1
  27. package/internal/hydrate/index.js +119 -119
  28. package/internal/hydrate/package.json +1 -1
  29. package/internal/hydrate/runner.d.ts +1 -1
  30. package/internal/hydrate/runner.js +100 -100
  31. package/internal/package.json +1 -1
  32. package/internal/stencil-core/index.d.ts +8 -10
  33. package/internal/stencil-private.d.ts +104 -42
  34. package/internal/stencil-public-compiler.d.ts +12 -2
  35. package/internal/stencil-public-docs.d.ts +20 -0
  36. package/internal/stencil-public-runtime.d.ts +20 -4
  37. package/internal/testing/index.js +148 -148
  38. package/internal/testing/package.json +1 -1
  39. package/mock-doc/index.cjs +655 -645
  40. package/mock-doc/index.js +655 -645
  41. package/mock-doc/package.json +1 -1
  42. package/package.json +29 -37
  43. package/readme.md +27 -33
  44. package/screenshot/index.d.ts +1 -1
  45. package/screenshot/index.js +3 -3
  46. package/screenshot/package.json +1 -1
  47. package/screenshot/pixel-match.js +983 -849
  48. package/sys/node/autoprefixer.js +5 -5
  49. package/sys/node/glob.js +1 -1
  50. package/sys/node/graceful-fs.js +1 -1
  51. package/sys/node/index.d.ts +4 -0
  52. package/sys/node/index.js +373 -374
  53. package/sys/node/package.json +1 -1
  54. package/sys/node/prompts.js +1 -1
  55. package/sys/node/worker.js +1 -1
  56. package/testing/index.d.ts +6 -6
  57. package/testing/index.js +468 -467
  58. package/testing/jest/jest-config.d.ts +1 -1
  59. package/testing/matchers/index.d.ts +3 -3
  60. package/testing/mock-fetch.d.ts +1 -1
  61. package/testing/mocks.d.ts +2 -2
  62. package/testing/package.json +1 -1
  63. package/testing/puppeteer/puppeteer-element.d.ts +2 -2
  64. package/testing/puppeteer/puppeteer-events.d.ts +1 -1
  65. package/testing/testing-logger.d.ts +1 -1
  66. package/testing/testing.d.ts +1 -1
@@ -88,61 +88,10 @@ function stopAutoApplyChanges() {
88
88
  isAutoApplyingChanges = !1, autoApplyTimer && (clearTimeout(autoApplyTimer), autoApplyTimer = void 0);
89
89
  }
90
90
 
91
- const appData = require("@stencil/core/internal/app-data"), mockDoc = require("@stencil/core/mock-doc"), styles = new Map, modeResolutionChain = [], cstrs = new Map, queuedTicks = [], queuedWriteTasks = [], queuedReadTasks = [], moduleLoaded = new Map, queuedLoadModules = [], caughtErrors = [], hostRefs = new Map;
92
-
93
- let customError;
94
-
95
- const defaultConsoleError = e => {
96
- caughtErrors.push(e);
97
- }, consoleError = (e, t) => (customError || defaultConsoleError)(e, t), consoleDevError = (...e) => {
98
- caughtErrors.push(new Error(e.join(", ")));
99
- }, consoleDevWarn = (...e) => {
100
- const t = e.filter((e => "string" == typeof e || "number" == typeof e || "boolean" == typeof e));
101
- console.warn(...t);
102
- }, nextTick = e => {
103
- queuedTicks.push(e);
104
- }, win = mockDoc.setupGlobal(global), doc = win.document;
105
-
106
- exports.supportsShadow = !0;
107
-
108
- const plt = {
109
- $flags$: 0,
110
- $resourcesUrl$: "",
111
- jmp: e => e(),
112
- raf: e => requestAnimationFrame(e),
113
- ael: (e, t, a, o) => e.addEventListener(t, a, o),
114
- rel: (e, t, a, o) => e.removeEventListener(t, a, o),
115
- ce: (e, t) => new win.CustomEvent(e, t)
116
- }, Context = {};
117
-
118
- let autoApplyTimer, isAutoApplyingChanges = !1;
119
-
120
- const isMemberInElement = (e, t) => {
121
- if (null != e) {
122
- if (t in e) return !0;
123
- const a = e.nodeName;
124
- if (a) {
125
- const e = cstrs.get(a.toLowerCase());
126
- if (null != e && null != e.COMPILER_META && null != e.COMPILER_META.properties) return e.COMPILER_META.properties.some((e => e.name === t));
127
- }
128
- }
129
- return !1;
130
- }, addHostEventListeners = (e, t, a, o) => {
131
- appData.BUILD.hostListener && a && (appData.BUILD.hostListenerTargetParent && (a = o ? a.filter((([e]) => 32 & e)) : a.filter((([e]) => !(32 & e)))),
132
- a.map((([a, o, s]) => {
133
- const n = appData.BUILD.hostListenerTarget ? getHostListenerTarget(e, a) : e, l = hostListenerProxy(t, s), r = hostListenerOpts(a);
134
- plt.ael(n, o, l, r), (t.$rmListeners$ = t.$rmListeners$ || []).push((() => plt.rel(n, o, l, r)));
135
- })));
136
- }, hostListenerProxy = (e, t) => a => {
137
- try {
138
- appData.BUILD.lazyLoad ? 256 & e.$flags$ ? e.$lazyInstance$[t](a) : (e.$queuedListeners$ = e.$queuedListeners$ || []).push([ t, a ]) : e.$hostElement$[t](a);
139
- } catch (e) {
140
- consoleError(e);
141
- }
142
- }, getHostListenerTarget = (e, t) => appData.BUILD.hostListenerTargetDocument && 4 & t ? doc : appData.BUILD.hostListenerTargetWindow && 8 & t ? win : appData.BUILD.hostListenerTargetBody && 16 & t ? doc.body : appData.BUILD.hostListenerTargetParent && 32 & t ? e.parentElement : e, hostListenerOpts = e => ({
143
- passive: 0 != (1 & e),
144
- capture: 0 != (2 & e)
145
- }), XLINK_NS = "http://www.w3.org/1999/xlink";
91
+ const mockDoc = require("@stencil/core/mock-doc"), appData = require("@stencil/core/internal/app-data"), styles = new Map, modeResolutionChain = [], cstrs = new Map, queuedTicks = [], queuedWriteTasks = [], queuedReadTasks = [], moduleLoaded = new Map, queuedLoadModules = [], caughtErrors = [], hostRefs = new Map, getAssetPath = e => {
92
+ const t = new URL(e, plt.$resourcesUrl$);
93
+ return t.origin !== win.location.origin ? t.href : t.pathname;
94
+ };
146
95
 
147
96
  let i = 0;
148
97
 
@@ -152,36 +101,7 @@ const createTime = (e, t = "") => {
152
101
  return performance.mark(a), () => performance.measure(`[Stencil] ${e}() <${t}>`, a);
153
102
  }
154
103
  return () => {};
155
- }, rootAppliedStyles = new WeakMap, registerStyle = (e, t, a) => {
156
- let o = styles.get(e);
157
- o = t, styles.set(e, o);
158
- }, addStyle = (e, t, a, o) => {
159
- let s = getScopeId(t, a);
160
- const n = styles.get(s);
161
- if (!appData.BUILD.attachStyles) return s;
162
- if (e = 11 === e.nodeType ? e : doc, n) if ("string" == typeof n) {
163
- e = e.head || e;
164
- let a, l = rootAppliedStyles.get(e);
165
- if (l || rootAppliedStyles.set(e, l = new Set), !l.has(s)) {
166
- if (appData.BUILD.hydrateClientSide && e.host && (a = e.querySelector(`[sty-id="${s}"]`))) a.innerHTML = n; else {
167
- if (appData.BUILD.cssVarShim && plt.$cssShim$) {
168
- a = plt.$cssShim$.createHostStyle(o, s, n, !!(10 & t.$flags$));
169
- const e = a["s-sc"];
170
- e && (s = e, l = null);
171
- } else a = doc.createElement("style"), a.innerHTML = n;
172
- (appData.BUILD.hydrateServerSide || appData.BUILD.hotModuleReplacement) && a.setAttribute("sty-id", s),
173
- e.insertBefore(a, e.querySelector("link"));
174
- }
175
- l && l.add(s);
176
- }
177
- } else appData.BUILD.constructableCSS && !e.adoptedStyleSheets.includes(n) && (e.adoptedStyleSheets = [ ...e.adoptedStyleSheets, n ]);
178
- return s;
179
- }, attachStyles = e => {
180
- const t = e.$cmpMeta$, a = e.$hostElement$, o = t.$flags$, s = createTime("attachStyles", t.$tagName$), n = addStyle(appData.BUILD.shadowDom && exports.supportsShadow && a.shadowRoot ? a.shadowRoot : a.getRootNode(), t, e.$modeName$, a);
181
- (appData.BUILD.shadowDom || appData.BUILD.scoped) && appData.BUILD.cssAnnotations && 10 & o && (a["s-sc"] = n,
182
- a.classList.add(n + "-h"), appData.BUILD.scoped && 2 & o && a.classList.add(n + "-s")),
183
- s();
184
- }, getScopeId = (e, t) => "sc-" + (appData.BUILD.mode && t && 32 & e.$flags$ ? e.$tagName$ + "-" + t : e.$tagName$), computeMode = e => modeResolutionChain.map((t => t(e))).find((e => !!e)), EMPTY_OBJ = {}, isComplexType = e => "object" == (e = typeof e) || "function" === e, h = (e, t, ...a) => {
104
+ }, XLINK_NS = "http://www.w3.org/1999/xlink", EMPTY_OBJ = {}, isComplexType = e => "object" == (e = typeof e) || "function" === e, h = (e, t, ...a) => {
185
105
  let o = null, s = null, n = null, l = !1, r = !1;
186
106
  const p = [], i = t => {
187
107
  for (let a = 0; a < t.length; a++) o = t[a], Array.isArray(o) ? i(o) : null != o && "boolean" != typeof o && ((l = "function" != typeof e && !isComplexType(o)) ? o = String(o) : appData.BUILD.isDev && "function" != typeof e && void 0 === o.$flags$ && consoleDevError("vNode passed as children has unexpected type.\nMake sure it's using the correct h() function.\nEmpty objects can also be the cause, look for JSX comments that became objects."),
@@ -233,7 +153,92 @@ const createTime = (e, t = "") => {
233
153
  if (-1 === a) return;
234
154
  const o = t.indexOf("type"), s = t.indexOf("min"), n = t.indexOf("max"), l = t.indexOf("step");
235
155
  (a < o || a < s || a < n || a < l) && consoleDevWarn('The "value" prop of <input> should be set after "min", "max", "type" and "step"');
236
- }, setAccessor = (e, t, a, o, s, n) => {
156
+ }, clientHydrate = (e, t, a, o, s, n, l) => {
157
+ let r, p, i, d;
158
+ if (1 === n.nodeType) {
159
+ for (r = n.getAttribute("c-id"), r && (p = r.split("."), p[0] !== l && "0" !== p[0] || (i = {
160
+ $flags$: 0,
161
+ $hostId$: p[0],
162
+ $nodeId$: p[1],
163
+ $depth$: p[2],
164
+ $index$: p[3],
165
+ $tag$: n.tagName.toLowerCase(),
166
+ $elm$: n,
167
+ $attrs$: null,
168
+ $children$: null,
169
+ $key$: null,
170
+ $name$: null,
171
+ $text$: null
172
+ }, t.push(i), n.removeAttribute("c-id"), e.$children$ || (e.$children$ = []), e.$children$[i.$index$] = i,
173
+ e = i, o && "0" === i.$depth$ && (o[i.$index$] = i.$elm$))), d = n.childNodes.length - 1; d >= 0; d--) clientHydrate(e, t, a, o, s, n.childNodes[d], l);
174
+ if (n.shadowRoot) for (d = n.shadowRoot.childNodes.length - 1; d >= 0; d--) clientHydrate(e, t, a, o, s, n.shadowRoot.childNodes[d], l);
175
+ } else if (8 === n.nodeType) p = n.nodeValue.split("."), p[1] !== l && "0" !== p[1] || (r = p[0],
176
+ i = {
177
+ $flags$: 0,
178
+ $hostId$: p[1],
179
+ $nodeId$: p[2],
180
+ $depth$: p[3],
181
+ $index$: p[4],
182
+ $elm$: n,
183
+ $attrs$: null,
184
+ $children$: null,
185
+ $key$: null,
186
+ $name$: null,
187
+ $tag$: null,
188
+ $text$: null
189
+ }, "t" === r ? (i.$elm$ = n.nextSibling, i.$elm$ && 3 === i.$elm$.nodeType && (i.$text$ = i.$elm$.textContent,
190
+ t.push(i), n.remove(), e.$children$ || (e.$children$ = []), e.$children$[i.$index$] = i,
191
+ o && "0" === i.$depth$ && (o[i.$index$] = i.$elm$))) : i.$hostId$ === l && ("s" === r ? (i.$tag$ = "slot",
192
+ p[5] ? n["s-sn"] = i.$name$ = p[5] : n["s-sn"] = "", n["s-sr"] = !0, appData.BUILD.shadowDom && o && (i.$elm$ = doc.createElement(i.$tag$),
193
+ i.$name$ && i.$elm$.setAttribute("name", i.$name$), n.parentNode.insertBefore(i.$elm$, n),
194
+ n.remove(), "0" === i.$depth$ && (o[i.$index$] = i.$elm$)), a.push(i), e.$children$ || (e.$children$ = []),
195
+ e.$children$[i.$index$] = i) : "r" === r && (appData.BUILD.shadowDom && o ? n.remove() : appData.BUILD.slotRelocation && (s["s-cr"] = n,
196
+ n["s-cn"] = !0)))); else if (e && "style" === e.$tag$) {
197
+ const t = newVNode(null, n.textContent);
198
+ t.$elm$ = n, t.$index$ = "0", e.$children$ = [ t ];
199
+ }
200
+ }, initializeDocumentHydrate = (e, t) => {
201
+ if (1 === e.nodeType) {
202
+ let a = 0;
203
+ for (;a < e.childNodes.length; a++) initializeDocumentHydrate(e.childNodes[a], t);
204
+ if (e.shadowRoot) for (a = 0; a < e.shadowRoot.childNodes.length; a++) initializeDocumentHydrate(e.shadowRoot.childNodes[a], t);
205
+ } else if (8 === e.nodeType) {
206
+ const a = e.nodeValue.split(".");
207
+ "o" === a[0] && (t.set(a[1] + "." + a[2], e), e.nodeValue = "", e["s-en"] = a[3]);
208
+ }
209
+ }, computeMode = e => modeResolutionChain.map((t => t(e))).find((e => !!e)), parsePropertyValue = (e, t) => null == e || isComplexType(e) ? e : appData.BUILD.propBoolean && 4 & t ? "false" !== e && ("" === e || !!e) : appData.BUILD.propNumber && 2 & t ? parseFloat(e) : appData.BUILD.propString && 1 & t ? String(e) : e, getElement = e => appData.BUILD.lazyLoad ? getHostRef(e).$hostElement$ : e, emitEvent = (e, t, a) => {
210
+ const o = plt.ce(t, a);
211
+ return e.dispatchEvent(o), o;
212
+ }, rootAppliedStyles = new WeakMap, registerStyle = (e, t, a) => {
213
+ let o = styles.get(e);
214
+ o = t, styles.set(e, o);
215
+ }, addStyle = (e, t, a, o) => {
216
+ let s = getScopeId(t, a);
217
+ const n = styles.get(s);
218
+ if (!appData.BUILD.attachStyles) return s;
219
+ if (e = 11 === e.nodeType ? e : doc, n) if ("string" == typeof n) {
220
+ e = e.head || e;
221
+ let a, l = rootAppliedStyles.get(e);
222
+ if (l || rootAppliedStyles.set(e, l = new Set), !l.has(s)) {
223
+ if (appData.BUILD.hydrateClientSide && e.host && (a = e.querySelector(`[sty-id="${s}"]`))) a.innerHTML = n; else {
224
+ if (appData.BUILD.cssVarShim && plt.$cssShim$) {
225
+ a = plt.$cssShim$.createHostStyle(o, s, n, !!(10 & t.$flags$));
226
+ const e = a["s-sc"];
227
+ e && (s = e, l = null);
228
+ } else a = doc.createElement("style"), a.innerHTML = n;
229
+ (appData.BUILD.hydrateServerSide || appData.BUILD.hotModuleReplacement) && a.setAttribute("sty-id", s),
230
+ e.insertBefore(a, e.querySelector("link"));
231
+ }
232
+ l && l.add(s);
233
+ }
234
+ } else appData.BUILD.constructableCSS && !e.adoptedStyleSheets.includes(n) && (e.adoptedStyleSheets = [ ...e.adoptedStyleSheets, n ]);
235
+ return s;
236
+ }, attachStyles = e => {
237
+ const t = e.$cmpMeta$, a = e.$hostElement$, o = t.$flags$, s = createTime("attachStyles", t.$tagName$), n = addStyle(appData.BUILD.shadowDom && exports.supportsShadow && a.shadowRoot ? a.shadowRoot : a.getRootNode(), t, e.$modeName$, a);
238
+ (appData.BUILD.shadowDom || appData.BUILD.scoped) && appData.BUILD.cssAnnotations && 10 & o && (a["s-sc"] = n,
239
+ a.classList.add(n + "-h"), appData.BUILD.scoped && 2 & o && a.classList.add(n + "-s")),
240
+ s();
241
+ }, getScopeId = (e, t) => "sc-" + (appData.BUILD.mode && t && 32 & e.$flags$ ? e.$tagName$ + "-" + t : e.$tagName$), setAccessor = (e, t, a, o, s, n) => {
237
242
  if (a !== o) {
238
243
  let l = isMemberInElement(e, t), r = t.toLowerCase();
239
244
  if (appData.BUILD.vdomClass && "class" === t) {
@@ -389,10 +394,7 @@ const createElm = (e, t, a, o) => {
389
394
  checkSlotFallbackVisibility && updateFallbackSlotVisibility(n.$elm$), plt.$flags$ &= -2,
390
395
  relocateNodes.length = 0;
391
396
  }
392
- }, slotReferenceDebugNode = e => doc.createComment(`<slot${e.$name$ ? ' name="' + e.$name$ + '"' : ""}> (host=${hostTagName.toLowerCase()})`), originalLocationDebugNode = e => doc.createComment("org-location for " + (e.localName ? `<${e.localName}> (host=${e["s-hn"]})` : `[${e.textContent}]`)), getElement = e => appData.BUILD.lazyLoad ? getHostRef(e).$hostElement$ : e, emitEvent = (e, t, a) => {
393
- const o = plt.ce(t, a);
394
- return e.dispatchEvent(o), o;
395
- }, attachToAncestor = (e, t) => {
397
+ }, slotReferenceDebugNode = e => doc.createComment(`<slot${e.$name$ ? ' name="' + e.$name$ + '"' : ""}> (host=${hostTagName.toLowerCase()})`), originalLocationDebugNode = e => doc.createComment("org-location for " + (e.localName ? `<${e.localName}> (host=${e["s-hn"]})` : `[${e.textContent}]`)), attachToAncestor = (e, t) => {
396
398
  appData.BUILD.asyncLoading && t && !e.$onRenderResolve$ && t["s-p"] && t["s-p"].push(new Promise((t => e.$onRenderResolve$ = t)));
397
399
  }, scheduleUpdate = (e, t) => {
398
400
  if (appData.BUILD.taskQueue && appData.BUILD.updatable && (e.$flags$ |= 16), appData.BUILD.asyncLoading && 4 & e.$flags$) return void (e.$flags$ |= 512);
@@ -486,60 +488,7 @@ const callRender = (e, t, a) => {
486
488
  const a = t[e];
487
489
  "function" == typeof a.connectedCallback && a.connectedCallback(), serverSideConnected(a);
488
490
  }
489
- }, clientHydrate = (e, t, a, o, s, n, l) => {
490
- let r, p, i, d;
491
- if (1 === n.nodeType) {
492
- for (r = n.getAttribute("c-id"), r && (p = r.split("."), p[0] !== l && "0" !== p[0] || (i = {
493
- $flags$: 0,
494
- $hostId$: p[0],
495
- $nodeId$: p[1],
496
- $depth$: p[2],
497
- $index$: p[3],
498
- $tag$: n.tagName.toLowerCase(),
499
- $elm$: n,
500
- $attrs$: null,
501
- $children$: null,
502
- $key$: null,
503
- $name$: null,
504
- $text$: null
505
- }, t.push(i), n.removeAttribute("c-id"), e.$children$ || (e.$children$ = []), e.$children$[i.$index$] = i,
506
- e = i, o && "0" === i.$depth$ && (o[i.$index$] = i.$elm$))), d = n.childNodes.length - 1; d >= 0; d--) clientHydrate(e, t, a, o, s, n.childNodes[d], l);
507
- if (n.shadowRoot) for (d = n.shadowRoot.childNodes.length - 1; d >= 0; d--) clientHydrate(e, t, a, o, s, n.shadowRoot.childNodes[d], l);
508
- } else if (8 === n.nodeType) p = n.nodeValue.split("."), p[1] !== l && "0" !== p[1] || (r = p[0],
509
- i = {
510
- $flags$: 0,
511
- $hostId$: p[1],
512
- $nodeId$: p[2],
513
- $depth$: p[3],
514
- $index$: p[4],
515
- $elm$: n,
516
- $attrs$: null,
517
- $children$: null,
518
- $key$: null,
519
- $name$: null,
520
- $tag$: null,
521
- $text$: null
522
- }, "t" === r ? (i.$elm$ = n.nextSibling, i.$elm$ && 3 === i.$elm$.nodeType && (i.$text$ = i.$elm$.textContent,
523
- t.push(i), n.remove(), e.$children$ || (e.$children$ = []), e.$children$[i.$index$] = i,
524
- o && "0" === i.$depth$ && (o[i.$index$] = i.$elm$))) : i.$hostId$ === l && ("s" === r ? (i.$tag$ = "slot",
525
- p[5] ? n["s-sn"] = i.$name$ = p[5] : n["s-sn"] = "", n["s-sr"] = !0, appData.BUILD.shadowDom && o && (i.$elm$ = doc.createElement(i.$tag$),
526
- i.$name$ && i.$elm$.setAttribute("name", i.$name$), n.parentNode.insertBefore(i.$elm$, n),
527
- n.remove(), "0" === i.$depth$ && (o[i.$index$] = i.$elm$)), a.push(i), e.$children$ || (e.$children$ = []),
528
- e.$children$[i.$index$] = i) : "r" === r && (appData.BUILD.shadowDom && o ? n.remove() : appData.BUILD.slotRelocation && (s["s-cr"] = n,
529
- n["s-cn"] = !0)))); else if (e && "style" === e.$tag$) {
530
- const t = newVNode(null, n.textContent);
531
- t.$elm$ = n, t.$index$ = "0", e.$children$ = [ t ];
532
- }
533
- }, initializeDocumentHydrate = (e, t) => {
534
- if (1 === e.nodeType) {
535
- let a = 0;
536
- for (;a < e.childNodes.length; a++) initializeDocumentHydrate(e.childNodes[a], t);
537
- if (e.shadowRoot) for (a = 0; a < e.shadowRoot.childNodes.length; a++) initializeDocumentHydrate(e.shadowRoot.childNodes[a], t);
538
- } else if (8 === e.nodeType) {
539
- const a = e.nodeValue.split(".");
540
- "o" === a[0] && (t.set(a[1] + "." + a[2], e), e.nodeValue = "", e["s-en"] = a[3]);
541
- }
542
- }, parsePropertyValue = (e, t) => null == e || isComplexType(e) ? e : appData.BUILD.propBoolean && 4 & t ? "false" !== e && ("" === e || !!e) : appData.BUILD.propNumber && 2 & t ? parseFloat(e) : appData.BUILD.propString && 1 & t ? String(e) : e, getValue = (e, t) => getHostRef(e).$instanceValues$.get(t), setValue = (e, t, a, o) => {
491
+ }, getValue = (e, t) => getHostRef(e).$instanceValues$.get(t), setValue = (e, t, a, o) => {
543
492
  const s = getHostRef(e), n = appData.BUILD.lazyLoad ? s.$hostElement$ : e, l = s.$instanceValues$.get(t), r = s.$flags$, p = appData.BUILD.lazyLoad ? s.$lazyInstance$ : n;
544
493
  a = parsePropertyValue(a, o.$members$[t][0]);
545
494
  const i = Number.isNaN(l) && Number.isNaN(a), d = a !== l && !i;
@@ -805,10 +754,22 @@ const callRender = (e, t, a) => {
805
754
  const a = [ e ];
806
755
  for (;(e = e.nextSibling) && e["s-sn"] === t; ) a.push(e);
807
756
  return a;
808
- }, getAssetPath = e => {
809
- const t = new URL(e, plt.$resourcesUrl$);
810
- return t.origin !== win.location.origin ? t.href : t.pathname;
811
- }, parseVNodeAnnotations = (e, t, a, o) => {
757
+ }, addHostEventListeners = (e, t, a, o) => {
758
+ appData.BUILD.hostListener && a && (appData.BUILD.hostListenerTargetParent && (a = o ? a.filter((([e]) => 32 & e)) : a.filter((([e]) => !(32 & e)))),
759
+ a.map((([a, o, s]) => {
760
+ const n = appData.BUILD.hostListenerTarget ? getHostListenerTarget(e, a) : e, l = hostListenerProxy(t, s), r = hostListenerOpts(a);
761
+ plt.ael(n, o, l, r), (t.$rmListeners$ = t.$rmListeners$ || []).push((() => plt.rel(n, o, l, r)));
762
+ })));
763
+ }, hostListenerProxy = (e, t) => a => {
764
+ try {
765
+ appData.BUILD.lazyLoad ? 256 & e.$flags$ ? e.$lazyInstance$[t](a) : (e.$queuedListeners$ = e.$queuedListeners$ || []).push([ t, a ]) : e.$hostElement$[t](a);
766
+ } catch (e) {
767
+ consoleError(e);
768
+ }
769
+ }, getHostListenerTarget = (e, t) => appData.BUILD.hostListenerTargetDocument && 4 & t ? doc : appData.BUILD.hostListenerTargetWindow && 8 & t ? win : appData.BUILD.hostListenerTargetBody && 16 & t ? doc.body : appData.BUILD.hostListenerTargetParent && 32 & t ? e.parentElement : e, hostListenerOpts = e => ({
770
+ passive: 0 != (1 & e),
771
+ capture: 0 != (2 & e)
772
+ }), parseVNodeAnnotations = (e, t, a, o) => {
812
773
  null != t && (null != t["s-nr"] && o.push(t), 1 === t.nodeType && t.childNodes.forEach((t => {
813
774
  const s = getHostRef(t);
814
775
  if (null != s && !a.staticComponents.has(t.nodeName.toLowerCase())) {
@@ -872,6 +833,45 @@ const callRender = (e, t, a) => {
872
833
  e["s-p"] = [], e["s-rc"] = [], addHostEventListeners(e, a, t.$listeners$, !1), hostRefs.set(e, a);
873
834
  };
874
835
 
836
+ let customError;
837
+
838
+ const defaultConsoleError = e => {
839
+ caughtErrors.push(e);
840
+ }, consoleError = (e, t) => (customError || defaultConsoleError)(e, t), consoleDevError = (...e) => {
841
+ caughtErrors.push(new Error(e.join(", ")));
842
+ }, consoleDevWarn = (...e) => {
843
+ const t = e.filter((e => "string" == typeof e || "number" == typeof e || "boolean" == typeof e));
844
+ console.warn(...t);
845
+ }, nextTick = e => {
846
+ queuedTicks.push(e);
847
+ }, win = mockDoc.setupGlobal(global), doc = win.document;
848
+
849
+ exports.supportsShadow = !0;
850
+
851
+ const plt = {
852
+ $flags$: 0,
853
+ $resourcesUrl$: "",
854
+ jmp: e => e(),
855
+ raf: e => requestAnimationFrame(e),
856
+ ael: (e, t, a, o) => e.addEventListener(t, a, o),
857
+ rel: (e, t, a, o) => e.removeEventListener(t, a, o),
858
+ ce: (e, t) => new win.CustomEvent(e, t)
859
+ }, Context = {};
860
+
861
+ let autoApplyTimer, isAutoApplyingChanges = !1;
862
+
863
+ const isMemberInElement = (e, t) => {
864
+ if (null != e) {
865
+ if (t in e) return !0;
866
+ const a = e.nodeName;
867
+ if (a) {
868
+ const e = cstrs.get(a.toLowerCase());
869
+ if (null != e && null != e.COMPILER_META && null != e.COMPILER_META.properties) return e.COMPILER_META.properties.some((e => e.name === t));
870
+ }
871
+ }
872
+ return !1;
873
+ };
874
+
875
875
  Object.defineProperty(exports, "Env", {
876
876
  enumerable: !0,
877
877
  get: function() {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/internal/testing",
3
- "version": "2.18.0",
3
+ "version": "2.19.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