Skip to content

Commit 3ddde8a

Browse files
committed
chore: useHead from nuxt/app
1 parent 6f4805f commit 3ddde8a

File tree

6 files changed

+8
-12
lines changed

6 files changed

+8
-12
lines changed

src/runtime/components/ScriptGoogleMaps.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { withQuery } from 'ufo'
99
import type { QueryObject } from 'ufo'
1010
import { defu } from 'defu'
1111
import { hash } from 'ohash'
12-
import { useHead } from '@unhead/vue'
12+
import { useHead } from 'nuxt/app'
1313
import type { ElementScriptTrigger } from '../types'
1414
import { scriptRuntimeConfig } from '../utils'
1515
import { useScriptTriggerElement } from '../composables/useScriptTriggerElement'

src/runtime/components/ScriptVimeoPlayer.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
import { computed, onBeforeUnmount, onMounted, ref, watch } from 'vue'
77
import type { HTMLAttributes, ImgHTMLAttributes } from 'vue'
88
import { defu } from 'defu'
9-
import { useAsyncData } from 'nuxt/app'
10-
import { useHead } from '@unhead/vue'
9+
import { useAsyncData, useHead } from 'nuxt/app'
1110
import type { ElementScriptTrigger } from '../types'
1211
import { useScriptTriggerElement } from '../composables/useScriptTriggerElement'
1312
import { useScriptVimeoPlayer } from '../registry/vimeo-player'

src/runtime/components/ScriptYouTubePlayer.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import { computed, onMounted, ref, watch } from 'vue'
77
import type { HTMLAttributes, ImgHTMLAttributes, Ref } from 'vue'
88
import { defu } from 'defu'
9-
import { useHead } from '@unhead/vue'
9+
import { useHead } from 'nuxt/app'
1010
import type { ElementScriptTrigger } from '../types'
1111
import { useScriptTriggerElement } from '../composables/useScriptTriggerElement'
1212
import { useScriptYouTubePlayer } from '../registry/youtube-player'

src/runtime/composables/useScriptEventPage.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import { injectHead } from '@unhead/vue'
2-
import { useNuxtApp, useRoute } from 'nuxt/app'
1+
import { useNuxtApp, useRoute, injectHead } from 'nuxt/app'
32
import { ref } from 'vue'
43
import type { TrackedPage } from '#nuxt-scripts/types'
54

src/runtime/registry/google-adsense.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { useHead } from '@unhead/vue'
1+
import { useHead } from 'nuxt/app'
22
import { useRegistryScript } from '../utils'
33
import { object, string, optional, boolean } from '#nuxt-scripts-validator'
44
import type { RegistryScriptInput } from '#nuxt-scripts/types'

src/runtime/types.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import type {
2-
DataKeys,
3-
SchemaAugmentations,
4-
ScriptWithoutEvents,
5-
} from 'unhead/types'
2+
Script,
3+
} from '@unhead/vue/types'
64
import type { UseScriptInput, VueScriptInstance, UseScriptOptions } from '@unhead/vue'
75
import type { ComputedRef, Ref } from 'vue'
86
import type { InferInput, ObjectSchema } from 'valibot'
@@ -164,7 +162,7 @@ const _emptyOptions = object({})
164162

165163
export type EmptyOptionsSchema = typeof _emptyOptions
166164

167-
type ScriptInput = ScriptWithoutEvents & DataKeys & SchemaAugmentations['script']
165+
type ScriptInput = Script
168166

169167
export type InferIfSchema<T> = T extends ObjectSchema<any, any> ? InferInput<T> : T
170168
export type RegistryScriptInput<

0 commit comments

Comments
 (0)