@unhead/vue 1.1.23 → 1.1.25

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.
@@ -50,7 +50,7 @@ interface ReactiveHead<E extends MergeHead = MergeHead> {
50
50
  /**
51
51
  * Variables used to substitute in the title and meta content.
52
52
  */
53
- templateParams?: MaybeComputedRefEntries<Record<string, string | MaybeComputedRefEntries<Record<string, string>>>>;
53
+ templateParams?: MaybeComputedRefEntries<Record<string, null | string | MaybeComputedRefEntries<Record<string, null | string>>>>;
54
54
  /**
55
55
  * The <base> HTML element specifies the base URL to use for all relative URLs in a document.
56
56
  * There can be only one <base> element in a document.
package/dist/index.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const unhead = require('unhead');
4
- const useHead = require('./shared/vue.3af8ac9e.cjs');
4
+ const useHead = require('./shared/vue.627f8ea8.cjs');
5
5
  const vue = require('vue');
6
6
  const shared = require('@unhead/shared');
7
7
 
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  export { createHeadCore } from 'unhead';
2
- import { R as ReactiveHead, M as MaybeComputedRefEntries, a as MaybeComputedRef, U as UseHeadInput, A as Arrayable, b as Meta, L as Link, S as Script, c as Style, N as Noscript } from './createHead-e9a018ae.js';
3
- export { e as Base, B as BodyAttr, g as BodyAttributes, H as HtmlAttr, f as HtmlAttributes, i as MaybeComputedRefOrPromise, h as MaybeReadonlyRef, T as Title, d as TitleTemplate, V as VueHeadClient, m as createHead, l as createServerHead, j as headSymbol, k as injectHead } from './createHead-e9a018ae.js';
2
+ import { R as ReactiveHead, M as MaybeComputedRefEntries, a as MaybeComputedRef, U as UseHeadInput, A as Arrayable, b as Meta, L as Link, S as Script, c as Style, N as Noscript } from './createHead-26c9c4af.js';
3
+ export { e as Base, B as BodyAttr, g as BodyAttributes, H as HtmlAttr, f as HtmlAttributes, i as MaybeComputedRefOrPromise, h as MaybeReadonlyRef, T as Title, d as TitleTemplate, V as VueHeadClient, m as createHead, l as createServerHead, j as headSymbol, k as injectHead } from './createHead-26c9c4af.js';
4
4
  import * as _unhead_schema from '@unhead/schema';
5
5
  import { SafeMeta, SafeLink, SafeNoscript, SafeScript, SafeHtmlAttr, SafeBodyAttr, MergeHead, HeadEntryOptions, ActiveHeadEntry, MetaFlatInput } from '@unhead/schema';
6
6
  export { ActiveHeadEntry, Head, HeadEntryOptions, HeadTag, MergeHead, Unhead } from '@unhead/schema';
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { whitelistSafeInput, unpackMeta, composableNames } from 'unhead';
2
2
  export { createHeadCore } from 'unhead';
3
- import { u as useHead, h as headSymbol, r as resolveUnrefHeadInput, s as serverUseHead } from './shared/vue.3c82dacb.mjs';
4
- export { V as VueReactiveUseHeadPlugin, a as createHead, c as createServerHead, i as injectHead } from './shared/vue.3c82dacb.mjs';
3
+ import { u as useHead, h as headSymbol, r as resolveUnrefHeadInput, s as serverUseHead } from './shared/vue.bc44c3fa.mjs';
4
+ export { V as VueReactiveUseHeadPlugin, a as createHead, c as createServerHead, i as injectHead } from './shared/vue.bc44c3fa.mjs';
5
5
  import { getCurrentInstance, ref, watchEffect } from 'vue';
6
6
  import { asArray } from '@unhead/shared';
7
7
 
package/dist/polyfill.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const useHead = require('./shared/vue.3af8ac9e.cjs');
3
+ const useHead = require('./shared/vue.627f8ea8.cjs');
4
4
  require('vue');
5
5
  require('unhead');
6
6
  require('@unhead/shared');
@@ -1,5 +1,5 @@
1
1
  import { MergeHead, HeadEntryOptions } from '@unhead/schema';
2
- import { V as VueHeadClient, U as UseHeadInput } from './createHead-e9a018ae.js';
2
+ import { V as VueHeadClient, U as UseHeadInput } from './createHead-26c9c4af.js';
3
3
  import 'vue';
4
4
 
5
5
  type VueHeadClientPollyFill<T extends MergeHead> = VueHeadClient<T> & {
package/dist/polyfill.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { u as useHead } from './shared/vue.3c82dacb.mjs';
1
+ import { u as useHead } from './shared/vue.bc44c3fa.mjs';
2
2
  import 'vue';
3
3
  import 'unhead';
4
4
  import '@unhead/shared';
@@ -16,19 +16,13 @@ function resolveUnrefHeadInput(ref, lastKey = "") {
16
16
  if (Array.isArray(root))
17
17
  return root.map((r) => resolveUnrefHeadInput(r, lastKey));
18
18
  if (typeof root === "object") {
19
- let dynamic = false;
20
- const unrefdObj = Object.fromEntries(
19
+ return Object.fromEntries(
21
20
  Object.entries(root).map(([k, v]) => {
22
21
  if (k === "titleTemplate" || k.startsWith("on"))
23
22
  return [k, vue.unref(v)];
24
- if (typeof v === "function" || vue.isRef(v))
25
- dynamic = true;
26
23
  return [k, resolveUnrefHeadInput(v, k)];
27
24
  })
28
25
  );
29
- if (dynamic && shared.HasElementTags.includes(String(lastKey)))
30
- unrefdObj._dynamic = true;
31
- return unrefdObj;
32
26
  }
33
27
  return root;
34
28
  }
@@ -1,6 +1,6 @@
1
- import { unref, isRef, version, getCurrentInstance, inject, nextTick, ref, watchEffect, watch, onBeforeUnmount, onDeactivated, onActivated } from 'vue';
1
+ import { unref, version, getCurrentInstance, inject, nextTick, ref, watchEffect, watch, onBeforeUnmount, onDeactivated, onActivated } from 'vue';
2
2
  import { getActiveHead, createServerHead as createServerHead$1, createHead as createHead$1 } from 'unhead';
3
- import { HasElementTags, defineHeadPlugin } from '@unhead/shared';
3
+ import { defineHeadPlugin } from '@unhead/shared';
4
4
 
5
5
  function resolveUnref(r) {
6
6
  return typeof r === "function" ? r() : unref(r);
@@ -14,19 +14,13 @@ function resolveUnrefHeadInput(ref, lastKey = "") {
14
14
  if (Array.isArray(root))
15
15
  return root.map((r) => resolveUnrefHeadInput(r, lastKey));
16
16
  if (typeof root === "object") {
17
- let dynamic = false;
18
- const unrefdObj = Object.fromEntries(
17
+ return Object.fromEntries(
19
18
  Object.entries(root).map(([k, v]) => {
20
19
  if (k === "titleTemplate" || k.startsWith("on"))
21
20
  return [k, unref(v)];
22
- if (typeof v === "function" || isRef(v))
23
- dynamic = true;
24
21
  return [k, resolveUnrefHeadInput(v, k)];
25
22
  })
26
23
  );
27
- if (dynamic && HasElementTags.includes(String(lastKey)))
28
- unrefdObj._dynamic = true;
29
- return unrefdObj;
30
24
  }
31
25
  return root;
32
26
  }
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@unhead/vue",
3
3
  "type": "module",
4
- "version": "1.1.23",
5
- "packageManager": "pnpm@7.28.0",
4
+ "version": "1.1.25",
5
+ "packageManager": "pnpm@7.30.0",
6
6
  "author": "Harlan Wilton <harlan@harlanzw.com>",
7
7
  "license": "MIT",
8
8
  "funding": "https://github.com/sponsors/harlan-zw",
@@ -38,10 +38,10 @@
38
38
  "vue": ">=2.7 || >=3"
39
39
  },
40
40
  "dependencies": {
41
- "hookable": "^5.4.2",
42
- "@unhead/schema": "1.1.23",
43
- "@unhead/shared": "1.1.23",
44
- "unhead": "1.1.23"
41
+ "hookable": "^5.5.1",
42
+ "@unhead/schema": "1.1.25",
43
+ "@unhead/shared": "1.1.25",
44
+ "unhead": "1.1.25"
45
45
  },
46
46
  "devDependencies": {
47
47
  "vue": "^3.2.47"