@stencil/core 2.8.0 → 2.10.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 (72) hide show
  1. package/cli/index.cjs +234 -209
  2. package/cli/index.js +234 -209
  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 +923 -234
  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/index.cjs +1 -0
  36. package/internal/app-data/index.js +1 -0
  37. package/internal/app-data/package.json +1 -1
  38. package/internal/client/css-shim.js +1 -1
  39. package/internal/client/dom.js +1 -1
  40. package/internal/client/index.js +188 -99
  41. package/internal/client/package.json +1 -1
  42. package/internal/client/patch-browser.js +1 -1
  43. package/internal/client/patch-esm.js +1 -1
  44. package/internal/client/shadow-css.js +1 -1
  45. package/internal/hydrate/index.js +64 -39
  46. package/internal/hydrate/package.json +1 -1
  47. package/internal/index.js +1 -0
  48. package/internal/package.json +1 -1
  49. package/internal/stencil-private.d.ts +130 -6
  50. package/internal/stencil-public-compiler.d.ts +20 -2
  51. package/internal/testing/index.js +78 -50
  52. package/internal/testing/package.json +1 -1
  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 +11 -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 +4435 -425
  62. package/sys/node/package.json +1 -1
  63. package/sys/node/worker.js +1 -1
  64. package/testing/index.js +24 -19
  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/bin/cli.ts +0 -20
  69. package/screenshot/index.js.map +0 -1
  70. package/sys/deno/index.js +0 -1791
  71. package/sys/deno/node-compat.js +0 -2654
  72. package/sys/deno/worker.js +0 -44
@@ -11,7 +11,7 @@ let renderingRef = null;
11
11
  let queueCongestion = 0;
12
12
  let queuePending = false;
13
13
  /*
14
- Stencil Client Platform v2.8.0 | MIT Licensed | https://stenciljs.com
14
+ Stencil Client Platform v2.10.0 | MIT Licensed | https://stenciljs.com
15
15
  */
16
16
  import { BUILD, NAMESPACE } from '@stencil/core/internal/app-data';
17
17
  const win = typeof window !== 'undefined' ? window : {};
@@ -594,7 +594,6 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
594
594
  // Workaround for Safari, moving the <input> caret when re-assigning the same valued
595
595
  if (memberName === 'list') {
596
596
  isProp = false;
597
- // tslint:disable-next-line: triple-equals
598
597
  }
599
598
  else if (oldValue == null || elm[memberName] != n) {
600
599
  elm[memberName] = n;
@@ -1289,6 +1288,13 @@ const createEvent = (ref, name, flags) => {
1289
1288
  },
1290
1289
  };
1291
1290
  };
1291
+ /**
1292
+ * Helper function to create & dispatch a custom Event on a provided target
1293
+ * @param elm the target of the Event
1294
+ * @param name the name to give the custom Event
1295
+ * @param opts options for configuring a custom Event
1296
+ * @returns the custom Event
1297
+ */
1292
1298
  const emitEvent = (elm, name, opts) => {
1293
1299
  const ev = plt.ce(name, opts);
1294
1300
  elm.dispatchEvent(ev);
@@ -1945,14 +1951,14 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
1945
1951
  prototype.attributeChangedCallback = function (attrName, _oldValue, newValue) {
1946
1952
  plt.jmp(() => {
1947
1953
  const propName = attrNameToPropName.get(attrName);
1948
- // In a webcomponent lifecyle the attributeChangedCallback runs prior to connectedCallback
1954
+ // In a web component lifecycle the attributeChangedCallback runs prior to connectedCallback
1949
1955
  // in the case where an attribute was set inline.
1950
1956
  // ```html
1951
1957
  // <my-component some-attribute="some-value"></my-component>
1952
1958
  // ```
1953
1959
  //
1954
- // There is an edge case where a developer sets the attribute inline on a custom element and then programatically
1955
- // changes it before it has been upgraded as shown below:
1960
+ // There is an edge case where a developer sets the attribute inline on a custom element and then
1961
+ // programmatically changes it before it has been upgraded as shown below:
1956
1962
  //
1957
1963
  // ```html
1958
1964
  // <!-- this component has _not_ been upgraded yet -->
@@ -1962,13 +1968,13 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
1962
1968
  // el = document.querySelector("#test");
1963
1969
  // el.someAttribute = "another-value";
1964
1970
  // // upgrade component
1965
- // cutsomElements.define('my-component', MyComponent);
1971
+ // customElements.define('my-component', MyComponent);
1966
1972
  // </script>
1967
1973
  // ```
1968
1974
  // In this case if we do not unshadow here and use the value of the shadowing property, attributeChangedCallback
1969
1975
  // will be called with `newValue = "some-value"` and will set the shadowed property (this.someAttribute = "another-value")
1970
1976
  // to the value that was set inline i.e. "some-value" from above example. When
1971
- // the connectedCallback attempts to unshadow it will use "some-value" as the intial value rather than "another-value"
1977
+ // the connectedCallback attempts to unshadow it will use "some-value" as the initial value rather than "another-value"
1972
1978
  //
1973
1979
  // The case where the attribute was NOT set inline but was not set programmatically shall be handled/unshadowed
1974
1980
  // by connectedCallback as this attributeChangedCallback will not fire.
@@ -1982,6 +1988,14 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
1982
1988
  newValue = this[propName];
1983
1989
  delete this[propName];
1984
1990
  }
1991
+ else if (prototype.hasOwnProperty(propName) &&
1992
+ typeof this[propName] === 'number' &&
1993
+ this[propName] == newValue) {
1994
+ // if the propName exists on the prototype of `Cstr`, this update may be a result of Stencil using native
1995
+ // APIs to reflect props as attributes. Calls to `setAttribute(someElement, propName)` will result in
1996
+ // `propName` to be converted to a `DOMString`, which may not be what we want for other primitive props.
1997
+ return;
1998
+ }
1985
1999
  this[propName] = newValue === null && typeof this[propName] === 'boolean' ? false : newValue;
1986
2000
  });
1987
2001
  };
@@ -2093,7 +2107,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
2093
2107
  const ancestorComponent = hostRef.$ancestorComponent$;
2094
2108
  const schedule = () => scheduleUpdate(hostRef, true);
2095
2109
  if (BUILD.asyncLoading && ancestorComponent && ancestorComponent['s-rc']) {
2096
- // this is the intial load and this component it has an ancestor component
2110
+ // this is the initial load and this component it has an ancestor component
2097
2111
  // but the ancestor component has NOT fired its will update lifecycle yet
2098
2112
  // so let's just cool our jets and wait for the ancestor to continue first
2099
2113
  // this will get fired off when the ancestor component
@@ -2272,6 +2286,22 @@ const proxyCustomElement = (Cstr, compactMeta) => {
2272
2286
  originalDisconnectedCallback.call(this);
2273
2287
  }
2274
2288
  },
2289
+ __attachShadow() {
2290
+ if (supportsShadow) {
2291
+ if (BUILD.shadowDelegatesFocus) {
2292
+ this.attachShadow({
2293
+ mode: 'open',
2294
+ delegatesFocus: !!(cmpMeta.$flags$ & 16 /* shadowDelegatesFocus */),
2295
+ });
2296
+ }
2297
+ else {
2298
+ this.attachShadow({ mode: 'open' });
2299
+ }
2300
+ }
2301
+ else {
2302
+ this.shadowRoot = this;
2303
+ }
2304
+ },
2275
2305
  });
2276
2306
  Cstr.is = cmpMeta.$tagName$;
2277
2307
  return proxyComponent(Cstr, cmpMeta, 1 /* isElementConstructor */ | 2 /* proxyState */);
@@ -2298,14 +2328,6 @@ const forceModeUpdate = (elm) => {
2298
2328
  }
2299
2329
  }
2300
2330
  };
2301
- const attachShadow = (el) => {
2302
- if (supportsShadow) {
2303
- el.attachShadow({ mode: 'open' });
2304
- }
2305
- else {
2306
- el.shadowRoot = el;
2307
- }
2308
- };
2309
2331
  const hmrStart = (elm, cmpMeta, hmrVersionId) => {
2310
2332
  // ¯\_(ツ)_/¯
2311
2333
  const hostRef = getHostRef(elm);
@@ -2379,6 +2401,62 @@ const patchSlotAppendChild = (HostElementPrototype) => {
2379
2401
  return this.__appendChild(newChild);
2380
2402
  };
2381
2403
  };
2404
+ /**
2405
+ * Patches the text content of an unnamed slotted node inside a scoped component
2406
+ * @param hostElementPrototype the `Element` to be patched
2407
+ * @param cmpMeta component runtime metadata used to determine if the component should be patched or not
2408
+ */
2409
+ const patchTextContent = (hostElementPrototype, cmpMeta) => {
2410
+ if (BUILD.scoped && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
2411
+ const descriptor = Object.getOwnPropertyDescriptor(Node.prototype, 'textContent');
2412
+ Object.defineProperty(hostElementPrototype, '__textContent', descriptor);
2413
+ Object.defineProperty(hostElementPrototype, 'textContent', {
2414
+ get() {
2415
+ var _a;
2416
+ // get the 'default slot', which would be the first slot in a shadow tree (if we were using one), whose name is
2417
+ // the empty string
2418
+ const slotNode = getHostSlotNode(this.childNodes, '');
2419
+ // when a slot node is found, the textContent _may_ be found in the next sibling (text) node, depending on how
2420
+ // nodes were reordered during the vdom render. first try to get the text content from the sibling.
2421
+ if (((_a = slotNode === null || slotNode === void 0 ? void 0 : slotNode.nextSibling) === null || _a === void 0 ? void 0 : _a.nodeType) === 3 /* TEXT_NODE */) {
2422
+ return slotNode.nextSibling.textContent;
2423
+ }
2424
+ else if (slotNode) {
2425
+ return slotNode.textContent;
2426
+ }
2427
+ else {
2428
+ // fallback to the original implementation
2429
+ return this.__textContent;
2430
+ }
2431
+ },
2432
+ set(value) {
2433
+ var _a;
2434
+ // get the 'default slot', which would be the first slot in a shadow tree (if we were using one), whose name is
2435
+ // the empty string
2436
+ const slotNode = getHostSlotNode(this.childNodes, '');
2437
+ // when a slot node is found, the textContent _may_ need to be placed in the next sibling (text) node,
2438
+ // depending on how nodes were reordered during the vdom render. first try to set the text content on the
2439
+ // sibling.
2440
+ if (((_a = slotNode === null || slotNode === void 0 ? void 0 : slotNode.nextSibling) === null || _a === void 0 ? void 0 : _a.nodeType) === 3 /* TEXT_NODE */) {
2441
+ slotNode.nextSibling.textContent = value;
2442
+ }
2443
+ else if (slotNode) {
2444
+ slotNode.textContent = value;
2445
+ }
2446
+ else {
2447
+ // we couldn't find a slot, but that doesn't mean that there isn't one. if this check ran before the DOM
2448
+ // loaded, we could have missed it. check for a content reference element on the scoped component and insert
2449
+ // it there
2450
+ this.__textContent = value;
2451
+ const contentRefElm = this['s-cr'];
2452
+ if (contentRefElm) {
2453
+ this.insertBefore(contentRefElm, this.firstChild);
2454
+ }
2455
+ }
2456
+ },
2457
+ });
2458
+ }
2459
+ };
2382
2460
  const patchChildSlotNodes = (elm, cmpMeta) => {
2383
2461
  class FakeNodeList extends Array {
2384
2462
  item(n) {
@@ -2417,6 +2495,12 @@ const patchChildSlotNodes = (elm, cmpMeta) => {
2417
2495
  }
2418
2496
  };
2419
2497
  const getSlotName = (node) => node['s-sn'] || (node.nodeType === 1 && node.getAttribute('slot')) || '';
2498
+ /**
2499
+ * Recursively searches a series of child nodes for a slot with the provided name.
2500
+ * @param childNodes the nodes to search for a slot with a specific name.
2501
+ * @param slotName the name of the slot to match on.
2502
+ * @returns a reference to the slot node that matches the provided name, `null` otherwise
2503
+ */
2420
2504
  const getHostSlotNode = (childNodes, slotName) => {
2421
2505
  let i = 0;
2422
2506
  let childNode;
@@ -2473,99 +2557,104 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
2473
2557
  registerStyle(styles[i].getAttribute(HYDRATED_STYLE_ID), convertScopedToShadow(styles[i].innerHTML), true);
2474
2558
  }
2475
2559
  }
2476
- lazyBundles.map((lazyBundle) => lazyBundle[1].map((compactMeta) => {
2477
- const cmpMeta = {
2478
- $flags$: compactMeta[0],
2479
- $tagName$: compactMeta[1],
2480
- $members$: compactMeta[2],
2481
- $listeners$: compactMeta[3],
2482
- };
2483
- if (BUILD.member) {
2484
- cmpMeta.$members$ = compactMeta[2];
2485
- }
2486
- if (BUILD.hostListener) {
2487
- cmpMeta.$listeners$ = compactMeta[3];
2488
- }
2489
- if (BUILD.reflect) {
2490
- cmpMeta.$attrsToReflect$ = [];
2491
- }
2492
- if (BUILD.watchCallback) {
2493
- cmpMeta.$watchers$ = {};
2494
- }
2495
- if (BUILD.shadowDom && !supportsShadow && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
2496
- cmpMeta.$flags$ |= 8 /* needsShadowDomShim */;
2497
- }
2498
- const tagName = BUILD.transformTagName && options.transformTagName
2499
- ? options.transformTagName(cmpMeta.$tagName$)
2500
- : cmpMeta.$tagName$;
2501
- const HostElement = class extends HTMLElement {
2502
- // StencilLazyHost
2503
- constructor(self) {
2504
- // @ts-ignore
2505
- super(self);
2506
- self = this;
2507
- registerHost(self, cmpMeta);
2508
- if (BUILD.shadowDom && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
2509
- // this component is using shadow dom
2510
- // and this browser supports shadow dom
2511
- // add the read-only property "shadowRoot" to the host element
2512
- // adding the shadow root build conditionals to minimize runtime
2513
- if (supportsShadow) {
2514
- if (BUILD.shadowDelegatesFocus) {
2515
- self.attachShadow({
2516
- mode: 'open',
2517
- delegatesFocus: !!(cmpMeta.$flags$ & 16 /* shadowDelegatesFocus */),
2518
- });
2560
+ lazyBundles.map((lazyBundle) => {
2561
+ lazyBundle[1].map((compactMeta) => {
2562
+ const cmpMeta = {
2563
+ $flags$: compactMeta[0],
2564
+ $tagName$: compactMeta[1],
2565
+ $members$: compactMeta[2],
2566
+ $listeners$: compactMeta[3],
2567
+ };
2568
+ if (BUILD.member) {
2569
+ cmpMeta.$members$ = compactMeta[2];
2570
+ }
2571
+ if (BUILD.hostListener) {
2572
+ cmpMeta.$listeners$ = compactMeta[3];
2573
+ }
2574
+ if (BUILD.reflect) {
2575
+ cmpMeta.$attrsToReflect$ = [];
2576
+ }
2577
+ if (BUILD.watchCallback) {
2578
+ cmpMeta.$watchers$ = {};
2579
+ }
2580
+ if (BUILD.shadowDom && !supportsShadow && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
2581
+ cmpMeta.$flags$ |= 8 /* needsShadowDomShim */;
2582
+ }
2583
+ const tagName = BUILD.transformTagName && options.transformTagName
2584
+ ? options.transformTagName(cmpMeta.$tagName$)
2585
+ : cmpMeta.$tagName$;
2586
+ const HostElement = class extends HTMLElement {
2587
+ // StencilLazyHost
2588
+ constructor(self) {
2589
+ // @ts-ignore
2590
+ super(self);
2591
+ self = this;
2592
+ registerHost(self, cmpMeta);
2593
+ if (BUILD.shadowDom && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
2594
+ // this component is using shadow dom
2595
+ // and this browser supports shadow dom
2596
+ // add the read-only property "shadowRoot" to the host element
2597
+ // adding the shadow root build conditionals to minimize runtime
2598
+ if (supportsShadow) {
2599
+ if (BUILD.shadowDelegatesFocus) {
2600
+ self.attachShadow({
2601
+ mode: 'open',
2602
+ delegatesFocus: !!(cmpMeta.$flags$ & 16 /* shadowDelegatesFocus */),
2603
+ });
2604
+ }
2605
+ else {
2606
+ self.attachShadow({ mode: 'open' });
2607
+ }
2519
2608
  }
2520
- else {
2521
- self.attachShadow({ mode: 'open' });
2609
+ else if (!BUILD.hydrateServerSide && !('shadowRoot' in self)) {
2610
+ self.shadowRoot = self;
2522
2611
  }
2523
2612
  }
2524
- else if (!BUILD.hydrateServerSide && !('shadowRoot' in self)) {
2525
- self.shadowRoot = self;
2613
+ if (BUILD.slotChildNodesFix) {
2614
+ patchChildSlotNodes(self, cmpMeta);
2526
2615
  }
2527
2616
  }
2528
- if (BUILD.slotChildNodesFix) {
2529
- patchChildSlotNodes(self, cmpMeta);
2530
- }
2531
- }
2532
- connectedCallback() {
2533
- if (appLoadFallback) {
2534
- clearTimeout(appLoadFallback);
2535
- appLoadFallback = null;
2617
+ connectedCallback() {
2618
+ if (appLoadFallback) {
2619
+ clearTimeout(appLoadFallback);
2620
+ appLoadFallback = null;
2621
+ }
2622
+ if (isBootstrapping) {
2623
+ // connectedCallback will be processed once all components have been registered
2624
+ deferredConnectedCallbacks.push(this);
2625
+ }
2626
+ else {
2627
+ plt.jmp(() => connectedCallback(this));
2628
+ }
2536
2629
  }
2537
- if (isBootstrapping) {
2538
- // connectedCallback will be processed once all components have been registered
2539
- deferredConnectedCallbacks.push(this);
2630
+ disconnectedCallback() {
2631
+ plt.jmp(() => disconnectedCallback(this));
2540
2632
  }
2541
- else {
2542
- plt.jmp(() => connectedCallback(this));
2633
+ componentOnReady() {
2634
+ return getHostRef(this).$onReadyPromise$;
2543
2635
  }
2636
+ };
2637
+ if (BUILD.cloneNodeFix) {
2638
+ patchCloneNode(HostElement.prototype);
2544
2639
  }
2545
- disconnectedCallback() {
2546
- plt.jmp(() => disconnectedCallback(this));
2640
+ if (BUILD.appendChildSlotFix) {
2641
+ patchSlotAppendChild(HostElement.prototype);
2547
2642
  }
2548
- componentOnReady() {
2549
- return getHostRef(this).$onReadyPromise$;
2643
+ if (BUILD.hotModuleReplacement) {
2644
+ HostElement.prototype['s-hmr'] = function (hmrVersionId) {
2645
+ hmrStart(this, cmpMeta, hmrVersionId);
2646
+ };
2550
2647
  }
2551
- };
2552
- if (BUILD.cloneNodeFix) {
2553
- patchCloneNode(HostElement.prototype);
2554
- }
2555
- if (BUILD.appendChildSlotFix) {
2556
- patchSlotAppendChild(HostElement.prototype);
2557
- }
2558
- if (BUILD.hotModuleReplacement) {
2559
- HostElement.prototype['s-hmr'] = function (hmrVersionId) {
2560
- hmrStart(this, cmpMeta, hmrVersionId);
2561
- };
2562
- }
2563
- cmpMeta.$lazyBundleId$ = lazyBundle[0];
2564
- if (!exclude.includes(tagName) && !customElements.get(tagName)) {
2565
- cmpTags.push(tagName);
2566
- customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1 /* isElementConstructor */));
2567
- }
2568
- }));
2648
+ if (BUILD.scopedSlotTextContentFix) {
2649
+ patchTextContent(HostElement.prototype, cmpMeta);
2650
+ }
2651
+ cmpMeta.$lazyBundleId$ = lazyBundle[0];
2652
+ if (!exclude.includes(tagName) && !customElements.get(tagName)) {
2653
+ cmpTags.push(tagName);
2654
+ customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1 /* isElementConstructor */));
2655
+ }
2656
+ });
2657
+ });
2569
2658
  if (BUILD.invisiblePrehydration && (BUILD.hydratedClass || BUILD.hydratedAttribute)) {
2570
2659
  visibilityStyle.innerHTML = cmpTags + HYDRATED_CSS;
2571
2660
  visibilityStyle.setAttribute('data-styles', '');
@@ -2935,4 +3024,4 @@ const Build = {
2935
3024
  isTesting: BUILD.isTesting ? true : false,
2936
3025
  };
2937
3026
  export { BUILD, Env, NAMESPACE } from '@stencil/core/internal/app-data';
2938
- export { Build, CSS, Context, Fragment, H, H as HTMLElement, Host, STENCIL_DEV_MODE, addHostEventListeners, attachShadow, bootstrapLazy, cmpModules, connectedCallback, consoleDevError, consoleDevInfo, consoleDevWarn, consoleError, createEvent, defineCustomElement, disconnectedCallback, doc, forceModeUpdate, forceUpdate, getAssetPath, getConnect, getContext, getElement, getHostRef, getMode, getRenderingRef, getValue, h, insertVdomAnnotations, isMemberInElement, loadModule, modeResolutionChain, nextTick, parsePropertyValue, plt, postUpdateComponent, promiseResolve, proxyComponent, proxyCustomElement, readTask, registerHost, registerInstance, renderVdom, setAssetPath, setErrorHandler, setMode, setPlatformHelpers, setPlatformOptions, setValue, styles, supportsConstructibleStylesheets, supportsListenerOptions, supportsShadow, win, writeTask };
3027
+ export { Build, CSS, Context, Fragment, H, H as HTMLElement, Host, STENCIL_DEV_MODE, addHostEventListeners, bootstrapLazy, cmpModules, connectedCallback, consoleDevError, consoleDevInfo, consoleDevWarn, consoleError, createEvent, defineCustomElement, disconnectedCallback, doc, forceModeUpdate, forceUpdate, getAssetPath, getConnect, getContext, getElement, getHostRef, getMode, getRenderingRef, getValue, h, insertVdomAnnotations, isMemberInElement, loadModule, modeResolutionChain, nextTick, parsePropertyValue, plt, postUpdateComponent, promiseResolve, proxyComponent, proxyCustomElement, readTask, registerHost, registerInstance, renderVdom, setAssetPath, setErrorHandler, setMode, setPlatformHelpers, setPlatformOptions, setValue, styles, supportsConstructibleStylesheets, supportsListenerOptions, supportsShadow, win, writeTask };
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/internal/client",
3
- "version": "2.8.0",
3
+ "version": "2.10.0",
4
4
  "description": "Stencil internal client platform to be imported by the Stencil Compiler and internal runtime. 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 Client Patch Browser v2.8.0 | MIT Licensed | https://stenciljs.com
2
+ Stencil Client Patch Browser v2.10.0 | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  import { BUILD, NAMESPACE } from '@stencil/core/internal/app-data';
5
5
  import { consoleDevInfo, plt, win, doc, promiseResolve, H } from '@stencil/core';
@@ -1,5 +1,5 @@
1
1
  /*
2
- Stencil Client Patch Esm v2.8.0 | MIT Licensed | https://stenciljs.com
2
+ Stencil Client Patch Esm v2.10.0 | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  import { BUILD } from '@stencil/core/internal/app-data';
5
5
  import { CSS, plt, win, promiseResolve } from '@stencil/core';
@@ -1,5 +1,5 @@
1
1
  /*
2
- Stencil Client Platform v2.8.0 | MIT Licensed | https://stenciljs.com
2
+ Stencil Client Platform v2.10.0 | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  /**
5
5
  * @license
@@ -639,7 +639,8 @@ const callRender = (e, t, o) => {
639
639
  s.attributeChangedCallback = function(e, t, n) {
640
640
  plt.jmp((() => {
641
641
  const t = o.get(e);
642
- this.hasOwnProperty(t) && (n = this[t], delete this[t]), this[t] = (null !== n || "boolean" != typeof this[t]) && n;
642
+ if (this.hasOwnProperty(t)) n = this[t], delete this[t]; else if (s.hasOwnProperty(t) && "number" == typeof this[t] && this[t] == n) return;
643
+ this[t] = (null !== n || "boolean" != typeof this[t]) && n;
643
644
  }));
644
645
  }, e.observedAttributes = n.filter((([e, t]) => 15 & t[0])).map((([e, n]) => {
645
646
  const s = n[1] || e;
@@ -759,6 +760,9 @@ const callRender = (e, t, o) => {
759
760
  },
760
761
  disconnectedCallback() {
761
762
  disconnectedCallback(this), BUILD.disconnectedCallback && s && s.call(this);
763
+ },
764
+ __attachShadow() {
765
+ this.shadowRoot = this;
762
766
  }
763
767
  }), e.is = o.$tagName$, proxyComponent(e, o, 3);
764
768
  }, forceModeUpdate = e => {
@@ -770,8 +774,6 @@ const callRender = (e, t, o) => {
770
774
  attachStyles(o), forceUpdate$1(e));
771
775
  }
772
776
  }
773
- }, attachShadow = e => {
774
- e.shadowRoot = e;
775
777
  }, patchCloneNode = e => {
776
778
  const t = e.cloneNode;
777
779
  e.cloneNode = function(e) {
@@ -793,6 +795,26 @@ const callRender = (e, t, o) => {
793
795
  }
794
796
  return this.__appendChild(e);
795
797
  };
798
+ }, patchTextContent = (e, t) => {
799
+ if (BUILD.scoped && 2 & t.$flags$) {
800
+ const t = Object.getOwnPropertyDescriptor(Node.prototype, "textContent");
801
+ Object.defineProperty(e, "__textContent", t), Object.defineProperty(e, "textContent", {
802
+ get() {
803
+ var e;
804
+ const t = getHostSlotNode(this.childNodes, "");
805
+ return 3 === (null === (e = null == t ? void 0 : t.nextSibling) || void 0 === e ? void 0 : e.nodeType) ? t.nextSibling.textContent : t ? t.textContent : this.__textContent;
806
+ },
807
+ set(e) {
808
+ var t;
809
+ const o = getHostSlotNode(this.childNodes, "");
810
+ if (3 === (null === (t = null == o ? void 0 : o.nextSibling) || void 0 === t ? void 0 : t.nodeType)) o.nextSibling.textContent = e; else if (o) o.textContent = e; else {
811
+ this.__textContent = e;
812
+ const t = this["s-cr"];
813
+ t && this.insertBefore(t, this.firstChild);
814
+ }
815
+ }
816
+ });
817
+ }
796
818
  }, patchChildSlotNodes = (e, t) => {
797
819
  class o extends Array {
798
820
  item(e) {
@@ -886,41 +908,44 @@ const callRender = (e, t, o) => {
886
908
  if (Object.assign(plt, t), plt.$resourcesUrl$ = new URL(t.resourcesUrl || "./", doc.baseURI).href,
887
909
  BUILD.asyncQueue && t.syncQueue && (plt.$flags$ |= 4), BUILD.hydrateClientSide && (plt.$flags$ |= 2),
888
910
  BUILD.hydrateClientSide && BUILD.shadowDom) for (;p < c.length; p++) registerStyle(c[p].getAttribute("sty-id"), c[p].innerHTML.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g, "$1{"));
889
- e.map((e => e[1].map((o => {
890
- const a = {
891
- $flags$: o[0],
892
- $tagName$: o[1],
893
- $members$: o[2],
894
- $listeners$: o[3]
895
- };
896
- BUILD.member && (a.$members$ = o[2]), BUILD.hostListener && (a.$listeners$ = o[3]),
897
- BUILD.reflect && (a.$attrsToReflect$ = []), BUILD.watchCallback && (a.$watchers$ = {}),
898
- BUILD.shadowDom && !supportsShadow && 1 & a.$flags$ && (a.$flags$ |= 8);
899
- const r = BUILD.transformTagName && t.transformTagName ? t.transformTagName(a.$tagName$) : a.$tagName$, i = class extends HTMLElement {
900
- constructor(e) {
901
- super(e), registerHost(e = this, a), BUILD.shadowDom && 1 & a.$flags$ && (BUILD.hydrateServerSide || "shadowRoot" in e || (e.shadowRoot = e)),
902
- BUILD.slotChildNodesFix && patchChildSlotNodes(e, a);
903
- }
904
- connectedCallback() {
905
- $ && (clearTimeout($), $ = null), m ? d.push(this) : plt.jmp((() => connectedCallback(this)));
906
- }
907
- disconnectedCallback() {
908
- plt.jmp((() => disconnectedCallback(this)));
909
- }
910
- componentOnReady() {
911
- return getHostRef(this).$onReadyPromise$;
912
- }
913
- };
914
- BUILD.cloneNodeFix && patchCloneNode(i.prototype), BUILD.appendChildSlotFix && patchSlotAppendChild(i.prototype),
915
- BUILD.hotModuleReplacement && (i.prototype["s-hmr"] = function(e) {
916
- ((e, t, o) => {
917
- const n = getHostRef(e);
918
- n.$flags$ = 1, e["s-hmr-load"] = () => {
919
- delete e["s-hmr-load"];
920
- }, initializeComponent(e, n, t);
921
- })(this, a);
922
- }), a.$lazyBundleId$ = e[0], s.includes(r) || l.get(r) || (n.push(r), l.define(r, proxyComponent(i, a, 1)));
923
- })))), BUILD.invisiblePrehydration && (BUILD.hydratedClass || BUILD.hydratedAttribute) && (i.innerHTML = n + "{visibility:hidden}.hydrated{visibility:inherit}",
911
+ e.map((e => {
912
+ e[1].map((o => {
913
+ const a = {
914
+ $flags$: o[0],
915
+ $tagName$: o[1],
916
+ $members$: o[2],
917
+ $listeners$: o[3]
918
+ };
919
+ BUILD.member && (a.$members$ = o[2]), BUILD.hostListener && (a.$listeners$ = o[3]),
920
+ BUILD.reflect && (a.$attrsToReflect$ = []), BUILD.watchCallback && (a.$watchers$ = {}),
921
+ BUILD.shadowDom && !supportsShadow && 1 & a.$flags$ && (a.$flags$ |= 8);
922
+ const r = BUILD.transformTagName && t.transformTagName ? t.transformTagName(a.$tagName$) : a.$tagName$, i = class extends HTMLElement {
923
+ constructor(e) {
924
+ super(e), registerHost(e = this, a), BUILD.shadowDom && 1 & a.$flags$ && (BUILD.hydrateServerSide || "shadowRoot" in e || (e.shadowRoot = e)),
925
+ BUILD.slotChildNodesFix && patchChildSlotNodes(e, a);
926
+ }
927
+ connectedCallback() {
928
+ $ && (clearTimeout($), $ = null), m ? d.push(this) : plt.jmp((() => connectedCallback(this)));
929
+ }
930
+ disconnectedCallback() {
931
+ plt.jmp((() => disconnectedCallback(this)));
932
+ }
933
+ componentOnReady() {
934
+ return getHostRef(this).$onReadyPromise$;
935
+ }
936
+ };
937
+ BUILD.cloneNodeFix && patchCloneNode(i.prototype), BUILD.appendChildSlotFix && patchSlotAppendChild(i.prototype),
938
+ BUILD.hotModuleReplacement && (i.prototype["s-hmr"] = function(e) {
939
+ ((e, t, o) => {
940
+ const n = getHostRef(e);
941
+ n.$flags$ = 1, e["s-hmr-load"] = () => {
942
+ delete e["s-hmr-load"];
943
+ }, initializeComponent(e, n, t);
944
+ })(this, a);
945
+ }), BUILD.scopedSlotTextContentFix && patchTextContent(i.prototype, a), a.$lazyBundleId$ = e[0],
946
+ s.includes(r) || l.get(r) || (n.push(r), l.define(r, proxyComponent(i, a, 1)));
947
+ }));
948
+ })), BUILD.invisiblePrehydration && (BUILD.hydratedClass || BUILD.hydratedAttribute) && (i.innerHTML = n + "{visibility:hidden}.hydrated{visibility:inherit}",
924
949
  i.setAttribute("data-styles", ""), a.insertBefore(i, r ? r.nextSibling : a.firstChild)),
925
950
  m = !1, d.length ? d.map((e => e.connectedCallback())) : BUILD.profile ? plt.jmp((() => $ = setTimeout(appDidLoad, 30, "timeout"))) : plt.jmp((() => $ = setTimeout(appDidLoad, 30))),
926
951
  o();
@@ -1096,4 +1121,4 @@ const cmpModules = new Map, getModule = e => {
1096
1121
  isTesting: !1
1097
1122
  }, styles = new Map, modeResolutionChain = [];
1098
1123
 
1099
- export { Build, Context, Fragment, Host, addHostEventListeners, attachShadow, bootstrapLazy, cmpModules, connectedCallback, consoleDevError, consoleDevInfo, consoleDevWarn, consoleError, createEvent, defineCustomElement, disconnectedCallback, doc, forceModeUpdate, forceUpdate$1 as forceUpdate, getAssetPath, getConnect, getContext, getElement, getHostRef, getMode, getRenderingRef, getValue, hAsync as h, hydrateApp, insertVdomAnnotations, isMemberInElement, loadModule, modeResolutionChain, nextTick, parsePropertyValue, plt, postUpdateComponent, proxyComponent, proxyCustomElement, readTask, registerComponents, registerHost, registerInstance, renderVdom, setAssetPath, setErrorHandler, setMode, setPlatformHelpers, setValue, styles, supportsConstructibleStylesheets, supportsListenerOptions, supportsShadow, win, writeTask };
1124
+ export { Build, Context, Fragment, Host, addHostEventListeners, bootstrapLazy, cmpModules, connectedCallback, consoleDevError, consoleDevInfo, consoleDevWarn, consoleError, createEvent, defineCustomElement, disconnectedCallback, doc, forceModeUpdate, forceUpdate$1 as forceUpdate, getAssetPath, getConnect, getContext, getElement, getHostRef, getMode, getRenderingRef, getValue, hAsync as h, hydrateApp, insertVdomAnnotations, isMemberInElement, loadModule, modeResolutionChain, nextTick, parsePropertyValue, plt, postUpdateComponent, proxyComponent, proxyCustomElement, readTask, registerComponents, registerHost, registerInstance, renderVdom, setAssetPath, setErrorHandler, setMode, setPlatformHelpers, setValue, styles, supportsConstructibleStylesheets, supportsListenerOptions, supportsShadow, win, writeTask };
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/internal/hydrate",
3
- "version": "2.8.0",
3
+ "version": "2.10.0",
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
package/internal/index.js CHANGED
@@ -1 +1,2 @@
1
1
  export * from '@stencil/core/internal/client';
2
+ //# sourceMappingURL=default.js.map
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/internal",
3
- "version": "2.8.0",
3
+ "version": "2.10.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",