@unhead/shared 1.8.6 → 1.8.7

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.
package/dist/index.cjs CHANGED
@@ -28,7 +28,7 @@ const ValidHeadTags = [
28
28
  "noscript"
29
29
  ];
30
30
  const UniqueTags = ["base", "title", "titleTemplate", "bodyAttrs", "htmlAttrs", "templateParams"];
31
- const TagConfigKeys = ["tagPosition", "tagPriority", "tagDuplicateStrategy", "innerHTML", "textContent", "processTemplateParams"];
31
+ const TagConfigKeys = ["tagPosition", "tagPriority", "tagDuplicateStrategy", "children", "innerHTML", "textContent", "processTemplateParams"];
32
32
  const IsBrowser = typeof window !== "undefined";
33
33
  const composableNames = [
34
34
  "getActiveHead",
@@ -502,8 +502,8 @@ async function normaliseTag(tagName, input, e) {
502
502
  TagConfigKeys.forEach((k) => {
503
503
  const val = typeof tag.props[k] !== "undefined" ? tag.props[k] : e[k];
504
504
  if (typeof val !== "undefined") {
505
- if (!["innerHTML", "textContent"].includes(k) || TagsWithInnerContent.includes(tag.tag)) {
506
- tag[k] = val;
505
+ if (!["innerHTML", "textContent", "children"].includes(k) || TagsWithInnerContent.includes(tag.tag)) {
506
+ tag[k === "children" ? "innerHTML" : k] = val;
507
507
  }
508
508
  delete tag.props[k];
509
509
  }
@@ -512,10 +512,6 @@ async function normaliseTag(tagName, input, e) {
512
512
  tag.tagPosition = "bodyClose";
513
513
  delete tag.props.body;
514
514
  }
515
- if (tag.props.children) {
516
- tag.innerHTML = tag.props.children;
517
- delete tag.props.children;
518
- }
519
515
  if (tag.tag === "script") {
520
516
  if (typeof tag.innerHTML === "object") {
521
517
  tag.innerHTML = JSON.stringify(tag.innerHTML);
package/dist/index.mjs CHANGED
@@ -26,7 +26,7 @@ const ValidHeadTags = [
26
26
  "noscript"
27
27
  ];
28
28
  const UniqueTags = ["base", "title", "titleTemplate", "bodyAttrs", "htmlAttrs", "templateParams"];
29
- const TagConfigKeys = ["tagPosition", "tagPriority", "tagDuplicateStrategy", "innerHTML", "textContent", "processTemplateParams"];
29
+ const TagConfigKeys = ["tagPosition", "tagPriority", "tagDuplicateStrategy", "children", "innerHTML", "textContent", "processTemplateParams"];
30
30
  const IsBrowser = typeof window !== "undefined";
31
31
  const composableNames = [
32
32
  "getActiveHead",
@@ -500,8 +500,8 @@ async function normaliseTag(tagName, input, e) {
500
500
  TagConfigKeys.forEach((k) => {
501
501
  const val = typeof tag.props[k] !== "undefined" ? tag.props[k] : e[k];
502
502
  if (typeof val !== "undefined") {
503
- if (!["innerHTML", "textContent"].includes(k) || TagsWithInnerContent.includes(tag.tag)) {
504
- tag[k] = val;
503
+ if (!["innerHTML", "textContent", "children"].includes(k) || TagsWithInnerContent.includes(tag.tag)) {
504
+ tag[k === "children" ? "innerHTML" : k] = val;
505
505
  }
506
506
  delete tag.props[k];
507
507
  }
@@ -510,10 +510,6 @@ async function normaliseTag(tagName, input, e) {
510
510
  tag.tagPosition = "bodyClose";
511
511
  delete tag.props.body;
512
512
  }
513
- if (tag.props.children) {
514
- tag.innerHTML = tag.props.children;
515
- delete tag.props.children;
516
- }
517
513
  if (tag.tag === "script") {
518
514
  if (typeof tag.innerHTML === "object") {
519
515
  tag.innerHTML = JSON.stringify(tag.innerHTML);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@unhead/shared",
3
3
  "type": "module",
4
- "version": "1.8.6",
4
+ "version": "1.8.7",
5
5
  "author": "Harlan Wilton <harlan@harlanzw.com>",
6
6
  "license": "MIT",
7
7
  "funding": "https://github.com/sponsors/harlan-zw",
@@ -34,7 +34,7 @@
34
34
  "dist"
35
35
  ],
36
36
  "dependencies": {
37
- "@unhead/schema": "1.8.6"
37
+ "@unhead/schema": "1.8.7"
38
38
  },
39
39
  "devDependencies": {
40
40
  "packrup": "^0.1.0"