@devite/nuxt-sanity 2.14.2 → 2.16.0

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/module.d.mts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as _nuxt_schema from '@nuxt/schema';
2
2
  import { HistoryRefresh, VisualEditingOptions as VisualEditingOptions$1 } from '@sanity/visual-editing';
3
3
  import { ClientConfig } from '@sanity/client';
4
- import { Slug, ImageAsset, PortableTextBlock } from '@sanity/types';
4
+ import { Slug, PortableTextBlock, ImageAsset } from '@sanity/types';
5
5
 
6
6
  type ModuleOptions = ClientConfig & {
7
7
  projectId?: string;
@@ -54,22 +54,6 @@ interface VisualEditingOptions {
54
54
  type SanityVisualEditingMode = 'live-visual-editing' | 'visual-editing' | 'custom';
55
55
  type SanityVisualEditingRefreshHandler = (payload: HistoryRefresh, refreshDefault: () => false | Promise<void>) => false | Promise<void>;
56
56
 
57
- interface Page {
58
- _id: string;
59
- _type: 'page';
60
- title: string;
61
- slug: Slug;
62
- modules: SanityArray<SanityModule>;
63
- seo: SEO;
64
- }
65
-
66
- interface GlobalSEO {
67
- siteName: string;
68
- image: {
69
- asset: ImageAsset;
70
- };
71
- }
72
-
73
57
  interface LinkExternal {
74
58
  _type: 'linkExternal';
75
59
  url: string;
@@ -85,6 +69,17 @@ interface LinkInternal {
85
69
  relationship?: string;
86
70
  }
87
71
 
72
+ interface Page {
73
+ _id: string;
74
+ _type: 'page';
75
+ title: string;
76
+ slug: Slug;
77
+ modules: SanityArray<SanityModule>;
78
+ seo: SEO;
79
+ }
80
+
81
+ type RichText = PortableTextBlock[];
82
+
88
83
  interface SEO {
89
84
  _type: 'seo';
90
85
  indexable: boolean;
@@ -98,8 +93,6 @@ interface SEO {
98
93
  };
99
94
  }
100
95
 
101
- type RichText = PortableTextBlock[];
102
-
103
96
  interface Home {
104
97
  _type: 'home';
105
98
  modules: SanityArray<SanityModule>;
@@ -123,4 +116,4 @@ type SanityArray<T> = Array<T & {
123
116
  declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
124
117
 
125
118
  export { _default as default };
126
- export type { GlobalSEO, Home, LinkExternal, LinkInternal, ModuleOptions, NotFound, Page, RichText, SEO, SanityArray, SanityModule, SanityVisualEditingMode, SanityVisualEditingRefreshHandler, VisualEditingOptions };
119
+ export type { Home, LinkExternal, LinkInternal, ModuleOptions, NotFound, Page, RichText, SEO, SanityArray, SanityModule, SanityVisualEditingMode, SanityVisualEditingRefreshHandler, VisualEditingOptions };
package/dist/module.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devite/nuxt-sanity",
3
- "version": "2.14.2",
3
+ "version": "2.16.0",
4
4
  "configKey": "sanity",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
package/dist/module.mjs CHANGED
@@ -1,9 +1,9 @@
1
- import crypto from 'node:crypto';
2
- import { defineNuxtModule, createResolver, addPlugin, addServerHandler, addImports, addServerImports, addComponentsDir, installModule } from '@nuxt/kit';
1
+ import { defineNuxtModule, createResolver, addPlugin, addServerHandler, addImports, addServerImports, addComponentsDir } from '@nuxt/kit';
3
2
  import defu from 'defu';
3
+ import { randomBytes } from 'node:crypto';
4
4
 
5
5
  const name = "@devite/nuxt-sanity";
6
- const version = "2.14.2";
6
+ const version = "2.16.0";
7
7
 
8
8
  const CONFIG_KEY = "sanity";
9
9
  const module = defineNuxtModule({
@@ -13,6 +13,9 @@ const module = defineNuxtModule({
13
13
  configKey: CONFIG_KEY
14
14
  },
15
15
  defaults: {},
16
+ moduleDependencies: {
17
+ "@nuxt/image": { version: ">=1.11.0", optional: false }
18
+ },
16
19
  async setup(options, nuxt) {
17
20
  const { resolve } = createResolver(import.meta.url);
18
21
  const $config = nuxt.options.runtimeConfig;
@@ -120,7 +123,7 @@ const module = defineNuxtModule({
120
123
  $config.sanity = defu($config.sanity, {
121
124
  visualEditing: moduleConfig.visualEditing && {
122
125
  ...moduleConfig.visualEditing,
123
- previewModeId: moduleConfig.visualEditing.previewMode ? crypto.randomBytes(16).toString("hex") : "",
126
+ previewModeId: moduleConfig.visualEditing.previewMode ? randomBytes(16).toString("hex") : "",
124
127
  token: moduleConfig.visualEditing.token || ""
125
128
  },
126
129
  webhookSecret: moduleConfig.minimalClient && moduleConfig.minimalClient.webhookSecret || void 0
@@ -172,6 +175,7 @@ const module = defineNuxtModule({
172
175
  { name: "useSanityVisualEditingState", from: resolve("runtime/composables/visual_editing_state") },
173
176
  { name: "useSanitySEO", from: resolve("runtime/composables/sanity_seo") },
174
177
  // helper methods
178
+ { name: "default", as: "useSanityClient", from: resolve("runtime/utils/useSanityClient") },
175
179
  { name: "resolveImageAssetById", from: resolve("runtime/utils/resolveImageAssetById") },
176
180
  { name: "resolveInternalLink", from: resolve("runtime/utils/resolveInternalLink") },
177
181
  // shared
@@ -184,25 +188,19 @@ const module = defineNuxtModule({
184
188
  // shared
185
189
  ...sharedImports
186
190
  ]);
187
- await addComponentsDir({ path: resolve("runtime/components") });
188
- await addComponentsDir({
189
- path: "~/sanity",
190
- global: true,
191
- prefix: "Sanity",
192
- pathPrefix: false
193
- });
194
- await installModule("@nuxt/image", {
195
- providers: {
196
- cachedSanity: {
197
- provider: resolve("runtime/imageProviders/sanity"),
198
- options: {
199
- projectId: moduleConfig.projectId,
200
- dataset: moduleConfig.dataset,
201
- cacheEndpoint: typeof moduleConfig.minimalClient === "object" && moduleConfig.minimalClient.cachingEnabled && moduleConfig.minimalClient.cacheClientBaseUrl + moduleConfig.minimalClient.assetEndpoint || void 0
202
- }
191
+ addComponentsDir({ path: resolve("runtime/components"), pathPrefix: false });
192
+ addComponentsDir({ path: "~/sanity", global: true, prefix: "Sanity", pathPrefix: false });
193
+ if (nuxt.options.image) {
194
+ nuxt.options.image.providers ??= {};
195
+ nuxt.options.image.providers.cachedSanity = {
196
+ provider: resolve("runtime/imageProviders/sanity"),
197
+ options: {
198
+ projectId: moduleConfig.projectId,
199
+ dataset: moduleConfig.dataset,
200
+ cacheEndpoint: typeof moduleConfig.minimalClient === "object" && moduleConfig.minimalClient.cachingEnabled && moduleConfig.minimalClient.cacheClientBaseUrl + moduleConfig.minimalClient.assetEndpoint || void 0
203
201
  }
204
- }
205
- }, nuxt);
202
+ };
203
+ }
206
204
  }
207
205
  });
208
206
 
@@ -0,0 +1,20 @@
1
+ import type { Component } from 'vue';
2
+ import type { SanityModule } from '@devite/nuxt-sanity';
3
+ type __VLS_Props = {
4
+ data?: SanityModule | Array<SanityModule>;
5
+ };
6
+ declare var __VLS_10: any, __VLS_11: any;
7
+ type __VLS_Slots = {} & {
8
+ [K in NonNullable<typeof __VLS_10>]?: (props: typeof __VLS_11) => any;
9
+ };
10
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
11
+ componentRef: import("vue").Ref<Component | undefined, Component | undefined>;
12
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
14
+ declare const _default: typeof __VLS_export;
15
+ export default _default;
16
+ type __VLS_WithSlots<T, S> = T & {
17
+ new (): {
18
+ $slots: S;
19
+ };
20
+ };
@@ -7,10 +7,11 @@ declare var __VLS_10: any, __VLS_11: any;
7
7
  type __VLS_Slots = {} & {
8
8
  [K in NonNullable<typeof __VLS_10>]?: (props: typeof __VLS_11) => any;
9
9
  };
10
- declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {
10
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
11
11
  componentRef: import("vue").Ref<Component | undefined, Component | undefined>;
12
12
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
- declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
13
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
14
+ declare const _default: typeof __VLS_export;
14
15
  export default _default;
15
16
  type __VLS_WithSlots<T, S> = T & {
16
17
  new (): {
@@ -0,0 +1,10 @@
1
+ import type { ImageAsset, Reference } from '@sanity/types';
2
+ type __VLS_Props = {
3
+ asset?: ImageAsset | Reference | null;
4
+ sizes?: string;
5
+ loading?: 'eager' | 'lazy';
6
+ lqip?: boolean;
7
+ };
8
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
9
+ declare const _default: typeof __VLS_export;
10
+ export default _default;
@@ -5,5 +5,6 @@ type __VLS_Props = {
5
5
  loading?: 'eager' | 'lazy';
6
6
  lqip?: boolean;
7
7
  };
8
- declare const _default: import("vue").DefineComponent<__VLS_Props, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
8
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
9
+ declare const _default: typeof __VLS_export;
9
10
  export default _default;
@@ -0,0 +1,16 @@
1
+ type __VLS_Props = {
2
+ prefix?: string;
3
+ };
4
+ declare var __VLS_6: {};
5
+ type __VLS_Slots = {} & {
6
+ default?: (props: typeof __VLS_6) => any;
7
+ };
8
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
9
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
10
+ declare const _default: typeof __VLS_export;
11
+ export default _default;
12
+ type __VLS_WithSlots<T, S> = T & {
13
+ new (): {
14
+ $slots: S;
15
+ };
16
+ };
@@ -14,11 +14,14 @@
14
14
  import { computed } from "vue";
15
15
  import { setResponseStatus } from "h3";
16
16
  import { groq, IMAGE_WITHOUT_PREVIEW_PROJECTION, useRequestEvent, useRoute, useRuntimeConfig, useSanityQuery, useSanitySEO } from "#imports";
17
+ const { prefix = "" } = defineProps({
18
+ prefix: { type: String, required: false }
19
+ });
17
20
  const path = useRoute().path;
18
21
  const groqFilter = path === "/" ? '_type == "home"' : `_type == "page" && slug.current == $slug`;
19
22
  const { data: sanityData } = await useSanityQuery(
20
23
  groq`*[(${groqFilter}) || _type == "notFound"][0] { _id, _type, slug, title, modules, seo { _type, indexable, title, shortTitle, description, image ${IMAGE_WITHOUT_PREVIEW_PROJECTION} } }`,
21
- { slug: path.substring(1) }
24
+ { slug: prefix + path.substring(1) }
22
25
  );
23
26
  if (sanityData.value?._type === "notFound" && import.meta.server) {
24
27
  const event = useRequestEvent();
@@ -28,7 +31,7 @@ if (sanityData.value?._type === "notFound" && import.meta.server) {
28
31
  const { baseUrl } = useRuntimeConfig().public;
29
32
  const seo = computed(() => sanityData.value?.seo);
30
33
  useSanitySEO(
31
- (baseUrl || "") + "/" + (sanityData.value && "slug" in sanityData.value && sanityData.value.slug?.current ? sanityData.value.slug.current : ""),
34
+ (baseUrl || "") + prefix + "/" + (sanityData.value && "slug" in sanityData.value && sanityData.value.slug?.current ? sanityData.value.slug.current : ""),
32
35
  seo
33
36
  );
34
37
  </script>
@@ -1,9 +1,13 @@
1
+ type __VLS_Props = {
2
+ prefix?: string;
3
+ };
1
4
  declare var __VLS_6: {};
2
5
  type __VLS_Slots = {} & {
3
6
  default?: (props: typeof __VLS_6) => any;
4
7
  };
5
- declare const __VLS_component: import("vue").DefineComponent<{}, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
6
- declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
8
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
9
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
10
+ declare const _default: typeof __VLS_export;
7
11
  export default _default;
8
12
  type __VLS_WithSlots<T, S> = T & {
9
13
  new (): {
@@ -0,0 +1,21 @@
1
+ import type { ImageAsset, Reference } from '@sanity/types';
2
+ type __VLS_Props = {
3
+ asset?: ImageAsset | Reference | null;
4
+ sizes?: string;
5
+ loading?: 'eager' | 'lazy';
6
+ lqip?: boolean;
7
+ imgAttrs?: Record<string, unknown>;
8
+ };
9
+ declare var __VLS_7: {};
10
+ type __VLS_Slots = {} & {
11
+ default?: (props: typeof __VLS_7) => any;
12
+ };
13
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
14
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
15
+ declare const _default: typeof __VLS_export;
16
+ export default _default;
17
+ type __VLS_WithSlots<T, S> = T & {
18
+ new (): {
19
+ $slots: S;
20
+ };
21
+ };
@@ -10,8 +10,9 @@ declare var __VLS_7: {};
10
10
  type __VLS_Slots = {} & {
11
11
  default?: (props: typeof __VLS_7) => any;
12
12
  };
13
- declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
14
- declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
13
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
14
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
15
+ declare const _default: typeof __VLS_export;
15
16
  export default _default;
16
17
  type __VLS_WithSlots<T, S> = T & {
17
18
  new (): {
@@ -0,0 +1,8 @@
1
+ import type { RichText } from '@devite/nuxt-sanity';
2
+ type __VLS_Props = {
3
+ data: RichText;
4
+ placeholders?: Record<string, string>;
5
+ };
6
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
7
+ declare const _default: typeof __VLS_export;
8
+ export default _default;
@@ -3,5 +3,6 @@ type __VLS_Props = {
3
3
  data: RichText;
4
4
  placeholders?: Record<string, string>;
5
5
  };
6
- declare const _default: import("vue").DefineComponent<__VLS_Props, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
7
+ declare const _default: typeof __VLS_export;
7
8
  export default _default;
@@ -0,0 +1,17 @@
1
+ import type { LinkExternal } from '@devite/nuxt-sanity';
2
+ type __VLS_Props = {
3
+ data: LinkExternal;
4
+ };
5
+ declare var __VLS_7: {};
6
+ type __VLS_Slots = {} & {
7
+ default?: (props: typeof __VLS_7) => any;
8
+ };
9
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
10
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
11
+ declare const _default: typeof __VLS_export;
12
+ export default _default;
13
+ type __VLS_WithSlots<T, S> = T & {
14
+ new (): {
15
+ $slots: S;
16
+ };
17
+ };
@@ -0,0 +1,17 @@
1
+ import type { LinkExternal } from '@devite/nuxt-sanity';
2
+ type __VLS_Props = {
3
+ data: LinkExternal;
4
+ };
5
+ declare var __VLS_7: {};
6
+ type __VLS_Slots = {} & {
7
+ default?: (props: typeof __VLS_7) => any;
8
+ };
9
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
10
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
11
+ declare const _default: typeof __VLS_export;
12
+ export default _default;
13
+ type __VLS_WithSlots<T, S> = T & {
14
+ new (): {
15
+ $slots: S;
16
+ };
17
+ };
@@ -0,0 +1,19 @@
1
+ import type { LinkInternal } from '@devite/nuxt-sanity';
2
+ type __VLS_Props = {
3
+ data: LinkInternal | {
4
+ reference: Reference;
5
+ };
6
+ };
7
+ declare var __VLS_7: {};
8
+ type __VLS_Slots = {} & {
9
+ default?: (props: typeof __VLS_7) => any;
10
+ };
11
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
12
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
13
+ declare const _default: typeof __VLS_export;
14
+ export default _default;
15
+ type __VLS_WithSlots<T, S> = T & {
16
+ new (): {
17
+ $slots: S;
18
+ };
19
+ };
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <NuxtLink
3
- :to="resolvedLink?.slug"
3
+ :to="resolvedLink?.slug + (data.queryString ? `?${data.queryString}` : '')"
4
4
  :title="resolvedLink?.linkTitle"
5
5
  :rel="resolvedLink?.relationship"
6
6
  >
@@ -0,0 +1,19 @@
1
+ import type { LinkInternal } from '@devite/nuxt-sanity';
2
+ type __VLS_Props = {
3
+ data: LinkInternal | {
4
+ reference: Reference;
5
+ };
6
+ };
7
+ declare var __VLS_7: {};
8
+ type __VLS_Slots = {} & {
9
+ default?: (props: typeof __VLS_7) => any;
10
+ };
11
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
12
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
13
+ declare const _default: typeof __VLS_export;
14
+ export default _default;
15
+ type __VLS_WithSlots<T, S> = T & {
16
+ new (): {
17
+ $slots: S;
18
+ };
19
+ };
package/dist/types.d.mts CHANGED
@@ -1,3 +1,3 @@
1
1
  export { default } from './module.mjs'
2
2
 
3
- export { type GlobalSEO, type Home, type LinkExternal, type LinkInternal, type ModuleOptions, type NotFound, type Page, type RichText, type SEO, type SanityArray, type SanityModule, type SanityVisualEditingMode, type SanityVisualEditingRefreshHandler, type VisualEditingOptions } from './module.mjs'
3
+ export { type Home, type LinkExternal, type LinkInternal, type ModuleOptions, type NotFound, type Page, type RichText, type SEO, type SanityArray, type SanityModule, type SanityVisualEditingMode, type SanityVisualEditingRefreshHandler, type VisualEditingOptions } from './module.mjs'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devite/nuxt-sanity",
3
- "version": "2.14.2",
3
+ "version": "2.16.0",
4
4
  "description": "Advanced Sanity integration for Nuxt.js.",
5
5
  "repository": "devite-io/nuxt-sanity",
6
6
  "license": "MIT",
@@ -28,35 +28,35 @@
28
28
  ],
29
29
  "dependencies": {
30
30
  "@nuxt/image": "^1.11.0",
31
- "@portabletext/vue": "^1.0.12",
32
- "@sanity/client": "^7.8.2",
33
- "@sanity/core-loader": "^1.8.17",
34
- "@sanity/preview-url-secret": "^2.1.14",
35
- "@sanity/types": "^4.2.0",
36
- "@sanity/visual-editing": "^3.0.2",
31
+ "@portabletext/vue": "^1.0.14",
32
+ "@sanity/client": "^7.12.0",
33
+ "@sanity/core-loader": "^2.0.0",
34
+ "@sanity/preview-url-secret": "^2.1.15",
35
+ "@sanity/types": "^4.12.0",
36
+ "@sanity/visual-editing": "^4.0.0",
37
37
  "defu": "^6.1.4",
38
- "ofetch": "^1.4.1",
38
+ "ofetch": "^1.5.0",
39
39
  "ohash": "^1.1.6",
40
- "unstorage": "^1.16.1"
40
+ "unstorage": "^1.17.1"
41
41
  },
42
42
  "devDependencies": {
43
- "@nuxt/eslint-config": "^1.7.1",
44
- "@nuxt/kit": "^4.0.3",
43
+ "@nuxt/eslint-config": "^1.9.0",
44
+ "@nuxt/kit": "^4.2.0",
45
45
  "@nuxt/module-builder": "^1.0.2",
46
- "@nuxt/schema": "^4.0.3",
47
- "@nuxt/test-utils": "^3.19.2",
46
+ "@nuxt/schema": "^4.2.0",
47
+ "@nuxt/test-utils": "^3.20.1",
48
48
  "@types/node": "latest",
49
49
  "changelogen": "^0.6.2",
50
- "eslint": "^9.32.0",
50
+ "eslint": "^9.38.0",
51
51
  "h3": "^1.15.4",
52
- "nuxt": "^4.0.3",
53
- "typescript": "5.8.3",
54
- "vite": "7.0.6",
55
- "vitest": "^3.2.4",
52
+ "nuxt": "^4.2.0",
53
+ "typescript": "5.9.3",
54
+ "vite": "7.1.12",
55
+ "vitest": "^3.2.0",
56
56
  "vitest-environment-nuxt": "1.0.1",
57
- "vue": "3.5.18",
58
- "vue-router": "^4.5.1",
59
- "vue-tsc": "^3.0.5"
57
+ "vue": "3.5.22",
58
+ "vue-router": "^4.6.3",
59
+ "vue-tsc": "^3.1.2"
60
60
  },
61
61
  "resolutions": {
62
62
  "@devite/nuxt-sanity": "link:."
@@ -1,16 +0,0 @@
1
- import type { LinkExternal } from '@devite/nuxt-sanity';
2
- type __VLS_Props = {
3
- data: LinkExternal;
4
- };
5
- declare var __VLS_7: {};
6
- type __VLS_Slots = {} & {
7
- default?: (props: typeof __VLS_7) => any;
8
- };
9
- declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
10
- declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
11
- export default _default;
12
- type __VLS_WithSlots<T, S> = T & {
13
- new (): {
14
- $slots: S;
15
- };
16
- };
@@ -1,19 +0,0 @@
1
- import type { Reference } from '@sanity/types';
2
- import type { LinkInternal } from '@devite/nuxt-sanity';
3
- type __VLS_Props = {
4
- data: LinkInternal | {
5
- reference: Reference;
6
- };
7
- };
8
- declare var __VLS_7: {};
9
- type __VLS_Slots = {} & {
10
- default?: (props: typeof __VLS_7) => any;
11
- };
12
- declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
- declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
14
- export default _default;
15
- type __VLS_WithSlots<T, S> = T & {
16
- new (): {
17
- $slots: S;
18
- };
19
- };