unhead 2.0.0-alpha.14 → 2.0.0-alpha.16

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
@@ -7,7 +7,7 @@ declare function createHead<T = Head>(options?: CreateClientHeadOptions): unhead
7
7
  /**
8
8
  * Render the head tags to the DOM.
9
9
  */
10
- declare function renderDOMHead<T extends Unhead<any>>(head: T, options?: RenderDomHeadOptions): Promise<void>;
10
+ declare function renderDOMHead(head: Unhead<any>, options?: RenderDomHeadOptions): Promise<void>;
11
11
 
12
12
  declare function createDebouncedFn(callee: () => void, delayer: (fn: () => void) => void): () => void;
13
13
 
package/dist/client.d.ts CHANGED
@@ -7,7 +7,7 @@ declare function createHead<T = Head>(options?: CreateClientHeadOptions): unhead
7
7
  /**
8
8
  * Render the head tags to the DOM.
9
9
  */
10
- declare function renderDOMHead<T extends Unhead<any>>(head: T, options?: RenderDomHeadOptions): Promise<void>;
10
+ declare function renderDOMHead(head: Unhead<any>, options?: RenderDomHeadOptions): Promise<void>;
11
11
 
12
12
  declare function createDebouncedFn(callee: () => void, delayer: (fn: () => void) => void): () => void;
13
13
 
package/dist/client.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { c as createHeadCore } from './shared/unhead.BfOKU5JT.mjs';
1
+ import { c as createHeadCore } from './shared/unhead.dac5MmID.mjs';
2
2
  import { H as HasElementTags } from './shared/unhead.BX2ITVEM.mjs';
3
3
  import { h as hashTag, i as isMetaArrayDupeKey, a as normalizeProps, d as dedupeKey } from './shared/unhead.CGUU1vXi.mjs';
4
4
  import 'hookable';
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  export { u as useHead, a as useHeadSafe, b as useSeoMeta } from './shared/unhead.BDJ47PJE.mjs';
2
- export { c as createHeadCore } from './shared/unhead.BfOKU5JT.mjs';
2
+ export { c as createHeadCore } from './shared/unhead.dac5MmID.mjs';
3
3
  import './shared/unhead.cW6GzjRO.mjs';
4
4
  import './shared/unhead.oUj3qANc.mjs';
5
5
  import './shared/unhead.BX2ITVEM.mjs';
package/dist/legacy.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { c as createHeadCore } from './shared/unhead.BfOKU5JT.mjs';
1
+ import { c as createHeadCore } from './shared/unhead.dac5MmID.mjs';
2
2
  import { b as ScriptNetworkEvents } from './shared/unhead.BX2ITVEM.mjs';
3
3
  import { D as DeprecationsPlugin, P as PromisesPlugin, T as TemplateParamsPlugin, A as AliasSortingPlugin } from './shared/unhead.nHwoOBDy.mjs';
4
4
  export { u as useHead, a as useHeadSafe, b as useSeoMeta } from './shared/unhead.BDJ47PJE.mjs';
package/dist/server.d.mts CHANGED
@@ -4,7 +4,7 @@ import 'hookable';
4
4
 
5
5
  declare function createHead<T = Head>(options?: CreateServerHeadOptions): unhead_types.Unhead<T>;
6
6
 
7
- declare function renderSSRHead<T extends Record<string, any>>(head: Unhead<T>, options?: RenderSSRHeadOptions): Promise<SSRHeadPayload>;
7
+ declare function renderSSRHead(head: Unhead<any>, options?: RenderSSRHeadOptions): Promise<SSRHeadPayload>;
8
8
 
9
9
  declare function transformHtmlTemplate(head: Unhead<any>, html: string, options?: RenderSSRHeadOptions): Promise<string>;
10
10
 
package/dist/server.d.ts CHANGED
@@ -4,7 +4,7 @@ import 'hookable';
4
4
 
5
5
  declare function createHead<T = Head>(options?: CreateServerHeadOptions): unhead_types.Unhead<T>;
6
6
 
7
- declare function renderSSRHead<T extends Record<string, any>>(head: Unhead<T>, options?: RenderSSRHeadOptions): Promise<SSRHeadPayload>;
7
+ declare function renderSSRHead(head: Unhead<any>, options?: RenderSSRHeadOptions): Promise<SSRHeadPayload>;
8
8
 
9
9
  declare function transformHtmlTemplate(head: Unhead<any>, html: string, options?: RenderSSRHeadOptions): Promise<string>;
10
10
 
package/dist/server.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { c as createHeadCore } from './shared/unhead.BfOKU5JT.mjs';
1
+ import { c as createHeadCore } from './shared/unhead.dac5MmID.mjs';
2
2
  import { T as TagsWithInnerContent, S as SelfClosingTags$1 } from './shared/unhead.BX2ITVEM.mjs';
3
3
  import 'hookable';
4
4
  import './shared/unhead.CGUU1vXi.mjs';
@@ -4,9 +4,10 @@ import { t as tagWeight, s as sortTags, c as UsesMergeStrategy, V as ValidHeadTa
4
4
 
5
5
  function registerPlugin(head, p) {
6
6
  const plugin = typeof p === "function" ? p(head) : p;
7
- const exists = head.plugins.get(plugin.key);
7
+ const key = plugin.key || String(head.plugins.size + 1);
8
+ const exists = head.plugins.get(key);
8
9
  if (!exists) {
9
- head.plugins.set(plugin.key, plugin);
10
+ head.plugins.set(key, plugin);
10
11
  head.hooks.addHooks(plugin.hooks || {});
11
12
  }
12
13
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "unhead",
3
3
  "type": "module",
4
- "version": "2.0.0-alpha.14",
4
+ "version": "2.0.0-alpha.16",
5
5
  "description": "Full-stack <head> manager built for any framework.",
6
6
  "author": {
7
7
  "name": "Harlan Wilton",