@unhead/vue 2.0.0-alpha.29 → 2.0.0-alpha.30
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 +1 -1
- package/dist/client.d.ts +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/legacy.d.mts +1 -1
- package/dist/legacy.d.ts +1 -1
- package/dist/scripts.d.mts +3 -3
- package/dist/scripts.d.ts +3 -3
- package/dist/server.d.mts +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/shared/{vue.aRqASu2a.d.mts → vue.C1egIkvG.d.mts} +24 -24
- package/dist/shared/{vue.aRqASu2a.d.ts → vue.C1egIkvG.d.ts} +24 -24
- package/dist/types.d.mts +10 -10
- package/dist/types.d.ts +10 -10
- package/package.json +2 -2
package/dist/client.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CreateClientHeadOptions } from 'unhead/types';
|
|
2
2
|
export { V as VueHeadMixin } from './shared/vue.DnywREVF.mjs';
|
|
3
3
|
export { renderDOMHead } from 'unhead/client';
|
|
4
|
-
import { V as VueHeadClient } from './shared/vue.
|
|
4
|
+
import { V as VueHeadClient } from './shared/vue.C1egIkvG.mjs';
|
|
5
5
|
import 'vue';
|
|
6
6
|
|
|
7
7
|
declare function createHead(options?: CreateClientHeadOptions): VueHeadClient;
|
package/dist/client.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CreateClientHeadOptions } from 'unhead/types';
|
|
2
2
|
export { V as VueHeadMixin } from './shared/vue.DnywREVF.js';
|
|
3
3
|
export { renderDOMHead } from 'unhead/client';
|
|
4
|
-
import { V as VueHeadClient } from './shared/vue.
|
|
4
|
+
import { V as VueHeadClient } from './shared/vue.C1egIkvG.js';
|
|
5
5
|
import 'vue';
|
|
6
6
|
|
|
7
7
|
declare function createHead(options?: CreateClientHeadOptions): VueHeadClient;
|
package/dist/index.d.mts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { createUnhead } from 'unhead';
|
|
2
2
|
export { createUnhead } from 'unhead';
|
|
3
3
|
import { ActiveHeadEntry } from 'unhead/types';
|
|
4
|
-
export { ActiveHeadEntry, Head, HeadEntryOptions, HeadTag, MergeHead, MetaFlatInput, RenderSSRHeadOptions, ResolvableHead,
|
|
5
|
-
import { V as VueHeadClient, U as UseHeadInput, a as UseHeadOptions, b as UseSeoMetaInput } from './shared/vue.
|
|
6
|
-
export {
|
|
4
|
+
export { ActiveHeadEntry, AriaAttributes, Base, BodyAttributesWithoutEvents, BodyEvents, DataKeys, GlobalAttributes, Head, HeadEntryOptions, HeadTag, HtmlAttributes, HttpEventAttributes, LinkWithoutEvents, MergeHead, Meta, MetaFlat, MetaFlatInput, Noscript, RenderSSRHeadOptions, ResolvableHead, ScriptWithoutEvents, SerializableResolvedHead, SpeculationRules, Style, Unhead } from 'unhead/types';
|
|
5
|
+
import { V as VueHeadClient, U as UseHeadInput, a as UseHeadOptions, b as UseSeoMetaInput } from './shared/vue.C1egIkvG.mjs';
|
|
6
|
+
export { B as BodyAttr, H as HtmlAttr, M as MaybeFalsy, l as ReactiveHead, n as ResolvableArray, d as ResolvableBase, k as ResolvableBodyAttributes, j as ResolvableHtmlAttributes, e as ResolvableLink, f as ResolvableMeta, i as ResolvableNoscript, o as ResolvableProperties, h as ResolvableScript, g as ResolvableStyle, R as ResolvableTitle, c as ResolvableTitleTemplate, m as ResolvableValue } from './shared/vue.C1egIkvG.mjs';
|
|
7
7
|
import { UseHeadSafeInput } from './types.mjs';
|
|
8
8
|
export { HeadSafe, SafeBodyAttr, SafeHtmlAttr, SafeLink, SafeMeta, SafeNoscript, SafeScript, SafeStyle } from './types.mjs';
|
|
9
9
|
export { resolveUnrefHeadInput } from './utils.mjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { createUnhead } from 'unhead';
|
|
2
2
|
export { createUnhead } from 'unhead';
|
|
3
3
|
import { ActiveHeadEntry } from 'unhead/types';
|
|
4
|
-
export { ActiveHeadEntry, Head, HeadEntryOptions, HeadTag, MergeHead, MetaFlatInput, RenderSSRHeadOptions, ResolvableHead,
|
|
5
|
-
import { V as VueHeadClient, U as UseHeadInput, a as UseHeadOptions, b as UseSeoMetaInput } from './shared/vue.
|
|
6
|
-
export {
|
|
4
|
+
export { ActiveHeadEntry, AriaAttributes, Base, BodyAttributesWithoutEvents, BodyEvents, DataKeys, GlobalAttributes, Head, HeadEntryOptions, HeadTag, HtmlAttributes, HttpEventAttributes, LinkWithoutEvents, MergeHead, Meta, MetaFlat, MetaFlatInput, Noscript, RenderSSRHeadOptions, ResolvableHead, ScriptWithoutEvents, SerializableResolvedHead, SpeculationRules, Style, Unhead } from 'unhead/types';
|
|
5
|
+
import { V as VueHeadClient, U as UseHeadInput, a as UseHeadOptions, b as UseSeoMetaInput } from './shared/vue.C1egIkvG.js';
|
|
6
|
+
export { B as BodyAttr, H as HtmlAttr, M as MaybeFalsy, l as ReactiveHead, n as ResolvableArray, d as ResolvableBase, k as ResolvableBodyAttributes, j as ResolvableHtmlAttributes, e as ResolvableLink, f as ResolvableMeta, i as ResolvableNoscript, o as ResolvableProperties, h as ResolvableScript, g as ResolvableStyle, R as ResolvableTitle, c as ResolvableTitleTemplate, m as ResolvableValue } from './shared/vue.C1egIkvG.js';
|
|
7
7
|
import { UseHeadSafeInput } from './types.js';
|
|
8
8
|
export { HeadSafe, SafeBodyAttr, SafeHtmlAttr, SafeLink, SafeMeta, SafeNoscript, SafeScript, SafeStyle } from './types.js';
|
|
9
9
|
export { resolveUnrefHeadInput } from './utils.js';
|
package/dist/legacy.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as unhead_types from 'unhead/types';
|
|
2
2
|
import { CreateClientHeadOptions, ActiveHeadEntry } from 'unhead/types';
|
|
3
3
|
import { createUnhead } from 'unhead';
|
|
4
|
-
import { V as VueHeadClient, U as UseHeadInput, a as UseHeadOptions, b as UseSeoMetaInput } from './shared/vue.
|
|
4
|
+
import { V as VueHeadClient, U as UseHeadInput, a as UseHeadOptions, b as UseSeoMetaInput } from './shared/vue.C1egIkvG.mjs';
|
|
5
5
|
import { UseHeadSafeInput } from './types.mjs';
|
|
6
6
|
import 'vue';
|
|
7
7
|
|
package/dist/legacy.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as unhead_types from 'unhead/types';
|
|
2
2
|
import { CreateClientHeadOptions, ActiveHeadEntry } from 'unhead/types';
|
|
3
3
|
import { createUnhead } from 'unhead';
|
|
4
|
-
import { V as VueHeadClient, U as UseHeadInput, a as UseHeadOptions, b as UseSeoMetaInput } from './shared/vue.
|
|
4
|
+
import { V as VueHeadClient, U as UseHeadInput, a as UseHeadOptions, b as UseSeoMetaInput } from './shared/vue.C1egIkvG.js';
|
|
5
5
|
import { UseHeadSafeInput } from './types.js';
|
|
6
6
|
import 'vue';
|
|
7
7
|
|
package/dist/scripts.d.mts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { UseScriptOptions as UseScriptOptions$1, ScriptInstance, UseScriptStatus, UseFunctionType } from 'unhead/scripts';
|
|
2
|
-
import {
|
|
2
|
+
import { ScriptWithoutEvents, DataKeys, SchemaAugmentations, HeadEntryOptions } from 'unhead/types';
|
|
3
3
|
import { Ref } from 'vue';
|
|
4
|
-
import {
|
|
4
|
+
import { o as ResolvableProperties, V as VueHeadClient } from './shared/vue.C1egIkvG.mjs';
|
|
5
5
|
|
|
6
6
|
interface VueScriptInstance<T extends Record<symbol | string, any>> extends Omit<ScriptInstance<T>, 'status'> {
|
|
7
7
|
status: Ref<UseScriptStatus>;
|
|
8
8
|
}
|
|
9
|
-
type UseScriptInput = string | (ResolvableProperties<Omit<
|
|
9
|
+
type UseScriptInput = string | (ResolvableProperties<Omit<ScriptWithoutEvents & DataKeys & SchemaAugmentations['script'], 'src'>> & {
|
|
10
10
|
src: string;
|
|
11
11
|
});
|
|
12
12
|
interface UseScriptOptions<T extends Record<symbol | string, any> = Record<string, any>> extends Omit<HeadEntryOptions, 'head'>, Pick<UseScriptOptions$1<T>, 'use' | 'eventContext' | 'beforeInit'> {
|
package/dist/scripts.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { UseScriptOptions as UseScriptOptions$1, ScriptInstance, UseScriptStatus, UseFunctionType } from 'unhead/scripts';
|
|
2
|
-
import {
|
|
2
|
+
import { ScriptWithoutEvents, DataKeys, SchemaAugmentations, HeadEntryOptions } from 'unhead/types';
|
|
3
3
|
import { Ref } from 'vue';
|
|
4
|
-
import {
|
|
4
|
+
import { o as ResolvableProperties, V as VueHeadClient } from './shared/vue.C1egIkvG.js';
|
|
5
5
|
|
|
6
6
|
interface VueScriptInstance<T extends Record<symbol | string, any>> extends Omit<ScriptInstance<T>, 'status'> {
|
|
7
7
|
status: Ref<UseScriptStatus>;
|
|
8
8
|
}
|
|
9
|
-
type UseScriptInput = string | (ResolvableProperties<Omit<
|
|
9
|
+
type UseScriptInput = string | (ResolvableProperties<Omit<ScriptWithoutEvents & DataKeys & SchemaAugmentations['script'], 'src'>> & {
|
|
10
10
|
src: string;
|
|
11
11
|
});
|
|
12
12
|
interface UseScriptOptions<T extends Record<symbol | string, any> = Record<string, any>> extends Omit<HeadEntryOptions, 'head'>, Pick<UseScriptOptions$1<T>, 'use' | 'eventContext' | 'beforeInit'> {
|
package/dist/server.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CreateServerHeadOptions } from 'unhead/types';
|
|
2
2
|
export { V as VueHeadMixin } from './shared/vue.DnywREVF.mjs';
|
|
3
3
|
export { SSRHeadPayload, extractUnheadInputFromHtml, propsToString, renderSSRHead, transformHtmlTemplate } from 'unhead/server';
|
|
4
|
-
import { V as VueHeadClient } from './shared/vue.
|
|
4
|
+
import { V as VueHeadClient } from './shared/vue.C1egIkvG.mjs';
|
|
5
5
|
import 'vue';
|
|
6
6
|
|
|
7
7
|
declare function createHead(options?: Omit<CreateServerHeadOptions, 'propsResolver'>): VueHeadClient;
|
package/dist/server.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CreateServerHeadOptions } from 'unhead/types';
|
|
2
2
|
export { V as VueHeadMixin } from './shared/vue.DnywREVF.js';
|
|
3
3
|
export { SSRHeadPayload, extractUnheadInputFromHtml, propsToString, renderSSRHead, transformHtmlTemplate } from 'unhead/server';
|
|
4
|
-
import { V as VueHeadClient } from './shared/vue.
|
|
4
|
+
import { V as VueHeadClient } from './shared/vue.C1egIkvG.js';
|
|
5
5
|
import 'vue';
|
|
6
6
|
|
|
7
7
|
declare function createHead(options?: Omit<CreateServerHeadOptions, 'propsResolver'>): VueHeadClient;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Stringable, SchemaAugmentations,
|
|
1
|
+
import { Stringable, SchemaAugmentations, ResolvableTitleTemplate as ResolvableTitleTemplate$1, Base, LinkWithoutEvents, DataKeys, MaybeEventFnHandlers, HttpEventAttributes, UnheadMeta, Style, ScriptWithoutEvents, Noscript, HtmlAttributes, MaybeArray, BodyAttributesWithoutEvents, BodyEvents, Unhead, HeadEntryOptions, MetaFlatInput } from 'unhead/types';
|
|
2
2
|
import { ComputedRef, Ref, CSSProperties, Plugin } from 'vue';
|
|
3
3
|
|
|
4
4
|
type Falsy = false | null | undefined;
|
|
@@ -9,7 +9,7 @@ type ResolvableProperties<T> = {
|
|
|
9
9
|
[key in keyof T]?: ResolvableValue<T[key]>;
|
|
10
10
|
};
|
|
11
11
|
|
|
12
|
-
interface HtmlAttr extends Omit<
|
|
12
|
+
interface HtmlAttr extends Omit<HtmlAttributes, 'class' | 'style'> {
|
|
13
13
|
/**
|
|
14
14
|
* The class global attribute is a space-separated list of the case-sensitive classes of the element.
|
|
15
15
|
*
|
|
@@ -23,7 +23,7 @@ interface HtmlAttr extends Omit<BaseHtmlAttr, 'class' | 'style'> {
|
|
|
23
23
|
*/
|
|
24
24
|
style?: MaybeArray<ResolvableValue<Stringable> | ResolvableProperties<CSSProperties>>;
|
|
25
25
|
}
|
|
26
|
-
interface BodyAttr extends Omit<
|
|
26
|
+
interface BodyAttr extends Omit<BodyAttributesWithoutEvents, 'class' | 'style'> {
|
|
27
27
|
/**
|
|
28
28
|
* The class global attribute is a space-separated list of the case-sensitive classes of the element.
|
|
29
29
|
*
|
|
@@ -37,18 +37,18 @@ interface BodyAttr extends Omit<BaseBodyAttr, 'class' | 'style'> {
|
|
|
37
37
|
*/
|
|
38
38
|
style?: MaybeArray<ResolvableValue<string>> | ResolvableProperties<CSSProperties>;
|
|
39
39
|
}
|
|
40
|
-
type
|
|
40
|
+
type ResolvableTitle = ResolvableValue<Stringable> | ResolvableProperties<({
|
|
41
41
|
textContent: Stringable;
|
|
42
42
|
} & SchemaAugmentations['title'])>;
|
|
43
|
-
type
|
|
44
|
-
type
|
|
45
|
-
type
|
|
46
|
-
type
|
|
47
|
-
type
|
|
48
|
-
type
|
|
49
|
-
type
|
|
50
|
-
type
|
|
51
|
-
type
|
|
43
|
+
type ResolvableTitleTemplate = ResolvableTitleTemplate$1 | Ref<string>;
|
|
44
|
+
type ResolvableBase = ResolvableProperties<Base & SchemaAugmentations['base']>;
|
|
45
|
+
type ResolvableLink = ResolvableProperties<LinkWithoutEvents & DataKeys & SchemaAugmentations['link']> & MaybeEventFnHandlers<HttpEventAttributes>;
|
|
46
|
+
type ResolvableMeta = ResolvableProperties<UnheadMeta & DataKeys & SchemaAugmentations['meta']>;
|
|
47
|
+
type ResolvableStyle = ResolvableProperties<Style & DataKeys & SchemaAugmentations['style']>;
|
|
48
|
+
type ResolvableScript = ResolvableProperties<ScriptWithoutEvents & DataKeys & SchemaAugmentations['script']> & MaybeEventFnHandlers<HttpEventAttributes>;
|
|
49
|
+
type ResolvableNoscript = ResolvableProperties<Noscript & DataKeys & SchemaAugmentations['noscript']>;
|
|
50
|
+
type ResolvableHtmlAttributes = ResolvableProperties<HtmlAttr & DataKeys & SchemaAugmentations['htmlAttrs']>;
|
|
51
|
+
type ResolvableBodyAttributes = ResolvableProperties<BodyAttr & DataKeys & SchemaAugmentations['bodyAttrs']> & MaybeEventFnHandlers<BodyEvents>;
|
|
52
52
|
interface ReactiveHead {
|
|
53
53
|
/**
|
|
54
54
|
* The `<title>` HTML element defines the document's title that is shown in a browser's title bar or a page's tab.
|
|
@@ -56,11 +56,11 @@ interface ReactiveHead {
|
|
|
56
56
|
*
|
|
57
57
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/title
|
|
58
58
|
*/
|
|
59
|
-
title?:
|
|
59
|
+
title?: ResolvableTitle;
|
|
60
60
|
/**
|
|
61
61
|
* Generate the title from a template.
|
|
62
62
|
*/
|
|
63
|
-
titleTemplate?:
|
|
63
|
+
titleTemplate?: ResolvableTitleTemplate;
|
|
64
64
|
/**
|
|
65
65
|
* Variables used to substitute in the title and meta content.
|
|
66
66
|
*/
|
|
@@ -73,7 +73,7 @@ interface ReactiveHead {
|
|
|
73
73
|
*
|
|
74
74
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base
|
|
75
75
|
*/
|
|
76
|
-
base?:
|
|
76
|
+
base?: ResolvableBase;
|
|
77
77
|
/**
|
|
78
78
|
* The `<link>` HTML element specifies relationships between the current document and an external resource.
|
|
79
79
|
* This element is most commonly used to link to stylesheets, but is also used to establish site icons
|
|
@@ -81,45 +81,45 @@ interface ReactiveHead {
|
|
|
81
81
|
*
|
|
82
82
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link#attr-as
|
|
83
83
|
*/
|
|
84
|
-
link?: ResolvableArray<
|
|
84
|
+
link?: ResolvableArray<ResolvableLink>;
|
|
85
85
|
/**
|
|
86
86
|
* The `<meta>` element represents metadata that cannot be expressed in other HTML elements, like `<link>` or `<script>`.
|
|
87
87
|
*
|
|
88
88
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta
|
|
89
89
|
*/
|
|
90
|
-
meta?: ResolvableArray<
|
|
90
|
+
meta?: ResolvableArray<ResolvableMeta>;
|
|
91
91
|
/**
|
|
92
92
|
* The `<style>` HTML element contains style information for a document, or part of a document.
|
|
93
93
|
* It contains CSS, which is applied to the contents of the document containing the `<style>` element.
|
|
94
94
|
*
|
|
95
95
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/style
|
|
96
96
|
*/
|
|
97
|
-
style?: ResolvableArray<(
|
|
97
|
+
style?: ResolvableArray<(ResolvableStyle | string)>;
|
|
98
98
|
/**
|
|
99
99
|
* The `<script>` HTML element is used to embed executable code or data; this is typically used to embed or refer to JavaScript code.
|
|
100
100
|
*
|
|
101
101
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script
|
|
102
102
|
*/
|
|
103
|
-
script?: ResolvableArray<(
|
|
103
|
+
script?: ResolvableArray<(ResolvableScript | string)>;
|
|
104
104
|
/**
|
|
105
105
|
* The `<noscript>` HTML element defines a section of HTML to be inserted if a script type on the page is unsupported
|
|
106
106
|
* or if scripting is currently turned off in the browser.
|
|
107
107
|
*
|
|
108
108
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/noscript
|
|
109
109
|
*/
|
|
110
|
-
noscript?: ResolvableArray<(
|
|
110
|
+
noscript?: ResolvableArray<(ResolvableNoscript | string)>;
|
|
111
111
|
/**
|
|
112
112
|
* Attributes for the `<html>` HTML element.
|
|
113
113
|
*
|
|
114
114
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/html
|
|
115
115
|
*/
|
|
116
|
-
htmlAttrs?:
|
|
116
|
+
htmlAttrs?: ResolvableHtmlAttributes;
|
|
117
117
|
/**
|
|
118
118
|
* Attributes for the `<body>` HTML element.
|
|
119
119
|
*
|
|
120
120
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/body
|
|
121
121
|
*/
|
|
122
|
-
bodyAttrs?:
|
|
122
|
+
bodyAttrs?: ResolvableBodyAttributes;
|
|
123
123
|
}
|
|
124
124
|
type UseHeadOptions = Omit<HeadEntryOptions, 'head'> & {
|
|
125
125
|
head?: VueHeadClient<any>;
|
|
@@ -131,4 +131,4 @@ type UseSeoMetaInput = ResolvableProperties<MetaFlatInput> & {
|
|
|
131
131
|
};
|
|
132
132
|
type VueHeadClient<I = UseHeadInput> = Unhead<I> & Plugin;
|
|
133
133
|
|
|
134
|
-
export type { BodyAttr as B, HtmlAttr as H,
|
|
134
|
+
export type { BodyAttr as B, HtmlAttr as H, MaybeFalsy as M, ResolvableTitle as R, UseHeadInput as U, VueHeadClient as V, UseHeadOptions as a, UseSeoMetaInput as b, ResolvableTitleTemplate as c, ResolvableBase as d, ResolvableLink as e, ResolvableMeta as f, ResolvableStyle as g, ResolvableScript as h, ResolvableNoscript as i, ResolvableHtmlAttributes as j, ResolvableBodyAttributes as k, ReactiveHead as l, ResolvableValue as m, ResolvableArray as n, ResolvableProperties as o };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Stringable, SchemaAugmentations,
|
|
1
|
+
import { Stringable, SchemaAugmentations, ResolvableTitleTemplate as ResolvableTitleTemplate$1, Base, LinkWithoutEvents, DataKeys, MaybeEventFnHandlers, HttpEventAttributes, UnheadMeta, Style, ScriptWithoutEvents, Noscript, HtmlAttributes, MaybeArray, BodyAttributesWithoutEvents, BodyEvents, Unhead, HeadEntryOptions, MetaFlatInput } from 'unhead/types';
|
|
2
2
|
import { ComputedRef, Ref, CSSProperties, Plugin } from 'vue';
|
|
3
3
|
|
|
4
4
|
type Falsy = false | null | undefined;
|
|
@@ -9,7 +9,7 @@ type ResolvableProperties<T> = {
|
|
|
9
9
|
[key in keyof T]?: ResolvableValue<T[key]>;
|
|
10
10
|
};
|
|
11
11
|
|
|
12
|
-
interface HtmlAttr extends Omit<
|
|
12
|
+
interface HtmlAttr extends Omit<HtmlAttributes, 'class' | 'style'> {
|
|
13
13
|
/**
|
|
14
14
|
* The class global attribute is a space-separated list of the case-sensitive classes of the element.
|
|
15
15
|
*
|
|
@@ -23,7 +23,7 @@ interface HtmlAttr extends Omit<BaseHtmlAttr, 'class' | 'style'> {
|
|
|
23
23
|
*/
|
|
24
24
|
style?: MaybeArray<ResolvableValue<Stringable> | ResolvableProperties<CSSProperties>>;
|
|
25
25
|
}
|
|
26
|
-
interface BodyAttr extends Omit<
|
|
26
|
+
interface BodyAttr extends Omit<BodyAttributesWithoutEvents, 'class' | 'style'> {
|
|
27
27
|
/**
|
|
28
28
|
* The class global attribute is a space-separated list of the case-sensitive classes of the element.
|
|
29
29
|
*
|
|
@@ -37,18 +37,18 @@ interface BodyAttr extends Omit<BaseBodyAttr, 'class' | 'style'> {
|
|
|
37
37
|
*/
|
|
38
38
|
style?: MaybeArray<ResolvableValue<string>> | ResolvableProperties<CSSProperties>;
|
|
39
39
|
}
|
|
40
|
-
type
|
|
40
|
+
type ResolvableTitle = ResolvableValue<Stringable> | ResolvableProperties<({
|
|
41
41
|
textContent: Stringable;
|
|
42
42
|
} & SchemaAugmentations['title'])>;
|
|
43
|
-
type
|
|
44
|
-
type
|
|
45
|
-
type
|
|
46
|
-
type
|
|
47
|
-
type
|
|
48
|
-
type
|
|
49
|
-
type
|
|
50
|
-
type
|
|
51
|
-
type
|
|
43
|
+
type ResolvableTitleTemplate = ResolvableTitleTemplate$1 | Ref<string>;
|
|
44
|
+
type ResolvableBase = ResolvableProperties<Base & SchemaAugmentations['base']>;
|
|
45
|
+
type ResolvableLink = ResolvableProperties<LinkWithoutEvents & DataKeys & SchemaAugmentations['link']> & MaybeEventFnHandlers<HttpEventAttributes>;
|
|
46
|
+
type ResolvableMeta = ResolvableProperties<UnheadMeta & DataKeys & SchemaAugmentations['meta']>;
|
|
47
|
+
type ResolvableStyle = ResolvableProperties<Style & DataKeys & SchemaAugmentations['style']>;
|
|
48
|
+
type ResolvableScript = ResolvableProperties<ScriptWithoutEvents & DataKeys & SchemaAugmentations['script']> & MaybeEventFnHandlers<HttpEventAttributes>;
|
|
49
|
+
type ResolvableNoscript = ResolvableProperties<Noscript & DataKeys & SchemaAugmentations['noscript']>;
|
|
50
|
+
type ResolvableHtmlAttributes = ResolvableProperties<HtmlAttr & DataKeys & SchemaAugmentations['htmlAttrs']>;
|
|
51
|
+
type ResolvableBodyAttributes = ResolvableProperties<BodyAttr & DataKeys & SchemaAugmentations['bodyAttrs']> & MaybeEventFnHandlers<BodyEvents>;
|
|
52
52
|
interface ReactiveHead {
|
|
53
53
|
/**
|
|
54
54
|
* The `<title>` HTML element defines the document's title that is shown in a browser's title bar or a page's tab.
|
|
@@ -56,11 +56,11 @@ interface ReactiveHead {
|
|
|
56
56
|
*
|
|
57
57
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/title
|
|
58
58
|
*/
|
|
59
|
-
title?:
|
|
59
|
+
title?: ResolvableTitle;
|
|
60
60
|
/**
|
|
61
61
|
* Generate the title from a template.
|
|
62
62
|
*/
|
|
63
|
-
titleTemplate?:
|
|
63
|
+
titleTemplate?: ResolvableTitleTemplate;
|
|
64
64
|
/**
|
|
65
65
|
* Variables used to substitute in the title and meta content.
|
|
66
66
|
*/
|
|
@@ -73,7 +73,7 @@ interface ReactiveHead {
|
|
|
73
73
|
*
|
|
74
74
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base
|
|
75
75
|
*/
|
|
76
|
-
base?:
|
|
76
|
+
base?: ResolvableBase;
|
|
77
77
|
/**
|
|
78
78
|
* The `<link>` HTML element specifies relationships between the current document and an external resource.
|
|
79
79
|
* This element is most commonly used to link to stylesheets, but is also used to establish site icons
|
|
@@ -81,45 +81,45 @@ interface ReactiveHead {
|
|
|
81
81
|
*
|
|
82
82
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link#attr-as
|
|
83
83
|
*/
|
|
84
|
-
link?: ResolvableArray<
|
|
84
|
+
link?: ResolvableArray<ResolvableLink>;
|
|
85
85
|
/**
|
|
86
86
|
* The `<meta>` element represents metadata that cannot be expressed in other HTML elements, like `<link>` or `<script>`.
|
|
87
87
|
*
|
|
88
88
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta
|
|
89
89
|
*/
|
|
90
|
-
meta?: ResolvableArray<
|
|
90
|
+
meta?: ResolvableArray<ResolvableMeta>;
|
|
91
91
|
/**
|
|
92
92
|
* The `<style>` HTML element contains style information for a document, or part of a document.
|
|
93
93
|
* It contains CSS, which is applied to the contents of the document containing the `<style>` element.
|
|
94
94
|
*
|
|
95
95
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/style
|
|
96
96
|
*/
|
|
97
|
-
style?: ResolvableArray<(
|
|
97
|
+
style?: ResolvableArray<(ResolvableStyle | string)>;
|
|
98
98
|
/**
|
|
99
99
|
* The `<script>` HTML element is used to embed executable code or data; this is typically used to embed or refer to JavaScript code.
|
|
100
100
|
*
|
|
101
101
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script
|
|
102
102
|
*/
|
|
103
|
-
script?: ResolvableArray<(
|
|
103
|
+
script?: ResolvableArray<(ResolvableScript | string)>;
|
|
104
104
|
/**
|
|
105
105
|
* The `<noscript>` HTML element defines a section of HTML to be inserted if a script type on the page is unsupported
|
|
106
106
|
* or if scripting is currently turned off in the browser.
|
|
107
107
|
*
|
|
108
108
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/noscript
|
|
109
109
|
*/
|
|
110
|
-
noscript?: ResolvableArray<(
|
|
110
|
+
noscript?: ResolvableArray<(ResolvableNoscript | string)>;
|
|
111
111
|
/**
|
|
112
112
|
* Attributes for the `<html>` HTML element.
|
|
113
113
|
*
|
|
114
114
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/html
|
|
115
115
|
*/
|
|
116
|
-
htmlAttrs?:
|
|
116
|
+
htmlAttrs?: ResolvableHtmlAttributes;
|
|
117
117
|
/**
|
|
118
118
|
* Attributes for the `<body>` HTML element.
|
|
119
119
|
*
|
|
120
120
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/body
|
|
121
121
|
*/
|
|
122
|
-
bodyAttrs?:
|
|
122
|
+
bodyAttrs?: ResolvableBodyAttributes;
|
|
123
123
|
}
|
|
124
124
|
type UseHeadOptions = Omit<HeadEntryOptions, 'head'> & {
|
|
125
125
|
head?: VueHeadClient<any>;
|
|
@@ -131,4 +131,4 @@ type UseSeoMetaInput = ResolvableProperties<MetaFlatInput> & {
|
|
|
131
131
|
};
|
|
132
132
|
type VueHeadClient<I = UseHeadInput> = Unhead<I> & Plugin;
|
|
133
133
|
|
|
134
|
-
export type { BodyAttr as B, HtmlAttr as H,
|
|
134
|
+
export type { BodyAttr as B, HtmlAttr as H, MaybeFalsy as M, ResolvableTitle as R, UseHeadInput as U, VueHeadClient as V, UseHeadOptions as a, UseSeoMetaInput as b, ResolvableTitleTemplate as c, ResolvableBase as d, ResolvableLink as e, ResolvableMeta as f, ResolvableStyle as g, ResolvableScript as h, ResolvableNoscript as i, ResolvableHtmlAttributes as j, ResolvableBodyAttributes as k, ReactiveHead as l, ResolvableValue as m, ResolvableArray as n, ResolvableProperties as o };
|
package/dist/types.d.mts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { ResolvableHead,
|
|
2
|
-
export { ActiveHeadEntry, Head, HeadEntryOptions, HeadTag, MergeHead, MetaFlatInput, RenderSSRHeadOptions, ResolvableHead,
|
|
3
|
-
import {
|
|
4
|
-
export {
|
|
1
|
+
import { ResolvableHead, LinkWithoutEvents, DataKeys, SchemaAugmentations, UnheadMeta, Style, ScriptWithoutEvents, TagPriority, TagPosition, ResolvesDuplicates, ProcessesTemplateParams, Noscript, HtmlAttributes, BodyAttributesWithoutEvents } from 'unhead/types';
|
|
2
|
+
export { ActiveHeadEntry, AriaAttributes, Base, BodyAttributesWithoutEvents, BodyEvents, DataKeys, GlobalAttributes, Head, HeadEntryOptions, HeadTag, HtmlAttributes, HttpEventAttributes, LinkWithoutEvents, MergeHead, Meta, MetaFlat, MetaFlatInput, Noscript, RenderSSRHeadOptions, ResolvableHead, ScriptWithoutEvents, SerializableResolvedHead, SpeculationRules, Style, Unhead } from 'unhead/types';
|
|
3
|
+
import { m as ResolvableValue, o as ResolvableProperties } from './shared/vue.C1egIkvG.mjs';
|
|
4
|
+
export { B as BodyAttr, H as HtmlAttr, M as MaybeFalsy, l as ReactiveHead, n as ResolvableArray, d as ResolvableBase, k as ResolvableBodyAttributes, j as ResolvableHtmlAttributes, e as ResolvableLink, f as ResolvableMeta, i as ResolvableNoscript, h as ResolvableScript, g as ResolvableStyle, R as ResolvableTitle, c as ResolvableTitleTemplate, U as UseHeadInput, a as UseHeadOptions, b as UseSeoMetaInput, V as VueHeadClient } from './shared/vue.C1egIkvG.mjs';
|
|
5
5
|
import 'vue';
|
|
6
6
|
|
|
7
|
-
type SafeBodyAttr = ResolvableProperties<Pick<
|
|
7
|
+
type SafeBodyAttr = ResolvableProperties<Pick<BodyAttributesWithoutEvents, 'id' | 'class' | 'style'> & DataKeys & SchemaAugmentations['bodyAttrs']>;
|
|
8
8
|
type SafeHtmlAttr = ResolvableProperties<Pick<HtmlAttributes, 'id' | 'class' | 'style' | 'lang' | 'dir'> & DataKeys & SchemaAugmentations['htmlAttrs']>;
|
|
9
|
-
type SafeMeta = ResolvableProperties<Pick<
|
|
10
|
-
type SafeLink = ResolvableProperties<Pick<
|
|
11
|
-
type SafeScript = ResolvableProperties<Pick<
|
|
9
|
+
type SafeMeta = ResolvableProperties<Pick<UnheadMeta, 'id' | 'name' | 'property' | 'charset' | 'content' | 'media'> & DataKeys & SchemaAugmentations['meta']>;
|
|
10
|
+
type SafeLink = ResolvableProperties<Pick<LinkWithoutEvents, 'id' | 'color' | 'crossorigin' | 'fetchpriority' | 'href' | 'hreflang' | 'imagesrcset' | 'imagesizes' | 'integrity' | 'media' | 'referrerpolicy' | 'rel' | 'sizes' | 'type'> & DataKeys & SchemaAugmentations['link']>;
|
|
11
|
+
type SafeScript = ResolvableProperties<Pick<ScriptWithoutEvents, 'id' | 'type' | 'nonce' | 'blocking'> & DataKeys & {
|
|
12
12
|
textContent?: string;
|
|
13
13
|
} & TagPriority & TagPosition & ResolvesDuplicates & ProcessesTemplateParams>;
|
|
14
|
-
type SafeNoscript = ResolvableProperties<Pick<Noscript, 'id'
|
|
15
|
-
type SafeStyle = ResolvableProperties<Pick<Style, 'id' | 'media' | '
|
|
14
|
+
type SafeNoscript = ResolvableProperties<Pick<Noscript, 'id'> & DataKeys & Omit<SchemaAugmentations['noscript'], 'innerHTML'>>;
|
|
15
|
+
type SafeStyle = ResolvableProperties<Pick<Style, 'id' | 'media' | 'nonce' | 'title' | 'blocking'> & DataKeys & Omit<SchemaAugmentations['style'], 'innerHTML'>>;
|
|
16
16
|
interface HeadSafe extends Pick<ResolvableHead, 'title' | 'titleTemplate' | 'templateParams'> {
|
|
17
17
|
/**
|
|
18
18
|
* The `<link>` HTML element specifies relationships between the current document and an external resource.
|
package/dist/types.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { ResolvableHead,
|
|
2
|
-
export { ActiveHeadEntry, Head, HeadEntryOptions, HeadTag, MergeHead, MetaFlatInput, RenderSSRHeadOptions, ResolvableHead,
|
|
3
|
-
import {
|
|
4
|
-
export {
|
|
1
|
+
import { ResolvableHead, LinkWithoutEvents, DataKeys, SchemaAugmentations, UnheadMeta, Style, ScriptWithoutEvents, TagPriority, TagPosition, ResolvesDuplicates, ProcessesTemplateParams, Noscript, HtmlAttributes, BodyAttributesWithoutEvents } from 'unhead/types';
|
|
2
|
+
export { ActiveHeadEntry, AriaAttributes, Base, BodyAttributesWithoutEvents, BodyEvents, DataKeys, GlobalAttributes, Head, HeadEntryOptions, HeadTag, HtmlAttributes, HttpEventAttributes, LinkWithoutEvents, MergeHead, Meta, MetaFlat, MetaFlatInput, Noscript, RenderSSRHeadOptions, ResolvableHead, ScriptWithoutEvents, SerializableResolvedHead, SpeculationRules, Style, Unhead } from 'unhead/types';
|
|
3
|
+
import { m as ResolvableValue, o as ResolvableProperties } from './shared/vue.C1egIkvG.js';
|
|
4
|
+
export { B as BodyAttr, H as HtmlAttr, M as MaybeFalsy, l as ReactiveHead, n as ResolvableArray, d as ResolvableBase, k as ResolvableBodyAttributes, j as ResolvableHtmlAttributes, e as ResolvableLink, f as ResolvableMeta, i as ResolvableNoscript, h as ResolvableScript, g as ResolvableStyle, R as ResolvableTitle, c as ResolvableTitleTemplate, U as UseHeadInput, a as UseHeadOptions, b as UseSeoMetaInput, V as VueHeadClient } from './shared/vue.C1egIkvG.js';
|
|
5
5
|
import 'vue';
|
|
6
6
|
|
|
7
|
-
type SafeBodyAttr = ResolvableProperties<Pick<
|
|
7
|
+
type SafeBodyAttr = ResolvableProperties<Pick<BodyAttributesWithoutEvents, 'id' | 'class' | 'style'> & DataKeys & SchemaAugmentations['bodyAttrs']>;
|
|
8
8
|
type SafeHtmlAttr = ResolvableProperties<Pick<HtmlAttributes, 'id' | 'class' | 'style' | 'lang' | 'dir'> & DataKeys & SchemaAugmentations['htmlAttrs']>;
|
|
9
|
-
type SafeMeta = ResolvableProperties<Pick<
|
|
10
|
-
type SafeLink = ResolvableProperties<Pick<
|
|
11
|
-
type SafeScript = ResolvableProperties<Pick<
|
|
9
|
+
type SafeMeta = ResolvableProperties<Pick<UnheadMeta, 'id' | 'name' | 'property' | 'charset' | 'content' | 'media'> & DataKeys & SchemaAugmentations['meta']>;
|
|
10
|
+
type SafeLink = ResolvableProperties<Pick<LinkWithoutEvents, 'id' | 'color' | 'crossorigin' | 'fetchpriority' | 'href' | 'hreflang' | 'imagesrcset' | 'imagesizes' | 'integrity' | 'media' | 'referrerpolicy' | 'rel' | 'sizes' | 'type'> & DataKeys & SchemaAugmentations['link']>;
|
|
11
|
+
type SafeScript = ResolvableProperties<Pick<ScriptWithoutEvents, 'id' | 'type' | 'nonce' | 'blocking'> & DataKeys & {
|
|
12
12
|
textContent?: string;
|
|
13
13
|
} & TagPriority & TagPosition & ResolvesDuplicates & ProcessesTemplateParams>;
|
|
14
|
-
type SafeNoscript = ResolvableProperties<Pick<Noscript, 'id'
|
|
15
|
-
type SafeStyle = ResolvableProperties<Pick<Style, 'id' | 'media' | '
|
|
14
|
+
type SafeNoscript = ResolvableProperties<Pick<Noscript, 'id'> & DataKeys & Omit<SchemaAugmentations['noscript'], 'innerHTML'>>;
|
|
15
|
+
type SafeStyle = ResolvableProperties<Pick<Style, 'id' | 'media' | 'nonce' | 'title' | 'blocking'> & DataKeys & Omit<SchemaAugmentations['style'], 'innerHTML'>>;
|
|
16
16
|
interface HeadSafe extends Pick<ResolvableHead, 'title' | 'titleTemplate' | 'templateParams'> {
|
|
17
17
|
/**
|
|
18
18
|
* The `<link>` HTML element specifies relationships between the current document and an external resource.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unhead/vue",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.0.0-alpha.
|
|
4
|
+
"version": "2.0.0-alpha.30",
|
|
5
5
|
"description": "Full-stack <head> manager built for Vue.",
|
|
6
6
|
"author": "Harlan Wilton <harlan@harlanzw.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
},
|
|
110
110
|
"dependencies": {
|
|
111
111
|
"hookable": "^5.5.3",
|
|
112
|
-
"unhead": "2.0.0-alpha.
|
|
112
|
+
"unhead": "2.0.0-alpha.30"
|
|
113
113
|
},
|
|
114
114
|
"scripts": {
|
|
115
115
|
"build": "unbuild .",
|