next-sanity 9.0.9 → 9.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/_chunks-cjs/NextStudioNoScript.cjs +1 -0
- package/dist/_chunks-cjs/NextStudioNoScript.cjs.map +1 -0
- package/dist/_chunks-es/NextStudioNoScript.js +1 -0
- package/dist/_chunks-es/NextStudioNoScript.js.map +1 -0
- package/dist/image.cjs +1 -0
- package/dist/image.cjs.map +1 -0
- package/dist/image.js +1 -0
- package/dist/image.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -10
- package/dist/index.d.ts +2 -10
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/preview.cjs +1 -0
- package/dist/preview.cjs.map +1 -0
- package/dist/preview.js +1 -0
- package/dist/preview.js.map +1 -0
- package/dist/studio/client-component.cjs +1 -0
- package/dist/studio/client-component.cjs.map +1 -0
- package/dist/studio/client-component.d.cts +51 -0
- package/dist/studio/client-component.d.ts +51 -0
- package/dist/studio/client-component.js +1 -0
- package/dist/studio/client-component.js.map +1 -0
- package/dist/studio.cjs +1 -0
- package/dist/{studio/head.js.map → studio.cjs.map} +1 -1
- package/dist/{studio/index.d.cts → studio.d.cts} +4 -43
- package/dist/{studio/index.d.ts → studio.d.ts} +4 -43
- package/dist/studio.js +1 -0
- package/dist/studio.js.map +1 -0
- package/dist/visual-editing/client-component.cjs +1 -0
- package/dist/visual-editing/client-component.cjs.map +1 -0
- package/dist/visual-editing/client-component.d.cts +16 -0
- package/dist/visual-editing/client-component.d.ts +16 -0
- package/dist/visual-editing/client-component.js +1 -0
- package/dist/visual-editing/client-component.js.map +1 -0
- package/dist/visual-editing/{actions.cjs → server-actions.cjs} +1 -1
- package/dist/visual-editing/server-actions.cjs.map +1 -0
- package/dist/visual-editing/server-actions.d.cts +3 -0
- package/dist/visual-editing/server-actions.d.ts +3 -0
- package/dist/visual-editing/{actions.js → server-actions.js} +1 -1
- package/dist/visual-editing/server-actions.js.map +1 -0
- package/package.json +40 -13
- package/src/image/Image.tsx +1 -1
- package/src/image/imageLoader.ts +0 -2
- package/src/studio/{NextStudio.tsx → client-component/NextStudio.tsx} +2 -4
- package/src/studio/client-component/index.ts +1 -0
- package/src/studio/index.ts +2 -1
- package/src/visual-editing/{VisualEditing.tsx → client-component/index.ts} +1 -4
- package/src/visual-editing/index.tsx +3 -4
- package/src/visual-editing/{actions.ts → server-actions/index.ts} +0 -4
- package/dist/image/Image.cjs +0 -1
- package/dist/image/Image.cjs.map +0 -1
- package/dist/image/Image.js +0 -1
- package/dist/image/Image.js.map +0 -1
- package/dist/image/imageLoader.cjs +0 -1
- package/dist/image/imageLoader.cjs.map +0 -1
- package/dist/image/imageLoader.js +0 -1
- package/dist/image/imageLoader.js.map +0 -1
- package/dist/image/index.cjs +0 -1
- package/dist/image/index.cjs.map +0 -1
- package/dist/image/index.js +0 -1
- package/dist/image/index.js.map +0 -1
- package/dist/preview/index.cjs +0 -1
- package/dist/preview/index.cjs.map +0 -1
- package/dist/preview/index.js +0 -1
- package/dist/preview/index.js.map +0 -1
- package/dist/studio/NextStudio.cjs +0 -1
- package/dist/studio/NextStudio.cjs.map +0 -1
- package/dist/studio/NextStudio.js +0 -1
- package/dist/studio/NextStudio.js.map +0 -1
- package/dist/studio/NextStudioLayout.cjs +0 -1
- package/dist/studio/NextStudioLayout.cjs.map +0 -1
- package/dist/studio/NextStudioLayout.js +0 -1
- package/dist/studio/NextStudioLayout.js.map +0 -1
- package/dist/studio/NextStudioNoScript.cjs +0 -1
- package/dist/studio/NextStudioNoScript.cjs.map +0 -1
- package/dist/studio/NextStudioNoScript.js +0 -1
- package/dist/studio/NextStudioNoScript.js.map +0 -1
- package/dist/studio/createHashHistoryForStudio.cjs +0 -1
- package/dist/studio/createHashHistoryForStudio.cjs.map +0 -1
- package/dist/studio/createHashHistoryForStudio.js +0 -1
- package/dist/studio/createHashHistoryForStudio.js.map +0 -1
- package/dist/studio/head.cjs +0 -1
- package/dist/studio/head.cjs.map +0 -1
- package/dist/studio/head.js +0 -1
- package/dist/studio/index.cjs +0 -1
- package/dist/studio/index.cjs.map +0 -1
- package/dist/studio/index.js +0 -1
- package/dist/studio/index.js.map +0 -1
- package/dist/studio/registry.cjs +0 -1
- package/dist/studio/registry.cjs.map +0 -1
- package/dist/studio/registry.js +0 -1
- package/dist/studio/registry.js.map +0 -1
- package/dist/studio/useIsMounted.cjs +0 -1
- package/dist/studio/useIsMounted.cjs.map +0 -1
- package/dist/studio/useIsMounted.js +0 -1
- package/dist/studio/useIsMounted.js.map +0 -1
- package/dist/visual-editing/VisualEditing.cjs +0 -1
- package/dist/visual-editing/VisualEditing.cjs.map +0 -1
- package/dist/visual-editing/VisualEditing.js +0 -1
- package/dist/visual-editing/VisualEditing.js.map +0 -1
- package/dist/visual-editing/actions.cjs.map +0 -1
- package/dist/visual-editing/actions.js.map +0 -1
- package/dist/visual-editing/index.cjs +0 -1
- package/dist/visual-editing/index.cjs.map +0 -1
- package/dist/visual-editing/index.js +0 -1
- package/dist/visual-editing/index.js.map +0 -1
- /package/dist/{image/index.d.cts → image.d.cts} +0 -0
- /package/dist/{image/index.d.ts → image.d.ts} +0 -0
- /package/dist/{preview/index.d.cts → preview.d.cts} +0 -0
- /package/dist/{preview/index.d.ts → preview.d.ts} +0 -0
- /package/src/studio/{createHashHistoryForStudio.ts → client-component/createHashHistoryForStudio.ts} +0 -0
- /package/src/studio/{registry.tsx → client-component/registry.tsx} +0 -0
- /package/src/studio/{useIsMounted.ts → client-component/useIsMounted.ts} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime");const t=require("react").memo((({children:t})=>e.jsx("div",{id:"sanity","data-ui":"NextStudioLayout",style:{height:"100vh",maxHeight:"100dvh",overscrollBehavior:"none",WebkitFontSmoothing:"antialiased",overflow:"auto"},children:t})));exports.N=t,exports.a=()=>e.jsx("noscript",{children:e.jsx("div",{style:{position:"absolute",top:0,right:0,left:0,bottom:0,background:"#fff",zIndex:1},children:e.jsxs("div",{style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",textAlign:"center",fontFamily:"helvetica, arial, sans-serif"},children:[e.jsx("h1",{children:"JavaScript disabled"}),e.jsxs("p",{children:["Please ",e.jsx("a",{href:"https://www.enable-javascript.com/",children:"enable JavaScript"})," in your browser and reload the page to proceed."]})]})})});//# sourceMappingURL=NextStudioNoScript.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NextStudioNoScript.cjs","sources":["../../src/studio/NextStudioLayout.tsx","../../src/studio/NextStudioNoScript.tsx"],"sourcesContent":["import {memo} from 'react'\n\n/** @public */\nexport interface NextStudioLayoutProps {\n children: React.ReactNode\n}\n\nconst NextStudioLayoutComponent = ({children}: NextStudioLayoutProps) => {\n return (\n <div\n id=\"sanity\"\n data-ui=\"NextStudioLayout\"\n style={{\n height: '100vh',\n maxHeight: '100dvh',\n overscrollBehavior: 'none',\n WebkitFontSmoothing: 'antialiased',\n overflow: 'auto',\n }}\n >\n {children}\n </div>\n )\n}\n\n/** @public */\nexport const NextStudioLayout = memo(NextStudioLayoutComponent)\n","/** @internal */\nexport const NextStudioNoScript = (): JSX.Element => (\n <noscript>\n <div\n style={{\n position: 'absolute',\n top: 0,\n right: 0,\n left: 0,\n bottom: 0,\n background: '#fff',\n zIndex: 1,\n }}\n >\n <div\n style={{\n position: 'absolute',\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n textAlign: 'center',\n fontFamily: 'helvetica, arial, sans-serif',\n }}\n >\n <h1>JavaScript disabled</h1>\n <p>\n Please <a href=\"https://www.enable-javascript.com/\">enable JavaScript</a> in your\n browser and reload the page to proceed.\n </p>\n </div>\n </div>\n </noscript>\n)\n"],"names":["jsxRuntime","require","NextStudioLayout","memo","children","jsx","id","style","height","maxHeight","overscrollBehavior","WebkitFontSmoothing","overflow","exports","N","a","position","top","right","left","bottom","background","zIndex","jsxs","transform","textAlign","fontFamily","href"],"mappings":"aAOA,IAAAA,EAAAC,QAAA,qBAAA,MAmBaC,EAnBbD,QAAA,SAmBgCE,MAnBE,EAAEC,cAEhCJ,EAAAK,IAAC,MAAA,CACCC,GAAG,SACH,UAAQ,mBACRC,MAAO,CACLC,OAAQ,QACRC,UAAW,SACXC,mBAAoB,OACpBC,oBAAqB,cACrBC,SAAU,QAGXR,eCWLS,QAAAC,EAAAZ,EAAAW,QAAAE,EA9BgC,IAChCV,MAAC,WACC,CAAAD,SAAAJ,EAAAK,IAAC,MAAA,CACCE,MAAO,CACLS,SAAU,WACVC,IAAK,EACLC,MAAO,EACPC,KAAM,EACNC,OAAQ,EACRC,WAAY,OACZC,OAAQ,GAGVlB,SAAAJ,EAAAuB,KAAC,MAAA,CACChB,MAAO,CACLS,SAAU,WACVC,IAAK,MACLE,KAAM,MACNK,UAAW,wBACXC,UAAW,SACXC,WAAY,gCAGdtB,SAAA,GAAAC,IAAC,MAAGD,SAAmB,+BACtB,IAAE,CAAAA,SAAA,CAAA,UACOC,EAAAA,IAAA,IAAA,CAAEsB,KAAK,qCAAqCvB,SAAiB,sBAAI"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e,jsxs as t}from"react/jsx-runtime";import{memo as i}from"react";const a=i((({children:t})=>e("div",{id:"sanity","data-ui":"NextStudioLayout",style:{height:"100vh",maxHeight:"100dvh",overscrollBehavior:"none",WebkitFontSmoothing:"antialiased",overflow:"auto"},children:t}))),o=()=>e("noscript",{children:e("div",{style:{position:"absolute",top:0,right:0,left:0,bottom:0,background:"#fff",zIndex:1},children:t("div",{style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",textAlign:"center",fontFamily:"helvetica, arial, sans-serif"},children:[e("h1",{children:"JavaScript disabled"}),t("p",{children:["Please ",e("a",{href:"https://www.enable-javascript.com/",children:"enable JavaScript"})," in your browser and reload the page to proceed."]})]})})});export{a as N,o as a};//# sourceMappingURL=NextStudioNoScript.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NextStudioNoScript.js","sources":["../../src/studio/NextStudioLayout.tsx","../../src/studio/NextStudioNoScript.tsx"],"sourcesContent":["import {memo} from 'react'\n\n/** @public */\nexport interface NextStudioLayoutProps {\n children: React.ReactNode\n}\n\nconst NextStudioLayoutComponent = ({children}: NextStudioLayoutProps) => {\n return (\n <div\n id=\"sanity\"\n data-ui=\"NextStudioLayout\"\n style={{\n height: '100vh',\n maxHeight: '100dvh',\n overscrollBehavior: 'none',\n WebkitFontSmoothing: 'antialiased',\n overflow: 'auto',\n }}\n >\n {children}\n </div>\n )\n}\n\n/** @public */\nexport const NextStudioLayout = memo(NextStudioLayoutComponent)\n","/** @internal */\nexport const NextStudioNoScript = (): JSX.Element => (\n <noscript>\n <div\n style={{\n position: 'absolute',\n top: 0,\n right: 0,\n left: 0,\n bottom: 0,\n background: '#fff',\n zIndex: 1,\n }}\n >\n <div\n style={{\n position: 'absolute',\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n textAlign: 'center',\n fontFamily: 'helvetica, arial, sans-serif',\n }}\n >\n <h1>JavaScript disabled</h1>\n <p>\n Please <a href=\"https://www.enable-javascript.com/\">enable JavaScript</a> in your\n browser and reload the page to proceed.\n </p>\n </div>\n </div>\n </noscript>\n)\n"],"names":["jsx","jsxs","memo","NextStudioLayout","children","id","style","height","maxHeight","overscrollBehavior","WebkitFontSmoothing","overflow","NextStudioNoScript","position","top","right","left","bottom","background","zIndex","transform","textAlign","fontFamily","href"],"mappings":"cAOAA,UAAAC,MAAA,mCAAAC,MAAA,QAAA,MAmBaC,EAAmBD,GAnBE,EAAEE,cAEhCJ,EAAC,MAAA,CACCK,GAAG,SACH,UAAQ,mBACRC,MAAO,CACLC,OAAQ,QACRC,UAAW,SACXC,mBAAoB,OACpBC,oBAAqB,cACrBC,SAAU,QAGXP,eCnBMQ,EAAqB,IAChCZ,EAAC,WACC,CAAAI,SAAAJ,EAAC,MAAA,CACCM,MAAO,CACLO,SAAU,WACVC,IAAK,EACLC,MAAO,EACPC,KAAM,EACNC,OAAQ,EACRC,WAAY,OACZC,OAAQ,GAGVf,SAAAH,EAAC,MAAA,CACCK,MAAO,CACLO,SAAU,WACVC,IAAK,MACLE,KAAM,MACNI,UAAW,wBACXC,UAAW,SACXC,WAAY,gCAGdlB,SAAA,CAACJ,EAAA,MAAGI,SAAmB,0BACtB,IAAE,CAAAA,SAAA,CAAA,YACO,IAAA,CAAEmB,KAAK,qCAAqCnB,SAAiB,sBAAI"}
|
package/dist/image.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=r(require("next/image"));const a=({src:e,width:r,quality:t})=>{const a=new URL(e);if(a.searchParams.set("auto","format"),a.searchParams.set("fit",a.searchParams.get("fit")||"min"),a.searchParams.has("h")&&a.searchParams.has("w")){const e=parseInt(a.searchParams.get("h"),10),t=parseInt(a.searchParams.get("w"),10);a.searchParams.set("h",Math.round(e/t*r).toString())}return a.searchParams.set("w",r.toString()),t&&a.searchParams.set("q",t.toString()),a.href};exports.Image=function(r){const{loader:s,src:o,...n}=r;if(s)throw new TypeError("The `loader` prop is not supported on `Image` components. Use `next/image` directly to use a custom loader.");let c;try{c=new URL(o),r.height&&c.searchParams.set("h",`${r.height}`),r.width&&c.searchParams.set("w",`${r.width}`)}catch(e){throw new TypeError("The `src` prop must be a valid URL to an image on the Sanity Image CDN.",{cause:e})}return e.jsx(t.default,{...n,src:c.toString(),loader:a})},exports.imageLoader=a;//# sourceMappingURL=image.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image.cjs","sources":["../src/image/imageLoader.ts","../src/image/Image.tsx"],"sourcesContent":["import type {ImageLoader} from 'next/image'\n\n/**\n * @alpha\n */\nexport const imageLoader = (({src, width, quality}) => {\n const url = new URL(src)\n url.searchParams.set('auto', 'format')\n url.searchParams.set('fit', url.searchParams.get('fit') || 'min')\n if (url.searchParams.has('h') && url.searchParams.has('w')) {\n const originalHeight = parseInt(url.searchParams.get('h')!, 10)\n const originalWidth = parseInt(url.searchParams.get('w')!, 10)\n url.searchParams.set('h', Math.round((originalHeight / originalWidth) * width).toString())\n }\n url.searchParams.set('w', width.toString())\n if (quality) {\n url.searchParams.set('q', quality.toString())\n }\n return url.href\n}) satisfies ImageLoader\n","import NextImage, {type ImageProps as NextImageProps} from 'next/image'\n\nimport {imageLoader} from './imageLoader'\n\n/**\n * @alpha\n */\nexport interface ImageProps extends Omit<NextImageProps, 'loader' | 'src'> {\n /**\n * The `loader` prop is not supported on `Image` components. Use `next/image` directly to use a custom loader.\n */\n loader?: never\n /**\n * Must be a string that is a valid URL to an image on the Sanity Image CDN.\n */\n src: string\n}\n\n/**\n * @alpha\n */\nexport function Image(props: ImageProps): JSX.Element {\n const {loader, src, ...rest} = props\n if (loader) {\n throw new TypeError(\n 'The `loader` prop is not supported on `Image` components. Use `next/image` directly to use a custom loader.',\n )\n }\n let srcUrl: URL\n try {\n srcUrl = new URL(src)\n if (props.height) {\n srcUrl.searchParams.set('h', `${props.height}`)\n }\n if (props.width) {\n srcUrl.searchParams.set('w', `${props.width}`)\n }\n } catch (err) {\n throw new TypeError(\n 'The `src` prop must be a valid URL to an image on the Sanity Image CDN.',\n {cause: err},\n )\n }\n return <NextImage {...rest} src={srcUrl.toString()} loader={imageLoader} />\n}\n"],"names":["imageLoader","src","width","quality","url","URL","searchParams","set","get","has","originalHeight","parseInt","originalWidth","Math","round","toString","href","exports","Image","props","loader","rest","TypeError","srcUrl","height","err","cause","NextImage"],"mappings":"2NAKO,MAAMA,EAAe,EAAEC,MAAKC,QAAOC,cAClC,MAAAC,EAAM,IAAIC,IAAIJ,GACpB,GAAAG,EAAIE,aAAaC,IAAI,OAAQ,UAC7BH,EAAIE,aAAaC,IAAI,MAAOH,EAAIE,aAAaE,IAAI,QAAU,OACvDJ,EAAIE,aAAaG,IAAI,MAAQL,EAAIE,aAAaG,IAAI,KAAM,CAC1D,MAAMC,EAAiBC,SAASP,EAAIE,aAAaE,IAAI,KAAO,IACtDI,EAAgBD,SAASP,EAAIE,aAAaE,IAAI,KAAO,IACvDJ,EAAAE,aAAaC,IAAI,IAAKM,KAAKC,MAAOJ,EAAiBE,EAAiBV,GAAOa,WACjF,CACA,OAAAX,EAAIE,aAAaC,IAAI,IAAKL,EAAMa,YAC5BZ,GACFC,EAAIE,aAAaC,IAAI,IAAKJ,EAAQY,YAE7BX,EAAIY,IAAA,EC0BbC,QAAAC,MAvBO,SAAeC,GACpB,MAAMC,OAACA,EAAAnB,IAAQA,KAAQoB,GAAQF,EAC3B,GAAAC,EACF,MAAM,IAAIE,UACR,+GAGA,IAAAC,EACA,IACOA,EAAA,IAAIlB,IAAIJ,GACbkB,EAAMK,QACRD,EAAOjB,aAAaC,IAAI,IAAK,GAAGY,EAAMK,UAEpCL,EAAMjB,OACRqB,EAAOjB,aAAaC,IAAI,IAAK,GAAGY,EAAMjB,eAEjCuB,GACP,MAAM,IAAIH,UACR,0EACA,CAACI,MAAOD,GAEZ,CACO,aAACE,EAAAA,YAAcN,EAAMpB,IAAKsB,EAAOR,WAAYK,OAAQpB,GAC9D,EAAAiB,QAAAjB,YAAAA"}
|
package/dist/image.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{jsx as r}from"react/jsx-runtime";import e from"next/image";const a=({src:r,width:e,quality:a})=>{const t=new URL(r);if(t.searchParams.set("auto","format"),t.searchParams.set("fit",t.searchParams.get("fit")||"min"),t.searchParams.has("h")&&t.searchParams.has("w")){const r=parseInt(t.searchParams.get("h"),10),a=parseInt(t.searchParams.get("w"),10);t.searchParams.set("h",Math.round(r/a*e).toString())}return t.searchParams.set("w",e.toString()),a&&t.searchParams.set("q",a.toString()),t.href};function t(t){const{loader:s,src:o,...h}=t;if(s)throw new TypeError("The `loader` prop is not supported on `Image` components. Use `next/image` directly to use a custom loader.");let n;try{n=new URL(o),t.height&&n.searchParams.set("h",`${t.height}`),t.width&&n.searchParams.set("w",`${t.width}`)}catch(r){throw new TypeError("The `src` prop must be a valid URL to an image on the Sanity Image CDN.",{cause:r})}return r(e,{...h,src:n.toString(),loader:a})}export{t as Image,a as imageLoader};//# sourceMappingURL=image.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image.js","sources":["../src/image/imageLoader.ts","../src/image/Image.tsx"],"sourcesContent":["import type {ImageLoader} from 'next/image'\n\n/**\n * @alpha\n */\nexport const imageLoader = (({src, width, quality}) => {\n const url = new URL(src)\n url.searchParams.set('auto', 'format')\n url.searchParams.set('fit', url.searchParams.get('fit') || 'min')\n if (url.searchParams.has('h') && url.searchParams.has('w')) {\n const originalHeight = parseInt(url.searchParams.get('h')!, 10)\n const originalWidth = parseInt(url.searchParams.get('w')!, 10)\n url.searchParams.set('h', Math.round((originalHeight / originalWidth) * width).toString())\n }\n url.searchParams.set('w', width.toString())\n if (quality) {\n url.searchParams.set('q', quality.toString())\n }\n return url.href\n}) satisfies ImageLoader\n","import NextImage, {type ImageProps as NextImageProps} from 'next/image'\n\nimport {imageLoader} from './imageLoader'\n\n/**\n * @alpha\n */\nexport interface ImageProps extends Omit<NextImageProps, 'loader' | 'src'> {\n /**\n * The `loader` prop is not supported on `Image` components. Use `next/image` directly to use a custom loader.\n */\n loader?: never\n /**\n * Must be a string that is a valid URL to an image on the Sanity Image CDN.\n */\n src: string\n}\n\n/**\n * @alpha\n */\nexport function Image(props: ImageProps): JSX.Element {\n const {loader, src, ...rest} = props\n if (loader) {\n throw new TypeError(\n 'The `loader` prop is not supported on `Image` components. Use `next/image` directly to use a custom loader.',\n )\n }\n let srcUrl: URL\n try {\n srcUrl = new URL(src)\n if (props.height) {\n srcUrl.searchParams.set('h', `${props.height}`)\n }\n if (props.width) {\n srcUrl.searchParams.set('w', `${props.width}`)\n }\n } catch (err) {\n throw new TypeError(\n 'The `src` prop must be a valid URL to an image on the Sanity Image CDN.',\n {cause: err},\n )\n }\n return <NextImage {...rest} src={srcUrl.toString()} loader={imageLoader} />\n}\n"],"names":["imageLoader","src","width","quality","url","URL","searchParams","set","get","has","originalHeight","parseInt","originalWidth","Math","round","toString","href","Image","props","loader","rest","TypeError","srcUrl","height","err","cause","jsx","NextImage"],"mappings":"+EAKO,MAAMA,EAAe,EAAEC,MAAKC,QAAOC,cAClC,MAAAC,EAAM,IAAIC,IAAIJ,GACpB,GAAAG,EAAIE,aAAaC,IAAI,OAAQ,UAC7BH,EAAIE,aAAaC,IAAI,MAAOH,EAAIE,aAAaE,IAAI,QAAU,OACvDJ,EAAIE,aAAaG,IAAI,MAAQL,EAAIE,aAAaG,IAAI,KAAM,CAC1D,MAAMC,EAAiBC,SAASP,EAAIE,aAAaE,IAAI,KAAO,IACtDI,EAAgBD,SAASP,EAAIE,aAAaE,IAAI,KAAO,IACvDJ,EAAAE,aAAaC,IAAI,IAAKM,KAAKC,MAAOJ,EAAiBE,EAAiBV,GAAOa,WACjF,CACA,OAAAX,EAAIE,aAAaC,IAAI,IAAKL,EAAMa,YAC5BZ,GACFC,EAAIE,aAAaC,IAAI,IAAKJ,EAAQY,YAE7BX,EAAIY,IAAA,ECGN,SAASC,EAAMC,GACpB,MAAMC,OAACA,EAAAlB,IAAQA,KAAQmB,GAAQF,EAC3B,GAAAC,EACF,MAAM,IAAIE,UACR,+GAGA,IAAAC,EACA,IACOA,EAAA,IAAIjB,IAAIJ,GACbiB,EAAMK,QACRD,EAAOhB,aAAaC,IAAI,IAAK,GAAGW,EAAMK,UAEpCL,EAAMhB,OACRoB,EAAOhB,aAAaC,IAAI,IAAK,GAAGW,EAAMhB,eAEjCsB,GACP,MAAM,IAAIH,UACR,0EACA,CAACI,MAAOD,GAEZ,CACO,OAAAE,EAACC,MAAcP,EAAMnB,IAAKqB,EAAOP,WAAYI,OAAQnB,GAC9D"}
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@sanity/client"),t=require("
|
|
1
|
+
"use strict";Object.create,Object.defineProperty,Object.getOwnPropertyDescriptor,Object.getOwnPropertyNames,Object.getPrototypeOf,Object.prototype.hasOwnProperty;Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@sanity/client"),t=require("react/jsx-runtime"),r=require("react"),n=require("@portabletext/react"),a=require("groq"),i=require("@sanity/visual-editing/create-data-attribute");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=o(a);const c=r.lazy((()=>import("next-sanity/visual-editing/client-component")));Object.defineProperty(exports,"createClient",{enumerable:!0,get:function(){return e.createClient}}),Object.defineProperty(exports,"unstable__adapter",{enumerable:!0,get:function(){return e.unstable__adapter}}),Object.defineProperty(exports,"unstable__environment",{enumerable:!0,get:function(){return e.unstable__environment}}),Object.defineProperty(exports,"groq",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(exports,"createDataAttribute",{enumerable:!0,get:function(){return i.createDataAttribute}}),exports.VisualEditing=function(e){return t.jsx(r.Suspense,{fallback:null,children:t.jsx(c,{...e})})},Object.keys(n).forEach((function(e){"default"!==e&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:function(){return n[e]}})}));//# sourceMappingURL=index.cjs.map
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../src/visual-editing/index.tsx"],"sourcesContent":["import type {VisualEditingProps} from 'next-sanity/visual-editing/client-component'\nimport {lazy, Suspense} from 'react'\n\nconst VisualEditingComponent = lazy(() => import('next-sanity/visual-editing/client-component'))\n\n/**\n * @public\n */\nexport function VisualEditing(props: VisualEditingProps): React.ReactElement {\n return (\n <Suspense fallback={null}>\n <VisualEditingComponent {...props} />\n </Suspense>\n )\n}\n\nexport {\n type CreateDataAttribute,\n createDataAttribute,\n type CreateDataAttributeProps,\n} from '@sanity/visual-editing/create-data-attribute'\nexport type {VisualEditingProps} from 'next-sanity/visual-editing/client-component'\n"],"names":["VisualEditingComponent","lazy","import","Object","defineProperty","exports","enumerable","get","client","createClient","unstable__adapter","unstable__environment","groq__default","default","createDataAttribute","VisualEditing","props","Suspense","fallback","children","keys","react","forEach","k","prototype","hasOwnProperty","call"],"mappings":"2eAGA,MAAMA,EAAyBC,EAAAA,MAAK,IAAMC,OAAO,iDAWjDC,OAAAC,eAAAC,QAAA,eAAA,CAAAC,YAAA,EAAAC,IAAA,WAAA,OAAAC,EAAAC,YAAA,IAAAN,OAAAC,eAAAC,QAAA,oBAAA,CAAAC,YAAA,EAAAC,IAAA,WAAA,OAAAC,EAAAE,iBAAA,IAAAP,OAAAC,eAAAC,QAAA,wBAAA,CAAAC,YAAA,EAAAC,IAAA,WAAA,OAAAC,EAAAG,qBAAA,IAAAR,OAAAC,eAAAC,QAAA,OAAA,CAAAC,YAAA,EAAAC,IAAA,WAAA,OAAAK,EAAAC,OAAA,IAAAV,OAAAC,eAAAC,QAAA,sBAAA,CAAAC,YAAA,EAAAC,IAAA,WAAA,OAAAO,EAAAA,mBAAA,IAAAT,QAAAU,cANO,SAAuBC,GAE1B,aAACC,EAAAA,UAASC,SAAU,KAClBC,eAACnB,EAAwB,IAAGgB,KAGlC,EAAAb,OAAAiB,KAAAC,GAAAC,SAAA,SAAAC,GAAA,YAAAA,IAAApB,OAAAqB,UAAAC,eAAAC,KAAArB,QAAAkB,IAAApB,OAAAC,eAAAC,QAAAkB,EAAA,CAAAjB,YAAA,EAAAC,IAAA,WAAA,OAAAc,EAAAE,EAAA,GAAA"}
|
package/dist/index.d.cts
CHANGED
|
@@ -7,7 +7,7 @@ import {CreateDataAttributeProps} from '@sanity/visual-editing/create-data-attri
|
|
|
7
7
|
import {default as groq} from 'groq'
|
|
8
8
|
import {unstable__adapter} from '@sanity/client'
|
|
9
9
|
import {unstable__environment} from '@sanity/client'
|
|
10
|
-
import {
|
|
10
|
+
import {VisualEditingProps} from 'next-sanity/visual-editing/client-component'
|
|
11
11
|
|
|
12
12
|
export {createClient}
|
|
13
13
|
|
|
@@ -28,15 +28,7 @@ export {unstable__environment}
|
|
|
28
28
|
*/
|
|
29
29
|
export declare function VisualEditing(props: VisualEditingProps): React.ReactElement
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
* @public
|
|
33
|
-
*/
|
|
34
|
-
export declare interface VisualEditingProps extends Omit<VisualEditingOptions, 'history'> {
|
|
35
|
-
/**
|
|
36
|
-
* @deprecated The histoy adapter is already implemented
|
|
37
|
-
*/
|
|
38
|
-
history?: never
|
|
39
|
-
}
|
|
31
|
+
export {VisualEditingProps}
|
|
40
32
|
|
|
41
33
|
export * from '@portabletext/react'
|
|
42
34
|
export * from '@sanity/client'
|
package/dist/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import {CreateDataAttributeProps} from '@sanity/visual-editing/create-data-attri
|
|
|
7
7
|
import {default as groq} from 'groq'
|
|
8
8
|
import {unstable__adapter} from '@sanity/client'
|
|
9
9
|
import {unstable__environment} from '@sanity/client'
|
|
10
|
-
import {
|
|
10
|
+
import {VisualEditingProps} from 'next-sanity/visual-editing/client-component'
|
|
11
11
|
|
|
12
12
|
export {createClient}
|
|
13
13
|
|
|
@@ -28,15 +28,7 @@ export {unstable__environment}
|
|
|
28
28
|
*/
|
|
29
29
|
export declare function VisualEditing(props: VisualEditingProps): React.ReactElement
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
* @public
|
|
33
|
-
*/
|
|
34
|
-
export declare interface VisualEditingProps extends Omit<VisualEditingOptions, 'history'> {
|
|
35
|
-
/**
|
|
36
|
-
* @deprecated The histoy adapter is already implemented
|
|
37
|
-
*/
|
|
38
|
-
history?: never
|
|
39
|
-
}
|
|
31
|
+
export {VisualEditingProps}
|
|
40
32
|
|
|
41
33
|
export * from '@portabletext/react'
|
|
42
34
|
export * from '@sanity/client'
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createClient as t,unstable__adapter as r,unstable__environment as i}from"@sanity/client";import{
|
|
1
|
+
import{createClient as t,unstable__adapter as r,unstable__environment as i}from"@sanity/client";import{jsx as o}from"react/jsx-runtime";import{lazy as e,Suspense as a}from"react";export*from"@portabletext/react";import{default as n}from"groq";import{createDataAttribute as m}from"@sanity/visual-editing/create-data-attribute";const c=e((()=>import("next-sanity/visual-editing/client-component")));function l(t){return o(a,{fallback:null,children:o(c,{...t})})}export{l as VisualEditing,t as createClient,m as createDataAttribute,n as groq,r as unstable__adapter,i as unstable__environment};//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/visual-editing/index.tsx"],"sourcesContent":["import type {VisualEditingProps} from 'next-sanity/visual-editing/client-component'\nimport {lazy, Suspense} from 'react'\n\nconst VisualEditingComponent = lazy(() => import('next-sanity/visual-editing/client-component'))\n\n/**\n * @public\n */\nexport function VisualEditing(props: VisualEditingProps): React.ReactElement {\n return (\n <Suspense fallback={null}>\n <VisualEditingComponent {...props} />\n </Suspense>\n )\n}\n\nexport {\n type CreateDataAttribute,\n createDataAttribute,\n type CreateDataAttributeProps,\n} from '@sanity/visual-editing/create-data-attribute'\nexport type {VisualEditingProps} from 'next-sanity/visual-editing/client-component'\n"],"names":["VisualEditingComponent","lazy","import","VisualEditing","props","jsx","Suspense","fallback","children"],"mappings":"sUAGA,MAAMA,EAAyBC,GAAK,IAAMC,OAAO,iDAK1C,SAASC,EAAcC,GAE1B,OAACC,EAAAC,GAASC,SAAU,KAClBC,SAACH,EAAAL,EAAwB,IAAGI,KAGlC"}
|
package/dist/preview.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@sanity/preview-kit");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("@sanity/preview-kit/live-query");var t=r(e);Object.defineProperty(exports,"LiveQueryProvider",{enumerable:!0,get:function(){return e.LiveQueryProvider}}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(exports,"useLiveQuery",{enumerable:!0,get:function(){return e.useLiveQuery}});//# sourceMappingURL=preview.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preview.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/dist/preview.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{LiveQueryProvider as e,default as i,useLiveQuery as t}from"@sanity/preview-kit";import"@sanity/preview-kit/live-query";export{e as LiveQueryProvider,i as default,t as useLiveQuery};//# sourceMappingURL=preview.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preview.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),r=require("sanity"),n=require("../_chunks-cjs/NextStudioNoScript.cjs"),s=require("history"),o=require("next/navigation.js"),i=require("styled-components");function u({children:r,isMounted:n}){const[s]=t.useState((()=>new i.ServerStyleSheet));return o.useServerInsertedHTML((()=>{const t=s.getStyleElement();return s.instance.clearTag(),e.jsx(e.Fragment,{children:t})})),n?e.jsx(e.Fragment,{children:r}):e.jsx(i.StyleSheetManager,{sheet:s.instance,children:r})}const a=()=>()=>{},c=t.memo((({children:o,config:i,unstable__noScript:c=!0,scheme:l,history:h,...g})=>{const d=t.useSyncExternalStore(a,(()=>!0),(()=>!1)),y=t.useMemo((()=>{if(g.unstable_history&&h)throw new Error("Cannot use both `unstable_history` and `history` props at the same time");return d&&"hash"===h?function(){const e=s.createHashHistory();return{get action(){return e.action},get location(){return e.location},get createHref(){return e.createHref},get push(){return e.push},get replace(){return e.replace},get go(){return e.go},get back(){return e.back},get forward(){return e.forward},get block(){return e.block},listen:t=>e.listen((({location:e})=>{t(e)}))}}():g.unstable_history}),[h,d,g.unstable_history]);return e.jsxs(e.Fragment,{children:[c&&e.jsx(n.a,{}),e.jsx(u,{isMounted:d,children:e.jsx(n.N,{children:"hash"!==h||d?o||e.jsx(r.Studio,{config:i,scheme:l,unstable_globalStyles:!0,...g,unstable_history:y}):null})})]})}));exports.NextStudio=c;//# sourceMappingURL=client-component.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client-component.cjs","sources":["../../src/studio/client-component/createHashHistoryForStudio.ts","../../src/studio/client-component/registry.tsx","../../src/studio/client-component/useIsMounted.ts","../../src/studio/client-component/NextStudio.tsx"],"sourcesContent":["import {createHashHistory, type History, type Listener} from 'history'\n\n/** @internal */\nexport function createHashHistoryForStudio(): History {\n const history = createHashHistory()\n return {\n get action() {\n return history.action\n },\n get location() {\n return history.location\n },\n get createHref() {\n return history.createHref\n },\n get push() {\n return history.push\n },\n get replace() {\n return history.replace\n },\n get go() {\n return history.go\n },\n get back() {\n return history.back\n },\n get forward() {\n return history.forward\n },\n get block() {\n return history.block\n },\n // Overriding listen to workaround a problem where native history provides history.listen(location => void), but the npm package is history.listen(({action, location}) => void)\n listen(listener: Listener) {\n // return history.listen(({ action, location }) => {\n return history.listen(({location}) => {\n // console.debug('history.listen', action, location)\n // @ts-expect-error -- working around a bug? in studio\n listener(location)\n })\n },\n }\n}\n","// https://nextjs.org/docs/app/building-your-application/styling/css-in-js#styled-components\nimport {useServerInsertedHTML} from 'next/navigation.js'\nimport {useState} from 'react'\nimport {ServerStyleSheet, StyleSheetManager} from 'styled-components'\n\nexport function StyledComponentsRegistry({\n children,\n isMounted,\n}: {\n children: React.ReactNode\n isMounted: boolean\n}): JSX.Element {\n // Only create stylesheet once with lazy initial state\n // x-ref: https://reactjs.org/docs/hooks-reference.html#lazy-initial-state\n const [styledComponentsStyleSheet] = useState(() => new ServerStyleSheet())\n\n useServerInsertedHTML(() => {\n const styles = styledComponentsStyleSheet.getStyleElement()\n styledComponentsStyleSheet.instance.clearTag()\n return <>{styles}</>\n })\n\n if (isMounted) return <>{children}</>\n\n return (\n <StyleSheetManager sheet={styledComponentsStyleSheet.instance}>{children}</StyleSheetManager>\n )\n}\n","import {useSyncExternalStore} from 'react'\n\n/** @internal */\nexport function useIsMounted(): boolean {\n return useSyncExternalStore(\n emptySubscribe,\n () => true,\n () => false,\n )\n}\n// eslint-disable-next-line no-empty-function\nconst emptySubscribe = () => () => {}\n","import {memo, useMemo} from 'react'\nimport {Studio, type StudioProps} from 'sanity'\n\nimport {NextStudioLayout} from '../NextStudioLayout'\nimport {NextStudioNoScript} from '../NextStudioNoScript'\nimport {createHashHistoryForStudio} from './createHashHistoryForStudio'\nimport {StyledComponentsRegistry} from './registry'\nimport {useIsMounted} from './useIsMounted'\n\n/** @public */\nexport interface NextStudioProps extends StudioProps {\n children?: React.ReactNode\n /**\n * Render the <noscript> tag\n * @defaultValue true\n * @alpha\n */\n unstable__noScript?: boolean\n /**\n * The 'hash' option is new feature that is not yet stable for production, but is available for testing and its API won't change in a breaking way.\n * If 'hash' doesn't work for you, or if you want to use a memory based history, you can use the `unstable_history` prop instead.\n * @alpha\n * @defaultValue 'browser'\n */\n history?: 'browser' | 'hash'\n}\n/**\n * Intended to render at the root of a page, letting the Studio own that page and render much like it would if you used `npx sanity start` to render\n * It's a drop-in replacement for `import {Studio} from 'sanity'`\n */\nconst NextStudioComponent = ({\n children,\n config,\n unstable__noScript = true,\n scheme,\n history,\n ...props\n}: NextStudioProps) => {\n const isMounted = useIsMounted()\n const unstableHistory = useMemo<typeof props.unstable_history>(() => {\n if (props.unstable_history && history) {\n throw new Error('Cannot use both `unstable_history` and `history` props at the same time')\n }\n\n if (isMounted && history === 'hash') {\n return createHashHistoryForStudio()\n }\n return props.unstable_history\n }, [history, isMounted, props.unstable_history])\n\n return (\n <>\n {unstable__noScript && <NextStudioNoScript />}\n <StyledComponentsRegistry isMounted={isMounted}>\n <NextStudioLayout>\n {history === 'hash' && !isMounted\n ? null\n : children || (\n <Studio\n config={config}\n scheme={scheme}\n unstable_globalStyles\n {...props}\n unstable_history={unstableHistory}\n />\n )}\n </NextStudioLayout>\n </StyledComponentsRegistry>\n </>\n )\n}\n\n/**\n * Override how the Studio renders by passing children.\n * This is useful for advanced use cases where you're using StudioProvider and StudioLayout instead of Studio:\n * ```\n * import {StudioProvider, StudioLayout} from 'sanity'\n * import {NextStudio} from 'next-sanity/studio'\n * <NextStudio config={config}>\n * <StudioProvider config={config}>\n * <CustomComponentThatUsesContextFromStudioProvider />\n * <StudioLayout />\n * </StudioProvider>\n * </NextStudio>\n * ```\n * @public\n */\nexport const NextStudio = memo(NextStudioComponent)\n"],"names":["Object","defineProperty","exports","value","jsxRuntime","require","react","sanity","NextStudioNoScript","history","navigation_js","styledComponents","StyledComponentsRegistry","children","isMounted","styledComponentsStyleSheet","useState","ServerStyleSheet","useServerInsertedHTML","styles","getStyleElement","instance","clearTag","jsx","Fragment","StyleSheetManager","sheet","emptySubscribe","NextStudio","memo","config","unstable__noScript","scheme","props","useSyncExternalStore","unstableHistory","useMemo","unstable_history","Error","createHashHistory","action","location","createHref","push","replace","go","back","forward","block","listen","listener","createHashHistoryForStudio","jsxs","a","NextStudioLayout","N","Studio","unstable_globalStyles"],"mappings":"0BAGOA,OAAAC,eAAAC,QAAA,aAAA,CAAAC,OAAA,IAAA,IAAAC,EAAAC,QAAA,qBAAAC,EAAAD,QAAA,SAAAE,EAAAF,QAAA,UAAAG,EAAAH,QAAA,yCAAAI,EAAAJ,QAAA,WAAAK,EAAAL,QAAA,sBAAAM,EAAAN,QAAA,qBCEA,SAASO,GAAyBC,SACvCA,EAAAC,UACAA,IAOM,MAACC,GAA8BC,EAAAA,UAAS,IAAM,IAAIC,EAAAA,mBAExDC,OAAAA,yBAAsB,KACd,MAAAC,EAASJ,EAA2BK,kBAC1C,OAAAL,EAA2BM,SAASC,WAC7BC,EAAAA,IAAAC,EAAAA,SAAA,CAAGX,SAAOM,GAAA,IAGfL,EAAqBS,EAAAA,IAAAC,EAAAA,SAAA,CAAAX,aAGvBT,EAAAmB,IAACE,EAAkBA,kBAAA,CAAAC,MAAOX,EAA2BM,SAAWR,YAEpE,CChBA,MAAMc,EAAiB,IAAM,OC4EhBC,EAAaC,QAzDE,EAC1BhB,WACAiB,SACAC,sBAAqB,EACrBC,SACAvB,QAAAA,KACGwB,MAEH,MAAMnB,EDlCCoB,EAAAA,qBACLP,GACA,KAAM,IACN,KAAM,ICgCFQ,EAAkBC,WAAuC,KAC7D,GAAIH,EAAMI,kBAAoB5B,EACtB,MAAA,IAAI6B,MAAM,2EAGlB,OAAIxB,GAAyB,SAAZL,EHzCd,WACCA,MAAAA,EAAU8B,EAAAA,oBACT,MAAA,CACL,UAAIC,GACF,OAAO/B,EAAQ+B,MACjB,EACA,YAAIC,GACF,OAAOhC,EAAQgC,QACjB,EACA,cAAIC,GACF,OAAOjC,EAAQiC,UACjB,EACA,QAAIC,GACF,OAAOlC,EAAQkC,IACjB,EACA,WAAIC,GACF,OAAOnC,EAAQmC,OACjB,EACA,MAAIC,GACF,OAAOpC,EAAQoC,EACjB,EACA,QAAIC,GACF,OAAOrC,EAAQqC,IACjB,EACA,WAAIC,GACF,OAAOtC,EAAQsC,OACjB,EACA,SAAIC,GACF,OAAOvC,EAAQuC,KACjB,EAEAC,OAAOC,GAEEzC,EAAQwC,QAAO,EAAER,eAGtBS,EAAST,EAAQ,IAIzB,CGEaU,GAEFlB,EAAMI,gBAAA,GACZ,CAAC5B,EAASK,EAAWmB,EAAMI,mBAE9B,OAEKjC,EAAAgD,KAAA5B,WAAA,CAAAX,SAAA,CAAAkB,SAAuBvB,EAAmB6C,EAAA,MAC3C9B,IAACX,EAAyB,CAAAE,YACxBD,WAACU,IAAA+B,EAAAC,EAAA,CACE1C,SAAY,YAAWC,EAEpBD,GACET,EAAAmB,IAACiC,EAAAA,OAAA,CACC1B,SACAE,SACAyB,uBAAqB,KACjBxB,EACJI,iBAAkBF,IAPtB,WAYV,IAmB8CjC,QAAA0B,WAAAA"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
|
|
3
|
+
import {JSX as JSX_2} from 'react'
|
|
4
|
+
import {MemoExoticComponent} from 'react'
|
|
5
|
+
import {StudioProps} from 'sanity'
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Override how the Studio renders by passing children.
|
|
9
|
+
* This is useful for advanced use cases where you're using StudioProvider and StudioLayout instead of Studio:
|
|
10
|
+
* ```
|
|
11
|
+
* import {StudioProvider, StudioLayout} from 'sanity'
|
|
12
|
+
* import {NextStudio} from 'next-sanity/studio'
|
|
13
|
+
* <NextStudio config={config}>
|
|
14
|
+
* <StudioProvider config={config}>
|
|
15
|
+
* <CustomComponentThatUsesContextFromStudioProvider />
|
|
16
|
+
* <StudioLayout />
|
|
17
|
+
* </StudioProvider>
|
|
18
|
+
* </NextStudio>
|
|
19
|
+
* ```
|
|
20
|
+
* @public
|
|
21
|
+
*/
|
|
22
|
+
export declare const NextStudio: MemoExoticComponent<
|
|
23
|
+
({
|
|
24
|
+
children,
|
|
25
|
+
config,
|
|
26
|
+
unstable__noScript,
|
|
27
|
+
scheme,
|
|
28
|
+
history,
|
|
29
|
+
...props
|
|
30
|
+
}: NextStudioProps) => JSX_2.Element
|
|
31
|
+
>
|
|
32
|
+
|
|
33
|
+
/** @public */
|
|
34
|
+
export declare interface NextStudioProps extends StudioProps {
|
|
35
|
+
children?: React.ReactNode
|
|
36
|
+
/**
|
|
37
|
+
* Render the <noscript> tag
|
|
38
|
+
* @defaultValue true
|
|
39
|
+
* @alpha
|
|
40
|
+
*/
|
|
41
|
+
unstable__noScript?: boolean
|
|
42
|
+
/**
|
|
43
|
+
* The 'hash' option is new feature that is not yet stable for production, but is available for testing and its API won't change in a breaking way.
|
|
44
|
+
* If 'hash' doesn't work for you, or if you want to use a memory based history, you can use the `unstable_history` prop instead.
|
|
45
|
+
* @alpha
|
|
46
|
+
* @defaultValue 'browser'
|
|
47
|
+
*/
|
|
48
|
+
history?: 'browser' | 'hash'
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export {}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
|
|
3
|
+
import {JSX as JSX_2} from 'react'
|
|
4
|
+
import {MemoExoticComponent} from 'react'
|
|
5
|
+
import {StudioProps} from 'sanity'
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Override how the Studio renders by passing children.
|
|
9
|
+
* This is useful for advanced use cases where you're using StudioProvider and StudioLayout instead of Studio:
|
|
10
|
+
* ```
|
|
11
|
+
* import {StudioProvider, StudioLayout} from 'sanity'
|
|
12
|
+
* import {NextStudio} from 'next-sanity/studio'
|
|
13
|
+
* <NextStudio config={config}>
|
|
14
|
+
* <StudioProvider config={config}>
|
|
15
|
+
* <CustomComponentThatUsesContextFromStudioProvider />
|
|
16
|
+
* <StudioLayout />
|
|
17
|
+
* </StudioProvider>
|
|
18
|
+
* </NextStudio>
|
|
19
|
+
* ```
|
|
20
|
+
* @public
|
|
21
|
+
*/
|
|
22
|
+
export declare const NextStudio: MemoExoticComponent<
|
|
23
|
+
({
|
|
24
|
+
children,
|
|
25
|
+
config,
|
|
26
|
+
unstable__noScript,
|
|
27
|
+
scheme,
|
|
28
|
+
history,
|
|
29
|
+
...props
|
|
30
|
+
}: NextStudioProps) => JSX_2.Element
|
|
31
|
+
>
|
|
32
|
+
|
|
33
|
+
/** @public */
|
|
34
|
+
export declare interface NextStudioProps extends StudioProps {
|
|
35
|
+
children?: React.ReactNode
|
|
36
|
+
/**
|
|
37
|
+
* Render the <noscript> tag
|
|
38
|
+
* @defaultValue true
|
|
39
|
+
* @alpha
|
|
40
|
+
*/
|
|
41
|
+
unstable__noScript?: boolean
|
|
42
|
+
/**
|
|
43
|
+
* The 'hash' option is new feature that is not yet stable for production, but is available for testing and its API won't change in a breaking way.
|
|
44
|
+
* If 'hash' doesn't work for you, or if you want to use a memory based history, you can use the `unstable_history` prop instead.
|
|
45
|
+
* @alpha
|
|
46
|
+
* @defaultValue 'browser'
|
|
47
|
+
*/
|
|
48
|
+
history?: 'browser' | 'hash'
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export {}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{jsx as t,Fragment as e,jsxs as r}from"react/jsx-runtime";import{useState as n,useSyncExternalStore as o,memo as i,useMemo as s}from"react";import{Studio as c}from"sanity";import{a,N as l}from"../_chunks-es/NextStudioNoScript.js";import{createHashHistory as u}from"history";import{useServerInsertedHTML as h}from"next/navigation.js";import{ServerStyleSheet as m,StyleSheetManager as g}from"styled-components";function p({children:r,isMounted:o}){const[i]=n((()=>new m));return h((()=>{const r=i.getStyleElement();return i.instance.clearTag(),t(e,{children:r})})),o?t(e,{children:r}):t(g,{sheet:i.instance,children:r})}const f=()=>()=>{},d=i((({children:n,config:i,unstable__noScript:h=!0,scheme:m,history:g,...d})=>{const b=o(f,(()=>!0),(()=>!1)),y=s((()=>{if(d.unstable_history&&g)throw new Error("Cannot use both `unstable_history` and `history` props at the same time");return b&&"hash"===g?function(){const t=u();return{get action(){return t.action},get location(){return t.location},get createHref(){return t.createHref},get push(){return t.push},get replace(){return t.replace},get go(){return t.go},get back(){return t.back},get forward(){return t.forward},get block(){return t.block},listen:e=>t.listen((({location:t})=>{e(t)}))}}():d.unstable_history}),[g,b,d.unstable_history]);return r(e,{children:[h&&t(a,{}),t(p,{isMounted:b,children:t(l,{children:"hash"!==g||b?n||t(c,{config:i,scheme:m,unstable_globalStyles:!0,...d,unstable_history:y}):null})})]})}));export{d as NextStudio};//# sourceMappingURL=client-component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client-component.js","sources":["../../src/studio/client-component/createHashHistoryForStudio.ts","../../src/studio/client-component/registry.tsx","../../src/studio/client-component/useIsMounted.ts","../../src/studio/client-component/NextStudio.tsx"],"sourcesContent":["import {createHashHistory, type History, type Listener} from 'history'\n\n/** @internal */\nexport function createHashHistoryForStudio(): History {\n const history = createHashHistory()\n return {\n get action() {\n return history.action\n },\n get location() {\n return history.location\n },\n get createHref() {\n return history.createHref\n },\n get push() {\n return history.push\n },\n get replace() {\n return history.replace\n },\n get go() {\n return history.go\n },\n get back() {\n return history.back\n },\n get forward() {\n return history.forward\n },\n get block() {\n return history.block\n },\n // Overriding listen to workaround a problem where native history provides history.listen(location => void), but the npm package is history.listen(({action, location}) => void)\n listen(listener: Listener) {\n // return history.listen(({ action, location }) => {\n return history.listen(({location}) => {\n // console.debug('history.listen', action, location)\n // @ts-expect-error -- working around a bug? in studio\n listener(location)\n })\n },\n }\n}\n","// https://nextjs.org/docs/app/building-your-application/styling/css-in-js#styled-components\nimport {useServerInsertedHTML} from 'next/navigation.js'\nimport {useState} from 'react'\nimport {ServerStyleSheet, StyleSheetManager} from 'styled-components'\n\nexport function StyledComponentsRegistry({\n children,\n isMounted,\n}: {\n children: React.ReactNode\n isMounted: boolean\n}): JSX.Element {\n // Only create stylesheet once with lazy initial state\n // x-ref: https://reactjs.org/docs/hooks-reference.html#lazy-initial-state\n const [styledComponentsStyleSheet] = useState(() => new ServerStyleSheet())\n\n useServerInsertedHTML(() => {\n const styles = styledComponentsStyleSheet.getStyleElement()\n styledComponentsStyleSheet.instance.clearTag()\n return <>{styles}</>\n })\n\n if (isMounted) return <>{children}</>\n\n return (\n <StyleSheetManager sheet={styledComponentsStyleSheet.instance}>{children}</StyleSheetManager>\n )\n}\n","import {useSyncExternalStore} from 'react'\n\n/** @internal */\nexport function useIsMounted(): boolean {\n return useSyncExternalStore(\n emptySubscribe,\n () => true,\n () => false,\n )\n}\n// eslint-disable-next-line no-empty-function\nconst emptySubscribe = () => () => {}\n","import {memo, useMemo} from 'react'\nimport {Studio, type StudioProps} from 'sanity'\n\nimport {NextStudioLayout} from '../NextStudioLayout'\nimport {NextStudioNoScript} from '../NextStudioNoScript'\nimport {createHashHistoryForStudio} from './createHashHistoryForStudio'\nimport {StyledComponentsRegistry} from './registry'\nimport {useIsMounted} from './useIsMounted'\n\n/** @public */\nexport interface NextStudioProps extends StudioProps {\n children?: React.ReactNode\n /**\n * Render the <noscript> tag\n * @defaultValue true\n * @alpha\n */\n unstable__noScript?: boolean\n /**\n * The 'hash' option is new feature that is not yet stable for production, but is available for testing and its API won't change in a breaking way.\n * If 'hash' doesn't work for you, or if you want to use a memory based history, you can use the `unstable_history` prop instead.\n * @alpha\n * @defaultValue 'browser'\n */\n history?: 'browser' | 'hash'\n}\n/**\n * Intended to render at the root of a page, letting the Studio own that page and render much like it would if you used `npx sanity start` to render\n * It's a drop-in replacement for `import {Studio} from 'sanity'`\n */\nconst NextStudioComponent = ({\n children,\n config,\n unstable__noScript = true,\n scheme,\n history,\n ...props\n}: NextStudioProps) => {\n const isMounted = useIsMounted()\n const unstableHistory = useMemo<typeof props.unstable_history>(() => {\n if (props.unstable_history && history) {\n throw new Error('Cannot use both `unstable_history` and `history` props at the same time')\n }\n\n if (isMounted && history === 'hash') {\n return createHashHistoryForStudio()\n }\n return props.unstable_history\n }, [history, isMounted, props.unstable_history])\n\n return (\n <>\n {unstable__noScript && <NextStudioNoScript />}\n <StyledComponentsRegistry isMounted={isMounted}>\n <NextStudioLayout>\n {history === 'hash' && !isMounted\n ? null\n : children || (\n <Studio\n config={config}\n scheme={scheme}\n unstable_globalStyles\n {...props}\n unstable_history={unstableHistory}\n />\n )}\n </NextStudioLayout>\n </StyledComponentsRegistry>\n </>\n )\n}\n\n/**\n * Override how the Studio renders by passing children.\n * This is useful for advanced use cases where you're using StudioProvider and StudioLayout instead of Studio:\n * ```\n * import {StudioProvider, StudioLayout} from 'sanity'\n * import {NextStudio} from 'next-sanity/studio'\n * <NextStudio config={config}>\n * <StudioProvider config={config}>\n * <CustomComponentThatUsesContextFromStudioProvider />\n * <StudioLayout />\n * </StudioProvider>\n * </NextStudio>\n * ```\n * @public\n */\nexport const NextStudio = memo(NextStudioComponent)\n"],"names":["jsx","Fragment","jsxs","useState","useSyncExternalStore","memo","useMemo","Studio","NextStudioNoScript","NextStudioLayout","createHashHistory","useServerInsertedHTML","ServerStyleSheet","StyleSheetManager","StyledComponentsRegistry","children","isMounted","styledComponentsStyleSheet","styles","getStyleElement","instance","clearTag","sheet","emptySubscribe","NextStudio","config","unstable__noScript","scheme","history","props","unstableHistory","unstable_history","Error","action","location","createHref","push","replace","go","back","forward","block","listen","listener","createHashHistoryForStudio","unstable_globalStyles"],"mappings":"2BAGOA,cAAAC,UAAAC,MAAA,uCAAAC,0BAAAC,UAAAC,aAAAC,MAAA,yBAAAC,MAAA,gBAAAC,OAAAC,MAAA,kEAAAC,MAAA,0CAAAC,MAAA,gDAAAC,uBAAAC,MAAA,oBCEA,SAASC,GAAyBC,SACvCA,EAAAC,UACAA,IAOA,MAAOC,GAA8Bd,GAAS,IAAM,IAAIS,IAQxD,OANAD,GAAsB,KACd,MAAAO,EAASD,EAA2BE,kBAC1C,OAAAF,EAA2BG,SAASC,aAC7BpB,EAAA,CAAGc,SAAOG,GAAA,IAGfF,EAAqBhB,EAAAC,EAAA,CAAAc,aAGvBf,EAACa,EAAkB,CAAAS,MAAOL,EAA2BG,SAAWL,YAEpE,CChBA,MAAMQ,EAAiB,IAAM,OC4EhBC,EAAanB,GAzDE,EAC1BU,WACAU,SACAC,sBAAqB,EACrBC,SACAC,aACGC,MAEH,MAAMb,EDlCCZ,EACLmB,GACA,KAAM,IACN,KAAM,ICgCFO,EAAkBxB,GAAuC,KAC7D,GAAIuB,EAAME,kBAAoBH,EACtB,MAAA,IAAII,MAAM,2EAGlB,OAAIhB,GAAyB,SAAZY,EHzCd,WACL,MAAMA,EAAUlB,IACT,MAAA,CACL,UAAIuB,GACF,OAAOL,EAAQK,MACjB,EACA,YAAIC,GACF,OAAON,EAAQM,QACjB,EACA,cAAIC,GACF,OAAOP,EAAQO,UACjB,EACA,QAAIC,GACF,OAAOR,EAAQQ,IACjB,EACA,WAAIC,GACF,OAAOT,EAAQS,OACjB,EACA,MAAIC,GACF,OAAOV,EAAQU,EACjB,EACA,QAAIC,GACF,OAAOX,EAAQW,IACjB,EACA,WAAIC,GACF,OAAOZ,EAAQY,OACjB,EACA,SAAIC,GACF,OAAOb,EAAQa,KACjB,EAEAC,OAAOC,GAEEf,EAAQc,QAAO,EAAER,eAGtBS,EAAST,EAAQ,IAIzB,CGEaU,GAEFf,EAAME,gBAAA,GACZ,CAACH,EAASZ,EAAWa,EAAME,mBAIzB,OAAA7B,EAAAD,EAAA,CAAAc,SAAA,CAAAW,KAAuBlB,EAAmB,IAC1CR,EAAAc,EAAyB,CAAAE,YACxBD,SAACf,EAAAS,EAAA,CACEM,SAAY,YAAWC,EAEpBD,GACEf,EAACO,EAAA,CACCkB,SACAE,SACAkB,uBAAqB,KACjBhB,EACJE,iBAAkBD,IAPtB,WAYV"}
|
package/dist/studio.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./_chunks-cjs/NextStudioNoScript.cjs"),t=require("next-sanity/studio/client-component");exports.NextStudioLayout=e.N,exports.NextStudioNoScript=e.a,Object.defineProperty(exports,"NextStudio",{enumerable:!0,get:function(){return t.NextStudio}}),exports.metadata={referrer:"same-origin",robots:"noindex"},exports.viewport={width:"device-width",initialScale:1,viewportFit:"cover"};//# sourceMappingURL=studio.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"
|
|
1
|
+
{"version":3,"file":"studio.cjs","sources":["../src/studio/head.tsx"],"sourcesContent":["import type {Metadata, Viewport} from 'next'\n\n/**\n * In router segments (`/app/studio/[[...index]]/page.tsx`):\n * ```tsx\n * // If you don't want to change any defaults you can just re-export the viewport config directly:\n * export {viewport} from 'next-sanity/studio'\n *\n * // To customize the viewport config, spread it on the export:\n * import {viewport as studioViewport} from 'next-sanity/studio'\n * import type { Viewport } from 'next'\n *\n * export const viewport: Viewport = {\n * ...studioViewport,\n * // Overrides the viewport to resize behavior\n * interactiveWidget: 'resizes-content'\n * })\n * ```\n * @public\n */\nexport const viewport = {\n width: 'device-width',\n initialScale: 1,\n // Studio implements display cutouts CSS (The iPhone Notch ™ ) and needs `viewport-fit=covered` for it to work correctly\n viewportFit: 'cover',\n} satisfies Viewport\n\n/**\n * In router segments (`/app/studio/[[...index]]/page.tsx`):\n * ```tsx\n * // If you don't want to change any defaults you can just re-export the metadata directly:\n * export {metadata} from 'next-sanity/studio'\n *\n * // To customize the metadata, spread it on the export:\n * import {metadata as studioMetadata} from 'next-sanity/studio'\n * import type { Metadata } from 'next'\n *\n * export const metadata: Metadata = {\n * ...studioMetadata,\n * // Set another title\n * title: 'My Studio',\n * })\n * ```\n * @public\n */\nexport const metadata = {\n referrer: 'same-origin' as const,\n robots: 'noindex' as const,\n} satisfies Metadata\n"],"names":["Object","defineProperty","exports","value","NextStudioNoScript","require","clientComponent","NextStudioLayout","N","a","enumerable","get","NextStudio","metadata","referrer","robots","viewport","width","initialScale","viewportFit"],"mappings":"aAoBOA,OAAAC,eAAAC,QAAA,aAAA,CAAAC,OAAA,IAAA,IAAAC,EAAAC,QAAA,wCAAAC,EAAAD,QAAA,uCA4BPH,QAAAK,iBAAAH,EAAAI,EAAAN,QAAAE,mBAAAA,EAAAK,EAAAT,OAAAC,eAAAC,QAAA,aAAA,CAAAQ,YAAA,EAAAC,IAAA,WAAA,OAAAL,EAAAM,UAAA,IAAAV,QAAAW,SAHwB,CACtBC,SAAU,cACVC,OAAQ,WACVb,QAAAc,SA5BwB,CACtBC,MAAO,eACPC,aAAc,EAEdC,YAAa"}
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
import {JSX as JSX_2} from 'react'
|
|
4
4
|
import {MemoExoticComponent} from 'react'
|
|
5
|
-
import {
|
|
5
|
+
import {NextStudio} from 'next-sanity/studio/client-component'
|
|
6
|
+
import {NextStudioProps} from 'next-sanity/studio/client-component'
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* In router segments (`/app/studio/[[...index]]/page.tsx`):
|
|
@@ -27,31 +28,7 @@ export declare const metadata: {
|
|
|
27
28
|
robots: 'noindex'
|
|
28
29
|
}
|
|
29
30
|
|
|
30
|
-
|
|
31
|
-
* Override how the Studio renders by passing children.
|
|
32
|
-
* This is useful for advanced use cases where you're using StudioProvider and StudioLayout instead of Studio:
|
|
33
|
-
* ```
|
|
34
|
-
* import {StudioProvider, StudioLayout} from 'sanity'
|
|
35
|
-
* import {NextStudio} from 'next-sanity/studio'
|
|
36
|
-
* <NextStudio config={config}>
|
|
37
|
-
* <StudioProvider config={config}>
|
|
38
|
-
* <CustomComponentThatUsesContextFromStudioProvider />
|
|
39
|
-
* <StudioLayout />
|
|
40
|
-
* </StudioProvider>
|
|
41
|
-
* </NextStudio>
|
|
42
|
-
* ```
|
|
43
|
-
* @public
|
|
44
|
-
*/
|
|
45
|
-
export declare const NextStudio: MemoExoticComponent<
|
|
46
|
-
({
|
|
47
|
-
children,
|
|
48
|
-
config,
|
|
49
|
-
unstable__noScript,
|
|
50
|
-
scheme,
|
|
51
|
-
history,
|
|
52
|
-
...props
|
|
53
|
-
}: NextStudioProps) => JSX_2.Element
|
|
54
|
-
>
|
|
31
|
+
export {NextStudio}
|
|
55
32
|
|
|
56
33
|
/** @public */
|
|
57
34
|
export declare const NextStudioLayout: MemoExoticComponent<
|
|
@@ -66,23 +43,7 @@ export declare interface NextStudioLayoutProps {
|
|
|
66
43
|
/** @internal */
|
|
67
44
|
export declare const NextStudioNoScript: () => JSX.Element
|
|
68
45
|
|
|
69
|
-
|
|
70
|
-
export declare interface NextStudioProps extends StudioProps {
|
|
71
|
-
children?: React.ReactNode
|
|
72
|
-
/**
|
|
73
|
-
* Render the <noscript> tag
|
|
74
|
-
* @defaultValue true
|
|
75
|
-
* @alpha
|
|
76
|
-
*/
|
|
77
|
-
unstable__noScript?: boolean
|
|
78
|
-
/**
|
|
79
|
-
* The 'hash' option is new feature that is not yet stable for production, but is available for testing and its API won't change in a breaking way.
|
|
80
|
-
* If 'hash' doesn't work for you, or if you want to use a memory based history, you can use the `unstable_history` prop instead.
|
|
81
|
-
* @alpha
|
|
82
|
-
* @defaultValue 'browser'
|
|
83
|
-
*/
|
|
84
|
-
history?: 'browser' | 'hash'
|
|
85
|
-
}
|
|
46
|
+
export {NextStudioProps}
|
|
86
47
|
|
|
87
48
|
/**
|
|
88
49
|
* In router segments (`/app/studio/[[...index]]/page.tsx`):
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
import {JSX as JSX_2} from 'react'
|
|
4
4
|
import {MemoExoticComponent} from 'react'
|
|
5
|
-
import {
|
|
5
|
+
import {NextStudio} from 'next-sanity/studio/client-component'
|
|
6
|
+
import {NextStudioProps} from 'next-sanity/studio/client-component'
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* In router segments (`/app/studio/[[...index]]/page.tsx`):
|
|
@@ -27,31 +28,7 @@ export declare const metadata: {
|
|
|
27
28
|
robots: 'noindex'
|
|
28
29
|
}
|
|
29
30
|
|
|
30
|
-
|
|
31
|
-
* Override how the Studio renders by passing children.
|
|
32
|
-
* This is useful for advanced use cases where you're using StudioProvider and StudioLayout instead of Studio:
|
|
33
|
-
* ```
|
|
34
|
-
* import {StudioProvider, StudioLayout} from 'sanity'
|
|
35
|
-
* import {NextStudio} from 'next-sanity/studio'
|
|
36
|
-
* <NextStudio config={config}>
|
|
37
|
-
* <StudioProvider config={config}>
|
|
38
|
-
* <CustomComponentThatUsesContextFromStudioProvider />
|
|
39
|
-
* <StudioLayout />
|
|
40
|
-
* </StudioProvider>
|
|
41
|
-
* </NextStudio>
|
|
42
|
-
* ```
|
|
43
|
-
* @public
|
|
44
|
-
*/
|
|
45
|
-
export declare const NextStudio: MemoExoticComponent<
|
|
46
|
-
({
|
|
47
|
-
children,
|
|
48
|
-
config,
|
|
49
|
-
unstable__noScript,
|
|
50
|
-
scheme,
|
|
51
|
-
history,
|
|
52
|
-
...props
|
|
53
|
-
}: NextStudioProps) => JSX_2.Element
|
|
54
|
-
>
|
|
31
|
+
export {NextStudio}
|
|
55
32
|
|
|
56
33
|
/** @public */
|
|
57
34
|
export declare const NextStudioLayout: MemoExoticComponent<
|
|
@@ -66,23 +43,7 @@ export declare interface NextStudioLayoutProps {
|
|
|
66
43
|
/** @internal */
|
|
67
44
|
export declare const NextStudioNoScript: () => JSX.Element
|
|
68
45
|
|
|
69
|
-
|
|
70
|
-
export declare interface NextStudioProps extends StudioProps {
|
|
71
|
-
children?: React.ReactNode
|
|
72
|
-
/**
|
|
73
|
-
* Render the <noscript> tag
|
|
74
|
-
* @defaultValue true
|
|
75
|
-
* @alpha
|
|
76
|
-
*/
|
|
77
|
-
unstable__noScript?: boolean
|
|
78
|
-
/**
|
|
79
|
-
* The 'hash' option is new feature that is not yet stable for production, but is available for testing and its API won't change in a breaking way.
|
|
80
|
-
* If 'hash' doesn't work for you, or if you want to use a memory based history, you can use the `unstable_history` prop instead.
|
|
81
|
-
* @alpha
|
|
82
|
-
* @defaultValue 'browser'
|
|
83
|
-
*/
|
|
84
|
-
history?: 'browser' | 'hash'
|
|
85
|
-
}
|
|
46
|
+
export {NextStudioProps}
|
|
86
47
|
|
|
87
48
|
/**
|
|
88
49
|
* In router segments (`/app/studio/[[...index]]/page.tsx`):
|
package/dist/studio.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{N as t,a as i}from"./_chunks-es/NextStudioNoScript.js";import{NextStudio as o}from"next-sanity/studio/client-component";const e={width:"device-width",initialScale:1,viewportFit:"cover"},r={referrer:"same-origin",robots:"noindex"};export{o as NextStudio,t as NextStudioLayout,i as NextStudioNoScript,r as metadata,e as viewport};//# sourceMappingURL=studio.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"studio.js","sources":["../src/studio/head.tsx"],"sourcesContent":["import type {Metadata, Viewport} from 'next'\n\n/**\n * In router segments (`/app/studio/[[...index]]/page.tsx`):\n * ```tsx\n * // If you don't want to change any defaults you can just re-export the viewport config directly:\n * export {viewport} from 'next-sanity/studio'\n *\n * // To customize the viewport config, spread it on the export:\n * import {viewport as studioViewport} from 'next-sanity/studio'\n * import type { Viewport } from 'next'\n *\n * export const viewport: Viewport = {\n * ...studioViewport,\n * // Overrides the viewport to resize behavior\n * interactiveWidget: 'resizes-content'\n * })\n * ```\n * @public\n */\nexport const viewport = {\n width: 'device-width',\n initialScale: 1,\n // Studio implements display cutouts CSS (The iPhone Notch ™ ) and needs `viewport-fit=covered` for it to work correctly\n viewportFit: 'cover',\n} satisfies Viewport\n\n/**\n * In router segments (`/app/studio/[[...index]]/page.tsx`):\n * ```tsx\n * // If you don't want to change any defaults you can just re-export the metadata directly:\n * export {metadata} from 'next-sanity/studio'\n *\n * // To customize the metadata, spread it on the export:\n * import {metadata as studioMetadata} from 'next-sanity/studio'\n * import type { Metadata } from 'next'\n *\n * export const metadata: Metadata = {\n * ...studioMetadata,\n * // Set another title\n * title: 'My Studio',\n * })\n * ```\n * @public\n */\nexport const metadata = {\n referrer: 'same-origin' as const,\n robots: 'noindex' as const,\n} satisfies Metadata\n"],"names":["N","a","NextStudio","viewport","width","initialScale","viewportFit","metadata","referrer","robots"],"mappings":"YAoBOA,OAAAC,MAAA,0DAAAC,MAAA,sCAAA,MAAMC,EAAW,CACtBC,MAAO,eACPC,aAAc,EAEdC,YAAa,SAqBFC,EAAW,CACtBC,SAAU,cACVC,OAAQ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";var e=require("@sanity/visual-editing"),r=require("next/navigation.js"),t=require("next-sanity/visual-editing/server-actions"),s=require("react");module.exports=function(u){const{refresh:i,zIndex:n}=u,o=r.useRouter(),a=s.useRef(o),[c,l]=s.useState();s.useEffect((()=>{a.current=o}),[o]),s.useEffect((()=>{const r=e.enableVisualEditing({zIndex:n,refresh:i||(e=>{switch(e.source){case"manual":return e.livePreviewEnabled?(console.debug("Live preview is setup, calling router.refresh() to refresh the server components without refetching cached data"),a.current.refresh(),Promise.resolve()):(console.debug("No loaders in live mode detected, or preview kit setup, revalidating root layout"),t.revalidateRootLayout());case"mutation":return e.livePreviewEnabled?(console.debug("Live preview is setup, mutation is skipped assuming its handled by the live preview"),!1):(console.debug("No loaders in live mode detected, or preview kit setup, revalidating root layout"),t.revalidateRootLayout());default:throw new Error("Unknown refresh source",{cause:e})}}),history:{subscribe:e=>(l((()=>e)),()=>l(void 0)),update:e=>{switch(e.type){case"push":return a.current.push(e.url);case"pop":return a.current.back();case"replace":return a.current.replace(e.url);default:throw new Error(`Unknown update type: ${e.type}`)}}}});return()=>r()}),[i,n]);const d=r.usePathname(),p=r.useSearchParams();return s.useEffect((()=>{c&&c({type:"push",url:`${d}${null!=p&&p.size?`?${p}`:""}`})}),[c,d,p]),null};//# sourceMappingURL=client-component.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client-component.cjs","sources":["../../src/visual-editing/client-component/index.ts"],"sourcesContent":["import {\n enableVisualEditing,\n type HistoryAdapterNavigate,\n type VisualEditingOptions,\n} from '@sanity/visual-editing'\nimport {usePathname, useRouter, useSearchParams} from 'next/navigation.js'\nimport {revalidateRootLayout} from 'next-sanity/visual-editing/server-actions'\nimport {useEffect, useRef, useState} from 'react'\n\n/**\n * @public\n */\nexport interface VisualEditingProps extends Omit<VisualEditingOptions, 'history'> {\n /**\n * @deprecated The histoy adapter is already implemented\n */\n history?: never\n}\n\nexport default function VisualEditing(props: VisualEditingProps): null {\n const {refresh, zIndex} = props\n\n const router = useRouter()\n const routerRef = useRef(router)\n const [navigate, setNavigate] = useState<HistoryAdapterNavigate | undefined>()\n\n useEffect(() => {\n routerRef.current = router\n }, [router])\n useEffect(() => {\n const disable = enableVisualEditing({\n zIndex,\n refresh: refresh\n ? refresh\n : (payload) => {\n switch (payload.source) {\n case 'manual':\n return payload.livePreviewEnabled ? manualFastRefresh() : manualFallbackRefresh()\n case 'mutation':\n return payload.livePreviewEnabled\n ? mutationFastRefresh()\n : mutationFallbackRefresh()\n default:\n throw new Error('Unknown refresh source', {cause: payload})\n }\n },\n history: {\n subscribe: (_navigate) => {\n setNavigate(() => _navigate)\n return () => setNavigate(undefined)\n },\n update: (update) => {\n switch (update.type) {\n case 'push':\n return routerRef.current.push(update.url)\n case 'pop':\n return routerRef.current.back()\n case 'replace':\n return routerRef.current.replace(update.url)\n default:\n throw new Error(`Unknown update type: ${update.type}`)\n }\n },\n },\n })\n\n function manualFastRefresh() {\n // eslint-disable-next-line no-console\n console.debug(\n 'Live preview is setup, calling router.refresh() to refresh the server components without refetching cached data',\n )\n routerRef.current.refresh()\n return Promise.resolve()\n }\n function manualFallbackRefresh() {\n // eslint-disable-next-line no-console\n console.debug(\n 'No loaders in live mode detected, or preview kit setup, revalidating root layout',\n )\n return revalidateRootLayout()\n }\n function mutationFastRefresh(): false {\n // eslint-disable-next-line no-console\n console.debug(\n 'Live preview is setup, mutation is skipped assuming its handled by the live preview',\n )\n return false\n }\n function mutationFallbackRefresh() {\n // eslint-disable-next-line no-console\n console.debug(\n 'No loaders in live mode detected, or preview kit setup, revalidating root layout',\n )\n return revalidateRootLayout()\n }\n\n return () => disable()\n }, [refresh, zIndex])\n\n const pathname = usePathname()\n const searchParams = useSearchParams()\n useEffect(() => {\n if (navigate) {\n navigate({\n type: 'push',\n url: `${pathname}${searchParams?.size ? `?${searchParams}` : ''}`,\n })\n }\n }, [navigate, pathname, searchParams])\n\n return null\n}\n"],"names":["module","exports","props","refresh","zIndex","router","useRouter","routerRef","useRef","navigate","setNavigate","useState","useEffect","current","disable","enableVisualEditing","payload","source","livePreviewEnabled","console","debug","Promise","resolve","revalidateRootLayout","Error","cause","history","subscribe","_navigate","update","type","push","url","back","replace","pathname","usePathname","searchParams","useSearchParams","size"],"mappings":"4KA+GAA,OAAAC,QA5FA,SAAsCC,GACpC,MAAMC,QAACA,EAASC,OAAAA,GAAUF,EAEpBG,EAASC,EAAAA,YACTC,EAAYC,EAAAA,OAAOH,IAClBI,EAAUC,GAAeC,EAAAA,WAEhCC,EAAAA,WAAU,KACRL,EAAUM,QAAUR,CAAA,GACnB,CAACA,IACJO,EAAAA,WAAU,KACF,MAAAE,EAAUC,EAAAA,oBAAoB,CAClCX,SACAD,QAASA,GAEL,CAACa,IACC,OAAQA,EAAQC,QACd,IAAK,SACH,OAAOD,EAAQE,oBA+BjBC,QAAAC,MACN,mHAEFb,EAAUM,QAAQV,UACXkB,QAAQC,YAIPH,QAAAC,MACN,oFAEKG,EAAqBA,wBAzCpB,IAAK,WACH,OAAOP,EAAQE,oBA4CjBC,QAAAC,MACN,wFAEK,IAICD,QAAAC,MACN,oFAEKG,EAAqBA,wBAnDpB,QACE,MAAM,IAAIC,MAAM,yBAA0B,CAACC,MAAOT,IACtD,GAENU,QAAS,CACPC,UAAYC,IACVlB,GAAY,IAAMkB,IACX,IAAMlB,OAAY,IAE3BmB,OAASA,IACP,OAAQA,EAAOC,MACb,IAAK,OACH,OAAOvB,EAAUM,QAAQkB,KAAKF,EAAOG,KACvC,IAAK,MACI,OAAAzB,EAAUM,QAAQoB,OAC3B,IAAK,UACH,OAAO1B,EAAUM,QAAQqB,QAAQL,EAAOG,KAC1C,QACE,MAAM,IAAIR,MAAM,wBAAwBK,EAAOC,QACnD,KAmCN,MAAO,IAAMhB,GAAQ,GACpB,CAACX,EAASC,IAEb,MAAM+B,EAAWC,EAAAA,cACXC,EAAeC,EAAgBA,kBACrC1B,OAAAA,EAAAA,WAAU,KACJH,GACFA,EAAS,CACPqB,KAAM,OACNE,IAAK,GAAGG,UAAWE,KAAcE,KAAO,IAAIF,IAAiB,MAC9D,GAEF,CAAC5B,EAAU0B,EAAUE,IAEjB,IACT"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {VisualEditingOptions} from '@sanity/visual-editing'
|
|
2
|
+
|
|
3
|
+
declare function VisualEditing(props: VisualEditingProps): null
|
|
4
|
+
export default VisualEditing
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
export declare interface VisualEditingProps extends Omit<VisualEditingOptions, 'history'> {
|
|
10
|
+
/**
|
|
11
|
+
* @deprecated The histoy adapter is already implemented
|
|
12
|
+
*/
|
|
13
|
+
history?: never
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export {}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {VisualEditingOptions} from '@sanity/visual-editing'
|
|
2
|
+
|
|
3
|
+
declare function VisualEditing(props: VisualEditingProps): null
|
|
4
|
+
export default VisualEditing
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
export declare interface VisualEditingProps extends Omit<VisualEditingOptions, 'history'> {
|
|
10
|
+
/**
|
|
11
|
+
* @deprecated The histoy adapter is already implemented
|
|
12
|
+
*/
|
|
13
|
+
history?: never
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export {}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{enableVisualEditing as e}from"@sanity/visual-editing";import{useRouter as r,usePathname as t,useSearchParams as n}from"next/navigation.js";import{revalidateRootLayout as i}from"next-sanity/visual-editing/server-actions";import{useRef as o,useState as s,useEffect as u}from"react";function a(a){const{refresh:c,zIndex:l}=a,d=r(),p=o(d),[v,h]=s();u((()=>{p.current=d}),[d]),u((()=>{const r=e({zIndex:l,refresh:c||(e=>{switch(e.source){case"manual":return e.livePreviewEnabled?(console.debug("Live preview is setup, calling router.refresh() to refresh the server components without refetching cached data"),p.current.refresh(),Promise.resolve()):(console.debug("No loaders in live mode detected, or preview kit setup, revalidating root layout"),i());case"mutation":return e.livePreviewEnabled?(console.debug("Live preview is setup, mutation is skipped assuming its handled by the live preview"),!1):(console.debug("No loaders in live mode detected, or preview kit setup, revalidating root layout"),i());default:throw new Error("Unknown refresh source",{cause:e})}}),history:{subscribe:e=>(h((()=>e)),()=>h(void 0)),update:e=>{switch(e.type){case"push":return p.current.push(e.url);case"pop":return p.current.back();case"replace":return p.current.replace(e.url);default:throw new Error(`Unknown update type: ${e.type}`)}}}});return()=>r()}),[c,l]);const m=t(),w=n();return u((()=>{v&&v({type:"push",url:`${m}${null!=w&&w.size?`?${w}`:""}`})}),[v,m,w]),null}export{a as default};//# sourceMappingURL=client-component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client-component.js","sources":["../../src/visual-editing/client-component/index.ts"],"sourcesContent":["import {\n enableVisualEditing,\n type HistoryAdapterNavigate,\n type VisualEditingOptions,\n} from '@sanity/visual-editing'\nimport {usePathname, useRouter, useSearchParams} from 'next/navigation.js'\nimport {revalidateRootLayout} from 'next-sanity/visual-editing/server-actions'\nimport {useEffect, useRef, useState} from 'react'\n\n/**\n * @public\n */\nexport interface VisualEditingProps extends Omit<VisualEditingOptions, 'history'> {\n /**\n * @deprecated The histoy adapter is already implemented\n */\n history?: never\n}\n\nexport default function VisualEditing(props: VisualEditingProps): null {\n const {refresh, zIndex} = props\n\n const router = useRouter()\n const routerRef = useRef(router)\n const [navigate, setNavigate] = useState<HistoryAdapterNavigate | undefined>()\n\n useEffect(() => {\n routerRef.current = router\n }, [router])\n useEffect(() => {\n const disable = enableVisualEditing({\n zIndex,\n refresh: refresh\n ? refresh\n : (payload) => {\n switch (payload.source) {\n case 'manual':\n return payload.livePreviewEnabled ? manualFastRefresh() : manualFallbackRefresh()\n case 'mutation':\n return payload.livePreviewEnabled\n ? mutationFastRefresh()\n : mutationFallbackRefresh()\n default:\n throw new Error('Unknown refresh source', {cause: payload})\n }\n },\n history: {\n subscribe: (_navigate) => {\n setNavigate(() => _navigate)\n return () => setNavigate(undefined)\n },\n update: (update) => {\n switch (update.type) {\n case 'push':\n return routerRef.current.push(update.url)\n case 'pop':\n return routerRef.current.back()\n case 'replace':\n return routerRef.current.replace(update.url)\n default:\n throw new Error(`Unknown update type: ${update.type}`)\n }\n },\n },\n })\n\n function manualFastRefresh() {\n // eslint-disable-next-line no-console\n console.debug(\n 'Live preview is setup, calling router.refresh() to refresh the server components without refetching cached data',\n )\n routerRef.current.refresh()\n return Promise.resolve()\n }\n function manualFallbackRefresh() {\n // eslint-disable-next-line no-console\n console.debug(\n 'No loaders in live mode detected, or preview kit setup, revalidating root layout',\n )\n return revalidateRootLayout()\n }\n function mutationFastRefresh(): false {\n // eslint-disable-next-line no-console\n console.debug(\n 'Live preview is setup, mutation is skipped assuming its handled by the live preview',\n )\n return false\n }\n function mutationFallbackRefresh() {\n // eslint-disable-next-line no-console\n console.debug(\n 'No loaders in live mode detected, or preview kit setup, revalidating root layout',\n )\n return revalidateRootLayout()\n }\n\n return () => disable()\n }, [refresh, zIndex])\n\n const pathname = usePathname()\n const searchParams = useSearchParams()\n useEffect(() => {\n if (navigate) {\n navigate({\n type: 'push',\n url: `${pathname}${searchParams?.size ? `?${searchParams}` : ''}`,\n })\n }\n }, [navigate, pathname, searchParams])\n\n return null\n}\n"],"names":["VisualEditing","props","refresh","zIndex","router","useRouter","routerRef","useRef","navigate","setNavigate","useState","useEffect","current","disable","enableVisualEditing","payload","source","livePreviewEnabled","console","debug","Promise","resolve","revalidateRootLayout","Error","cause","history","subscribe","_navigate","update","type","push","url","back","replace","pathname","usePathname","searchParams","useSearchParams","size"],"mappings":"4SAmBA,SAAwBA,EAAcC,GACpC,MAAMC,QAACA,EAASC,OAAAA,GAAUF,EAEpBG,EAASC,IACTC,EAAYC,EAAOH,IAClBI,EAAUC,GAAeC,IAEhCC,GAAU,KACRL,EAAUM,QAAUR,CAAA,GACnB,CAACA,IACJO,GAAU,KACR,MAAME,EAAUC,EAAoB,CAClCX,SACAD,QAASA,GAEL,CAACa,IACC,OAAQA,EAAQC,QACd,IAAK,SACH,OAAOD,EAAQE,oBA+BjBC,QAAAC,MACN,mHAEFb,EAAUM,QAAQV,UACXkB,QAAQC,YAIPH,QAAAC,MACN,oFAEKG,KAzCC,IAAK,WACH,OAAOP,EAAQE,oBA4CjBC,QAAAC,MACN,wFAEK,IAICD,QAAAC,MACN,oFAEKG,KAnDC,QACE,MAAM,IAAIC,MAAM,yBAA0B,CAACC,MAAOT,IACtD,GAENU,QAAS,CACPC,UAAYC,IACVlB,GAAY,IAAMkB,IACX,IAAMlB,OAAY,IAE3BmB,OAASA,IACP,OAAQA,EAAOC,MACb,IAAK,OACH,OAAOvB,EAAUM,QAAQkB,KAAKF,EAAOG,KACvC,IAAK,MACI,OAAAzB,EAAUM,QAAQoB,OAC3B,IAAK,UACH,OAAO1B,EAAUM,QAAQqB,QAAQL,EAAOG,KAC1C,QACE,MAAM,IAAIR,MAAM,wBAAwBK,EAAOC,QACnD,KAmCN,MAAO,IAAMhB,GAAQ,GACpB,CAACX,EAASC,IAEb,MAAM+B,EAAWC,IACXC,EAAeC,IACrB,OAAA1B,GAAU,KACJH,GACFA,EAAS,CACPqB,KAAM,OACNE,IAAK,GAAGG,UAAWE,KAAcE,KAAO,IAAIF,IAAiB,MAC9D,GAEF,CAAC5B,EAAU0B,EAAUE,IAEjB,IACT"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use server";"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("next/cache.js"),a=require("next/headers.js");exports.revalidateRootLayout=async function(){a.draftMode().isEnabled?await e.revalidatePath("/","layout"):console.warn("Skipped revalidatePath request because draft mode is not enabled")};//# sourceMappingURL=actions.cjs.map
|
|
1
|
+
"use server";"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("next/cache.js"),a=require("next/headers.js");exports.revalidateRootLayout=async function(){a.draftMode().isEnabled?await e.revalidatePath("/","layout"):console.warn("Skipped revalidatePath request because draft mode is not enabled")};//# sourceMappingURL=server-actions.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server-actions.cjs","sources":["../../src/visual-editing/server-actions/index.ts"],"sourcesContent":["import {revalidatePath} from 'next/cache.js'\nimport {draftMode} from 'next/headers.js'\n\nexport async function revalidateRootLayout(): Promise<void> {\n if (!draftMode().isEnabled) {\n // eslint-disable-next-line no-console\n console.warn('Skipped revalidatePath request because draft mode is not enabled')\n return\n }\n await revalidatePath('/', 'layout')\n}\n"],"names":["Object","defineProperty","exports","value","cache_js","require","headers_js","revalidateRootLayout","async","draftMode","isEnabled","revalidatePath","console","warn"],"mappings":"0BAGAA,OAAAC,eAAAC,QAAA,aAAA,CAAAC,OAAA,IAAA,IAAAC,EAAAC,QAAA,iBAAAC,EAAAD,QAAA,mBAOAH,QAAAK,qBAPAC,iBACOC,EAAAA,YAAYC,gBAKXC,EAAAA,eAAe,IAAK,UAHxBC,QAAQC,KAAK,mEAIjB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use server";import{revalidatePath as e}from"next/cache.js";import{draftMode as a}from"next/headers.js";async function t(){a().isEnabled?await e("/","layout"):console.warn("Skipped revalidatePath request because draft mode is not enabled")}export{t as revalidateRootLayout};//# sourceMappingURL=actions.js.map
|
|
1
|
+
"use server";import{revalidatePath as e}from"next/cache.js";import{draftMode as a}from"next/headers.js";async function t(){a().isEnabled?await e("/","layout"):console.warn("Skipped revalidatePath request because draft mode is not enabled")}export{t as revalidateRootLayout};//# sourceMappingURL=server-actions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server-actions.js","sources":["../../src/visual-editing/server-actions/index.ts"],"sourcesContent":["import {revalidatePath} from 'next/cache.js'\nimport {draftMode} from 'next/headers.js'\n\nexport async function revalidateRootLayout(): Promise<void> {\n if (!draftMode().isEnabled) {\n // eslint-disable-next-line no-console\n console.warn('Skipped revalidatePath request because draft mode is not enabled')\n return\n }\n await revalidatePath('/', 'layout')\n}\n"],"names":["revalidatePath","draftMode","async","revalidateRootLayout","isEnabled","console","warn"],"mappings":"sCAGAA,MAAA,oCAAAC,MAAA,kBAAAC,eAAsBC,IACfF,IAAYG,gBAKXJ,EAAe,IAAK,UAHxBK,QAAQC,KAAK,mEAIjB"}
|