@sheetxl/react 0.8.0-beta.11 → 0.8.0-beta.12

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 (116) hide show
  1. package/browser/esm/{94dxo1A-z8lgiiGw.mjs → B4mT3G7GHwgDYFGP.mjs} +2 -2
  2. package/browser/esm/{B26QVfjer2oY2ewK.mjs → BDlpRkuBok0Uu4Hn.mjs} +1 -1
  3. package/browser/esm/{CRi6DQ3UXmPEv-w_.mjs → BR-AiOwuQlYh5-tr.mjs} +147 -146
  4. package/browser/esm/{ClAtIfYbsUPA073B.mjs → BapujiblfiXDlu67.mjs} +1 -1
  5. package/browser/esm/{D2u6THGErqw64KQI.mjs → CSFORKZ8zrVL_Y0w.mjs} +1 -1
  6. package/browser/esm/{Bl2BFCQ00fotauKB.mjs → CUekkfE6uwwsdQpc.mjs} +1 -1
  7. package/browser/esm/{DgL7Dy-Lqcr1TvW6.mjs → C_LUq-BnguetvGZz.mjs} +4851 -4818
  8. package/browser/esm/{BQYS2Yf-EAV_tBLr.mjs → Ck1LbcsdSfKNi6xq.mjs} +1 -1
  9. package/browser/esm/{1-LEUre9ZLG0OYYB.mjs → Cslk_qRdBSuJIi1O.mjs} +6 -6
  10. package/browser/esm/CtGhA0kS2MCfEsHN.mjs +262 -0
  11. package/browser/esm/{BegvsXeRs7e-9t8k.mjs → D22NJmTiky4NL8tM.mjs} +1 -1
  12. package/browser/esm/{B93LSmhnvkxNXTq-.mjs → D2GydDzPuvIjdpok.mjs} +1 -1
  13. package/browser/esm/{CzRIbc-Lk__VMLKM.mjs → DGG1auUKsjFbAazu.mjs} +3 -3
  14. package/browser/esm/{Bos4Rkp8UTF7QXUB.mjs → DN3lqq95KY0K6f1x.mjs} +1 -1
  15. package/browser/esm/{Dnh1kpz3v1JKtRD_.mjs → D_usN3pWuCJU2GN-.mjs} +2 -2
  16. package/browser/esm/{cQ6xdPFkEcuDlNTN.mjs → DhYQRc8L2kALmFNz.mjs} +1 -1
  17. package/browser/esm/{DS66lAIM-9M-YoZQ.mjs → DxEczXCHTerDemDP.mjs} +112 -104
  18. package/browser/esm/{C1pc9F4Rt2C5FKUo.mjs → LBQDhVhz7S7i6a8i.mjs} +1 -1
  19. package/browser/esm/{CPnnESfZz2jjJd82.mjs → ZoS0cpNEBcv6p-Z1.mjs} +1 -1
  20. package/browser/esm/{DMdsMPT0fWBbTkNn.mjs → _6Sb6ElRcZftxMNh.mjs} +1 -1
  21. package/browser/esm/chart.mjs +28 -27
  22. package/browser/esm/control.mjs +2 -2
  23. package/browser/esm/group.mjs +3 -3
  24. package/browser/esm/index.mjs +5750 -5089
  25. package/browser/esm/note.mjs +4 -4
  26. package/browser/esm/picture.mjs +41 -41
  27. package/browser/esm/shape.mjs +2 -2
  28. package/browser/esm/slicer.mjs +4 -4
  29. package/node/esm/{BaRfst1euuhquupX.mjs → Apcuz4_QtBHt7G47.mjs} +1 -1
  30. package/node/esm/{b-XRVRI1fYQQMkTC.mjs → Bi2Jwc0zpweaNzKc.mjs} +525 -492
  31. package/node/esm/{D_pCpfdQowV_4Aje.mjs → C0KLMCRb3sbd5Q20.mjs} +5 -5
  32. package/node/esm/{sigD1UFqvPlWUw_9.mjs → CH1DVfFhjdd_3pw1.mjs} +2 -2
  33. package/node/esm/{Be9c1GwQkPo8Piuh.mjs → CNOLkUDURBElaaIf.mjs} +1 -1
  34. package/node/esm/{BiaDWnN3tT7neoRL.mjs → CalVk3o4-kX79s3v.mjs} +1 -1
  35. package/node/esm/{DgGEHydEjD7nfsDB.mjs → Cp1DuCae46eQKzWy.mjs} +1 -1
  36. package/node/esm/{BlxXufqBBg1PtsXd.mjs → CzN6c6KyxVmNvayz.mjs} +1 -1
  37. package/node/esm/{6zApGj9DozhFy-bx.mjs → DKqdv5JubgVaq-g9.mjs} +1 -1
  38. package/node/esm/{umljAT66yb3_rURh.mjs → DWkPWuf5ZrLRMixG.mjs} +118 -110
  39. package/node/esm/{JiQGhLkoL8CJpVvA.mjs → DXiNwr6ZnXBe7TlG.mjs} +1 -1
  40. package/node/esm/{DTMTIrYIK1eZswsM.mjs → DayGI0Bt57FDNbVF.mjs} +1 -1
  41. package/node/esm/{C_SNx7TlFEcwbYjx.mjs → DyetXBW7vFLJWB22.mjs} +1 -1
  42. package/node/esm/{Dj5FM7_-YWhCtCCt.mjs → MWges5ywL3aEdChp.mjs} +1 -1
  43. package/node/esm/{BMVK5plvmBOAIlxP.mjs → T5lfCrudsUnOTxEn.mjs} +1 -1
  44. package/node/esm/YB_qExw23Ci4nMYy.mjs +263 -0
  45. package/node/esm/{DxQZmb-j4NLUO9Af.mjs → bRD1KCpSpAYTEs50.mjs} +1 -1
  46. package/node/esm/chart.mjs +26 -25
  47. package/node/esm/control.mjs +2 -2
  48. package/node/esm/group.mjs +3 -3
  49. package/node/esm/{gpD-9LDW92phhoma.mjs → iL9jKJcnED6oi0B4.mjs} +1 -1
  50. package/node/esm/index.mjs +7658 -6996
  51. package/node/esm/note.mjs +4 -4
  52. package/node/esm/picture.mjs +41 -41
  53. package/node/esm/shape.mjs +50 -49
  54. package/node/esm/slicer.mjs +4 -4
  55. package/package.json +7 -7
  56. package/resources/locales/de/sheet.cmd.json +21 -0
  57. package/resources/locales/de/workbook.cmd.json +6 -0
  58. package/resources/locales/en/sheet.cmd.json +21 -0
  59. package/resources/locales/en/ui.msg.json +2 -0
  60. package/resources/locales/en/workbook.cmd.json +6 -0
  61. package/types/src/border/useBorders.d.ts +2 -2
  62. package/types/src/cell/CellCheckboxRenderer.d.ts +20 -0
  63. package/types/src/cell/CellContent.d.ts +68 -0
  64. package/types/src/cell/CellControlContext.d.ts +37 -0
  65. package/types/src/cell/{FormulaCellRenderer.d.ts → CellFormulaRenderer.d.ts} +5 -5
  66. package/types/src/cell/CellImageRenderer.d.ts +11 -0
  67. package/types/src/cell/CellRenderers.d.ts +190 -0
  68. package/types/src/cell/{SheetCellRenderer.d.ts → CellTextRenderer.d.ts} +9 -6
  69. package/types/src/cell/ColumnButton.d.ts +3 -3
  70. package/types/src/cell/OutlineButton.d.ts +4 -4
  71. package/types/src/cell/SheetHeaderRenderer.d.ts +1 -1
  72. package/types/src/cell/index.d.ts +8 -2
  73. package/types/src/cell/useFormulaViewAnchor.d.ts +1 -1
  74. package/types/src/cell/useInsertableCellControls.d.ts +25 -0
  75. package/types/src/chart/ChartEditor.d.ts +2 -0
  76. package/types/src/chart/ChartElement.d.ts +14 -3
  77. package/types/src/chart/paint/_mode.d.ts +6 -0
  78. package/types/src/chart/paint/echarts.d.ts +5 -2
  79. package/types/src/chart/paint/kinds/ChartPaintKind.d.ts +8 -0
  80. package/types/src/chart/paint/toEChartsOption.d.ts +11 -0
  81. package/types/src/editableLabel/EditableLabel.d.ts +3 -1
  82. package/types/src/editor/SheetReferenceHeaderLayer.d.ts +1 -1
  83. package/types/src/editor/useFormulaHints.d.ts +1 -1
  84. package/types/src/layer/CellErrorLayer.d.ts +3 -2
  85. package/types/src/layer/CellIndicatorLayer.d.ts +31 -0
  86. package/types/src/layer/HeaderSelectionLayer.d.ts +4 -4
  87. package/types/src/layer/HyperlinkLayer.d.ts +8 -5
  88. package/types/src/layer/ProtectionLayer.d.ts +1 -2
  89. package/types/src/layer/SheetCellLayer.d.ts +11 -4
  90. package/types/src/layer/SheetMovableLayer.d.ts +2 -1
  91. package/types/src/layer/SheetOutlineLayer.d.ts +1 -1
  92. package/types/src/layer/TableLayer.d.ts +1 -1
  93. package/types/src/layer/TableToolbar.d.ts +1 -1
  94. package/types/src/layer/ValidationPromptLayer.d.ts +16 -4
  95. package/types/src/layer/index.d.ts +1 -0
  96. package/types/src/listener/useRangeListener.d.ts +13 -7
  97. package/types/src/movable/DefaultMovable.d.ts +1 -1
  98. package/types/src/movable/MovableControl.d.ts +3 -1
  99. package/types/src/movable/MovableFrame.d.ts +2 -1
  100. package/types/src/movable/MovableLayer.d.ts +6 -3
  101. package/types/src/sheet/ISheetHeaderElement.d.ts +2 -2
  102. package/types/src/sheet/IWorksheetElement.d.ts +21 -22
  103. package/types/src/sheet/SheetCommandProvider.d.ts +3 -0
  104. package/types/src/sheet/SheetOutlineElement.d.ts +2 -2
  105. package/types/src/sheet/SheetPanels.d.ts +2 -2
  106. package/types/src/tabStrip/Sortable.d.ts +5 -5
  107. package/types/src/tabStrip/TabStrip.d.ts +6 -6
  108. package/types/src/tabStrip/TabStripItem.d.ts +15 -13
  109. package/types/src/taskPane/CellControlPane.d.ts +17 -0
  110. package/types/src/taskPane/index.d.ts +1 -0
  111. package/types/src/taskPane/useTaskPane.d.ts +6 -3
  112. package/types/src/workbook/DefaultRenderers.d.ts +4 -4
  113. package/types/src/workbook/IWorkbookElement.d.ts +52 -20
  114. package/types/src/workbook/WorkbookStrip.d.ts +5 -5
  115. package/browser/esm/ugfE7YeZALQURDKF.mjs +0 -241
  116. package/node/esm/DJPgbB1X22YmhbaR.mjs +0 -242
@@ -0,0 +1,263 @@
1
+ /**
2
+ * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.12
3
+ *
4
+ * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
+ * License: The license can be found at https://www.sheetxl.com/license.
6
+ */
7
+ import { forwardRef as e, memo as t, useCallback as r, useEffect as n, useLayoutEffect as o, useRef as l, useState as s } from "react";
8
+ import { jsx as i, jsxs as a } from "react/jsx-runtime";
9
+ import { CommonUtils as c, defineLazyModule as d } from "@sheetxl/utils";
10
+ import { useImperativeElement as u, useMeasure as h, usePendingRender as g, usePersistentState as m, useResolvedThemeMode as p } from "@sheetxl/utils-react";
11
+ import { useMergeRefs as f } from "react-merge-refs";
12
+ var y = {
13
+ Mode: "themeMode",
14
+ DarkGrid: "enableDarkGrid",
15
+ DarkImages: "enableDarkImages"
16
+ }, b = {
17
+ [y.Mode]: null,
18
+ [y.DarkGrid]: !1,
19
+ [y.DarkImages]: !1
20
+ }, x = (e) => {
21
+ const [t] = m(y.Mode, b[y.Mode]), [r] = m(y.DarkGrid, b[y.DarkGrid]), { themeMode: n } = p({ mode: e ?? t ?? void 0 });
22
+ return e || ("dark" === n && r ? "dark" : "light");
23
+ }, v = () => {
24
+ const [e] = m(y.Mode, b[y.Mode]), { themeMode: t } = p({ mode: e ?? void 0 });
25
+ return t;
26
+ }, k = d("chart:paint", () => import("./Bi2Jwc0zpweaNzKc.mjs")), w = (e, t) => {
27
+ const r = e.getElementType();
28
+ if ("point" === r) {
29
+ const r = e.getParent();
30
+ return t === r || "point" === t?.getElementType() && t.getParent() === r ? e : r;
31
+ }
32
+ if ("legendEntry" === r) {
33
+ const r = e.getParent();
34
+ return t === r || "legendEntry" === t?.getElementType() ? e : r;
35
+ }
36
+ if ("dataLabel" === r) {
37
+ const r = e.getParent()?.getParent(), n = r?.getDataLabels();
38
+ return n ? t === n || "dataLabel" === t?.getElementType() && t.getParent()?.getParent() === r ? e : n : e;
39
+ }
40
+ return e;
41
+ }, E = {
42
+ boxes: [],
43
+ handles: []
44
+ }, M = t(e((e, t) => {
45
+ const { children: d, style: m, chart: p, onChartChange: y, zoom: b = 1, width: x, height: M, selection: P = null, colorScheme: C, onElementPress: D, onPointerDown: L, ...A } = e, [G, S] = s(() => c.isPromiseLike(p) ? null : p), [T, z] = s(null), F = l(y);
46
+ F.current = y;
47
+ const I = l(null);
48
+ n(() => {
49
+ let e = !0;
50
+ const t = (e, t) => {
51
+ z(t), S(e), I.current !== e && (I.current = e, F.current?.(e));
52
+ };
53
+ if (c.isPromiseLike(p)) return p.then((r) => {
54
+ e && t(r, null);
55
+ }, (r) => {
56
+ e && t(null, r);
57
+ }), () => {
58
+ e = !1;
59
+ };
60
+ t(p, null);
61
+ }, [p]);
62
+ const [N, $] = h(), B = "number" == typeof x ? x : $.width, R = "number" == typeof M ? M : $.height, j = B ? Math.round(B / b) : 0, V = R ? Math.round(R / b) : 0, X = l({
63
+ width: j,
64
+ height: V
65
+ });
66
+ X.current = {
67
+ width: j,
68
+ height: V
69
+ };
70
+ const Y = v(), q = "dark" === (C ?? Y), H = r(async (e) => {
71
+ const t = X.current;
72
+ if (!G || !t.width || !t.height) return null;
73
+ const r = G.getLayout(t);
74
+ return r ? (await k.load()).renderChartToSVG(r, { darkMode: e?.darkMode ?? !1 }) : null;
75
+ }, [G]), J = l(null), K = l(null), O = l(b);
76
+ O.current = b;
77
+ const Q = r((e, t) => {
78
+ const r = J.current;
79
+ if (!r) return null;
80
+ const n = r.getBoundingClientRect(), o = O.current || 1;
81
+ return {
82
+ x: (e - n.left) / o,
83
+ y: (t - n.top) / o
84
+ };
85
+ }, []), U = r((e, t) => {
86
+ const r = K.current, n = Q(e, t);
87
+ return G && r && n ? G.getElementAt(n, r) : null;
88
+ }, [G, Q]), W = u(t, () => ({
89
+ isChartElement: () => !0,
90
+ getChart: () => G,
91
+ toSVG: H,
92
+ getElementAt: U
93
+ }), [
94
+ G,
95
+ H,
96
+ U
97
+ ]), Z = f([
98
+ W,
99
+ N,
100
+ J
101
+ ]), _ = l(null), ee = l(null), [te, re] = s(() => k.peek() ?? null), [ne, oe] = s(null), [le, se] = s(0), [ie, ae] = s(E);
102
+ n(() => G?.addListeners({ onLayoutChange: () => se((e) => e + 1) }), [G]), g(!(ne || T || te && G)), n(() => {
103
+ if (te) return;
104
+ let e = !0;
105
+ return k.load().then((t) => {
106
+ e && re(t);
107
+ }, (t) => {
108
+ e && oe(t);
109
+ }), () => {
110
+ e = !1;
111
+ };
112
+ }, [te]);
113
+ const ce = r(() => {
114
+ const e = K.current;
115
+ ae(G && e && P && !P.isEmpty() ? ((e, t, r) => {
116
+ const n = [], o = [];
117
+ for (const l of r.getItems()) {
118
+ if (l.getChart() !== e) continue;
119
+ const s = l.getElementType();
120
+ if ("series" === s || "dataLabels" === s) {
121
+ const r = "series" === s ? l : l.getParent(), o = "series" === s ? r.getPoints() : r.getPoints().map((e) => e.getDataLabel());
122
+ for (const r of o) {
123
+ const o = e.getElementBounds(r, t);
124
+ o && n.push(o);
125
+ }
126
+ if (n.length > 0) continue;
127
+ }
128
+ const i = e.getElementBounds(l, t);
129
+ if (i && (n.push(i), 1 === r.getItems().length)) {
130
+ const e = [
131
+ i.x,
132
+ i.x + i.width / 2,
133
+ i.x + i.width
134
+ ], t = [
135
+ i.y,
136
+ i.y + i.height / 2,
137
+ i.y + i.height
138
+ ];
139
+ for (const r of e) for (const n of t) r === e[1] && n === t[1] || o.push({
140
+ x: r,
141
+ y: n
142
+ });
143
+ }
144
+ }
145
+ return {
146
+ boxes: n,
147
+ handles: o
148
+ };
149
+ })(G, e, P) : E);
150
+ }, [G, P]);
151
+ n(() => P?.addListeners({ onChange: ce }), [P, ce]), o(() => {
152
+ const e = _.current;
153
+ if (!(te && e && G && j && V)) return;
154
+ const t = G.getLayout({
155
+ width: j,
156
+ height: V
157
+ });
158
+ if (K.current = t, !t) return ee.current?.dispose(), ee.current = null, e.style.backgroundColor = "", void ce();
159
+ const r = void 0 === t.chartArea.fill;
160
+ e.style.backgroundColor = r ? `var(--sxl-color-base-100, ${q ? "#121212" : "#FFFFFF"})` : "", e.style.borderRadius = r ? `${t.chartArea.cornerRadius}px` : "";
161
+ const n = {
162
+ darkMode: q,
163
+ background: "transparent"
164
+ };
165
+ ee.current ? ee.current.update(t, n) : ee.current = te.mountChart(e, t, n), ce();
166
+ }, [
167
+ te,
168
+ G,
169
+ j,
170
+ V,
171
+ le,
172
+ q,
173
+ ce
174
+ ]), n(() => () => {
175
+ ee.current?.dispose(), ee.current = null, K.current = null;
176
+ }, [G]);
177
+ const de = r((e) => {
178
+ if (L?.(e), 0 !== e.button && 2 !== e.button) return;
179
+ const t = K.current, r = Q(e.clientX, e.clientY);
180
+ if (!G || !t || !r) return;
181
+ const n = G.getElementAt(r, t);
182
+ if (D?.({
183
+ element: n,
184
+ point: r,
185
+ event: e
186
+ }), !P) return;
187
+ if (!n || "chartArea" === n.getElementType()) return void P.clear();
188
+ const o = w(n, P.getActive());
189
+ P.isSelected(o) && 1 === P.getItems().length || P.select([o]);
190
+ }, [
191
+ G,
192
+ P,
193
+ D,
194
+ L,
195
+ Q
196
+ ]);
197
+ if (G?.isDeleted()) return;
198
+ const ue = ne ?? T;
199
+ return a("div", {
200
+ ...A,
201
+ onPointerDown: de,
202
+ style: {
203
+ ...void 0 !== x ? { width: x } : {},
204
+ ...void 0 !== M ? { height: M } : {},
205
+ ...m,
206
+ overflow: "hidden"
207
+ },
208
+ ref: Z,
209
+ children: [
210
+ ue ? i("div", {
211
+ className: "chart-element-error",
212
+ style: {
213
+ padding: "8px",
214
+ fontSize: "12px",
215
+ color: "var(--sxl-color-error, #b00020)"
216
+ },
217
+ children: ue.message
218
+ }) : null,
219
+ i("div", {
220
+ className: "chart-element",
221
+ ref: _,
222
+ style: {
223
+ width: j || "100%",
224
+ height: V || "100%",
225
+ zoom: b,
226
+ position: "relative"
227
+ }
228
+ }),
229
+ ie.boxes.length > 0 ? a("div", {
230
+ className: "chart-element-selection",
231
+ style: {
232
+ position: "absolute",
233
+ left: 0,
234
+ top: 0,
235
+ width: j,
236
+ height: V,
237
+ zoom: b,
238
+ pointerEvents: "none"
239
+ },
240
+ children: [ie.boxes.map((e, t) => i("div", { style: {
241
+ position: "absolute",
242
+ left: e.x - 1,
243
+ top: e.y - 1,
244
+ width: Math.max(0, e.width),
245
+ height: Math.max(0, e.height),
246
+ border: "1px solid var(--sxl-color-primary, #1a73e8)",
247
+ boxSizing: "content-box"
248
+ } }, `box-${t}`)), ie.handles.map((e, t) => i("div", { style: {
249
+ position: "absolute",
250
+ left: e.x - 3,
251
+ top: e.y - 3,
252
+ width: 6,
253
+ height: 6,
254
+ background: "var(--sxl-color-base-100, #fff)",
255
+ border: "1px solid var(--sxl-color-primary, #1a73e8)",
256
+ boxSizing: "border-box"
257
+ } }, `handle-${t}`))]
258
+ }) : null
259
+ ]
260
+ });
261
+ }));
262
+ M.displayName = "ChartElement";
263
+ export { b as a, x as i, w as n, y as o, v as r, M 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.11
2
+ * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.12
3
3
  *
4
4
  * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
5
  * License: The license can be found at https://www.sheetxl.com/license.
@@ -1,40 +1,41 @@
1
1
  /**
2
- * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.11
2
+ * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.12
3
3
  *
4
4
  * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
5
  * License: The license can be found at https://www.sheetxl.com/license.
6
6
  */
7
- import { n as e, t } from "./DJPgbB1X22YmhbaR.mjs";
8
- import { forwardRef as r, memo as o, useCallback as n, useLayoutEffect as l, useRef as a } from "react";
9
- import { jsx as i } from "react/jsx-runtime";
10
- import { useImperativeElement as s } from "@sheetxl/utils-react";
11
- import { useMergeRefs as m } from "react-merge-refs";
12
- var c = o(r((e, r) => {
13
- const { children: o, disabled: c, style: g, chart: p, zoom: h = 1, isDragging: d, movable: u, onHide: f, onShow: x, onDragZone: E, adornmentHost: v, flip: b, gesture: y, ...w } = e, S = s(r, () => ({ isChartEditor: () => !0 }), []), A = a(null), C = m([S, A]), D = u?.getRange()?.getWorksheet()?.getView()?.getChartElementSelection() ?? null;
14
- l(() => {
15
- E?.((e) => {
7
+ import { i as e, n as t, t as r } from "./YB_qExw23Ci4nMYy.mjs";
8
+ import { forwardRef as o, memo as n, useCallback as l, useLayoutEffect as i, useRef as s } from "react";
9
+ import { jsx as a } from "react/jsx-runtime";
10
+ import { useImperativeElement as m } from "@sheetxl/utils-react";
11
+ import { useMergeRefs as c } from "react-merge-refs";
12
+ var g = n(o((t, o) => {
13
+ const { children: n, disabled: g, style: h, chart: p, zoom: d = 1, isDragging: u, movable: f, onHide: x, onShow: E, onDragZone: v, adornmentHost: b, flip: y, gesture: S, ...w } = t, A = m(o, () => ({ isChartEditor: () => !0 }), []), C = s(null), D = c([A, C]), j = e(), z = f?.getRange()?.getWorksheet()?.getView()?.getChartElementSelection() ?? null;
14
+ i(() => {
15
+ v?.((e) => {
16
16
  const t = "touches" in e ? e.touches[0] : e;
17
17
  if (!t) return !0;
18
- const r = A.current?.getElementAt(t.clientX, t.clientY) ?? null;
18
+ const r = C.current?.getElementAt(t.clientX, t.clientY) ?? null;
19
19
  return !r || "chartArea" === r.getElementType();
20
20
  });
21
- }, [E]);
22
- const j = n((e) => {
23
- !c && e.element && "chartArea" !== e.element.getElementType() && (e.event.stopPropagation(), u && !u.isSelected() && u.select());
24
- }, [u, c]);
25
- if (!p.isDeleted()) return i(t, {
21
+ }, [v]);
22
+ const H = l((e) => {
23
+ !g && e.element && "chartArea" !== e.element.getElementType() && (e.event.stopPropagation(), f && !f.isSelected() && f.select());
24
+ }, [f, g]);
25
+ if (!p.isDeleted()) return a(r, {
26
26
  ...w,
27
27
  chart: p,
28
- zoom: h,
29
- selection: c ? null : D,
30
- onElementPress: j,
28
+ zoom: d,
29
+ colorScheme: j,
30
+ selection: g ? null : z,
31
+ onElementPress: H,
31
32
  style: {
32
- ...g,
33
- filter: c ? "blur(1px)" : void 0,
34
- boxShadow: d ? "1px 1px 2px var(--sxl-color-shadow, rgba(0,0,0,.15))" : void 0
33
+ ...h,
34
+ filter: g ? "blur(1px)" : void 0,
35
+ boxShadow: u ? "1px 1px 2px var(--sxl-color-shadow, rgba(0,0,0,.15))" : void 0
35
36
  },
36
- ref: C
37
+ ref: D
37
38
  });
38
39
  }));
39
- c.displayName = "ChartEditor";
40
- export { c as ChartEditor, t as ChartElement, e as nextSelected };
40
+ g.displayName = "ChartEditor";
41
+ export { g as ChartEditor, r as ChartElement, t as nextSelected };
@@ -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.11
2
+ * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.12
3
3
  *
4
4
  * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
5
  * License: The license can be found at https://www.sheetxl.com/license.
6
6
  */
7
- import { t as e } from "./Dj5FM7_-YWhCtCCt.mjs";
7
+ import { t as e } from "./MWges5ywL3aEdChp.mjs";
8
8
  import { memo as t, useEffect as n, useReducer as r, useRef as o } from "react";
9
9
  import { jsx as i, jsxs as l } from "react/jsx-runtime";
10
10
  var d = (e) => {
@@ -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.11
2
+ * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.12
3
3
  *
4
4
  * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
5
  * License: The license can be found at https://www.sheetxl.com/license.
6
6
  */
7
- import { t as e } from "./Dj5FM7_-YWhCtCCt.mjs";
8
- import { h as t, i as o, p as n } from "./umljAT66yb3_rURh.mjs";
7
+ import { t as e } from "./MWges5ywL3aEdChp.mjs";
8
+ import { h as t, i as o, p as n } from "./DWkPWuf5ZrLRMixG.mjs";
9
9
  import { forwardRef as i, memo as r, useContext as s, useEffect as l, useReducer as a } from "react";
10
10
  import { jsx as d, jsxs as g } from "react/jsx-runtime";
11
11
  import { useSurfaceState as h } from "@sheetxl/grid-react";
@@ -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.11
2
+ * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.12
3
3
  *
4
4
  * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
5
  * License: The license can be found at https://www.sheetxl.com/license.