next-sanity 8.1.2 → 8.1.3

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.
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=require("react/jsx-runtime");const e={__html:"\n.sanity-app-no-js__root {\n position: absolute;\n top: 0;\n right: 0;\n left: 0;\n bottom: 0;\n background: #fff;\n z-index: 1;\n}\n\n.sanity-app-no-js__content {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n text-align: center;\n font-family: helvetica, arial, sans-serif;\n}\n"};exports.NextStudioNoScript=()=>n.jsx("noscript",{children:n.jsx("div",{className:"sanity-app-no-js__root",children:n.jsxs("div",{className:"sanity-app-no-js__content",children:[n.jsx("style",{type:"text/css",dangerouslySetInnerHTML:e}),n.jsx("h1",{children:"JavaScript disabled"}),n.jsxs("p",{children:["Please ",n.jsx("a",{href:"https://www.enable-javascript.com/",children:"enable JavaScript"})," in your browser and reload the page to proceed."]})]})})});//# sourceMappingURL=NextStudioNoScript.cjs.map
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime");exports.NextStudioNoScript=()=>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
@@ -1 +1 @@
1
- {"version":3,"file":"NextStudioNoScript.cjs","sources":["../../src/studio/NextStudioNoScript.tsx"],"sourcesContent":["/* eslint-disable react/no-danger */\n\nconst style = {\n __html: `\n.sanity-app-no-js__root {\n position: absolute;\n top: 0;\n right: 0;\n left: 0;\n bottom: 0;\n background: #fff;\n z-index: 1;\n}\n\n.sanity-app-no-js__content {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n text-align: center;\n font-family: helvetica, arial, sans-serif;\n}\n`,\n} as const\n\n/** @internal */\nexport const NextStudioNoScript = (): JSX.Element => (\n <noscript>\n <div className=\"sanity-app-no-js__root\">\n <div className=\"sanity-app-no-js__content\">\n <style type=\"text/css\" dangerouslySetInnerHTML={style} />\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":["Object","defineProperty","exports","value","jsxRuntime","require","style","__html","NextStudioNoScript","jsx","children","className","type","dangerouslySetInnerHTML","href"],"mappings":"aAEAA,OAAAC,eAAAC,QAAA,aAAA,CAAAC,OAAA,IAAA,IAAAC,EAAAC,QAAA,qBAAA,MAAMC,EAAQ,CACZC,OAAQ,gVAmCRL,QAAAM,mBAZgC,IAChCC,EAAAA,IAAC,WACC,CAAAC,WAAAD,IAAC,MAAI,CAAAE,UAAU,yBACbD,gBAAC,MAAI,CAAAC,UAAU,4BACbD,SAAA,CAAAD,EAAAA,IAAC,QAAM,CAAAG,KAAK,WAAWC,wBAAyBP,MAChDG,IAAC,MAAGC,SAAmB,+BACtB,IAAE,CAAAA,SAAA,CAAA,UACOD,EAAAA,IAAA,IAAA,CAAEK,KAAK,qCAAqCJ,SAAiB,sBAAI"}
1
+ {"version":3,"file":"NextStudioNoScript.cjs","sources":["../../src/studio/NextStudioNoScript.tsx"],"sourcesContent":["/** @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":["exports","NextStudioNoScript","jsx","children","jsxRuntime","style","position","top","right","left","bottom","background","zIndex","jsxs","transform","textAlign","fontFamily","href"],"mappings":"uGA+BEA,QAAAC,mBA9BgC,IAChCC,EAAAA,IAAC,WACC,CAAAC,SAAAC,EAAAF,IAAC,MAAA,CACCG,MAAO,CACLC,SAAU,WACVC,IAAK,EACLC,MAAO,EACPC,KAAM,EACNC,OAAQ,EACRC,WAAY,OACZC,OAAQ,GAGVT,SAAAC,EAAAS,KAAC,MAAA,CACCR,MAAO,CACLC,SAAU,WACVC,IAAK,MACLE,KAAM,MACNK,UAAW,wBACXC,UAAW,SACXC,WAAY,gCAGdb,SAAA,GAAAD,IAAC,MAAGC,SAAmB,+BACtB,IAAE,CAAAA,SAAA,CAAA,UACOD,EAAAA,IAAA,IAAA,CAAEe,KAAK,qCAAqCd,SAAiB,sBAAI"}
@@ -1 +1 @@
1
- import{jsx as n,jsxs as t}from"react/jsx-runtime";const e={__html:"\n.sanity-app-no-js__root {\n position: absolute;\n top: 0;\n right: 0;\n left: 0;\n bottom: 0;\n background: #fff;\n z-index: 1;\n}\n\n.sanity-app-no-js__content {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n text-align: center;\n font-family: helvetica, arial, sans-serif;\n}\n"},a=()=>n("noscript",{children:n("div",{className:"sanity-app-no-js__root",children:t("div",{className:"sanity-app-no-js__content",children:[n("style",{type:"text/css",dangerouslySetInnerHTML:e}),n("h1",{children:"JavaScript disabled"}),t("p",{children:["Please ",n("a",{href:"https://www.enable-javascript.com/",children:"enable JavaScript"})," in your browser and reload the page to proceed."]})]})})});export{a as NextStudioNoScript};//# sourceMappingURL=NextStudioNoScript.js.map
1
+ import{jsx as e,jsxs as t}from"react/jsx-runtime";const r=()=>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{r as NextStudioNoScript};//# sourceMappingURL=NextStudioNoScript.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"NextStudioNoScript.js","sources":["../../src/studio/NextStudioNoScript.tsx"],"sourcesContent":["/* eslint-disable react/no-danger */\n\nconst style = {\n __html: `\n.sanity-app-no-js__root {\n position: absolute;\n top: 0;\n right: 0;\n left: 0;\n bottom: 0;\n background: #fff;\n z-index: 1;\n}\n\n.sanity-app-no-js__content {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n text-align: center;\n font-family: helvetica, arial, sans-serif;\n}\n`,\n} as const\n\n/** @internal */\nexport const NextStudioNoScript = (): JSX.Element => (\n <noscript>\n <div className=\"sanity-app-no-js__root\">\n <div className=\"sanity-app-no-js__content\">\n <style type=\"text/css\" dangerouslySetInnerHTML={style} />\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","style","__html","NextStudioNoScript","children","className","type","dangerouslySetInnerHTML","href"],"mappings":"cAEAA,UAAAC,MAAA,oBAAA,MAAMC,EAAQ,CACZC,OAAQ,gVAuBGC,EAAqB,IAChCJ,EAAC,WACC,CAAAK,SAACL,EAAA,MAAI,CAAAM,UAAU,yBACbD,SAAAJ,EAAC,MAAI,CAAAK,UAAU,4BACbD,SAAA,GAAC,QAAM,CAAAE,KAAK,WAAWC,wBAAyBN,IAC/CF,EAAA,MAAGK,SAAmB,0BACtB,IAAE,CAAAA,SAAA,CAAA,YACO,IAAA,CAAEI,KAAK,qCAAqCJ,SAAiB,sBAAI"}
1
+ {"version":3,"file":"NextStudioNoScript.js","sources":["../../src/studio/NextStudioNoScript.tsx"],"sourcesContent":["/** @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":["NextStudioNoScript","jsx","children","style","position","top","right","left","bottom","background","zIndex","jsxs","transform","textAlign","fontFamily","href"],"mappings":"kDACa,MAAAA,EAAqB,IAC/BC,EAAA,WACC,CAAAC,SAAAD,EAAC,MAAA,CACCE,MAAO,CACLC,SAAU,WACVC,IAAK,EACLC,MAAO,EACPC,KAAM,EACNC,OAAQ,EACRC,WAAY,OACZC,OAAQ,GAGVR,SAAAS,EAAC,MAAA,CACCR,MAAO,CACLC,SAAU,WACVC,IAAK,MACLE,KAAM,MACNK,UAAW,wBACXC,UAAW,SACXC,WAAY,gCAGdZ,SAAA,CAACD,EAAA,MAAGC,SAAmB,0BACtB,IAAE,CAAAA,SAAA,CAAA,YACO,IAAA,CAAEa,KAAK,qCAAqCb,SAAiB,sBAAI"}
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("next/navigation.js"),r=require("react"),n=require("styled-components");exports.StyledComponentsRegistry=function({children:s}){const[i]=r.useState((()=>new n.ServerStyleSheet));return t.useServerInsertedHTML((()=>{const t=i.getStyleElement();return i.instance.clearTag(),e.jsx(e.Fragment,{children:t})})),typeof window<"u"?e.jsx(e.Fragment,{children:s}):e.jsx(n.StyleSheetManager,{sheet:i.instance,children:s})};//# sourceMappingURL=registry.cjs.map
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("next/navigation.js"),r=require("react"),n=require("styled-components");const s=()=>()=>{};exports.StyledComponentsRegistry=function({children:c}){const[i]=r.useState((()=>new n.ServerStyleSheet));return t.useServerInsertedHTML((()=>{const t=i.getStyleElement();return i.instance.clearTag(),e.jsx(e.Fragment,{children:t})})),r.useSyncExternalStore(s,(()=>!0),(()=>!1))?e.jsx(e.Fragment,{children:c}):e.jsx(n.StyleSheetManager,{sheet:i.instance,children:c})};//# sourceMappingURL=registry.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"registry.cjs","sources":["../../src/studio/registry.tsx"],"sourcesContent":["// 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({children}: {children: React.ReactNode}): 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 (typeof window !== 'undefined') return <>{children}</>\n\n return (\n <StyleSheetManager sheet={styledComponentsStyleSheet.instance}>{children}</StyleSheetManager>\n )\n}\n"],"names":["Object","defineProperty","exports","value","jsxRuntime","require","navigation_js","react","styledComponents","StyledComponentsRegistry","children","styledComponentsStyleSheet","useState","ServerStyleSheet","useServerInsertedHTML","styles","getStyleElement","instance","clearTag","jsx","Fragment","window","StyleSheetManager","sheet"],"mappings":"aAKgBA,OAAAC,eAAAC,QAAA,aAAA,CAAAC,OAAA,IAAA,IAAAC,EAAAC,QAAA,qBAAAC,EAAAD,QAAA,sBAAAE,EAAAF,QAAA,SAAAG,EAAAH,QAAA,qBAgBhBH,QAAAO,yBAhBgB,UAAyBC,SAACA,IAGlC,MAACC,GAA8BC,EAAAA,UAAS,IAAM,IAAIC,EAAAA,mBAExDC,OAAAA,yBAAsB,KACd,MAAAC,EAASJ,EAA2BK,kBAC1C,OAAAL,EAA2BM,SAASC,WAC7BC,EAAAA,IAAAC,EAAAA,SAAA,CAAGV,SAAOK,GAAA,WAGRM,OAAW,IAAoBF,EAAAA,IAAAC,EAAAA,SAAA,CAAGV,aAG1CS,EAAAA,IAAAG,EAAAA,kBAAA,CAAkBC,MAAOZ,EAA2BM,SAAWP,YAEpE"}
1
+ {"version":3,"file":"registry.cjs","sources":["../../src/studio/registry.tsx"],"sourcesContent":["// https://nextjs.org/docs/app/building-your-application/styling/css-in-js#styled-components\nimport {useServerInsertedHTML} from 'next/navigation.js'\nimport {useState, useSyncExternalStore} from 'react'\nimport {ServerStyleSheet, StyleSheetManager} from 'styled-components'\n\nexport function StyledComponentsRegistry({children}: {children: React.ReactNode}): 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 const isMounted = useSyncExternalStore(\n subscribe,\n () => true,\n () => false,\n )\n if (isMounted) return <>{children}</>\n\n return (\n <StyleSheetManager sheet={styledComponentsStyleSheet.instance}>{children}</StyleSheetManager>\n )\n}\n// eslint-disable-next-line no-empty-function\nconst subscribe = () => () => {}\n"],"names":["Object","defineProperty","exports","value","jsxRuntime","require","navigation_js","react","styledComponents","subscribe","StyledComponentsRegistry","children","styledComponentsStyleSheet","useState","ServerStyleSheet","useServerInsertedHTML","styles","getStyleElement","instance","clearTag","jsx","Fragment","useSyncExternalStore","StyleSheetManager","sheet"],"mappings":"aAKgBA,OAAAC,eAAAC,QAAA,aAAA,CAAAC,OAAA,IAAA,IAAAC,EAAAC,QAAA,qBAAAC,EAAAD,QAAA,sBAAAE,EAAAF,QAAA,SAAAG,EAAAH,QAAA,qBAuBhB,MAAMI,EAAY,IAAM,OAAOP,QAAAQ,yBAvBf,UAAyBC,SAACA,IAGlC,MAACC,GAA8BC,EAAAA,UAAS,IAAM,IAAIC,EAAAA,mBAExDC,OAAAA,yBAAsB,KACd,MAAAC,EAASJ,EAA2BK,kBAC1C,OAAAL,EAA2BM,SAASC,WAC7BC,EAAAA,IAAAC,EAAAA,SAAA,CAAGV,SAAOK,GAAA,IAGDM,EAAAA,qBAChBb,GACA,KAAM,IACN,KAAM,sBAEiBE,mBAGtBY,oBAAkB,CAAAC,MAAOZ,EAA2BM,SAAWP,YAEpE"}
@@ -1 +1 @@
1
- import{jsx as e,Fragment as t}from"react/jsx-runtime";import{useServerInsertedHTML as n}from"next/navigation.js";import{useState as r}from"react";import{ServerStyleSheet as o,StyleSheetManager as i}from"styled-components";function c({children:c}){const[m]=r((()=>new o));return n((()=>{const n=m.getStyleElement();return m.instance.clearTag(),e(t,{children:n})})),typeof window<"u"?e(t,{children:c}):e(i,{sheet:m.instance,children:c})}export{c as StyledComponentsRegistry};//# sourceMappingURL=registry.js.map
1
+ import{jsx as t,Fragment as e}from"react/jsx-runtime";import{useServerInsertedHTML as n}from"next/navigation.js";import{useState as r,useSyncExternalStore as o}from"react";import{ServerStyleSheet as c,StyleSheetManager as i}from"styled-components";function m({children:m}){const[a]=r((()=>new c));return n((()=>{const n=a.getStyleElement();return a.instance.clearTag(),t(e,{children:n})})),o(s,(()=>!0),(()=>!1))?t(e,{children:m}):t(i,{sheet:a.instance,children:m})}const s=()=>()=>{};export{m as StyledComponentsRegistry};//# sourceMappingURL=registry.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"registry.js","sources":["../../src/studio/registry.tsx"],"sourcesContent":["// 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({children}: {children: React.ReactNode}): 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 (typeof window !== 'undefined') return <>{children}</>\n\n return (\n <StyleSheetManager sheet={styledComponentsStyleSheet.instance}>{children}</StyleSheetManager>\n )\n}\n"],"names":["jsx","Fragment","useServerInsertedHTML","useState","ServerStyleSheet","StyleSheetManager","StyledComponentsRegistry","children","styledComponentsStyleSheet","styles","getStyleElement","instance","clearTag","window","sheet"],"mappings":"cAKgBA,cAAAC,MAAA,oDAAAC,MAAA,wCAAAC,MAAA,mCAAAC,uBAAAC,MAAA,oBAAA,SAAAC,GAAyBC,SAACA,IAGxC,MAAOC,GAA8BL,GAAS,IAAM,IAAIC,IAQxD,OANAF,GAAsB,KACd,MAAAO,EAASD,EAA2BE,kBAC1C,OAAAF,EAA2BG,SAASC,aAC7BX,EAAA,CAAGM,SAAOE,GAAA,WAGRI,OAAW,IAAoBb,EAAAC,EAAA,CAAGM,eAG1CF,EAAA,CAAkBS,MAAON,EAA2BG,SAAWJ,YAEpE"}
1
+ {"version":3,"file":"registry.js","sources":["../../src/studio/registry.tsx"],"sourcesContent":["// https://nextjs.org/docs/app/building-your-application/styling/css-in-js#styled-components\nimport {useServerInsertedHTML} from 'next/navigation.js'\nimport {useState, useSyncExternalStore} from 'react'\nimport {ServerStyleSheet, StyleSheetManager} from 'styled-components'\n\nexport function StyledComponentsRegistry({children}: {children: React.ReactNode}): 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 const isMounted = useSyncExternalStore(\n subscribe,\n () => true,\n () => false,\n )\n if (isMounted) return <>{children}</>\n\n return (\n <StyleSheetManager sheet={styledComponentsStyleSheet.instance}>{children}</StyleSheetManager>\n )\n}\n// eslint-disable-next-line no-empty-function\nconst subscribe = () => () => {}\n"],"names":["jsx","Fragment","useServerInsertedHTML","useState","useSyncExternalStore","ServerStyleSheet","StyleSheetManager","StyledComponentsRegistry","children","styledComponentsStyleSheet","styles","getStyleElement","instance","clearTag","subscribe","sheet"],"mappings":"cAKgBA,cAAAC,MAAA,oDAAAC,MAAA,wCAAAC,0BAAAC,MAAA,mCAAAC,uBAAAC,MAAA,oBAAA,SAAAC,GAAyBC,SAACA,IAGxC,MAAOC,GAA8BN,GAAS,IAAM,IAAIE,IAaxD,OAXAH,GAAsB,KACd,MAAAQ,EAASD,EAA2BE,kBAC1C,OAAAF,EAA2BG,SAASC,aAC7BZ,EAAA,CAAGO,SAAOE,GAAA,IAGDN,EAChBU,GACA,KAAM,IACN,KAAM,SAEiBN,aAGtBR,EAAAM,EAAkB,CAAAS,MAAON,EAA2BG,SAAWJ,YAEpE,CAEA,MAAMM,EAAY,IAAM"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-sanity",
3
- "version": "8.1.2",
3
+ "version": "8.1.3",
4
4
  "description": "Sanity.io toolkit for Next.js",
5
5
  "keywords": [
6
6
  "sanity",
@@ -137,7 +137,7 @@
137
137
  ],
138
138
  "browserslist": "extends @sanity/browserslist-config",
139
139
  "dependencies": {
140
- "@sanity/client": "^6.15.0",
140
+ "@sanity/client": "^6.15.1",
141
141
  "@sanity/preview-kit": "5.0.27",
142
142
  "@sanity/visual-editing": "1.5.2",
143
143
  "@sanity/webhook": "4.0.2-bc",
@@ -166,7 +166,7 @@
166
166
  "vitest-github-actions-reporter": "^0.11.1"
167
167
  },
168
168
  "peerDependencies": {
169
- "@sanity/client": "^6.15.0",
169
+ "@sanity/client": "^6.15.1",
170
170
  "@sanity/icons": "^2.8",
171
171
  "@sanity/types": "^3.25",
172
172
  "@sanity/ui": "^1.8 || ^2.0.0-beta || ^2.0",
@@ -1,34 +1,27 @@
1
- /* eslint-disable react/no-danger */
2
-
3
- const style = {
4
- __html: `
5
- .sanity-app-no-js__root {
6
- position: absolute;
7
- top: 0;
8
- right: 0;
9
- left: 0;
10
- bottom: 0;
11
- background: #fff;
12
- z-index: 1;
13
- }
14
-
15
- .sanity-app-no-js__content {
16
- position: absolute;
17
- top: 50%;
18
- left: 50%;
19
- transform: translate(-50%, -50%);
20
- text-align: center;
21
- font-family: helvetica, arial, sans-serif;
22
- }
23
- `,
24
- } as const
25
-
26
1
  /** @internal */
27
2
  export const NextStudioNoScript = (): JSX.Element => (
28
3
  <noscript>
29
- <div className="sanity-app-no-js__root">
30
- <div className="sanity-app-no-js__content">
31
- <style type="text/css" dangerouslySetInnerHTML={style} />
4
+ <div
5
+ style={{
6
+ position: 'absolute',
7
+ top: 0,
8
+ right: 0,
9
+ left: 0,
10
+ bottom: 0,
11
+ background: '#fff',
12
+ zIndex: 1,
13
+ }}
14
+ >
15
+ <div
16
+ style={{
17
+ position: 'absolute',
18
+ top: '50%',
19
+ left: '50%',
20
+ transform: 'translate(-50%, -50%)',
21
+ textAlign: 'center',
22
+ fontFamily: 'helvetica, arial, sans-serif',
23
+ }}
24
+ >
32
25
  <h1>JavaScript disabled</h1>
33
26
  <p>
34
27
  Please <a href="https://www.enable-javascript.com/">enable JavaScript</a> in your
@@ -1,6 +1,6 @@
1
1
  // https://nextjs.org/docs/app/building-your-application/styling/css-in-js#styled-components
2
2
  import {useServerInsertedHTML} from 'next/navigation.js'
3
- import {useState} from 'react'
3
+ import {useState, useSyncExternalStore} from 'react'
4
4
  import {ServerStyleSheet, StyleSheetManager} from 'styled-components'
5
5
 
6
6
  export function StyledComponentsRegistry({children}: {children: React.ReactNode}): JSX.Element {
@@ -14,9 +14,16 @@ export function StyledComponentsRegistry({children}: {children: React.ReactNode}
14
14
  return <>{styles}</>
15
15
  })
16
16
 
17
- if (typeof window !== 'undefined') return <>{children}</>
17
+ const isMounted = useSyncExternalStore(
18
+ subscribe,
19
+ () => true,
20
+ () => false,
21
+ )
22
+ if (isMounted) return <>{children}</>
18
23
 
19
24
  return (
20
25
  <StyleSheetManager sheet={styledComponentsStyleSheet.instance}>{children}</StyleSheetManager>
21
26
  )
22
27
  }
28
+ // eslint-disable-next-line no-empty-function
29
+ const subscribe = () => () => {}