@unhead/vue 2.0.17 → 2.0.18
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.mjs +3 -5
- package/dist/components.mjs +2 -1
- package/dist/index.mjs +4 -3
- package/dist/legacy.mjs +2 -2
- package/dist/scripts.mjs +3 -2
- package/dist/server.mjs +3 -4
- package/dist/shared/{vue.BYLJNEcq.mjs → vue.BROZw4iv.mjs} +19 -22
- package/dist/shared/{vue.nvpYXC6D.mjs → vue.CgTRvX2j.mjs} +1 -4
- package/dist/shared/{vue.cHBs6zvy.mjs → vue.HGGopy_V.mjs} +1 -1
- package/dist/shared/vue.Kp0sxz0n.mjs +14 -0
- package/dist/utils.mjs +1 -0
- package/package.json +2 -2
package/dist/client.mjs
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { createHead as createHead$1, createDebouncedFn, renderDOMHead } from 'unhead/client';
|
|
2
2
|
export { renderDOMHead } from 'unhead/client';
|
|
3
|
-
import { v as vueInstall } from './shared/vue.
|
|
4
|
-
export { V as VueHeadMixin } from './shared/vue.
|
|
5
|
-
import 'unhead/plugins';
|
|
6
|
-
import 'unhead/utils';
|
|
3
|
+
import { v as vueInstall } from './shared/vue.Kp0sxz0n.mjs';
|
|
4
|
+
export { V as VueHeadMixin } from './shared/vue.CgTRvX2j.mjs';
|
|
7
5
|
import 'vue';
|
|
8
|
-
import './shared/vue.N9zWjxoK.mjs';
|
|
9
6
|
|
|
7
|
+
// @__NO_SIDE_EFFECTS__
|
|
10
8
|
function createHead(options = {}) {
|
|
11
9
|
const head = createHead$1({
|
|
12
10
|
domOptions: {
|
package/dist/components.mjs
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { defineComponent, ref, onBeforeUnmount, watchEffect } from 'vue';
|
|
2
|
-
import { u as useHead } from './shared/vue.
|
|
2
|
+
import { u as useHead } from './shared/vue.BROZw4iv.mjs';
|
|
3
3
|
import 'unhead/plugins';
|
|
4
4
|
import 'unhead/utils';
|
|
5
|
+
import './shared/vue.Kp0sxz0n.mjs';
|
|
5
6
|
import './shared/vue.N9zWjxoK.mjs';
|
|
6
7
|
|
|
7
8
|
function addVNodeToHeadObj(node, obj) {
|
package/dist/index.mjs
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { createUnhead } from 'unhead';
|
|
2
2
|
export { createUnhead } from 'unhead';
|
|
3
|
-
export {
|
|
3
|
+
export { i as injectHead, u as useHead, a as useHeadSafe, b as useSeoMeta, c as useServerHead, d as useServerHeadSafe, e as useServerSeoMeta } from './shared/vue.BROZw4iv.mjs';
|
|
4
|
+
export { h as headSymbol } from './shared/vue.Kp0sxz0n.mjs';
|
|
4
5
|
export { resolveUnrefHeadInput } from './utils.mjs';
|
|
5
|
-
export { V as VueHeadMixin } from './shared/vue.
|
|
6
|
-
export { u as useScript } from './shared/vue.
|
|
6
|
+
export { V as VueHeadMixin } from './shared/vue.CgTRvX2j.mjs';
|
|
7
|
+
export { u as useScript } from './shared/vue.HGGopy_V.mjs';
|
|
7
8
|
import 'unhead/plugins';
|
|
8
9
|
import 'unhead/utils';
|
|
9
10
|
import 'vue';
|
package/dist/legacy.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { createUnhead } from 'unhead';
|
|
2
2
|
import { inject, ref, watchEffect, unref, watch, getCurrentInstance, onBeforeUnmount, onDeactivated, onActivated } from 'vue';
|
|
3
3
|
import { createHead as createHead$1 } from './client.mjs';
|
|
4
|
-
import { h as headSymbol } from './shared/vue.
|
|
4
|
+
import { h as headSymbol } from './shared/vue.Kp0sxz0n.mjs';
|
|
5
5
|
import { V as VueResolver } from './shared/vue.N9zWjxoK.mjs';
|
|
6
6
|
import { createHead as createHead$2 } from './server.mjs';
|
|
7
7
|
import { walkResolver } from 'unhead/utils';
|
|
8
8
|
import { defineHeadPlugin, DeprecationsPlugin, PromisesPlugin, TemplateParamsPlugin, AliasSortingPlugin, SafeInputPlugin, FlatMetaPlugin } from 'unhead/plugins';
|
|
9
9
|
import 'unhead/client';
|
|
10
|
-
import './shared/vue.
|
|
10
|
+
import './shared/vue.CgTRvX2j.mjs';
|
|
11
11
|
import 'unhead/server';
|
|
12
12
|
|
|
13
13
|
const createHeadCore = createUnhead;
|
package/dist/scripts.mjs
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
export { createSpyProxy, resolveScriptKey } from 'unhead/scripts';
|
|
2
|
-
export { u as useScript } from './shared/vue.
|
|
2
|
+
export { u as useScript } from './shared/vue.HGGopy_V.mjs';
|
|
3
3
|
import 'vue';
|
|
4
|
-
import './shared/vue.
|
|
4
|
+
import './shared/vue.BROZw4iv.mjs';
|
|
5
5
|
import 'unhead/plugins';
|
|
6
6
|
import 'unhead/utils';
|
|
7
|
+
import './shared/vue.Kp0sxz0n.mjs';
|
|
7
8
|
import './shared/vue.N9zWjxoK.mjs';
|
package/dist/server.mjs
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { createHead as createHead$1 } from 'unhead/server';
|
|
2
2
|
export { extractUnheadInputFromHtml, propsToString, renderSSRHead, transformHtmlTemplate } from 'unhead/server';
|
|
3
|
-
import { v as vueInstall } from './shared/vue.
|
|
3
|
+
import { v as vueInstall } from './shared/vue.Kp0sxz0n.mjs';
|
|
4
4
|
import { V as VueResolver } from './shared/vue.N9zWjxoK.mjs';
|
|
5
|
-
export { V as VueHeadMixin } from './shared/vue.
|
|
6
|
-
import 'unhead/plugins';
|
|
7
|
-
import 'unhead/utils';
|
|
5
|
+
export { V as VueHeadMixin } from './shared/vue.CgTRvX2j.mjs';
|
|
8
6
|
import 'vue';
|
|
9
7
|
|
|
8
|
+
// @__NO_SIDE_EFFECTS__
|
|
10
9
|
function createHead(options = {}) {
|
|
11
10
|
const head = createHead$1({
|
|
12
11
|
...options,
|
|
@@ -1,20 +1,10 @@
|
|
|
1
1
|
import { SafeInputPlugin, FlatMetaPlugin } from 'unhead/plugins';
|
|
2
2
|
import { walkResolver } from 'unhead/utils';
|
|
3
3
|
import { hasInjectionContext, inject, ref, watchEffect, getCurrentInstance, onBeforeUnmount, onDeactivated, onActivated } from 'vue';
|
|
4
|
+
import { h as headSymbol } from './vue.Kp0sxz0n.mjs';
|
|
4
5
|
import { V as VueResolver } from './vue.N9zWjxoK.mjs';
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
function vueInstall(head) {
|
|
8
|
-
const plugin = {
|
|
9
|
-
install(app) {
|
|
10
|
-
app.config.globalProperties.$unhead = head;
|
|
11
|
-
app.config.globalProperties.$head = head;
|
|
12
|
-
app.provide(headSymbol, head);
|
|
13
|
-
}
|
|
14
|
-
};
|
|
15
|
-
return plugin.install;
|
|
16
|
-
}
|
|
17
|
-
|
|
7
|
+
// @__NO_SIDE_EFFECTS__
|
|
18
8
|
function injectHead() {
|
|
19
9
|
if (hasInjectionContext()) {
|
|
20
10
|
const instance = inject(headSymbol);
|
|
@@ -25,10 +15,12 @@ function injectHead() {
|
|
|
25
15
|
}
|
|
26
16
|
throw new Error("useHead() was called without provide context, ensure you call it through the setup() function.");
|
|
27
17
|
}
|
|
18
|
+
// @__NO_SIDE_EFFECTS__
|
|
28
19
|
function useHead(input, options = {}) {
|
|
29
|
-
const head = options.head || injectHead();
|
|
30
|
-
return head.ssr ? head.push(input || {}, options) : clientUseHead(head, input, options);
|
|
20
|
+
const head = options.head || /* @__PURE__ */ injectHead();
|
|
21
|
+
return head.ssr ? head.push(input || {}, options) : /* @__PURE__ */ clientUseHead(head, input, options);
|
|
31
22
|
}
|
|
23
|
+
// @__NO_SIDE_EFFECTS__
|
|
32
24
|
function clientUseHead(head, input, options = {}) {
|
|
33
25
|
const deactivated = ref(false);
|
|
34
26
|
let entry;
|
|
@@ -54,30 +46,35 @@ function clientUseHead(head, input, options = {}) {
|
|
|
54
46
|
}
|
|
55
47
|
return entry;
|
|
56
48
|
}
|
|
49
|
+
// @__NO_SIDE_EFFECTS__
|
|
57
50
|
function useHeadSafe(input = {}, options = {}) {
|
|
58
|
-
const head = options.head || injectHead();
|
|
51
|
+
const head = options.head || /* @__PURE__ */ injectHead();
|
|
59
52
|
head.use(SafeInputPlugin);
|
|
60
53
|
options._safe = true;
|
|
61
|
-
return useHead(input, options);
|
|
54
|
+
return /* @__PURE__ */ useHead(input, options);
|
|
62
55
|
}
|
|
56
|
+
// @__NO_SIDE_EFFECTS__
|
|
63
57
|
function useSeoMeta(input = {}, options = {}) {
|
|
64
|
-
const head = options.head || injectHead();
|
|
58
|
+
const head = options.head || /* @__PURE__ */ injectHead();
|
|
65
59
|
head.use(FlatMetaPlugin);
|
|
66
60
|
const { title, titleTemplate, ...meta } = input;
|
|
67
|
-
return useHead({
|
|
61
|
+
return /* @__PURE__ */ useHead({
|
|
68
62
|
title,
|
|
69
63
|
titleTemplate,
|
|
70
64
|
_flatMeta: meta
|
|
71
65
|
}, options);
|
|
72
66
|
}
|
|
67
|
+
// @__NO_SIDE_EFFECTS__
|
|
73
68
|
function useServerHead(input, options = {}) {
|
|
74
|
-
return useHead(input, { ...options, mode: "server" });
|
|
69
|
+
return /* @__PURE__ */ useHead(input, { ...options, mode: "server" });
|
|
75
70
|
}
|
|
71
|
+
// @__NO_SIDE_EFFECTS__
|
|
76
72
|
function useServerHeadSafe(input, options = {}) {
|
|
77
|
-
return useHeadSafe(input, { ...options, mode: "server" });
|
|
73
|
+
return /* @__PURE__ */ useHeadSafe(input, { ...options, mode: "server" });
|
|
78
74
|
}
|
|
75
|
+
// @__NO_SIDE_EFFECTS__
|
|
79
76
|
function useServerSeoMeta(input, options = {}) {
|
|
80
|
-
return useSeoMeta(input, { ...options, mode: "server" });
|
|
77
|
+
return /* @__PURE__ */ useSeoMeta(input, { ...options, mode: "server" });
|
|
81
78
|
}
|
|
82
79
|
|
|
83
|
-
export { useHeadSafe as a, useSeoMeta as b, useServerHead as c, useServerHeadSafe as d, useServerSeoMeta as e,
|
|
80
|
+
export { useHeadSafe as a, useSeoMeta as b, useServerHead as c, useServerHeadSafe as d, useServerSeoMeta as e, injectHead as i, useHead as u };
|
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
import { getCurrentInstance } from 'vue';
|
|
2
|
-
import { u as useHead } from './vue.BYLJNEcq.mjs';
|
|
3
2
|
|
|
4
3
|
const VueHeadMixin = {
|
|
5
4
|
created() {
|
|
6
|
-
let source = false;
|
|
7
5
|
const instance = getCurrentInstance();
|
|
8
6
|
if (!instance)
|
|
9
7
|
return;
|
|
10
8
|
const options = instance.type;
|
|
11
9
|
if (!options || !("head" in options))
|
|
12
10
|
return;
|
|
13
|
-
|
|
14
|
-
source && useHead(source);
|
|
11
|
+
typeof options.head === "function" ? () => options.head.call(instance.proxy) : options.head;
|
|
15
12
|
}
|
|
16
13
|
};
|
|
17
14
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useScript as useScript$1 } from 'unhead/scripts';
|
|
2
2
|
import { getCurrentInstance, onMounted, isRef, watch, onScopeDispose, ref } from 'vue';
|
|
3
|
-
import { i as injectHead } from './vue.
|
|
3
|
+
import { i as injectHead } from './vue.BROZw4iv.mjs';
|
|
4
4
|
|
|
5
5
|
function registerVueScopeHandlers(script, scope) {
|
|
6
6
|
if (!scope) {
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
const headSymbol = "usehead";
|
|
2
|
+
// @__NO_SIDE_EFFECTS__
|
|
3
|
+
function vueInstall(head) {
|
|
4
|
+
const plugin = {
|
|
5
|
+
install(app) {
|
|
6
|
+
app.config.globalProperties.$unhead = head;
|
|
7
|
+
app.config.globalProperties.$head = head;
|
|
8
|
+
app.provide(headSymbol, head);
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
return plugin.install;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export { headSymbol as h, vueInstall as v };
|
package/dist/utils.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unhead/vue",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.18",
|
|
5
5
|
"description": "Full-stack <head> manager built for Vue.",
|
|
6
6
|
"author": "Harlan Wilton <harlan@harlanzw.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
},
|
|
104
104
|
"dependencies": {
|
|
105
105
|
"hookable": "^5.5.3",
|
|
106
|
-
"unhead": "2.0.
|
|
106
|
+
"unhead": "2.0.18"
|
|
107
107
|
},
|
|
108
108
|
"devDependencies": {
|
|
109
109
|
"vue": "^3.5.21"
|