unhead 2.1.6 → 2.1.8

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/client.mjs CHANGED
@@ -1,6 +1,6 @@
1
- import { a as createUnhead } from './shared/unhead.CB8hTExd.mjs';
1
+ import { a as createUnhead } from './shared/unhead.D_nrZZPH.mjs';
2
2
  import { H as HasElementTags } from './shared/unhead.yem5I2v_.mjs';
3
- import { h as hashTag, i as isMetaArrayDupeKey, a as normalizeProps, d as dedupeKey } from './shared/unhead.fVVqDC1O.mjs';
3
+ import { i as isMetaArrayDupeKey, a as normalizeProps, d as dedupeKey, h as hashTag } from './shared/unhead.fVVqDC1O.mjs';
4
4
  import 'hookable';
5
5
  import './shared/unhead.CbpEuj3y.mjs';
6
6
 
@@ -24,7 +24,7 @@ async function renderDOMHead(head, options = {}) {
24
24
  const count = dupeKeyCounter.get(tag._d) || 0;
25
25
  const res = {
26
26
  tag,
27
- id: (count ? `${tag._d}:${count}` : tag._d) || hashTag(tag),
27
+ id: (count ? `${tag._d}:${count}` : tag._d) || tag._h,
28
28
  shouldRender: true
29
29
  };
30
30
  if (tag._d && isMetaArrayDupeKey(tag._d)) {
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  export { u as useHead, a as useHeadSafe, b as useSeoMeta, c as useServerHead, d as useServerHeadSafe, e as useServerSeoMeta } from './shared/unhead.BPM0-cfG.mjs';
2
- export { c as createHeadCore, a as createUnhead } from './shared/unhead.CB8hTExd.mjs';
2
+ export { c as createHeadCore, a as createUnhead } from './shared/unhead.D_nrZZPH.mjs';
3
3
  export { u as useScript } from './shared/unhead.BnoAbrHA.mjs';
4
4
  import './shared/unhead.CApf5sj3.mjs';
5
5
  import './shared/unhead.DQc16pHI.mjs';
package/dist/legacy.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { a as createUnhead } from './shared/unhead.CB8hTExd.mjs';
1
+ import { a as createUnhead } from './shared/unhead.D_nrZZPH.mjs';
2
2
  import { D as DeprecationsPlugin, P as PromisesPlugin, T as TemplateParamsPlugin, A as AliasSortingPlugin } from './shared/unhead.ckV6dpEQ.mjs';
3
3
  export { u as useHead, a as useHeadSafe, b as useSeoMeta, c as useServerHead, d as useServerHeadSafe, e as useServerSeoMeta } from './shared/unhead.BPM0-cfG.mjs';
4
4
  export { u as useScript } from './shared/unhead.BnoAbrHA.mjs';
package/dist/server.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { a as createUnhead } from './shared/unhead.CB8hTExd.mjs';
1
+ import { a as createUnhead } from './shared/unhead.D_nrZZPH.mjs';
2
2
  import { T as TagsWithInnerContent, S as SelfClosingTags } from './shared/unhead.yem5I2v_.mjs';
3
3
  import { parseHtmlForUnheadExtraction, applyHeadToHtml, parseHtmlForIndexes } from './parser.mjs';
4
4
  import 'hookable';
@@ -1,5 +1,5 @@
1
1
  import { createHooks } from 'hookable';
2
- import { n as normalizeEntryToTags, d as dedupeKey, i as isMetaArrayDupeKey } from './unhead.fVVqDC1O.mjs';
2
+ import { n as normalizeEntryToTags, d as dedupeKey, h as hashTag, i as isMetaArrayDupeKey } from './unhead.fVVqDC1O.mjs';
3
3
  import { t as tagWeight, s as sortTags } from './unhead.CbpEuj3y.mjs';
4
4
  import { c as UsesMergeStrategy, V as ValidHeadTags } from './unhead.yem5I2v_.mjs';
5
5
 
@@ -86,13 +86,15 @@ function createUnhead(resolvedOptions = {}) {
86
86
  t._w = tagWeight(head, t);
87
87
  t._p = (e._i << 10) + i2;
88
88
  t._d = dedupeKey(t);
89
+ if (!t._d)
90
+ t._h = hashTag(t);
89
91
  return t;
90
92
  });
91
93
  }
92
94
  }
93
95
  let hasFlatMeta = false;
94
96
  ctx.entries.flatMap((e) => (e._tags || []).map((t) => ({ ...t, props: { ...t.props } }))).sort(sortTags).reduce((acc, next) => {
95
- const k = String(next._d || next._p);
97
+ const k = next._d || next._h;
96
98
  if (!acc.has(k))
97
99
  return acc.set(k, next);
98
100
  const prev = acc.get(k);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "unhead",
3
3
  "type": "module",
4
- "version": "2.1.6",
4
+ "version": "2.1.8",
5
5
  "description": "Full-stack <head> manager built for any framework.",
6
6
  "author": {
7
7
  "name": "Harlan Wilton",