@sheetxl/react 0.8.0-beta.21 → 0.8.0-beta.23

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 (79) hide show
  1. package/browser/esm/{Dl0ye0MfTml4mjhA.mjs → 2-8Z3hKcjFc9IUm_.mjs} +3 -3
  2. package/browser/esm/{fHDciYUZvXpLzoID.mjs → B1qMCa-WDnmPYR_C.mjs} +2 -2
  3. package/browser/esm/{zTaXN_1rvsoWg94m.mjs → B1rKvYmr4ynvDkqM.mjs} +3 -3
  4. package/browser/esm/B7RYx03rC74aIduo.mjs +264 -0
  5. package/browser/esm/{C2HjD-DbaqXq93R7.mjs → BG96UT5-ooOuigD0.mjs} +1 -1
  6. package/browser/esm/{BQur1iFrng9Y4kh4.mjs → BHukFXtx1rpfvfIy.mjs} +1 -1
  7. package/browser/esm/{BjnWnPjhT1QFkbUC.mjs → BN7pckCvCRZMPCmK.mjs} +7 -7
  8. package/browser/esm/{BzCq_Z7J2qQlY4Dp.mjs → BklsD3lkZGRSwAFi.mjs} +1 -1
  9. package/browser/esm/{CdE8JeJkTtdh5qqp.mjs → C-eTPeTwXQoqn3Lb.mjs} +2 -2
  10. package/browser/esm/{CA6w64diOtRCgr4n.mjs → C9wgyCKVT4rwQMSD.mjs} +1 -1
  11. package/browser/esm/{DG1f60gvSkz8Y3qb.mjs → CD5gjg2DVLsy6h33.mjs} +6 -6
  12. package/browser/esm/{DL2WZkJdK1lZfpJo.mjs → CEtZlL4v4JU0TDVR.mjs} +122 -122
  13. package/browser/esm/{6lfBozPNyWlFBEDn.mjs → CGEyv-QdxMuQmLqk.mjs} +1 -1
  14. package/browser/esm/{CkYId3pjG9v3XZM2.mjs → CLD7Vob5oUran-l0.mjs} +1 -1
  15. package/browser/esm/{B7TCFLHs7nnOgLMi.mjs → CXJmpmqTkVe25Ita.mjs} +2 -2
  16. package/browser/esm/{mOYnwl3MMod-yX7a.mjs → CmYMKPG-TaW2dJPu.mjs} +1 -1
  17. package/browser/esm/{_T8e_9xhVAagwkPD.mjs → CruGvs0fdtWWO_Di.mjs} +1 -1
  18. package/browser/esm/{Co65nK3fyBcyVzrS.mjs → Cw3PQMs1RDxzIo35.mjs} +2 -2
  19. package/browser/esm/{C46qV9hBGqlz6_Kt.mjs → D5r5ejlRpFFXN6TK.mjs} +4 -4
  20. package/browser/esm/{C9dHNoiKtX9PLY1g.mjs → D952mmmww4cYPatc.mjs} +1 -1
  21. package/browser/esm/{BwMC6jAg2neI4LTH.mjs → DQ5DeFNj_0mj6QMd.mjs} +1 -1
  22. package/browser/esm/{CPwcEeQtvkrESNEy.mjs → DSvlk_YzOev20rgN.mjs} +173 -160
  23. package/browser/esm/{k1IvXgw5-153QQUo.mjs → DedLmnV_HajYHYSM.mjs} +2 -2
  24. package/browser/esm/{CCL3pFmdsuwahoCR.mjs → G6Ek0k1QC1pUHvPd.mjs} +1 -1
  25. package/browser/esm/{CHgyrBEiFmspcFXV.mjs → OPWkc7t367MwVsVU.mjs} +1 -1
  26. package/browser/esm/chart.mjs +11 -11
  27. package/browser/esm/control.mjs +16 -16
  28. package/browser/esm/group.mjs +29 -29
  29. package/browser/esm/index.mjs +6524 -6512
  30. package/browser/esm/note.mjs +10 -10
  31. package/browser/esm/picture.mjs +2 -2
  32. package/browser/esm/shape.mjs +2 -2
  33. package/browser/esm/slicer.mjs +55 -50
  34. package/node/esm/{fM9xnrz0LJWdndYE.mjs → B5ae_WW6vAz2jOsn.mjs} +1 -1
  35. package/node/esm/{JrDkDzP0l4TgHusH.mjs → BD04OJgRWKiE2W1H.mjs} +1 -1
  36. package/node/esm/{uzlKB6H0b-ol8pDK.mjs → BGLOvRRJr4nt8QdO.mjs} +2 -2
  37. package/node/esm/{B2a1mRx9B8XMRd8H.mjs → BKrvkWuGTMdkvdy6.mjs} +1 -1
  38. package/node/esm/{CdKkuM4Yy04LbhRL.mjs → BMWwIbesFn8e6-Ov.mjs} +1 -1
  39. package/node/esm/{BBBfGP0lLhBFoR9F.mjs → BhgjRcXOyNKBdqUW.mjs} +5 -5
  40. package/node/esm/{DtrPF3bSD4CZC5VG.mjs → Bv0fGxNecKUr_qYS.mjs} +1 -1
  41. package/node/esm/{Mq8a4csdTfwY5CnZ.mjs → CF5ztfx05vyEMEub.mjs} +1 -1
  42. package/node/esm/{CGEbcsNJ40cYQEWX.mjs → CeSZX96RPPjn29Hw.mjs} +2 -2
  43. package/node/esm/{Bzuh8HcJcFD2dYTY.mjs → CeuVkQpY8O4nZG-k.mjs} +2 -2
  44. package/node/esm/{BQpm93aEyzN5TiU6.mjs → Csl959_HnUC4Y06N.mjs} +1 -1
  45. package/node/esm/{B4qJFO-8Vml8JbaC.mjs → Cx16BErZDzlQEXH_.mjs} +2 -2
  46. package/node/esm/{Df-nWyFJwXaVd79x.mjs → D8mwVRSclIFn5SVM.mjs} +80 -78
  47. package/node/esm/{COg8aOu0d67g_Pg5.mjs → DJyNfqgeIlJ6lOHS.mjs} +1 -1
  48. package/node/esm/{cgqViNUwnlIX8-UW.mjs → DL2RKBB2PXzdJyx_.mjs} +4 -4
  49. package/node/esm/{CNYzecnb2TInTI8p.mjs → DmHHRlyfyFWj6wvW.mjs} +1 -1
  50. package/node/esm/{8PerdW56-NyRf0pg.mjs → VFXZqkIvB9MDE2Ea.mjs} +1 -1
  51. package/node/esm/{tRhXTPxocmY7ZY3z.mjs → YC2O0ix33xKY0ShQ.mjs} +12 -12
  52. package/node/esm/chart.mjs +19 -19
  53. package/node/esm/control.mjs +16 -16
  54. package/node/esm/group.mjs +27 -27
  55. package/node/esm/{EXPN4LM0alUK5Zw7.mjs → iMUcM8KW4HIW2Ksm.mjs} +1 -1
  56. package/node/esm/index.mjs +5598 -5585
  57. package/node/esm/{BadjRr_jKKGvmEW-.mjs → k3c-0DQ1fifSFOnO.mjs} +1 -1
  58. package/node/esm/note.mjs +10 -10
  59. package/node/esm/picture.mjs +175 -162
  60. package/node/esm/shape.mjs +164 -164
  61. package/node/esm/slicer.mjs +100 -95
  62. package/node/esm/{CD1OBtF4vEthYy6e.mjs → vYeFE_eUMRqsgnkd.mjs} +1 -1
  63. package/package.json +7 -7
  64. package/types/src/cell/CornerTriangle.d.ts +2 -1
  65. package/types/src/editor/SheetCellEditorLayer.d.ts +0 -5
  66. package/types/src/editor/formulaPresentation.d.ts +4 -3
  67. package/types/src/movable/IMovableArea.d.ts +11 -0
  68. package/types/src/movable/MovableLayer.d.ts +1 -1
  69. package/types/src/sheet/IWorksheetElement.d.ts +13 -4
  70. package/types/src/theme/ExplicitTokens.d.ts +18 -0
  71. package/types/src/theme/GridColorSchemeContext.d.ts +8 -0
  72. package/types/src/theme/ThemeRootStyles.d.ts +31 -0
  73. package/types/src/theme/buildTokensCSS.d.ts +15 -0
  74. package/types/src/theme/index.d.ts +2 -4
  75. package/types/src/theme/useAppColorScheme.d.ts +4 -1
  76. package/types/src/theme/useGridColorScheme.d.ts +7 -2
  77. package/types/src/theme/useSystemColors.d.ts +0 -14
  78. package/types/src/workbook/IWorkbookElement.d.ts +36 -8
  79. package/browser/esm/BzFKdDmdCdg3cXdh.mjs +0 -262
@@ -1,11 +1,11 @@
1
1
  /**
2
- * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.21
2
+ * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.23
3
3
  *
4
4
  * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
5
  * License: SheetXL EULA — https://www.sheetxl.com/eula
6
6
  */
7
- import { t as e } from "./CCL3pFmdsuwahoCR.mjs";
8
- import { $ as t, $n as n, $r as r, $t as i, A as a, Ai as o, An as s, Ar as c, At as l, B as u, Bn as d, Br as f, Bt as p, C as m, Ci as h, Cr as g, Ct as _, D as v, Di as y, Dn as b, Dr as x, Dt as S, E as C, Ei as w, En as T, Er as E, Et as D, F as O, Fi as k, Fn as A, Fr as j, Ft as M, G as N, Gn as P, Gr as F, Gt as I, H as ee, Hn as L, Hr as R, Ht as te, I as ne, Ii as re, In as ie, Ir as ae, It as oe, J as se, Jn as ce, Jr as le, Jt as ue, K as de, Kn as fe, Kr as pe, Kt as me, L as he, Li as ge, Ln as _e, Lr as ve, Lt as ye, M as be, Mi as xe, Mn as Se, Mr as Ce, Mt as we, N as Te, Ni as z, Nn as Ee, Nr as De, Nt as Oe, O as ke, Oi as B, On as Ae, Or as je, Ot as Me, P as Ne, Pi as Pe, Pn as Fe, Pr as Ie, Pt as Le, Q as Re, Qn as ze, Qr as Be, Qt as Ve, R as V, Ri as H, Rn as He, Rr as Ue, Rt as We, S as Ge, Si as Ke, Sn as qe, Sr as Je, St as Ye, T as Xe, Ti as Ze, Tn as Qe, Tr as $e, Tt as et, U as tt, Un as nt, Ur as rt, Ut as it, V as at, Vn as ot, Vr as st, Vt as ct, W as lt, Wn as ut, Wr as dt, Wt as ft, X as pt, Xn as mt, Xr as ht, Xt as gt, Y as _t, Yn as vt, Yr as yt, Yt as bt, Z as xt, Zn as St, Zr as Ct, Zt as wt, _ as Tt, _i as Et, _n as Dt, _r as Ot, _t as kt, a as At, ai as jt, an as Mt, ar as Nt, at as Pt, b as Ft, bi as U, bn as It, br as Lt, bt as Rt, c as zt, ci as W, cn as Bt, cr as Vt, ct as Ht, d as Ut, di as G, dn as Wt, dr as Gt, dt as Kt, ei as qt, en as Jt, er as Yt, et as Xt, f as Zt, fi as Qt, fn as $t, fr as en, ft as tn, g as nn, gi as rn, gn as an, gr as on, gt as sn, h as cn, hi as K, hn as ln, hr as un, ht as dn, i as fn, ii as pn, in as mn, ir as hn, it as gn, j as _n, ji as vn, jn as yn, jr as bn, jt as xn, k as Sn, ki as Cn, kn as wn, kr as Tn, kt as En, l as Dn, li as On, ln as kn, lr as An, lt as jn, m as Mn, mi as Nn, mn as Pn, mr as Fn, mt as In, n as Ln, ni as Rn, nn as zn, nr as Bn, nt as Vn, o as Hn, oi as Un, on as Wn, or as Gn, ot as Kn, p as qn, pi as q, pn as Jn, pr as Yn, pt as Xn, q as Zn, qn as Qn, qr as J, qt as $n, r as er, ri as tr, rn as nr, rr, rt as ir, s as ar, si as or, sn as sr, sr as cr, st as lr, t as ur, ti as dr, tn as fr, tr as pr, tt as mr, u as hr, ui as Y, un as gr, ur as _r, ut as vr, v as yr, vi as br, vn as xr, vr as Sr, vt as Cr, w as wr, wi as Tr, wr as X, wt as Er, x as Dr, xi as Or, xn as kr, xr as Ar, xt as jr, y as Mr, yi as Nr, yn as Pr, yr as Fr, yt as Ir, z as Lr, zn as Rr, zr, zt as Br } from "./k1IvXgw5-153QQUo.mjs";
7
+ import { t as e } from "./G6Ek0k1QC1pUHvPd.mjs";
8
+ import { $ as t, $n as n, $r as r, $t as i, A as a, Ai as o, An as s, Ar as c, At as l, B as u, Bn as d, Br as f, Bt as p, C as m, Ci as h, Cr as g, Ct as _, D as v, Di as y, Dn as b, Dr as x, Dt as S, E as C, Ei as w, En as T, Er as E, Et as D, F as O, Fi as k, Fn as A, Fr as j, Ft as M, G as N, Gn as P, Gr as F, Gt as I, H as ee, Hn as L, Hr as R, Ht as te, I as ne, Ii as re, In as ie, Ir as ae, It as oe, J as se, Jn as ce, Jr as le, Jt as ue, K as de, Kn as fe, Kr as pe, Kt as me, L as he, Li as ge, Ln as _e, Lr as ve, Lt as ye, M as be, Mi as xe, Mn as Se, Mr as Ce, Mt as we, N as Te, Ni as z, Nn as Ee, Nr as De, Nt as Oe, O as ke, Oi as B, On as Ae, Or as je, Ot as Me, P as Ne, Pi as Pe, Pn as Fe, Pr as Ie, Pt as Le, Q as Re, Qn as ze, Qr as Be, Qt as Ve, R as V, Ri as H, Rn as He, Rr as Ue, Rt as We, S as Ge, Si as Ke, Sn as qe, Sr as Je, St as Ye, T as Xe, Ti as Ze, Tn as Qe, Tr as $e, Tt as et, U as tt, Un as nt, Ur as rt, Ut as it, V as at, Vn as ot, Vr as st, Vt as ct, W as lt, Wn as ut, Wr as dt, Wt as ft, X as pt, Xn as mt, Xr as ht, Xt as gt, Y as _t, Yn as vt, Yr as yt, Yt as bt, Z as xt, Zn as St, Zr as Ct, Zt as wt, _ as Tt, _i as Et, _n as Dt, _r as Ot, _t as kt, a as At, ai as jt, an as Mt, ar as Nt, at as Pt, b as Ft, bi as U, bn as It, br as Lt, bt as Rt, c as zt, ci as W, cn as Bt, cr as Vt, ct as Ht, d as Ut, di as G, dn as Wt, dr as Gt, dt as Kt, ei as qt, en as Jt, er as Yt, et as Xt, f as Zt, fi as Qt, fn as $t, fr as en, ft as tn, g as nn, gi as rn, gn as an, gr as on, gt as sn, h as cn, hi as K, hn as ln, hr as un, ht as dn, i as fn, ii as pn, in as mn, ir as hn, it as gn, j as _n, ji as vn, jn as yn, jr as bn, jt as xn, k as Sn, ki as Cn, kn as wn, kr as Tn, kt as En, l as Dn, li as On, ln as kn, lr as An, lt as jn, m as Mn, mi as Nn, mn as Pn, mr as Fn, mt as In, n as Ln, ni as Rn, nn as zn, nr as Bn, nt as Vn, o as Hn, oi as Un, on as Wn, or as Gn, ot as Kn, p as qn, pi as q, pn as Jn, pr as Yn, pt as Xn, q as Zn, qn as Qn, qr as J, qt as $n, r as er, ri as tr, rn as nr, rr, rt as ir, s as ar, si as or, sn as sr, sr as cr, st as lr, t as ur, ti as dr, tn as fr, tr as pr, tt as mr, u as hr, ui as Y, un as gr, ur as _r, ut as vr, v as yr, vi as br, vn as xr, vr as Sr, vt as Cr, w as wr, wi as Tr, wr as X, wt as Er, x as Dr, xi as Or, xn as kr, xr as Ar, xt as jr, y as Mr, yi as Nr, yn as Pr, yr as Fr, yt as Ir, z as Lr, zn as Rr, zr, zt as Br } from "./DedLmnV_HajYHYSM.mjs";
9
9
  import { Color as Vr, IFill as Hr, IStroke as Ur, PaintUtils as Wr } from "@sheetxl/sdk";
10
10
  var Gr = {
11
11
  pct5: "0040000000040000",
@@ -1,10 +1,10 @@
1
1
  /**
2
- * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.21
2
+ * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.23
3
3
  *
4
4
  * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
5
  * License: SheetXL EULA — https://www.sheetxl.com/eula
6
6
  */
7
- import { n as e } from "./CkYId3pjG9v3XZM2.mjs";
7
+ import { n as e } from "./CLD7Vob5oUran-l0.mjs";
8
8
  import { ChartEditor as t } from "./chart.mjs";
9
9
  import { jsx as n } from "react/jsx-runtime";
10
10
  import { messageKey as r, t as i } from "@sheetxl/utils";
@@ -1,11 +1,11 @@
1
1
  /**
2
- * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.21
2
+ * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.23
3
3
  *
4
4
  * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
5
  * License: SheetXL EULA — https://www.sheetxl.com/eula
6
6
  */
7
- import { n as e } from "./6lfBozPNyWlFBEDn.mjs";
8
- import { i as t, n, r, t as i } from "./CPwcEeQtvkrESNEy.mjs";
7
+ import { n as e } from "./CGEyv-QdxMuQmLqk.mjs";
8
+ import { i as t, n, r, t as i } from "./DSvlk_YzOev20rgN.mjs";
9
9
  import { jsx as a } from "react/jsx-runtime";
10
10
  import { DOMUtils as o, messageKey as s, t as c } from "@sheetxl/utils";
11
11
  import { NotifierType as l } from "@sheetxl/utils-react";
@@ -0,0 +1,264 @@
1
+ /**
2
+ * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.23
3
+ *
4
+ * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
+ * License: SheetXL EULA — https://www.sheetxl.com/eula
6
+ */
7
+ import { t as e } from "./CruGvs0fdtWWO_Di.mjs";
8
+ import { createContext as t, forwardRef as n, memo as r, useCallback as i, useContext as a, useEffect as o, useLayoutEffect as s, useRef as c, useState as l } from "react";
9
+ import { jsx as u, jsxs as d } from "react/jsx-runtime";
10
+ import { CommonUtils as f, defineLazyModule as p } from "@sheetxl/utils";
11
+ import { useImperativeElement as ee, useMeasure as m, usePendingRender as te, usePersistentState as h, useResolvedThemeMode as g } from "@sheetxl/utils-react";
12
+ var _ = {
13
+ Mode: "themeMode",
14
+ DarkGrid: "enableDarkGrid",
15
+ DarkImages: "enableDarkImages"
16
+ }, v = {
17
+ [_.Mode]: null,
18
+ [_.DarkGrid]: !1,
19
+ [_.DarkImages]: !1
20
+ }, y = t(null);
21
+ y.displayName = "GridColorSchemeContext";
22
+ var b = (e) => {
23
+ let t = a(y), [n] = h(_.Mode, v[_.Mode]), [r] = h(_.DarkGrid, v[_.DarkGrid]), { themeMode: i } = g({ mode: e ?? n ?? void 0 });
24
+ return e ? e === "auto" ? i : e : t || (i === "dark" && r ? "dark" : "light");
25
+ }, x = (e) => {
26
+ let [t] = h(_.Mode, v[_.Mode]), { themeMode: n } = g({ mode: e ?? t ?? void 0 });
27
+ return n;
28
+ }, S = p("chart:paint", () => import("./2-8Z3hKcjFc9IUm_.mjs")), C = (e, t) => {
29
+ let n = e.getElementType();
30
+ if (n === "point") {
31
+ let n = e.getParent();
32
+ return t === n || t?.getElementType() === "point" && t.getParent() === n ? e : n;
33
+ }
34
+ if (n === "legendEntry") {
35
+ let n = e.getParent();
36
+ return t === n || t?.getElementType() === "legendEntry" ? e : n;
37
+ }
38
+ if (n === "dataLabel") {
39
+ let n = e.getParent()?.getParent(), r = n?.getDataLabels();
40
+ return r ? t === r || t?.getElementType() === "dataLabel" && t.getParent()?.getParent() === n ? e : r : e;
41
+ }
42
+ return e;
43
+ }, w = {
44
+ boxes: [],
45
+ handles: []
46
+ }, T = r(n((t, n) => {
47
+ let { children: r, style: a, chart: p, onChartChange: h, zoom: g = 1, width: _, height: v, selection: y = null, colorScheme: b, onElementPress: T, onPointerDown: E, ...ne } = t, [D, O] = l(() => f.isPromiseLike(p) ? null : p), [k, re] = l(null), A = c(h);
48
+ A.current = h;
49
+ let j = c(null);
50
+ o(() => {
51
+ let e = !0, t = (e, t) => {
52
+ re(t), O(e), j.current !== e && (j.current = e, A.current?.(e));
53
+ };
54
+ if (f.isPromiseLike(p)) return p.then((n) => {
55
+ e && t(n, null);
56
+ }, (n) => {
57
+ e && t(null, n);
58
+ }), () => {
59
+ e = !1;
60
+ };
61
+ t(p, null);
62
+ }, [p]);
63
+ let [ie, M] = m(), N = typeof _ == "number" ? _ : M.width, P = typeof v == "number" ? v : M.height, F = N ? Math.round(N / g) : 0, I = P ? Math.round(P / g) : 0, L = c({
64
+ width: F,
65
+ height: I
66
+ });
67
+ L.current = {
68
+ width: F,
69
+ height: I
70
+ };
71
+ let ae = x(), R = (b ?? ae) === "dark", z = i(async (e) => {
72
+ let t = L.current;
73
+ if (!D || !t.width || !t.height) return null;
74
+ let n = D.getLayout(t);
75
+ return n ? (await S.load()).renderChartToSVG(n, { darkMode: e?.darkMode ?? !1 }) : null;
76
+ }, [D]), B = c(null), V = c(null), H = c(g);
77
+ H.current = g;
78
+ let U = i((e, t) => {
79
+ let n = B.current;
80
+ if (!n) return null;
81
+ let r = n.getBoundingClientRect(), i = H.current || 1;
82
+ return {
83
+ x: (e - r.left) / i,
84
+ y: (t - r.top) / i
85
+ };
86
+ }, []), W = i((e, t) => {
87
+ let n = V.current, r = U(e, t);
88
+ return D && n && r ? D.getElementAt(r, n) : null;
89
+ }, [D, U]), oe = ee(n, () => ({
90
+ isChartElement: () => !0,
91
+ getChart: () => D,
92
+ toSVG: z,
93
+ getElementAt: W
94
+ }), [
95
+ D,
96
+ z,
97
+ W
98
+ ]), G = e([
99
+ oe,
100
+ ie,
101
+ B
102
+ ]), K = c(null), q = c(null), [J, se] = l(() => S.peek() ?? null), [Y, X] = l(null), [ce, le] = l(0), [Z, ue] = l(w);
103
+ o(() => D?.addListeners({ onLayoutChange: () => le((e) => e + 1) }), [D]), te(!(Y || k || J && D)), o(() => {
104
+ if (J) return;
105
+ let e = !0;
106
+ return S.load().then((t) => {
107
+ e && se(t);
108
+ }, (t) => {
109
+ e && X(t);
110
+ }), () => {
111
+ e = !1;
112
+ };
113
+ }, [J]);
114
+ let Q = i(() => {
115
+ let e = V.current;
116
+ ue(D && e && y && !y.isEmpty() ? ((e, t, n) => {
117
+ let r = [], i = [];
118
+ for (let a of n.getItems()) {
119
+ if (a.getChart() !== e) continue;
120
+ let o = a.getElementType();
121
+ if (o === "series" || o === "dataLabels") {
122
+ let n = o === "series" ? a : a.getParent(), i = o === "series" ? n.getPoints() : n.getPoints().map((e) => e.getDataLabel());
123
+ for (let n of i) {
124
+ let i = e.getElementBounds(n, t);
125
+ i && r.push(i);
126
+ }
127
+ if (r.length > 0) continue;
128
+ }
129
+ let s = e.getElementBounds(a, t);
130
+ if (s && (r.push(s), n.getItems().length === 1)) {
131
+ let e = [
132
+ s.x,
133
+ s.x + s.width / 2,
134
+ s.x + s.width
135
+ ], t = [
136
+ s.y,
137
+ s.y + s.height / 2,
138
+ s.y + s.height
139
+ ];
140
+ for (let n of e) for (let r of t) n === e[1] && r === t[1] || i.push({
141
+ x: n,
142
+ y: r
143
+ });
144
+ }
145
+ }
146
+ return {
147
+ boxes: r,
148
+ handles: i
149
+ };
150
+ })(D, e, y) : w);
151
+ }, [D, y]);
152
+ o(() => y?.addListeners({ onChange: Q }), [y, Q]), s(() => {
153
+ let e = K.current;
154
+ if (!(J && e && D && F && I)) return;
155
+ let t = D.getLayout({
156
+ width: F,
157
+ height: I
158
+ });
159
+ if (V.current = t, !t) return q.current?.dispose(), q.current = null, e.style.backgroundColor = "", void Q();
160
+ let n = t.chartArea.fill === void 0;
161
+ e.style.backgroundColor = n ? `var(--sxl-color-base-100, ${R ? "#121212" : "#FFFFFF"})` : "", e.style.borderRadius = n ? `${t.chartArea.cornerRadius}px` : "";
162
+ let r = {
163
+ darkMode: R,
164
+ background: "transparent"
165
+ };
166
+ q.current ? q.current.update(t, r) : q.current = J.mountChart(e, t, r), Q();
167
+ }, [
168
+ J,
169
+ D,
170
+ F,
171
+ I,
172
+ ce,
173
+ R,
174
+ Q
175
+ ]), o(() => () => {
176
+ q.current?.dispose(), q.current = null, V.current = null;
177
+ }, [D]);
178
+ let de = i((e) => {
179
+ if (E?.(e), e.button !== 0 && e.button !== 2) return;
180
+ let t = V.current, n = U(e.clientX, e.clientY);
181
+ if (!D || !t || !n) return;
182
+ let r = D.getElementAt(n, t);
183
+ if (T?.({
184
+ element: r,
185
+ point: n,
186
+ event: e
187
+ }), !y) return;
188
+ if (!r || r.getElementType() === "chartArea") return void y.clear();
189
+ let i = C(r, y.getActive());
190
+ y.isSelected(i) && y.getItems().length === 1 || y.select([i]);
191
+ }, [
192
+ D,
193
+ y,
194
+ T,
195
+ E,
196
+ U
197
+ ]);
198
+ if (D?.isDeleted()) return;
199
+ let $ = Y ?? k;
200
+ return d("div", {
201
+ ...ne,
202
+ onPointerDown: de,
203
+ style: {
204
+ ..._ === void 0 ? {} : { width: _ },
205
+ ...v === void 0 ? {} : { height: v },
206
+ ...a,
207
+ overflow: "hidden"
208
+ },
209
+ ref: G,
210
+ children: [
211
+ $ ? u("div", {
212
+ className: "sxl-chart-element-error",
213
+ style: {
214
+ padding: "8px",
215
+ fontSize: "12px",
216
+ color: "var(--sxl-color-error, #b00020)"
217
+ },
218
+ children: $.message
219
+ }) : null,
220
+ u("div", {
221
+ className: "sxl-chart-element",
222
+ ref: K,
223
+ style: {
224
+ width: F || "100%",
225
+ height: I || "100%",
226
+ zoom: g,
227
+ position: "relative"
228
+ }
229
+ }),
230
+ Z.boxes.length > 0 ? d("div", {
231
+ className: "sxl-chart-element-selection",
232
+ style: {
233
+ position: "absolute",
234
+ left: 0,
235
+ top: 0,
236
+ width: F,
237
+ height: I,
238
+ zoom: g,
239
+ pointerEvents: "none"
240
+ },
241
+ children: [Z.boxes.map((e, t) => u("div", { style: {
242
+ position: "absolute",
243
+ left: e.x - 1,
244
+ top: e.y - 1,
245
+ width: Math.max(0, e.width),
246
+ height: Math.max(0, e.height),
247
+ border: "1px solid var(--sxl-color-primary, #1a73e8)",
248
+ boxSizing: "content-box"
249
+ } }, `box-${t}`)), Z.handles.map((e, t) => u("div", { style: {
250
+ position: "absolute",
251
+ left: e.x - 3,
252
+ top: e.y - 3,
253
+ width: 6,
254
+ height: 6,
255
+ background: "var(--sxl-color-base-100, #fff)",
256
+ border: "1px solid var(--sxl-color-primary, #1a73e8)",
257
+ boxSizing: "border-box"
258
+ } }, `handle-${t}`))]
259
+ }) : null
260
+ ]
261
+ });
262
+ }));
263
+ T.displayName = "ChartElement";
264
+ export { y as a, b as i, C as n, v as o, x as r, _ as s, T as t };
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.21
2
+ * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.23
3
3
  *
4
4
  * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
5
  * License: SheetXL EULA — https://www.sheetxl.com/eula
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.21
2
+ * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.23
3
3
  *
4
4
  * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
5
  * License: SheetXL EULA — https://www.sheetxl.com/eula
@@ -1,22 +1,22 @@
1
1
  /**
2
- * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.21
2
+ * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.23
3
3
  *
4
4
  * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
5
  * License: SheetXL EULA — https://www.sheetxl.com/eula
6
6
  */
7
- import { n as e } from "./CCL3pFmdsuwahoCR.mjs";
8
- import { t } from "./_T8e_9xhVAagwkPD.mjs";
7
+ import { n as e } from "./G6Ek0k1QC1pUHvPd.mjs";
8
+ import { t } from "./CruGvs0fdtWWO_Di.mjs";
9
9
  import { forwardRef as n, memo as r, useEffect as i } from "react";
10
10
  import { jsx as a } from "react/jsx-runtime";
11
11
  import { useImperativeElement as o, useMeasure as s, useTranslator as c } from "@sheetxl/utils-react";
12
12
  var l = r(n((e, n) => {
13
- let { children: r, disabled: c, style: l, movable: u, zoom: d = 1, description: f, isDragging: p, onHide: m, onShow: h, onDragZone: g, adornmentHost: _, flip: v, gesture: y, ...b } = e;
13
+ let { children: r, disabled: c, style: l, movable: u, zoom: d = 1, description: f, isDragging: p, onHide: m, onShow: h, onDragZone: g, onTap: _, adornmentHost: v, flip: y, gesture: b, ...x } = e;
14
14
  i(() => {}, [f]);
15
- let x = o(n, () => ({ isEmptyFrame: () => !0 }), []), [S, { height: C, width: w }] = s(), T = t([x, S]);
15
+ let S = o(n, () => ({ isEmptyFrame: () => !0 }), []), [C, { height: w, width: T }] = s(), E = t([S, C]);
16
16
  return a("div", {
17
17
  className: "sxl-unknown-editor",
18
- ...b,
19
- ref: T,
18
+ ...x,
19
+ ref: E,
20
20
  style: {
21
21
  width: "100%",
22
22
  height: "100%",
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.21
2
+ * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.23
3
3
  *
4
4
  * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
5
  * License: SheetXL EULA — https://www.sheetxl.com/eula
@@ -1,10 +1,10 @@
1
1
  /**
2
- * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.21
2
+ * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.23
3
3
  *
4
4
  * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
5
  * License: SheetXL EULA — https://www.sheetxl.com/eula
6
6
  */
7
- import { i as e, n as t, r as n, t as r } from "./k1IvXgw5-153QQUo.mjs";
7
+ import { i as e, n as t, r as n, t as r } from "./DedLmnV_HajYHYSM.mjs";
8
8
  var i = !1;
9
9
  function a(e) {
10
10
  let t = [];
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.21
2
+ * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.23
3
3
  *
4
4
  * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
5
  * License: SheetXL EULA — https://www.sheetxl.com/eula
@@ -1,14 +1,14 @@
1
1
  /**
2
- * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.21
2
+ * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.23
3
3
  *
4
4
  * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
5
  * License: SheetXL EULA — https://www.sheetxl.com/eula
6
6
  */
7
- import { t as e } from "./C2HjD-DbaqXq93R7.mjs";
8
- import { d as t } from "./C46qV9hBGqlz6_Kt.mjs";
9
- import { t as n } from "./CHgyrBEiFmspcFXV.mjs";
10
- import { n as r } from "./CkYId3pjG9v3XZM2.mjs";
11
- import { t as i } from "./DL2WZkJdK1lZfpJo.mjs";
7
+ import { t as e } from "./BG96UT5-ooOuigD0.mjs";
8
+ import { d as t } from "./D5r5ejlRpFFXN6TK.mjs";
9
+ import { t as n } from "./OPWkc7t367MwVsVU.mjs";
10
+ import { n as r } from "./CLD7Vob5oUran-l0.mjs";
11
+ import { t as i } from "./CEtZlL4v4JU0TDVR.mjs";
12
12
  import { memo as a, useCallback as o, useReducer as s, useRef as c } from "react";
13
13
  import { jsx as l } from "react/jsx-runtime";
14
14
  import { messageKey as u } from "@sheetxl/utils";