@stencil/core 4.35.1 → 4.35.3-dev.1751519082.58bc2b5

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 (38) hide show
  1. package/cli/index.cjs +1 -1
  2. package/cli/index.js +1 -1
  3. package/cli/package.json +1 -1
  4. package/compiler/package.json +1 -1
  5. package/compiler/stencil.js +7 -7
  6. package/dev-server/client/index.js +1 -1
  7. package/dev-server/client/package.json +1 -1
  8. package/dev-server/connector.html +2 -2
  9. package/dev-server/index.js +1 -1
  10. package/dev-server/package.json +1 -1
  11. package/dev-server/server-process.js +2 -2
  12. package/internal/app-data/package.json +1 -1
  13. package/internal/app-globals/package.json +1 -1
  14. package/internal/client/index.js +216 -180
  15. package/internal/client/package.json +1 -1
  16. package/internal/client/patch-browser.js +1 -1
  17. package/internal/hydrate/index.js +216 -180
  18. package/internal/hydrate/package.json +1 -1
  19. package/internal/hydrate/runner.js +43 -13
  20. package/internal/package.json +1 -1
  21. package/internal/stencil-public-compiler.d.ts +1 -0
  22. package/internal/stencil-public-runtime.d.ts +12 -5
  23. package/internal/testing/index.js +213 -179
  24. package/internal/testing/package.json +1 -1
  25. package/mock-doc/index.cjs +35 -5
  26. package/mock-doc/index.d.ts +16 -0
  27. package/mock-doc/index.js +35 -5
  28. package/mock-doc/package.json +1 -1
  29. package/package.json +1 -1
  30. package/screenshot/index.js +1 -1
  31. package/screenshot/package.json +1 -1
  32. package/screenshot/pixel-match.js +1 -1
  33. package/sys/node/index.js +14 -14
  34. package/sys/node/package.json +1 -1
  35. package/sys/node/worker.js +1 -1
  36. package/testing/index.js +5 -5
  37. package/testing/package.json +1 -1
  38. package/testing/puppeteer/puppeteer-browser.d.ts +5 -5
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/internal/testing",
3
- "version": "4.35.1",
3
+ "version": "4.35.3-dev.1751519082.58bc2b5",
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,5 +1,5 @@
1
1
  /*!
2
- Stencil Mock Doc (CommonJS) v4.35.1 | MIT Licensed | https://stenciljs.com
2
+ Stencil Mock Doc (CommonJS) v4.35.3-dev.1751519082.58bc2b5 | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  "use strict";
5
5
  var __defProp = Object.defineProperty;
@@ -6833,10 +6833,18 @@ var MockElement = class extends MockNode2 {
6833
6833
  return shadowRoot;
6834
6834
  }
6835
6835
  blur() {
6836
- dispatchEvent(
6837
- this,
6838
- new MockFocusEvent("blur", { relatedTarget: null, bubbles: true, cancelable: true, composed: true })
6839
- );
6836
+ if (isCurrentlyDispatching(this, "blur")) {
6837
+ return;
6838
+ }
6839
+ markAsDispatching(this, "blur");
6840
+ try {
6841
+ dispatchEvent(
6842
+ this,
6843
+ new MockFocusEvent("blur", { relatedTarget: null, bubbles: true, cancelable: true, composed: true })
6844
+ );
6845
+ } finally {
6846
+ unmarkAsDispatching(this, "blur");
6847
+ }
6840
6848
  }
6841
6849
  get localName() {
6842
6850
  if (!this.nodeName) {
@@ -7578,6 +7586,28 @@ function setTextContent(elm, text) {
7578
7586
  const textNode = new MockTextNode(elm.ownerDocument, text);
7579
7587
  elm.appendChild(textNode);
7580
7588
  }
7589
+ var currentlyDispatching = /* @__PURE__ */ new WeakMap();
7590
+ function isCurrentlyDispatching(target, eventType) {
7591
+ const dispatchingEvents = currentlyDispatching.get(target);
7592
+ return dispatchingEvents != null && dispatchingEvents.has(eventType);
7593
+ }
7594
+ function markAsDispatching(target, eventType) {
7595
+ let dispatchingEvents = currentlyDispatching.get(target);
7596
+ if (dispatchingEvents == null) {
7597
+ dispatchingEvents = /* @__PURE__ */ new Set();
7598
+ currentlyDispatching.set(target, dispatchingEvents);
7599
+ }
7600
+ dispatchingEvents.add(eventType);
7601
+ }
7602
+ function unmarkAsDispatching(target, eventType) {
7603
+ const dispatchingEvents = currentlyDispatching.get(target);
7604
+ if (dispatchingEvents != null) {
7605
+ dispatchingEvents.delete(eventType);
7606
+ if (dispatchingEvents.size === 0) {
7607
+ currentlyDispatching.delete(target);
7608
+ }
7609
+ }
7610
+ }
7581
7611
 
7582
7612
  // src/mock-doc/comment-node.ts
7583
7613
  var MockComment = class _MockComment extends MockNode2 {
@@ -754,6 +754,22 @@ declare class MockTextNode extends MockNode {
754
754
  set data(text: string);
755
755
  get wholeText(): string;
756
756
  }
757
+ /**
758
+ * @param target - The element that is currently dispatching an event.
759
+ * @param eventType - The type of event that is currently dispatching.
760
+ * @returns True if the element is currently dispatching the event, false otherwise.
761
+ */
762
+ declare function isCurrentlyDispatching(target: any, eventType: string): boolean;
763
+ /**
764
+ * @param target - The element that is currently dispatching an event.
765
+ * @param eventType - The type of event that is currently dispatching.
766
+ */
767
+ declare function markAsDispatching(target: any, eventType: string): void;
768
+ /**
769
+ * @param target - The element that is currently dispatching an event.
770
+ * @param eventType - The type of event that is currently dispatching.
771
+ */
772
+ declare function unmarkAsDispatching(target: any, eventType: string): void;
757
773
  declare function parseHtmlToDocument(html: string, ownerDocument?: MockDocument): any;
758
774
  declare function parseHtmlToFragment(html: string, ownerDocument?: MockDocument): any;
759
775
  declare function parseDocumentUtil(ownerDocument: any, html: string): any;
package/mock-doc/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Stencil Mock Doc v4.35.1 | MIT Licensed | https://stenciljs.com
2
+ Stencil Mock Doc v4.35.3-dev.1751519082.58bc2b5 | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
 
5
5
  // src/runtime/runtime-constants.ts
@@ -6780,10 +6780,18 @@ var MockElement = class extends MockNode2 {
6780
6780
  return shadowRoot;
6781
6781
  }
6782
6782
  blur() {
6783
- dispatchEvent(
6784
- this,
6785
- new MockFocusEvent("blur", { relatedTarget: null, bubbles: true, cancelable: true, composed: true })
6786
- );
6783
+ if (isCurrentlyDispatching(this, "blur")) {
6784
+ return;
6785
+ }
6786
+ markAsDispatching(this, "blur");
6787
+ try {
6788
+ dispatchEvent(
6789
+ this,
6790
+ new MockFocusEvent("blur", { relatedTarget: null, bubbles: true, cancelable: true, composed: true })
6791
+ );
6792
+ } finally {
6793
+ unmarkAsDispatching(this, "blur");
6794
+ }
6787
6795
  }
6788
6796
  get localName() {
6789
6797
  if (!this.nodeName) {
@@ -7525,6 +7533,28 @@ function setTextContent(elm, text) {
7525
7533
  const textNode = new MockTextNode(elm.ownerDocument, text);
7526
7534
  elm.appendChild(textNode);
7527
7535
  }
7536
+ var currentlyDispatching = /* @__PURE__ */ new WeakMap();
7537
+ function isCurrentlyDispatching(target, eventType) {
7538
+ const dispatchingEvents = currentlyDispatching.get(target);
7539
+ return dispatchingEvents != null && dispatchingEvents.has(eventType);
7540
+ }
7541
+ function markAsDispatching(target, eventType) {
7542
+ let dispatchingEvents = currentlyDispatching.get(target);
7543
+ if (dispatchingEvents == null) {
7544
+ dispatchingEvents = /* @__PURE__ */ new Set();
7545
+ currentlyDispatching.set(target, dispatchingEvents);
7546
+ }
7547
+ dispatchingEvents.add(eventType);
7548
+ }
7549
+ function unmarkAsDispatching(target, eventType) {
7550
+ const dispatchingEvents = currentlyDispatching.get(target);
7551
+ if (dispatchingEvents != null) {
7552
+ dispatchingEvents.delete(eventType);
7553
+ if (dispatchingEvents.size === 0) {
7554
+ currentlyDispatching.delete(target);
7555
+ }
7556
+ }
7557
+ }
7528
7558
 
7529
7559
  // src/mock-doc/comment-node.ts
7530
7560
  var MockComment = class _MockComment extends MockNode2 {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/mock-doc",
3
- "version": "4.35.1",
3
+ "version": "4.35.3-dev.1751519082.58bc2b5",
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": "4.35.1",
3
+ "version": "4.35.3-dev.1751519082.58bc2b5",
4
4
  "license": "MIT",
5
5
  "main": "./internal/stencil-core/index.cjs",
6
6
  "module": "./internal/stencil-core/index.js",
@@ -1,5 +1,5 @@
1
1
  /*
2
- Stencil Screenshot v4.35.1 | MIT Licensed | https://stenciljs.com
2
+ Stencil Screenshot v4.35.3-dev.1751519082.58bc2b5 | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  "use strict";
5
5
  var __create = Object.create;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/screenshot",
3
- "version": "4.35.1",
3
+ "version": "4.35.3-dev.1751519082.58bc2b5",
4
4
  "description": "Stencil Screenshot.",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",
@@ -1,5 +1,5 @@
1
1
  /*
2
- Stencil Screenshot Pixel Match v4.35.1 | MIT Licensed | https://stenciljs.com
2
+ Stencil Screenshot Pixel Match v4.35.3-dev.1751519082.58bc2b5 | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  "use strict";
5
5
  var __create = Object.create;