@unhead/vue 2.0.0-alpha.8 → 2.0.0-beta.1
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 +5 -4
- package/dist/client.d.ts +5 -4
- package/dist/client.mjs +9 -12
- package/dist/components.mjs +8 -6
- package/dist/index.d.mts +34 -15
- package/dist/index.d.ts +34 -15
- package/dist/index.mjs +13 -7
- package/dist/legacy.d.mts +27 -45
- package/dist/legacy.d.ts +27 -45
- package/dist/legacy.mjs +36 -93
- package/dist/plugins.d.mts +1 -0
- package/dist/plugins.d.ts +1 -0
- package/dist/plugins.mjs +1 -0
- package/dist/scripts.d.mts +32 -0
- package/dist/scripts.d.ts +32 -0
- package/dist/scripts.mjs +7 -0
- package/dist/server.d.mts +5 -4
- package/dist/server.d.ts +5 -4
- package/dist/server.mjs +7 -9
- package/dist/shared/vue.A6QPXQyg.d.ts +63 -0
- package/dist/shared/vue.BYLJNEcq.mjs +83 -0
- package/dist/shared/vue.C1egIkvG.d.mts +134 -0
- package/dist/shared/vue.C1egIkvG.d.ts +134 -0
- package/dist/shared/vue.Ds_C3mXu.d.mts +63 -0
- package/dist/shared/vue.N9zWjxoK.mjs +7 -0
- package/dist/shared/vue.cHBs6zvy.mjs +70 -0
- package/dist/shared/{vue.CNiRntV8.mjs → vue.nvpYXC6D.mjs} +1 -1
- package/dist/types.d.mts +14 -135
- package/dist/types.d.ts +14 -135
- package/dist/utils.d.mts +11 -0
- package/dist/utils.d.ts +11 -0
- package/dist/utils.mjs +10 -0
- package/package.json +34 -18
- package/plugins.d.ts +1 -0
- package/utils.d.ts +1 -0
- package/dist/client.cjs +0 -36
- package/dist/client.d.cts +0 -8
- package/dist/components.cjs +0 -65
- package/dist/components.d.cts +0 -5
- package/dist/index.cjs +0 -27
- package/dist/index.d.cts +0 -26
- package/dist/legacy.cjs +0 -186
- package/dist/legacy.d.cts +0 -52
- package/dist/server.cjs +0 -33
- package/dist/server.d.cts +0 -8
- package/dist/shared/vue.51u-UkLG.mjs +0 -13
- package/dist/shared/vue.BF-HCrO8.d.cts +0 -3
- package/dist/shared/vue.BF-HCrO8.d.mts +0 -3
- package/dist/shared/vue.BF-HCrO8.d.ts +0 -3
- package/dist/shared/vue.Btxz9wTa.cjs +0 -126
- package/dist/shared/vue.D2UzSD_b.mjs +0 -115
- package/dist/shared/vue.DFf1FJKf.cjs +0 -20
- package/dist/shared/vue.DnywREVF.d.cts +0 -5
- package/dist/shared/vue.rzkVHzqg.cjs +0 -15
- package/dist/types.cjs +0 -2
- package/dist/types.d.cts +0 -137
package/dist/types.d.cts
DELETED
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
import { Falsey, BaseHtmlAttr, MaybeArray, BaseBodyAttr, MaybeFunction, ResolvableValues, SchemaAugmentations, TitleTemplate as TitleTemplate$1, EntryAugmentation, Base as Base$1, DefinedValueOrEmptyObject, LinkBase, DataKeys, MaybeEventFnHandlers, HttpEventAttributes, BaseMeta, Style as Style$1, ScriptBase, Noscript as Noscript$1, BodyEvents, MergeHead, HeadEntryOptions, MetaFlatInput, Unhead, SafeMeta, SafeLink, SafeNoscript, SafeScript, SafeHtmlAttr, SafeBodyAttr } from '@unhead/schema';
|
|
2
|
-
export { ActiveHeadEntry, Head, HeadEntryOptions, HeadTag, MergeHead, ResolvedHead, Unhead } from '@unhead/schema';
|
|
3
|
-
import { ComputedRef, Ref, Plugin } from 'vue';
|
|
4
|
-
|
|
5
|
-
type MaybeComputedRef<T> = T | (() => T) | ComputedRef<T> | Ref<T>;
|
|
6
|
-
type ResolvableArray<T> = MaybeComputedRef<MaybeComputedRef<T>[]>;
|
|
7
|
-
type ResolvableProperties<T> = {
|
|
8
|
-
[key in keyof T]?: MaybeComputedRef<T[key] | Falsey>;
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
interface HtmlAttr extends Omit<BaseHtmlAttr, 'class'> {
|
|
12
|
-
/**
|
|
13
|
-
* The class global attribute is a space-separated list of the case-sensitive classes of the element.
|
|
14
|
-
*
|
|
15
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/class
|
|
16
|
-
*/
|
|
17
|
-
class?: MaybeArray<MaybeComputedRef<string>> | Record<string, MaybeComputedRef<boolean>>;
|
|
18
|
-
}
|
|
19
|
-
interface BodyAttr extends Omit<BaseBodyAttr, 'class' | 'style'> {
|
|
20
|
-
/**
|
|
21
|
-
* The class global attribute is a space-separated list of the case-sensitive classes of the element.
|
|
22
|
-
*
|
|
23
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/class
|
|
24
|
-
*/
|
|
25
|
-
class?: MaybeArray<MaybeComputedRef<string>> | Record<string, MaybeComputedRef<boolean>>;
|
|
26
|
-
/**
|
|
27
|
-
* The class global attribute is a space-separated list of the case-sensitive classes of the element.
|
|
28
|
-
*
|
|
29
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/class
|
|
30
|
-
*/
|
|
31
|
-
style?: MaybeArray<MaybeComputedRef<string>> | Record<string, MaybeComputedRef<string | boolean>>;
|
|
32
|
-
}
|
|
33
|
-
type Title = MaybeFunction<number | string | Falsey> | ResolvableValues<({
|
|
34
|
-
textContent: string;
|
|
35
|
-
} & SchemaAugmentations['title'])>;
|
|
36
|
-
type TitleTemplate = TitleTemplate$1 | Ref<TitleTemplate$1> | ((title?: string) => TitleTemplate$1);
|
|
37
|
-
type Base<E extends EntryAugmentation = Record<string, any>> = ResolvableProperties<Base$1 & SchemaAugmentations['base']> & DefinedValueOrEmptyObject<E>;
|
|
38
|
-
type Link<E extends EntryAugmentation = Record<string, any>> = ResolvableProperties<LinkBase & DataKeys & SchemaAugmentations['link']> & MaybeEventFnHandlers<HttpEventAttributes> & DefinedValueOrEmptyObject<E>;
|
|
39
|
-
type Meta<E extends EntryAugmentation = Record<string, any>> = ResolvableProperties<BaseMeta & DataKeys & SchemaAugmentations['meta']> & DefinedValueOrEmptyObject<E>;
|
|
40
|
-
type Style<E extends EntryAugmentation = Record<string, any>> = ResolvableProperties<Style$1 & DataKeys & SchemaAugmentations['style']> & DefinedValueOrEmptyObject<E>;
|
|
41
|
-
type Script<E extends EntryAugmentation = Record<string, any>> = ResolvableProperties<ScriptBase & DataKeys & SchemaAugmentations['script']> & MaybeEventFnHandlers<HttpEventAttributes> & DefinedValueOrEmptyObject<E>;
|
|
42
|
-
type Noscript<E extends EntryAugmentation = Record<string, any>> = ResolvableProperties<Noscript$1 & DataKeys & SchemaAugmentations['noscript']> & DefinedValueOrEmptyObject<E>;
|
|
43
|
-
type HtmlAttributes<E extends EntryAugmentation = Record<string, any>> = ResolvableProperties<HtmlAttr & DataKeys & SchemaAugmentations['htmlAttrs']> & DefinedValueOrEmptyObject<E>;
|
|
44
|
-
type BodyAttributes<E extends EntryAugmentation = Record<string, any>> = ResolvableProperties<BodyAttr & DataKeys & SchemaAugmentations['bodyAttrs']> & MaybeEventFnHandlers<BodyEvents> & DefinedValueOrEmptyObject<E>;
|
|
45
|
-
interface ReactiveHead<E extends MergeHead = MergeHead> {
|
|
46
|
-
/**
|
|
47
|
-
* The `<title>` HTML element defines the document's title that is shown in a browser's title bar or a page's tab.
|
|
48
|
-
* It only contains text; tags within the element are ignored.
|
|
49
|
-
*
|
|
50
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/title
|
|
51
|
-
*/
|
|
52
|
-
title?: Title;
|
|
53
|
-
/**
|
|
54
|
-
* Generate the title from a template.
|
|
55
|
-
*/
|
|
56
|
-
titleTemplate?: TitleTemplate;
|
|
57
|
-
/**
|
|
58
|
-
* Variables used to substitute in the title and meta content.
|
|
59
|
-
*/
|
|
60
|
-
templateParams?: ResolvableArray<{
|
|
61
|
-
separator?: '|' | '-' | '·' | string;
|
|
62
|
-
} & Record<string, null | string | ResolvableArray<Record<string, null | string>>>>;
|
|
63
|
-
/**
|
|
64
|
-
* The `<base>` HTML element specifies the base URL to use for all relative URLs in a document.
|
|
65
|
-
* There can be only one <base> element in a document.
|
|
66
|
-
*
|
|
67
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base
|
|
68
|
-
*/
|
|
69
|
-
base?: Base<E['base']>;
|
|
70
|
-
/**
|
|
71
|
-
* The `<link>` HTML element specifies relationships between the current document and an external resource.
|
|
72
|
-
* This element is most commonly used to link to stylesheets, but is also used to establish site icons
|
|
73
|
-
* (both "favicon" style icons and icons for the home screen and apps on mobile devices) among other things.
|
|
74
|
-
*
|
|
75
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link#attr-as
|
|
76
|
-
*/
|
|
77
|
-
link?: ResolvableArray<Link<E['link']>>;
|
|
78
|
-
/**
|
|
79
|
-
* The `<meta>` element represents metadata that cannot be expressed in other HTML elements, like `<link>` or `<script>`.
|
|
80
|
-
*
|
|
81
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta
|
|
82
|
-
*/
|
|
83
|
-
meta?: ResolvableArray<Meta<E['meta']>>;
|
|
84
|
-
/**
|
|
85
|
-
* The `<style>` HTML element contains style information for a document, or part of a document.
|
|
86
|
-
* It contains CSS, which is applied to the contents of the document containing the `<style>` element.
|
|
87
|
-
*
|
|
88
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/style
|
|
89
|
-
*/
|
|
90
|
-
style?: ResolvableArray<(Style<E['style']> | string)>;
|
|
91
|
-
/**
|
|
92
|
-
* The `<script>` HTML element is used to embed executable code or data; this is typically used to embed or refer to JavaScript code.
|
|
93
|
-
*
|
|
94
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script
|
|
95
|
-
*/
|
|
96
|
-
script?: ResolvableArray<(Script<E['script']> | string)>;
|
|
97
|
-
/**
|
|
98
|
-
* The `<noscript>` HTML element defines a section of HTML to be inserted if a script type on the page is unsupported
|
|
99
|
-
* or if scripting is currently turned off in the browser.
|
|
100
|
-
*
|
|
101
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/noscript
|
|
102
|
-
*/
|
|
103
|
-
noscript?: ResolvableArray<(Noscript<E['noscript']> | string)>;
|
|
104
|
-
/**
|
|
105
|
-
* Attributes for the `<html>` HTML element.
|
|
106
|
-
*
|
|
107
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/html
|
|
108
|
-
*/
|
|
109
|
-
htmlAttrs?: HtmlAttributes<E['htmlAttrs']>;
|
|
110
|
-
/**
|
|
111
|
-
* Attributes for the `<body>` HTML element.
|
|
112
|
-
*
|
|
113
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/body
|
|
114
|
-
*/
|
|
115
|
-
bodyAttrs?: BodyAttributes<E['bodyAttrs']>;
|
|
116
|
-
}
|
|
117
|
-
type UseHeadOptions = Omit<HeadEntryOptions, 'head'> & {
|
|
118
|
-
head?: VueHeadClient<any>;
|
|
119
|
-
};
|
|
120
|
-
type UseHeadInput<T extends MergeHead = Record<string, any>> = MaybeComputedRef<ReactiveHead<T>>;
|
|
121
|
-
type UseSeoMetaInput = ResolvableProperties<MetaFlatInput> & {
|
|
122
|
-
title?: ReactiveHead['title'];
|
|
123
|
-
titleTemplate?: ReactiveHead['titleTemplate'];
|
|
124
|
-
};
|
|
125
|
-
type VueHeadClient<T extends MergeHead> = Unhead<MaybeComputedRef<ReactiveHead<T>>> & Plugin;
|
|
126
|
-
|
|
127
|
-
interface HeadSafe extends Pick<ReactiveHead, 'title' | 'titleTemplate' | 'templateParams'> {
|
|
128
|
-
meta?: ResolvableArray<SafeMeta>[];
|
|
129
|
-
link?: ResolvableArray<SafeLink>[];
|
|
130
|
-
noscript?: ResolvableArray<SafeNoscript>[];
|
|
131
|
-
script?: ResolvableArray<SafeScript>[];
|
|
132
|
-
htmlAttrs?: ResolvableArray<SafeHtmlAttr>;
|
|
133
|
-
bodyAttrs?: ResolvableArray<SafeBodyAttr>;
|
|
134
|
-
}
|
|
135
|
-
type UseHeadSafeInput = MaybeComputedRef<HeadSafe>;
|
|
136
|
-
|
|
137
|
-
export type { Base, BodyAttr, BodyAttributes, HeadSafe, HtmlAttr, HtmlAttributes, Link, MaybeComputedRef, Meta, Noscript, ReactiveHead, ResolvableArray, ResolvableProperties, Script, Style, Title, TitleTemplate, UseHeadInput, UseHeadOptions, UseHeadSafeInput, UseSeoMetaInput, VueHeadClient };
|