next-sanity 7.0.9 → 7.0.10

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.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@sanity/preview-kit/client");exports.createClient=function(r){let{studioUrl:t=process.env.NEXT_PUBLIC_SANITY_STUDIO_URL,encodeSourceMap:o=!1}=r;return"auto"===o&&"preview"===process.env.NEXT_PUBLIC_VERCEL_ENV&&(o=!0),e.createClient({...r,studioUrl:t,encodeSourceMap:o})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@sanity/preview-kit/client"),t=require("@sanity/client");Object.defineProperty(exports,"unstable__adapter",{enumerable:!0,get:function(){return t.unstable__adapter}}),Object.defineProperty(exports,"unstable__environment",{enumerable:!0,get:function(){return t.unstable__environment}}),exports.createClient=function(t){let{studioUrl:r=process.env.NEXT_PUBLIC_SANITY_STUDIO_URL,encodeSourceMap:n=!1}=t;return"auto"===n&&"preview"===process.env.NEXT_PUBLIC_VERCEL_ENV&&(n=!0),e.createClient({...t,studioUrl:r,encodeSourceMap:n})};
2
2
  //# sourceMappingURL=client.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"client.cjs","sources":["../src/client.ts"],"sourcesContent":["import {\n createClient as createPreviewKitClient,\n type PreviewKitClientConfig,\n} from '@sanity/preview-kit/client'\n\nexport type * from '@sanity/preview-kit/client'\n\n/** @public */\nexport interface ClientConfig\n extends Omit<PreviewKitClientConfig, 'studioUrl' | 'encodeSourceMap'> {\n /**\n * Where the Studio is hosted.\n * If it's embedded in the app, use the base path for example `/studio`.\n * Otherwise provide the full URL to where the Studio is hosted, for example: `https://blog.sanity.studio`.\n * @defaultValue process.env.NEXT_PUBLIC_SANITY_STUDIO_URL\n * @alpha\n */\n studioUrl?: PreviewKitClientConfig['studioUrl']\n /**\n * If this is false then `@sanity/client` will be used. If set to 'auto' then it's enabled on Vercel Preview Deployments.\n * @defaultValue false\n * @alpha\n */\n encodeSourceMap?: PreviewKitClientConfig['encodeSourceMap']\n}\n\n/** @public */\nexport type SanityClient = ReturnType<typeof createPreviewKitClient>\n\n/**\n * @public\n */\nexport function createClient(config: ClientConfig): SanityClient {\n let {\n // eslint-disable-next-line prefer-const, no-process-env\n studioUrl = process.env.NEXT_PUBLIC_SANITY_STUDIO_URL! as PreviewKitClientConfig['studioUrl'],\n encodeSourceMap = false,\n } = config\n // eslint-disable-next-line no-process-env\n if (encodeSourceMap === 'auto' && process.env.NEXT_PUBLIC_VERCEL_ENV === 'preview') {\n encodeSourceMap = true\n }\n return createPreviewKitClient({...config, studioUrl, encodeSourceMap})\n}\n"],"names":["config","studioUrl","process","env","NEXT_PUBLIC_SANITY_STUDIO_URL","encodeSourceMap","NEXT_PUBLIC_VERCEL_ENV","createPreviewKitClient"],"mappings":"qIAgCO,SAAsBA,GACvB,IAAAC,UAEFA,EAAYC,QAAQC,IAAIC,8BAAAC,gBACxBA,GAAkB,GAChBL,EAKJ,MAHwB,SAApBK,GAAqE,YAAvCH,QAAQC,IAAIG,yBAC1BD,GAAA,GAEbE,EAAAA,aAAuB,IAAIP,EAAQC,YAAWI,mBACvD"}
1
+ {"version":3,"file":"client.cjs","sources":["../src/client.ts"],"sourcesContent":["import {\n createClient as createPreviewKitClient,\n type PreviewKitClientConfig,\n} from '@sanity/preview-kit/client'\n\nexport {unstable__adapter, unstable__environment} from '@sanity/client'\nexport type * from '@sanity/preview-kit/client'\n\n/** @public */\nexport interface ClientConfig\n extends Omit<PreviewKitClientConfig, 'studioUrl' | 'encodeSourceMap'> {\n /**\n * Where the Studio is hosted.\n * If it's embedded in the app, use the base path for example `/studio`.\n * Otherwise provide the full URL to where the Studio is hosted, for example: `https://blog.sanity.studio`.\n * @defaultValue process.env.NEXT_PUBLIC_SANITY_STUDIO_URL\n * @alpha\n */\n studioUrl?: PreviewKitClientConfig['studioUrl']\n /**\n * If this is false then `@sanity/client` will be used. If set to 'auto' then it's enabled on Vercel Preview Deployments.\n * @defaultValue false\n * @alpha\n */\n encodeSourceMap?: PreviewKitClientConfig['encodeSourceMap']\n}\n\n/** @public */\nexport type SanityClient = ReturnType<typeof createPreviewKitClient>\n\n/**\n * @public\n */\nexport function createClient(config: ClientConfig): SanityClient {\n let {\n // eslint-disable-next-line prefer-const, no-process-env\n studioUrl = process.env.NEXT_PUBLIC_SANITY_STUDIO_URL! as PreviewKitClientConfig['studioUrl'],\n encodeSourceMap = false,\n } = config\n // eslint-disable-next-line no-process-env\n if (encodeSourceMap === 'auto' && process.env.NEXT_PUBLIC_VERCEL_ENV === 'preview') {\n encodeSourceMap = true\n }\n return createPreviewKitClient({...config, studioUrl, encodeSourceMap})\n}\n"],"names":["config","studioUrl","process","env","NEXT_PUBLIC_SANITY_STUDIO_URL","encodeSourceMap","NEXT_PUBLIC_VERCEL_ENV","createPreviewKitClient"],"mappings":"qYAiCO,SAAsBA,GACvB,IAAAC,UAEFA,EAAYC,QAAQC,IAAIC,8BAAAC,gBACxBA,GAAkB,GAChBL,EAKJ,MAHwB,SAApBK,GAAqE,YAAvCH,QAAQC,IAAIG,yBAC1BD,GAAA,GAEbE,EAAAA,aAAuB,IAAIP,EAAQC,YAAWI,mBACvD"}
package/dist/client.js CHANGED
@@ -1,2 +1,2 @@
1
- import{createClient as e}from"@sanity/preview-kit/client";function r(r){let{studioUrl:o=process.env.NEXT_PUBLIC_SANITY_STUDIO_URL,encodeSourceMap:t=!1}=r;return"auto"===t&&"preview"===process.env.NEXT_PUBLIC_VERCEL_ENV&&(t=!0),e({...r,studioUrl:o,encodeSourceMap:t})}export{r as createClient};
1
+ import{createClient as e}from"@sanity/preview-kit/client";export{unstable__adapter,unstable__environment}from"@sanity/client";function t(t){let{studioUrl:r=process.env.NEXT_PUBLIC_SANITY_STUDIO_URL,encodeSourceMap:n=!1}=t;return"auto"===n&&"preview"===process.env.NEXT_PUBLIC_VERCEL_ENV&&(n=!0),e({...t,studioUrl:r,encodeSourceMap:n})}export{t as createClient};
2
2
  //# sourceMappingURL=client.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","sources":["../src/client.ts"],"sourcesContent":["import {\n createClient as createPreviewKitClient,\n type PreviewKitClientConfig,\n} from '@sanity/preview-kit/client'\n\nexport type * from '@sanity/preview-kit/client'\n\n/** @public */\nexport interface ClientConfig\n extends Omit<PreviewKitClientConfig, 'studioUrl' | 'encodeSourceMap'> {\n /**\n * Where the Studio is hosted.\n * If it's embedded in the app, use the base path for example `/studio`.\n * Otherwise provide the full URL to where the Studio is hosted, for example: `https://blog.sanity.studio`.\n * @defaultValue process.env.NEXT_PUBLIC_SANITY_STUDIO_URL\n * @alpha\n */\n studioUrl?: PreviewKitClientConfig['studioUrl']\n /**\n * If this is false then `@sanity/client` will be used. If set to 'auto' then it's enabled on Vercel Preview Deployments.\n * @defaultValue false\n * @alpha\n */\n encodeSourceMap?: PreviewKitClientConfig['encodeSourceMap']\n}\n\n/** @public */\nexport type SanityClient = ReturnType<typeof createPreviewKitClient>\n\n/**\n * @public\n */\nexport function createClient(config: ClientConfig): SanityClient {\n let {\n // eslint-disable-next-line prefer-const, no-process-env\n studioUrl = process.env.NEXT_PUBLIC_SANITY_STUDIO_URL! as PreviewKitClientConfig['studioUrl'],\n encodeSourceMap = false,\n } = config\n // eslint-disable-next-line no-process-env\n if (encodeSourceMap === 'auto' && process.env.NEXT_PUBLIC_VERCEL_ENV === 'preview') {\n encodeSourceMap = true\n }\n return createPreviewKitClient({...config, studioUrl, encodeSourceMap})\n}\n"],"names":["createClient","config","studioUrl","process","env","NEXT_PUBLIC_SANITY_STUDIO_URL","encodeSourceMap","NEXT_PUBLIC_VERCEL_ENV","createPreviewKitClient"],"mappings":"0DAgCO,SAASA,EAAaC,GACvB,IAAAC,UAEFA,EAAYC,QAAQC,IAAIC,8BAAAC,gBACxBA,GAAkB,GAChBL,EAKJ,MAHwB,SAApBK,GAAqE,YAAvCH,QAAQC,IAAIG,yBAC1BD,GAAA,GAEbE,EAAuB,IAAIP,EAAQC,YAAWI,mBACvD"}
1
+ {"version":3,"file":"client.js","sources":["../src/client.ts"],"sourcesContent":["import {\n createClient as createPreviewKitClient,\n type PreviewKitClientConfig,\n} from '@sanity/preview-kit/client'\n\nexport {unstable__adapter, unstable__environment} from '@sanity/client'\nexport type * from '@sanity/preview-kit/client'\n\n/** @public */\nexport interface ClientConfig\n extends Omit<PreviewKitClientConfig, 'studioUrl' | 'encodeSourceMap'> {\n /**\n * Where the Studio is hosted.\n * If it's embedded in the app, use the base path for example `/studio`.\n * Otherwise provide the full URL to where the Studio is hosted, for example: `https://blog.sanity.studio`.\n * @defaultValue process.env.NEXT_PUBLIC_SANITY_STUDIO_URL\n * @alpha\n */\n studioUrl?: PreviewKitClientConfig['studioUrl']\n /**\n * If this is false then `@sanity/client` will be used. If set to 'auto' then it's enabled on Vercel Preview Deployments.\n * @defaultValue false\n * @alpha\n */\n encodeSourceMap?: PreviewKitClientConfig['encodeSourceMap']\n}\n\n/** @public */\nexport type SanityClient = ReturnType<typeof createPreviewKitClient>\n\n/**\n * @public\n */\nexport function createClient(config: ClientConfig): SanityClient {\n let {\n // eslint-disable-next-line prefer-const, no-process-env\n studioUrl = process.env.NEXT_PUBLIC_SANITY_STUDIO_URL! as PreviewKitClientConfig['studioUrl'],\n encodeSourceMap = false,\n } = config\n // eslint-disable-next-line no-process-env\n if (encodeSourceMap === 'auto' && process.env.NEXT_PUBLIC_VERCEL_ENV === 'preview') {\n encodeSourceMap = true\n }\n return createPreviewKitClient({...config, studioUrl, encodeSourceMap})\n}\n"],"names":["createClient","config","studioUrl","process","env","NEXT_PUBLIC_SANITY_STUDIO_URL","encodeSourceMap","NEXT_PUBLIC_VERCEL_ENV","createPreviewKitClient"],"mappings":"8HAiCO,SAASA,EAAaC,GACvB,IAAAC,UAEFA,EAAYC,QAAQC,IAAIC,8BAAAC,gBACxBA,GAAkB,GAChBL,EAKJ,MAHwB,SAApBK,GAAqE,YAAvCH,QAAQC,IAAIG,yBAC1BD,GAAA,GAEbE,EAAuB,IAAIP,EAAQC,YAAWI,mBACvD"}
package/dist/index.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./client.cjs");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=t(require("groq"));exports.createClient=e.createClient,Object.defineProperty(exports,"groq",{enumerable:!0,get:function(){return r.default}});
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./client.cjs"),t=require("groq"),r=require("@sanity/client");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=n(t);exports.createClient=e.createClient,Object.defineProperty(exports,"groq",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(exports,"unstable__adapter",{enumerable:!0,get:function(){return r.unstable__adapter}}),Object.defineProperty(exports,"unstable__environment",{enumerable:!0,get:function(){return r.unstable__environment}});
2
2
  //# sourceMappingURL=index.cjs.map
package/dist/index.cjs.js CHANGED
@@ -2,4 +2,6 @@ import cjs from './index.cjs';
2
2
 
3
3
  export const createClient = cjs.createClient;
4
4
  export const groq = cjs.groq;
5
+ export const unstable__adapter = cjs.unstable__adapter;
6
+ export const unstable__environment = cjs.unstable__environment;
5
7
 
package/dist/index.d.ts CHANGED
@@ -1,6 +1,8 @@
1
1
  import {createClient as createClient_2} from '@sanity/preview-kit/client'
2
2
  import {default as groq} from 'groq'
3
3
  import {PreviewKitClientConfig} from '@sanity/preview-kit/client'
4
+ import {unstable__adapter} from '@sanity/client'
5
+ import {unstable__environment} from '@sanity/client'
4
6
 
5
7
  /** @public */
6
8
  export declare interface ClientConfig
@@ -31,6 +33,10 @@ export {groq}
31
33
  /** @public */
32
34
  export declare type SanityClient = ReturnType<typeof createClient_2>
33
35
 
36
+ export {unstable__adapter}
37
+
38
+ export {unstable__environment}
39
+
34
40
  export * from '@sanity/preview-kit/client'
35
41
 
36
42
  export {}
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export{createClient}from"./client.js";export{default as groq}from"groq";
1
+ export{createClient}from"./client.js";export{default as groq}from"groq";export{unstable__adapter,unstable__environment}from"@sanity/client";
2
2
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-sanity",
3
- "version": "7.0.9",
3
+ "version": "7.0.10",
4
4
  "description": "Sanity.io toolkit for Next.js",
5
5
  "keywords": [
6
6
  "sanity",
@@ -184,7 +184,7 @@
184
184
  "@rollup/plugin-terser": "^0.4.4",
185
185
  "@sanity/eslint-config-studio": "^3.0.1",
186
186
  "@sanity/image-url": "^1.0.2",
187
- "@sanity/overlays": "2.3.4",
187
+ "@sanity/overlays": "2.3.5",
188
188
  "@sanity/pkg-utils": "^3.3.7",
189
189
  "@sanity/ui": "^2.0.0-beta.17",
190
190
  "@sanity/vision": "3.24.1",
package/src/client.ts CHANGED
@@ -3,6 +3,7 @@ import {
3
3
  type PreviewKitClientConfig,
4
4
  } from '@sanity/preview-kit/client'
5
5
 
6
+ export {unstable__adapter, unstable__environment} from '@sanity/client'
6
7
  export type * from '@sanity/preview-kit/client'
7
8
 
8
9
  /** @public */