@unhead/vue 1.8.0-beta.1 → 1.8.0-beta.5
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.cjs +17 -10
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +19 -12
- package/dist/polyfill.d.cts +1 -1
- package/dist/polyfill.d.mts +1 -1
- package/dist/polyfill.d.ts +1 -1
- package/dist/shared/{vue.8eef6ffc.d.cts → vue.44f175ba.d.cts} +3 -1
- package/dist/shared/{vue.8eef6ffc.d.mts → vue.44f175ba.d.mts} +3 -1
- package/dist/shared/{vue.8eef6ffc.d.ts → vue.44f175ba.d.ts} +3 -1
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -59,17 +59,24 @@ function useHeadSafe(input, options = {}) {
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
function useSeoMeta(input, options) {
|
|
62
|
-
const
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
62
|
+
const { title, titleTemplate, ...meta } = input;
|
|
63
|
+
return useHead.useHead({
|
|
64
|
+
title,
|
|
65
|
+
titleTemplate,
|
|
66
|
+
// @ts-expect-error runtime type
|
|
67
|
+
_flatMeta: meta
|
|
68
|
+
}, {
|
|
69
|
+
...options,
|
|
70
|
+
transform(t) {
|
|
71
|
+
const meta2 = shared.unpackMeta({ ...t._flatMeta });
|
|
72
|
+
delete t._flatMeta;
|
|
73
|
+
return {
|
|
74
|
+
// @ts-expect-error runtime type
|
|
75
|
+
...t,
|
|
76
|
+
meta: meta2
|
|
77
|
+
};
|
|
78
|
+
}
|
|
71
79
|
});
|
|
72
|
-
return useHead.useHead(headInput, options);
|
|
73
80
|
}
|
|
74
81
|
|
|
75
82
|
function useServerHead(input, options = {}) {
|
package/dist/index.d.cts
CHANGED
|
@@ -2,8 +2,8 @@ export { CapoPlugin, HashHydrationPlugin, createHeadCore } from 'unhead';
|
|
|
2
2
|
import * as _unhead_schema from '@unhead/schema';
|
|
3
3
|
import { SafeMeta, SafeLink, SafeNoscript, SafeScript, SafeHtmlAttr, SafeBodyAttr, MergeHead, CreateHeadOptions, ActiveHeadEntry, UseScriptStatus, UseScriptInput, UseScriptOptions } from '@unhead/schema';
|
|
4
4
|
export { ActiveHeadEntry, Head, HeadEntryOptions, HeadTag, MergeHead, Unhead } from '@unhead/schema';
|
|
5
|
-
import { R as ReactiveHead, M as MaybeComputedRefEntries, a as MaybeComputedRef, V as VueHeadClient, U as UseHeadInput, b as UseHeadOptions, c as UseSeoMetaInput } from './shared/vue.
|
|
6
|
-
export { e as Base, B as BodyAttr, i as BodyAttributes, H as HtmlAttr, h as HtmlAttributes, L as Link, k as MaybeComputedRefOrPromise, j as MaybeReadonlyRef, f as Meta, N as Noscript, g as Script, S as Style, T as Title, d as TitleTemplate } from './shared/vue.
|
|
5
|
+
import { R as ReactiveHead, M as MaybeComputedRefEntries, a as MaybeComputedRef, V as VueHeadClient, U as UseHeadInput, b as UseHeadOptions, c as UseSeoMetaInput } from './shared/vue.44f175ba.cjs';
|
|
6
|
+
export { e as Base, B as BodyAttr, i as BodyAttributes, H as HtmlAttr, h as HtmlAttributes, L as Link, k as MaybeComputedRefOrPromise, j as MaybeReadonlyRef, f as Meta, N as Noscript, g as Script, S as Style, T as Title, d as TitleTemplate } from './shared/vue.44f175ba.cjs';
|
|
7
7
|
import { Plugin, ComputedRef, Ref } from 'vue';
|
|
8
8
|
|
|
9
9
|
interface HeadSafe extends Pick<ReactiveHead, 'title' | 'titleTemplate' | 'templateParams'> {
|
package/dist/index.d.mts
CHANGED
|
@@ -2,8 +2,8 @@ export { CapoPlugin, HashHydrationPlugin, createHeadCore } from 'unhead';
|
|
|
2
2
|
import * as _unhead_schema from '@unhead/schema';
|
|
3
3
|
import { SafeMeta, SafeLink, SafeNoscript, SafeScript, SafeHtmlAttr, SafeBodyAttr, MergeHead, CreateHeadOptions, ActiveHeadEntry, UseScriptStatus, UseScriptInput, UseScriptOptions } from '@unhead/schema';
|
|
4
4
|
export { ActiveHeadEntry, Head, HeadEntryOptions, HeadTag, MergeHead, Unhead } from '@unhead/schema';
|
|
5
|
-
import { R as ReactiveHead, M as MaybeComputedRefEntries, a as MaybeComputedRef, V as VueHeadClient, U as UseHeadInput, b as UseHeadOptions, c as UseSeoMetaInput } from './shared/vue.
|
|
6
|
-
export { e as Base, B as BodyAttr, i as BodyAttributes, H as HtmlAttr, h as HtmlAttributes, L as Link, k as MaybeComputedRefOrPromise, j as MaybeReadonlyRef, f as Meta, N as Noscript, g as Script, S as Style, T as Title, d as TitleTemplate } from './shared/vue.
|
|
5
|
+
import { R as ReactiveHead, M as MaybeComputedRefEntries, a as MaybeComputedRef, V as VueHeadClient, U as UseHeadInput, b as UseHeadOptions, c as UseSeoMetaInput } from './shared/vue.44f175ba.mjs';
|
|
6
|
+
export { e as Base, B as BodyAttr, i as BodyAttributes, H as HtmlAttr, h as HtmlAttributes, L as Link, k as MaybeComputedRefOrPromise, j as MaybeReadonlyRef, f as Meta, N as Noscript, g as Script, S as Style, T as Title, d as TitleTemplate } from './shared/vue.44f175ba.mjs';
|
|
7
7
|
import { Plugin, ComputedRef, Ref } from 'vue';
|
|
8
8
|
|
|
9
9
|
interface HeadSafe extends Pick<ReactiveHead, 'title' | 'titleTemplate' | 'templateParams'> {
|
package/dist/index.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ export { CapoPlugin, HashHydrationPlugin, createHeadCore } from 'unhead';
|
|
|
2
2
|
import * as _unhead_schema from '@unhead/schema';
|
|
3
3
|
import { SafeMeta, SafeLink, SafeNoscript, SafeScript, SafeHtmlAttr, SafeBodyAttr, MergeHead, CreateHeadOptions, ActiveHeadEntry, UseScriptStatus, UseScriptInput, UseScriptOptions } from '@unhead/schema';
|
|
4
4
|
export { ActiveHeadEntry, Head, HeadEntryOptions, HeadTag, MergeHead, Unhead } from '@unhead/schema';
|
|
5
|
-
import { R as ReactiveHead, M as MaybeComputedRefEntries, a as MaybeComputedRef, V as VueHeadClient, U as UseHeadInput, b as UseHeadOptions, c as UseSeoMetaInput } from './shared/vue.
|
|
6
|
-
export { e as Base, B as BodyAttr, i as BodyAttributes, H as HtmlAttr, h as HtmlAttributes, L as Link, k as MaybeComputedRefOrPromise, j as MaybeReadonlyRef, f as Meta, N as Noscript, g as Script, S as Style, T as Title, d as TitleTemplate } from './shared/vue.
|
|
5
|
+
import { R as ReactiveHead, M as MaybeComputedRefEntries, a as MaybeComputedRef, V as VueHeadClient, U as UseHeadInput, b as UseHeadOptions, c as UseSeoMetaInput } from './shared/vue.44f175ba.js';
|
|
6
|
+
export { e as Base, B as BodyAttr, i as BodyAttributes, H as HtmlAttr, h as HtmlAttributes, L as Link, k as MaybeComputedRefOrPromise, j as MaybeReadonlyRef, f as Meta, N as Noscript, g as Script, S as Style, T as Title, d as TitleTemplate } from './shared/vue.44f175ba.js';
|
|
7
7
|
import { Plugin, ComputedRef, Ref } from 'vue';
|
|
8
8
|
|
|
9
9
|
interface HeadSafe extends Pick<ReactiveHead, 'title' | 'titleTemplate' | 'templateParams'> {
|
package/dist/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useScript as useScript$1 } from 'unhead';
|
|
2
2
|
export { CapoPlugin, HashHydrationPlugin, createHeadCore } from 'unhead';
|
|
3
|
-
import { V as Vue3, h as headSymbol,
|
|
3
|
+
import { V as Vue3, h as headSymbol, i as injectHead, r as resolveUnrefHeadInput } from './shared/vue.cf295fb1.mjs';
|
|
4
4
|
export { c as createHead, a as createServerHead, s as setHeadInjectionHandler } from './shared/vue.cf295fb1.mjs';
|
|
5
|
-
import { getCurrentInstance, ref,
|
|
5
|
+
import { getCurrentInstance, ref, computed } from 'vue';
|
|
6
6
|
import { u as useHead } from './shared/vue.f36acd1f.mjs';
|
|
7
7
|
import { composableNames, whitelistSafeInput, unpackMeta, NetworkEvents } from '@unhead/shared';
|
|
8
8
|
|
|
@@ -59,17 +59,24 @@ function useHeadSafe(input, options = {}) {
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
function useSeoMeta(input, options) {
|
|
62
|
-
const
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
62
|
+
const { title, titleTemplate, ...meta } = input;
|
|
63
|
+
return useHead({
|
|
64
|
+
title,
|
|
65
|
+
titleTemplate,
|
|
66
|
+
// @ts-expect-error runtime type
|
|
67
|
+
_flatMeta: meta
|
|
68
|
+
}, {
|
|
69
|
+
...options,
|
|
70
|
+
transform(t) {
|
|
71
|
+
const meta2 = unpackMeta({ ...t._flatMeta });
|
|
72
|
+
delete t._flatMeta;
|
|
73
|
+
return {
|
|
74
|
+
// @ts-expect-error runtime type
|
|
75
|
+
...t,
|
|
76
|
+
meta: meta2
|
|
77
|
+
};
|
|
78
|
+
}
|
|
71
79
|
});
|
|
72
|
-
return useHead(headInput, options);
|
|
73
80
|
}
|
|
74
81
|
|
|
75
82
|
function useServerHead(input, options = {}) {
|
package/dist/polyfill.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MergeHead } from '@unhead/schema';
|
|
2
|
-
import { V as VueHeadClient, U as UseHeadInput, b as UseHeadOptions } from './shared/vue.
|
|
2
|
+
import { V as VueHeadClient, U as UseHeadInput, b as UseHeadOptions } from './shared/vue.44f175ba.cjs';
|
|
3
3
|
import 'vue';
|
|
4
4
|
|
|
5
5
|
type VueHeadClientPollyFill<T extends MergeHead> = VueHeadClient<T> & {
|
package/dist/polyfill.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MergeHead } from '@unhead/schema';
|
|
2
|
-
import { V as VueHeadClient, U as UseHeadInput, b as UseHeadOptions } from './shared/vue.
|
|
2
|
+
import { V as VueHeadClient, U as UseHeadInput, b as UseHeadOptions } from './shared/vue.44f175ba.mjs';
|
|
3
3
|
import 'vue';
|
|
4
4
|
|
|
5
5
|
type VueHeadClientPollyFill<T extends MergeHead> = VueHeadClient<T> & {
|
package/dist/polyfill.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MergeHead } from '@unhead/schema';
|
|
2
|
-
import { V as VueHeadClient, U as UseHeadInput, b as UseHeadOptions } from './shared/vue.
|
|
2
|
+
import { V as VueHeadClient, U as UseHeadInput, b as UseHeadOptions } from './shared/vue.44f175ba.js';
|
|
3
3
|
import 'vue';
|
|
4
4
|
|
|
5
5
|
type VueHeadClientPollyFill<T extends MergeHead> = VueHeadClient<T> & {
|
|
@@ -49,7 +49,9 @@ interface ReactiveHead<E extends MergeHead = MergeHead> {
|
|
|
49
49
|
/**
|
|
50
50
|
* Variables used to substitute in the title and meta content.
|
|
51
51
|
*/
|
|
52
|
-
templateParams?: MaybeComputedRefEntries<
|
|
52
|
+
templateParams?: MaybeComputedRefEntries<{
|
|
53
|
+
separator?: '|' | '-' | '·' | string;
|
|
54
|
+
} & Record<string, null | string | MaybeComputedRefEntries<Record<string, null | string>>>>;
|
|
53
55
|
/**
|
|
54
56
|
* The `<base>` HTML element specifies the base URL to use for all relative URLs in a document.
|
|
55
57
|
* There can be only one <base> element in a document.
|
|
@@ -49,7 +49,9 @@ interface ReactiveHead<E extends MergeHead = MergeHead> {
|
|
|
49
49
|
/**
|
|
50
50
|
* Variables used to substitute in the title and meta content.
|
|
51
51
|
*/
|
|
52
|
-
templateParams?: MaybeComputedRefEntries<
|
|
52
|
+
templateParams?: MaybeComputedRefEntries<{
|
|
53
|
+
separator?: '|' | '-' | '·' | string;
|
|
54
|
+
} & Record<string, null | string | MaybeComputedRefEntries<Record<string, null | string>>>>;
|
|
53
55
|
/**
|
|
54
56
|
* The `<base>` HTML element specifies the base URL to use for all relative URLs in a document.
|
|
55
57
|
* There can be only one <base> element in a document.
|
|
@@ -49,7 +49,9 @@ interface ReactiveHead<E extends MergeHead = MergeHead> {
|
|
|
49
49
|
/**
|
|
50
50
|
* Variables used to substitute in the title and meta content.
|
|
51
51
|
*/
|
|
52
|
-
templateParams?: MaybeComputedRefEntries<
|
|
52
|
+
templateParams?: MaybeComputedRefEntries<{
|
|
53
|
+
separator?: '|' | '-' | '·' | string;
|
|
54
|
+
} & Record<string, null | string | MaybeComputedRefEntries<Record<string, null | string>>>>;
|
|
53
55
|
/**
|
|
54
56
|
* The `<base>` HTML element specifies the base URL to use for all relative URLs in a document.
|
|
55
57
|
* There can be only one <base> element in a document.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unhead/vue",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.8.0-beta.
|
|
4
|
+
"version": "1.8.0-beta.5",
|
|
5
5
|
"author": "Harlan Wilton <harlan@harlanzw.com>",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"funding": "https://github.com/sponsors/harlan-zw",
|
|
@@ -48,9 +48,9 @@
|
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
50
|
"hookable": "^5.5.3",
|
|
51
|
-
"@unhead/schema": "1.8.0-beta.
|
|
52
|
-
"@unhead/shared": "1.8.0-beta.
|
|
53
|
-
"unhead": "1.8.0-beta.
|
|
51
|
+
"@unhead/schema": "1.8.0-beta.5",
|
|
52
|
+
"@unhead/shared": "1.8.0-beta.5",
|
|
53
|
+
"unhead": "1.8.0-beta.5"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"vue": "^3.3.4"
|