@unhead/vue 2.0.0-alpha.23 → 2.0.0-alpha.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.
package/dist/client.d.mts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { MergeHead, CreateClientHeadOptions } from 'unhead/types';
2
2
  export { V as VueHeadMixin } from './shared/vue.DnywREVF.mjs';
3
3
  export { renderDOMHead } from 'unhead/client';
4
- import { V as VueHeadClient } from './shared/vue.C97gXjQS.mjs';
4
+ import { V as VueHeadClient } from './shared/vue.CZ-wp2QU.mjs';
5
5
  import 'vue';
6
6
 
7
7
  declare function createHead<T extends MergeHead>(options?: CreateClientHeadOptions): VueHeadClient<T>;
package/dist/client.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { MergeHead, CreateClientHeadOptions } from 'unhead/types';
2
2
  export { V as VueHeadMixin } from './shared/vue.DnywREVF.js';
3
3
  export { renderDOMHead } from 'unhead/client';
4
- import { V as VueHeadClient } from './shared/vue.C97gXjQS.js';
4
+ import { V as VueHeadClient } from './shared/vue.CZ-wp2QU.js';
5
5
  import 'vue';
6
6
 
7
7
  declare function createHead<T extends MergeHead>(options?: CreateClientHeadOptions): VueHeadClient<T>;
package/dist/index.d.mts CHANGED
@@ -1,8 +1,8 @@
1
1
  export { createHeadCore } from 'unhead';
2
2
  import { MergeHead, ActiveHeadEntry } from 'unhead/types';
3
- export { ActiveHeadEntry, Head, HeadEntryOptions, HeadTag, MergeHead, RenderSSRHeadOptions, ResolvedBase, ResolvedBodyAttributes, ResolvedHead, ResolvedHtmlAttributes, ResolvedLink, ResolvedMeta, ResolvedNoscript, ResolvedScript, ResolvedStyle, ResolvedTitle, ResolvedTitleTemplate, Unhead } from 'unhead/types';
4
- import { V as VueHeadClient, U as UseHeadInput, a as UseHeadOptions, b as UseSeoMetaInput } from './shared/vue.C97gXjQS.mjs';
5
- export { d as Base, B as BodyAttr, g as BodyAttributes, H as HtmlAttr, f as HtmlAttributes, L as Link, h as MaybeFalsey, M as Meta, N as Noscript, R as ReactiveHead, j as ResolvableArray, k as ResolvableProperties, i as ResolvableValue, e as Script, S as Style, T as Title, c as TitleTemplate } from './shared/vue.C97gXjQS.mjs';
3
+ export { ActiveHeadEntry, Head, HeadEntryOptions, HeadTag, MergeHead, RenderSSRHeadOptions, ResolvableHead, ResolvedBase, ResolvedBodyAttributes, ResolvedHead, ResolvedHtmlAttributes, ResolvedLink, ResolvedMeta, ResolvedNoscript, ResolvedScript, ResolvedStyle, ResolvedTitle, ResolvedTitleTemplate, Unhead } from 'unhead/types';
4
+ import { V as VueHeadClient, U as UseHeadInput, a as UseHeadOptions, b as UseSeoMetaInput } from './shared/vue.CZ-wp2QU.mjs';
5
+ export { d as Base, B as BodyAttr, g as BodyAttributes, H as HtmlAttr, f as HtmlAttributes, L as Link, i as MaybeFalsey, M as Meta, N as Noscript, h as ReactiveHead, k as ResolvableArray, R as ResolvableProperties, j as ResolvableValue, e as Script, S as Style, T as Title, c as TitleTemplate } from './shared/vue.CZ-wp2QU.mjs';
6
6
  import { UseHeadSafeInput } from './types.mjs';
7
7
  export { HeadSafe, SafeBodyAttr, SafeHtmlAttr, SafeLink, SafeMeta, SafeNoscript, SafeScript, SafeStyle } from './types.mjs';
8
8
  export { resolveUnrefHeadInput } from './utils.mjs';
package/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  export { createHeadCore } from 'unhead';
2
2
  import { MergeHead, ActiveHeadEntry } from 'unhead/types';
3
- export { ActiveHeadEntry, Head, HeadEntryOptions, HeadTag, MergeHead, RenderSSRHeadOptions, ResolvedBase, ResolvedBodyAttributes, ResolvedHead, ResolvedHtmlAttributes, ResolvedLink, ResolvedMeta, ResolvedNoscript, ResolvedScript, ResolvedStyle, ResolvedTitle, ResolvedTitleTemplate, Unhead } from 'unhead/types';
4
- import { V as VueHeadClient, U as UseHeadInput, a as UseHeadOptions, b as UseSeoMetaInput } from './shared/vue.C97gXjQS.js';
5
- export { d as Base, B as BodyAttr, g as BodyAttributes, H as HtmlAttr, f as HtmlAttributes, L as Link, h as MaybeFalsey, M as Meta, N as Noscript, R as ReactiveHead, j as ResolvableArray, k as ResolvableProperties, i as ResolvableValue, e as Script, S as Style, T as Title, c as TitleTemplate } from './shared/vue.C97gXjQS.js';
3
+ export { ActiveHeadEntry, Head, HeadEntryOptions, HeadTag, MergeHead, RenderSSRHeadOptions, ResolvableHead, ResolvedBase, ResolvedBodyAttributes, ResolvedHead, ResolvedHtmlAttributes, ResolvedLink, ResolvedMeta, ResolvedNoscript, ResolvedScript, ResolvedStyle, ResolvedTitle, ResolvedTitleTemplate, Unhead } from 'unhead/types';
4
+ import { V as VueHeadClient, U as UseHeadInput, a as UseHeadOptions, b as UseSeoMetaInput } from './shared/vue.CZ-wp2QU.js';
5
+ export { d as Base, B as BodyAttr, g as BodyAttributes, H as HtmlAttr, f as HtmlAttributes, L as Link, i as MaybeFalsey, M as Meta, N as Noscript, h as ReactiveHead, k as ResolvableArray, R as ResolvableProperties, j as ResolvableValue, e as Script, S as Style, T as Title, c as TitleTemplate } from './shared/vue.CZ-wp2QU.js';
6
6
  import { UseHeadSafeInput } from './types.js';
7
7
  export { HeadSafe, SafeBodyAttr, SafeHtmlAttr, SafeLink, SafeMeta, SafeNoscript, SafeScript, SafeStyle } from './types.js';
8
8
  export { resolveUnrefHeadInput } from './utils.js';
package/dist/legacy.d.mts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as unhead_types from 'unhead/types';
2
2
  import { MergeHead, CreateClientHeadOptions, ActiveHeadEntry } from 'unhead/types';
3
3
  export { createHeadCore } from 'unhead';
4
- import { V as VueHeadClient, U as UseHeadInput, a as UseHeadOptions, b as UseSeoMetaInput } from './shared/vue.C97gXjQS.mjs';
4
+ import { V as VueHeadClient, U as UseHeadInput, a as UseHeadOptions, b as UseSeoMetaInput } from './shared/vue.CZ-wp2QU.mjs';
5
5
  import { UseHeadSafeInput } from './types.mjs';
6
6
  import 'vue';
7
7
 
package/dist/legacy.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as unhead_types from 'unhead/types';
2
2
  import { MergeHead, CreateClientHeadOptions, ActiveHeadEntry } from 'unhead/types';
3
3
  export { createHeadCore } from 'unhead';
4
- import { V as VueHeadClient, U as UseHeadInput, a as UseHeadOptions, b as UseSeoMetaInput } from './shared/vue.C97gXjQS.js';
4
+ import { V as VueHeadClient, U as UseHeadInput, a as UseHeadOptions, b as UseSeoMetaInput } from './shared/vue.CZ-wp2QU.js';
5
5
  import { UseHeadSafeInput } from './types.js';
6
6
  import 'vue';
7
7
 
@@ -0,0 +1,32 @@
1
+ import { UseScriptOptions as UseScriptOptions$1, ScriptInstance, UseScriptStatus, UseFunctionType } from 'unhead/scripts';
2
+ import { ScriptBase, DataKeys, SchemaAugmentations, HeadEntryOptions } from 'unhead/types';
3
+ import { Ref } from 'vue';
4
+ import { R as ResolvableProperties, V as VueHeadClient } from './shared/vue.CZ-wp2QU.mjs';
5
+
6
+ interface VueScriptInstance<T extends Record<symbol | string, any>> extends Omit<ScriptInstance<T>, 'status'> {
7
+ status: Ref<UseScriptStatus>;
8
+ }
9
+ type UseScriptInput = string | (ResolvableProperties<Omit<ScriptBase & DataKeys & SchemaAugmentations['script'], 'src'>> & {
10
+ src: string;
11
+ });
12
+ interface UseScriptOptions<T extends Record<symbol | string, any> = Record<string, any>> extends Omit<HeadEntryOptions, 'head'>, Pick<UseScriptOptions$1<T>, 'use' | 'eventContext' | 'beforeInit'> {
13
+ /**
14
+ * The trigger to load the script:
15
+ * - `undefined` | `client` - (Default) Load the script on the client when this js is loaded.
16
+ * - `manual` - Load the script manually by calling `$script.load()`, exists only on the client.
17
+ * - `Promise` - Load the script when the promise resolves, exists only on the client.
18
+ * - `Function` - Register a callback function to load the script, exists only on the client.
19
+ * - `server` - Have the script injected on the server.
20
+ * - `ref` - Load the script when the ref is true.
21
+ */
22
+ trigger?: UseScriptOptions$1['trigger'] | Ref<boolean>;
23
+ /**
24
+ * Unhead instance.
25
+ */
26
+ head?: VueHeadClient<any>;
27
+ }
28
+ type UseScriptContext<T extends Record<symbol | string, any>> = VueScriptInstance<T>;
29
+ type UseScriptReturn<T extends Record<symbol | string, any>> = UseScriptContext<UseFunctionType<UseScriptOptions<T>, T>>;
30
+ declare function useScript<T extends Record<symbol | string, any> = Record<symbol | string, any>>(_input: UseScriptInput, _options?: UseScriptOptions<T>): UseScriptReturn<T>;
31
+
32
+ export { type UseScriptContext, type UseScriptInput, type UseScriptOptions, type UseScriptReturn, type VueScriptInstance, useScript };
@@ -0,0 +1,32 @@
1
+ import { UseScriptOptions as UseScriptOptions$1, ScriptInstance, UseScriptStatus, UseFunctionType } from 'unhead/scripts';
2
+ import { ScriptBase, DataKeys, SchemaAugmentations, HeadEntryOptions } from 'unhead/types';
3
+ import { Ref } from 'vue';
4
+ import { R as ResolvableProperties, V as VueHeadClient } from './shared/vue.CZ-wp2QU.js';
5
+
6
+ interface VueScriptInstance<T extends Record<symbol | string, any>> extends Omit<ScriptInstance<T>, 'status'> {
7
+ status: Ref<UseScriptStatus>;
8
+ }
9
+ type UseScriptInput = string | (ResolvableProperties<Omit<ScriptBase & DataKeys & SchemaAugmentations['script'], 'src'>> & {
10
+ src: string;
11
+ });
12
+ interface UseScriptOptions<T extends Record<symbol | string, any> = Record<string, any>> extends Omit<HeadEntryOptions, 'head'>, Pick<UseScriptOptions$1<T>, 'use' | 'eventContext' | 'beforeInit'> {
13
+ /**
14
+ * The trigger to load the script:
15
+ * - `undefined` | `client` - (Default) Load the script on the client when this js is loaded.
16
+ * - `manual` - Load the script manually by calling `$script.load()`, exists only on the client.
17
+ * - `Promise` - Load the script when the promise resolves, exists only on the client.
18
+ * - `Function` - Register a callback function to load the script, exists only on the client.
19
+ * - `server` - Have the script injected on the server.
20
+ * - `ref` - Load the script when the ref is true.
21
+ */
22
+ trigger?: UseScriptOptions$1['trigger'] | Ref<boolean>;
23
+ /**
24
+ * Unhead instance.
25
+ */
26
+ head?: VueHeadClient<any>;
27
+ }
28
+ type UseScriptContext<T extends Record<symbol | string, any>> = VueScriptInstance<T>;
29
+ type UseScriptReturn<T extends Record<symbol | string, any>> = UseScriptContext<UseFunctionType<UseScriptOptions<T>, T>>;
30
+ declare function useScript<T extends Record<symbol | string, any> = Record<symbol | string, any>>(_input: UseScriptInput, _options?: UseScriptOptions<T>): UseScriptReturn<T>;
31
+
32
+ export { type UseScriptContext, type UseScriptInput, type UseScriptOptions, type UseScriptReturn, type VueScriptInstance, useScript };
@@ -0,0 +1,73 @@
1
+ import { useScript as useScript$1 } from 'unhead/scripts';
2
+ import { getCurrentInstance, onMounted, isRef, watch, onScopeDispose, ref } from 'vue';
3
+ import { i as injectHead } from './shared/vue.j4SPrdI5.mjs';
4
+ import 'unhead/plugins';
5
+ import 'unhead/utils';
6
+ import './shared/vue.N9zWjxoK.mjs';
7
+
8
+ function registerVueScopeHandlers(script, scope) {
9
+ if (!scope) {
10
+ return;
11
+ }
12
+ const _registerCb = (key, cb) => {
13
+ if (!script._cbs[key]) {
14
+ cb(script.instance);
15
+ return () => {
16
+ };
17
+ }
18
+ let i = script._cbs[key].push(cb);
19
+ const destroy = () => {
20
+ if (i) {
21
+ script._cbs[key]?.splice(i - 1, 1);
22
+ i = null;
23
+ }
24
+ };
25
+ onScopeDispose(destroy);
26
+ return destroy;
27
+ };
28
+ script.onLoaded = (cb) => _registerCb("loaded", cb);
29
+ script.onError = (cb) => _registerCb("error", cb);
30
+ onScopeDispose(() => {
31
+ script._triggerAbortController?.abort();
32
+ });
33
+ }
34
+ function useScript(_input, _options) {
35
+ const input = typeof _input === "string" ? { src: _input } : _input;
36
+ const options = _options || {};
37
+ const head = options?.head || injectHead();
38
+ options.head = head;
39
+ const scope = getCurrentInstance();
40
+ options.eventContext = scope;
41
+ if (scope && typeof options.trigger === "undefined") {
42
+ options.trigger = onMounted;
43
+ } else if (isRef(options.trigger)) {
44
+ const refTrigger = options.trigger;
45
+ let off;
46
+ options.trigger = new Promise((resolve) => {
47
+ off = watch(refTrigger, (val) => {
48
+ if (val) {
49
+ resolve(true);
50
+ }
51
+ }, {
52
+ immediate: true
53
+ });
54
+ onScopeDispose(() => resolve(false), true);
55
+ }).then((val) => {
56
+ off?.();
57
+ return val;
58
+ });
59
+ }
60
+ head._scriptStatusWatcher = head._scriptStatusWatcher || head.hooks.hook("script:updated", ({ script: s }) => {
61
+ s._statusRef.value = s.status;
62
+ });
63
+ const script = useScript$1(head, input, options);
64
+ script._statusRef = script._statusRef || ref(script.status);
65
+ registerVueScopeHandlers(script, scope);
66
+ return new Proxy(script, {
67
+ get(_, key, a) {
68
+ return Reflect.get(_, key === "status" ? "_statusRef" : key, a);
69
+ }
70
+ });
71
+ }
72
+
73
+ export { useScript };
package/dist/server.d.mts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { MergeHead, CreateServerHeadOptions } from 'unhead/types';
2
2
  export { V as VueHeadMixin } from './shared/vue.DnywREVF.mjs';
3
3
  export { SSRHeadPayload, extractUnheadInputFromHtml, propsToString, renderSSRHead, transformHtmlTemplate } from 'unhead/server';
4
- import { V as VueHeadClient } from './shared/vue.C97gXjQS.mjs';
4
+ import { V as VueHeadClient } from './shared/vue.CZ-wp2QU.mjs';
5
5
  import 'vue';
6
6
 
7
7
  declare function createHead<T extends MergeHead>(options?: Omit<CreateServerHeadOptions, 'propsResolver'>): VueHeadClient<T>;
package/dist/server.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { MergeHead, CreateServerHeadOptions } from 'unhead/types';
2
2
  export { V as VueHeadMixin } from './shared/vue.DnywREVF.js';
3
3
  export { SSRHeadPayload, extractUnheadInputFromHtml, propsToString, renderSSRHead, transformHtmlTemplate } from 'unhead/server';
4
- import { V as VueHeadClient } from './shared/vue.C97gXjQS.js';
4
+ import { V as VueHeadClient } from './shared/vue.CZ-wp2QU.js';
5
5
  import 'vue';
6
6
 
7
7
  declare function createHead<T extends MergeHead>(options?: Omit<CreateServerHeadOptions, 'propsResolver'>): VueHeadClient<T>;
@@ -130,4 +130,4 @@ type UseSeoMetaInput = ResolvableProperties<MetaFlatInput> & {
130
130
  };
131
131
  type VueHeadClient<T extends MergeHead> = Unhead<ResolvableValue<ReactiveHead<T>>> & Plugin;
132
132
 
133
- export type { BodyAttr as B, HtmlAttr as H, Link as L, Meta as M, Noscript as N, ReactiveHead as R, Style as S, Title as T, UseHeadInput as U, VueHeadClient as V, UseHeadOptions as a, UseSeoMetaInput as b, TitleTemplate as c, Base as d, Script as e, HtmlAttributes as f, BodyAttributes as g, MaybeFalsey as h, ResolvableValue as i, ResolvableArray as j, ResolvableProperties as k };
133
+ export type { BodyAttr as B, HtmlAttr as H, Link as L, Meta as M, Noscript as N, ResolvableProperties as R, Style as S, Title as T, UseHeadInput as U, VueHeadClient as V, UseHeadOptions as a, UseSeoMetaInput as b, TitleTemplate as c, Base as d, Script as e, HtmlAttributes as f, BodyAttributes as g, ReactiveHead as h, MaybeFalsey as i, ResolvableValue as j, ResolvableArray as k };
@@ -130,4 +130,4 @@ type UseSeoMetaInput = ResolvableProperties<MetaFlatInput> & {
130
130
  };
131
131
  type VueHeadClient<T extends MergeHead> = Unhead<ResolvableValue<ReactiveHead<T>>> & Plugin;
132
132
 
133
- export type { BodyAttr as B, HtmlAttr as H, Link as L, Meta as M, Noscript as N, ReactiveHead as R, Style as S, Title as T, UseHeadInput as U, VueHeadClient as V, UseHeadOptions as a, UseSeoMetaInput as b, TitleTemplate as c, Base as d, Script as e, HtmlAttributes as f, BodyAttributes as g, MaybeFalsey as h, ResolvableValue as i, ResolvableArray as j, ResolvableProperties as k };
133
+ export type { BodyAttr as B, HtmlAttr as H, Link as L, Meta as M, Noscript as N, ResolvableProperties as R, Style as S, Title as T, UseHeadInput as U, VueHeadClient as V, UseHeadOptions as a, UseSeoMetaInput as b, TitleTemplate as c, Base as d, Script as e, HtmlAttributes as f, BodyAttributes as g, ReactiveHead as h, MaybeFalsey as i, ResolvableValue as j, ResolvableArray as k };
package/dist/types.d.mts CHANGED
@@ -1,7 +1,7 @@
1
- import { Head, LinkBase, DataKeys, SchemaAugmentations, BaseMeta, Style, ScriptBase, Noscript, HtmlAttributes, BodyAttributes } from 'unhead/types';
2
- export { ActiveHeadEntry, Head, HeadEntryOptions, HeadTag, MergeHead, RenderSSRHeadOptions, ResolvedBase, ResolvedBodyAttributes, ResolvedHead, ResolvedHtmlAttributes, ResolvedLink, ResolvedMeta, ResolvedNoscript, ResolvedScript, ResolvedStyle, ResolvedTitle, ResolvedTitleTemplate, Unhead } from 'unhead/types';
3
- import { i as ResolvableValue, k as ResolvableProperties } from './shared/vue.C97gXjQS.mjs';
4
- export { d as Base, B as BodyAttr, g as BodyAttributes, H as HtmlAttr, f as HtmlAttributes, L as Link, h as MaybeFalsey, M as Meta, N as Noscript, R as ReactiveHead, j as ResolvableArray, e as Script, S as Style, T as Title, c as TitleTemplate, U as UseHeadInput, a as UseHeadOptions, b as UseSeoMetaInput, V as VueHeadClient } from './shared/vue.C97gXjQS.mjs';
1
+ import { ResolvableHead, LinkBase, DataKeys, SchemaAugmentations, BaseMeta, Style, ScriptBase, Noscript, HtmlAttributes, BodyAttributes } from 'unhead/types';
2
+ export { ActiveHeadEntry, Head, HeadEntryOptions, HeadTag, MergeHead, RenderSSRHeadOptions, ResolvableHead, ResolvedBase, ResolvedBodyAttributes, ResolvedHead, ResolvedHtmlAttributes, ResolvedLink, ResolvedMeta, ResolvedNoscript, ResolvedScript, ResolvedStyle, ResolvedTitle, ResolvedTitleTemplate, Unhead } from 'unhead/types';
3
+ import { j as ResolvableValue, R as ResolvableProperties } from './shared/vue.CZ-wp2QU.mjs';
4
+ export { d as Base, B as BodyAttr, g as BodyAttributes, H as HtmlAttr, f as HtmlAttributes, L as Link, i as MaybeFalsey, M as Meta, N as Noscript, h as ReactiveHead, k as ResolvableArray, e as Script, S as Style, T as Title, c as TitleTemplate, U as UseHeadInput, a as UseHeadOptions, b as UseSeoMetaInput, V as VueHeadClient } from './shared/vue.CZ-wp2QU.mjs';
5
5
  import 'vue';
6
6
 
7
7
  type SafeBodyAttr = ResolvableProperties<Pick<BodyAttributes, 'id' | 'class' | 'style'> & DataKeys & SchemaAugmentations['bodyAttrs']>;
@@ -13,7 +13,7 @@ type SafeScript = ResolvableProperties<Pick<ScriptBase, 'id' | 'type' | 'nonce'
13
13
  } & SchemaAugmentations['script']>;
14
14
  type SafeNoscript = ResolvableProperties<Pick<Noscript, 'id' | 'textContent'> & DataKeys & SchemaAugmentations['noscript']>;
15
15
  type SafeStyle = ResolvableProperties<Pick<Style, 'id' | 'media' | 'textContent' | 'nonce' | 'title' | 'blocking'> & DataKeys & SchemaAugmentations['style']>;
16
- interface HeadSafe extends Pick<Head, 'title' | 'titleTemplate' | 'templateParams'> {
16
+ interface HeadSafe extends Pick<ResolvableHead, 'title' | 'titleTemplate' | 'templateParams'> {
17
17
  /**
18
18
  * The `<link>` HTML element specifies relationships between the current document and an external resource.
19
19
  * This element is most commonly used to link to stylesheets, but is also used to establish site icons
package/dist/types.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { Head, LinkBase, DataKeys, SchemaAugmentations, BaseMeta, Style, ScriptBase, Noscript, HtmlAttributes, BodyAttributes } from 'unhead/types';
2
- export { ActiveHeadEntry, Head, HeadEntryOptions, HeadTag, MergeHead, RenderSSRHeadOptions, ResolvedBase, ResolvedBodyAttributes, ResolvedHead, ResolvedHtmlAttributes, ResolvedLink, ResolvedMeta, ResolvedNoscript, ResolvedScript, ResolvedStyle, ResolvedTitle, ResolvedTitleTemplate, Unhead } from 'unhead/types';
3
- import { i as ResolvableValue, k as ResolvableProperties } from './shared/vue.C97gXjQS.js';
4
- export { d as Base, B as BodyAttr, g as BodyAttributes, H as HtmlAttr, f as HtmlAttributes, L as Link, h as MaybeFalsey, M as Meta, N as Noscript, R as ReactiveHead, j as ResolvableArray, e as Script, S as Style, T as Title, c as TitleTemplate, U as UseHeadInput, a as UseHeadOptions, b as UseSeoMetaInput, V as VueHeadClient } from './shared/vue.C97gXjQS.js';
1
+ import { ResolvableHead, LinkBase, DataKeys, SchemaAugmentations, BaseMeta, Style, ScriptBase, Noscript, HtmlAttributes, BodyAttributes } from 'unhead/types';
2
+ export { ActiveHeadEntry, Head, HeadEntryOptions, HeadTag, MergeHead, RenderSSRHeadOptions, ResolvableHead, ResolvedBase, ResolvedBodyAttributes, ResolvedHead, ResolvedHtmlAttributes, ResolvedLink, ResolvedMeta, ResolvedNoscript, ResolvedScript, ResolvedStyle, ResolvedTitle, ResolvedTitleTemplate, Unhead } from 'unhead/types';
3
+ import { j as ResolvableValue, R as ResolvableProperties } from './shared/vue.CZ-wp2QU.js';
4
+ export { d as Base, B as BodyAttr, g as BodyAttributes, H as HtmlAttr, f as HtmlAttributes, L as Link, i as MaybeFalsey, M as Meta, N as Noscript, h as ReactiveHead, k as ResolvableArray, e as Script, S as Style, T as Title, c as TitleTemplate, U as UseHeadInput, a as UseHeadOptions, b as UseSeoMetaInput, V as VueHeadClient } from './shared/vue.CZ-wp2QU.js';
5
5
  import 'vue';
6
6
 
7
7
  type SafeBodyAttr = ResolvableProperties<Pick<BodyAttributes, 'id' | 'class' | 'style'> & DataKeys & SchemaAugmentations['bodyAttrs']>;
@@ -13,7 +13,7 @@ type SafeScript = ResolvableProperties<Pick<ScriptBase, 'id' | 'type' | 'nonce'
13
13
  } & SchemaAugmentations['script']>;
14
14
  type SafeNoscript = ResolvableProperties<Pick<Noscript, 'id' | 'textContent'> & DataKeys & SchemaAugmentations['noscript']>;
15
15
  type SafeStyle = ResolvableProperties<Pick<Style, 'id' | 'media' | 'textContent' | 'nonce' | 'title' | 'blocking'> & DataKeys & SchemaAugmentations['style']>;
16
- interface HeadSafe extends Pick<Head, 'title' | 'titleTemplate' | 'templateParams'> {
16
+ interface HeadSafe extends Pick<ResolvableHead, 'title' | 'titleTemplate' | 'templateParams'> {
17
17
  /**
18
18
  * The `<link>` HTML element specifies relationships between the current document and an external resource.
19
19
  * This element is most commonly used to link to stylesheets, but is also used to establish site icons
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@unhead/vue",
3
3
  "type": "module",
4
- "version": "2.0.0-alpha.23",
4
+ "version": "2.0.0-alpha.25",
5
5
  "description": "Full-stack <head> manager built for Vue.",
6
6
  "author": "Harlan Wilton <harlan@harlanzw.com>",
7
7
  "license": "MIT",
@@ -52,6 +52,10 @@
52
52
  "./utils": {
53
53
  "types": "./dist/utils.d.ts",
54
54
  "import": "./dist/utils.mjs"
55
+ },
56
+ "./scripts": {
57
+ "types": "./dist/scripts.d.ts",
58
+ "import": "./dist/scripts.mjs"
55
59
  }
56
60
  },
57
61
  "main": "dist/index.mjs",
@@ -79,6 +83,9 @@
79
83
  ],
80
84
  "utils": [
81
85
  "dist/utils"
86
+ ],
87
+ "scripts": [
88
+ "dist/scripts"
82
89
  ]
83
90
  }
84
91
  },
@@ -87,6 +94,7 @@
87
94
  "dist",
88
95
  "legacy.d.ts",
89
96
  "plugins.d.ts",
97
+ "scripts.d.ts",
90
98
  "server.d.ts",
91
99
  "types.d.ts",
92
100
  "utils.d.ts"
@@ -101,7 +109,7 @@
101
109
  },
102
110
  "dependencies": {
103
111
  "hookable": "^5.5.3",
104
- "unhead": "2.0.0-alpha.23"
112
+ "unhead": "2.0.0-alpha.25"
105
113
  },
106
114
  "scripts": {
107
115
  "build": "unbuild .",