@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.
- package/dist/_chunks-cjs/_visual-editing.js +45 -38
- package/dist/_chunks-cjs/_visual-editing.js.map +1 -1
- package/dist/_chunks-cjs/refractor.js.map +1 -1
- package/dist/_chunks-es/_visual-editing.mjs +40 -33
- package/dist/_chunks-es/_visual-editing.mjs.map +1 -1
- package/dist/_chunks-es/refractor.mjs.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -8
- package/src/core/components/toast/toast.tsx +1 -1
- package/src/core/components/toast/toastProvider.tsx +1 -1
- package/src/core/components/tree/tree.tsx +0 -1
- package/src/core/constants.ts +1 -1
- package/src/core/hooks/useClickOutside.test.tsx +1 -1
- package/src/core/primitives/popover/popover.tsx +1 -1
- package/src/core/primitives/popover/popoverCard.tsx +1 -1
- package/src/core/primitives/tooltip/tooltip.tsx +1 -1
- package/src/core/primitives/tooltip/tooltipCard.tsx +1 -1
- package/src/core/utils/virtualList/virtualList.tsx +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"refractor.js","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","Refractor","String","t3","displayName"],"mappings":";;AAEA,SAAeA,cAAAC,OAAA;AAAA,QAAAC,IAAAC,uBAAA,EAAA,GAKb;AAAA,IAAAC,UAAAC;AAAAA,IAAAC;AAAAA,EAAAA,IAAwCL,OACxCG,WAAiB,OAAOC,gBAAiB,
|
|
1
|
+
{"version":3,"file":"refractor.js","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","Refractor","String","t3","displayName"],"mappings":";;AAEA,SAAeA,cAAAC,OAAA;AAAA,QAAAC,IAAAC,uBAAA,EAAA,GAKb;AAAA,IAAAC,UAAAC;AAAAA,IAAAC;AAAAA,EAAAA,IAAwCL,OACxCG,WAAiB,OAAOC,gBAAiB,WAAxBA,eAAAE;AAA2D,MAAAC;AAAAN,WAAAE,YACzDI,KAAAJ,WAAWK,eAAAA,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,8CAA2B,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,6CAA2BG,eAAAA,WAAA,EAAU,QAAA,IAAiBT,UAAiB,OAAAU,OAAOR,KAAK,EAAA,CAAC,GAAIJ,OAAAE,UAAAF,OAAAQ,YAAAR,OAAAI,OAAAJ,OAAAU,MAAAA,KAAAV,EAAA,CAAA;AAAA,MAAAa;AAAA,SAAAb,EAAA,EAAA,MAAAS,MAAAT,UAAAU,MAF3FG,4DACGJ,UAAAA;AAAAA,IAAAA;AAAAA,IACAC;AAAAA,EAAAA,EAAAA,CAAwF,GACxFV,QAAAS,IAAAT,QAAAU,IAAAV,QAAAa,MAAAA,KAAAb,EAAA,EAAA,GAHHa;AAGG;AAIPf,cAAcgB,cAAc;;"}
|
|
@@ -6,7 +6,7 @@ import { ThemeProvider as ThemeProvider$1, useTheme as useTheme$1, css, styled,
|
|
|
6
6
|
import ReactIs, { isValidElementType } from "react-is";
|
|
7
7
|
import { SpinnerIcon, CheckmarkIcon, RemoveIcon, ChevronDownIcon, CloseIcon, ChevronRightIcon } from "@sanity/icons";
|
|
8
8
|
import { detectOverflow, useFloating, autoPlacement, flip, offset, shift, arrow, hide, autoUpdate } from "@floating-ui/react-dom";
|
|
9
|
-
import { motion, AnimatePresence } from "
|
|
9
|
+
import { motion, AnimatePresence } from "motion/react";
|
|
10
10
|
import { ResizeObserver } from "@juggle/resize-observer";
|
|
11
11
|
import { createPortal } from "react-dom";
|
|
12
12
|
import { useEffectEvent } from "use-effect-event";
|
|
@@ -3029,7 +3029,7 @@ const StyledArrow = /* @__PURE__ */ styled.div.withConfig({
|
|
|
3029
3029
|
displayName: "ShapePath",
|
|
3030
3030
|
componentId: "sc-12vzy6c-2"
|
|
3031
3031
|
})`fill:var(--card-bg-color);`, Arrow = forwardRef(function(props, ref) {
|
|
3032
|
-
const $ = c(
|
|
3032
|
+
const $ = c(29);
|
|
3033
3033
|
let h, restProps, t0, w;
|
|
3034
3034
|
$[0] !== props ? ({
|
|
3035
3035
|
width: w,
|
|
@@ -3039,40 +3039,47 @@ const StyledArrow = /* @__PURE__ */ styled.div.withConfig({
|
|
|
3039
3039
|
} = props, $[0] = props, $[1] = h, $[2] = restProps, $[3] = t0, $[4] = w) : (h = $[1], restProps = $[2], t0 = $[3], w = $[4]);
|
|
3040
3040
|
const radius = t0 === void 0 ? 0 : t0, {
|
|
3041
3041
|
card
|
|
3042
|
-
} = useTheme_v2(), strokeWidth = card.shadow.outline, center = w / 2
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
|
|
3053
|
-
|
|
3054
|
-
|
|
3055
|
-
|
|
3056
|
-
|
|
3057
|
-
|
|
3058
|
-
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
|
|
3042
|
+
} = useTheme_v2(), strokeWidth = card.shadow.outline, center = w / 2;
|
|
3043
|
+
let t1;
|
|
3044
|
+
if ($[5] !== center || $[6] !== h || $[7] !== radius || $[8] !== w) {
|
|
3045
|
+
const points = [{
|
|
3046
|
+
x: 0,
|
|
3047
|
+
y: 0
|
|
3048
|
+
}, {
|
|
3049
|
+
x: radius,
|
|
3050
|
+
y: 0,
|
|
3051
|
+
radius
|
|
3052
|
+
}, {
|
|
3053
|
+
x: center,
|
|
3054
|
+
y: h - 1,
|
|
3055
|
+
radius
|
|
3056
|
+
}, {
|
|
3057
|
+
x: w - radius,
|
|
3058
|
+
y: 0,
|
|
3059
|
+
radius
|
|
3060
|
+
}, {
|
|
3061
|
+
x: w,
|
|
3062
|
+
y: 0
|
|
3063
|
+
}], cmds = getRoundedCommands(points);
|
|
3064
|
+
t1 = compileCommands(cmds), $[5] = center, $[6] = h, $[7] = radius, $[8] = w, $[9] = t1;
|
|
3065
|
+
} else
|
|
3066
|
+
t1 = $[9];
|
|
3067
|
+
const path = t1, strokePath = `${path}`, fillPath = `${path} M ${w} -1 M 0 -1 Z`, t2 = `0 0 ${w} ${w}`;
|
|
3068
|
+
let t3;
|
|
3069
|
+
$[10] !== strokeWidth || $[11] !== w ? (t3 = /* @__PURE__ */ jsx("mask", { id: "stroke-mask", children: /* @__PURE__ */ jsx("rect", { x: 0, y: strokeWidth, width: w, height: w, fill: "white" }) }), $[10] = strokeWidth, $[11] = w, $[12] = t3) : t3 = $[12];
|
|
3070
|
+
const t4 = strokeWidth * 2;
|
|
3066
3071
|
let t5;
|
|
3067
|
-
$[
|
|
3072
|
+
$[13] !== strokePath || $[14] !== t4 ? (t5 = /* @__PURE__ */ jsx(StrokePath, { d: strokePath, mask: "url(#stroke-mask)", strokeWidth: t4 }), $[13] = strokePath, $[14] = t4, $[15] = t5) : t5 = $[15];
|
|
3068
3073
|
let t6;
|
|
3069
|
-
$[
|
|
3070
|
-
t2,
|
|
3071
|
-
t4,
|
|
3072
|
-
t5
|
|
3073
|
-
] }), $[13] = t1, $[14] = t2, $[15] = t4, $[16] = t5, $[17] = w, $[18] = t6) : t6 = $[18];
|
|
3074
|
+
$[16] !== fillPath ? (t6 = /* @__PURE__ */ jsx(ShapePath, { d: fillPath }), $[16] = fillPath, $[17] = t6) : t6 = $[17];
|
|
3074
3075
|
let t7;
|
|
3075
|
-
|
|
3076
|
+
$[18] !== t2 || $[19] !== t3 || $[20] !== t5 || $[21] !== t6 || $[22] !== w ? (t7 = /* @__PURE__ */ jsxs("svg", { width: w, height: w, viewBox: t2, children: [
|
|
3077
|
+
t3,
|
|
3078
|
+
t5,
|
|
3079
|
+
t6
|
|
3080
|
+
] }), $[18] = t2, $[19] = t3, $[20] = t5, $[21] = t6, $[22] = w, $[23] = t7) : t7 = $[23];
|
|
3081
|
+
let t8;
|
|
3082
|
+
return $[24] !== ref || $[25] !== restProps || $[26] !== t7 || $[27] !== w ? (t8 = /* @__PURE__ */ jsx(StyledArrow, { ...restProps, $w: w, ref, children: t7 }), $[24] = ref, $[25] = restProps, $[26] = t7, $[27] = w, $[28] = t8) : t8 = $[28], t8;
|
|
3076
3083
|
});
|
|
3077
3084
|
Arrow.displayName = "ForwardRef(Arrow)";
|
|
3078
3085
|
const BoundaryElementContext = createGlobalScopedContext("@sanity/ui/context/boundaryElement", null);
|