@sanity/ui 3.1.9 → 3.1.11

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
- {"version":3,"file":"refractor.mjs","sources":["../../src/core/primitives/code/refractor.tsx"],"sourcesContent":["import {hasLanguage, Refractor} from 'react-refractor'\n\nexport default function LazyRefractor(\n props: Partial<Pick<React.ComponentProps<typeof Refractor>, 'language'>> & {\n value: React.ReactNode\n },\n) {\n const {language: languageProp, value} = props\n const language = typeof languageProp === 'string' ? languageProp : undefined\n const registered = language ? hasLanguage(language as any) : false\n\n return (\n <>\n {!(language && registered) && <code>{value}</code>}\n {language && registered && <Refractor inline language={language} value={String(value)} />}\n </>\n )\n}\n\nLazyRefractor.displayName = 'LazyRefractor'\n"],"names":["LazyRefractor","props","$","_c","language","languageProp","value","undefined","t0","hasLanguage","registered","t1","t2","String","t3","displayName"],"mappings":";;;AAEA,SAAeA,cAAAC,OAAA;AAAA,QAAAC,IAAAC,EAAA,EAAA,GAKb;AAAA,IAAAC,UAAAC;AAAAA,IAAAC;AAAAA,EAAAA,IAAwCL,OACxCG,WAAiB,OAAOC,gBAAiB,WAAWA,eAAYE;AAAY,MAAAC;AAAAN,WAAAE,YACzDI,KAAAJ,WAAWK,YAAYL,QAAe,IAAC,IAAQF,OAAAE,UAAAF,OAAAM,MAAAA,KAAAN,EAAA,CAAA;AAAlE,QAAAQ,aAAmBF;AAA+C,MAAAG;AAAAT,IAAA,CAAA,MAAAE,YAAAF,SAAAQ,cAAAR,EAAA,CAAA,MAAAI,SAI7DK,KAAA,EAAEP,YAAYM,6CAAsBJ,UAAAA,MAAAA,CAAM,GAAOJ,OAAAE,UAAAF,OAAAQ,YAAAR,OAAAI,OAAAJ,OAAAS,MAAAA,KAAAT,EAAA,CAAA;AAAA,MAAAU;AAAAV,IAAA,CAAA,MAAAE,YAAAF,SAAAQ,cAAAR,EAAA,CAAA,MAAAI,SACjDM,KAAAR,YAAYM,kCAAe,WAAA,EAAU,QAAA,IAAiBN,UAAiB,OAAAS,OAAOP,KAAK,EAAA,CAAC,GAAIJ,OAAAE,UAAAF,OAAAQ,YAAAR,OAAAI,OAAAJ,OAAAU,MAAAA,KAAAV,EAAA,CAAA;AAAA,MAAAY;AAAA,SAAAZ,EAAA,EAAA,MAAAS,MAAAT,UAAAU,MAF3FE,sCACGH,UAAAA;AAAAA,IAAAA;AAAAA,IACAC;AAAAA,EAAAA,EAAAA,CAAwF,GACxFV,QAAAS,IAAAT,QAAAU,IAAAV,QAAAY,MAAAA,KAAAZ,EAAA,EAAA,GAHHY;AAGG;AAIPd,cAAce,cAAc;"}
1
+ {"version":3,"file":"refractor.mjs","sources":["../../src/core/primitives/code/refractor.tsx"],"sourcesContent":["import {hasLanguage, Refractor} from 'react-refractor'\n\nexport default function LazyRefractor(\n props: Partial<Pick<React.ComponentProps<typeof Refractor>, 'language'>> & {\n value: React.ReactNode\n },\n) {\n const {language: languageProp, value} = props\n const language = typeof languageProp === 'string' ? languageProp : undefined\n const registered = language ? hasLanguage(language as any) : false\n\n return (\n <>\n {!(language && registered) && <code>{value}</code>}\n {language && registered && <Refractor inline language={language} value={String(value)} />}\n </>\n )\n}\n\nLazyRefractor.displayName = 'LazyRefractor'\n"],"names":["LazyRefractor","props","$","_c","language","languageProp","value","undefined","t0","hasLanguage","registered","t1","t2","String","t3","displayName"],"mappings":";;;AAEA,SAAeA,cAAAC,OAAA;AAAA,QAAAC,IAAAC,EAAA,EAAA,GAKb;AAAA,IAAAC,UAAAC;AAAAA,IAAAC;AAAAA,EAAAA,IAAwCL,OACxCG,WAAiB,OAAOC,gBAAiB,WAAxBA,eAAAE;AAA2D,MAAAC;AAAAN,WAAAE,YACzDI,KAAAJ,WAAWK,YAAYL,QAAuB,IAA9C,IAA+CF,OAAAE,UAAAF,OAAAM,MAAAA,KAAAN,EAAA,CAAA;AAAlE,QAAAQ,aAAmBF;AAA+C,MAAAG;AAAAT,IAAA,CAAA,MAAAE,YAAAF,SAAAQ,cAAAR,EAAA,CAAA,MAAAI,SAI7DK,KAAA,EAAEP,YAAAM,mCAA2B,QAAA,EAAOJ,UAAAA,MAAAA,CAAM,GAAOJ,OAAAE,UAAAF,OAAAQ,YAAAR,OAAAI,OAAAJ,OAAAS,MAAAA,KAAAT,EAAA,CAAA;AAAA,MAAAU;AAAAV,IAAA,CAAA,MAAAE,YAAAF,SAAAQ,cAAAR,EAAA,CAAA,MAAAI,SACjDM,KAAAR,YAAAM,kCAA2B,WAAA,EAAU,QAAA,IAAiBN,UAAiB,OAAAS,OAAOP,KAAK,EAAA,CAAC,GAAIJ,OAAAE,UAAAF,OAAAQ,YAAAR,OAAAI,OAAAJ,OAAAU,MAAAA,KAAAV,EAAA,CAAA;AAAA,MAAAY;AAAA,SAAAZ,EAAA,EAAA,MAAAS,MAAAT,UAAAU,MAF3FE,sCACGH,UAAAA;AAAAA,IAAAA;AAAAA,IACAC;AAAAA,EAAAA,EAAAA,CAAwF,GACxFV,QAAAS,IAAAT,QAAAU,IAAAV,QAAAY,MAAAA,KAAAZ,EAAA,EAAA,GAHHY;AAGG;AAIPd,cAAce,cAAc;"}
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: !0 });
3
- var _visualEditing = require("./_chunks-cjs/_visual-editing.js"), jsxRuntime = require("react/jsx-runtime"), reactCompilerRuntime = require("react-compiler-runtime"), icons = require("@sanity/icons"), react = require("react"), styledComponents = require("styled-components"), theme = require("@sanity/ui/theme"), framerMotion = require("framer-motion");
3
+ var _visualEditing = require("./_chunks-cjs/_visual-editing.js"), jsxRuntime = require("react/jsx-runtime"), reactCompilerRuntime = require("react-compiler-runtime"), icons = require("@sanity/icons"), react = require("react"), styledComponents = require("styled-components"), theme = require("@sanity/ui/theme"), react$1 = require("motion/react");
4
4
  function _raf(fn) {
5
5
  const frameId = requestAnimationFrame(fn);
6
6
  return () => {
@@ -1359,7 +1359,7 @@ const container = {
1359
1359
  visible: {
1360
1360
  opacity: 1
1361
1361
  }
1362
- }, MotionToast = framerMotion.motion.create(StyledToast), MotionFlex = framerMotion.motion.create(_visualEditing.Flex), MotionText = framerMotion.motion.create(_visualEditing.Text), MotionLoadingBar = framerMotion.motion.create(LoadingBar), MotionLoadingBarProgress = framerMotion.motion.create(LoadingBarProgress);
1362
+ }, MotionToast = react$1.motion.create(StyledToast), MotionFlex = react$1.motion.create(_visualEditing.Flex), MotionText = react$1.motion.create(_visualEditing.Text), MotionLoadingBar = react$1.motion.create(LoadingBar), MotionLoadingBarProgress = react$1.motion.create(LoadingBarProgress);
1363
1363
  function useMounted() {
1364
1364
  return react.useSyncExternalStore(subscribe, _temp$1, _temp2);
1365
1365
  }
@@ -1434,7 +1434,7 @@ function ToastProvider(props) {
1434
1434
  }, $[1] = t2) : t2 = $[1];
1435
1435
  const value = t2;
1436
1436
  let t3;
1437
- $[2] !== gap || $[3] !== mounted || $[4] !== padding || $[5] !== paddingX || $[6] !== paddingY || $[7] !== state || $[8] !== zOffset ? (t3 = mounted && /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.LayerProvider, { zOffset, children: /* @__PURE__ */ jsxRuntime.jsx(ToastLayer, { padding, paddingX, paddingY, gap, children: /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { initial: !1, mode: "popLayout", children: state.map(_temp) }) }) }), $[2] = gap, $[3] = mounted, $[4] = padding, $[5] = paddingX, $[6] = paddingY, $[7] = state, $[8] = zOffset, $[9] = t3) : t3 = $[9];
1437
+ $[2] !== gap || $[3] !== mounted || $[4] !== padding || $[5] !== paddingX || $[6] !== paddingY || $[7] !== state || $[8] !== zOffset ? (t3 = mounted && /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.LayerProvider, { zOffset, children: /* @__PURE__ */ jsxRuntime.jsx(ToastLayer, { padding, paddingX, paddingY, gap, children: /* @__PURE__ */ jsxRuntime.jsx(react$1.AnimatePresence, { initial: !1, mode: "popLayout", children: state.map(_temp) }) }) }), $[2] = gap, $[3] = mounted, $[4] = padding, $[5] = paddingX, $[6] = paddingY, $[7] = state, $[8] = zOffset, $[9] = t3) : t3 = $[9];
1438
1438
  let t4;
1439
1439
  return $[10] !== children || $[11] !== t3 ? (t4 = /* @__PURE__ */ jsxRuntime.jsxs(ToastContext.Provider, { value, children: [
1440
1440
  children,