@sheetxl/studio-mui 0.4.20 → 0.4.22

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.
Files changed (98) hide show
  1. package/browser/cjs/2d2J6QkipnGWfI99.cjs +6 -0
  2. package/browser/cjs/BY09bxecVOSMwQA3.cjs +6 -0
  3. package/browser/cjs/BYJI3FMxQ-z5UGsU.cjs +6 -0
  4. package/browser/cjs/B_nvuo0kEXu5G0Gf.cjs +7 -0
  5. package/browser/cjs/BfnxiVEhzO5reOYH.cjs +42 -0
  6. package/browser/cjs/Bil3fXnJ3lk7aGF5.cjs +6 -0
  7. package/browser/cjs/{DItuuqkIamMzp7Im.cjs → BzbKSVugPof6dqQI.cjs} +1 -1
  8. package/browser/cjs/CU0utErelA1oX0n8.cjs +6 -0
  9. package/browser/cjs/CWp8_mrz0htdOXMM.cjs +20 -0
  10. package/browser/cjs/D2Cp7gwb6bRupSZY.cjs +6 -0
  11. package/browser/cjs/DC70SHoaPVkOUEHx.cjs +6 -0
  12. package/browser/cjs/DRUx3PLS_NrkJ6Yw.cjs +18 -0
  13. package/browser/cjs/index.cjs +2 -2
  14. package/browser/esm/-0XEuwqNVFTlDKEX.mjs +25 -0
  15. package/browser/esm/-AR3L_VjwMbtQVbL.mjs +62 -0
  16. package/browser/esm/BLhZj1SgWlsmeviw.mjs +4443 -0
  17. package/browser/esm/{BW3_mz5_8i9VLBYB.mjs → BXNl9EEQzO53Hoh5.mjs} +87 -85
  18. package/browser/esm/BqnVpwK0Q2fKGA2S.mjs +53 -0
  19. package/browser/esm/D4rFOqwrrtVMpgbc.mjs +49 -0
  20. package/browser/esm/DEbllEGmvtLkCug_.mjs +2156 -0
  21. package/browser/esm/{C60ZnLCvtztDLuoT.mjs → DXRFs7VZM4IShMju.mjs} +100 -98
  22. package/browser/esm/{C5xUbwpUPDeNua-i.mjs → DeGATuYv4-5bhQcD.mjs} +1 -1
  23. package/browser/esm/{5u-JEG1IfQBstjq0.mjs → EMqbYi0X_krk5yOL.mjs} +11 -10
  24. package/browser/esm/fWsCG2WBM3kCpC5p.mjs +46 -0
  25. package/browser/esm/index.mjs +29 -29
  26. package/browser/esm/{CxXpPYi4eOFhBNt2.mjs → pARZF2O230qNvxWd.mjs} +27 -26
  27. package/licenses/dependencies.txt +0 -271
  28. package/node/esm/{D6A_o47zvz5ITIJK.mjs → 0JTY0jNrXiIiOqWY.mjs} +79 -78
  29. package/node/esm/{Ds5dinNcyNdC8ta6.mjs → BqQ6JNhQ1K321g9U.mjs} +13 -11
  30. package/node/esm/{CrDbLKJh9omVo_TF.mjs → Bu58psaOsDy_zPOJ.mjs} +29 -28
  31. package/node/esm/BzBHqe1ThbCP-l_d.mjs +88 -0
  32. package/node/esm/CE_I2ijQF8MeexHD.mjs +63 -0
  33. package/node/esm/{Bv12-Yyv0C86Iquy.mjs → CuomeW-4DDc1ywFW.mjs} +7 -6
  34. package/node/esm/DRt8kMDuCJn53CIE.mjs +46 -0
  35. package/node/esm/{CH6p2H0CMCoz4NgJ.mjs → DgHCTCARk1Gv_msN.mjs} +23 -22
  36. package/node/esm/{Bn5TJPQAEMY-lGpF.mjs → Do7y7aKPA48-93AV.mjs} +4 -3
  37. package/node/esm/{rlqvGCJlj4a2UcSM.mjs → X11ONmg6R1Y6hfue.mjs} +11 -10
  38. package/node/esm/index.mjs +2381 -18514
  39. package/package.json +8 -8
  40. package/browser/cjs/-Z37a-mzY5SKXy--.cjs +0 -6
  41. package/browser/cjs/B384kb1_rsiCsdZG.cjs +0 -6
  42. package/browser/cjs/B8nWvy4zDv1CZsr_.cjs +0 -110
  43. package/browser/cjs/BBnMJiXp9lru0Rcq.cjs +0 -6
  44. package/browser/cjs/BFbHTu65n1oE-l0N.cjs +0 -6
  45. package/browser/cjs/BQMSHnQdWtqeakER.cjs +0 -6
  46. package/browser/cjs/BvjA0ybox6653eb5.cjs +0 -6
  47. package/browser/cjs/Cocgl4ghzWE9yVYS.cjs +0 -161
  48. package/browser/cjs/D21Q1NdM1zQ7uFlH.cjs +0 -6
  49. package/browser/cjs/D4LmaKqYiwjxp0Hs.cjs +0 -15
  50. package/browser/cjs/D6egUillMqBwTaEq.cjs +0 -6
  51. package/browser/cjs/D9lY6pd9tRxPeLKs.cjs +0 -18
  52. package/browser/cjs/DNqIYSqRYZkUpFxW.cjs +0 -7
  53. package/browser/cjs/DUImSlPsM-OipgBZ.cjs +0 -6
  54. package/browser/cjs/DUVLcBcwkTsuLb6q.cjs +0 -6
  55. package/browser/cjs/Db7IyKXFzo8IocDa.cjs +0 -145
  56. package/browser/cjs/DsHPj69dMFG09uD_.cjs +0 -16
  57. package/browser/cjs/DypblOPNMRx5Twgx.cjs +0 -12
  58. package/browser/cjs/QK7YNBstmN86K-xL.cjs +0 -6
  59. package/browser/cjs/VNWvn2kP6ZF0Snzw.cjs +0 -11
  60. package/browser/cjs/dc1YAArM3bSHvRcF.cjs +0 -7
  61. package/browser/cjs/mInXvB8P6r6q7pRY.cjs +0 -11
  62. package/browser/cjs/nop6N-Oi_LKy1Bpc.cjs +0 -42
  63. package/browser/cjs/s45oNHeIvJVeRjn5.cjs +0 -6
  64. package/browser/esm/1y10o01h14oGJtKG.mjs +0 -43
  65. package/browser/esm/BFpc8KBa-fb0nLSt.mjs +0 -46
  66. package/browser/esm/Bmjhrc6YMmfx_1Yi.mjs +0 -1703
  67. package/browser/esm/BnlJVFlQeWerd3KW.mjs +0 -3803
  68. package/browser/esm/BpuH_QvBidPOXgAR.mjs +0 -392
  69. package/browser/esm/CAiWSkkPRgUjk8CN.mjs +0 -424
  70. package/browser/esm/CW8taieVozHhyBOC.mjs +0 -1467
  71. package/browser/esm/CzyEerZmfWrW3i3U.mjs +0 -59
  72. package/browser/esm/D0FBHwm0Oz_wf0tR.mjs +0 -12
  73. package/browser/esm/DM9GPrZpbCcKOnyU.mjs +0 -1352
  74. package/browser/esm/DO1doKZhwYiL7vbF.mjs +0 -1672
  75. package/browser/esm/DS3anstzAV3EJBRw.mjs +0 -84
  76. package/browser/esm/DuEmdSQsXlkCWZIB.mjs +0 -1366
  77. package/browser/esm/FvK-pQsicRjtrKoS.mjs +0 -48
  78. package/browser/esm/KCTJzQeDChqf1yBO.mjs +0 -52
  79. package/browser/esm/P-3pIbidOtRCNsw3.mjs +0 -23
  80. package/browser/esm/W3EFMOPLR1aNXWvF.mjs +0 -2250
  81. package/browser/esm/Z_Sh-N3xHHWLCbEw.mjs +0 -23412
  82. package/browser/esm/mOmzoYDWAtgYndCA.mjs +0 -13391
  83. package/browser/esm/tnJECoiQzUzgUQZE.mjs +0 -44
  84. package/node/esm/54SjtcD6mOreKcCy.mjs +0 -1719
  85. package/node/esm/B2BlMiDOVpIp1FDQ.mjs +0 -1706
  86. package/node/esm/BNEvR1srnnwBgnrF.mjs +0 -1479
  87. package/node/esm/BZ20_F64yjZgn-_G.mjs +0 -1246
  88. package/node/esm/BfzRLuswtxg9uDsX.mjs +0 -78
  89. package/node/esm/C0ZBbkFa-24tJTnw.mjs +0 -60
  90. package/node/esm/CEVO60fX3MAPG0Hg.mjs +0 -1378
  91. package/node/esm/CdFmhVFplZFgBvTo.mjs +0 -44
  92. package/node/esm/Cx4mn0YEVkG-M1VL.mjs +0 -553
  93. package/node/esm/DDWek3aquTe_okr_.mjs +0 -392
  94. package/node/esm/DSLWcwr4qgHARs36.mjs +0 -13464
  95. package/node/esm/iXG86MN0JrtJkpqe.mjs +0 -44
  96. package/node/esm/m2teXjBzZLfLDFPx.mjs +0 -46
  97. package/node/esm/oykDy4erHC0NNHHq.mjs +0 -3776
  98. package/node/esm/sVOd1y3oNBREsKJ7.mjs +0 -86
@@ -1,14 +1,16 @@
1
1
  import { jsxs as ie, jsx as U } from "react/jsx-runtime";
2
2
  import O, { isValidElement as qu, PureComponent as pe, Component as de, memo as Ku, useState as ft, useCallback as ct, useLayoutEffect as Gu } from "react";
3
- import { Box as Ju } from "@mui/material";
4
- import { M as mu, O as Qu, Q as ve, S as Zu, U as es, V as ts } from "./Z_Sh-N3xHHWLCbEw.mjs";
3
+ import { useTheme as Ju } from "@mui/material/styles";
4
+ import { Box as Qu } from "@mui/material";
5
+ import { g as mu, r as Zu, c as ve, C as es } from "./BLhZj1SgWlsmeviw.mjs";
6
+ import { ReactUtils as ts } from "@sheetxl/utils-react";
5
7
  /**
6
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.20
8
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.22
7
9
  *
8
10
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
9
11
  * License: The license can be found at https://www.sheetxl.com/license.
10
12
  */
11
- const ge = mu(Qu());
13
+ const ge = mu(Zu());
12
14
  function Me(t) {
13
15
  return Me = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(n) {
14
16
  return typeof n;
@@ -30,7 +32,7 @@ function w(t, n) {
30
32
  return (c = B.rgb.exec(d)) ? { r: c[1], g: c[2], b: c[3] } : (c = B.rgba.exec(d)) ? { r: c[1], g: c[2], b: c[3], a: c[4] } : (c = B.hsl.exec(d)) ? { h: c[1], s: c[2], l: c[3] } : (c = B.hsla.exec(d)) ? { h: c[1], s: c[2], l: c[3], a: c[4] } : (c = B.hsv.exec(d)) ? { h: c[1], s: c[2], v: c[3] } : (c = B.hsva.exec(d)) ? { h: c[1], s: c[2], v: c[3], a: c[4] } : (c = B.hex8.exec(d)) ? { r: D(c[1]), g: D(c[2]), b: D(c[3]), a: vt(c[4]), format: b ? "name" : "hex8" } : (c = B.hex6.exec(d)) ? { r: D(c[1]), g: D(c[2]), b: D(c[3]), format: b ? "name" : "hex" } : (c = B.hex4.exec(d)) ? { r: D(c[1] + "" + c[1]), g: D(c[2] + "" + c[2]), b: D(c[3] + "" + c[3]), a: vt(c[4] + "" + c[4]), format: b ? "name" : "hex8" } : (c = B.hex3.exec(d)) ? { r: D(c[1] + "" + c[1]), g: D(c[2] + "" + c[2]), b: D(c[3] + "" + c[3]), format: b ? "name" : "hex" } : !1;
31
33
  }(r)), Me(r) == "object" && (I(r.r) && I(r.g) && I(r.b) ? (h = r.r, p = r.g, v = r.b, o = { r: 255 * k(h, 255), g: 255 * k(p, 255), b: 255 * k(v, 255) }, f = !0, l = String(r.r).substr(-1) === "%" ? "prgb" : "rgb") : I(r.h) && I(r.s) && I(r.v) ? (i = ce(r.s), s = ce(r.v), o = function(d, c, b) {
32
34
  d = 6 * k(d, 360), c = k(c, 100), b = k(b, 100);
33
- var g = Math.floor(d), y = d - g, _ = b * (1 - c), x = b * (1 - y * c), E = b * (1 - (1 - y) * c), R = g % 6, P = [b, x, _, _, E, b][R], T = [E, b, b, x, _, _][R], j = [_, _, E, b, b, x][R];
35
+ var g = Math.floor(d), y = d - g, _ = b * (1 - c), x = b * (1 - y * c), C = b * (1 - (1 - y) * c), R = g % 6, P = [b, x, _, _, C, b][R], T = [C, b, b, x, _, _][R], j = [_, _, C, b, b, x][R];
34
36
  return { r: 255 * P, g: 255 * T, b: 255 * j };
35
37
  }(r.h, i, s), f = !0, l = "hsv") : I(r.h) && I(r.s) && I(r.l) && (i = ce(r.s), a = ce(r.l), o = function(d, c, b) {
36
38
  var g, y, _;
@@ -39,8 +41,8 @@ function w(t, n) {
39
41
  }
40
42
  if (d = k(d, 360), c = k(c, 100), b = k(b, 100), c === 0) g = y = _ = b;
41
43
  else {
42
- var E = b < 0.5 ? b * (1 + c) : b + c - b * c, R = 2 * b - E;
43
- g = x(R, E, d + 1 / 3), y = x(R, E, d), _ = x(R, E, d - 1 / 3);
44
+ var C = b < 0.5 ? b * (1 + c) : b + c - b * c, R = 2 * b - C;
45
+ g = x(R, C, d + 1 / 3), y = x(R, C, d), _ = x(R, C, d - 1 / 3);
44
46
  }
45
47
  return { r: 255 * g, g: 255 * y, b: 255 * _ };
46
48
  }(r.h, i, a), f = !0, l = "hsl"), r.hasOwnProperty("a") && (u = r.a));
@@ -98,12 +100,12 @@ function dt(t, n, e, r) {
98
100
  function os(t, n) {
99
101
  n = n === 0 ? 0 : n || 10;
100
102
  var e = w(t).toHsl();
101
- return e.s -= n / 100, e.s = Ee(e.s), w(e);
103
+ return e.s -= n / 100, e.s = Ce(e.s), w(e);
102
104
  }
103
105
  function as(t, n) {
104
106
  n = n === 0 ? 0 : n || 10;
105
107
  var e = w(t).toHsl();
106
- return e.s += n / 100, e.s = Ee(e.s), w(e);
108
+ return e.s += n / 100, e.s = Ce(e.s), w(e);
107
109
  }
108
110
  function is(t) {
109
111
  return w(t).desaturate(100);
@@ -111,7 +113,7 @@ function is(t) {
111
113
  function us(t, n) {
112
114
  n = n === 0 ? 0 : n || 10;
113
115
  var e = w(t).toHsl();
114
- return e.l += n / 100, e.l = Ee(e.l), w(e);
116
+ return e.l += n / 100, e.l = Ce(e.l), w(e);
115
117
  }
116
118
  function ss(t, n) {
117
119
  n = n === 0 ? 0 : n || 10;
@@ -121,7 +123,7 @@ function ss(t, n) {
121
123
  function fs(t, n) {
122
124
  n = n === 0 ? 0 : n || 10;
123
125
  var e = w(t).toHsl();
124
- return e.l -= n / 100, e.l = Ee(e.l), w(e);
126
+ return e.l -= n / 100, e.l = Ce(e.l), w(e);
125
127
  }
126
128
  function cs(t, n) {
127
129
  var e = w(t).toHsl(), r = (e.h + n) % 360;
@@ -307,7 +309,7 @@ function k(t, n) {
307
309
  }(t);
308
310
  return t = Math.min(n, Math.max(0, parseFloat(t))), e && (t = parseInt(t * n, 10) / 100), Math.abs(t - n) < 1e-6 ? 1 : t % n / parseFloat(n);
309
311
  }
310
- function Ee(t) {
312
+ function Ce(t) {
311
313
  return Math.min(1, Math.max(0, t));
312
314
  }
313
315
  function D(t) {
@@ -329,7 +331,7 @@ var Y, ye, me, B = (ye = "[\\s|\\(]+(" + (Y = "(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+
329
331
  function I(t) {
330
332
  return !!B.CSS_UNIT.exec(t);
331
333
  }
332
- var gt, yt, mt, wt, _t, xt, jt, Ot, Mt, St, At, Et, Ct, kt, Rt, Tt, Pt, Lt, Ut, Ft, Dt, Bt, zt, Ht, Wt, $t, Nt, It, F = {}, te = {};
334
+ var gt, yt, mt, wt, _t, xt, jt, Ot, Mt, St, At, Ct, Et, kt, Rt, Tt, Pt, Lt, Ut, Ft, Dt, Bt, zt, Ht, Wt, $t, Nt, It, F = {}, te = {};
333
335
  function xu() {
334
336
  if (yt) return gt;
335
337
  yt = 1;
@@ -349,8 +351,8 @@ function le() {
349
351
  return _t = t;
350
352
  }
351
353
  function G() {
352
- if (Et) return At;
353
- Et = 1;
354
+ if (Ct) return At;
355
+ Ct = 1;
354
356
  var t = le(), n = function() {
355
357
  if (Ot) return jt;
356
358
  Ot = 1;
@@ -378,10 +380,10 @@ function G() {
378
380
  };
379
381
  }
380
382
  function H() {
381
- if (kt) return Ct;
383
+ if (kt) return Et;
382
384
  kt = 1;
383
385
  var t = Array.isArray;
384
- return Ct = t;
386
+ return Et = t;
385
387
  }
386
388
  function V() {
387
389
  return Tt ? Rt : (Tt = 1, Rt = function(t) {
@@ -449,7 +451,7 @@ function Xe() {
449
451
  };
450
452
  });
451
453
  }
452
- var rr, nr, or, ar, ir, ur, sr, fr, cr, lr, hr, pr, dr, br, vr, gr, yr, mr, wr, _r, xr, jr, Or, Mr, Sr, Ar, Er, Cr, kr, Rr, Tr, Pr, Lr, Ur, Fr, Dr, Br, zr, Hr, Wr, $r, Nr, Ir, Vr, Xr, Yr, qr, Kr, Gr, Jr, Qr, Zr, en, tn, rn, nn, on, an, un, sn, fn, cn, ln, hn, pn, dn, bn, vn, gn, yn, mn, wn, _n, xn, jn, On, Mn, Sn, An, En, Cn, kn, Rn, Tn, Pn, Ln, Un, Fn, Dn, Bn, zn, Hn, Wn, $n, Nn, In, Vn, Xn, Yn, qn, Kn, Gn, Jn, Qn, Zn, eo, to, ro, no, oo, ao, io, uo, so, fo, co, lo, ho, po, bo, vo, go, yo, mo, wo, _o, xo, jo, Oo, Mo, So, Ao, Eo, Co, ko, Ro, To, Po, Lo, Uo, Fo, Do, Bo, zo, Ho, Wo, $o, No, Io, Vo, Xo, Yo, qo, Pe, Ko, Go, Jo, Qo, Zo, ea, ta, ra, na, oa, aa, ia, ua, sa, fa, ca, la, ha, pa, da, ba, Le, va, ga, ya, ma, wa, _a, xa, ja, Oa, Ma, Sa, Aa, Ea, Ca, ka, Ra, Ta, Pa, La, Ua, Fa, Da, Ba, za, Ha, Wa, $a, Na, Ia, Va, Xa, Ya, qa, Ka, Ga, Ja, Ue = { exports: {} };
454
+ var rr, nr, or, ar, ir, ur, sr, fr, cr, lr, hr, pr, dr, br, vr, gr, yr, mr, wr, _r, xr, jr, Or, Mr, Sr, Ar, Cr, Er, kr, Rr, Tr, Pr, Lr, Ur, Fr, Dr, Br, zr, Hr, Wr, $r, Nr, Ir, Vr, Xr, Yr, qr, Kr, Gr, Jr, Qr, Zr, en, tn, rn, nn, on, an, un, sn, fn, cn, ln, hn, pn, dn, bn, vn, gn, yn, mn, wn, _n, xn, jn, On, Mn, Sn, An, Cn, En, kn, Rn, Tn, Pn, Ln, Un, Fn, Dn, Bn, zn, Hn, Wn, $n, Nn, In, Vn, Xn, Yn, qn, Kn, Gn, Jn, Qn, Zn, eo, to, ro, no, oo, ao, io, uo, so, fo, co, lo, ho, po, bo, vo, go, yo, mo, wo, _o, xo, jo, Oo, Mo, So, Ao, Co, Eo, ko, Ro, To, Po, Lo, Uo, Fo, Do, Bo, zo, Ho, Wo, $o, No, Io, Vo, Xo, Yo, qo, Pe, Ko, Go, Jo, Qo, Zo, ea, ta, ra, na, oa, aa, ia, ua, sa, fa, ca, la, ha, pa, da, ba, Le, va, ga, ya, ma, wa, _a, xa, ja, Oa, Ma, Sa, Aa, Ca, Ea, ka, Ra, Ta, Pa, La, Ua, Fa, Da, Ba, za, Ha, Wa, $a, Na, Ia, Va, Xa, Ya, qa, Ka, Ga, Ja, Ue = { exports: {} };
453
455
  function Ye() {
454
456
  return rr || (rr = 1, function(t, n) {
455
457
  var e = xu(), r = n && !n.nodeType && n, o = r && t && !t.nodeType && t, u = o && o.exports === r && e.process, i = function() {
@@ -526,7 +528,7 @@ function ue() {
526
528
  return t != null && (n == "object" || n == "function");
527
529
  });
528
530
  }
529
- function Eu() {
531
+ function Cu() {
530
532
  if (yr) return gr;
531
533
  yr = 1;
532
534
  var t = G(), n = ue();
@@ -536,10 +538,10 @@ function Eu() {
536
538
  return r == "[object Function]" || r == "[object GeneratorFunction]" || r == "[object AsyncFunction]" || r == "[object Proxy]";
537
539
  };
538
540
  }
539
- function Ce() {
541
+ function Ee() {
540
542
  if (wr) return mr;
541
543
  wr = 1;
542
- var t = Eu(), n = Ve();
544
+ var t = Cu(), n = Ve();
543
545
  return mr = function(e) {
544
546
  return e != null && n(e.length) && !t(e);
545
547
  };
@@ -547,12 +549,12 @@ function Ce() {
547
549
  function he() {
548
550
  if (xr) return _r;
549
551
  xr = 1;
550
- var t = Su(), n = gs(), e = Ce();
552
+ var t = Su(), n = gs(), e = Ee();
551
553
  return _r = function(r) {
552
554
  return e(r) ? t(r) : n(r);
553
555
  };
554
556
  }
555
- function Cu() {
557
+ function Eu() {
556
558
  if (Or) return jr;
557
559
  Or = 1;
558
560
  var t = vs(), n = he();
@@ -566,17 +568,17 @@ function ku() {
566
568
  });
567
569
  }
568
570
  function Ke() {
569
- if (kr) return Cr;
571
+ if (kr) return Er;
570
572
  kr = 1;
571
- var t = Cu(), n = function() {
572
- if (Er) return Ar;
573
- Er = 1;
573
+ var t = Eu(), n = function() {
574
+ if (Cr) return Ar;
575
+ Cr = 1;
574
576
  var e = ku();
575
577
  return Ar = function(r) {
576
578
  return typeof r == "function" ? r : e;
577
579
  };
578
580
  }();
579
- return Cr = function(e, r) {
581
+ return Er = function(e, r) {
580
582
  return e && t(e, n(r));
581
583
  };
582
584
  }
@@ -689,7 +691,7 @@ function K() {
689
691
  var t = function() {
690
692
  if (bn) return dn;
691
693
  bn = 1;
692
- var e = Eu(), r = ys(), o = ue(), u = Tu(), i = /^\[object .+?Constructor\]$/, s = Function.prototype, a = Object.prototype, f = s.toString, l = a.hasOwnProperty, h = RegExp("^" + f.call(l).replace(/[\\^$.*+?()[\]{}|]/g, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
694
+ var e = Cu(), r = ys(), o = ue(), u = Tu(), i = /^\[object .+?Constructor\]$/, s = Function.prototype, a = Object.prototype, f = s.toString, l = a.hasOwnProperty, h = RegExp("^" + f.call(l).replace(/[\\^$.*+?()[\]{}|]/g, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
693
695
  return dn = function(p) {
694
696
  return !(!o(p) || r(p)) && (e(p) ? h : i).test(u(p));
695
697
  };
@@ -727,10 +729,10 @@ function ms() {
727
729
  var s = this.has(i) && delete this.__data__[i];
728
730
  return this.size -= s ? 1 : 0, s;
729
731
  }), e = function() {
730
- if (Cn) return En;
731
- Cn = 1;
732
+ if (En) return Cn;
733
+ En = 1;
732
734
  var i = _e(), s = Object.prototype.hasOwnProperty;
733
- return En = function(a) {
735
+ return Cn = function(a) {
734
736
  var f = this.__data__;
735
737
  if (i) {
736
738
  var l = f[a];
@@ -901,8 +903,8 @@ function Pu() {
901
903
  break;
902
904
  }
903
905
  if (b) {
904
- if (!n(o, function(x, E) {
905
- if (!e(b, E) && (g === x || s(g, x, u, i, a))) return b.push(E);
906
+ if (!n(o, function(x, C) {
907
+ if (!e(b, C) && (g === x || s(g, x, u, i, a))) return b.push(C);
906
908
  })) {
907
909
  c = !1;
908
910
  break;
@@ -983,14 +985,14 @@ function Fu() {
983
985
  };
984
986
  }
985
987
  function Du() {
986
- return ko ? Co : (ko = 1, Co = function() {
988
+ return ko ? Eo : (ko = 1, Eo = function() {
987
989
  return [];
988
990
  });
989
991
  }
990
992
  function tt() {
991
993
  if (To) return Ro;
992
994
  To = 1;
993
- var t = Eo ? Ao : (Eo = 1, Ao = function(o, u) {
995
+ var t = Co ? Ao : (Co = 1, Ao = function(o, u) {
994
996
  for (var i = -1, s = o == null ? 0 : o.length, a = 0, f = []; ++i < s; ) {
995
997
  var l = o[i];
996
998
  u(l, i, o) && (f[a++] = l);
@@ -1036,8 +1038,8 @@ function ke() {
1036
1038
  return No = y;
1037
1039
  }(), u = G(), i = Tu(), s = "[object Map]", a = "[object Promise]", f = "[object Set]", l = "[object WeakMap]", h = "[object DataView]", p = i(t), v = i(n), d = i(e), c = i(r), b = i(o), g = u;
1038
1040
  return (t && g(new t(new ArrayBuffer(1))) != h || n && g(new n()) != s || e && g(e.resolve()) != a || r && g(new r()) != f || o && g(new o()) != l) && (g = function(y) {
1039
- var _ = u(y), x = _ == "[object Object]" ? y.constructor : void 0, E = x ? i(x) : "";
1040
- if (E) switch (E) {
1041
+ var _ = u(y), x = _ == "[object Object]" ? y.constructor : void 0, C = x ? i(x) : "";
1042
+ if (C) switch (C) {
1041
1043
  case p:
1042
1044
  return h;
1043
1045
  case v:
@@ -1060,10 +1062,10 @@ function xs() {
1060
1062
  Fo = 1;
1061
1063
  var p = Bu(), v = Object.prototype.hasOwnProperty;
1062
1064
  return Uo = function(d, c, b, g, y, _) {
1063
- var x = 1 & b, E = p(d), R = E.length;
1065
+ var x = 1 & b, C = p(d), R = C.length;
1064
1066
  if (R != p(c).length && !x) return !1;
1065
1067
  for (var P = R; P--; ) {
1066
- var T = E[P];
1068
+ var T = C[P];
1067
1069
  if (!(x ? T in c : v.call(c, T))) return !1;
1068
1070
  }
1069
1071
  var j = _.get(d), S = _.get(c);
@@ -1071,7 +1073,7 @@ function xs() {
1071
1073
  var m = !0;
1072
1074
  _.set(d, c), _.set(c, d);
1073
1075
  for (var M = x; ++P < R; ) {
1074
- var A = d[T = E[P]], N = c[T];
1076
+ var A = d[T = C[P]], N = c[T];
1075
1077
  if (g) var W = x ? g(N, A, T, c, d, _) : g(A, N, T, d, c, _);
1076
1078
  if (!(W === void 0 ? A === N || y(A, N, b, g, _) : W)) {
1077
1079
  m = !1;
@@ -1080,14 +1082,14 @@ function xs() {
1080
1082
  M || (M = T == "constructor");
1081
1083
  }
1082
1084
  if (m && !M) {
1083
- var L = d.constructor, C = c.constructor;
1084
- L == C || !("constructor" in d) || !("constructor" in c) || typeof L == "function" && L instanceof L && typeof C == "function" && C instanceof C || (m = !1);
1085
+ var L = d.constructor, E = c.constructor;
1086
+ L == E || !("constructor" in d) || !("constructor" in c) || typeof L == "function" && L instanceof L && typeof E == "function" && E instanceof E || (m = !1);
1085
1087
  }
1086
1088
  return _.delete(d), _.delete(c), m;
1087
1089
  };
1088
1090
  }(), o = ke(), u = H(), i = Ie(), s = Mu(), a = "[object Arguments]", f = "[object Array]", l = "[object Object]", h = Object.prototype.hasOwnProperty;
1089
1091
  return Yo = function(p, v, d, c, b, g) {
1090
- var y = u(p), _ = u(v), x = y ? f : o(p), E = _ ? f : o(v), R = (x = x == a ? l : x) == l, P = (E = E == a ? l : E) == l, T = x == E;
1092
+ var y = u(p), _ = u(v), x = y ? f : o(p), C = _ ? f : o(v), R = (x = x == a ? l : x) == l, P = (C = C == a ? l : C) == l, T = x == C;
1091
1093
  if (T && i(p)) {
1092
1094
  if (!i(v)) return !1;
1093
1095
  y = !0, R = !1;
@@ -1274,13 +1276,13 @@ function Nu() {
1274
1276
  function Ss() {
1275
1277
  if (Ta) return Ra;
1276
1278
  Ta = 1;
1277
- var t = Ea ? Aa : (Ea = 1, Aa = function(e, r) {
1279
+ var t = Ca ? Aa : (Ca = 1, Aa = function(e, r) {
1278
1280
  return e != null && r in Object(e);
1279
1281
  }), n = function() {
1280
- if (ka) return Ca;
1282
+ if (ka) return Ea;
1281
1283
  ka = 1;
1282
1284
  var e = $u(), r = ju(), o = H(), u = Ou(), i = Ve(), s = Re();
1283
- return Ca = function(a, f, l) {
1285
+ return Ea = function(a, f, l) {
1284
1286
  for (var h = -1, p = (f = e(f, a)).length, v = !1; ++h < p; ) {
1285
1287
  var d = s(f[h]);
1286
1288
  if (!(v = a != null && l(a, d))) break;
@@ -1312,7 +1314,7 @@ function As() {
1312
1314
  };
1313
1315
  };
1314
1316
  }
1315
- function Es() {
1317
+ function Cs() {
1316
1318
  if (Ha) return za;
1317
1319
  Ha = 1;
1318
1320
  var t = Fa ? Ua : (Fa = 1, Ua = function(o) {
@@ -1333,13 +1335,13 @@ function Es() {
1333
1335
  return e(o) ? t(r(o)) : n(o);
1334
1336
  };
1335
1337
  }
1336
- function Cs() {
1338
+ function Es() {
1337
1339
  if (Xa) return Va;
1338
1340
  Xa = 1;
1339
- var t = Cu(), n = function() {
1341
+ var t = Eu(), n = function() {
1340
1342
  if (Ia) return Na;
1341
1343
  Ia = 1;
1342
- var e = Ce();
1344
+ var e = Ee();
1343
1345
  return Na = function(r, o) {
1344
1346
  return function(u, i) {
1345
1347
  if (u == null) return u;
@@ -1357,14 +1359,14 @@ function ks() {
1357
1359
  var t = Ru(), n = function() {
1358
1360
  if ($a) return Wa;
1359
1361
  $a = 1;
1360
- var o = js(), u = As(), i = ku(), s = H(), a = Es();
1362
+ var o = js(), u = As(), i = ku(), s = H(), a = Cs();
1361
1363
  return Wa = function(f) {
1362
1364
  return typeof f == "function" ? f : f == null ? i : typeof f == "object" ? s(f) ? u(f[0], f[1]) : o(f) : a(f);
1363
1365
  };
1364
1366
  }(), e = function() {
1365
1367
  if (qa) return Ya;
1366
1368
  qa = 1;
1367
- var o = Cs(), u = Ce();
1369
+ var o = Es(), u = Ee();
1368
1370
  return Ya = function(i, s) {
1369
1371
  var a = -1, f = u(i) ? Array(i.length) : [];
1370
1372
  return o(i, function(l, h, p) {
@@ -1474,12 +1476,12 @@ function Ts() {
1474
1476
  function Fe() {
1475
1477
  if (bi) return di;
1476
1478
  bi = 1;
1477
- var t = Su(), n = Ts(), e = Ce();
1479
+ var t = Su(), n = Ts(), e = Ee();
1478
1480
  return di = function(r) {
1479
1481
  return e(r) ? t(r, !0) : n(r);
1480
1482
  };
1481
1483
  }
1482
- var yi, mi, wi, _i, xi, ji, Oi, Mi, Si, Ai, Ei, Ci, ki, Ri, Ti, Pi, Li, Ui, Fi, Di, Bi, zi, Hi, Wi, $i, Ni, Ii, Vi, Xi, Yi, qi, Ki, Gi, Ji, Qi, Zi, eu, De, tu, ru, nu, ou, Be = { exports: {} };
1484
+ var yi, mi, wi, _i, xi, ji, Oi, Mi, Si, Ai, Ci, Ei, ki, Ri, Ti, Pi, Li, Ui, Fi, Di, Bi, zi, Hi, Wi, $i, Ni, Ii, Vi, Xi, Yi, qi, Ki, Gi, Ji, Qi, Zi, eu, De, tu, ru, nu, ou, Be = { exports: {} };
1483
1485
  function au() {
1484
1486
  if (Oi) return ji;
1485
1487
  Oi = 1;
@@ -1637,10 +1639,10 @@ function Ds() {
1637
1639
  };
1638
1640
  }(), u = (yi || (yi = 1, function(S, m) {
1639
1641
  var M = $(), A = m && !m.nodeType && m, N = A && S && !S.nodeType && S, W = N && N.exports === A ? M.Buffer : void 0, L = W ? W.allocUnsafe : void 0;
1640
- S.exports = function(C, Q) {
1641
- if (Q) return C.slice();
1642
- var q = C.length, be = L ? L(q) : new C.constructor(q);
1643
- return C.copy(be), be;
1642
+ S.exports = function(E, Q) {
1643
+ if (Q) return E.slice();
1644
+ var q = E.length, be = L ? L(q) : new E.constructor(q);
1645
+ return E.copy(be), be;
1644
1646
  };
1645
1647
  }(Be, Be.exports)), Be.exports), i = wi ? mi : (wi = 1, mi = function(S, m) {
1646
1648
  var M = -1, A = S.length;
@@ -1661,50 +1663,50 @@ function Ds() {
1661
1663
  return S(M, m(M), A);
1662
1664
  };
1663
1665
  }(), f = Bu(), l = function() {
1664
- if (Ei) return Ai;
1665
- Ei = 1;
1666
+ if (Ci) return Ai;
1667
+ Ci = 1;
1666
1668
  var S = Fu(), m = au(), M = Fe();
1667
1669
  return Ai = function(A) {
1668
1670
  return S(A, M, m);
1669
1671
  };
1670
1672
  }(), h = ke(), p = function() {
1671
- if (ki) return Ci;
1673
+ if (ki) return Ei;
1672
1674
  ki = 1;
1673
1675
  var S = Object.prototype.hasOwnProperty;
1674
- return Ci = function(m) {
1676
+ return Ei = function(m) {
1675
1677
  var M = m.length, A = new m.constructor(M);
1676
1678
  return M && typeof m[0] == "string" && S.call(m, "index") && (A.index = m.index, A.input = m.input), A;
1677
1679
  };
1678
- }(), v = Ps(), d = Ls(), c = H(), b = Ie(), g = Us(), y = ue(), _ = Fs(), x = he(), E = Fe(), R = "[object Arguments]", P = "[object Function]", T = "[object Object]", j = {};
1680
+ }(), v = Ps(), d = Ls(), c = H(), b = Ie(), g = Us(), y = ue(), _ = Fs(), x = he(), C = Fe(), R = "[object Arguments]", P = "[object Function]", T = "[object Object]", j = {};
1679
1681
  return j[R] = j["[object Array]"] = j["[object ArrayBuffer]"] = j["[object DataView]"] = j["[object Boolean]"] = j["[object Date]"] = j["[object Float32Array]"] = j["[object Float64Array]"] = j["[object Int8Array]"] = j["[object Int16Array]"] = j["[object Int32Array]"] = j["[object Map]"] = j["[object Number]"] = j[T] = j["[object RegExp]"] = j["[object Set]"] = j["[object String]"] = j["[object Symbol]"] = j["[object Uint8Array]"] = j["[object Uint8ClampedArray]"] = j["[object Uint16Array]"] = j["[object Uint32Array]"] = !0, j["[object Error]"] = j[P] = j["[object WeakMap]"] = !1, De = function S(m, M, A, N, W, L) {
1680
- var C, Q = 1 & M, q = 2 & M, be = 4 & M;
1681
- if (A && (C = W ? A(m, N, W, L) : A(m)), C !== void 0) return C;
1682
+ var E, Q = 1 & M, q = 2 & M, be = 4 & M;
1683
+ if (A && (E = W ? A(m, N, W, L) : A(m)), E !== void 0) return E;
1682
1684
  if (!y(m)) return m;
1683
1685
  var at = c(m);
1684
1686
  if (at) {
1685
- if (C = p(m), !Q) return i(m, C);
1687
+ if (E = p(m), !Q) return i(m, E);
1686
1688
  } else {
1687
1689
  var Z = h(m), it = Z == P || Z == "[object GeneratorFunction]";
1688
1690
  if (b(m)) return u(m, Q);
1689
1691
  if (Z == T || Z == R || it && !W) {
1690
- if (C = q || it ? {} : d(m), !Q) return q ? a(m, o(C, m)) : s(m, r(C, m));
1692
+ if (E = q || it ? {} : d(m), !Q) return q ? a(m, o(E, m)) : s(m, r(E, m));
1691
1693
  } else {
1692
1694
  if (!j[Z]) return W ? m : {};
1693
- C = v(m, Z, Q);
1695
+ E = v(m, Z, Q);
1694
1696
  }
1695
1697
  }
1696
1698
  L || (L = new t());
1697
1699
  var ut = L.get(m);
1698
1700
  if (ut) return ut;
1699
- L.set(m, C), _(m) ? m.forEach(function(X) {
1700
- C.add(S(X, M, A, X, m, L));
1701
+ L.set(m, E), _(m) ? m.forEach(function(X) {
1702
+ E.add(S(X, M, A, X, m, L));
1701
1703
  }) : g(m) && m.forEach(function(X, ee) {
1702
- C.set(ee, S(X, M, A, ee, m, L));
1704
+ E.set(ee, S(X, M, A, ee, m, L));
1703
1705
  });
1704
- var st = at ? void 0 : (be ? q ? l : f : q ? E : x)(m);
1706
+ var st = at ? void 0 : (be ? q ? l : f : q ? C : x)(m);
1705
1707
  return n(st || m, function(X, ee) {
1706
- st && (X = m[ee = X]), e(C, ee, S(X, M, A, ee, m, L));
1707
- }), C;
1708
+ st && (X = m[ee = X]), e(E, ee, S(X, M, A, ee, m, L));
1709
+ }), E;
1708
1710
  }, De;
1709
1711
  }
1710
1712
  function Bs() {
@@ -1855,9 +1857,9 @@ var fu, cu, He = {}, Ws = function() {
1855
1857
  var b = {};
1856
1858
  return (0, h.default)(c, function(g, y) {
1857
1859
  var _ = {};
1858
- (0, h.default)(g, function(x, E) {
1859
- var R = v[E];
1860
- R ? _ = p({}, _, R(x)) : _[E] = x;
1860
+ (0, h.default)(g, function(x, C) {
1861
+ var R = v[C];
1862
+ R ? _ = p({}, _, R(x)) : _[C] = x;
1861
1863
  }), b[y] = _;
1862
1864
  }), b;
1863
1865
  };
@@ -1938,8 +1940,8 @@ var Vs = function() {
1938
1940
  var x = void 0;
1939
1941
  if (x = _ < 0 ? 0 : _ > c ? 1 : Math.round(100 * _ / c) / 100, l.a !== x) return { h: l.h, s: l.s, l: l.l, a: x, source: "rgb" };
1940
1942
  } else {
1941
- var E = void 0;
1942
- if (p !== (E = y < 0 ? 0 : y > d ? 1 : Math.round(100 * y / d) / 100)) return { h: l.h, s: l.s, l: l.l, a: E, source: "rgb" };
1943
+ var C = void 0;
1944
+ if (p !== (C = y < 0 ? 0 : y > d ? 1 : Math.round(100 * y / d) / 100)) return { h: l.h, s: l.s, l: l.l, a: C, source: "rgb" };
1943
1945
  }
1944
1946
  return null;
1945
1947
  }(s, r.props.hsl, r.props.direction, r.props.a, r.container);
@@ -2389,8 +2391,8 @@ class yf extends (pe || de) {
2389
2391
  const yu = (t, n = null) => {
2390
2392
  const e = t.hex ? w(t.hex) : w(t || "transparent"), r = e.toHsl(), o = e.toHsv(), u = e.toRgb(), i = e.toHex();
2391
2393
  return r.s === 0 && (r.h = n ?? 0, o.h = n ?? 0), { hsl: r, hex: "#" + i, rgb: u, hsv: o, source: t.source };
2392
- }, jf = Ku((t) => {
2393
- const { selectedColor: n, onColorChange: e, renderers: r, disableAlpha: o = !1, style: u = Zu.EmptyCssProperties, ...i } = t, s = es(), [a, f] = ft(() => yu(n)), [l, h] = ft(a.hsl.h ?? 0), p = ct((c) => {
2394
+ }, Mf = Ku((t) => {
2395
+ const { selectedColor: n, onColorChange: e, renderers: r, disableAlpha: o = !1, style: u = ts.EmptyCssProperties, ...i } = t, s = Ju(), [a, f] = ft(() => yu(n)), [l, h] = ft(a.hsl.h ?? 0), p = ct((c) => {
2394
2396
  let b = yu(c, l);
2395
2397
  return h(b.hsl.h ?? 0), f(b), b;
2396
2398
  }, [l]), v = ct((c) => {
@@ -2401,10 +2403,10 @@ const yu = (t, n = null) => {
2401
2403
  p(n);
2402
2404
  }, [n, p]);
2403
2405
  const d = U("div", { style: { position: "relative", minHeight: "10px", maxHeight: "10px", width: "100%" }, children: U(Vs, { style: { radius: "2px", shadow: "inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)" }, rgb: a.rgb, hsl: a.hsl, renderers: r, onChange: v }) });
2404
- return ie("div", { style: { display: "flex", flexDirection: "column", ...u }, ...i, children: [U("div", { style: { width: "100%", flex: "1 1 100%", position: "relative", overflow: "hidden" }, children: U(yf, { style: { borderRadius: "3px", boxShadow: "inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)" }, hsl: a.hsl, hsv: a.hsv, onChange: v }) }), ie("div", { style: { marginTop: "4px", display: "flex", gap: "4px" }, children: [ie("div", { style: { flex: "1", display: "flex", flexDirection: o ? "row" : "column", justifyContent: "space-between", alignItems: "center" }, children: [U("div", { style: { position: "relative", minHeight: "10px", maxHeight: "10px", width: "100%" }, children: U(Gs, { style: { radius: "2px", shadow: "inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)" }, hsl: a.hsl, onChange: v }) }), o ? null : d] }), ie("div", { style: { minWidth: "24px", maxWidth: "24px", minHeight: "24px", maxHeight: "24px", position: "relative", borderRadius: "1px", overflow: "hidden" }, children: [U(ts, { grey: s.palette.text.icon ?? s.palette.action.active }), U("div", { style: { position: "absolute", height: "100%", width: "100%", background: `rgba(${a.rgb.r},${a.rgb.g},${a.rgb.b},${o ? 1 : a.rgb.a})`, boxShadow: "inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)" } })] })] }), U(Ju, { sx: { marginBottom: "4px", "& label": { fontFamily: (c) => `${c.typography.fontFamily} !important`, color: (c) => `${c.palette.text.secondary} !important` }, "& *": { fontFamily: (c) => `${c.typography.fontFamily} !important`, userSelect: "none" }, "& input": { paddingLeft: (c) => `${c.spacing(0.5)} !important`, paddingRight: (c) => `${c.spacing(0.5)} !important`, outline: "none", boxSizing: "border-box", width: "100% !important", textAlign: "center" } }, children: U(gf, { rgb: a.rgb, hsl: a.hsl, hex: a.hex, disableAlpha: o, onChange: v }) })] });
2406
+ return ie("div", { style: { display: "flex", flexDirection: "column", ...u }, ...i, children: [U("div", { style: { width: "100%", flex: "1 1 100%", position: "relative", overflow: "hidden" }, children: U(yf, { style: { borderRadius: "3px", boxShadow: "inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)" }, hsl: a.hsl, hsv: a.hsv, onChange: v }) }), ie("div", { style: { marginTop: "4px", display: "flex", gap: "4px" }, children: [ie("div", { style: { flex: "1", display: "flex", flexDirection: o ? "row" : "column", justifyContent: "space-between", alignItems: "center" }, children: [U("div", { style: { position: "relative", minHeight: "10px", maxHeight: "10px", width: "100%" }, children: U(Gs, { style: { radius: "2px", shadow: "inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)" }, hsl: a.hsl, onChange: v }) }), o ? null : d] }), ie("div", { style: { minWidth: "24px", maxWidth: "24px", minHeight: "24px", maxHeight: "24px", position: "relative", borderRadius: "1px", overflow: "hidden" }, children: [U(es, { grey: s.palette.text.icon ?? s.palette.action.active }), U("div", { style: { position: "absolute", height: "100%", width: "100%", background: `rgba(${a.rgb.r},${a.rgb.g},${a.rgb.b},${o ? 1 : a.rgb.a})`, boxShadow: "inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)" } })] })] }), U(Qu, { sx: { marginBottom: "4px", "& label": { fontFamily: (c) => `${c.typography.fontFamily} !important`, color: (c) => `${c.palette.text.secondary} !important` }, "& *": { fontFamily: (c) => `${c.typography.fontFamily} !important`, userSelect: "none" }, "& input": { paddingLeft: (c) => `${c.spacing(0.5)} !important`, paddingRight: (c) => `${c.spacing(0.5)} !important`, outline: "none", boxSizing: "border-box", width: "100% !important", textAlign: "center" } }, children: U(gf, { rgb: a.rgb, hsl: a.hsl, hex: a.hex, disableAlpha: o, onChange: v }) })] });
2405
2407
  });
2406
2408
  export {
2407
- jf as CustomColorPanel,
2408
- jf as default,
2409
+ Mf as CustomColorPanel,
2410
+ Mf as default,
2409
2411
  yu as toState
2410
2412
  };
@@ -0,0 +1,53 @@
1
+ import { jsx as l } from "react/jsx-runtime";
2
+ import { memo as M, useMemo as E, useState as h, useCallback as S } from "react";
3
+ import { alpha as C, getOverlayAlpha as O } from "@mui/material/styles";
4
+ import { Box as V, FormControl as $, TextField as j } from "@mui/material";
5
+ import { useCallbackRef as m } from "@sheetxl/utils-react";
6
+ import { OptionsDialog as z } from "@sheetxl/utils-mui";
7
+ /**
8
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.22
9
+ *
10
+ * (C) 2025-present SheetXL Inc. & Michael T. Ford
11
+ * License: The license can be found at https://www.sheetxl.com/license.
12
+ */
13
+ const A = ["Ok", "Cancel"], W = M((F) => {
14
+ const { initialComments: k = null, onUpdateComments: u, context: y, onOption: d, onValidateOption: p, onDone: r, options: g = A, defaultOption: c = g?.[0], cancelOption: s = "Cancel", sx: T, ...b } = F, f = E(() => {
15
+ const t = k ?? y?.()?.getComments();
16
+ let o = "";
17
+ if (t && t.content && t.content.runs) {
18
+ const e = t.content.runs;
19
+ for (let i = 0; i < e.length; i++) {
20
+ const a = e[i];
21
+ o += a?.text;
22
+ }
23
+ }
24
+ return o;
25
+ }, []), [n, v] = h(f), [w, D] = h(!1), x = S(async (t, o) => null, []), P = m(async (t) => {
26
+ const o = n === "" ? [] : n.split(`
27
+ `);
28
+ if (t !== s) {
29
+ const e = [];
30
+ for (let a = 0; a < o.length; a++) e.push({ text: o[a] });
31
+ u?.({ content: { runs: e } });
32
+ }
33
+ d?.(t, t === s, t === c), r?.();
34
+ }, [n, u, r, d, c, s]), I = m((t) => {
35
+ v(t.target.value), x(t.target.value, null);
36
+ }, [p]), B = m(async (t) => {
37
+ let o = await Promise.resolve(p?.(t));
38
+ try {
39
+ o !== !1 && (o = await x(n, t));
40
+ } catch {
41
+ }
42
+ return o ?? !0;
43
+ }, [p, n]);
44
+ return l(z, { title: (f ? "Edit" : "Insert") + " Comments", options: g, onDone: r, onOption: (t) => P(t), onValidateOption: B, defaultOption: c, cancelOption: s, autoFocusSel: ".autoFocus", sx: { width: "480px", ...T }, ...b, children: l(V, { sx: { paddingTop: (t) => t.spacing(1), paddingBottom: (t) => t.spacing(0), rowGap: (t) => t.spacing(1), display: "flex", flexDirection: "column" }, children: l($, { sx: { paddingTop: (t) => t.spacing(1.5), minWidth: 135, width: "100%" }, size: "small", children: l(j, { label: "Comments", placeholder: "Enter a comment.", onFocus: (t) => {
45
+ w || t.target?.select(), D(!0);
46
+ }, sx: { "& .MuiFormHelperText-root": { marginTop: (t) => t.spacing(0.5) } }, InputLabelProps: { shrink: !0 }, InputProps: { inputProps: { className: "autoFocus", spellCheck: !1, autoComplete: "off", sx: { paddingTop: (t) => t.spacing(1.25), paddingBottom: (t) => t.spacing(0.75), backgroundImage: `linear-gradient(${C("#fff", O(5))}, ${C("#fff", O(5))})` } } }, value: n, onChange: I, onContextMenu: (t) => {
47
+ t.stopPropagation();
48
+ } }) }) }) });
49
+ });
50
+ export {
51
+ W as CommentsDialog,
52
+ W as default
53
+ };
@@ -0,0 +1,49 @@
1
+ import { jsx as o, jsxs as E } from "react/jsx-runtime";
2
+ import { memo as j, useMemo as O, useState as m, useCallback as b } from "react";
3
+ import { alpha as l, getOverlayAlpha as p } from "@mui/material/styles";
4
+ import { Box as S, FormControl as D, TextField as F } from "@mui/material";
5
+ import { useCallbackRef as f } from "@sheetxl/utils-react";
6
+ import { OptionsDialog as U } from "@sheetxl/utils-mui";
7
+ /**
8
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.22
9
+ *
10
+ * (C) 2025-present SheetXL Inc. & Michael T. Ford
11
+ * License: The license can be found at https://www.sheetxl.com/license.
12
+ */
13
+ const V = ["Ok", "Cancel"], Q = j((P) => {
14
+ const { initialHyperlink: t = null, initialDisplay: v = null, onUpdateHyperlink: x, context: s, onOption: h, onValidateOption: r, onDone: d, options: y = V, defaultOption: c = y?.[0], cancelOption: i = "Cancel", sx: H, ...I } = P, w = O(() => (t ?? s?.()?.getHyperlink()) !== null, []), k = O(() => {
15
+ let e = null, n = null;
16
+ t && (typeof t == "string" ? n = t : e = t);
17
+ const g = e ?? s?.()?.getHyperlink();
18
+ return { address: n ?? g?.getAddress() ?? "", textToDisplay: g?.getDisplayText() ?? "" };
19
+ }, [t, s]), [a, M] = m(k.address), [u, B] = m(() => {
20
+ const e = s?.().toTextUnformatted() ?? v;
21
+ return e === k.address ? "" : e;
22
+ }), [$, T] = m(!1), A = b((e) => {
23
+ B(e.target.value);
24
+ }, []), C = b(async (e, n) => null, []), L = f(async (e) => {
25
+ e !== i && x?.(a === "" ? null : { address: a }, u), h?.(e, e === i, e === c), d?.();
26
+ }, [a, u, x, d, h, c, i]), W = f((e) => {
27
+ M(e.target.value), C(e.target.value, null);
28
+ }, [r]), z = f(async (e) => {
29
+ let n = await Promise.resolve(r?.(e));
30
+ try {
31
+ n !== !1 && (n = await C(a, e));
32
+ } catch {
33
+ }
34
+ return n ?? !0;
35
+ }, [r]);
36
+ return o(U, { title: (w ? "Edit" : "Insert") + " Link", options: y, onDone: d, onOption: (e) => L(e), onValidateOption: z, defaultOption: c, cancelOption: i, autoFocusSel: ".autoFocus", sx: { width: "480px", ...H }, ...I, children: E(S, { sx: { paddingTop: (e) => e.spacing(1), paddingBottom: (e) => e.spacing(0), rowGap: (e) => e.spacing(1), display: "flex", flexDirection: "column" }, children: [o(D, { sx: { paddingTop: (e) => e.spacing(1.5), minWidth: 135, width: "100%" }, size: "small", children: o(F, { label: "Address", placeholder: "Enter a url or cell reference.", onFocus: (e) => {
37
+ $ || e.target?.select(), T(!0);
38
+ }, sx: { "& .MuiFormHelperText-root": { marginTop: (e) => e.spacing(0.5) } }, InputLabelProps: { shrink: !0 }, InputProps: { inputProps: { className: "autoFocus", spellCheck: !1, autoComplete: "off", sx: { paddingTop: (e) => e.spacing(1.25), paddingBottom: (e) => e.spacing(0.75), backgroundImage: `linear-gradient(${l("#fff", p(5))}, ${l("#fff", p(5))})` } } }, value: a, onChange: W, onContextMenu: (e) => {
39
+ e.stopPropagation();
40
+ } }) }), o(D, { sx: { paddingTop: (e) => e.spacing(1.5), minWidth: 135, width: "100%" }, size: "small", children: o(F, { label: "Display Text", placeholder: a?.startsWith("#") ? a.substring(1) : a, onFocus: () => {
41
+ T(!0);
42
+ }, sx: { "& .MuiFormHelperText-root": { marginTop: (e) => e.spacing(0.5) } }, InputLabelProps: { shrink: !0 }, InputProps: { inputProps: { spellCheck: !1, autoComplete: "off", sx: { paddingTop: (e) => e.spacing(1.25), paddingBottom: (e) => e.spacing(0.75), backgroundImage: `linear-gradient(${l("#fff", p(5))}, ${l("#fff", p(5))})` } } }, value: u, onChange: A, onContextMenu: (e) => {
43
+ e.stopPropagation();
44
+ } }) })] }) });
45
+ });
46
+ export {
47
+ Q as HyperlinkDialog,
48
+ Q as default
49
+ };