@sanity/ui 4.0.0-static.37 → 4.0.0-static.38
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.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): React.JSX.Element {\n const {language: languageProp, value} = props\n const language = typeof languageProp === 'string' ? languageProp : undefined\n const registered = language ? hasLanguage(language) : 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"],"names":["LazyRefractor","props","$","_c","language","languageProp","value","undefined","t0","hasLanguage","registered","t1","t2","String","t3"],"mappings":";;;AAEA,SAAeA,cAAAC,OAAA;AAAA,QAAAC,IAAAC,EAAA,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): React.JSX.Element {\n const {language: languageProp, value} = props\n const language = typeof languageProp === 'string' ? languageProp : undefined\n const registered = language ? hasLanguage(language) : 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"],"names":["LazyRefractor","props","$","_c","language","languageProp","value","undefined","t0","hasLanguage","registered","t1","t2","String","t3"],"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,QAAgB,IAAvC,IAAwCF,OAAAE,UAAAF,OAAAM,MAAAA,KAAAN,EAAA,CAAA;AAA3D,QAAAQ,aAAmBF;AAAwC,MAAAG;AAAAT,IAAA,CAAA,MAAAE,YAAAF,SAAAQ,cAAAR,EAAA,CAAA,MAAAI,SAItDK,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;"}
|
package/dist/index.js
CHANGED
|
@@ -664,7 +664,7 @@ function compileCommands(cmds) {
|
|
|
664
664
|
}
|
|
665
665
|
const DEFAULT_ARROW_ELEMENT = "div";
|
|
666
666
|
function Arrow(props) {
|
|
667
|
-
const $ = c(
|
|
667
|
+
const $ = c(39), t0 = props;
|
|
668
668
|
let h, rest, style, t1, t2, w;
|
|
669
669
|
$[0] !== t0 ? ({
|
|
670
670
|
as: t1,
|
|
@@ -674,60 +674,67 @@ function Arrow(props) {
|
|
|
674
674
|
style,
|
|
675
675
|
...rest
|
|
676
676
|
} = t0, $[0] = t0, $[1] = h, $[2] = rest, $[3] = style, $[4] = t1, $[5] = t2, $[6] = w) : (h = $[1], rest = $[2], style = $[3], t1 = $[4], t2 = $[5], w = $[6]);
|
|
677
|
-
const Element2 = t1 === void 0 ? DEFAULT_ARROW_ELEMENT : t1, radius = t2 === void 0 ? 0 : t2, center = w / 2
|
|
678
|
-
x: 0,
|
|
679
|
-
y: 0
|
|
680
|
-
}, {
|
|
681
|
-
x: radius,
|
|
682
|
-
y: 0,
|
|
683
|
-
radius
|
|
684
|
-
}, {
|
|
685
|
-
x: center,
|
|
686
|
-
y: h - 1,
|
|
687
|
-
radius
|
|
688
|
-
}, {
|
|
689
|
-
x: w - radius,
|
|
690
|
-
y: 0,
|
|
691
|
-
radius
|
|
692
|
-
}, {
|
|
693
|
-
x: w,
|
|
694
|
-
y: 0
|
|
695
|
-
}], cmds = getRoundedCommands(points), path = compileCommands(cmds), strokePath = `${path}`, fillPath = `${path} M ${w} -1 M 0 -1 Z`;
|
|
677
|
+
const Element2 = t1 === void 0 ? DEFAULT_ARROW_ELEMENT : t1, radius = t2 === void 0 ? 0 : t2, center = w / 2;
|
|
696
678
|
let t3;
|
|
697
|
-
$[7]
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
679
|
+
if ($[7] !== center || $[8] !== h || $[9] !== radius || $[10] !== w) {
|
|
680
|
+
const points = [{
|
|
681
|
+
x: 0,
|
|
682
|
+
y: 0
|
|
683
|
+
}, {
|
|
684
|
+
x: radius,
|
|
685
|
+
y: 0,
|
|
686
|
+
radius
|
|
687
|
+
}, {
|
|
688
|
+
x: center,
|
|
689
|
+
y: h - 1,
|
|
690
|
+
radius
|
|
691
|
+
}, {
|
|
692
|
+
x: w - radius,
|
|
693
|
+
y: 0,
|
|
694
|
+
radius
|
|
695
|
+
}, {
|
|
696
|
+
x: w,
|
|
697
|
+
y: 0
|
|
698
|
+
}], cmds = getRoundedCommands(points);
|
|
699
|
+
t3 = compileCommands(cmds), $[7] = center, $[8] = h, $[9] = radius, $[10] = w, $[11] = t3;
|
|
700
|
+
} else
|
|
701
|
+
t3 = $[11];
|
|
702
|
+
const path = t3, strokePath = `${path}`, fillPath = `${path} M ${w} -1 M 0 -1 Z`;
|
|
703
|
+
let t4;
|
|
704
|
+
$[12] === Symbol.for("react.memo_cache_sentinel") ? (t4 = _arrow(), $[12] = t4) : t4 = $[12];
|
|
705
|
+
const t5 = `${w}px`;
|
|
703
706
|
let t6;
|
|
704
|
-
$[
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
}, $[10] = style, $[11] = t5, $[12] = t6) : t6 = $[12];
|
|
707
|
+
$[13] !== t5 ? (t6 = assignInlineVars({
|
|
708
|
+
[vars.arrow.size]: t5
|
|
709
|
+
}), $[13] = t5, $[14] = t6) : t6 = $[14];
|
|
708
710
|
let t7;
|
|
709
|
-
$[
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
$[
|
|
711
|
+
$[15] !== style || $[16] !== t6 ? (t7 = {
|
|
712
|
+
...style,
|
|
713
|
+
...t6
|
|
714
|
+
}, $[15] = style, $[16] = t6, $[17] = t7) : t7 = $[17];
|
|
715
|
+
let t8;
|
|
716
|
+
$[18] === Symbol.for("react.memo_cache_sentinel") ? (t8 = _arrowSvg(), $[18] = t8) : t8 = $[18];
|
|
717
|
+
const t9 = `0 0 ${w} ${w}`;
|
|
713
718
|
let t10;
|
|
714
|
-
$[
|
|
719
|
+
$[19] === Symbol.for("react.memo_cache_sentinel") ? (t10 = _arrowStrokeMask(), $[19] = t10) : t10 = $[19];
|
|
715
720
|
let t11;
|
|
716
|
-
$[
|
|
721
|
+
$[20] !== w ? (t11 = /* @__PURE__ */ jsx("mask", { id: "stroke-mask", children: /* @__PURE__ */ jsx("rect", { className: t10, x: 0, width: w, height: w, fill: "white" }) }), $[20] = w, $[21] = t11) : t11 = $[21];
|
|
717
722
|
let t12;
|
|
718
|
-
$[
|
|
723
|
+
$[22] === Symbol.for("react.memo_cache_sentinel") ? (t12 = _arrowStroke(), $[22] = t12) : t12 = $[22];
|
|
719
724
|
let t13;
|
|
720
|
-
$[
|
|
725
|
+
$[23] !== strokePath ? (t13 = /* @__PURE__ */ jsx("path", { className: t12, d: strokePath, mask: "url(#stroke-mask)" }), $[23] = strokePath, $[24] = t13) : t13 = $[24];
|
|
721
726
|
let t14;
|
|
722
|
-
$[
|
|
727
|
+
$[25] === Symbol.for("react.memo_cache_sentinel") ? (t14 = _arrowShape(), $[25] = t14) : t14 = $[25];
|
|
723
728
|
let t15;
|
|
724
|
-
$[
|
|
725
|
-
t10,
|
|
726
|
-
t12,
|
|
727
|
-
t14
|
|
728
|
-
] }), $[23] = t10, $[24] = t12, $[25] = t14, $[26] = t8, $[27] = w, $[28] = t15) : t15 = $[28];
|
|
729
|
+
$[26] !== fillPath ? (t15 = /* @__PURE__ */ jsx("path", { className: t14, d: fillPath }), $[26] = fillPath, $[27] = t15) : t15 = $[27];
|
|
729
730
|
let t16;
|
|
730
|
-
|
|
731
|
+
$[28] !== t11 || $[29] !== t13 || $[30] !== t15 || $[31] !== t9 || $[32] !== w ? (t16 = /* @__PURE__ */ jsxs("svg", { className: t8, width: w, height: w, viewBox: t9, children: [
|
|
732
|
+
t11,
|
|
733
|
+
t13,
|
|
734
|
+
t15
|
|
735
|
+
] }), $[28] = t11, $[29] = t13, $[30] = t15, $[31] = t9, $[32] = w, $[33] = t16) : t16 = $[33];
|
|
736
|
+
let t17;
|
|
737
|
+
return $[34] !== Element2 || $[35] !== rest || $[36] !== t16 || $[37] !== t7 ? (t17 = /* @__PURE__ */ jsx(Element2, { ...rest, className: t4, style: t7, children: t16 }), $[34] = Element2, $[35] = rest, $[36] = t16, $[37] = t7, $[38] = t17) : t17 = $[38], t17;
|
|
731
738
|
}
|
|
732
739
|
const DEFAULT_FLEX_ELEMENT = "div";
|
|
733
740
|
function Flex(props) {
|