@unhead/vue 1.9.2 → 1.9.4
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 +6 -7
- package/dist/index.mjs +6 -7
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -101,12 +101,12 @@ function useScript(_input, _options) {
|
|
|
101
101
|
options.head = head;
|
|
102
102
|
options.eventContext = vue.getCurrentInstance();
|
|
103
103
|
const status = vue.ref("awaitingLoad");
|
|
104
|
+
const stubOptions = options.stub;
|
|
104
105
|
options.stub = ({ script, fn }) => {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
}
|
|
106
|
+
script.status = status;
|
|
107
|
+
if (fn === "$script")
|
|
108
|
+
return script;
|
|
109
|
+
return stubOptions?.({ script, fn });
|
|
110
110
|
};
|
|
111
111
|
let instance;
|
|
112
112
|
const rmHook = head.hooks.hook("script:updated", ({ script }) => {
|
|
@@ -116,8 +116,7 @@ function useScript(_input, _options) {
|
|
|
116
116
|
rmHook();
|
|
117
117
|
}
|
|
118
118
|
});
|
|
119
|
-
instance = unhead.useScript(input, options);
|
|
120
|
-
return instance;
|
|
119
|
+
return instance = unhead.useScript(input, options);
|
|
121
120
|
}
|
|
122
121
|
|
|
123
122
|
exports.CapoPlugin = unhead.CapoPlugin;
|
package/dist/index.mjs
CHANGED
|
@@ -101,12 +101,12 @@ function useScript(_input, _options) {
|
|
|
101
101
|
options.head = head;
|
|
102
102
|
options.eventContext = getCurrentInstance();
|
|
103
103
|
const status = ref("awaitingLoad");
|
|
104
|
+
const stubOptions = options.stub;
|
|
104
105
|
options.stub = ({ script, fn }) => {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
}
|
|
106
|
+
script.status = status;
|
|
107
|
+
if (fn === "$script")
|
|
108
|
+
return script;
|
|
109
|
+
return stubOptions?.({ script, fn });
|
|
110
110
|
};
|
|
111
111
|
let instance;
|
|
112
112
|
const rmHook = head.hooks.hook("script:updated", ({ script }) => {
|
|
@@ -116,8 +116,7 @@ function useScript(_input, _options) {
|
|
|
116
116
|
rmHook();
|
|
117
117
|
}
|
|
118
118
|
});
|
|
119
|
-
instance = useScript$1(input, options);
|
|
120
|
-
return instance;
|
|
119
|
+
return instance = useScript$1(input, options);
|
|
121
120
|
}
|
|
122
121
|
|
|
123
122
|
export { Vue2ProvideUnheadPlugin, VueHeadMixin, injectHead, unheadVueComposablesImports, useHead, useHeadSafe, useScript, useSeoMeta, useServerHead, useServerHeadSafe, useServerSeoMeta };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unhead/vue",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.9.
|
|
4
|
+
"version": "1.9.4",
|
|
5
5
|
"author": "Harlan Wilton <harlan@harlanzw.com>",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"funding": "https://github.com/sponsors/harlan-zw",
|
|
@@ -61,9 +61,9 @@
|
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
|
63
63
|
"hookable": "^5.5.3",
|
|
64
|
-
"@unhead/schema": "1.9.
|
|
65
|
-
"unhead": "1.9.
|
|
66
|
-
"
|
|
64
|
+
"@unhead/schema": "1.9.4",
|
|
65
|
+
"@unhead/shared": "1.9.4",
|
|
66
|
+
"unhead": "1.9.4"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
69
|
"vue": "^3.4.21"
|