unhead 2.0.0-alpha.13 → 2.0.0-alpha.14

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,8 +1,8 @@
1
1
  import * as unhead_types from 'unhead/types';
2
- import { a as Head, b as CreateClientHeadOptions, U as Unhead, R as RenderDomHeadOptions } from './shared/unhead.MUC9HWYx.mjs';
2
+ import { a as Head, b as CreateClientHeadOptions, U as Unhead, R as RenderDomHeadOptions } from './shared/unhead.C45sZTyS.mjs';
3
3
  import 'hookable';
4
4
 
5
- declare function createHead<T extends Record<string, any> = Head>(options?: CreateClientHeadOptions): unhead_types.Unhead<T>;
5
+ declare function createHead<T = Head>(options?: CreateClientHeadOptions): unhead_types.Unhead<T>;
6
6
 
7
7
  /**
8
8
  * Render the head tags to the DOM.
package/dist/client.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import * as unhead_types from 'unhead/types';
2
- import { a as Head, b as CreateClientHeadOptions, U as Unhead, R as RenderDomHeadOptions } from './shared/unhead.MUC9HWYx.js';
2
+ import { a as Head, b as CreateClientHeadOptions, U as Unhead, R as RenderDomHeadOptions } from './shared/unhead.C45sZTyS.js';
3
3
  import 'hookable';
4
4
 
5
- declare function createHead<T extends Record<string, any> = Head>(options?: CreateClientHeadOptions): unhead_types.Unhead<T>;
5
+ declare function createHead<T = Head>(options?: CreateClientHeadOptions): unhead_types.Unhead<T>;
6
6
 
7
7
  /**
8
8
  * Render the head tags to the DOM.
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { U as Unhead, H as HeadEntryOptions, A as ActiveHeadEntry, h as UseSeoMetaInput, a as Head, C as CreateHeadOptions } from './shared/unhead.MUC9HWYx.mjs';
1
+ import { U as Unhead, H as HeadEntryOptions, A as ActiveHeadEntry, j as UseSeoMetaInput, a as Head, C as CreateHeadOptions } from './shared/unhead.C45sZTyS.mjs';
2
2
  import { HeadSafe } from './types.mjs';
3
3
  import 'hookable';
4
4
 
@@ -10,6 +10,6 @@ declare function useSeoMeta<T extends Unhead<any>>(unhead: T, input: UseSeoMetaI
10
10
  * Creates a core instance of unhead. Does not provide a global ctx for composables to work
11
11
  * and does not register DOM plugins.
12
12
  */
13
- declare function createHeadCore<T extends Record<string, any> = Head>(resolvedOptions?: CreateHeadOptions): Unhead<T>;
13
+ declare function createHeadCore<T = Head>(resolvedOptions?: CreateHeadOptions): Unhead<T>;
14
14
 
15
15
  export { createHeadCore, useHead, useHeadSafe, useSeoMeta };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { U as Unhead, H as HeadEntryOptions, A as ActiveHeadEntry, h as UseSeoMetaInput, a as Head, C as CreateHeadOptions } from './shared/unhead.MUC9HWYx.js';
1
+ import { U as Unhead, H as HeadEntryOptions, A as ActiveHeadEntry, j as UseSeoMetaInput, a as Head, C as CreateHeadOptions } from './shared/unhead.C45sZTyS.js';
2
2
  import { HeadSafe } from './types.js';
3
3
  import 'hookable';
4
4
 
@@ -10,6 +10,6 @@ declare function useSeoMeta<T extends Unhead<any>>(unhead: T, input: UseSeoMetaI
10
10
  * Creates a core instance of unhead. Does not provide a global ctx for composables to work
11
11
  * and does not register DOM plugins.
12
12
  */
13
- declare function createHeadCore<T extends Record<string, any> = Head>(resolvedOptions?: CreateHeadOptions): Unhead<T>;
13
+ declare function createHeadCore<T = Head>(resolvedOptions?: CreateHeadOptions): Unhead<T>;
14
14
 
15
15
  export { createHeadCore, useHead, useHeadSafe, useSeoMeta };
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
- export { u as useHead, a as useHeadSafe, b as useSeoMeta } from './shared/unhead.DgyS1B7b.mjs';
1
+ export { u as useHead, a as useHeadSafe, b as useSeoMeta } from './shared/unhead.BDJ47PJE.mjs';
2
2
  export { c as createHeadCore } from './shared/unhead.BfOKU5JT.mjs';
3
- import './shared/unhead.Cktr7sRK.mjs';
4
- import './shared/unhead.CnyuWd5e.mjs';
3
+ import './shared/unhead.cW6GzjRO.mjs';
4
+ import './shared/unhead.oUj3qANc.mjs';
5
5
  import './shared/unhead.BX2ITVEM.mjs';
6
6
  import 'hookable';
7
7
  import './shared/unhead.CGUU1vXi.mjs';
package/dist/legacy.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  export { createHeadCore, useHead, useHeadSafe, useSeoMeta } from './index.mjs';
2
- import { S as Script, A as ActiveHeadEntry, H as HeadEntryOptions, U as Unhead, a as Head, C as CreateHeadOptions } from './shared/unhead.MUC9HWYx.mjs';
2
+ import { S as Script, A as ActiveHeadEntry, H as HeadEntryOptions, U as Unhead, a as Head, C as CreateHeadOptions } from './shared/unhead.C45sZTyS.mjs';
3
3
  import './types.mjs';
4
4
  import 'hookable';
5
5
 
package/dist/legacy.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export { createHeadCore, useHead, useHeadSafe, useSeoMeta } from './index.js';
2
- import { S as Script, A as ActiveHeadEntry, H as HeadEntryOptions, U as Unhead, a as Head, C as CreateHeadOptions } from './shared/unhead.MUC9HWYx.js';
2
+ import { S as Script, A as ActiveHeadEntry, H as HeadEntryOptions, U as Unhead, a as Head, C as CreateHeadOptions } from './shared/unhead.C45sZTyS.js';
3
3
  import './types.js';
4
4
  import 'hookable';
5
5
 
package/dist/legacy.mjs CHANGED
@@ -1,12 +1,12 @@
1
1
  import { c as createHeadCore } from './shared/unhead.BfOKU5JT.mjs';
2
2
  import { b as ScriptNetworkEvents } from './shared/unhead.BX2ITVEM.mjs';
3
- import { D as DeprecationsPlugin, P as PromisesPlugin, T as TemplateParamsPlugin, A as AliasSortingPlugin } from './shared/unhead.Mt30Mzm-.mjs';
4
- export { u as useHead, a as useHeadSafe, b as useSeoMeta } from './shared/unhead.DgyS1B7b.mjs';
3
+ import { D as DeprecationsPlugin, P as PromisesPlugin, T as TemplateParamsPlugin, A as AliasSortingPlugin } from './shared/unhead.nHwoOBDy.mjs';
4
+ export { u as useHead, a as useHeadSafe, b as useSeoMeta } from './shared/unhead.BDJ47PJE.mjs';
5
5
  import 'hookable';
6
6
  import './shared/unhead.CGUU1vXi.mjs';
7
- import './shared/unhead.CnyuWd5e.mjs';
7
+ import './shared/unhead.oUj3qANc.mjs';
8
8
  import './shared/unhead.Cixots_n.mjs';
9
- import './shared/unhead.Cktr7sRK.mjs';
9
+ import './shared/unhead.cW6GzjRO.mjs';
10
10
 
11
11
  function resolveScriptKey(input) {
12
12
  return input.key || input.src || (typeof input.innerHTML === "string" ? input.innerHTML : "");
package/dist/plugins.mjs CHANGED
@@ -1,6 +1,6 @@
1
- export { A as AliasSortingPlugin, D as DeprecationsPlugin, P as PromisesPlugin, T as TemplateParamsPlugin } from './shared/unhead.Mt30Mzm-.mjs';
2
- import { d as defineHeadPlugin } from './shared/unhead.CnyuWd5e.mjs';
3
- export { F as FlatMetaPlugin, S as SafeInputPlugin } from './shared/unhead.Cktr7sRK.mjs';
1
+ export { A as AliasSortingPlugin, D as DeprecationsPlugin, P as PromisesPlugin, T as TemplateParamsPlugin } from './shared/unhead.nHwoOBDy.mjs';
2
+ import { d as defineHeadPlugin } from './shared/unhead.oUj3qANc.mjs';
3
+ export { F as FlatMetaPlugin, S as SafeInputPlugin } from './shared/unhead.cW6GzjRO.mjs';
4
4
  import './shared/unhead.BX2ITVEM.mjs';
5
5
  import './shared/unhead.Cixots_n.mjs';
6
6
 
package/dist/server.d.mts CHANGED
@@ -1,8 +1,8 @@
1
1
  import * as unhead_types from 'unhead/types';
2
- import { a as Head, c as CreateServerHeadOptions, U as Unhead, d as RenderSSRHeadOptions, e as SSRHeadPayload, f as HeadTag } from './shared/unhead.MUC9HWYx.mjs';
2
+ import { a as Head, c as CreateServerHeadOptions, U as Unhead, d as RenderSSRHeadOptions, e as SSRHeadPayload, f as ResolvedHead, g as HeadTag } from './shared/unhead.C45sZTyS.mjs';
3
3
  import 'hookable';
4
4
 
5
- declare function createHead<T extends Record<string, any> = Head>(options?: CreateServerHeadOptions): unhead_types.Unhead<T>;
5
+ declare function createHead<T = Head>(options?: CreateServerHeadOptions): unhead_types.Unhead<T>;
6
6
 
7
7
  declare function renderSSRHead<T extends Record<string, any>>(head: Unhead<T>, options?: RenderSSRHeadOptions): Promise<SSRHeadPayload>;
8
8
 
@@ -10,7 +10,7 @@ declare function transformHtmlTemplate(head: Unhead<any>, html: string, options?
10
10
 
11
11
  declare function extractUnheadInputFromHtml(html: string): {
12
12
  html: string;
13
- input: Head<any>;
13
+ input: ResolvedHead<any>;
14
14
  };
15
15
 
16
16
  declare function propsToString(props: Record<string, any>): string;
package/dist/server.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import * as unhead_types from 'unhead/types';
2
- import { a as Head, c as CreateServerHeadOptions, U as Unhead, d as RenderSSRHeadOptions, e as SSRHeadPayload, f as HeadTag } from './shared/unhead.MUC9HWYx.js';
2
+ import { a as Head, c as CreateServerHeadOptions, U as Unhead, d as RenderSSRHeadOptions, e as SSRHeadPayload, f as ResolvedHead, g as HeadTag } from './shared/unhead.C45sZTyS.js';
3
3
  import 'hookable';
4
4
 
5
- declare function createHead<T extends Record<string, any> = Head>(options?: CreateServerHeadOptions): unhead_types.Unhead<T>;
5
+ declare function createHead<T = Head>(options?: CreateServerHeadOptions): unhead_types.Unhead<T>;
6
6
 
7
7
  declare function renderSSRHead<T extends Record<string, any>>(head: Unhead<T>, options?: RenderSSRHeadOptions): Promise<SSRHeadPayload>;
8
8
 
@@ -10,7 +10,7 @@ declare function transformHtmlTemplate(head: Unhead<any>, html: string, options?
10
10
 
11
11
  declare function extractUnheadInputFromHtml(html: string): {
12
12
  html: string;
13
- input: Head<any>;
13
+ input: ResolvedHead<any>;
14
14
  };
15
15
 
16
16
  declare function propsToString(props: Record<string, any>): string;
@@ -1,4 +1,4 @@
1
- import { S as SafeInputPlugin, F as FlatMetaPlugin } from './unhead.Cktr7sRK.mjs';
1
+ import { S as SafeInputPlugin, F as FlatMetaPlugin } from './unhead.cW6GzjRO.mjs';
2
2
 
3
3
  function useHead(unhead, input, options = {}) {
4
4
  return unhead.push(input, options);
@@ -18,10 +18,14 @@ interface MergeHead {
18
18
  type Never<T> = {
19
19
  [P in keyof T]?: never;
20
20
  };
21
- type MaybeFunction<T> = T | (() => T);
22
21
  type Falsey = false | null | undefined;
23
- type ResolvableValues<T> = {
24
- [key in keyof T]?: MaybeFunction<T[key] | Falsey>;
22
+ type ResolvableValue<T> = T | Falsey | (() => T | Falsey);
23
+ type ResolvableProperties<T> = {
24
+ [key in keyof T]?: ResolvableValue<T[key]>;
25
+ };
26
+ type ResolvableUnion<T> = T extends string | number | boolean ? ResolvableValue<T> : T extends object ? DeepResolvableProperties<T> : ResolvableValue<T>;
27
+ type DeepResolvableProperties<T> = {
28
+ [K in keyof T]?: T[K] extends string | object ? T[K] extends string ? ResolvableUnion<T[K]> : T[K] extends object ? DeepResolvableProperties<T[K]> : ResolvableUnion<T[K]> : ResolvableUnion<T[K]>;
25
29
  };
26
30
 
27
31
  interface DataKeys {
@@ -1497,10 +1501,8 @@ interface MetaFlat extends MetaFlatArticle, MetaFlatBook, MetaFlatProfile {
1497
1501
  */
1498
1502
  keywords: string;
1499
1503
  }
1500
- type MetaFlatNullable = {
1501
- [K in keyof MetaFlat]: MetaFlat[K] | null;
1502
- };
1503
- type MetaFlatInput = Partial<MetaFlatNullable>;
1504
+ type MetaFlatInput = DeepResolvableProperties<Partial<MetaFlat>>;
1505
+ type ResolvedMetaFlat = Partial<MetaFlat>;
1504
1506
 
1505
1507
  interface Noscript$1 {
1506
1508
  /**
@@ -1689,20 +1691,20 @@ type MaybeEventFnHandlers<T> = {
1689
1691
  [key in keyof T]?: T[key] | ((e: Event) => void);
1690
1692
  };
1691
1693
  type TitleTemplateResolver = string | ((title?: string) => string | null);
1692
- type Title = MaybeFunction<number | string | Falsey> | ResolvableValues<({
1694
+ type Title = ResolvableValue<number | string | Falsey> | ResolvableProperties<({
1693
1695
  textContent: string;
1694
1696
  } & SchemaAugmentations['title'])>;
1695
1697
  type TitleTemplate = TitleTemplateResolver | null | ({
1696
1698
  textContent: TitleTemplateResolver;
1697
1699
  } & SchemaAugmentations['titleTemplate']);
1698
- type Base<E extends EntryAugmentation = Record<string, any>> = ResolvableValues<Base$1 & SchemaAugmentations['base']> & DefinedValueOrEmptyObject<E>;
1699
- type Link<E extends EntryAugmentation = Record<string, any>> = ResolvableValues<LinkBase & DataKeys & SchemaAugmentations['link']> & MaybeEventFnHandlers<HttpEventAttributes> & DefinedValueOrEmptyObject<E>;
1700
- type Meta<E extends EntryAugmentation = Record<string, any>> = ResolvableValues<BaseMeta & DataKeys & SchemaAugmentations['meta']> & DefinedValueOrEmptyObject<E>;
1701
- type Style<E extends EntryAugmentation = Record<string, any>> = ResolvableValues<Style$1 & DataKeys & SchemaAugmentations['style']> & DefinedValueOrEmptyObject<E>;
1702
- type Script<E extends EntryAugmentation = Record<string, any>> = ResolvableValues<ScriptBase & DataKeys & SchemaAugmentations['script']> & MaybeEventFnHandlers<HttpEventAttributes> & DefinedValueOrEmptyObject<E>;
1703
- type Noscript<E extends EntryAugmentation = Record<string, any>> = ResolvableValues<Noscript$1 & DataKeys & SchemaAugmentations['noscript']> & DefinedValueOrEmptyObject<E>;
1704
- type HtmlAttributes<E extends EntryAugmentation = Record<string, any>> = ResolvableValues<HtmlAttr & DataKeys & SchemaAugmentations['htmlAttrs']> & DefinedValueOrEmptyObject<E>;
1705
- type BodyAttributes<E extends EntryAugmentation = Record<string, any>> = ResolvableValues<BodyAttr & DataKeys & SchemaAugmentations['bodyAttrs']> & MaybeEventFnHandlers<BodyEvents> & DefinedValueOrEmptyObject<E>;
1700
+ type Base<E extends EntryAugmentation = Record<string, any>> = ResolvableProperties<Base$1 & SchemaAugmentations['base']> & DefinedValueOrEmptyObject<E>;
1701
+ type Link<E extends EntryAugmentation = Record<string, any>> = ResolvableProperties<LinkBase & DataKeys & SchemaAugmentations['link']> & MaybeEventFnHandlers<HttpEventAttributes> & DefinedValueOrEmptyObject<E>;
1702
+ type Meta<E extends EntryAugmentation = Record<string, any>> = ResolvableProperties<BaseMeta & DataKeys & SchemaAugmentations['meta']> & DefinedValueOrEmptyObject<E>;
1703
+ type Style<E extends EntryAugmentation = Record<string, any>> = ResolvableProperties<Style$1 & DataKeys & SchemaAugmentations['style']> & DefinedValueOrEmptyObject<E>;
1704
+ type Script<E extends EntryAugmentation = Record<string, any>> = ResolvableProperties<ScriptBase & DataKeys & SchemaAugmentations['script']> & MaybeEventFnHandlers<HttpEventAttributes> & DefinedValueOrEmptyObject<E>;
1705
+ type Noscript<E extends EntryAugmentation = Record<string, any>> = ResolvableProperties<Noscript$1 & DataKeys & SchemaAugmentations['noscript']> & DefinedValueOrEmptyObject<E>;
1706
+ type HtmlAttributes<E extends EntryAugmentation = Record<string, any>> = ResolvableProperties<HtmlAttr & DataKeys & SchemaAugmentations['htmlAttrs']> & DefinedValueOrEmptyObject<E>;
1707
+ type BodyAttributes<E extends EntryAugmentation = Record<string, any>> = ResolvableProperties<BodyAttr & DataKeys & SchemaAugmentations['bodyAttrs']> & MaybeEventFnHandlers<BodyEvents> & DefinedValueOrEmptyObject<E>;
1706
1708
  type ResolvedTitle = ({
1707
1709
  textContent: string;
1708
1710
  } & ResolvedSchemaAugmentations['title']);
@@ -1743,7 +1745,7 @@ interface Head<E extends MergeHead = SchemaAugmentations> extends HeadUtils {
1743
1745
  *
1744
1746
  * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base
1745
1747
  */
1746
- base?: Base<E['base']>;
1748
+ base?: ResolvableValue<Base<E['base']>>;
1747
1749
  /**
1748
1750
  * The `<link>` HTML element specifies relationships between the current document and an external resource.
1749
1751
  * This element is most commonly used to link to stylesheets, but is also used to establish site icons
@@ -1751,54 +1753,54 @@ interface Head<E extends MergeHead = SchemaAugmentations> extends HeadUtils {
1751
1753
  *
1752
1754
  * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link#attr-as
1753
1755
  */
1754
- link?: Link<E['link']>[];
1756
+ link?: ResolvableValue<ResolvableValue<Link<E['link']>>[]>;
1755
1757
  /**
1756
1758
  * The `<meta>` element represents metadata that cannot be expressed in other HTML elements, like `<link>` or `<script>`.
1757
1759
  *
1758
1760
  * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta
1759
1761
  */
1760
- meta?: Meta<E['meta']>[];
1762
+ meta?: ResolvableValue<ResolvableValue<Meta<E['meta']>>[]>;
1761
1763
  /**
1762
1764
  * The `<style>` HTML element contains style information for a document, or part of a document.
1763
1765
  * It contains CSS, which is applied to the contents of the document containing the `<style>` element.
1764
1766
  *
1765
1767
  * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/style
1766
1768
  */
1767
- style?: (Style<E['style']> | string)[];
1769
+ style?: ResolvableValue<ResolvableValue<(Style<E['style']> | string)>[]>;
1768
1770
  /**
1769
1771
  * The `<script>` HTML element is used to embed executable code or data; this is typically used to embed or refer to JavaScript code.
1770
1772
  *
1771
1773
  * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script
1772
1774
  */
1773
- script?: (Script<E['script']> | string)[];
1775
+ script?: ResolvableValue<ResolvableValue<(Script<E['script']> | string)>[]>;
1774
1776
  /**
1775
1777
  * The `<noscript>` HTML element defines a section of HTML to be inserted if a script type on the page is unsupported
1776
1778
  * or if scripting is currently turned off in the browser.
1777
1779
  *
1778
1780
  * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/noscript
1779
1781
  */
1780
- noscript?: (Noscript<E['noscript']> | string)[];
1782
+ noscript?: ResolvableValue<ResolvableValue<(Noscript<E['noscript']> | string)>[]>;
1781
1783
  /**
1782
1784
  * Attributes for the `<html>` HTML element.
1783
1785
  *
1784
1786
  * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/html
1785
1787
  */
1786
- htmlAttrs?: HtmlAttributes<E['htmlAttrs']>;
1788
+ htmlAttrs?: ResolvableValue<HtmlAttributes<E['htmlAttrs']>>;
1787
1789
  /**
1788
1790
  * Attributes for the `<body>` HTML element.
1789
1791
  *
1790
1792
  * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/body
1791
1793
  */
1792
- bodyAttrs?: BodyAttributes<E['bodyAttrs']>;
1794
+ bodyAttrs?: ResolvableValue<BodyAttributes<E['bodyAttrs']>>;
1793
1795
  }
1794
1796
  interface ResolvedHead<E extends MergeHead = ResolvedSchemaAugmentations> extends HeadUtils {
1795
1797
  title?: ResolvedTitle;
1796
1798
  base?: ResolvedBase<E['base']>;
1797
1799
  link?: ResolvedLink<E['link']>[];
1798
1800
  meta?: ResolvedMeta<E['meta']>[];
1799
- style?: (ResolvedStyle<E['style']> | string)[];
1800
- script?: (ResolvedScript<E['script']> | string)[];
1801
- noscript?: (ResolvedNoscript<E['noscript']> | string)[];
1801
+ style?: ResolvedStyle<E['style']>[];
1802
+ script?: ResolvedScript<E['script']>[];
1803
+ noscript?: ResolvedNoscript<E['noscript']>[];
1802
1804
  htmlAttrs?: ResolvedHtmlAttributes<E['htmlAttrs']>;
1803
1805
  bodyAttrs?: ResolvedBodyAttributes<E['bodyAttrs']>;
1804
1806
  }
@@ -1860,7 +1862,7 @@ interface TagPriority {
1860
1862
  */
1861
1863
  tagPriority?: number | 'critical' | 'high' | 'low' | `before:${string}` | `after:${string}`;
1862
1864
  }
1863
- type TagUserProperties = ResolvableValues<TagPriority & TagPosition & InnerContent & ResolvesDuplicates & ProcessesTemplateParams>;
1865
+ type TagUserProperties = ResolvableProperties<TagPriority & TagPosition & InnerContent & ResolvesDuplicates & ProcessesTemplateParams>;
1864
1866
  type TagKey = keyof Head;
1865
1867
  type TemplateParams = {
1866
1868
  separator?: '|' | '-' | '·' | string;
@@ -2117,7 +2119,7 @@ interface HeadEntryOptions extends TagPosition, TagPriority, ProcessesTemplatePa
2117
2119
  */
2118
2120
  _safe?: boolean;
2119
2121
  }
2120
- interface Unhead<Input extends Record<string, any> = Head> {
2122
+ interface Unhead<Input = Head> {
2121
2123
  /**
2122
2124
  * Registered plugins.
2123
2125
  */
@@ -2199,4 +2201,4 @@ interface DomState {
2199
2201
  elMap: Map<string, Element | Element[]>;
2200
2202
  }
2201
2203
 
2202
- export type { Base as $, ActiveHeadEntry as A, BaseMeta as B, CreateHeadOptions as C, DataKeys as D, EntryResolveCtx as E, LinkBase as F, ScriptBase as G, HeadEntryOptions as H, UserTagConfigWithoutInnerContent as I, UserAttributesConfig as J, SchemaAugmentations as K, Link as L, MetaFlatInput as M, Noscript as N, ResolvedSchemaAugmentations as O, PropResolver as P, MaybeArray as Q, RenderDomHeadOptions as R, Script as S, TemplateParams as T, Unhead as U, BaseBodyAttr as V, BaseHtmlAttr as W, EntryAugmentation as X, MaybeEventFnHandlers as Y, Title as Z, TitleTemplate as _, Head as a, Style as a0, HtmlAttributes as a1, BodyAttributes as a2, ResolvedTitle as a3, ResolvedTitleTemplate as a4, ResolvedBase as a5, ResolvedLink as a6, ResolvedMeta as a7, ResolvedStyle as a8, ResolvedScript as a9, ResolvableValues as aA, ResolvedNoscript as aa, ResolvedHtmlAttributes as ab, ResolvedBodyAttributes as ac, HeadUtils as ad, ResolvedHead as ae, UseHeadInput as af, ResolvesDuplicates as ag, ValidTagPositions as ah, TagPosition as ai, InnerContentVal as aj, InnerContent as ak, TagPriority as al, TagUserProperties as am, TagKey as an, ProcessesTemplateParams as ao, HasTemplateParams as ap, HeadTagKeys as aq, Booleanable as ar, Stringable as as, Arrayable as at, DefinedValueOrEmptyObject as au, Merge as av, MergeHead as aw, Never as ax, MaybeFunction as ay, Falsey as az, CreateClientHeadOptions as b, CreateServerHeadOptions as c, RenderSSRHeadOptions as d, SSRHeadPayload as e, HeadTag as f, HeadPluginInput as g, UseSeoMetaInput as h, BodyAttr as i, HtmlAttr as j, Meta as k, SideEffectsRecord as l, RuntimeMode as m, HeadEntry as n, HeadPluginOptions as o, HeadPlugin as p, DomState as q, HookResult as r, DomRenderTagContext as s, DomBeforeRenderCtx as t, ShouldRenderContext as u, SSRRenderContext as v, HeadHooks as w, DomPluginOptions as x, BodyEvents as y, HttpEventAttributes as z };
2204
+ export type { HtmlAttr as $, ActiveHeadEntry as A, BaseMeta as B, CreateHeadOptions as C, DataKeys as D, EntryResolveCtx as E, ShouldRenderContext as F, SSRRenderContext as G, HeadEntryOptions as H, HeadHooks as I, DomPluginOptions as J, BodyEvents as K, LinkBase as L, HttpEventAttributes as M, Noscript as N, MetaFlatInput as O, PropResolver as P, UserTagConfigWithoutInnerContent as Q, RenderDomHeadOptions as R, Script as S, TemplateParams as T, Unhead as U, UserAttributesConfig as V, ResolvedSchemaAugmentations as W, MaybeArray as X, BaseBodyAttr as Y, BaseHtmlAttr as Z, BodyAttr as _, Head as a, EntryAugmentation as a0, MaybeEventFnHandlers as a1, Title as a2, TitleTemplate as a3, Base as a4, Link as a5, Meta as a6, ResolvedTitle as a7, ResolvedTitleTemplate as a8, ResolvedBase as a9, Never as aA, Falsey as aB, ResolvableUnion as aC, DeepResolvableProperties as aD, ResolvedLink as aa, ResolvedMeta as ab, ResolvedStyle as ac, ResolvedScript as ad, ResolvedNoscript as ae, ResolvedHtmlAttributes as af, ResolvedBodyAttributes as ag, HeadUtils as ah, UseHeadInput as ai, ResolvesDuplicates as aj, ValidTagPositions as ak, TagPosition as al, InnerContentVal as am, InnerContent as an, TagPriority as ao, TagUserProperties as ap, TagKey as aq, ProcessesTemplateParams as ar, HasTemplateParams as as, HeadTagKeys as at, Booleanable as au, Stringable as av, Arrayable as aw, DefinedValueOrEmptyObject as ax, Merge as ay, MergeHead as az, CreateClientHeadOptions as b, CreateServerHeadOptions as c, RenderSSRHeadOptions as d, SSRHeadPayload as e, ResolvedHead as f, HeadTag as g, HeadPluginInput as h, ResolvedMetaFlat as i, UseSeoMetaInput as j, ResolvableProperties as k, BodyAttributes as l, SchemaAugmentations as m, HtmlAttributes as n, ScriptBase as o, Style as p, ResolvableValue as q, SideEffectsRecord as r, RuntimeMode as s, HeadEntry as t, HeadPluginOptions as u, HeadPlugin as v, DomState as w, HookResult as x, DomRenderTagContext as y, DomBeforeRenderCtx as z };
@@ -18,10 +18,14 @@ interface MergeHead {
18
18
  type Never<T> = {
19
19
  [P in keyof T]?: never;
20
20
  };
21
- type MaybeFunction<T> = T | (() => T);
22
21
  type Falsey = false | null | undefined;
23
- type ResolvableValues<T> = {
24
- [key in keyof T]?: MaybeFunction<T[key] | Falsey>;
22
+ type ResolvableValue<T> = T | Falsey | (() => T | Falsey);
23
+ type ResolvableProperties<T> = {
24
+ [key in keyof T]?: ResolvableValue<T[key]>;
25
+ };
26
+ type ResolvableUnion<T> = T extends string | number | boolean ? ResolvableValue<T> : T extends object ? DeepResolvableProperties<T> : ResolvableValue<T>;
27
+ type DeepResolvableProperties<T> = {
28
+ [K in keyof T]?: T[K] extends string | object ? T[K] extends string ? ResolvableUnion<T[K]> : T[K] extends object ? DeepResolvableProperties<T[K]> : ResolvableUnion<T[K]> : ResolvableUnion<T[K]>;
25
29
  };
26
30
 
27
31
  interface DataKeys {
@@ -1497,10 +1501,8 @@ interface MetaFlat extends MetaFlatArticle, MetaFlatBook, MetaFlatProfile {
1497
1501
  */
1498
1502
  keywords: string;
1499
1503
  }
1500
- type MetaFlatNullable = {
1501
- [K in keyof MetaFlat]: MetaFlat[K] | null;
1502
- };
1503
- type MetaFlatInput = Partial<MetaFlatNullable>;
1504
+ type MetaFlatInput = DeepResolvableProperties<Partial<MetaFlat>>;
1505
+ type ResolvedMetaFlat = Partial<MetaFlat>;
1504
1506
 
1505
1507
  interface Noscript$1 {
1506
1508
  /**
@@ -1689,20 +1691,20 @@ type MaybeEventFnHandlers<T> = {
1689
1691
  [key in keyof T]?: T[key] | ((e: Event) => void);
1690
1692
  };
1691
1693
  type TitleTemplateResolver = string | ((title?: string) => string | null);
1692
- type Title = MaybeFunction<number | string | Falsey> | ResolvableValues<({
1694
+ type Title = ResolvableValue<number | string | Falsey> | ResolvableProperties<({
1693
1695
  textContent: string;
1694
1696
  } & SchemaAugmentations['title'])>;
1695
1697
  type TitleTemplate = TitleTemplateResolver | null | ({
1696
1698
  textContent: TitleTemplateResolver;
1697
1699
  } & SchemaAugmentations['titleTemplate']);
1698
- type Base<E extends EntryAugmentation = Record<string, any>> = ResolvableValues<Base$1 & SchemaAugmentations['base']> & DefinedValueOrEmptyObject<E>;
1699
- type Link<E extends EntryAugmentation = Record<string, any>> = ResolvableValues<LinkBase & DataKeys & SchemaAugmentations['link']> & MaybeEventFnHandlers<HttpEventAttributes> & DefinedValueOrEmptyObject<E>;
1700
- type Meta<E extends EntryAugmentation = Record<string, any>> = ResolvableValues<BaseMeta & DataKeys & SchemaAugmentations['meta']> & DefinedValueOrEmptyObject<E>;
1701
- type Style<E extends EntryAugmentation = Record<string, any>> = ResolvableValues<Style$1 & DataKeys & SchemaAugmentations['style']> & DefinedValueOrEmptyObject<E>;
1702
- type Script<E extends EntryAugmentation = Record<string, any>> = ResolvableValues<ScriptBase & DataKeys & SchemaAugmentations['script']> & MaybeEventFnHandlers<HttpEventAttributes> & DefinedValueOrEmptyObject<E>;
1703
- type Noscript<E extends EntryAugmentation = Record<string, any>> = ResolvableValues<Noscript$1 & DataKeys & SchemaAugmentations['noscript']> & DefinedValueOrEmptyObject<E>;
1704
- type HtmlAttributes<E extends EntryAugmentation = Record<string, any>> = ResolvableValues<HtmlAttr & DataKeys & SchemaAugmentations['htmlAttrs']> & DefinedValueOrEmptyObject<E>;
1705
- type BodyAttributes<E extends EntryAugmentation = Record<string, any>> = ResolvableValues<BodyAttr & DataKeys & SchemaAugmentations['bodyAttrs']> & MaybeEventFnHandlers<BodyEvents> & DefinedValueOrEmptyObject<E>;
1700
+ type Base<E extends EntryAugmentation = Record<string, any>> = ResolvableProperties<Base$1 & SchemaAugmentations['base']> & DefinedValueOrEmptyObject<E>;
1701
+ type Link<E extends EntryAugmentation = Record<string, any>> = ResolvableProperties<LinkBase & DataKeys & SchemaAugmentations['link']> & MaybeEventFnHandlers<HttpEventAttributes> & DefinedValueOrEmptyObject<E>;
1702
+ type Meta<E extends EntryAugmentation = Record<string, any>> = ResolvableProperties<BaseMeta & DataKeys & SchemaAugmentations['meta']> & DefinedValueOrEmptyObject<E>;
1703
+ type Style<E extends EntryAugmentation = Record<string, any>> = ResolvableProperties<Style$1 & DataKeys & SchemaAugmentations['style']> & DefinedValueOrEmptyObject<E>;
1704
+ type Script<E extends EntryAugmentation = Record<string, any>> = ResolvableProperties<ScriptBase & DataKeys & SchemaAugmentations['script']> & MaybeEventFnHandlers<HttpEventAttributes> & DefinedValueOrEmptyObject<E>;
1705
+ type Noscript<E extends EntryAugmentation = Record<string, any>> = ResolvableProperties<Noscript$1 & DataKeys & SchemaAugmentations['noscript']> & DefinedValueOrEmptyObject<E>;
1706
+ type HtmlAttributes<E extends EntryAugmentation = Record<string, any>> = ResolvableProperties<HtmlAttr & DataKeys & SchemaAugmentations['htmlAttrs']> & DefinedValueOrEmptyObject<E>;
1707
+ type BodyAttributes<E extends EntryAugmentation = Record<string, any>> = ResolvableProperties<BodyAttr & DataKeys & SchemaAugmentations['bodyAttrs']> & MaybeEventFnHandlers<BodyEvents> & DefinedValueOrEmptyObject<E>;
1706
1708
  type ResolvedTitle = ({
1707
1709
  textContent: string;
1708
1710
  } & ResolvedSchemaAugmentations['title']);
@@ -1743,7 +1745,7 @@ interface Head<E extends MergeHead = SchemaAugmentations> extends HeadUtils {
1743
1745
  *
1744
1746
  * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base
1745
1747
  */
1746
- base?: Base<E['base']>;
1748
+ base?: ResolvableValue<Base<E['base']>>;
1747
1749
  /**
1748
1750
  * The `<link>` HTML element specifies relationships between the current document and an external resource.
1749
1751
  * This element is most commonly used to link to stylesheets, but is also used to establish site icons
@@ -1751,54 +1753,54 @@ interface Head<E extends MergeHead = SchemaAugmentations> extends HeadUtils {
1751
1753
  *
1752
1754
  * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link#attr-as
1753
1755
  */
1754
- link?: Link<E['link']>[];
1756
+ link?: ResolvableValue<ResolvableValue<Link<E['link']>>[]>;
1755
1757
  /**
1756
1758
  * The `<meta>` element represents metadata that cannot be expressed in other HTML elements, like `<link>` or `<script>`.
1757
1759
  *
1758
1760
  * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta
1759
1761
  */
1760
- meta?: Meta<E['meta']>[];
1762
+ meta?: ResolvableValue<ResolvableValue<Meta<E['meta']>>[]>;
1761
1763
  /**
1762
1764
  * The `<style>` HTML element contains style information for a document, or part of a document.
1763
1765
  * It contains CSS, which is applied to the contents of the document containing the `<style>` element.
1764
1766
  *
1765
1767
  * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/style
1766
1768
  */
1767
- style?: (Style<E['style']> | string)[];
1769
+ style?: ResolvableValue<ResolvableValue<(Style<E['style']> | string)>[]>;
1768
1770
  /**
1769
1771
  * The `<script>` HTML element is used to embed executable code or data; this is typically used to embed or refer to JavaScript code.
1770
1772
  *
1771
1773
  * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script
1772
1774
  */
1773
- script?: (Script<E['script']> | string)[];
1775
+ script?: ResolvableValue<ResolvableValue<(Script<E['script']> | string)>[]>;
1774
1776
  /**
1775
1777
  * The `<noscript>` HTML element defines a section of HTML to be inserted if a script type on the page is unsupported
1776
1778
  * or if scripting is currently turned off in the browser.
1777
1779
  *
1778
1780
  * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/noscript
1779
1781
  */
1780
- noscript?: (Noscript<E['noscript']> | string)[];
1782
+ noscript?: ResolvableValue<ResolvableValue<(Noscript<E['noscript']> | string)>[]>;
1781
1783
  /**
1782
1784
  * Attributes for the `<html>` HTML element.
1783
1785
  *
1784
1786
  * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/html
1785
1787
  */
1786
- htmlAttrs?: HtmlAttributes<E['htmlAttrs']>;
1788
+ htmlAttrs?: ResolvableValue<HtmlAttributes<E['htmlAttrs']>>;
1787
1789
  /**
1788
1790
  * Attributes for the `<body>` HTML element.
1789
1791
  *
1790
1792
  * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/body
1791
1793
  */
1792
- bodyAttrs?: BodyAttributes<E['bodyAttrs']>;
1794
+ bodyAttrs?: ResolvableValue<BodyAttributes<E['bodyAttrs']>>;
1793
1795
  }
1794
1796
  interface ResolvedHead<E extends MergeHead = ResolvedSchemaAugmentations> extends HeadUtils {
1795
1797
  title?: ResolvedTitle;
1796
1798
  base?: ResolvedBase<E['base']>;
1797
1799
  link?: ResolvedLink<E['link']>[];
1798
1800
  meta?: ResolvedMeta<E['meta']>[];
1799
- style?: (ResolvedStyle<E['style']> | string)[];
1800
- script?: (ResolvedScript<E['script']> | string)[];
1801
- noscript?: (ResolvedNoscript<E['noscript']> | string)[];
1801
+ style?: ResolvedStyle<E['style']>[];
1802
+ script?: ResolvedScript<E['script']>[];
1803
+ noscript?: ResolvedNoscript<E['noscript']>[];
1802
1804
  htmlAttrs?: ResolvedHtmlAttributes<E['htmlAttrs']>;
1803
1805
  bodyAttrs?: ResolvedBodyAttributes<E['bodyAttrs']>;
1804
1806
  }
@@ -1860,7 +1862,7 @@ interface TagPriority {
1860
1862
  */
1861
1863
  tagPriority?: number | 'critical' | 'high' | 'low' | `before:${string}` | `after:${string}`;
1862
1864
  }
1863
- type TagUserProperties = ResolvableValues<TagPriority & TagPosition & InnerContent & ResolvesDuplicates & ProcessesTemplateParams>;
1865
+ type TagUserProperties = ResolvableProperties<TagPriority & TagPosition & InnerContent & ResolvesDuplicates & ProcessesTemplateParams>;
1864
1866
  type TagKey = keyof Head;
1865
1867
  type TemplateParams = {
1866
1868
  separator?: '|' | '-' | '·' | string;
@@ -2117,7 +2119,7 @@ interface HeadEntryOptions extends TagPosition, TagPriority, ProcessesTemplatePa
2117
2119
  */
2118
2120
  _safe?: boolean;
2119
2121
  }
2120
- interface Unhead<Input extends Record<string, any> = Head> {
2122
+ interface Unhead<Input = Head> {
2121
2123
  /**
2122
2124
  * Registered plugins.
2123
2125
  */
@@ -2199,4 +2201,4 @@ interface DomState {
2199
2201
  elMap: Map<string, Element | Element[]>;
2200
2202
  }
2201
2203
 
2202
- export type { Base as $, ActiveHeadEntry as A, BaseMeta as B, CreateHeadOptions as C, DataKeys as D, EntryResolveCtx as E, LinkBase as F, ScriptBase as G, HeadEntryOptions as H, UserTagConfigWithoutInnerContent as I, UserAttributesConfig as J, SchemaAugmentations as K, Link as L, MetaFlatInput as M, Noscript as N, ResolvedSchemaAugmentations as O, PropResolver as P, MaybeArray as Q, RenderDomHeadOptions as R, Script as S, TemplateParams as T, Unhead as U, BaseBodyAttr as V, BaseHtmlAttr as W, EntryAugmentation as X, MaybeEventFnHandlers as Y, Title as Z, TitleTemplate as _, Head as a, Style as a0, HtmlAttributes as a1, BodyAttributes as a2, ResolvedTitle as a3, ResolvedTitleTemplate as a4, ResolvedBase as a5, ResolvedLink as a6, ResolvedMeta as a7, ResolvedStyle as a8, ResolvedScript as a9, ResolvableValues as aA, ResolvedNoscript as aa, ResolvedHtmlAttributes as ab, ResolvedBodyAttributes as ac, HeadUtils as ad, ResolvedHead as ae, UseHeadInput as af, ResolvesDuplicates as ag, ValidTagPositions as ah, TagPosition as ai, InnerContentVal as aj, InnerContent as ak, TagPriority as al, TagUserProperties as am, TagKey as an, ProcessesTemplateParams as ao, HasTemplateParams as ap, HeadTagKeys as aq, Booleanable as ar, Stringable as as, Arrayable as at, DefinedValueOrEmptyObject as au, Merge as av, MergeHead as aw, Never as ax, MaybeFunction as ay, Falsey as az, CreateClientHeadOptions as b, CreateServerHeadOptions as c, RenderSSRHeadOptions as d, SSRHeadPayload as e, HeadTag as f, HeadPluginInput as g, UseSeoMetaInput as h, BodyAttr as i, HtmlAttr as j, Meta as k, SideEffectsRecord as l, RuntimeMode as m, HeadEntry as n, HeadPluginOptions as o, HeadPlugin as p, DomState as q, HookResult as r, DomRenderTagContext as s, DomBeforeRenderCtx as t, ShouldRenderContext as u, SSRRenderContext as v, HeadHooks as w, DomPluginOptions as x, BodyEvents as y, HttpEventAttributes as z };
2204
+ export type { HtmlAttr as $, ActiveHeadEntry as A, BaseMeta as B, CreateHeadOptions as C, DataKeys as D, EntryResolveCtx as E, ShouldRenderContext as F, SSRRenderContext as G, HeadEntryOptions as H, HeadHooks as I, DomPluginOptions as J, BodyEvents as K, LinkBase as L, HttpEventAttributes as M, Noscript as N, MetaFlatInput as O, PropResolver as P, UserTagConfigWithoutInnerContent as Q, RenderDomHeadOptions as R, Script as S, TemplateParams as T, Unhead as U, UserAttributesConfig as V, ResolvedSchemaAugmentations as W, MaybeArray as X, BaseBodyAttr as Y, BaseHtmlAttr as Z, BodyAttr as _, Head as a, EntryAugmentation as a0, MaybeEventFnHandlers as a1, Title as a2, TitleTemplate as a3, Base as a4, Link as a5, Meta as a6, ResolvedTitle as a7, ResolvedTitleTemplate as a8, ResolvedBase as a9, Never as aA, Falsey as aB, ResolvableUnion as aC, DeepResolvableProperties as aD, ResolvedLink as aa, ResolvedMeta as ab, ResolvedStyle as ac, ResolvedScript as ad, ResolvedNoscript as ae, ResolvedHtmlAttributes as af, ResolvedBodyAttributes as ag, HeadUtils as ah, UseHeadInput as ai, ResolvesDuplicates as aj, ValidTagPositions as ak, TagPosition as al, InnerContentVal as am, InnerContent as an, TagPriority as ao, TagUserProperties as ap, TagKey as aq, ProcessesTemplateParams as ar, HasTemplateParams as as, HeadTagKeys as at, Booleanable as au, Stringable as av, Arrayable as aw, DefinedValueOrEmptyObject as ax, Merge as ay, MergeHead as az, CreateClientHeadOptions as b, CreateServerHeadOptions as c, RenderSSRHeadOptions as d, SSRHeadPayload as e, ResolvedHead as f, HeadTag as g, HeadPluginInput as h, ResolvedMetaFlat as i, UseSeoMetaInput as j, ResolvableProperties as k, BodyAttributes as l, SchemaAugmentations as m, HtmlAttributes as n, ScriptBase as o, Style as p, ResolvableValue as q, SideEffectsRecord as r, RuntimeMode as s, HeadEntry as t, HeadPluginOptions as u, HeadPlugin as v, DomState as w, HookResult as x, DomRenderTagContext as y, DomBeforeRenderCtx as z };
@@ -1,4 +1,4 @@
1
- import { d as defineHeadPlugin, u as unpackMeta } from './unhead.CnyuWd5e.mjs';
1
+ import { d as defineHeadPlugin, u as unpackMeta } from './unhead.oUj3qANc.mjs';
2
2
 
3
3
  const FlatMetaPlugin = /* @__PURE__ */ defineHeadPlugin({
4
4
  key: "flatMeta",
@@ -1,4 +1,4 @@
1
- import { d as defineHeadPlugin } from './unhead.CnyuWd5e.mjs';
1
+ import { d as defineHeadPlugin } from './unhead.oUj3qANc.mjs';
2
2
  import { s as sortTags } from './unhead.BX2ITVEM.mjs';
3
3
  import { p as processTemplateParams } from './unhead.Cixots_n.mjs';
4
4
 
@@ -96,7 +96,7 @@ function handleObjectEntry(key, value) {
96
96
  const input = Object.fromEntries(
97
97
  Object.entries(sanitizedValue).map(([k, v]) => [`${key}${k === "url" ? "" : `${k[0].toUpperCase()}${k.slice(1)}`}`, v])
98
98
  );
99
- return unpackMeta(input).sort((a, b) => (a[attr]?.length || 0) - (b[attr]?.length || 0));
99
+ return unpackMeta(input || {}).sort((a, b) => (a[attr]?.length || 0) - (b[attr]?.length || 0));
100
100
  }
101
101
  function resolveMetaKeyType(key) {
102
102
  if (MetaPackingSchema[key]?.metaKey === "http-equiv" || NAMESPACES.HTTP_EQUIV.has(key)) {
package/dist/types.d.mts CHANGED
@@ -1,27 +1,63 @@
1
- import { i as BodyAttr, D as DataKeys, j as HtmlAttr, k as Meta, L as Link, S as Script, N as Noscript, a as Head } from './shared/unhead.MUC9HWYx.mjs';
2
- export { A as ActiveHeadEntry, at as Arrayable, $ as Base, V as BaseBodyAttr, W as BaseHtmlAttr, B as BaseMeta, a2 as BodyAttributes, y as BodyEvents, ar as Booleanable, b as CreateClientHeadOptions, C as CreateHeadOptions, c as CreateServerHeadOptions, au as DefinedValueOrEmptyObject, t as DomBeforeRenderCtx, x as DomPluginOptions, s as DomRenderTagContext, q as DomState, X as EntryAugmentation, E as EntryResolveCtx, az as Falsey, ap as HasTemplateParams, n as HeadEntry, H as HeadEntryOptions, w as HeadHooks, p as HeadPlugin, g as HeadPluginInput, o as HeadPluginOptions, f as HeadTag, aq as HeadTagKeys, ad as HeadUtils, r as HookResult, a1 as HtmlAttributes, z as HttpEventAttributes, ak as InnerContent, aj as InnerContentVal, F as LinkBase, Q as MaybeArray, Y as MaybeEventFnHandlers, ay as MaybeFunction, av as Merge, aw as MergeHead, M as MetaFlatInput, ax as Never, ao as ProcessesTemplateParams, P as PropResolver, R as RenderDomHeadOptions, d as RenderSSRHeadOptions, aA as ResolvableValues, a5 as ResolvedBase, ac as ResolvedBodyAttributes, ae as ResolvedHead, ab as ResolvedHtmlAttributes, a6 as ResolvedLink, a7 as ResolvedMeta, aa as ResolvedNoscript, O as ResolvedSchemaAugmentations, a9 as ResolvedScript, a8 as ResolvedStyle, a3 as ResolvedTitle, a4 as ResolvedTitleTemplate, ag as ResolvesDuplicates, m as RuntimeMode, e as SSRHeadPayload, v as SSRRenderContext, K as SchemaAugmentations, G as ScriptBase, u as ShouldRenderContext, l as SideEffectsRecord, as as Stringable, a0 as Style, an as TagKey, ai as TagPosition, al as TagPriority, am as TagUserProperties, T as TemplateParams, Z as Title, _ as TitleTemplate, U as Unhead, af as UseHeadInput, h as UseSeoMetaInput, J as UserAttributesConfig, I as UserTagConfigWithoutInnerContent, ah as ValidTagPositions } from './shared/unhead.MUC9HWYx.mjs';
1
+ import { k as ResolvableProperties, l as BodyAttributes, D as DataKeys, m as SchemaAugmentations, n as HtmlAttributes, B as BaseMeta, L as LinkBase, o as ScriptBase, N as Noscript, p as Style, a as Head, q as ResolvableValue } from './shared/unhead.C45sZTyS.mjs';
2
+ export { A as ActiveHeadEntry, aw as Arrayable, a4 as Base, Y as BaseBodyAttr, Z as BaseHtmlAttr, _ as BodyAttr, K as BodyEvents, au as Booleanable, b as CreateClientHeadOptions, C as CreateHeadOptions, c as CreateServerHeadOptions, aD as DeepResolvableProperties, ax as DefinedValueOrEmptyObject, z as DomBeforeRenderCtx, J as DomPluginOptions, y as DomRenderTagContext, w as DomState, a0 as EntryAugmentation, E as EntryResolveCtx, aB as Falsey, as as HasTemplateParams, t as HeadEntry, H as HeadEntryOptions, I as HeadHooks, v as HeadPlugin, h as HeadPluginInput, u as HeadPluginOptions, g as HeadTag, at as HeadTagKeys, ah as HeadUtils, x as HookResult, $ as HtmlAttr, M as HttpEventAttributes, an as InnerContent, am as InnerContentVal, a5 as Link, X as MaybeArray, a1 as MaybeEventFnHandlers, ay as Merge, az as MergeHead, a6 as Meta, O as MetaFlatInput, aA as Never, ar as ProcessesTemplateParams, P as PropResolver, R as RenderDomHeadOptions, d as RenderSSRHeadOptions, aC as ResolvableUnion, a9 as ResolvedBase, ag as ResolvedBodyAttributes, f as ResolvedHead, af as ResolvedHtmlAttributes, aa as ResolvedLink, ab as ResolvedMeta, ae as ResolvedNoscript, W as ResolvedSchemaAugmentations, ad as ResolvedScript, ac as ResolvedStyle, a7 as ResolvedTitle, a8 as ResolvedTitleTemplate, aj as ResolvesDuplicates, s as RuntimeMode, e as SSRHeadPayload, G as SSRRenderContext, S as Script, F as ShouldRenderContext, r as SideEffectsRecord, av as Stringable, aq as TagKey, al as TagPosition, ao as TagPriority, ap as TagUserProperties, T as TemplateParams, a2 as Title, a3 as TitleTemplate, U as Unhead, ai as UseHeadInput, j as UseSeoMetaInput, V as UserAttributesConfig, Q as UserTagConfigWithoutInnerContent, ak as ValidTagPositions } from './shared/unhead.C45sZTyS.mjs';
3
3
  import 'hookable';
4
4
 
5
- type SafeBodyAttr = Pick<BodyAttr, 'id' | 'class'> & DataKeys;
6
- type SafeHtmlAttr = Pick<HtmlAttr, 'id' | 'class' | 'lang' | 'dir'> & DataKeys;
7
- type SafeMeta = Pick<Meta, 'id' | 'name' | 'property' | 'content' | 'charset'> & DataKeys;
8
- type SafeLink = Pick<Link, 'color' | 'crossorigin' | 'fetchpriority' | 'href' | 'hreflang' | 'imagesizes' | 'imagesrcset' | 'integrity' | 'media' | 'referrerpolicy' | 'sizes' | 'id'> & {
9
- rel?: Omit<Link['rel'], 'modulepreload' | 'prerender' | 'preload' | 'prefetch'>;
10
- type?: 'audio/aac' | 'application/x-abiword' | 'application/x-freearc' | 'image/avif' | 'video/x-msvideo' | 'application/vnd.amazon.ebook' | 'application/octet-stream' | 'image/bmp' | 'application/x-bzip' | 'application/x-bzip2' | 'application/x-cdf' | 'application/x-csh' | 'text/csv' | 'application/msword' | 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' | 'application/vnd.ms-fontobject' | 'application/epub+zip' | 'application/gzip' | 'image/gif' | 'image/vnd.microsoft.icon' | 'text/calendar' | 'application/java-archive' | 'image/jpeg' | 'application/json' | 'application/ld+json' | 'audio/midi' | 'audio/x-midi' | 'audio/mpeg' | 'video/mp4' | 'video/mpeg' | 'application/vnd.apple.installer+xml' | 'application/vnd.oasis.opendocument.presentation' | 'application/vnd.oasis.opendocument.spreadsheet' | 'application/vnd.oasis.opendocument.text' | 'audio/ogg' | 'video/ogg' | 'application/ogg' | 'audio/opus' | 'font/otf' | 'image/png' | 'application/pdf' | 'application/x-httpd-php' | 'application/vnd.ms-powerpoint' | 'application/vnd.openxmlformats-officedocument.presentationml.presentation' | 'application/vnd.rar' | 'application/rtf' | 'application/x-sh' | 'image/svg+xml' | 'application/x-tar' | 'image/tiff' | 'video/mp2t' | 'font/ttf' | 'text/plain' | 'application/vnd.visio' | 'audio/wav' | 'audio/webm' | 'video/webm' | 'image/webp' | 'font/woff' | 'font/woff2' | 'application/xhtml+xml' | 'application/vnd.ms-excel' | 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' | 'text/xml' | 'application/atom+xml' | 'application/xml' | 'application/vnd.mozilla.xul+xml' | 'application/zip' | 'video/3gpp' | 'audio/3gpp' | 'video/3gpp2' | 'audio/3gpp2' | (string & Record<never, never>);
11
- } & DataKeys;
12
- type SafeScript = Pick<Script, 'id' | 'textContent'> & {
13
- type: 'application/json' | 'application/ld+json';
14
- } & DataKeys;
15
- type SafeNoscript = Pick<Noscript, 'id' | 'textContent'> & DataKeys;
16
- type SafeStyle = Pick<Script, 'id' | 'textContent' | 'media'> & DataKeys;
5
+ type SafeBodyAttr = ResolvableProperties<Pick<BodyAttributes, 'id' | 'class' | 'style'> & DataKeys & SchemaAugmentations['bodyAttrs']>;
6
+ type SafeHtmlAttr = ResolvableProperties<Pick<HtmlAttributes, 'id' | 'class' | 'style' | 'lang' | 'dir'> & DataKeys & SchemaAugmentations['htmlAttrs']>;
7
+ type SafeMeta = ResolvableProperties<Pick<BaseMeta, 'id' | 'name' | 'property' | 'charset' | 'content' | 'media'> & DataKeys & SchemaAugmentations['meta']>;
8
+ type SafeLink = ResolvableProperties<Pick<LinkBase, 'id' | 'color' | 'crossorigin' | 'fetchpriority' | 'href' | 'hreflang' | 'imagesrcset' | 'imagesizes' | 'integrity' | 'media' | 'referrerpolicy' | 'rel' | 'sizes' | 'type'> & DataKeys & SchemaAugmentations['link']>;
9
+ type SafeScript = ResolvableProperties<Pick<ScriptBase, 'id' | 'type' | 'nonce' | 'blocking'> & DataKeys & {
10
+ textContent?: string;
11
+ } & SchemaAugmentations['script']>;
12
+ type SafeNoscript = ResolvableProperties<Pick<Noscript, 'id' | 'textContent'> & DataKeys & SchemaAugmentations['noscript']>;
13
+ type SafeStyle = ResolvableProperties<Pick<Style, 'id' | 'media' | 'textContent' | 'nonce' | 'title' | 'blocking'> & DataKeys & SchemaAugmentations['style']>;
17
14
  interface HeadSafe extends Pick<Head, 'title' | 'titleTemplate' | 'templateParams'> {
18
- meta?: SafeMeta[];
19
- link?: SafeLink[];
20
- style?: SafeStyle[];
21
- noscript?: SafeNoscript[];
22
- script?: SafeScript[];
23
- htmlAttrs?: SafeHtmlAttr;
24
- bodyAttrs?: SafeBodyAttr;
15
+ /**
16
+ * The `<link>` HTML element specifies relationships between the current document and an external resource.
17
+ * This element is most commonly used to link to stylesheets, but is also used to establish site icons
18
+ * (both "favicon" style icons and icons for the home screen and apps on mobile devices) among other things.
19
+ *
20
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link#attr-as
21
+ */
22
+ link?: ResolvableValue<ResolvableValue<SafeLink[]>>;
23
+ /**
24
+ * The `<meta>` element represents metadata that cannot be expressed in other HTML elements, like `<link>` or `<script>`.
25
+ *
26
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta
27
+ */
28
+ meta?: ResolvableValue<ResolvableValue<SafeMeta>[]>;
29
+ /**
30
+ * The `<style>` HTML element contains style information for a document, or part of a document.
31
+ * It contains CSS, which is applied to the contents of the document containing the `<style>` element.
32
+ *
33
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/style
34
+ */
35
+ style?: ResolvableValue<ResolvableValue<(SafeStyle | string)>[]>;
36
+ /**
37
+ * The `<script>` HTML element is used to embed executable code or data; this is typically used to embed or refer to JavaScript code.
38
+ *
39
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script
40
+ */
41
+ script?: ResolvableValue<ResolvableValue<(SafeScript | string)>[]>;
42
+ /**
43
+ * The `<noscript>` HTML element defines a section of HTML to be inserted if a script type on the page is unsupported
44
+ * or if scripting is currently turned off in the browser.
45
+ *
46
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/noscript
47
+ */
48
+ noscript?: ResolvableValue<ResolvableValue<(SafeNoscript | string)>[]>;
49
+ /**
50
+ * Attributes for the `<html>` HTML element.
51
+ *
52
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/html
53
+ */
54
+ htmlAttrs?: ResolvableValue<SafeHtmlAttr>;
55
+ /**
56
+ * Attributes for the `<body>` HTML element.
57
+ *
58
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/body
59
+ */
60
+ bodyAttrs?: ResolvableValue<SafeBodyAttr>;
25
61
  }
26
62
 
27
- export { BodyAttr, DataKeys, Head, type HeadSafe, HtmlAttr, Link, Meta, Noscript, type SafeBodyAttr, type SafeHtmlAttr, type SafeLink, type SafeMeta, type SafeNoscript, type SafeScript, type SafeStyle, Script };
63
+ export { BaseMeta, BodyAttributes, DataKeys, Head, type HeadSafe, HtmlAttributes, LinkBase, Noscript, ResolvableProperties, ResolvableValue, type SafeBodyAttr, type SafeHtmlAttr, type SafeLink, type SafeMeta, type SafeNoscript, type SafeScript, type SafeStyle, SchemaAugmentations, ScriptBase, Style };
package/dist/types.d.ts CHANGED
@@ -1,27 +1,63 @@
1
- import { i as BodyAttr, D as DataKeys, j as HtmlAttr, k as Meta, L as Link, S as Script, N as Noscript, a as Head } from './shared/unhead.MUC9HWYx.js';
2
- export { A as ActiveHeadEntry, at as Arrayable, $ as Base, V as BaseBodyAttr, W as BaseHtmlAttr, B as BaseMeta, a2 as BodyAttributes, y as BodyEvents, ar as Booleanable, b as CreateClientHeadOptions, C as CreateHeadOptions, c as CreateServerHeadOptions, au as DefinedValueOrEmptyObject, t as DomBeforeRenderCtx, x as DomPluginOptions, s as DomRenderTagContext, q as DomState, X as EntryAugmentation, E as EntryResolveCtx, az as Falsey, ap as HasTemplateParams, n as HeadEntry, H as HeadEntryOptions, w as HeadHooks, p as HeadPlugin, g as HeadPluginInput, o as HeadPluginOptions, f as HeadTag, aq as HeadTagKeys, ad as HeadUtils, r as HookResult, a1 as HtmlAttributes, z as HttpEventAttributes, ak as InnerContent, aj as InnerContentVal, F as LinkBase, Q as MaybeArray, Y as MaybeEventFnHandlers, ay as MaybeFunction, av as Merge, aw as MergeHead, M as MetaFlatInput, ax as Never, ao as ProcessesTemplateParams, P as PropResolver, R as RenderDomHeadOptions, d as RenderSSRHeadOptions, aA as ResolvableValues, a5 as ResolvedBase, ac as ResolvedBodyAttributes, ae as ResolvedHead, ab as ResolvedHtmlAttributes, a6 as ResolvedLink, a7 as ResolvedMeta, aa as ResolvedNoscript, O as ResolvedSchemaAugmentations, a9 as ResolvedScript, a8 as ResolvedStyle, a3 as ResolvedTitle, a4 as ResolvedTitleTemplate, ag as ResolvesDuplicates, m as RuntimeMode, e as SSRHeadPayload, v as SSRRenderContext, K as SchemaAugmentations, G as ScriptBase, u as ShouldRenderContext, l as SideEffectsRecord, as as Stringable, a0 as Style, an as TagKey, ai as TagPosition, al as TagPriority, am as TagUserProperties, T as TemplateParams, Z as Title, _ as TitleTemplate, U as Unhead, af as UseHeadInput, h as UseSeoMetaInput, J as UserAttributesConfig, I as UserTagConfigWithoutInnerContent, ah as ValidTagPositions } from './shared/unhead.MUC9HWYx.js';
1
+ import { k as ResolvableProperties, l as BodyAttributes, D as DataKeys, m as SchemaAugmentations, n as HtmlAttributes, B as BaseMeta, L as LinkBase, o as ScriptBase, N as Noscript, p as Style, a as Head, q as ResolvableValue } from './shared/unhead.C45sZTyS.js';
2
+ export { A as ActiveHeadEntry, aw as Arrayable, a4 as Base, Y as BaseBodyAttr, Z as BaseHtmlAttr, _ as BodyAttr, K as BodyEvents, au as Booleanable, b as CreateClientHeadOptions, C as CreateHeadOptions, c as CreateServerHeadOptions, aD as DeepResolvableProperties, ax as DefinedValueOrEmptyObject, z as DomBeforeRenderCtx, J as DomPluginOptions, y as DomRenderTagContext, w as DomState, a0 as EntryAugmentation, E as EntryResolveCtx, aB as Falsey, as as HasTemplateParams, t as HeadEntry, H as HeadEntryOptions, I as HeadHooks, v as HeadPlugin, h as HeadPluginInput, u as HeadPluginOptions, g as HeadTag, at as HeadTagKeys, ah as HeadUtils, x as HookResult, $ as HtmlAttr, M as HttpEventAttributes, an as InnerContent, am as InnerContentVal, a5 as Link, X as MaybeArray, a1 as MaybeEventFnHandlers, ay as Merge, az as MergeHead, a6 as Meta, O as MetaFlatInput, aA as Never, ar as ProcessesTemplateParams, P as PropResolver, R as RenderDomHeadOptions, d as RenderSSRHeadOptions, aC as ResolvableUnion, a9 as ResolvedBase, ag as ResolvedBodyAttributes, f as ResolvedHead, af as ResolvedHtmlAttributes, aa as ResolvedLink, ab as ResolvedMeta, ae as ResolvedNoscript, W as ResolvedSchemaAugmentations, ad as ResolvedScript, ac as ResolvedStyle, a7 as ResolvedTitle, a8 as ResolvedTitleTemplate, aj as ResolvesDuplicates, s as RuntimeMode, e as SSRHeadPayload, G as SSRRenderContext, S as Script, F as ShouldRenderContext, r as SideEffectsRecord, av as Stringable, aq as TagKey, al as TagPosition, ao as TagPriority, ap as TagUserProperties, T as TemplateParams, a2 as Title, a3 as TitleTemplate, U as Unhead, ai as UseHeadInput, j as UseSeoMetaInput, V as UserAttributesConfig, Q as UserTagConfigWithoutInnerContent, ak as ValidTagPositions } from './shared/unhead.C45sZTyS.js';
3
3
  import 'hookable';
4
4
 
5
- type SafeBodyAttr = Pick<BodyAttr, 'id' | 'class'> & DataKeys;
6
- type SafeHtmlAttr = Pick<HtmlAttr, 'id' | 'class' | 'lang' | 'dir'> & DataKeys;
7
- type SafeMeta = Pick<Meta, 'id' | 'name' | 'property' | 'content' | 'charset'> & DataKeys;
8
- type SafeLink = Pick<Link, 'color' | 'crossorigin' | 'fetchpriority' | 'href' | 'hreflang' | 'imagesizes' | 'imagesrcset' | 'integrity' | 'media' | 'referrerpolicy' | 'sizes' | 'id'> & {
9
- rel?: Omit<Link['rel'], 'modulepreload' | 'prerender' | 'preload' | 'prefetch'>;
10
- type?: 'audio/aac' | 'application/x-abiword' | 'application/x-freearc' | 'image/avif' | 'video/x-msvideo' | 'application/vnd.amazon.ebook' | 'application/octet-stream' | 'image/bmp' | 'application/x-bzip' | 'application/x-bzip2' | 'application/x-cdf' | 'application/x-csh' | 'text/csv' | 'application/msword' | 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' | 'application/vnd.ms-fontobject' | 'application/epub+zip' | 'application/gzip' | 'image/gif' | 'image/vnd.microsoft.icon' | 'text/calendar' | 'application/java-archive' | 'image/jpeg' | 'application/json' | 'application/ld+json' | 'audio/midi' | 'audio/x-midi' | 'audio/mpeg' | 'video/mp4' | 'video/mpeg' | 'application/vnd.apple.installer+xml' | 'application/vnd.oasis.opendocument.presentation' | 'application/vnd.oasis.opendocument.spreadsheet' | 'application/vnd.oasis.opendocument.text' | 'audio/ogg' | 'video/ogg' | 'application/ogg' | 'audio/opus' | 'font/otf' | 'image/png' | 'application/pdf' | 'application/x-httpd-php' | 'application/vnd.ms-powerpoint' | 'application/vnd.openxmlformats-officedocument.presentationml.presentation' | 'application/vnd.rar' | 'application/rtf' | 'application/x-sh' | 'image/svg+xml' | 'application/x-tar' | 'image/tiff' | 'video/mp2t' | 'font/ttf' | 'text/plain' | 'application/vnd.visio' | 'audio/wav' | 'audio/webm' | 'video/webm' | 'image/webp' | 'font/woff' | 'font/woff2' | 'application/xhtml+xml' | 'application/vnd.ms-excel' | 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' | 'text/xml' | 'application/atom+xml' | 'application/xml' | 'application/vnd.mozilla.xul+xml' | 'application/zip' | 'video/3gpp' | 'audio/3gpp' | 'video/3gpp2' | 'audio/3gpp2' | (string & Record<never, never>);
11
- } & DataKeys;
12
- type SafeScript = Pick<Script, 'id' | 'textContent'> & {
13
- type: 'application/json' | 'application/ld+json';
14
- } & DataKeys;
15
- type SafeNoscript = Pick<Noscript, 'id' | 'textContent'> & DataKeys;
16
- type SafeStyle = Pick<Script, 'id' | 'textContent' | 'media'> & DataKeys;
5
+ type SafeBodyAttr = ResolvableProperties<Pick<BodyAttributes, 'id' | 'class' | 'style'> & DataKeys & SchemaAugmentations['bodyAttrs']>;
6
+ type SafeHtmlAttr = ResolvableProperties<Pick<HtmlAttributes, 'id' | 'class' | 'style' | 'lang' | 'dir'> & DataKeys & SchemaAugmentations['htmlAttrs']>;
7
+ type SafeMeta = ResolvableProperties<Pick<BaseMeta, 'id' | 'name' | 'property' | 'charset' | 'content' | 'media'> & DataKeys & SchemaAugmentations['meta']>;
8
+ type SafeLink = ResolvableProperties<Pick<LinkBase, 'id' | 'color' | 'crossorigin' | 'fetchpriority' | 'href' | 'hreflang' | 'imagesrcset' | 'imagesizes' | 'integrity' | 'media' | 'referrerpolicy' | 'rel' | 'sizes' | 'type'> & DataKeys & SchemaAugmentations['link']>;
9
+ type SafeScript = ResolvableProperties<Pick<ScriptBase, 'id' | 'type' | 'nonce' | 'blocking'> & DataKeys & {
10
+ textContent?: string;
11
+ } & SchemaAugmentations['script']>;
12
+ type SafeNoscript = ResolvableProperties<Pick<Noscript, 'id' | 'textContent'> & DataKeys & SchemaAugmentations['noscript']>;
13
+ type SafeStyle = ResolvableProperties<Pick<Style, 'id' | 'media' | 'textContent' | 'nonce' | 'title' | 'blocking'> & DataKeys & SchemaAugmentations['style']>;
17
14
  interface HeadSafe extends Pick<Head, 'title' | 'titleTemplate' | 'templateParams'> {
18
- meta?: SafeMeta[];
19
- link?: SafeLink[];
20
- style?: SafeStyle[];
21
- noscript?: SafeNoscript[];
22
- script?: SafeScript[];
23
- htmlAttrs?: SafeHtmlAttr;
24
- bodyAttrs?: SafeBodyAttr;
15
+ /**
16
+ * The `<link>` HTML element specifies relationships between the current document and an external resource.
17
+ * This element is most commonly used to link to stylesheets, but is also used to establish site icons
18
+ * (both "favicon" style icons and icons for the home screen and apps on mobile devices) among other things.
19
+ *
20
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link#attr-as
21
+ */
22
+ link?: ResolvableValue<ResolvableValue<SafeLink[]>>;
23
+ /**
24
+ * The `<meta>` element represents metadata that cannot be expressed in other HTML elements, like `<link>` or `<script>`.
25
+ *
26
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta
27
+ */
28
+ meta?: ResolvableValue<ResolvableValue<SafeMeta>[]>;
29
+ /**
30
+ * The `<style>` HTML element contains style information for a document, or part of a document.
31
+ * It contains CSS, which is applied to the contents of the document containing the `<style>` element.
32
+ *
33
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/style
34
+ */
35
+ style?: ResolvableValue<ResolvableValue<(SafeStyle | string)>[]>;
36
+ /**
37
+ * The `<script>` HTML element is used to embed executable code or data; this is typically used to embed or refer to JavaScript code.
38
+ *
39
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script
40
+ */
41
+ script?: ResolvableValue<ResolvableValue<(SafeScript | string)>[]>;
42
+ /**
43
+ * The `<noscript>` HTML element defines a section of HTML to be inserted if a script type on the page is unsupported
44
+ * or if scripting is currently turned off in the browser.
45
+ *
46
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/noscript
47
+ */
48
+ noscript?: ResolvableValue<ResolvableValue<(SafeNoscript | string)>[]>;
49
+ /**
50
+ * Attributes for the `<html>` HTML element.
51
+ *
52
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/html
53
+ */
54
+ htmlAttrs?: ResolvableValue<SafeHtmlAttr>;
55
+ /**
56
+ * Attributes for the `<body>` HTML element.
57
+ *
58
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/body
59
+ */
60
+ bodyAttrs?: ResolvableValue<SafeBodyAttr>;
25
61
  }
26
62
 
27
- export { BodyAttr, DataKeys, Head, type HeadSafe, HtmlAttr, Link, Meta, Noscript, type SafeBodyAttr, type SafeHtmlAttr, type SafeLink, type SafeMeta, type SafeNoscript, type SafeScript, type SafeStyle, Script };
63
+ export { BaseMeta, BodyAttributes, DataKeys, Head, type HeadSafe, HtmlAttributes, LinkBase, Noscript, ResolvableProperties, ResolvableValue, type SafeBodyAttr, type SafeHtmlAttr, type SafeLink, type SafeMeta, type SafeNoscript, type SafeScript, type SafeStyle, SchemaAugmentations, ScriptBase, Style };
package/dist/utils.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { f as HeadTag, g as HeadPluginInput, B as BaseMeta, M as MetaFlatInput, a as Head, P as PropResolver, U as Unhead, T as TemplateParams } from './shared/unhead.MUC9HWYx.mjs';
1
+ import { g as HeadTag, h as HeadPluginInput, B as BaseMeta, i as ResolvedMetaFlat, a as Head, P as PropResolver, U as Unhead, T as TemplateParams } from './shared/unhead.C45sZTyS.mjs';
2
2
  import { PropResolver as PropResolver$1 } from 'unhead/types';
3
3
  import 'hookable';
4
4
 
@@ -22,10 +22,10 @@ declare function defineHeadPlugin(plugin: HeadPluginInput): HeadPluginInput;
22
22
  declare function resolveMetaKeyType(key: string): keyof BaseMeta;
23
23
  declare function resolveMetaKeyValue(key: string): string;
24
24
  declare function resolvePackedMetaObjectValue(value: string, key: string): string;
25
- declare function unpackMeta<T extends MetaFlatInput>(input: T): Required<Head>['meta'];
25
+ declare function unpackMeta<T extends ResolvedMetaFlat>(input: T): Required<Head>['meta'];
26
26
 
27
27
  declare function normalizeProps(tag: HeadTag, input: Record<string, any>): HeadTag;
28
- declare function normalizeEntryToTags(input: Head<any>, propResolvers: PropResolver[]): HeadTag[];
28
+ declare function normalizeEntryToTags(input: any, propResolvers: PropResolver[]): HeadTag[];
29
29
 
30
30
  declare const sortTags: (a: HeadTag, b: HeadTag) => number;
31
31
  declare function tagWeight<T extends HeadTag>(head: Unhead<any>, tag: T): number;
package/dist/utils.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { f as HeadTag, g as HeadPluginInput, B as BaseMeta, M as MetaFlatInput, a as Head, P as PropResolver, U as Unhead, T as TemplateParams } from './shared/unhead.MUC9HWYx.js';
1
+ import { g as HeadTag, h as HeadPluginInput, B as BaseMeta, i as ResolvedMetaFlat, a as Head, P as PropResolver, U as Unhead, T as TemplateParams } from './shared/unhead.C45sZTyS.js';
2
2
  import { PropResolver as PropResolver$1 } from 'unhead/types';
3
3
  import 'hookable';
4
4
 
@@ -22,10 +22,10 @@ declare function defineHeadPlugin(plugin: HeadPluginInput): HeadPluginInput;
22
22
  declare function resolveMetaKeyType(key: string): keyof BaseMeta;
23
23
  declare function resolveMetaKeyValue(key: string): string;
24
24
  declare function resolvePackedMetaObjectValue(value: string, key: string): string;
25
- declare function unpackMeta<T extends MetaFlatInput>(input: T): Required<Head>['meta'];
25
+ declare function unpackMeta<T extends ResolvedMetaFlat>(input: T): Required<Head>['meta'];
26
26
 
27
27
  declare function normalizeProps(tag: HeadTag, input: Record<string, any>): HeadTag;
28
- declare function normalizeEntryToTags(input: Head<any>, propResolvers: PropResolver[]): HeadTag[];
28
+ declare function normalizeEntryToTags(input: any, propResolvers: PropResolver[]): HeadTag[];
29
29
 
30
30
  declare const sortTags: (a: HeadTag, b: HeadTag) => number;
31
31
  declare function tagWeight<T extends HeadTag>(head: Unhead<any>, tag: T): number;
package/dist/utils.mjs CHANGED
@@ -1,4 +1,4 @@
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, s as sortTags, t as tagWeight } from './shared/unhead.BX2ITVEM.mjs';
2
2
  export { d as dedupeKey, h as hashTag, i as isMetaArrayDupeKey, n as normalizeEntryToTags, a as normalizeProps, w as walkResolver } from './shared/unhead.CGUU1vXi.mjs';
3
- export { d as defineHeadPlugin, r as resolveMetaKeyType, a as resolveMetaKeyValue, b as resolvePackedMetaObjectValue, u as unpackMeta } from './shared/unhead.CnyuWd5e.mjs';
3
+ export { d as defineHeadPlugin, r as resolveMetaKeyType, a as resolveMetaKeyValue, b as resolvePackedMetaObjectValue, u as unpackMeta } from './shared/unhead.oUj3qANc.mjs';
4
4
  export { p as processTemplateParams } from './shared/unhead.Cixots_n.mjs';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "unhead",
3
3
  "type": "module",
4
- "version": "2.0.0-alpha.13",
4
+ "version": "2.0.0-alpha.14",
5
5
  "description": "Full-stack <head> manager built for any framework.",
6
6
  "author": {
7
7
  "name": "Harlan Wilton",