@unhead/schema 1.9.11 → 1.9.13
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/index.d.cts +13 -10
- package/dist/index.d.mts +13 -10
- package/dist/index.d.ts +13 -10
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -343,6 +343,9 @@ type HeadTagKeys = (keyof HeadTag)[];
|
|
|
343
343
|
type Never<T> = {
|
|
344
344
|
[P in keyof T]?: never;
|
|
345
345
|
};
|
|
346
|
+
type MaybePromiseOrFalseProps<T> = {
|
|
347
|
+
[key in keyof T]?: T[key] | Promise<T[key]> | false;
|
|
348
|
+
};
|
|
346
349
|
type UserTagConfigWithoutInnerContent = TagPriority & TagPosition & ResolvesDuplicates & Never<InnerContent> & {
|
|
347
350
|
processTemplateParams?: false;
|
|
348
351
|
};
|
|
@@ -393,20 +396,20 @@ type MaybeFunctionEntries<T> = {
|
|
|
393
396
|
[key in keyof T]?: T[key] | ((e: Event) => void);
|
|
394
397
|
};
|
|
395
398
|
type TitleTemplateResolver = string | ((title?: string) => string | null);
|
|
396
|
-
type Title =
|
|
399
|
+
type Title = string | MaybePromiseOrFalseProps<({
|
|
397
400
|
textContent: string;
|
|
398
401
|
} & SchemaAugmentations['title']) | null>;
|
|
399
402
|
type TitleTemplate = TitleTemplateResolver | null | ({
|
|
400
403
|
textContent: TitleTemplateResolver;
|
|
401
404
|
} & SchemaAugmentations['titleTemplate']);
|
|
402
|
-
type Base<E extends EntryAugmentation = Record<string, any>> = Partial<Merge<SchemaAugmentations['base'],
|
|
403
|
-
type Link<E extends EntryAugmentation = Record<string, any>> =
|
|
404
|
-
type Meta<E extends EntryAugmentation = Record<string, any>> =
|
|
405
|
-
type Style<E extends EntryAugmentation = Record<string, any>> =
|
|
406
|
-
type Script<E extends EntryAugmentation = Record<string, any>> =
|
|
407
|
-
type Noscript<E extends EntryAugmentation = Record<string, any>> =
|
|
408
|
-
type HtmlAttributes<E extends EntryAugmentation = Record<string, any>> =
|
|
409
|
-
type BodyAttributes<E extends EntryAugmentation = Record<string, any>> =
|
|
405
|
+
type Base<E extends EntryAugmentation = Record<string, any>> = Partial<Merge<SchemaAugmentations['base'], MaybePromiseOrFalseProps<Base$1>>> & DefinedValueOrEmptyObject<E>;
|
|
406
|
+
type Link<E extends EntryAugmentation = Record<string, any>> = MaybePromiseOrFalseProps<LinkBase> & MaybeFunctionEntries<HttpEventAttributes> & DataKeys & SchemaAugmentations['link'] & DefinedValueOrEmptyObject<E>;
|
|
407
|
+
type Meta<E extends EntryAugmentation = Record<string, any>> = MaybePromiseOrFalseProps<BaseMeta> & DataKeys & SchemaAugmentations['meta'] & DefinedValueOrEmptyObject<E>;
|
|
408
|
+
type Style<E extends EntryAugmentation = Record<string, any>> = MaybePromiseOrFalseProps<Style$1> & DataKeys & SchemaAugmentations['style'] & DefinedValueOrEmptyObject<E>;
|
|
409
|
+
type Script<E extends EntryAugmentation = Record<string, any>> = MaybePromiseOrFalseProps<ScriptBase> & MaybeFunctionEntries<HttpEventAttributes> & DataKeys & SchemaAugmentations['script'] & DefinedValueOrEmptyObject<E>;
|
|
410
|
+
type Noscript<E extends EntryAugmentation = Record<string, any>> = MaybePromiseOrFalseProps<Noscript$1> & DataKeys & SchemaAugmentations['noscript'] & DefinedValueOrEmptyObject<E>;
|
|
411
|
+
type HtmlAttributes<E extends EntryAugmentation = Record<string, any>> = MaybePromiseOrFalseProps<HtmlAttr> & DataKeys & SchemaAugmentations['htmlAttrs'] & DefinedValueOrEmptyObject<E>;
|
|
412
|
+
type BodyAttributes<E extends EntryAugmentation = Record<string, any>> = MaybePromiseOrFalseProps<BodyAttr> & MaybeFunctionEntries<BodyEvents> & DataKeys & SchemaAugmentations['bodyAttrs'] & DefinedValueOrEmptyObject<E>;
|
|
410
413
|
interface HeadUtils {
|
|
411
414
|
/**
|
|
412
415
|
* Generate the title from a template.
|
|
@@ -556,4 +559,4 @@ interface UseScriptOptions<T> extends HeadEntryOptions {
|
|
|
556
559
|
beforeInit?: () => void;
|
|
557
560
|
}
|
|
558
561
|
|
|
559
|
-
export type { ActiveHeadEntry, 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, 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, UseScriptInput, UseScriptOptions, UseScriptResolvedInput, UseScriptStatus, UseSeoMetaInput, UserAttributesConfig, UserTagConfigWithoutInnerContent, ValidTagPositions };
|
|
562
|
+
export type { ActiveHeadEntry, 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, UseScriptInput, UseScriptOptions, UseScriptResolvedInput, UseScriptStatus, UseSeoMetaInput, UserAttributesConfig, UserTagConfigWithoutInnerContent, ValidTagPositions };
|
package/dist/index.d.mts
CHANGED
|
@@ -343,6 +343,9 @@ type HeadTagKeys = (keyof HeadTag)[];
|
|
|
343
343
|
type Never<T> = {
|
|
344
344
|
[P in keyof T]?: never;
|
|
345
345
|
};
|
|
346
|
+
type MaybePromiseOrFalseProps<T> = {
|
|
347
|
+
[key in keyof T]?: T[key] | Promise<T[key]> | false;
|
|
348
|
+
};
|
|
346
349
|
type UserTagConfigWithoutInnerContent = TagPriority & TagPosition & ResolvesDuplicates & Never<InnerContent> & {
|
|
347
350
|
processTemplateParams?: false;
|
|
348
351
|
};
|
|
@@ -393,20 +396,20 @@ type MaybeFunctionEntries<T> = {
|
|
|
393
396
|
[key in keyof T]?: T[key] | ((e: Event) => void);
|
|
394
397
|
};
|
|
395
398
|
type TitleTemplateResolver = string | ((title?: string) => string | null);
|
|
396
|
-
type Title =
|
|
399
|
+
type Title = string | MaybePromiseOrFalseProps<({
|
|
397
400
|
textContent: string;
|
|
398
401
|
} & SchemaAugmentations['title']) | null>;
|
|
399
402
|
type TitleTemplate = TitleTemplateResolver | null | ({
|
|
400
403
|
textContent: TitleTemplateResolver;
|
|
401
404
|
} & SchemaAugmentations['titleTemplate']);
|
|
402
|
-
type Base<E extends EntryAugmentation = Record<string, any>> = Partial<Merge<SchemaAugmentations['base'],
|
|
403
|
-
type Link<E extends EntryAugmentation = Record<string, any>> =
|
|
404
|
-
type Meta<E extends EntryAugmentation = Record<string, any>> =
|
|
405
|
-
type Style<E extends EntryAugmentation = Record<string, any>> =
|
|
406
|
-
type Script<E extends EntryAugmentation = Record<string, any>> =
|
|
407
|
-
type Noscript<E extends EntryAugmentation = Record<string, any>> =
|
|
408
|
-
type HtmlAttributes<E extends EntryAugmentation = Record<string, any>> =
|
|
409
|
-
type BodyAttributes<E extends EntryAugmentation = Record<string, any>> =
|
|
405
|
+
type Base<E extends EntryAugmentation = Record<string, any>> = Partial<Merge<SchemaAugmentations['base'], MaybePromiseOrFalseProps<Base$1>>> & DefinedValueOrEmptyObject<E>;
|
|
406
|
+
type Link<E extends EntryAugmentation = Record<string, any>> = MaybePromiseOrFalseProps<LinkBase> & MaybeFunctionEntries<HttpEventAttributes> & DataKeys & SchemaAugmentations['link'] & DefinedValueOrEmptyObject<E>;
|
|
407
|
+
type Meta<E extends EntryAugmentation = Record<string, any>> = MaybePromiseOrFalseProps<BaseMeta> & DataKeys & SchemaAugmentations['meta'] & DefinedValueOrEmptyObject<E>;
|
|
408
|
+
type Style<E extends EntryAugmentation = Record<string, any>> = MaybePromiseOrFalseProps<Style$1> & DataKeys & SchemaAugmentations['style'] & DefinedValueOrEmptyObject<E>;
|
|
409
|
+
type Script<E extends EntryAugmentation = Record<string, any>> = MaybePromiseOrFalseProps<ScriptBase> & MaybeFunctionEntries<HttpEventAttributes> & DataKeys & SchemaAugmentations['script'] & DefinedValueOrEmptyObject<E>;
|
|
410
|
+
type Noscript<E extends EntryAugmentation = Record<string, any>> = MaybePromiseOrFalseProps<Noscript$1> & DataKeys & SchemaAugmentations['noscript'] & DefinedValueOrEmptyObject<E>;
|
|
411
|
+
type HtmlAttributes<E extends EntryAugmentation = Record<string, any>> = MaybePromiseOrFalseProps<HtmlAttr> & DataKeys & SchemaAugmentations['htmlAttrs'] & DefinedValueOrEmptyObject<E>;
|
|
412
|
+
type BodyAttributes<E extends EntryAugmentation = Record<string, any>> = MaybePromiseOrFalseProps<BodyAttr> & MaybeFunctionEntries<BodyEvents> & DataKeys & SchemaAugmentations['bodyAttrs'] & DefinedValueOrEmptyObject<E>;
|
|
410
413
|
interface HeadUtils {
|
|
411
414
|
/**
|
|
412
415
|
* Generate the title from a template.
|
|
@@ -556,4 +559,4 @@ interface UseScriptOptions<T> extends HeadEntryOptions {
|
|
|
556
559
|
beforeInit?: () => void;
|
|
557
560
|
}
|
|
558
561
|
|
|
559
|
-
export type { ActiveHeadEntry, 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, 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, UseScriptInput, UseScriptOptions, UseScriptResolvedInput, UseScriptStatus, UseSeoMetaInput, UserAttributesConfig, UserTagConfigWithoutInnerContent, ValidTagPositions };
|
|
562
|
+
export type { ActiveHeadEntry, 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, UseScriptInput, UseScriptOptions, UseScriptResolvedInput, UseScriptStatus, UseSeoMetaInput, UserAttributesConfig, UserTagConfigWithoutInnerContent, ValidTagPositions };
|
package/dist/index.d.ts
CHANGED
|
@@ -343,6 +343,9 @@ type HeadTagKeys = (keyof HeadTag)[];
|
|
|
343
343
|
type Never<T> = {
|
|
344
344
|
[P in keyof T]?: never;
|
|
345
345
|
};
|
|
346
|
+
type MaybePromiseOrFalseProps<T> = {
|
|
347
|
+
[key in keyof T]?: T[key] | Promise<T[key]> | false;
|
|
348
|
+
};
|
|
346
349
|
type UserTagConfigWithoutInnerContent = TagPriority & TagPosition & ResolvesDuplicates & Never<InnerContent> & {
|
|
347
350
|
processTemplateParams?: false;
|
|
348
351
|
};
|
|
@@ -393,20 +396,20 @@ type MaybeFunctionEntries<T> = {
|
|
|
393
396
|
[key in keyof T]?: T[key] | ((e: Event) => void);
|
|
394
397
|
};
|
|
395
398
|
type TitleTemplateResolver = string | ((title?: string) => string | null);
|
|
396
|
-
type Title =
|
|
399
|
+
type Title = string | MaybePromiseOrFalseProps<({
|
|
397
400
|
textContent: string;
|
|
398
401
|
} & SchemaAugmentations['title']) | null>;
|
|
399
402
|
type TitleTemplate = TitleTemplateResolver | null | ({
|
|
400
403
|
textContent: TitleTemplateResolver;
|
|
401
404
|
} & SchemaAugmentations['titleTemplate']);
|
|
402
|
-
type Base<E extends EntryAugmentation = Record<string, any>> = Partial<Merge<SchemaAugmentations['base'],
|
|
403
|
-
type Link<E extends EntryAugmentation = Record<string, any>> =
|
|
404
|
-
type Meta<E extends EntryAugmentation = Record<string, any>> =
|
|
405
|
-
type Style<E extends EntryAugmentation = Record<string, any>> =
|
|
406
|
-
type Script<E extends EntryAugmentation = Record<string, any>> =
|
|
407
|
-
type Noscript<E extends EntryAugmentation = Record<string, any>> =
|
|
408
|
-
type HtmlAttributes<E extends EntryAugmentation = Record<string, any>> =
|
|
409
|
-
type BodyAttributes<E extends EntryAugmentation = Record<string, any>> =
|
|
405
|
+
type Base<E extends EntryAugmentation = Record<string, any>> = Partial<Merge<SchemaAugmentations['base'], MaybePromiseOrFalseProps<Base$1>>> & DefinedValueOrEmptyObject<E>;
|
|
406
|
+
type Link<E extends EntryAugmentation = Record<string, any>> = MaybePromiseOrFalseProps<LinkBase> & MaybeFunctionEntries<HttpEventAttributes> & DataKeys & SchemaAugmentations['link'] & DefinedValueOrEmptyObject<E>;
|
|
407
|
+
type Meta<E extends EntryAugmentation = Record<string, any>> = MaybePromiseOrFalseProps<BaseMeta> & DataKeys & SchemaAugmentations['meta'] & DefinedValueOrEmptyObject<E>;
|
|
408
|
+
type Style<E extends EntryAugmentation = Record<string, any>> = MaybePromiseOrFalseProps<Style$1> & DataKeys & SchemaAugmentations['style'] & DefinedValueOrEmptyObject<E>;
|
|
409
|
+
type Script<E extends EntryAugmentation = Record<string, any>> = MaybePromiseOrFalseProps<ScriptBase> & MaybeFunctionEntries<HttpEventAttributes> & DataKeys & SchemaAugmentations['script'] & DefinedValueOrEmptyObject<E>;
|
|
410
|
+
type Noscript<E extends EntryAugmentation = Record<string, any>> = MaybePromiseOrFalseProps<Noscript$1> & DataKeys & SchemaAugmentations['noscript'] & DefinedValueOrEmptyObject<E>;
|
|
411
|
+
type HtmlAttributes<E extends EntryAugmentation = Record<string, any>> = MaybePromiseOrFalseProps<HtmlAttr> & DataKeys & SchemaAugmentations['htmlAttrs'] & DefinedValueOrEmptyObject<E>;
|
|
412
|
+
type BodyAttributes<E extends EntryAugmentation = Record<string, any>> = MaybePromiseOrFalseProps<BodyAttr> & MaybeFunctionEntries<BodyEvents> & DataKeys & SchemaAugmentations['bodyAttrs'] & DefinedValueOrEmptyObject<E>;
|
|
410
413
|
interface HeadUtils {
|
|
411
414
|
/**
|
|
412
415
|
* Generate the title from a template.
|
|
@@ -556,4 +559,4 @@ interface UseScriptOptions<T> extends HeadEntryOptions {
|
|
|
556
559
|
beforeInit?: () => void;
|
|
557
560
|
}
|
|
558
561
|
|
|
559
|
-
export type { ActiveHeadEntry, 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, 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, UseScriptInput, UseScriptOptions, UseScriptResolvedInput, UseScriptStatus, UseSeoMetaInput, UserAttributesConfig, UserTagConfigWithoutInnerContent, ValidTagPositions };
|
|
562
|
+
export type { ActiveHeadEntry, 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, UseScriptInput, UseScriptOptions, UseScriptResolvedInput, UseScriptStatus, UseSeoMetaInput, UserAttributesConfig, UserTagConfigWithoutInnerContent, ValidTagPositions };
|