@unhead/vue 3.0.0-beta.2 → 3.0.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.
Files changed (39) hide show
  1. package/dist/client.d.mts +1 -1
  2. package/dist/client.d.ts +1 -1
  3. package/dist/client.mjs +7 -9
  4. package/dist/components.mjs +1 -1
  5. package/dist/index.d.mts +8 -29
  6. package/dist/index.d.ts +8 -29
  7. package/dist/index.mjs +5 -9
  8. package/dist/scripts.d.mts +2 -2
  9. package/dist/scripts.d.ts +2 -2
  10. package/dist/scripts.mjs +3 -3
  11. package/dist/server.d.mts +2 -2
  12. package/dist/server.d.ts +2 -2
  13. package/dist/server.mjs +3 -3
  14. package/dist/shared/{vue.Bm-NbY4b.mjs → vue.BAVPDCHt.mjs} +1 -10
  15. package/dist/shared/{vue.DoxLTFJk.d.mts → vue.BW2vTlaC.d.mts} +3 -3
  16. package/dist/shared/{vue.DoxLTFJk.d.ts → vue.BW2vTlaC.d.ts} +3 -3
  17. package/dist/shared/{vue.BVUAdATk.mjs → vue.C-c0vimW.mjs} +1 -1
  18. package/dist/shared/{vue.CeCEzk2b.mjs → vue.CQPP9sR4.mjs} +1 -1
  19. package/dist/stream/client.d.mts +17 -0
  20. package/dist/stream/client.d.ts +17 -0
  21. package/dist/stream/client.mjs +27 -0
  22. package/dist/stream/server.d.mts +50 -0
  23. package/dist/stream/server.d.ts +50 -0
  24. package/dist/stream/server.mjs +43 -0
  25. package/dist/stream/vite.d.mts +27 -0
  26. package/dist/stream/vite.d.ts +27 -0
  27. package/dist/stream/vite.mjs +51 -0
  28. package/dist/types.d.mts +68 -5
  29. package/dist/types.d.ts +68 -5
  30. package/dist/utils.d.mts +1 -6
  31. package/dist/utils.d.ts +1 -6
  32. package/dist/utils.mjs +1 -9
  33. package/package.json +35 -12
  34. package/dist/legacy.d.mts +0 -34
  35. package/dist/legacy.d.ts +0 -34
  36. package/dist/legacy.mjs +0 -114
  37. package/dist/shared/vue.CzjZUNjB.d.ts +0 -63
  38. package/dist/shared/vue.DMlT7xkj.d.mts +0 -63
  39. package/legacy.d.ts +0 -1
package/dist/client.d.mts CHANGED
@@ -2,7 +2,7 @@ import { CreateClientHeadOptions } from 'unhead/types';
2
2
  export { CreateClientHeadOptions } from 'unhead/types';
3
3
  export { V as VueHeadMixin } from './shared/vue.DnywREVF.mjs';
4
4
  export { renderDOMHead } from 'unhead/client';
5
- import { V as VueHeadClient } from './shared/vue.DoxLTFJk.mjs';
5
+ import { V as VueHeadClient } from './shared/vue.BW2vTlaC.mjs';
6
6
  import 'vue';
7
7
 
8
8
  declare function createHead(options?: CreateClientHeadOptions): VueHeadClient;
package/dist/client.d.ts CHANGED
@@ -2,7 +2,7 @@ import { CreateClientHeadOptions } from 'unhead/types';
2
2
  export { CreateClientHeadOptions } from 'unhead/types';
3
3
  export { V as VueHeadMixin } from './shared/vue.DnywREVF.js';
4
4
  export { renderDOMHead } from 'unhead/client';
5
- import { V as VueHeadClient } from './shared/vue.DoxLTFJk.js';
5
+ import { V as VueHeadClient } from './shared/vue.BW2vTlaC.js';
6
6
  import 'vue';
7
7
 
8
8
  declare function createHead(options?: CreateClientHeadOptions): VueHeadClient;
package/dist/client.mjs CHANGED
@@ -1,7 +1,7 @@
1
- import { createHead as createHead$1, createDebouncedFn, renderDOMHead } from 'unhead/client';
1
+ import { createDomRenderer, createDebouncedFn, createHead as createHead$1 } from 'unhead/client';
2
2
  export { renderDOMHead } from 'unhead/client';
3
- import { v as vueInstall } from './shared/vue.Bm-NbY4b.mjs';
4
- export { V as VueHeadMixin } from './shared/vue.BVUAdATk.mjs';
3
+ import { v as vueInstall } from './shared/vue.BAVPDCHt.mjs';
4
+ export { V as VueHeadMixin } from './shared/vue.C-c0vimW.mjs';
5
5
  import 'unhead/plugins';
6
6
  import 'unhead/utils';
7
7
  import 'vue';
@@ -9,12 +9,10 @@ import './shared/vue.N9zWjxoK.mjs';
9
9
 
10
10
  // @__NO_SIDE_EFFECTS__
11
11
  function createHead(options = {}) {
12
- const head = createHead$1({
13
- domOptions: {
14
- render: createDebouncedFn(() => renderDOMHead(head), (fn) => setTimeout(fn, 0))
15
- },
16
- ...options
17
- });
12
+ const domRenderer = createDomRenderer();
13
+ let head;
14
+ const debouncedRenderer = createDebouncedFn(() => domRenderer(head), (fn) => setTimeout(fn, 0));
15
+ head = createHead$1({ render: debouncedRenderer, ...options });
18
16
  head.install = vueInstall(head);
19
17
  return head;
20
18
  }
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, ref, onBeforeUnmount, watchEffect } from 'vue';
2
- import { u as useHead } from './shared/vue.Bm-NbY4b.mjs';
2
+ import { u as useHead } from './shared/vue.BAVPDCHt.mjs';
3
3
  import 'unhead/plugins';
4
4
  import 'unhead/utils';
5
5
  import './shared/vue.N9zWjxoK.mjs';
package/dist/index.d.mts CHANGED
@@ -1,18 +1,14 @@
1
- import { createUnhead } from 'unhead';
2
- export { createUnhead } from 'unhead';
3
1
  import { ActiveHeadEntry } from 'unhead/types';
4
- export { ActiveHeadEntry, AriaAttributes, BodyAttributesWithoutEvents, BodyEvents, DataKeys, GlobalAttributes, Head, HeadEntryOptions, HeadTag, HttpEventAttributes, LinkWithoutEvents, MergeHead, MetaFlat, MetaFlatInput, RawInput, RenderSSRHeadOptions, ResolvableHead, ScriptWithoutEvents, SerializableHead, SpeculationRules, Unhead } from 'unhead/types';
5
- import { V as VueHeadClient, U as UseHeadInput, a as UseHeadOptions, b as UseSeoMetaInput } from './shared/vue.DoxLTFJk.mjs';
6
- export { B as BodyAttr, D as DeepResolvableProperties, H as HtmlAttr, M as MaybeFalsy, l as ReactiveHead, n as ResolvableArray, d as ResolvableBase, k as ResolvableBodyAttributes, j as ResolvableHtmlAttributes, e as ResolvableLink, f as ResolvableMeta, i as ResolvableNoscript, o as ResolvableProperties, h as ResolvableScript, g as ResolvableStyle, R as ResolvableTitle, c as ResolvableTitleTemplate, p as ResolvableUnion, m as ResolvableValue } from './shared/vue.DoxLTFJk.mjs';
7
- import { U as UseHeadSafeInput } from './shared/vue.DMlT7xkj.mjs';
8
- export { H as HeadSafe, S as SafeBodyAttr, a as SafeHtmlAttr, c as SafeLink, b as SafeMeta, e as SafeNoscript, d as SafeScript, f as SafeStyle } from './shared/vue.DMlT7xkj.mjs';
9
- export { AsVoidFunctions, EventHandlerOptions, RecordingEntry, ScriptInstance, UseFunctionType, UseScriptResolvedInput, UseScriptStatus, WarmupStrategy, createSpyProxy, resolveScriptKey } from 'unhead/scripts';
2
+ export { ActiveHeadEntry, AriaAttributes, BodyAttributesWithoutEvents, BodyEvents, DataKeys, GlobalAttributes, HeadEntryOptions, HeadTag, HttpEventAttributes, LinkWithoutEvents, MetaFlat, MetaFlat as MetaFlatInput, RawInput, RenderSSRHeadOptions, ResolvableHead, ScriptWithoutEvents, SerializableHead, SpeculationRules, Unhead } from 'unhead/types';
3
+ import { V as VueHeadClient, m as UseHeadInput, U as UseHeadOptions, n as UseSeoMetaInput } from './shared/vue.BW2vTlaC.mjs';
4
+ export { B as BodyAttr, D as DeepResolvableProperties, b as Head, H as HtmlAttr, M as MaybeFalsy, b as ReactiveHead, o as ResolvableArray, e as ResolvableBase, l as ResolvableBodyAttributes, k as ResolvableHtmlAttributes, f as ResolvableLink, g as ResolvableMeta, j as ResolvableNoscript, a as ResolvableProperties, i as ResolvableScript, h as ResolvableStyle, c as ResolvableTitle, d as ResolvableTitleTemplate, p as ResolvableUnion, R as ResolvableValue } from './shared/vue.BW2vTlaC.mjs';
5
+ import { UseHeadSafeInput } from './types.mjs';
6
+ export { Base, BodyAttributes, HeadSafe, HtmlAttributes, Link, MergeHead, Meta, Noscript, SafeBodyAttr, SafeHtmlAttr, SafeLink, SafeMeta, SafeNoscript, SafeScript, SafeStyle, Script, Style } from './types.mjs';
7
+ export { AsVoidFunctions, EventHandlerOptions, RecordingEntry, ScriptInstance, UseFunctionType, UseScriptResolvedInput, UseScriptStatus, WarmupStrategy, createSpyProxy } from 'unhead/scripts';
10
8
  export { UseScriptContext, UseScriptInput, UseScriptOptions, UseScriptReturn, VueScriptInstance, useScript } from './scripts.mjs';
11
- export { Base, BodyAttributes, HtmlAttributes, Link, Meta, Noscript, Script, Style } from './types.mjs';
12
- export { resolveUnrefHeadInput } from './utils.mjs';
13
9
  export { V as VueHeadMixin } from './shared/vue.DnywREVF.mjs';
10
+ export { createUnhead } from 'unhead';
14
11
  import 'vue';
15
- import 'unhead/utils';
16
12
 
17
13
  declare const unheadVueComposablesImports: {
18
14
  '@unhead/vue': string[];
@@ -22,24 +18,7 @@ declare function injectHead(): VueHeadClient;
22
18
  declare function useHead<I = UseHeadInput>(input?: UseHeadInput, options?: UseHeadOptions): ActiveHeadEntry<I>;
23
19
  declare function useHeadSafe(input?: UseHeadSafeInput, options?: UseHeadOptions): ActiveHeadEntry<UseHeadSafeInput>;
24
20
  declare function useSeoMeta(input?: UseSeoMetaInput, options?: UseHeadOptions): ActiveHeadEntry<UseSeoMetaInput>;
25
- /**
26
- * @deprecated use `useHead` instead.Advanced use cases should tree shake using import.meta.* if statements.
27
- */
28
- declare function useServerHead<I = UseHeadInput>(input?: UseHeadInput, options?: UseHeadOptions): ActiveHeadEntry<I>;
29
- /**
30
- * @deprecated use `useHeadSafe` instead.Advanced use cases should tree shake using import.meta.* if statements.
31
- */
32
- declare function useServerHeadSafe(input?: UseHeadSafeInput, options?: UseHeadOptions): ActiveHeadEntry<UseHeadSafeInput>;
33
- /**
34
- * @deprecated use `useSeoMeta` instead.Advanced use cases should tree shake using import.meta.* if statements.
35
- */
36
- declare function useServerSeoMeta(input?: UseSeoMetaInput, options?: UseHeadOptions): ActiveHeadEntry<UseSeoMetaInput>;
37
21
 
38
22
  declare const headSymbol = "usehead";
39
23
 
40
- /**
41
- * @deprecated Use createUnhead
42
- */
43
- declare const createHeadCore: typeof createUnhead;
44
-
45
- export { UseHeadInput, UseHeadOptions, UseHeadSafeInput, UseSeoMetaInput, VueHeadClient, createHeadCore, headSymbol, injectHead, unheadVueComposablesImports, useHead, useHeadSafe, useSeoMeta, useServerHead, useServerHeadSafe, useServerSeoMeta };
24
+ export { UseHeadInput, UseHeadOptions, UseHeadSafeInput, UseSeoMetaInput, VueHeadClient, headSymbol, injectHead, unheadVueComposablesImports, useHead, useHeadSafe, useSeoMeta };
package/dist/index.d.ts CHANGED
@@ -1,18 +1,14 @@
1
- import { createUnhead } from 'unhead';
2
- export { createUnhead } from 'unhead';
3
1
  import { ActiveHeadEntry } from 'unhead/types';
4
- export { ActiveHeadEntry, AriaAttributes, BodyAttributesWithoutEvents, BodyEvents, DataKeys, GlobalAttributes, Head, HeadEntryOptions, HeadTag, HttpEventAttributes, LinkWithoutEvents, MergeHead, MetaFlat, MetaFlatInput, RawInput, RenderSSRHeadOptions, ResolvableHead, ScriptWithoutEvents, SerializableHead, SpeculationRules, Unhead } from 'unhead/types';
5
- import { V as VueHeadClient, U as UseHeadInput, a as UseHeadOptions, b as UseSeoMetaInput } from './shared/vue.DoxLTFJk.js';
6
- export { B as BodyAttr, D as DeepResolvableProperties, H as HtmlAttr, M as MaybeFalsy, l as ReactiveHead, n as ResolvableArray, d as ResolvableBase, k as ResolvableBodyAttributes, j as ResolvableHtmlAttributes, e as ResolvableLink, f as ResolvableMeta, i as ResolvableNoscript, o as ResolvableProperties, h as ResolvableScript, g as ResolvableStyle, R as ResolvableTitle, c as ResolvableTitleTemplate, p as ResolvableUnion, m as ResolvableValue } from './shared/vue.DoxLTFJk.js';
7
- import { U as UseHeadSafeInput } from './shared/vue.CzjZUNjB.js';
8
- export { H as HeadSafe, S as SafeBodyAttr, a as SafeHtmlAttr, c as SafeLink, b as SafeMeta, e as SafeNoscript, d as SafeScript, f as SafeStyle } from './shared/vue.CzjZUNjB.js';
9
- export { AsVoidFunctions, EventHandlerOptions, RecordingEntry, ScriptInstance, UseFunctionType, UseScriptResolvedInput, UseScriptStatus, WarmupStrategy, createSpyProxy, resolveScriptKey } from 'unhead/scripts';
2
+ export { ActiveHeadEntry, AriaAttributes, BodyAttributesWithoutEvents, BodyEvents, DataKeys, GlobalAttributes, HeadEntryOptions, HeadTag, HttpEventAttributes, LinkWithoutEvents, MetaFlat, MetaFlat as MetaFlatInput, RawInput, RenderSSRHeadOptions, ResolvableHead, ScriptWithoutEvents, SerializableHead, SpeculationRules, Unhead } from 'unhead/types';
3
+ import { V as VueHeadClient, m as UseHeadInput, U as UseHeadOptions, n as UseSeoMetaInput } from './shared/vue.BW2vTlaC.js';
4
+ export { B as BodyAttr, D as DeepResolvableProperties, b as Head, H as HtmlAttr, M as MaybeFalsy, b as ReactiveHead, o as ResolvableArray, e as ResolvableBase, l as ResolvableBodyAttributes, k as ResolvableHtmlAttributes, f as ResolvableLink, g as ResolvableMeta, j as ResolvableNoscript, a as ResolvableProperties, i as ResolvableScript, h as ResolvableStyle, c as ResolvableTitle, d as ResolvableTitleTemplate, p as ResolvableUnion, R as ResolvableValue } from './shared/vue.BW2vTlaC.js';
5
+ import { UseHeadSafeInput } from './types.js';
6
+ export { Base, BodyAttributes, HeadSafe, HtmlAttributes, Link, MergeHead, Meta, Noscript, SafeBodyAttr, SafeHtmlAttr, SafeLink, SafeMeta, SafeNoscript, SafeScript, SafeStyle, Script, Style } from './types.js';
7
+ export { AsVoidFunctions, EventHandlerOptions, RecordingEntry, ScriptInstance, UseFunctionType, UseScriptResolvedInput, UseScriptStatus, WarmupStrategy, createSpyProxy } from 'unhead/scripts';
10
8
  export { UseScriptContext, UseScriptInput, UseScriptOptions, UseScriptReturn, VueScriptInstance, useScript } from './scripts.js';
11
- export { Base, BodyAttributes, HtmlAttributes, Link, Meta, Noscript, Script, Style } from './types.js';
12
- export { resolveUnrefHeadInput } from './utils.js';
13
9
  export { V as VueHeadMixin } from './shared/vue.DnywREVF.js';
10
+ export { createUnhead } from 'unhead';
14
11
  import 'vue';
15
- import 'unhead/utils';
16
12
 
17
13
  declare const unheadVueComposablesImports: {
18
14
  '@unhead/vue': string[];
@@ -22,24 +18,7 @@ declare function injectHead(): VueHeadClient;
22
18
  declare function useHead<I = UseHeadInput>(input?: UseHeadInput, options?: UseHeadOptions): ActiveHeadEntry<I>;
23
19
  declare function useHeadSafe(input?: UseHeadSafeInput, options?: UseHeadOptions): ActiveHeadEntry<UseHeadSafeInput>;
24
20
  declare function useSeoMeta(input?: UseSeoMetaInput, options?: UseHeadOptions): ActiveHeadEntry<UseSeoMetaInput>;
25
- /**
26
- * @deprecated use `useHead` instead.Advanced use cases should tree shake using import.meta.* if statements.
27
- */
28
- declare function useServerHead<I = UseHeadInput>(input?: UseHeadInput, options?: UseHeadOptions): ActiveHeadEntry<I>;
29
- /**
30
- * @deprecated use `useHeadSafe` instead.Advanced use cases should tree shake using import.meta.* if statements.
31
- */
32
- declare function useServerHeadSafe(input?: UseHeadSafeInput, options?: UseHeadOptions): ActiveHeadEntry<UseHeadSafeInput>;
33
- /**
34
- * @deprecated use `useSeoMeta` instead.Advanced use cases should tree shake using import.meta.* if statements.
35
- */
36
- declare function useServerSeoMeta(input?: UseSeoMetaInput, options?: UseHeadOptions): ActiveHeadEntry<UseSeoMetaInput>;
37
21
 
38
22
  declare const headSymbol = "usehead";
39
23
 
40
- /**
41
- * @deprecated Use createUnhead
42
- */
43
- declare const createHeadCore: typeof createUnhead;
44
-
45
- export { UseHeadInput, UseHeadOptions, UseHeadSafeInput, UseSeoMetaInput, VueHeadClient, createHeadCore, headSymbol, injectHead, unheadVueComposablesImports, useHead, useHeadSafe, useSeoMeta, useServerHead, useServerHeadSafe, useServerSeoMeta };
24
+ export { UseHeadInput, UseHeadOptions, UseHeadSafeInput, UseSeoMetaInput, VueHeadClient, headSymbol, injectHead, unheadVueComposablesImports, useHead, useHeadSafe, useSeoMeta };
package/dist/index.mjs CHANGED
@@ -1,9 +1,7 @@
1
- import { createUnhead } from 'unhead';
1
+ export { h as headSymbol, i as injectHead, u as useHead, a as useHeadSafe, b as useSeoMeta } from './shared/vue.BAVPDCHt.mjs';
2
+ export { V as VueHeadMixin } from './shared/vue.C-c0vimW.mjs';
2
3
  export { createUnhead } from 'unhead';
3
- 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.Bm-NbY4b.mjs';
4
- export { resolveUnrefHeadInput } from './utils.mjs';
5
- export { V as VueHeadMixin } from './shared/vue.BVUAdATk.mjs';
6
- export { u as useScript } from './shared/vue.CeCEzk2b.mjs';
4
+ export { u as useScript } from './shared/vue.CQPP9sR4.mjs';
7
5
  import 'unhead/plugins';
8
6
  import 'unhead/utils';
9
7
  import 'vue';
@@ -11,9 +9,7 @@ import './shared/vue.N9zWjxoK.mjs';
11
9
  import 'unhead/scripts';
12
10
 
13
11
  const unheadVueComposablesImports = {
14
- "@unhead/vue": ["injectHead", "useHead", "useSeoMeta", "useHeadSafe", "useServerHead", "useServerSeoMeta", "useServerHeadSafe"]
12
+ "@unhead/vue": ["injectHead", "useHead", "useSeoMeta", "useHeadSafe"]
15
13
  };
16
14
 
17
- const createHeadCore = createUnhead;
18
-
19
- export { createHeadCore, unheadVueComposablesImports };
15
+ export { unheadVueComposablesImports };
@@ -1,8 +1,8 @@
1
1
  import { UseScriptOptions as UseScriptOptions$1, ScriptInstance, UseScriptStatus, UseFunctionType } from 'unhead/scripts';
2
- export { AsVoidFunctions, EventHandlerOptions, RecordingEntry, ScriptInstance, UseFunctionType, UseScriptResolvedInput, UseScriptStatus, WarmupStrategy, createSpyProxy, resolveScriptKey } from 'unhead/scripts';
2
+ export { AsVoidFunctions, EventHandlerOptions, RecordingEntry, ScriptInstance, UseFunctionType, UseScriptResolvedInput, UseScriptStatus, WarmupStrategy, createSpyProxy } from 'unhead/scripts';
3
3
  import { ScriptWithoutEvents, DataKeys, SchemaAugmentations, HeadEntryOptions } from 'unhead/types';
4
4
  import { Ref } from 'vue';
5
- import { o as ResolvableProperties, V as VueHeadClient } from './shared/vue.DoxLTFJk.mjs';
5
+ import { a as ResolvableProperties, V as VueHeadClient } from './shared/vue.BW2vTlaC.mjs';
6
6
 
7
7
  interface VueScriptInstance<T extends Record<symbol | string, any>> extends Omit<ScriptInstance<T>, 'status'> {
8
8
  status: Ref<UseScriptStatus>;
package/dist/scripts.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { UseScriptOptions as UseScriptOptions$1, ScriptInstance, UseScriptStatus, UseFunctionType } from 'unhead/scripts';
2
- export { AsVoidFunctions, EventHandlerOptions, RecordingEntry, ScriptInstance, UseFunctionType, UseScriptResolvedInput, UseScriptStatus, WarmupStrategy, createSpyProxy, resolveScriptKey } from 'unhead/scripts';
2
+ export { AsVoidFunctions, EventHandlerOptions, RecordingEntry, ScriptInstance, UseFunctionType, UseScriptResolvedInput, UseScriptStatus, WarmupStrategy, createSpyProxy } from 'unhead/scripts';
3
3
  import { ScriptWithoutEvents, DataKeys, SchemaAugmentations, HeadEntryOptions } from 'unhead/types';
4
4
  import { Ref } from 'vue';
5
- import { o as ResolvableProperties, V as VueHeadClient } from './shared/vue.DoxLTFJk.js';
5
+ import { a as ResolvableProperties, V as VueHeadClient } from './shared/vue.BW2vTlaC.js';
6
6
 
7
7
  interface VueScriptInstance<T extends Record<symbol | string, any>> extends Omit<ScriptInstance<T>, 'status'> {
8
8
  status: Ref<UseScriptStatus>;
package/dist/scripts.mjs CHANGED
@@ -1,7 +1,7 @@
1
- export { createSpyProxy, resolveScriptKey } from 'unhead/scripts';
2
- export { u as useScript } from './shared/vue.CeCEzk2b.mjs';
1
+ export { createSpyProxy } from 'unhead/scripts';
2
+ export { u as useScript } from './shared/vue.CQPP9sR4.mjs';
3
3
  import 'vue';
4
- import './shared/vue.Bm-NbY4b.mjs';
4
+ import './shared/vue.BAVPDCHt.mjs';
5
5
  import 'unhead/plugins';
6
6
  import 'unhead/utils';
7
7
  import './shared/vue.N9zWjxoK.mjs';
package/dist/server.d.mts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { CreateServerHeadOptions } from 'unhead/types';
2
2
  export { CreateServerHeadOptions } from 'unhead/types';
3
3
  export { V as VueHeadMixin } from './shared/vue.DnywREVF.mjs';
4
- export { SSRHeadPayload, extractUnheadInputFromHtml, propsToString, renderSSRHead, transformHtmlTemplate } from 'unhead/server';
5
- import { V as VueHeadClient } from './shared/vue.DoxLTFJk.mjs';
4
+ export { SSRHeadPayload, propsToString, renderSSRHead, transformHtmlTemplate } from 'unhead/server';
5
+ import { V as VueHeadClient } from './shared/vue.BW2vTlaC.mjs';
6
6
  import 'vue';
7
7
 
8
8
  declare function createHead(options?: Omit<CreateServerHeadOptions, 'propsResolver'>): VueHeadClient;
package/dist/server.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { CreateServerHeadOptions } from 'unhead/types';
2
2
  export { CreateServerHeadOptions } from 'unhead/types';
3
3
  export { V as VueHeadMixin } from './shared/vue.DnywREVF.js';
4
- export { SSRHeadPayload, extractUnheadInputFromHtml, propsToString, renderSSRHead, transformHtmlTemplate } from 'unhead/server';
5
- import { V as VueHeadClient } from './shared/vue.DoxLTFJk.js';
4
+ export { SSRHeadPayload, propsToString, renderSSRHead, transformHtmlTemplate } from 'unhead/server';
5
+ import { V as VueHeadClient } from './shared/vue.BW2vTlaC.js';
6
6
  import 'vue';
7
7
 
8
8
  declare function createHead(options?: Omit<CreateServerHeadOptions, 'propsResolver'>): VueHeadClient;
package/dist/server.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  import { createHead as createHead$1 } from 'unhead/server';
2
- export { extractUnheadInputFromHtml, propsToString, renderSSRHead, transformHtmlTemplate } from 'unhead/server';
3
- import { v as vueInstall } from './shared/vue.Bm-NbY4b.mjs';
2
+ export { propsToString, renderSSRHead, transformHtmlTemplate } from 'unhead/server';
3
+ import { v as vueInstall } from './shared/vue.BAVPDCHt.mjs';
4
4
  import { V as VueResolver } from './shared/vue.N9zWjxoK.mjs';
5
- export { V as VueHeadMixin } from './shared/vue.BVUAdATk.mjs';
5
+ export { V as VueHeadMixin } from './shared/vue.C-c0vimW.mjs';
6
6
  import 'unhead/plugins';
7
7
  import 'unhead/utils';
8
8
  import 'vue';
@@ -72,14 +72,5 @@ function useSeoMeta(input = {}, options = {}) {
72
72
  _flatMeta: meta
73
73
  }, options);
74
74
  }
75
- function useServerHead(input, options = {}) {
76
- return useHead(input, { ...options, mode: "server" });
77
- }
78
- function useServerHeadSafe(input, options = {}) {
79
- return useHeadSafe(input, { ...options, mode: "server" });
80
- }
81
- function useServerSeoMeta(input, options = {}) {
82
- return useSeoMeta(input, { ...options, mode: "server" });
83
- }
84
75
 
85
- export { useHeadSafe as a, useSeoMeta as b, useServerHead as c, useServerHeadSafe as d, useServerSeoMeta as e, headSymbol as h, injectHead as i, useHead as u, vueInstall as v };
76
+ export { useHeadSafe as a, useSeoMeta as b, headSymbol as h, injectHead as i, useHead as u, vueInstall as v };
@@ -1,4 +1,4 @@
1
- import { Stringable, SchemaAugmentations, ResolvableTitleTemplate as ResolvableTitleTemplate$1, Base, LinkWithoutEvents, DataKeys, MaybeEventFnHandlers, HttpEventAttributes, UnheadMeta, Style, ScriptWithoutEvents, Noscript, HtmlAttributes, MaybeArray, BodyAttributesWithoutEvents, BodyEvents, Unhead, HeadEntryOptions, MetaFlatInput } from 'unhead/types';
1
+ import { Stringable, SchemaAugmentations, ResolvableTitleTemplate as ResolvableTitleTemplate$1, Base, LinkWithoutEvents, DataKeys, MaybeEventFnHandlers, HttpEventAttributes, UnheadMeta, Style, ScriptWithoutEvents, Noscript, HtmlAttributes, MaybeArray, BodyAttributesWithoutEvents, BodyEvents, Unhead, HeadEntryOptions, MetaFlat } from 'unhead/types';
2
2
  import { ComputedRef, Ref, CSSProperties, Plugin } from 'vue';
3
3
 
4
4
  type Falsy = false | null | undefined;
@@ -129,10 +129,10 @@ type UseHeadOptions = Omit<HeadEntryOptions, 'head'> & {
129
129
  head?: VueHeadClient<any>;
130
130
  };
131
131
  type UseHeadInput<Deprecated = never> = ResolvableValue<ReactiveHead>;
132
- type UseSeoMetaInput = ResolvableProperties<MetaFlatInput> & {
132
+ type UseSeoMetaInput = ResolvableProperties<MetaFlat> & {
133
133
  title?: ReactiveHead['title'];
134
134
  titleTemplate?: ReactiveHead['titleTemplate'];
135
135
  };
136
136
  type VueHeadClient<I = UseHeadInput> = Unhead<I> & Plugin;
137
137
 
138
- export type { BodyAttr as B, DeepResolvableProperties as D, HtmlAttr as H, MaybeFalsy as M, ResolvableTitle as R, UseHeadInput as U, VueHeadClient as V, UseHeadOptions as a, UseSeoMetaInput as b, ResolvableTitleTemplate as c, ResolvableBase as d, ResolvableLink as e, ResolvableMeta as f, ResolvableStyle as g, ResolvableScript as h, ResolvableNoscript as i, ResolvableHtmlAttributes as j, ResolvableBodyAttributes as k, ReactiveHead as l, ResolvableValue as m, ResolvableArray as n, ResolvableProperties as o, ResolvableUnion as p };
138
+ export type { BodyAttr as B, DeepResolvableProperties as D, HtmlAttr as H, MaybeFalsy as M, ResolvableValue as R, UseHeadOptions as U, VueHeadClient as V, ResolvableProperties as a, ReactiveHead as b, ResolvableTitle as c, ResolvableTitleTemplate as d, ResolvableBase as e, ResolvableLink as f, ResolvableMeta as g, ResolvableStyle as h, ResolvableScript as i, ResolvableNoscript as j, ResolvableHtmlAttributes as k, ResolvableBodyAttributes as l, UseHeadInput as m, UseSeoMetaInput as n, ResolvableArray as o, ResolvableUnion as p };
@@ -1,4 +1,4 @@
1
- import { Stringable, SchemaAugmentations, ResolvableTitleTemplate as ResolvableTitleTemplate$1, Base, LinkWithoutEvents, DataKeys, MaybeEventFnHandlers, HttpEventAttributes, UnheadMeta, Style, ScriptWithoutEvents, Noscript, HtmlAttributes, MaybeArray, BodyAttributesWithoutEvents, BodyEvents, Unhead, HeadEntryOptions, MetaFlatInput } from 'unhead/types';
1
+ import { Stringable, SchemaAugmentations, ResolvableTitleTemplate as ResolvableTitleTemplate$1, Base, LinkWithoutEvents, DataKeys, MaybeEventFnHandlers, HttpEventAttributes, UnheadMeta, Style, ScriptWithoutEvents, Noscript, HtmlAttributes, MaybeArray, BodyAttributesWithoutEvents, BodyEvents, Unhead, HeadEntryOptions, MetaFlat } from 'unhead/types';
2
2
  import { ComputedRef, Ref, CSSProperties, Plugin } from 'vue';
3
3
 
4
4
  type Falsy = false | null | undefined;
@@ -129,10 +129,10 @@ type UseHeadOptions = Omit<HeadEntryOptions, 'head'> & {
129
129
  head?: VueHeadClient<any>;
130
130
  };
131
131
  type UseHeadInput<Deprecated = never> = ResolvableValue<ReactiveHead>;
132
- type UseSeoMetaInput = ResolvableProperties<MetaFlatInput> & {
132
+ type UseSeoMetaInput = ResolvableProperties<MetaFlat> & {
133
133
  title?: ReactiveHead['title'];
134
134
  titleTemplate?: ReactiveHead['titleTemplate'];
135
135
  };
136
136
  type VueHeadClient<I = UseHeadInput> = Unhead<I> & Plugin;
137
137
 
138
- export type { BodyAttr as B, DeepResolvableProperties as D, HtmlAttr as H, MaybeFalsy as M, ResolvableTitle as R, UseHeadInput as U, VueHeadClient as V, UseHeadOptions as a, UseSeoMetaInput as b, ResolvableTitleTemplate as c, ResolvableBase as d, ResolvableLink as e, ResolvableMeta as f, ResolvableStyle as g, ResolvableScript as h, ResolvableNoscript as i, ResolvableHtmlAttributes as j, ResolvableBodyAttributes as k, ReactiveHead as l, ResolvableValue as m, ResolvableArray as n, ResolvableProperties as o, ResolvableUnion as p };
138
+ export type { BodyAttr as B, DeepResolvableProperties as D, HtmlAttr as H, MaybeFalsy as M, ResolvableValue as R, UseHeadOptions as U, VueHeadClient as V, ResolvableProperties as a, ReactiveHead as b, ResolvableTitle as c, ResolvableTitleTemplate as d, ResolvableBase as e, ResolvableLink as f, ResolvableMeta as g, ResolvableStyle as h, ResolvableScript as i, ResolvableNoscript as j, ResolvableHtmlAttributes as k, ResolvableBodyAttributes as l, UseHeadInput as m, UseSeoMetaInput as n, ResolvableArray as o, ResolvableUnion as p };
@@ -1,5 +1,5 @@
1
1
  import { getCurrentInstance } from 'vue';
2
- import { u as useHead } from './vue.Bm-NbY4b.mjs';
2
+ import { u as useHead } from './vue.BAVPDCHt.mjs';
3
3
 
4
4
  const VueHeadMixin = {
5
5
  created() {
@@ -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.Bm-NbY4b.mjs';
3
+ import { i as injectHead } from './vue.BAVPDCHt.mjs';
4
4
 
5
5
  function registerVueScopeHandlers(script, scope) {
6
6
  if (!scope) {
@@ -0,0 +1,17 @@
1
+ import * as vue from 'vue';
2
+ import { CreateStreamableClientHeadOptions } from 'unhead/stream/client';
3
+ export { CreateStreamableClientHeadOptions, UnheadStreamQueue } from 'unhead/stream/client';
4
+ export { V as VueHeadMixin } from '../shared/vue.DnywREVF.mjs';
5
+ import { V as VueHeadClient } from '../shared/vue.BW2vTlaC.mjs';
6
+ import 'unhead/types';
7
+
8
+ /**
9
+ * Client-side HeadStream - renders nothing (script already executed during SSR streaming)
10
+ */
11
+ declare const HeadStream: vue.DefineComponent<{}, () => null, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
12
+ /**
13
+ * Creates a client head by wrapping the core instance from the iife script.
14
+ */
15
+ declare function createStreamableHead(options?: CreateStreamableClientHeadOptions): VueHeadClient | undefined;
16
+
17
+ export { HeadStream, VueHeadClient, createStreamableHead };
@@ -0,0 +1,17 @@
1
+ import * as vue from 'vue';
2
+ import { CreateStreamableClientHeadOptions } from 'unhead/stream/client';
3
+ export { CreateStreamableClientHeadOptions, UnheadStreamQueue } from 'unhead/stream/client';
4
+ export { V as VueHeadMixin } from '../shared/vue.DnywREVF.js';
5
+ import { V as VueHeadClient } from '../shared/vue.BW2vTlaC.js';
6
+ import 'unhead/types';
7
+
8
+ /**
9
+ * Client-side HeadStream - renders nothing (script already executed during SSR streaming)
10
+ */
11
+ declare const HeadStream: vue.DefineComponent<{}, () => null, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
12
+ /**
13
+ * Creates a client head by wrapping the core instance from the iife script.
14
+ */
15
+ declare function createStreamableHead(options?: CreateStreamableClientHeadOptions): VueHeadClient | undefined;
16
+
17
+ export { HeadStream, VueHeadClient, createStreamableHead };
@@ -0,0 +1,27 @@
1
+ import { createStreamableHead as createStreamableHead$1 } from 'unhead/stream/client';
2
+ import { defineComponent } from 'vue';
3
+ import { v as vueInstall } from '../shared/vue.BAVPDCHt.mjs';
4
+ import { V as VueResolver } from '../shared/vue.N9zWjxoK.mjs';
5
+ export { V as VueHeadMixin } from '../shared/vue.C-c0vimW.mjs';
6
+ import 'unhead/plugins';
7
+ import 'unhead/utils';
8
+
9
+ const HeadStream = defineComponent({
10
+ name: "HeadStream",
11
+ setup() {
12
+ return () => null;
13
+ }
14
+ });
15
+ // @__NO_SIDE_EFFECTS__
16
+ function createStreamableHead(options = {}) {
17
+ const head = createStreamableHead$1({
18
+ ...options,
19
+ propResolvers: [VueResolver, ...options.propResolvers || []]
20
+ });
21
+ if (head) {
22
+ head.install = vueInstall(head);
23
+ }
24
+ return head;
25
+ }
26
+
27
+ export { HeadStream, createStreamableHead };
@@ -0,0 +1,50 @@
1
+ import * as vue from 'vue';
2
+ import { WebStreamableHeadContext } from 'unhead/stream/server';
3
+ export { CreateStreamableServerHeadOptions, StreamingTemplateParts, prepareStreamingTemplate, renderSSRHeadShell, renderSSRHeadSuspenseChunk, wrapStream } from 'unhead/stream/server';
4
+ import { ResolvableHead, CreateStreamableServerHeadOptions } from 'unhead/types';
5
+ import { V as VueHeadClient } from '../shared/vue.BW2vTlaC.mjs';
6
+
7
+ /**
8
+ * Streaming script component - outputs inline script with current head state.
9
+ * The Vite plugin with streaming: true auto-injects this.
10
+ */
11
+ declare const HeadStream: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
12
+ [key: string]: any;
13
+ }> | null, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
14
+ /**
15
+ * Vue-specific context returned by createStreamableHead.
16
+ * Extends WebStreamableHeadContext with Vue-specific head type.
17
+ */
18
+ interface VueStreamableHeadContext extends Omit<WebStreamableHeadContext<ResolvableHead>, 'head'> {
19
+ /**
20
+ * The Vue head instance to use with app.use(head)
21
+ */
22
+ head: VueHeadClient;
23
+ }
24
+ /**
25
+ * Creates a head instance configured for Vue streaming SSR.
26
+ *
27
+ * @example
28
+ * ```ts
29
+ * export async function render(url: string, template: string) {
30
+ * const { app, router } = createApp()
31
+ * const { head, wrapStream } = createStreamableHead()
32
+ *
33
+ * app.use(head)
34
+ * app.mixin(VueHeadMixin)
35
+ * router.push(url)
36
+ *
37
+ * // Create stream first - Vue starts rendering synchronously
38
+ * const vueStream = renderToWebStream(app)
39
+ *
40
+ * // Wait for router - by now Vue's sync render has pushed head entries
41
+ * await router.isReady()
42
+ *
43
+ * return wrapStream(vueStream, template)
44
+ * }
45
+ * ```
46
+ */
47
+ declare function createStreamableHead(options?: Omit<CreateStreamableServerHeadOptions, 'propsResolver'>): VueStreamableHeadContext;
48
+
49
+ export { HeadStream, VueHeadClient, createStreamableHead };
50
+ export type { VueStreamableHeadContext };
@@ -0,0 +1,50 @@
1
+ import * as vue from 'vue';
2
+ import { WebStreamableHeadContext } from 'unhead/stream/server';
3
+ export { CreateStreamableServerHeadOptions, StreamingTemplateParts, prepareStreamingTemplate, renderSSRHeadShell, renderSSRHeadSuspenseChunk, wrapStream } from 'unhead/stream/server';
4
+ import { ResolvableHead, CreateStreamableServerHeadOptions } from 'unhead/types';
5
+ import { V as VueHeadClient } from '../shared/vue.BW2vTlaC.js';
6
+
7
+ /**
8
+ * Streaming script component - outputs inline script with current head state.
9
+ * The Vite plugin with streaming: true auto-injects this.
10
+ */
11
+ declare const HeadStream: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
12
+ [key: string]: any;
13
+ }> | null, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
14
+ /**
15
+ * Vue-specific context returned by createStreamableHead.
16
+ * Extends WebStreamableHeadContext with Vue-specific head type.
17
+ */
18
+ interface VueStreamableHeadContext extends Omit<WebStreamableHeadContext<ResolvableHead>, 'head'> {
19
+ /**
20
+ * The Vue head instance to use with app.use(head)
21
+ */
22
+ head: VueHeadClient;
23
+ }
24
+ /**
25
+ * Creates a head instance configured for Vue streaming SSR.
26
+ *
27
+ * @example
28
+ * ```ts
29
+ * export async function render(url: string, template: string) {
30
+ * const { app, router } = createApp()
31
+ * const { head, wrapStream } = createStreamableHead()
32
+ *
33
+ * app.use(head)
34
+ * app.mixin(VueHeadMixin)
35
+ * router.push(url)
36
+ *
37
+ * // Create stream first - Vue starts rendering synchronously
38
+ * const vueStream = renderToWebStream(app)
39
+ *
40
+ * // Wait for router - by now Vue's sync render has pushed head entries
41
+ * await router.isReady()
42
+ *
43
+ * return wrapStream(vueStream, template)
44
+ * }
45
+ * ```
46
+ */
47
+ declare function createStreamableHead(options?: Omit<CreateStreamableServerHeadOptions, 'propsResolver'>): VueStreamableHeadContext;
48
+
49
+ export { HeadStream, VueHeadClient, createStreamableHead };
50
+ export type { VueStreamableHeadContext };
@@ -0,0 +1,43 @@
1
+ import { renderSSRHeadSuspenseChunk, createStreamableHead as createStreamableHead$1, wrapStream } from 'unhead/stream/server';
2
+ export { prepareStreamingTemplate, renderSSRHeadShell, renderSSRHeadSuspenseChunk, wrapStream } from 'unhead/stream/server';
3
+ import { defineComponent, h } from 'vue';
4
+ import { i as injectHead, v as vueInstall } from '../shared/vue.BAVPDCHt.mjs';
5
+ import { V as VueResolver } from '../shared/vue.N9zWjxoK.mjs';
6
+ import 'unhead/plugins';
7
+ import 'unhead/utils';
8
+
9
+ const HeadStream = defineComponent({
10
+ name: "HeadStream",
11
+ setup() {
12
+ const head = injectHead();
13
+ return () => {
14
+ if (!head._shellRendered?.())
15
+ return null;
16
+ const update = renderSSRHeadSuspenseChunk(head);
17
+ if (!update)
18
+ return null;
19
+ return h("script", { innerHTML: update });
20
+ };
21
+ }
22
+ });
23
+ function createStreamableHead(options = {}) {
24
+ const { head } = createStreamableHead$1({
25
+ ...options,
26
+ propResolvers: [VueResolver]
27
+ });
28
+ const vueHead = head;
29
+ vueHead.install = vueInstall(vueHead);
30
+ let shellRendered = false;
31
+ vueHead._shellRendered = () => shellRendered;
32
+ return {
33
+ head: vueHead,
34
+ wrapStream: (stream, template) => {
35
+ const preRenderedState = vueHead.render();
36
+ vueHead.entries.clear();
37
+ shellRendered = true;
38
+ return wrapStream(vueHead, stream, template, preRenderedState);
39
+ }
40
+ };
41
+ }
42
+
43
+ export { HeadStream, createStreamableHead };
@@ -0,0 +1,27 @@
1
+ import * as vite from 'vite';
2
+ import { StreamingPluginOptions } from 'unhead/stream/vite';
3
+
4
+ /**
5
+ * Vite plugin for Vue streaming SSR support.
6
+ * Automatically injects HeadStream components into Vue SFC templates.
7
+ *
8
+ * @returns Vite plugin configuration object with:
9
+ * - `name`: Plugin identifier
10
+ * - `enforce`: Plugin execution order ('pre')
11
+ * - `transform`: Transform hook for processing .vue files
12
+ *
13
+ * @example
14
+ * ```ts
15
+ * // vite.config.ts
16
+ * import { unheadVuePlugin } from '@unhead/vue/stream/vite'
17
+ *
18
+ * export default {
19
+ * plugins: [
20
+ * unheadVuePlugin()
21
+ * ]
22
+ * }
23
+ * ```
24
+ */
25
+ declare function unheadVuePlugin(options?: Pick<StreamingPluginOptions, 'mode'>): vite.Plugin<any>;
26
+
27
+ export { unheadVuePlugin as default, unheadVuePlugin };
@@ -0,0 +1,27 @@
1
+ import * as vite from 'vite';
2
+ import { StreamingPluginOptions } from 'unhead/stream/vite';
3
+
4
+ /**
5
+ * Vite plugin for Vue streaming SSR support.
6
+ * Automatically injects HeadStream components into Vue SFC templates.
7
+ *
8
+ * @returns Vite plugin configuration object with:
9
+ * - `name`: Plugin identifier
10
+ * - `enforce`: Plugin execution order ('pre')
11
+ * - `transform`: Transform hook for processing .vue files
12
+ *
13
+ * @example
14
+ * ```ts
15
+ * // vite.config.ts
16
+ * import { unheadVuePlugin } from '@unhead/vue/stream/vite'
17
+ *
18
+ * export default {
19
+ * plugins: [
20
+ * unheadVuePlugin()
21
+ * ]
22
+ * }
23
+ * ```
24
+ */
25
+ declare function unheadVuePlugin(options?: Pick<StreamingPluginOptions, 'mode'>): vite.Plugin<any>;
26
+
27
+ export { unheadVuePlugin as default, unheadVuePlugin };