@unhead/schema
Advanced tools
Comparing version
@@ -30,2 +30,18 @@ import { NestedHooks, Hookable } from 'hookable'; | ||
} | ||
interface ResolvedSchemaAugmentations extends MergeHead { | ||
title: TagPriority; | ||
titleTemplate: TagPriority; | ||
base: ResolvesDuplicates & TagPriority & Never<InnerContent & TagPosition>; | ||
htmlAttrs: ResolvesDuplicates & TagPriority & Never<InnerContent & TagPosition>; | ||
bodyAttrs: ResolvesDuplicates & TagPriority & Never<InnerContent & TagPosition>; | ||
link: TagPriority & TagPosition & ResolvesDuplicates & Never<InnerContent> & { | ||
processTemplateParams?: false; | ||
}; | ||
meta: TagPriority & TagPosition & ResolvesDuplicates & Never<InnerContent> & { | ||
processTemplateParams?: false; | ||
}; | ||
style: TagPriority & TagPosition & InnerContent & ResolvesDuplicates & ProcessesTemplateParams; | ||
script: TagPriority & TagPosition & InnerContent & ResolvesDuplicates & ProcessesTemplateParams; | ||
noscript: TagPriority & TagPosition & InnerContent & ResolvesDuplicates & ProcessesTemplateParams; | ||
} | ||
type MaybeArray<T> = T | T[]; | ||
@@ -81,14 +97,14 @@ type BaseBodyAttr = BaseBodyAttributes; | ||
textContent: string; | ||
} & SchemaAugmentations['title']); | ||
} & ResolvedSchemaAugmentations['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>; | ||
} & ResolvedSchemaAugmentations['titleTemplate']); | ||
type ResolvedBase<E extends EntryAugmentation = Record<string, any>> = Partial<Merge<ResolvedSchemaAugmentations['base'], Base$1>> & DefinedValueOrEmptyObject<E>; | ||
type ResolvedLink<E extends EntryAugmentation = Record<string, any>> = LinkBase & MaybeEventFnHandlers<HttpEventAttributes> & DataKeys & ResolvedSchemaAugmentations['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>; | ||
type ResolvedStyle<E extends EntryAugmentation = Record<string, any>> = Style$1 & DataKeys & ResolvedSchemaAugmentations['style'] & DefinedValueOrEmptyObject<E>; | ||
type ResolvedScript<E extends EntryAugmentation = Record<string, any>> = ScriptBase & MaybeEventFnHandlers<HttpEventAttributes> & DataKeys & ResolvedSchemaAugmentations['script'] & DefinedValueOrEmptyObject<E>; | ||
type ResolvedNoscript<E extends EntryAugmentation = Record<string, any>> = Noscript$1 & DataKeys & ResolvedSchemaAugmentations['noscript'] & DefinedValueOrEmptyObject<E>; | ||
type ResolvedHtmlAttributes<E extends EntryAugmentation = Record<string, any>> = HtmlAttr & DataKeys & ResolvedSchemaAugmentations['htmlAttrs'] & DefinedValueOrEmptyObject<E>; | ||
type ResolvedBodyAttributes<E extends EntryAugmentation = Record<string, any>> = BodyAttr & MaybeEventFnHandlers<BodyEvents> & DataKeys & ResolvedSchemaAugmentations['bodyAttrs'] & DefinedValueOrEmptyObject<E>; | ||
interface HeadUtils { | ||
@@ -168,3 +184,3 @@ /** | ||
} | ||
interface ResolvedHead<E extends MergeHead = SchemaAugmentations> extends HeadUtils { | ||
interface ResolvedHead<E extends MergeHead = ResolvedSchemaAugmentations> extends HeadUtils { | ||
title: ResolvedTitle; | ||
@@ -546,2 +562,2 @@ base: ResolvedBase<E['base']>; | ||
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 }; | ||
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, ResolvedSchemaAugmentations, 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.5", | ||
"version": "2.0.0-alpha.6", | ||
"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
73356
4.43%563
2.93%