Skip to content

Commit 5d5acda

Browse files
committed
fix: add explicit imports
resolves #1267
1 parent a016a9b commit 5d5acda

19 files changed

+41
-1
lines changed

src/runtime/composables/internal/useSanityQueryFetcher.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import type { QueryStore, QueryStoreState } from '@sanity/core-loader'
22
import type { ContentSourceMap, QueryParams } from '../../client'
3+
import { watch } from 'vue'
34

45
/**
56
* Internal composable used to setup update streaming from Presentation tool

src/runtime/composables/internal/useSanityTagRevalidation.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { refreshNuxtData, useState } from '#imports'
12
import type { ClientConfig, QueryParams, SanityClient } from '../../client'
23
import type { SanityLiveStore } from '../../types'
34

src/runtime/composables/useIsSanityLivePreview.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { computed, type Ref } from 'vue'
12
import { useSanityPreviewEnvironment } from './useSanityPreviewEnvironment'
23

34
/**

src/runtime/composables/useIsSanityPresentationTool.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { computed } from 'vue'
12
import { useSanityPreviewEnvironment } from './useSanityPreviewEnvironment'
23

34
/**

src/runtime/composables/useLazySanityQuery.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import { hash } from 'ohash'
22
import type { AsyncData } from 'nuxt/app'
33
import type { UseSanityQueryOptions } from '../types'
4+
import { reactive } from 'vue'
5+
import { useLazyAsyncData } from '#imports'
6+
import { useSanity } from './useSanity'
47

58
export const useLazySanityQuery = <T = unknown, E = Error> (query: string, _params?: Record<string, unknown>, _options: UseSanityQueryOptions<T> = {}): AsyncData<T | null, E> => {
69
const { client, ...options } = _options

src/runtime/composables/useSanity.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import defu from 'defu'
22
import type { H3Event } from 'h3'
3+
import { createSanityClient, useNuxtApp } from '#imports'
34
import type { ClientConfig } from '../client'
45
import type { SanityHelper } from '../types'
6+
import { useSanityConfig } from './useSanityConfig'
57
import { createLiveStore } from '../util/createLiveStore'
68
import { createQueryStore } from '../util/createQueryStore'
79

src/runtime/composables/useSanityConfig.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import defu from 'defu'
22
import type { SanityResolvedConfig, SanityRuntimeConfig } from '../types'
3+
import { useRuntimeConfig } from '#imports'
34

45
export const useSanityConfig = () => {
56
const $config = useRuntimeConfig()

src/runtime/composables/useSanityLiveMode.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1+
import { onScopeDispose } from 'vue'
12
import { useSanity } from './useSanity'
3+
import { useSanityConfig } from './useSanityConfig'
24

35
export function useSanityLiveMode(options?: { client?: string }) {
46
const config = useSanityConfig()

src/runtime/composables/useSanityPerspective.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
import { validateApiPerspective, type ClientPerspective } from '@sanity/client'
22
import { perspectiveCookieName } from '@sanity/preview-url-secret/constants'
3+
import { computed } from 'vue'
4+
import { useCookie } from '#imports'
5+
import { useSanityVisualEditingState } from './useSanityVisualEditingState'
36

47
const sanitizePerspective = (
58
_perspective: unknown,

src/runtime/composables/useSanityPreviewEnvironment.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import type { PreviewEnvironment } from '../types'
2+
import { useState } from '#imports'
23

34
/**
45
* Reports the current preview mode environment.

0 commit comments

Comments
 (0)