@unhead/schema
Advanced tools
Comparing version 1.10.4 to 1.11.0-beta.1
@@ -1,5 +0,269 @@ | ||
import { MaybePromiseProps, MergeHead, BaseBodyAttributes, HtmlAttributes as HtmlAttributes$1, Meta as Meta$1, Stringable, Merge, Base as Base$1, DefinedValueOrEmptyObject, LinkBase, HttpEventAttributes, DataKeys, Style as Style$1, ScriptBase, Noscript as Noscript$1, BodyEvents, MetaFlatInput } from 'zhead'; | ||
import { NestedHooks, Hookable } from 'hookable'; | ||
import { MergeHead, BaseBodyAttributes, HtmlAttributes as HtmlAttributes$1, Meta as Meta$1, Stringable, Merge, Base as Base$1, DefinedValueOrEmptyObject, LinkBase, HttpEventAttributes, DataKeys, Style as Style$1, ScriptBase, Noscript as Noscript$1, BodyEvents, MetaFlatInput } from 'zhead'; | ||
export { BodyEvents, DataKeys, DefinedValueOrEmptyObject, MergeHead, MetaFlatInput, ScriptBase, SpeculationRules } from 'zhead'; | ||
import { NestedHooks, Hookable } from 'hookable'; | ||
type Never<T> = { | ||
[P in keyof T]?: never; | ||
}; | ||
type FalsyEntries<T> = { | ||
[key in keyof T]?: T[key] | null | false | undefined; | ||
}; | ||
type UserTagConfigWithoutInnerContent = TagPriority & TagPosition & ResolvesDuplicates & Never<InnerContent> & { | ||
processTemplateParams?: false; | ||
}; | ||
type UserAttributesConfig = ResolvesDuplicates & TagPriority & Never<InnerContent & TagPosition>; | ||
interface SchemaAugmentations extends MergeHead { | ||
title: TagPriority; | ||
titleTemplate: TagPriority; | ||
base: UserAttributesConfig; | ||
htmlAttrs: UserAttributesConfig; | ||
bodyAttrs: UserAttributesConfig; | ||
link: UserTagConfigWithoutInnerContent; | ||
meta: UserTagConfigWithoutInnerContent; | ||
style: TagUserProperties; | ||
script: TagUserProperties; | ||
noscript: TagUserProperties; | ||
} | ||
type MaybeArray<T> = T | T[]; | ||
type BaseBodyAttr = BaseBodyAttributes; | ||
type BaseHtmlAttr = HtmlAttributes$1; | ||
interface BodyAttr extends Omit<BaseBodyAttr, 'class'> { | ||
/** | ||
* The class global attribute is a space-separated list of the case-sensitive classes of the element. | ||
* | ||
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/class | ||
*/ | ||
class?: MaybeArray<string> | Record<string, boolean>; | ||
} | ||
interface HtmlAttr extends Omit<HtmlAttributes$1, 'class'> { | ||
/** | ||
* The class global attribute is a space-separated list of the case-sensitive classes of the element. | ||
* | ||
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/class | ||
*/ | ||
class?: MaybeArray<string> | Record<string, boolean>; | ||
} | ||
interface BaseMeta extends Omit<Meta$1, 'content'> { | ||
/** | ||
* This attribute contains the value for the http-equiv, name or property attribute, depending on which is used. | ||
* | ||
* You can provide an array of values to create multiple tags sharing the same name, property or http-equiv. | ||
* | ||
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-content | ||
*/ | ||
content?: MaybeArray<Stringable> | null; | ||
} | ||
type EntryAugmentation = undefined | Record<string, any>; | ||
type MaybeFunctionEntries<T> = { | ||
[key in keyof T]?: T[key] | ((e: Event) => void); | ||
}; | ||
type TitleTemplateResolver = string | ((title?: string) => string | null); | ||
type Title = string | FalsyEntries<({ | ||
textContent: string; | ||
} & SchemaAugmentations['title']) | null>; | ||
type TitleTemplate = TitleTemplateResolver | null | ({ | ||
textContent: TitleTemplateResolver; | ||
} & SchemaAugmentations['titleTemplate']); | ||
type Base<E extends EntryAugmentation = Record<string, any>> = Partial<Merge<SchemaAugmentations['base'], FalsyEntries<Base$1>>> & DefinedValueOrEmptyObject<E>; | ||
type Link<E extends EntryAugmentation = Record<string, any>> = FalsyEntries<LinkBase> & MaybeFunctionEntries<HttpEventAttributes> & DataKeys & SchemaAugmentations['link'] & DefinedValueOrEmptyObject<E>; | ||
type Meta<E extends EntryAugmentation = Record<string, any>> = FalsyEntries<BaseMeta> & DataKeys & SchemaAugmentations['meta'] & DefinedValueOrEmptyObject<E>; | ||
type Style<E extends EntryAugmentation = Record<string, any>> = FalsyEntries<Style$1> & DataKeys & SchemaAugmentations['style'] & DefinedValueOrEmptyObject<E>; | ||
type Script<E extends EntryAugmentation = Record<string, any>> = FalsyEntries<ScriptBase> & MaybeFunctionEntries<HttpEventAttributes> & DataKeys & SchemaAugmentations['script'] & DefinedValueOrEmptyObject<E>; | ||
type Noscript<E extends EntryAugmentation = Record<string, any>> = FalsyEntries<Noscript$1> & DataKeys & SchemaAugmentations['noscript'] & DefinedValueOrEmptyObject<E>; | ||
type HtmlAttributes<E extends EntryAugmentation = Record<string, any>> = FalsyEntries<HtmlAttr> & DataKeys & SchemaAugmentations['htmlAttrs'] & DefinedValueOrEmptyObject<E>; | ||
type BodyAttributes<E extends EntryAugmentation = Record<string, any>> = FalsyEntries<BodyAttr> & MaybeFunctionEntries<BodyEvents> & DataKeys & SchemaAugmentations['bodyAttrs'] & DefinedValueOrEmptyObject<E>; | ||
interface HeadUtils { | ||
/** | ||
* Generate the title from a template. | ||
* | ||
* Should include a `%s` placeholder for the title, for example `%s - My Site`. | ||
*/ | ||
titleTemplate?: TitleTemplate; | ||
/** | ||
* Variables used to substitute in the title and meta content. | ||
*/ | ||
templateParams?: TemplateParams; | ||
} | ||
interface Head<E extends MergeHead = SchemaAugmentations> extends HeadUtils { | ||
/** | ||
* The `<title>` HTML element defines the document's title that is shown in a browser's title bar or a page's tab. | ||
* It only contains text; tags within the element are ignored. | ||
* | ||
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/title | ||
*/ | ||
title?: Title; | ||
/** | ||
* The `<base>` HTML element specifies the base URL to use for all relative URLs in a document. | ||
* There can be only one <base> element in a document. | ||
* | ||
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base | ||
*/ | ||
base?: Base<E['base']>; | ||
/** | ||
* The `<link>` HTML element specifies relationships between the current document and an external resource. | ||
* This element is most commonly used to link to stylesheets, but is also used to establish site icons | ||
* (both "favicon" style icons and icons for the home screen and apps on mobile devices) among other things. | ||
* | ||
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link#attr-as | ||
*/ | ||
link?: Link<E['link']>[]; | ||
/** | ||
* The `<meta>` element represents metadata that cannot be expressed in other HTML elements, like `<link>` or `<script>`. | ||
* | ||
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta | ||
*/ | ||
meta?: Meta<E['meta']>[]; | ||
/** | ||
* The `<style>` HTML element contains style information for a document, or part of a document. | ||
* It contains CSS, which is applied to the contents of the document containing the `<style>` element. | ||
* | ||
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/style | ||
*/ | ||
style?: (Style<E['style']> | string)[]; | ||
/** | ||
* The `<script>` HTML element is used to embed executable code or data; this is typically used to embed or refer to JavaScript code. | ||
* | ||
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script | ||
*/ | ||
script?: (Script<E['script']> | string)[]; | ||
/** | ||
* The `<noscript>` HTML element defines a section of HTML to be inserted if a script type on the page is unsupported | ||
* or if scripting is currently turned off in the browser. | ||
* | ||
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/noscript | ||
*/ | ||
noscript?: (Noscript<E['noscript']> | string)[]; | ||
/** | ||
* Attributes for the `<html>` HTML element. | ||
* | ||
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/html | ||
*/ | ||
htmlAttrs?: HtmlAttributes<E['htmlAttrs']>; | ||
/** | ||
* Attributes for the `<body>` HTML element. | ||
* | ||
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/body | ||
*/ | ||
bodyAttrs?: BodyAttributes<E['bodyAttrs']>; | ||
} | ||
type UseSeoMetaInput = MetaFlatInput & { | ||
title?: Title; | ||
titleTemplate?: TitleTemplate; | ||
}; | ||
interface ResolvesDuplicates { | ||
/** | ||
* By default, tags which share the same unique key `name`, `property` are de-duped. To allow duplicates | ||
* to be made you can provide a unique key for each entry. | ||
*/ | ||
key?: string; | ||
/** | ||
* The strategy to use when a duplicate tag is encountered. | ||
* | ||
* - `replace` - Replace the existing tag with the new tag | ||
* - `merge` - Merge the existing tag with the new tag | ||
* | ||
* @default 'replace' (some tags will default to 'merge', such as htmlAttr) | ||
*/ | ||
tagDuplicateStrategy?: 'replace' | 'merge'; | ||
/** | ||
* @deprecated Use `key` instead | ||
*/ | ||
hid?: string; | ||
/** | ||
* @deprecated Use `key` instead | ||
*/ | ||
vmid?: string; | ||
} | ||
type ValidTagPositions = 'head' | 'bodyClose' | 'bodyOpen'; | ||
interface TagPosition { | ||
/** | ||
* Specify where to render the tag. | ||
* | ||
* @default 'head' | ||
*/ | ||
tagPosition?: ValidTagPositions; | ||
} | ||
type InnerContentVal = string | Record<string, any>; | ||
interface InnerContent { | ||
/** | ||
* Text content of the tag. | ||
* | ||
* Warning: This is not safe for XSS. Do not use this with user input, use `textContent` instead. | ||
*/ | ||
innerHTML?: InnerContentVal; | ||
/** | ||
* Sets the textContent of an element. Safer for XSS. | ||
*/ | ||
textContent?: InnerContentVal; | ||
/** | ||
* Sets the textContent of an element. | ||
* | ||
* @deprecated Use `textContent` or `innerHTML`. | ||
*/ | ||
children?: InnerContentVal; | ||
} | ||
interface TagPriority { | ||
/** | ||
* The priority for rendering the tag, without this all tags are rendered as they are registered | ||
* (besides some special tags). | ||
* | ||
* The following special tags have default priorities: | ||
* -2 `<meta charset ...>` | ||
* -1 `<base>` | ||
* 0 `<meta http-equiv="content-security-policy" ...>` | ||
* | ||
* All other tags have a default priority of 10: `<meta>`, `<script>`, `<link>`, `<style>`, etc | ||
*/ | ||
tagPriority?: number | 'critical' | 'high' | 'low' | `before:${string}` | `after:${string}`; | ||
} | ||
type TagUserProperties = FalsyEntries<TagPriority & TagPosition & InnerContent & ResolvesDuplicates & ProcessesTemplateParams>; | ||
type TagKey = keyof Head; | ||
type TemplateParams = { | ||
separator?: '|' | '-' | '·' | string; | ||
} & Record<string, null | string | Record<string, string>>; | ||
interface ProcessesTemplateParams { | ||
processTemplateParams?: boolean; | ||
} | ||
interface HasTemplateParams { | ||
templateParams?: TemplateParams; | ||
} | ||
interface HeadTag extends TagPriority, TagPosition, ResolvesDuplicates, HasTemplateParams { | ||
tag: TagKey; | ||
props: Record<string, string>; | ||
processTemplateParams?: boolean; | ||
innerHTML?: string; | ||
textContent?: string; | ||
/** | ||
* Entry ID | ||
* @internal | ||
*/ | ||
_e?: number; | ||
/** | ||
* Position | ||
* @internal | ||
*/ | ||
_p?: number; | ||
/** | ||
* Dedupe key | ||
* @internal | ||
*/ | ||
_d?: string; | ||
/** | ||
* Hash code used to represent the tag. | ||
* @internal | ||
*/ | ||
_h?: string; | ||
/** | ||
* @internal | ||
*/ | ||
_m?: RuntimeMode; | ||
/** | ||
* @internal | ||
*/ | ||
_eventHandlers?: Record<string, ((e: Event) => {})>; | ||
} | ||
type HeadTagKeys = (keyof HeadTag)[]; | ||
type HookResult = Promise<void> | void; | ||
@@ -209,2 +473,6 @@ interface SSRHeadPayload { | ||
*/ | ||
_domDebouncedUpdatePromise?: Promise<void>; | ||
/** | ||
* @internal | ||
*/ | ||
dirty: boolean; | ||
@@ -230,265 +498,2 @@ /** | ||
interface ResolvesDuplicates { | ||
/** | ||
* By default, tags which share the same unique key `name`, `property` are de-duped. To allow duplicates | ||
* to be made you can provide a unique key for each entry. | ||
*/ | ||
key?: string; | ||
/** | ||
* The strategy to use when a duplicate tag is encountered. | ||
* | ||
* - `replace` - Replace the existing tag with the new tag | ||
* - `merge` - Merge the existing tag with the new tag | ||
* | ||
* @default 'replace' (some tags will default to 'merge', such as htmlAttr) | ||
*/ | ||
tagDuplicateStrategy?: 'replace' | 'merge'; | ||
/** | ||
* @deprecated Use `key` instead | ||
*/ | ||
hid?: string; | ||
/** | ||
* @deprecated Use `key` instead | ||
*/ | ||
vmid?: string; | ||
} | ||
type ValidTagPositions = 'head' | 'bodyClose' | 'bodyOpen'; | ||
interface TagPosition { | ||
/** | ||
* Specify where to render the tag. | ||
* | ||
* @default 'head' | ||
*/ | ||
tagPosition?: ValidTagPositions; | ||
} | ||
type InnerContentVal = string | Record<string, any>; | ||
interface InnerContent { | ||
/** | ||
* Text content of the tag. | ||
* | ||
* Warning: This is not safe for XSS. Do not use this with user input, use `textContent` instead. | ||
*/ | ||
innerHTML?: InnerContentVal; | ||
/** | ||
* Sets the textContent of an element. Safer for XSS. | ||
*/ | ||
textContent?: InnerContentVal; | ||
/** | ||
* Sets the textContent of an element. | ||
* | ||
* @deprecated Use `textContent` or `innerHTML`. | ||
*/ | ||
children?: InnerContentVal; | ||
} | ||
interface TagPriority { | ||
/** | ||
* The priority for rendering the tag, without this all tags are rendered as they are registered | ||
* (besides some special tags). | ||
* | ||
* The following special tags have default priorities: | ||
* -2 `<meta charset ...>` | ||
* -1 `<base>` | ||
* 0 `<meta http-equiv="content-security-policy" ...>` | ||
* | ||
* All other tags have a default priority of 10: `<meta>`, `<script>`, `<link>`, `<style>`, etc | ||
*/ | ||
tagPriority?: number | 'critical' | 'high' | 'low' | `before:${string}` | `after:${string}`; | ||
} | ||
type TagUserProperties = TagPriority & TagPosition & MaybePromiseProps<InnerContent> & ResolvesDuplicates & ProcessesTemplateParams; | ||
type TagKey = keyof Head; | ||
type TemplateParams = { | ||
separator?: '|' | '-' | '·' | string; | ||
} & Record<string, null | string | Record<string, string>>; | ||
interface ProcessesTemplateParams { | ||
processTemplateParams?: boolean; | ||
} | ||
interface HasTemplateParams { | ||
templateParams?: TemplateParams; | ||
} | ||
interface HeadTag extends TagPriority, TagPosition, ResolvesDuplicates, HasTemplateParams { | ||
tag: TagKey; | ||
props: Record<string, string>; | ||
processTemplateParams?: boolean; | ||
innerHTML?: string; | ||
textContent?: string; | ||
/** | ||
* Entry ID | ||
* @internal | ||
*/ | ||
_e?: number; | ||
/** | ||
* Position | ||
* @internal | ||
*/ | ||
_p?: number; | ||
/** | ||
* Dedupe key | ||
* @internal | ||
*/ | ||
_d?: string; | ||
/** | ||
* Hash code used to represent the tag. | ||
* @internal | ||
*/ | ||
_h?: string; | ||
/** | ||
* @internal | ||
*/ | ||
_m?: RuntimeMode; | ||
/** | ||
* @internal | ||
*/ | ||
_eventHandlers?: Record<string, ((e: Event) => {})>; | ||
} | ||
type HeadTagKeys = (keyof HeadTag)[]; | ||
type Never<T> = { | ||
[P in keyof T]?: never; | ||
}; | ||
type MaybePromiseOrFalseProps<T> = { | ||
[key in keyof T]?: T[key] | Promise<T[key]> | false; | ||
}; | ||
type UserTagConfigWithoutInnerContent = TagPriority & TagPosition & ResolvesDuplicates & Never<InnerContent> & { | ||
processTemplateParams?: false; | ||
}; | ||
type UserAttributesConfig = ResolvesDuplicates & TagPriority & Never<InnerContent & TagPosition>; | ||
interface SchemaAugmentations extends MergeHead { | ||
title: TagPriority; | ||
titleTemplate: TagPriority; | ||
base: UserAttributesConfig; | ||
htmlAttrs: UserAttributesConfig; | ||
bodyAttrs: UserAttributesConfig; | ||
link: UserTagConfigWithoutInnerContent; | ||
meta: UserTagConfigWithoutInnerContent; | ||
style: TagUserProperties; | ||
script: TagUserProperties; | ||
noscript: TagUserProperties; | ||
} | ||
type MaybeArray<T> = T | T[]; | ||
type BaseBodyAttr = BaseBodyAttributes; | ||
type BaseHtmlAttr = HtmlAttributes$1; | ||
interface BodyAttr extends Omit<BaseBodyAttr, 'class'> { | ||
/** | ||
* The class global attribute is a space-separated list of the case-sensitive classes of the element. | ||
* | ||
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/class | ||
*/ | ||
class?: MaybeArray<string> | Record<string, boolean>; | ||
} | ||
interface HtmlAttr extends Omit<HtmlAttributes$1, 'class'> { | ||
/** | ||
* The class global attribute is a space-separated list of the case-sensitive classes of the element. | ||
* | ||
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/class | ||
*/ | ||
class?: MaybeArray<string> | Record<string, boolean>; | ||
} | ||
interface BaseMeta extends Omit<Meta$1, 'content'> { | ||
/** | ||
* This attribute contains the value for the http-equiv, name or property attribute, depending on which is used. | ||
* | ||
* You can provide an array of values to create multiple tags sharing the same name, property or http-equiv. | ||
* | ||
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-content | ||
*/ | ||
content?: MaybeArray<Stringable> | null; | ||
} | ||
type EntryAugmentation = undefined | Record<string, any>; | ||
type MaybeFunctionEntries<T> = { | ||
[key in keyof T]?: T[key] | ((e: Event) => void); | ||
}; | ||
type TitleTemplateResolver = string | ((title?: string) => string | null); | ||
type Title = string | MaybePromiseOrFalseProps<({ | ||
textContent: string; | ||
} & SchemaAugmentations['title']) | null>; | ||
type TitleTemplate = TitleTemplateResolver | null | ({ | ||
textContent: TitleTemplateResolver; | ||
} & SchemaAugmentations['titleTemplate']); | ||
type Base<E extends EntryAugmentation = Record<string, any>> = Partial<Merge<SchemaAugmentations['base'], MaybePromiseOrFalseProps<Base$1>>> & DefinedValueOrEmptyObject<E>; | ||
type Link<E extends EntryAugmentation = Record<string, any>> = MaybePromiseOrFalseProps<LinkBase> & MaybeFunctionEntries<HttpEventAttributes> & DataKeys & SchemaAugmentations['link'] & DefinedValueOrEmptyObject<E>; | ||
type Meta<E extends EntryAugmentation = Record<string, any>> = MaybePromiseOrFalseProps<BaseMeta> & DataKeys & SchemaAugmentations['meta'] & DefinedValueOrEmptyObject<E>; | ||
type Style<E extends EntryAugmentation = Record<string, any>> = MaybePromiseOrFalseProps<Style$1> & DataKeys & SchemaAugmentations['style'] & DefinedValueOrEmptyObject<E>; | ||
type Script<E extends EntryAugmentation = Record<string, any>> = MaybePromiseOrFalseProps<ScriptBase> & MaybeFunctionEntries<HttpEventAttributes> & DataKeys & SchemaAugmentations['script'] & DefinedValueOrEmptyObject<E>; | ||
type Noscript<E extends EntryAugmentation = Record<string, any>> = MaybePromiseOrFalseProps<Noscript$1> & DataKeys & SchemaAugmentations['noscript'] & DefinedValueOrEmptyObject<E>; | ||
type HtmlAttributes<E extends EntryAugmentation = Record<string, any>> = MaybePromiseOrFalseProps<HtmlAttr> & DataKeys & SchemaAugmentations['htmlAttrs'] & DefinedValueOrEmptyObject<E>; | ||
type BodyAttributes<E extends EntryAugmentation = Record<string, any>> = MaybePromiseOrFalseProps<BodyAttr> & MaybeFunctionEntries<BodyEvents> & DataKeys & SchemaAugmentations['bodyAttrs'] & DefinedValueOrEmptyObject<E>; | ||
interface HeadUtils { | ||
/** | ||
* Generate the title from a template. | ||
* | ||
* Should include a `%s` placeholder for the title, for example `%s - My Site`. | ||
*/ | ||
titleTemplate?: TitleTemplate; | ||
/** | ||
* Variables used to substitute in the title and meta content. | ||
*/ | ||
templateParams?: TemplateParams; | ||
} | ||
interface Head<E extends MergeHead = SchemaAugmentations> extends HeadUtils { | ||
/** | ||
* The `<title>` HTML element defines the document's title that is shown in a browser's title bar or a page's tab. | ||
* It only contains text; tags within the element are ignored. | ||
* | ||
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/title | ||
*/ | ||
title?: Title | Promise<Title>; | ||
/** | ||
* The `<base>` HTML element specifies the base URL to use for all relative URLs in a document. | ||
* There can be only one <base> element in a document. | ||
* | ||
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base | ||
*/ | ||
base?: Base<E['base']>; | ||
/** | ||
* The `<link>` HTML element specifies relationships between the current document and an external resource. | ||
* This element is most commonly used to link to stylesheets, but is also used to establish site icons | ||
* (both "favicon" style icons and icons for the home screen and apps on mobile devices) among other things. | ||
* | ||
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link#attr-as | ||
*/ | ||
link?: Link<E['link']>[]; | ||
/** | ||
* The `<meta>` element represents metadata that cannot be expressed in other HTML elements, like `<link>` or `<script>`. | ||
* | ||
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta | ||
*/ | ||
meta?: Meta<E['meta']>[]; | ||
/** | ||
* The `<style>` HTML element contains style information for a document, or part of a document. | ||
* It contains CSS, which is applied to the contents of the document containing the `<style>` element. | ||
* | ||
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/style | ||
*/ | ||
style?: (Style<E['style']> | string)[]; | ||
/** | ||
* The `<script>` HTML element is used to embed executable code or data; this is typically used to embed or refer to JavaScript code. | ||
* | ||
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script | ||
*/ | ||
script?: (Script<E['script']> | string)[]; | ||
/** | ||
* The `<noscript>` HTML element defines a section of HTML to be inserted if a script type on the page is unsupported | ||
* or if scripting is currently turned off in the browser. | ||
* | ||
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/noscript | ||
*/ | ||
noscript?: (Noscript<E['noscript']> | string)[]; | ||
/** | ||
* Attributes for the `<html>` HTML element. | ||
* | ||
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/html | ||
*/ | ||
htmlAttrs?: HtmlAttributes<E['htmlAttrs']>; | ||
/** | ||
* Attributes for the `<body>` HTML element. | ||
* | ||
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/body | ||
*/ | ||
bodyAttrs?: BodyAttributes<E['bodyAttrs']>; | ||
} | ||
type UseSeoMetaInput = MetaFlatInput & { | ||
title?: Title; | ||
titleTemplate?: TitleTemplate; | ||
}; | ||
type SafeBodyAttr = Pick<BodyAttr, 'id' | 'class'> & DataKeys; | ||
@@ -591,2 +596,2 @@ type SafeHtmlAttr = Pick<HtmlAttr, 'id' | 'class' | 'lang' | 'dir'> & DataKeys; | ||
export type { ActiveHeadEntry, AsAsyncFunctionValues, Base, BaseBodyAttr, BaseHtmlAttr, BaseMeta, BodyAttr, BodyAttributes, CreateHeadOptions, DomBeforeRenderCtx, DomRenderTagContext, DomState, EntryAugmentation, EntryResolveCtx, HasTemplateParams, Head, HeadEntry, HeadEntryOptions, HeadHooks, HeadPlugin, HeadPluginInput, HeadPluginOptions, HeadSafe, HeadTag, HeadTagKeys, HeadUtils, HookResult, HtmlAttr, HtmlAttributes, InnerContent, InnerContentVal, Link, MaybeArray, MaybeFunctionEntries, MaybePromiseOrFalseProps, Meta, Never, Noscript, ProcessesTemplateParams, RenderSSRHeadOptions, ResolvesDuplicates, RuntimeMode, SSRHeadPayload, SSRRenderContext, SafeBodyAttr, SafeHtmlAttr, SafeLink, SafeMeta, SafeNoscript, SafeScript, SchemaAugmentations, Script, ScriptInstance, ShouldRenderContext, SideEffectsRecord, Style, TagKey, TagPosition, TagPriority, TagUserProperties, TemplateParams, Title, TitleTemplate, Unhead, UseFunctionType, UseScriptInput, UseScriptOptions, UseScriptResolvedInput, UseScriptStatus, UseSeoMetaInput, UserAttributesConfig, UserTagConfigWithoutInnerContent, ValidTagPositions }; | ||
export type { ActiveHeadEntry, AsAsyncFunctionValues, Base, BaseBodyAttr, BaseHtmlAttr, BaseMeta, BodyAttr, BodyAttributes, CreateHeadOptions, DomBeforeRenderCtx, DomRenderTagContext, DomState, EntryAugmentation, EntryResolveCtx, HasTemplateParams, Head, HeadEntry, HeadEntryOptions, HeadHooks, HeadPlugin, HeadPluginInput, HeadPluginOptions, HeadSafe, HeadTag, HeadTagKeys, HeadUtils, HookResult, HtmlAttr, HtmlAttributes, InnerContent, InnerContentVal, Link, MaybeArray, MaybeFunctionEntries, Meta, Noscript, ProcessesTemplateParams, RenderSSRHeadOptions, ResolvesDuplicates, RuntimeMode, SSRHeadPayload, SSRRenderContext, SafeBodyAttr, SafeHtmlAttr, SafeLink, SafeMeta, SafeNoscript, SafeScript, SchemaAugmentations, Script, ScriptInstance, ShouldRenderContext, SideEffectsRecord, Style, TagKey, TagPosition, TagPriority, TagUserProperties, TemplateParams, Title, TitleTemplate, Unhead, UseFunctionType, UseScriptInput, UseScriptOptions, UseScriptResolvedInput, UseScriptStatus, UseSeoMetaInput, UserAttributesConfig, UserTagConfigWithoutInnerContent, ValidTagPositions }; |
{ | ||
"name": "@unhead/schema", | ||
"type": "module", | ||
"version": "1.10.4", | ||
"version": "1.11.0-beta.1", | ||
"author": "Harlan Wilton <harlan@harlanzw.com>", | ||
@@ -6,0 +6,0 @@ "license": "MIT", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
597
71593
1