@stencil/mock-doc 5.0.0-beta.35 → 5.0.0-beta.36

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 (2) hide show
  1. package/dist/index.mjs +1 -16
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -21,9 +21,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
21
21
  value: mod,
22
22
  enumerable: true
23
23
  }) : target, mod));
24
- //#endregion
25
- //#region src/constants.ts
26
- const HYDRATE_ID = "s-id";
27
24
  const XML_NS = "http://www.w3.org/XML/1998/namespace";
28
25
  const XMLNS_NS = "http://www.w3.org/2000/xmlns/";
29
26
  /**
@@ -1041,19 +1038,7 @@ function* streamToHtml(node, opts, output) {
1041
1038
  const isWithinWhitespaceSensitiveNode = opts.newLines || (opts.indentSpaces ?? 0) > 0 ? isWithinWhitespaceSensitive(node) : false;
1042
1039
  if (!isWithinWhitespaceSensitiveNode && (opts.indentSpaces ?? 0) > 0 && ignoreTag === false) output.indent = output.indent + (opts.indentSpaces ?? 0);
1043
1040
  for (let i = 0; i < childNodeLength; i++) {
1044
- /**
1045
- * In cases where a user would pass in a declarative shadow dom of a
1046
- * Stencil component, we want to skip over the template tag as we
1047
- * will be parsing the shadow root of the component again.
1048
- *
1049
- * We know it is a hydrated Stencil component by checking if the `HYDRATE_ID`
1050
- * is set on the node.
1051
- */
1052
- const sId = node.attributes.getNamedItem(HYDRATE_ID);
1053
- if (childNodes[i].nodeName.toLowerCase() === "template" && sId) {
1054
- yield `\n${" ".repeat(output.indent)}<!--r.${sId.value}-->`;
1055
- continue;
1056
- }
1041
+ if (childNodes[i].nodeName.toLowerCase() === "template" && node.attributes.getNamedItem("s-id")) continue;
1057
1042
  yield* streamToHtml(childNodes[i], opts, output);
1058
1043
  }
1059
1044
  if (ignoreTag === false) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/mock-doc",
3
- "version": "5.0.0-beta.35",
3
+ "version": "5.0.0-beta.36",
4
4
  "description": "A minimal mock DOM implementation for SSR and testing",
5
5
  "keywords": [
6
6
  "dom",