unhead 2.0.11 → 2.0.13

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.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { R as ResolvableHead, q as CreateClientHeadOptions, U as Unhead, G as RenderDomHeadOptions } from './shared/unhead.Bxij9jlZ.mjs';
1
+ import { R as ResolvableHead, q as CreateClientHeadOptions, U as Unhead, G as RenderDomHeadOptions } from './shared/unhead.BxIzrSMV.mjs';
2
2
  import 'hookable';
3
3
 
4
4
  declare function createHead<T = ResolvableHead>(options?: CreateClientHeadOptions): Unhead<T>;
package/dist/client.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { R as ResolvableHead, q as CreateClientHeadOptions, U as Unhead, G as RenderDomHeadOptions } from './shared/unhead.Bxij9jlZ.js';
1
+ import { R as ResolvableHead, q as CreateClientHeadOptions, U as Unhead, G as RenderDomHeadOptions } from './shared/unhead.BxIzrSMV.js';
2
2
  import 'hookable';
3
3
 
4
4
  declare function createHead<T = ResolvableHead>(options?: CreateClientHeadOptions): Unhead<T>;
package/dist/client.mjs CHANGED
@@ -1,6 +1,6 @@
1
- import { a as createUnhead } from './shared/unhead.Bkc50x9u.mjs';
1
+ import { a as createUnhead } from './shared/unhead.DH45uomy.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.Di5OD67x.mjs';
3
+ import { h as hashTag, i as isMetaArrayDupeKey, a as normalizeProps, d as dedupeKey } from './shared/unhead.BpRRHAhY.mjs';
4
4
  import 'hookable';
5
5
  import './shared/unhead.DZbvapt-.mjs';
6
6
 
package/dist/index.d.mts CHANGED
@@ -1,6 +1,6 @@
1
- import { H as HeadSafe } from './shared/unhead.BP1dbCri.mjs';
2
- import { U as Unhead, R as ResolvableHead, r as HeadEntryOptions, o as ActiveHeadEntry, a8 as UseSeoMetaInput, C as CreateHeadOptions } from './shared/unhead.Bxij9jlZ.mjs';
3
- export { u as useScript } from './shared/unhead.CBeMfL2m.mjs';
1
+ import { H as HeadSafe } from './shared/unhead.DcRvKVx9.mjs';
2
+ import { U as Unhead, R as ResolvableHead, r as HeadEntryOptions, o as ActiveHeadEntry, a8 as UseSeoMetaInput, C as CreateHeadOptions } from './shared/unhead.BxIzrSMV.mjs';
3
+ export { u as useScript } from './shared/unhead.YQlj2HXR.mjs';
4
4
  import 'hookable';
5
5
 
6
6
  declare function useHead<T extends Unhead<any>, I = ResolvableHead>(unhead: T, input?: ResolvableHead, options?: HeadEntryOptions): ActiveHeadEntry<I>;
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { H as HeadSafe } from './shared/unhead.CdqfUg1S.js';
2
- import { U as Unhead, R as ResolvableHead, r as HeadEntryOptions, o as ActiveHeadEntry, a8 as UseSeoMetaInput, C as CreateHeadOptions } from './shared/unhead.Bxij9jlZ.js';
3
- export { u as useScript } from './shared/unhead.B003D9oY.js';
1
+ import { H as HeadSafe } from './shared/unhead.BzieZHWV.js';
2
+ import { U as Unhead, R as ResolvableHead, r as HeadEntryOptions, o as ActiveHeadEntry, a8 as UseSeoMetaInput, C as CreateHeadOptions } from './shared/unhead.BxIzrSMV.js';
3
+ export { u as useScript } from './shared/unhead.jgc6RGmf.js';
4
4
  import 'hookable';
5
5
 
6
6
  declare function useHead<T extends Unhead<any>, I = ResolvableHead>(unhead: T, input?: ResolvableHead, options?: HeadEntryOptions): ActiveHeadEntry<I>;
package/dist/index.mjs CHANGED
@@ -1,9 +1,9 @@
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.Bkc50x9u.mjs';
2
+ export { c as createHeadCore, a as createUnhead } from './shared/unhead.DH45uomy.mjs';
3
3
  export { u as useScript } from './shared/unhead.B578PsDV.mjs';
4
4
  import './shared/unhead.CApf5sj3.mjs';
5
5
  import './shared/unhead.DQc16pHI.mjs';
6
6
  import './shared/unhead.yem5I2v_.mjs';
7
7
  import 'hookable';
8
- import './shared/unhead.Di5OD67x.mjs';
8
+ import './shared/unhead.BpRRHAhY.mjs';
9
9
  import './shared/unhead.DZbvapt-.mjs';
package/dist/legacy.d.mts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { createUnhead } from './index.mjs';
2
2
  export { useHead, useHeadSafe, useSeoMeta, useServerHead, useServerHeadSafe, useServerSeoMeta } from './index.mjs';
3
- import { U as Unhead, R as ResolvableHead, C as CreateHeadOptions } from './shared/unhead.Bxij9jlZ.mjs';
4
- export { u as useScript } from './shared/unhead.CBeMfL2m.mjs';
5
- import './shared/unhead.BP1dbCri.mjs';
3
+ import { U as Unhead, R as ResolvableHead, C as CreateHeadOptions } from './shared/unhead.BxIzrSMV.mjs';
4
+ export { u as useScript } from './shared/unhead.YQlj2HXR.mjs';
5
+ import './shared/unhead.DcRvKVx9.mjs';
6
6
  import 'hookable';
7
7
 
8
8
  declare const activeHead: {
package/dist/legacy.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { createUnhead } from './index.js';
2
2
  export { useHead, useHeadSafe, useSeoMeta, useServerHead, useServerHeadSafe, useServerSeoMeta } from './index.js';
3
- import { U as Unhead, R as ResolvableHead, C as CreateHeadOptions } from './shared/unhead.Bxij9jlZ.js';
4
- export { u as useScript } from './shared/unhead.B003D9oY.js';
5
- import './shared/unhead.CdqfUg1S.js';
3
+ import { U as Unhead, R as ResolvableHead, C as CreateHeadOptions } from './shared/unhead.BxIzrSMV.js';
4
+ export { u as useScript } from './shared/unhead.jgc6RGmf.js';
5
+ import './shared/unhead.BzieZHWV.js';
6
6
  import 'hookable';
7
7
 
8
8
  declare const activeHead: {
package/dist/legacy.mjs CHANGED
@@ -1,14 +1,14 @@
1
- import { a as createUnhead } from './shared/unhead.Bkc50x9u.mjs';
2
- import { D as DeprecationsPlugin, P as PromisesPlugin, T as TemplateParamsPlugin, A as AliasSortingPlugin } from './shared/unhead.DeCxexjU.mjs';
1
+ import { a as createUnhead } from './shared/unhead.DH45uomy.mjs';
2
+ import { D as DeprecationsPlugin, P as PromisesPlugin, T as TemplateParamsPlugin, A as AliasSortingPlugin } from './shared/unhead.Djo8ep_Y.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.B578PsDV.mjs';
5
5
  import 'hookable';
6
- import './shared/unhead.Di5OD67x.mjs';
6
+ import './shared/unhead.BpRRHAhY.mjs';
7
7
  import './shared/unhead.yem5I2v_.mjs';
8
8
  import './shared/unhead.DZbvapt-.mjs';
9
9
  import './shared/unhead.CApf5sj3.mjs';
10
10
  import './shared/unhead.DQc16pHI.mjs';
11
- import './shared/unhead.C13swrCa.mjs';
11
+ import './shared/unhead.BYvz9V1x.mjs';
12
12
 
13
13
  const activeHead = { value: null };
14
14
  function getActiveHead() {
@@ -1,4 +1,4 @@
1
- import { m as HeadPluginInput, U as Unhead, l as HeadPluginOptions } from './shared/unhead.Bxij9jlZ.mjs';
1
+ import { m as HeadPluginInput, U as Unhead, l as HeadPluginOptions } from './shared/unhead.BxIzrSMV.mjs';
2
2
  import 'hookable';
3
3
 
4
4
  declare const AliasSortingPlugin: HeadPluginInput;
package/dist/plugins.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { m as HeadPluginInput, U as Unhead, l as HeadPluginOptions } from './shared/unhead.Bxij9jlZ.js';
1
+ import { m as HeadPluginInput, U as Unhead, l as HeadPluginOptions } from './shared/unhead.BxIzrSMV.js';
2
2
  import 'hookable';
3
3
 
4
4
  declare const AliasSortingPlugin: HeadPluginInput;
package/dist/plugins.mjs CHANGED
@@ -1,11 +1,21 @@
1
- export { A as AliasSortingPlugin, D as DeprecationsPlugin, P as PromisesPlugin, T as TemplateParamsPlugin } from './shared/unhead.DeCxexjU.mjs';
1
+ export { A as AliasSortingPlugin, D as DeprecationsPlugin, P as PromisesPlugin, T as TemplateParamsPlugin } from './shared/unhead.Djo8ep_Y.mjs';
2
2
  import { d as defineHeadPlugin } from './shared/unhead.CApf5sj3.mjs';
3
3
  export { F as FlatMetaPlugin, S as SafeInputPlugin } from './shared/unhead.CApf5sj3.mjs';
4
4
  import './shared/unhead.DZbvapt-.mjs';
5
- import './shared/unhead.C13swrCa.mjs';
5
+ import './shared/unhead.BYvz9V1x.mjs';
6
6
  import './shared/unhead.DQc16pHI.mjs';
7
7
  import './shared/unhead.yem5I2v_.mjs';
8
8
 
9
+ const META_TRANSFORMABLE_URL = [
10
+ "og:url",
11
+ "og:image",
12
+ "og:image:secure_url",
13
+ "twitter:image",
14
+ "twitter:image:src",
15
+ "og:video",
16
+ "og:video:secure_url",
17
+ "og:see_also"
18
+ ];
9
19
  function CanonicalPlugin(options) {
10
20
  return (head) => {
11
21
  let host = options.canonicalHost || (!head.ssr ? window.location.origin : "");
@@ -30,12 +40,8 @@ function CanonicalPlugin(options) {
30
40
  hooks: {
31
41
  "tags:resolve": (ctx) => {
32
42
  for (const tag of ctx.tags) {
33
- if (tag.tag === "meta") {
34
- if (tag.props.property?.startsWith("og:image") || tag.props.name?.startsWith("twitter:image")) {
35
- tag.props.content = resolvePath(tag.props.content);
36
- } else if (tag.props?.property === "og:url") {
37
- tag.props.content = resolvePath(tag.props.content);
38
- }
43
+ if (tag.tag === "meta" && (META_TRANSFORMABLE_URL.includes(tag.props?.property) || META_TRANSFORMABLE_URL.includes(tag.props?.name))) {
44
+ tag.props.content = resolvePath(tag.props.content);
39
45
  } else if (tag.tag === "link" && tag.props.rel === "canonical") {
40
46
  tag.props.href = resolvePath(tag.props.href);
41
47
  }
@@ -1,6 +1,6 @@
1
- import { i as RecordingEntry } from './shared/unhead.Bxij9jlZ.mjs';
2
- export { A as AsVoidFunctions, E as EventHandlerOptions, S as ScriptInstance, h as UseFunctionType, g as UseScriptContext, a as UseScriptInput, b as UseScriptOptions, d as UseScriptResolvedInput, c as UseScriptReturn, f as UseScriptStatus, W as WarmupStrategy } from './shared/unhead.Bxij9jlZ.mjs';
3
- export { r as resolveScriptKey, u as useScript } from './shared/unhead.CBeMfL2m.mjs';
1
+ import { i as RecordingEntry } from './shared/unhead.BxIzrSMV.mjs';
2
+ export { A as AsVoidFunctions, E as EventHandlerOptions, S as ScriptInstance, h as UseFunctionType, g as UseScriptContext, a as UseScriptInput, b as UseScriptOptions, d as UseScriptResolvedInput, c as UseScriptReturn, f as UseScriptStatus, W as WarmupStrategy } from './shared/unhead.BxIzrSMV.mjs';
3
+ export { r as resolveScriptKey, u as useScript } from './shared/unhead.YQlj2HXR.mjs';
4
4
  import 'hookable';
5
5
 
6
6
  declare function createSpyProxy<T extends Record<string, any> | any[]>(target: T, onApply: (stack: RecordingEntry[][]) => void): T;
package/dist/scripts.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { i as RecordingEntry } from './shared/unhead.Bxij9jlZ.js';
2
- export { A as AsVoidFunctions, E as EventHandlerOptions, S as ScriptInstance, h as UseFunctionType, g as UseScriptContext, a as UseScriptInput, b as UseScriptOptions, d as UseScriptResolvedInput, c as UseScriptReturn, f as UseScriptStatus, W as WarmupStrategy } from './shared/unhead.Bxij9jlZ.js';
3
- export { r as resolveScriptKey, u as useScript } from './shared/unhead.B003D9oY.js';
1
+ import { i as RecordingEntry } from './shared/unhead.BxIzrSMV.js';
2
+ export { A as AsVoidFunctions, E as EventHandlerOptions, S as ScriptInstance, h as UseFunctionType, g as UseScriptContext, a as UseScriptInput, b as UseScriptOptions, d as UseScriptResolvedInput, c as UseScriptReturn, f as UseScriptStatus, W as WarmupStrategy } from './shared/unhead.BxIzrSMV.js';
3
+ export { r as resolveScriptKey, u as useScript } from './shared/unhead.jgc6RGmf.js';
4
4
  import 'hookable';
5
5
 
6
6
  declare function createSpyProxy<T extends Record<string, any> | any[]>(target: T, onApply: (stack: RecordingEntry[][]) => void): T;
package/dist/server.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { R as ResolvableHead, p as CreateServerHeadOptions, U as Unhead, u as RenderSSRHeadOptions, a4 as SerializableHead, au as HeadTag } from './shared/unhead.Bxij9jlZ.mjs';
2
- export { t as SSRHeadPayload } from './shared/unhead.Bxij9jlZ.mjs';
1
+ import { R as ResolvableHead, p as CreateServerHeadOptions, U as Unhead, u as RenderSSRHeadOptions, a4 as SerializableHead, au as HeadTag } from './shared/unhead.BxIzrSMV.mjs';
2
+ export { t as SSRHeadPayload } from './shared/unhead.BxIzrSMV.mjs';
3
3
  import 'hookable';
4
4
 
5
5
  declare function createHead<T = ResolvableHead>(options?: CreateServerHeadOptions): Unhead<T>;
package/dist/server.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { R as ResolvableHead, p as CreateServerHeadOptions, U as Unhead, u as RenderSSRHeadOptions, a4 as SerializableHead, au as HeadTag } from './shared/unhead.Bxij9jlZ.js';
2
- export { t as SSRHeadPayload } from './shared/unhead.Bxij9jlZ.js';
1
+ import { R as ResolvableHead, p as CreateServerHeadOptions, U as Unhead, u as RenderSSRHeadOptions, a4 as SerializableHead, au as HeadTag } from './shared/unhead.BxIzrSMV.js';
2
+ export { t as SSRHeadPayload } from './shared/unhead.BxIzrSMV.js';
3
3
  import 'hookable';
4
4
 
5
5
  declare function createHead<T = ResolvableHead>(options?: CreateServerHeadOptions): Unhead<T>;
package/dist/server.mjs CHANGED
@@ -1,7 +1,7 @@
1
- import { a as createUnhead } from './shared/unhead.Bkc50x9u.mjs';
1
+ import { a as createUnhead } from './shared/unhead.DH45uomy.mjs';
2
2
  import { T as TagsWithInnerContent, S as SelfClosingTags$1 } from './shared/unhead.yem5I2v_.mjs';
3
3
  import 'hookable';
4
- import './shared/unhead.Di5OD67x.mjs';
4
+ import './shared/unhead.BpRRHAhY.mjs';
5
5
  import './shared/unhead.DZbvapt-.mjs';
6
6
 
7
7
  // @__NO_SIDE_EFFECTS__
@@ -1,5 +1,4 @@
1
1
  const SepSub = "%separator";
2
- const SepSubRE = new RegExp(`${SepSub}(?:\\s*${SepSub})*`, "g");
3
2
  function sub(p, token, isJson = false) {
4
3
  let val;
5
4
  if (token === "s" || token === "pageTitle") {
@@ -36,11 +35,7 @@ function processTemplateParams(s, p, sep, isJson = false) {
36
35
  return re !== void 0 ? re : token;
37
36
  }).trim();
38
37
  if (hasSepSub) {
39
- if (s.endsWith(SepSub))
40
- s = s.slice(0, -SepSub.length);
41
- if (s.startsWith(SepSub))
42
- s = s.slice(SepSub.length);
43
- s = s.replace(SepSubRE, sep || "").trim();
38
+ s = s.split(SepSub).map((part) => part.trim()).filter((part) => part !== "").join(sep ? ` ${sep} ` : " ");
44
39
  }
45
40
  return s;
46
41
  }
@@ -112,6 +112,10 @@ function normalizeProps(tag, input) {
112
112
  if (!input) {
113
113
  return tag;
114
114
  }
115
+ if (tag.tag === "templateParams") {
116
+ tag.props = input;
117
+ return tag;
118
+ }
115
119
  Object.entries(input).forEach(([key, value]) => {
116
120
  if (value === null) {
117
121
  tag.props[key] = null;
@@ -2254,6 +2254,10 @@ interface Unhead<Input = ResolvableHead> {
2254
2254
  * Resolve tags from head entries.
2255
2255
  */
2256
2256
  resolveTags: () => Promise<HeadTag[]>;
2257
+ /**
2258
+ * Invalidate all entries and re-queue them for normalization.
2259
+ */
2260
+ invalidate: () => void;
2257
2261
  /**
2258
2262
  * Exposed hooks for easier extension.
2259
2263
  */
@@ -2254,6 +2254,10 @@ interface Unhead<Input = ResolvableHead> {
2254
2254
  * Resolve tags from head entries.
2255
2255
  */
2256
2256
  resolveTags: () => Promise<HeadTag[]>;
2257
+ /**
2258
+ * Invalidate all entries and re-queue them for normalization.
2259
+ */
2260
+ invalidate: () => void;
2257
2261
  /**
2258
2262
  * Exposed hooks for easier extension.
2259
2263
  */
@@ -1,4 +1,4 @@
1
- import { a5 as RawInput, R as ResolvableHead, az as ResolvableValue, aA as ResolvableProperties, ag as LinkWithoutEvents, ab as DataKeys, J as SchemaAugmentations, O as UnheadMeta, ai as ScriptWithoutEvents, N as UnheadHtmlAttributes, L as UnheadBodyAttributesWithoutEvents } from './unhead.Bxij9jlZ.js';
1
+ import { a5 as RawInput, R as ResolvableHead, az as ResolvableValue, aA as ResolvableProperties, ag as LinkWithoutEvents, ab as DataKeys, J as SchemaAugmentations, O as UnheadMeta, ai as ScriptWithoutEvents, N as UnheadHtmlAttributes, L as UnheadBodyAttributesWithoutEvents } from './unhead.BxIzrSMV.js';
2
2
 
3
3
  type Base = RawInput<'base'>;
4
4
  type HtmlAttributes = RawInput<'htmlAttrs'>;
@@ -1,5 +1,5 @@
1
1
  import { createHooks } from 'hookable';
2
- import { n as normalizeEntryToTags, d as dedupeKey, i as isMetaArrayDupeKey } from './unhead.Di5OD67x.mjs';
2
+ import { n as normalizeEntryToTags, d as dedupeKey, i as isMetaArrayDupeKey } from './unhead.BpRRHAhY.mjs';
3
3
  import { t as tagWeight, s as sortTags } from './unhead.DZbvapt-.mjs';
4
4
  import { c as UsesMergeStrategy, V as ValidHeadTags } from './unhead.yem5I2v_.mjs';
5
5
 
@@ -23,7 +23,7 @@ function createUnhead(resolvedOptions = {}) {
23
23
  const ssr = !resolvedOptions.document;
24
24
  const entries = /* @__PURE__ */ new Map();
25
25
  const plugins = /* @__PURE__ */ new Map();
26
- const normalizeQueue = [];
26
+ const normalizeQueue = /* @__PURE__ */ new Set();
27
27
  const head = {
28
28
  _entryCount: 1,
29
29
  // 0 is reserved for internal use
@@ -45,12 +45,12 @@ function createUnhead(resolvedOptions = {}) {
45
45
  const _ = {
46
46
  _poll(rm = false) {
47
47
  head.dirty = true;
48
- !rm && normalizeQueue.push(_i);
48
+ !rm && normalizeQueue.add(_i);
49
49
  hooks.callHook("entries:updated", head);
50
50
  },
51
51
  dispose() {
52
52
  if (entries.delete(_i)) {
53
- _._poll(true);
53
+ head.invalidate();
54
54
  }
55
55
  },
56
56
  // a patch is the same as creating a new entry, just a nice DX
@@ -72,8 +72,9 @@ function createUnhead(resolvedOptions = {}) {
72
72
  entries: [...head.entries.values()]
73
73
  };
74
74
  await hooks.callHook("entries:resolve", ctx);
75
- while (normalizeQueue.length) {
76
- const i = normalizeQueue.shift();
75
+ while (normalizeQueue.size) {
76
+ const i = normalizeQueue.values().next().value;
77
+ normalizeQueue.delete(i);
77
78
  const e = entries.get(i);
78
79
  if (e) {
79
80
  const normalizeCtx = {
@@ -161,6 +162,13 @@ function createUnhead(resolvedOptions = {}) {
161
162
  finalTags.push(t);
162
163
  }
163
164
  return finalTags;
165
+ },
166
+ invalidate() {
167
+ for (const entry of entries.values()) {
168
+ normalizeQueue.add(entry._i);
169
+ }
170
+ head.dirty = true;
171
+ hooks.callHook("entries:updated", head);
164
172
  }
165
173
  };
166
174
  (resolvedOptions?.plugins || []).forEach((p) => registerPlugin(head, p));
@@ -1,4 +1,4 @@
1
- import { a5 as RawInput, R as ResolvableHead, az as ResolvableValue, aA as ResolvableProperties, ag as LinkWithoutEvents, ab as DataKeys, J as SchemaAugmentations, O as UnheadMeta, ai as ScriptWithoutEvents, N as UnheadHtmlAttributes, L as UnheadBodyAttributesWithoutEvents } from './unhead.Bxij9jlZ.mjs';
1
+ import { a5 as RawInput, R as ResolvableHead, az as ResolvableValue, aA as ResolvableProperties, ag as LinkWithoutEvents, ab as DataKeys, J as SchemaAugmentations, O as UnheadMeta, ai as ScriptWithoutEvents, N as UnheadHtmlAttributes, L as UnheadBodyAttributesWithoutEvents } from './unhead.BxIzrSMV.mjs';
2
2
 
3
3
  type Base = RawInput<'base'>;
4
4
  type HtmlAttributes = RawInput<'htmlAttrs'>;
@@ -1,6 +1,6 @@
1
1
  import { d as defineHeadPlugin } from './unhead.CApf5sj3.mjs';
2
2
  import { s as sortTags } from './unhead.DZbvapt-.mjs';
3
- import { p as processTemplateParams } from './unhead.C13swrCa.mjs';
3
+ import { p as processTemplateParams } from './unhead.BYvz9V1x.mjs';
4
4
 
5
5
  const formatKey = (k) => !k.includes(":key") ? k.split(":").join(":key:") : k;
6
6
  const AliasSortingPlugin = defineHeadPlugin({
@@ -1,4 +1,4 @@
1
- import { U as Unhead, a as UseScriptInput, b as UseScriptOptions, c as UseScriptReturn, d as UseScriptResolvedInput } from './unhead.Bxij9jlZ.mjs';
1
+ import { U as Unhead, a as UseScriptInput, b as UseScriptOptions, c as UseScriptReturn, d as UseScriptResolvedInput } from './unhead.BxIzrSMV.mjs';
2
2
 
3
3
  /**
4
4
  * @deprecated compute key manually
@@ -1,4 +1,4 @@
1
- import { U as Unhead, a as UseScriptInput, b as UseScriptOptions, c as UseScriptReturn, d as UseScriptResolvedInput } from './unhead.Bxij9jlZ.js';
1
+ import { U as Unhead, a as UseScriptInput, b as UseScriptOptions, c as UseScriptReturn, d as UseScriptResolvedInput } from './unhead.BxIzrSMV.js';
2
2
 
3
3
  /**
4
4
  * @deprecated compute key manually
package/dist/types.d.mts CHANGED
@@ -1,7 +1,7 @@
1
- import { B as Booleanable, e as ReferrerPolicy } from './shared/unhead.Bxij9jlZ.mjs';
2
- export { o as ActiveHeadEntry, ax as Arrayable, A as AsVoidFunctions, ae as BodyAttributesWithoutEvents, af as BodyEvents, q as CreateClientHeadOptions, C as CreateHeadOptions, p as CreateServerHeadOptions, ab as DataKeys, aC as DeepResolvableProperties, x as DomBeforeRenderCtx, I as DomPluginOptions, w as DomRenderTagContext, D as DomState, v as EntryResolveCtx, E as EventHandlerOptions, ad as GlobalAttributes, at as HasTemplateParams, a6 as Head, H as HeadEntry, r as HeadEntryOptions, F as HeadHooks, n as HeadPlugin, m as HeadPluginInput, l as HeadPluginOptions, au as HeadTag, av as HeadTagKeys, s as HookResult, ac as HttpEventAttributes, an as InnerContent, am as InnerContentVal, ag as LinkWithoutEvents, K as MaybeArray, Q as MaybeEventFnHandlers, aa as MergeHead, ah as MetaFlat, M as MetaFlatInput, ay as Never, as as ProcessesTemplateParams, P as PropResolver, a5 as RawInput, i as RecordingEntry, G as RenderDomHeadOptions, u as RenderSSRHeadOptions, X as ResolvableBase, a2 as ResolvableBodyAttributes, R as ResolvableHead, a1 as ResolvableHtmlAttributes, Y as ResolvableLink, Z as ResolvableMeta, a0 as ResolvableNoscript, aA as ResolvableProperties, $ as ResolvableScript, _ as ResolvableStyle, a3 as ResolvableTemplateParams, T as ResolvableTitle, V as ResolvableTitleTemplate, aB as ResolvableUnion, az as ResolvableValue, a7 as ResolvedHead, aj as ResolvesDuplicates, k as RuntimeMode, t as SSRHeadPayload, z as SSRRenderContext, J as SchemaAugmentations, S as ScriptInstance, ai as ScriptWithoutEvents, a4 as SerializableHead, y as ShouldRenderContext, j as SideEffectsRecord, aw as Stringable, aq as TagKey, al as TagPosition, ao as TagPriority, ap as TagUserProperties, ar as TemplateParams, U as Unhead, L as UnheadBodyAttributesWithoutEvents, N as UnheadHtmlAttributes, O as UnheadMeta, h as UseFunctionType, a9 as UseHeadInput, g as UseScriptContext, a as UseScriptInput, b as UseScriptOptions, d as UseScriptResolvedInput, c as UseScriptReturn, f as UseScriptStatus, a8 as UseSeoMetaInput, ak as ValidTagPositions, W as WarmupStrategy } from './shared/unhead.Bxij9jlZ.mjs';
3
- export { B as Base, j as BodyAttributes, H as HeadSafe, g as HtmlAttributes, L as Link, M as Meta, N as Noscript, S as SafeBodyAttr, a as SafeHtmlAttr, c as SafeLink, b as SafeMeta, e as SafeNoscript, d as SafeScript, f as SafeStyle, i as Script, h as Style } from './shared/unhead.BP1dbCri.mjs';
4
- export { r as resolveScriptKey, u as useScript } from './shared/unhead.CBeMfL2m.mjs';
1
+ import { B as Booleanable, e as ReferrerPolicy } from './shared/unhead.BxIzrSMV.mjs';
2
+ export { o as ActiveHeadEntry, ax as Arrayable, A as AsVoidFunctions, ae as BodyAttributesWithoutEvents, af as BodyEvents, q as CreateClientHeadOptions, C as CreateHeadOptions, p as CreateServerHeadOptions, ab as DataKeys, aC as DeepResolvableProperties, x as DomBeforeRenderCtx, I as DomPluginOptions, w as DomRenderTagContext, D as DomState, v as EntryResolveCtx, E as EventHandlerOptions, ad as GlobalAttributes, at as HasTemplateParams, a6 as Head, H as HeadEntry, r as HeadEntryOptions, F as HeadHooks, n as HeadPlugin, m as HeadPluginInput, l as HeadPluginOptions, au as HeadTag, av as HeadTagKeys, s as HookResult, ac as HttpEventAttributes, an as InnerContent, am as InnerContentVal, ag as LinkWithoutEvents, K as MaybeArray, Q as MaybeEventFnHandlers, aa as MergeHead, ah as MetaFlat, M as MetaFlatInput, ay as Never, as as ProcessesTemplateParams, P as PropResolver, a5 as RawInput, i as RecordingEntry, G as RenderDomHeadOptions, u as RenderSSRHeadOptions, X as ResolvableBase, a2 as ResolvableBodyAttributes, R as ResolvableHead, a1 as ResolvableHtmlAttributes, Y as ResolvableLink, Z as ResolvableMeta, a0 as ResolvableNoscript, aA as ResolvableProperties, $ as ResolvableScript, _ as ResolvableStyle, a3 as ResolvableTemplateParams, T as ResolvableTitle, V as ResolvableTitleTemplate, aB as ResolvableUnion, az as ResolvableValue, a7 as ResolvedHead, aj as ResolvesDuplicates, k as RuntimeMode, t as SSRHeadPayload, z as SSRRenderContext, J as SchemaAugmentations, S as ScriptInstance, ai as ScriptWithoutEvents, a4 as SerializableHead, y as ShouldRenderContext, j as SideEffectsRecord, aw as Stringable, aq as TagKey, al as TagPosition, ao as TagPriority, ap as TagUserProperties, ar as TemplateParams, U as Unhead, L as UnheadBodyAttributesWithoutEvents, N as UnheadHtmlAttributes, O as UnheadMeta, h as UseFunctionType, a9 as UseHeadInput, g as UseScriptContext, a as UseScriptInput, b as UseScriptOptions, d as UseScriptResolvedInput, c as UseScriptReturn, f as UseScriptStatus, a8 as UseSeoMetaInput, ak as ValidTagPositions, W as WarmupStrategy } from './shared/unhead.BxIzrSMV.mjs';
3
+ export { B as Base, j as BodyAttributes, H as HeadSafe, g as HtmlAttributes, L as Link, M as Meta, N as Noscript, S as SafeBodyAttr, a as SafeHtmlAttr, c as SafeLink, b as SafeMeta, e as SafeNoscript, d as SafeScript, f as SafeStyle, i as Script, h as Style } from './shared/unhead.DcRvKVx9.mjs';
4
+ export { r as resolveScriptKey, u as useScript } from './shared/unhead.YQlj2HXR.mjs';
5
5
  export { createSpyProxy } from './scripts.mjs';
6
6
  import 'hookable';
7
7
 
package/dist/types.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { B as Booleanable, e as ReferrerPolicy } from './shared/unhead.Bxij9jlZ.js';
2
- export { o as ActiveHeadEntry, ax as Arrayable, A as AsVoidFunctions, ae as BodyAttributesWithoutEvents, af as BodyEvents, q as CreateClientHeadOptions, C as CreateHeadOptions, p as CreateServerHeadOptions, ab as DataKeys, aC as DeepResolvableProperties, x as DomBeforeRenderCtx, I as DomPluginOptions, w as DomRenderTagContext, D as DomState, v as EntryResolveCtx, E as EventHandlerOptions, ad as GlobalAttributes, at as HasTemplateParams, a6 as Head, H as HeadEntry, r as HeadEntryOptions, F as HeadHooks, n as HeadPlugin, m as HeadPluginInput, l as HeadPluginOptions, au as HeadTag, av as HeadTagKeys, s as HookResult, ac as HttpEventAttributes, an as InnerContent, am as InnerContentVal, ag as LinkWithoutEvents, K as MaybeArray, Q as MaybeEventFnHandlers, aa as MergeHead, ah as MetaFlat, M as MetaFlatInput, ay as Never, as as ProcessesTemplateParams, P as PropResolver, a5 as RawInput, i as RecordingEntry, G as RenderDomHeadOptions, u as RenderSSRHeadOptions, X as ResolvableBase, a2 as ResolvableBodyAttributes, R as ResolvableHead, a1 as ResolvableHtmlAttributes, Y as ResolvableLink, Z as ResolvableMeta, a0 as ResolvableNoscript, aA as ResolvableProperties, $ as ResolvableScript, _ as ResolvableStyle, a3 as ResolvableTemplateParams, T as ResolvableTitle, V as ResolvableTitleTemplate, aB as ResolvableUnion, az as ResolvableValue, a7 as ResolvedHead, aj as ResolvesDuplicates, k as RuntimeMode, t as SSRHeadPayload, z as SSRRenderContext, J as SchemaAugmentations, S as ScriptInstance, ai as ScriptWithoutEvents, a4 as SerializableHead, y as ShouldRenderContext, j as SideEffectsRecord, aw as Stringable, aq as TagKey, al as TagPosition, ao as TagPriority, ap as TagUserProperties, ar as TemplateParams, U as Unhead, L as UnheadBodyAttributesWithoutEvents, N as UnheadHtmlAttributes, O as UnheadMeta, h as UseFunctionType, a9 as UseHeadInput, g as UseScriptContext, a as UseScriptInput, b as UseScriptOptions, d as UseScriptResolvedInput, c as UseScriptReturn, f as UseScriptStatus, a8 as UseSeoMetaInput, ak as ValidTagPositions, W as WarmupStrategy } from './shared/unhead.Bxij9jlZ.js';
3
- export { B as Base, j as BodyAttributes, H as HeadSafe, g as HtmlAttributes, L as Link, M as Meta, N as Noscript, S as SafeBodyAttr, a as SafeHtmlAttr, c as SafeLink, b as SafeMeta, e as SafeNoscript, d as SafeScript, f as SafeStyle, i as Script, h as Style } from './shared/unhead.CdqfUg1S.js';
4
- export { r as resolveScriptKey, u as useScript } from './shared/unhead.B003D9oY.js';
1
+ import { B as Booleanable, e as ReferrerPolicy } from './shared/unhead.BxIzrSMV.js';
2
+ export { o as ActiveHeadEntry, ax as Arrayable, A as AsVoidFunctions, ae as BodyAttributesWithoutEvents, af as BodyEvents, q as CreateClientHeadOptions, C as CreateHeadOptions, p as CreateServerHeadOptions, ab as DataKeys, aC as DeepResolvableProperties, x as DomBeforeRenderCtx, I as DomPluginOptions, w as DomRenderTagContext, D as DomState, v as EntryResolveCtx, E as EventHandlerOptions, ad as GlobalAttributes, at as HasTemplateParams, a6 as Head, H as HeadEntry, r as HeadEntryOptions, F as HeadHooks, n as HeadPlugin, m as HeadPluginInput, l as HeadPluginOptions, au as HeadTag, av as HeadTagKeys, s as HookResult, ac as HttpEventAttributes, an as InnerContent, am as InnerContentVal, ag as LinkWithoutEvents, K as MaybeArray, Q as MaybeEventFnHandlers, aa as MergeHead, ah as MetaFlat, M as MetaFlatInput, ay as Never, as as ProcessesTemplateParams, P as PropResolver, a5 as RawInput, i as RecordingEntry, G as RenderDomHeadOptions, u as RenderSSRHeadOptions, X as ResolvableBase, a2 as ResolvableBodyAttributes, R as ResolvableHead, a1 as ResolvableHtmlAttributes, Y as ResolvableLink, Z as ResolvableMeta, a0 as ResolvableNoscript, aA as ResolvableProperties, $ as ResolvableScript, _ as ResolvableStyle, a3 as ResolvableTemplateParams, T as ResolvableTitle, V as ResolvableTitleTemplate, aB as ResolvableUnion, az as ResolvableValue, a7 as ResolvedHead, aj as ResolvesDuplicates, k as RuntimeMode, t as SSRHeadPayload, z as SSRRenderContext, J as SchemaAugmentations, S as ScriptInstance, ai as ScriptWithoutEvents, a4 as SerializableHead, y as ShouldRenderContext, j as SideEffectsRecord, aw as Stringable, aq as TagKey, al as TagPosition, ao as TagPriority, ap as TagUserProperties, ar as TemplateParams, U as Unhead, L as UnheadBodyAttributesWithoutEvents, N as UnheadHtmlAttributes, O as UnheadMeta, h as UseFunctionType, a9 as UseHeadInput, g as UseScriptContext, a as UseScriptInput, b as UseScriptOptions, d as UseScriptResolvedInput, c as UseScriptReturn, f as UseScriptStatus, a8 as UseSeoMetaInput, ak as ValidTagPositions, W as WarmupStrategy } from './shared/unhead.BxIzrSMV.js';
3
+ export { B as Base, j as BodyAttributes, H as HeadSafe, g as HtmlAttributes, L as Link, M as Meta, N as Noscript, S as SafeBodyAttr, a as SafeHtmlAttr, c as SafeLink, b as SafeMeta, e as SafeNoscript, d as SafeScript, f as SafeStyle, i as Script, h as Style } from './shared/unhead.BzieZHWV.js';
4
+ export { r as resolveScriptKey, u as useScript } from './shared/unhead.jgc6RGmf.js';
5
5
  export { createSpyProxy } from './scripts.js';
6
6
  import 'hookable';
7
7
 
package/dist/utils.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { au as HeadTag, O as UnheadMeta, ah as MetaFlat, R as ResolvableHead, P as PropResolver, U as Unhead, ar as TemplateParams } from './shared/unhead.Bxij9jlZ.mjs';
1
+ import { au as HeadTag, O as UnheadMeta, ah as MetaFlat, R as ResolvableHead, P as PropResolver, U as Unhead, ar as TemplateParams } from './shared/unhead.BxIzrSMV.mjs';
2
2
  import 'hookable';
3
3
 
4
4
  declare const SelfClosingTags: Set<string>;
package/dist/utils.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { au as HeadTag, O as UnheadMeta, ah as MetaFlat, R as ResolvableHead, P as PropResolver, U as Unhead, ar as TemplateParams } from './shared/unhead.Bxij9jlZ.js';
1
+ import { au as HeadTag, O as UnheadMeta, ah as MetaFlat, R as ResolvableHead, P as PropResolver, U as Unhead, ar as TemplateParams } from './shared/unhead.BxIzrSMV.js';
2
2
  import 'hookable';
3
3
 
4
4
  declare const SelfClosingTags: Set<string>;
package/dist/utils.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  export { D as DupeableTags, H as HasElementTags, M as MetaTagsArrayable, b as ScriptNetworkEvents, S as SelfClosingTags, a as TagConfigKeys, T as TagsWithInnerContent, U as UniqueTags, c as UsesMergeStrategy, V as ValidHeadTags } from './shared/unhead.yem5I2v_.mjs';
2
- export { d as dedupeKey, h as hashTag, i as isMetaArrayDupeKey, n as normalizeEntryToTags, a as normalizeProps, w as walkResolver } from './shared/unhead.Di5OD67x.mjs';
2
+ export { d as dedupeKey, h as hashTag, i as isMetaArrayDupeKey, n as normalizeEntryToTags, a as normalizeProps, w as walkResolver } from './shared/unhead.BpRRHAhY.mjs';
3
3
  export { r as resolveMetaKeyType, a as resolveMetaKeyValue, b as resolvePackedMetaObjectValue, u as unpackMeta } from './shared/unhead.DQc16pHI.mjs';
4
4
  export { s as sortTags, t as tagWeight } from './shared/unhead.DZbvapt-.mjs';
5
- export { p as processTemplateParams } from './shared/unhead.C13swrCa.mjs';
5
+ export { p as processTemplateParams } from './shared/unhead.BYvz9V1x.mjs';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "unhead",
3
3
  "type": "module",
4
- "version": "2.0.11",
4
+ "version": "2.0.13",
5
5
  "description": "Full-stack <head> manager built for any framework.",
6
6
  "author": {
7
7
  "name": "Harlan Wilton",