@unhead/vue 3.0.1 → 3.0.3

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.d.mts CHANGED
@@ -8,7 +8,7 @@ export { AsVoidFunctions, EventHandlerOptions, RecordingEntry, ScriptInstance, U
8
8
  export { UseScriptContext, UseScriptInput, UseScriptOptions, UseScriptReturn, VueScriptInstance, useScript } from './scripts.mjs';
9
9
  export { resolveUnrefHeadInput } from './utils.mjs';
10
10
  export { V as VueHeadMixin } from './shared/vue.DnywREVF.mjs';
11
- export { createUnhead } from 'unhead';
11
+ export { createUnhead, defineLink, defineScript } from 'unhead';
12
12
  import 'vue';
13
13
  import 'unhead/utils';
14
14
 
package/dist/index.d.ts CHANGED
@@ -8,7 +8,7 @@ export { AsVoidFunctions, EventHandlerOptions, RecordingEntry, ScriptInstance, U
8
8
  export { UseScriptContext, UseScriptInput, UseScriptOptions, UseScriptReturn, VueScriptInstance, useScript } from './scripts.js';
9
9
  export { resolveUnrefHeadInput } from './utils.js';
10
10
  export { V as VueHeadMixin } from './shared/vue.DnywREVF.js';
11
- export { createUnhead } from 'unhead';
11
+ export { createUnhead, defineLink, defineScript } from 'unhead';
12
12
  import 'vue';
13
13
  import 'unhead/utils';
14
14
 
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  export { h as headSymbol, i as injectHead, u as useHead, a as useHeadSafe, b as useSeoMeta, c as useServerHead, d as useServerHeadSafe, e as useServerSeoMeta } from './shared/vue.D51lypTh.mjs';
2
2
  export { resolveUnrefHeadInput } from './utils.mjs';
3
3
  export { V as VueHeadMixin } from './shared/vue.C54fV9ES.mjs';
4
- export { createUnhead } from 'unhead';
4
+ export { createUnhead, defineLink, defineScript } from 'unhead';
5
5
  export { u as useScript } from './shared/vue.CC8Cvdls.mjs';
6
6
  import 'unhead/plugins';
7
7
  import 'unhead/utils';
package/dist/legacy.d.mts CHANGED
@@ -1,6 +1,25 @@
1
- export { createHead } from './client.mjs';
1
+ import { CreateClientHeadOptions, CreateServerHeadOptions, SSRHeadPayload, HeadPluginInput } from 'unhead/types';
2
2
  export { CreateClientHeadOptions } from 'unhead/types';
3
- export { V as VueHeadClient } from './shared/vue.CajUUuy2.mjs';
3
+ export { createHead as createClientHead } from './client.mjs';
4
+ import { V as VueHeadClient, U as UseHeadInput } from './shared/vue.CajUUuy2.mjs';
4
5
  export { V as VueHeadMixin } from './shared/vue.DnywREVF.mjs';
5
6
  export { renderDOMHead } from 'unhead/client';
6
7
  import 'vue';
8
+
9
+ /**
10
+ * The full v2 migration plugin set applied by the legacy `createHead`/`createServerHead`.
11
+ * Export so users with a custom `createHead` can opt into one-line v2 compatibility.
12
+ */
13
+ declare const legacyPlugins: HeadPluginInput[];
14
+ /**
15
+ * Creates a client `VueHeadClient` with the v2 migration plugin set pre-registered so that
16
+ * tag props (`children`, `hid`, `vmid`, `body`), promise resolution, template params, and
17
+ * alias sorting continue to work during the migration to v3.
18
+ */
19
+ declare function createHead(options?: CreateClientHeadOptions): VueHeadClient<UseHeadInput, boolean>;
20
+ /**
21
+ * Creates a server `VueHeadClient` with the v2 migration plugin set pre-registered.
22
+ */
23
+ declare function createServerHead(options?: Omit<CreateServerHeadOptions, 'propResolvers'>): VueHeadClient<UseHeadInput, SSRHeadPayload>;
24
+
25
+ export { VueHeadClient, createHead, createServerHead, legacyPlugins };
package/dist/legacy.d.ts CHANGED
@@ -1,6 +1,25 @@
1
- export { createHead } from './client.js';
1
+ import { CreateClientHeadOptions, CreateServerHeadOptions, SSRHeadPayload, HeadPluginInput } from 'unhead/types';
2
2
  export { CreateClientHeadOptions } from 'unhead/types';
3
- export { V as VueHeadClient } from './shared/vue.CajUUuy2.js';
3
+ export { createHead as createClientHead } from './client.js';
4
+ import { V as VueHeadClient, U as UseHeadInput } from './shared/vue.CajUUuy2.js';
4
5
  export { V as VueHeadMixin } from './shared/vue.DnywREVF.js';
5
6
  export { renderDOMHead } from 'unhead/client';
6
7
  import 'vue';
8
+
9
+ /**
10
+ * The full v2 migration plugin set applied by the legacy `createHead`/`createServerHead`.
11
+ * Export so users with a custom `createHead` can opt into one-line v2 compatibility.
12
+ */
13
+ declare const legacyPlugins: HeadPluginInput[];
14
+ /**
15
+ * Creates a client `VueHeadClient` with the v2 migration plugin set pre-registered so that
16
+ * tag props (`children`, `hid`, `vmid`, `body`), promise resolution, template params, and
17
+ * alias sorting continue to work during the migration to v3.
18
+ */
19
+ declare function createHead(options?: CreateClientHeadOptions): VueHeadClient<UseHeadInput, boolean>;
20
+ /**
21
+ * Creates a server `VueHeadClient` with the v2 migration plugin set pre-registered.
22
+ */
23
+ declare function createServerHead(options?: Omit<CreateServerHeadOptions, 'propResolvers'>): VueHeadClient<UseHeadInput, SSRHeadPayload>;
24
+
25
+ export { VueHeadClient, createHead, createServerHead, legacyPlugins };
package/dist/legacy.mjs CHANGED
@@ -1,10 +1,29 @@
1
- export { createHead } from './client.mjs';
1
+ import { DeprecationsPlugin } from 'unhead/legacy';
2
+ import { PromisesPlugin, TemplateParamsPlugin, AliasSortingPlugin } from 'unhead/plugins';
3
+ import { createHead as createHead$1 } from './client.mjs';
4
+ import { createHead as createHead$2 } from './server.mjs';
2
5
  export { V as VueHeadMixin } from './shared/vue.C54fV9ES.mjs';
3
6
  export { renderDOMHead } from 'unhead/client';
4
7
  import './shared/vue.D51lypTh.mjs';
5
- import 'unhead/plugins';
6
8
  import 'unhead/utils';
7
9
  import 'vue';
8
10
  import './shared/vue.CkLIG7eN.mjs';
11
+ import 'unhead/server';
9
12
 
10
- console.warn("[unhead] `@unhead/vue/legacy` is deprecated. Import from `@unhead/vue/client` or `@unhead/vue/server` instead.");
13
+ const legacyPlugins = [DeprecationsPlugin, PromisesPlugin, TemplateParamsPlugin, AliasSortingPlugin];
14
+ // @__NO_SIDE_EFFECTS__
15
+ function createHead(options = {}) {
16
+ return createHead$1({
17
+ ...options,
18
+ plugins: [...legacyPlugins, ...options.plugins || []]
19
+ });
20
+ }
21
+ // @__NO_SIDE_EFFECTS__
22
+ function createServerHead(options = {}) {
23
+ return createHead$2({
24
+ ...options,
25
+ plugins: [...legacyPlugins, ...options.plugins || []]
26
+ });
27
+ }
28
+
29
+ export { createHead$1 as createClientHead, createHead, createServerHead, legacyPlugins };
@@ -10,7 +10,7 @@ interface VueScriptInstance<T extends Record<symbol | string, any>> extends Omit
10
10
  type UseScriptInput = string | (ResolvableProperties<Omit<GenericScript & DataKeys & SchemaAugmentations['script'], 'src'>> & {
11
11
  src: string;
12
12
  });
13
- interface UseScriptOptions<T extends Record<symbol | string, any> = Record<string, any>> extends Omit<HeadEntryOptions, 'head'>, Pick<UseScriptOptions$1<T>, 'use' | 'eventContext' | 'beforeInit'> {
13
+ interface UseScriptOptions<T extends Record<symbol | string, any> = Record<string, any>> extends Omit<HeadEntryOptions, 'head'>, Partial<Pick<UseScriptOptions$1<T>, 'use' | 'eventContext' | 'beforeInit'>> {
14
14
  /**
15
15
  * The trigger to load the script:
16
16
  * - `undefined` | `client` - (Default) Load the script on the client when this js is loaded.
package/dist/scripts.d.ts CHANGED
@@ -10,7 +10,7 @@ interface VueScriptInstance<T extends Record<symbol | string, any>> extends Omit
10
10
  type UseScriptInput = string | (ResolvableProperties<Omit<GenericScript & DataKeys & SchemaAugmentations['script'], 'src'>> & {
11
11
  src: string;
12
12
  });
13
- interface UseScriptOptions<T extends Record<symbol | string, any> = Record<string, any>> extends Omit<HeadEntryOptions, 'head'>, Pick<UseScriptOptions$1<T>, 'use' | 'eventContext' | 'beforeInit'> {
13
+ interface UseScriptOptions<T extends Record<symbol | string, any> = Record<string, any>> extends Omit<HeadEntryOptions, 'head'>, Partial<Pick<UseScriptOptions$1<T>, 'use' | 'eventContext' | 'beforeInit'>> {
14
14
  /**
15
15
  * The trigger to load the script:
16
16
  * - `undefined` | `client` - (Default) Load the script on the client when this js is loaded.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@unhead/vue",
3
3
  "type": "module",
4
- "version": "3.0.1",
4
+ "version": "3.0.3",
5
5
  "description": "Full-stack <head> manager built for Vue.",
6
6
  "author": "Harlan Wilton <harlan@harlanzw.com>",
7
7
  "license": "MIT",
@@ -147,8 +147,8 @@
147
147
  "magic-string": "^0.30.21",
148
148
  "oxc-parser": "^0.124.0",
149
149
  "oxc-walker": "^0.7.0",
150
- "@unhead/bundler": "3.0.1",
151
- "unhead": "3.0.1"
150
+ "unhead": "3.0.3",
151
+ "@unhead/bundler": "3.0.3"
152
152
  },
153
153
  "devDependencies": {
154
154
  "@vue/server-renderer": "^3.5.32",