@unhead/schema
Advanced tools
Comparing version 2.0.0-alpha.3 to 2.0.0-alpha.4
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'; | ||
import { MergeHead, BaseBodyAttributes, HtmlAttributes as HtmlAttributes$1, Meta as Meta$1, Stringable, Merge, Base as Base$1, DefinedValueOrEmptyObject, LinkBase, DataKeys, HttpEventAttributes, Style as Style$1, ScriptBase, Noscript as Noscript$1, BodyEvents, MetaFlatInput } from 'zhead'; | ||
export { BodyEvents, DataKeys, DefinedValueOrEmptyObject, MergeHead, MetaFlatInput, ScriptBase, SpeculationRules } from 'zhead'; | ||
@@ -71,9 +71,23 @@ | ||
type Base<E extends EntryAugmentation = Record<string, any>> = Partial<Merge<SchemaAugmentations['base'], ResolvableValues<Base$1>>> & DefinedValueOrEmptyObject<E>; | ||
type Link<E extends EntryAugmentation = Record<string, any>> = ResolvableValues<LinkBase> & MaybeEventFnHandlers<HttpEventAttributes> & DataKeys & SchemaAugmentations['link'] & DefinedValueOrEmptyObject<E>; | ||
type Meta<E extends EntryAugmentation = Record<string, any>> = ResolvableValues<BaseMeta> & DataKeys & SchemaAugmentations['meta'] & DefinedValueOrEmptyObject<E>; | ||
type Style<E extends EntryAugmentation = Record<string, any>> = ResolvableValues<Style$1> & DataKeys & SchemaAugmentations['style'] & DefinedValueOrEmptyObject<E>; | ||
type Script<E extends EntryAugmentation = Record<string, any>> = ResolvableValues<ScriptBase> & MaybeEventFnHandlers<HttpEventAttributes> & DataKeys & SchemaAugmentations['script'] & DefinedValueOrEmptyObject<E>; | ||
type Noscript<E extends EntryAugmentation = Record<string, any>> = ResolvableValues<Noscript$1> & DataKeys & SchemaAugmentations['noscript'] & DefinedValueOrEmptyObject<E>; | ||
type HtmlAttributes<E extends EntryAugmentation = Record<string, any>> = ResolvableValues<HtmlAttr> & DataKeys & SchemaAugmentations['htmlAttrs'] & DefinedValueOrEmptyObject<E>; | ||
type BodyAttributes<E extends EntryAugmentation = Record<string, any>> = ResolvableValues<BodyAttr> & MaybeEventFnHandlers<BodyEvents> & DataKeys & SchemaAugmentations['bodyAttrs'] & DefinedValueOrEmptyObject<E>; | ||
type Link<E extends EntryAugmentation = Record<string, any>> = ResolvableValues<LinkBase & DataKeys> & MaybeEventFnHandlers<HttpEventAttributes> & SchemaAugmentations['link'] & DefinedValueOrEmptyObject<E>; | ||
type Meta<E extends EntryAugmentation = Record<string, any>> = ResolvableValues<BaseMeta & DataKeys> & SchemaAugmentations['meta'] & DefinedValueOrEmptyObject<E>; | ||
type Style<E extends EntryAugmentation = Record<string, any>> = ResolvableValues<Style$1 & DataKeys> & SchemaAugmentations['style'] & DefinedValueOrEmptyObject<E>; | ||
type Script<E extends EntryAugmentation = Record<string, any>> = ResolvableValues<ScriptBase & DataKeys> & MaybeEventFnHandlers<HttpEventAttributes> & SchemaAugmentations['script'] & DefinedValueOrEmptyObject<E>; | ||
type Noscript<E extends EntryAugmentation = Record<string, any>> = ResolvableValues<Noscript$1 & DataKeys> & SchemaAugmentations['noscript'] & DefinedValueOrEmptyObject<E>; | ||
type HtmlAttributes<E extends EntryAugmentation = Record<string, any>> = ResolvableValues<HtmlAttr & DataKeys> & SchemaAugmentations['htmlAttrs'] & DefinedValueOrEmptyObject<E>; | ||
type BodyAttributes<E extends EntryAugmentation = Record<string, any>> = ResolvableValues<BodyAttr & DataKeys> & MaybeEventFnHandlers<BodyEvents> & SchemaAugmentations['bodyAttrs'] & DefinedValueOrEmptyObject<E>; | ||
type ResolvedTitle = ({ | ||
textContent: string; | ||
} & SchemaAugmentations['title']); | ||
type ResolvedTitleTemplate = TitleTemplateResolver | null | ({ | ||
textContent: TitleTemplateResolver; | ||
} & SchemaAugmentations['titleTemplate']); | ||
type ResolvedBase<E extends EntryAugmentation = Record<string, any>> = Partial<Merge<SchemaAugmentations['base'], Base$1>> & DefinedValueOrEmptyObject<E>; | ||
type ResolvedLink<E extends EntryAugmentation = Record<string, any>> = LinkBase & MaybeEventFnHandlers<HttpEventAttributes> & DataKeys & SchemaAugmentations['link'] & DefinedValueOrEmptyObject<E>; | ||
type ResolvedMeta<E extends EntryAugmentation = Record<string, any>> = BaseMeta & DataKeys & SchemaAugmentations['meta'] & DefinedValueOrEmptyObject<E>; | ||
type ResolvedStyle<E extends EntryAugmentation = Record<string, any>> = Style$1 & DataKeys & SchemaAugmentations['style'] & DefinedValueOrEmptyObject<E>; | ||
type ResolvedScript<E extends EntryAugmentation = Record<string, any>> = ScriptBase & MaybeEventFnHandlers<HttpEventAttributes> & DataKeys & SchemaAugmentations['script'] & DefinedValueOrEmptyObject<E>; | ||
type ResolvedNoscript<E extends EntryAugmentation = Record<string, any>> = Noscript$1 & DataKeys & SchemaAugmentations['noscript'] & DefinedValueOrEmptyObject<E>; | ||
type ResolvedHtmlAttributes<E extends EntryAugmentation = Record<string, any>> = HtmlAttr & DataKeys & SchemaAugmentations['htmlAttrs'] & DefinedValueOrEmptyObject<E>; | ||
type ResolvedBodyAttributes<E extends EntryAugmentation = Record<string, any>> = BodyAttr & MaybeEventFnHandlers<BodyEvents> & DataKeys & SchemaAugmentations['bodyAttrs'] & DefinedValueOrEmptyObject<E>; | ||
interface HeadUtils { | ||
@@ -153,2 +167,13 @@ /** | ||
} | ||
interface ResolvedHead<E extends MergeHead = SchemaAugmentations> extends HeadUtils { | ||
title: ResolvedTitle; | ||
base: ResolvedBase<E['base']>; | ||
link: ResolvedLink<E['link']>[]; | ||
meta: ResolvedMeta<E['meta']>[]; | ||
style: (ResolvedStyle<E['style']> | string)[]; | ||
script: (ResolvedScript<E['script']> | string)[]; | ||
noscript: (ResolvedNoscript<E['noscript']> | string)[]; | ||
htmlAttrs: ResolvedHtmlAttributes<E['htmlAttrs']>; | ||
bodyAttrs: ResolvedBodyAttributes<E['bodyAttrs']>; | ||
} | ||
type UseSeoMetaInput = MetaFlatInput & { | ||
@@ -520,2 +545,2 @@ title?: Title; | ||
export type { ActiveHeadEntry, Base, BaseBodyAttr, BaseHtmlAttr, BaseMeta, BodyAttr, BodyAttributes, CreateClientHeadOptions, CreateHeadOptions, DomBeforeRenderCtx, DomPluginOptions, DomRenderTagContext, DomState, EntryAugmentation, EntryResolveCtx, HasTemplateParams, Head, HeadEntry, HeadEntryOptions, HeadHooks, HeadPlugin, HeadPluginInput, HeadPluginOptions, HeadSafe, HeadTag, HeadTagKeys, HeadUtils, HookResult, HtmlAttr, HtmlAttributes, InnerContent, InnerContentVal, Link, MaybeArray, MaybeEventFnHandlers, Meta, Noscript, ProcessesTemplateParams, RenderDomHeadOptions, RenderSSRHeadOptions, ResolvesDuplicates, RuntimeMode, SSRHeadPayload, SSRRenderContext, SafeBodyAttr, SafeHtmlAttr, SafeLink, SafeMeta, SafeNoscript, SafeScript, SchemaAugmentations, Script, ShouldRenderContext, SideEffectsRecord, Style, TagKey, TagPosition, TagPriority, TagUserProperties, TemplateParams, Title, TitleTemplate, Unhead, UseSeoMetaInput, UserAttributesConfig, UserTagConfigWithoutInnerContent, ValidTagPositions }; | ||
export type { ActiveHeadEntry, Base, BaseBodyAttr, BaseHtmlAttr, BaseMeta, BodyAttr, BodyAttributes, CreateClientHeadOptions, CreateHeadOptions, DomBeforeRenderCtx, DomPluginOptions, DomRenderTagContext, DomState, EntryAugmentation, EntryResolveCtx, HasTemplateParams, Head, HeadEntry, HeadEntryOptions, HeadHooks, HeadPlugin, HeadPluginInput, HeadPluginOptions, HeadSafe, HeadTag, HeadTagKeys, HeadUtils, HookResult, HtmlAttr, HtmlAttributes, InnerContent, InnerContentVal, Link, MaybeArray, MaybeEventFnHandlers, Meta, Noscript, ProcessesTemplateParams, RenderDomHeadOptions, RenderSSRHeadOptions, ResolvedBase, ResolvedBodyAttributes, ResolvedHead, ResolvedHtmlAttributes, ResolvedLink, ResolvedMeta, ResolvedNoscript, ResolvedScript, ResolvedStyle, ResolvedTitle, ResolvedTitleTemplate, ResolvesDuplicates, RuntimeMode, SSRHeadPayload, SSRRenderContext, SafeBodyAttr, SafeHtmlAttr, SafeLink, SafeMeta, SafeNoscript, SafeScript, SchemaAugmentations, Script, ShouldRenderContext, SideEffectsRecord, Style, TagKey, TagPosition, TagPriority, TagUserProperties, TemplateParams, Title, TitleTemplate, Unhead, UseSeoMetaInput, UserAttributesConfig, UserTagConfigWithoutInnerContent, ValidTagPositions }; |
{ | ||
"name": "@unhead/schema", | ||
"type": "module", | ||
"version": "2.0.0-alpha.3", | ||
"version": "2.0.0-alpha.4", | ||
"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
70245
547