@sheetxl/react 0.8.0-beta.22 → 0.8.0-beta.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/esm/{Bjzo7g25tw9kTCYC.mjs → 6KeWPjMKNZY8i19M.mjs} +2 -2
- package/browser/esm/{CJVcfqrty5b-eowN.mjs → 9t5N76NQ0awbiItG.mjs} +2 -2
- package/browser/esm/{QKnTzTdIYAMcBU8r.mjs → B-rvtChAVnzrPJsd.mjs} +1 -1
- package/browser/esm/{DxsGY5rYjITV3SLK.mjs → B0asaf6iVJnOyxYq.mjs} +1 -1
- package/browser/esm/{np1ChcItFltS6AC5.mjs → BoljuF1xywgBQ3vp.mjs} +1 -1
- package/browser/esm/{CgOhJ3utK7aSQm26.mjs → BuDfdWztNZKCN_Ld.mjs} +1 -1
- package/browser/esm/{D7P7zWW2gdWclI2p.mjs → BwuvgXRS-KMp6XCe.mjs} +3 -3
- package/browser/esm/{Biz8qA4-1wRN8de2.mjs → By0ADE8R8h3hKM64.mjs} +1 -1
- package/browser/esm/{DyFeCww9e_4G9c-1.mjs → CGazs9mfVVzc04Y7.mjs} +178 -158
- package/browser/esm/{DgmkBz2cYtVZ8tXv.mjs → CXX4sovIFgAQsSxN.mjs} +1 -1
- package/browser/esm/{D8NUgUzdI7YFxyyA.mjs → CaV--rSRIoGsErhZ.mjs} +7 -7
- package/browser/esm/{D01C312OntVURMN9.mjs → CfIPv0YuwhlpYzf2.mjs} +122 -122
- package/browser/esm/{mJyEnJIX0iGfGtvE.mjs → Cgbmuy79jiY1HjS3.mjs} +1 -1
- package/browser/esm/{HQkKZC6SPUdQwgxi.mjs → CmoM33qZfV9EioFC.mjs} +1 -1
- package/browser/esm/{hTeTTb8oYTssk6EY.mjs → DHncl8rL4Tri3OBI.mjs} +1 -1
- package/browser/esm/{D0g7sllamMog1m-Z.mjs → DK8YNIcwWG9l7BpT.mjs} +3 -3
- package/browser/esm/{BPS1PDZKyF6ivJwa.mjs → DQfqezyi9TgWoADc.mjs} +1 -1
- package/browser/esm/{DH8xeknZXWn7AV5q.mjs → Dw1dknWgStq1jnIp.mjs} +6 -6
- package/browser/esm/{B9rbGikcuRq1OnhM.mjs → IF4tK8a7bQsrq8gd.mjs} +2 -2
- package/browser/esm/{BqIbT28MM3SBdvh_.mjs → ISe4yn20JJcyYnhz.mjs} +2 -2
- package/browser/esm/{mUKvsPCmRWzQke-M.mjs → UKEdlUOzahaOstGm.mjs} +1 -1
- package/browser/esm/{DhGJU1camaOf7KOq.mjs → W00O27emy3mpzSYw.mjs} +4 -4
- package/browser/esm/chart.mjs +11 -11
- package/browser/esm/control.mjs +16 -16
- package/browser/esm/{C7rc3CMd_XOITW1V.mjs → dwz-qrgJG3GabtJ0.mjs} +7 -7
- package/browser/esm/group.mjs +29 -29
- package/browser/esm/index.mjs +6469 -6440
- package/browser/esm/{B9wkino8VMasq6E3.mjs → jmoe5Dbqx1WjBgUO.mjs} +2 -2
- package/browser/esm/note.mjs +10 -10
- package/browser/esm/picture.mjs +2 -2
- package/browser/esm/{CrTfqdSwWScJN566.mjs → plaFoOG2sGGR9984.mjs} +1 -1
- package/browser/esm/shape.mjs +2 -2
- package/browser/esm/slicer.mjs +55 -50
- package/node/esm/{GG78Gq3CY8SDS-48.mjs → 7HceIR_VkgIhKM8f.mjs} +12 -12
- package/node/esm/{CZc2QH8i-TgW9nGI.mjs → 9vtv3spOcuota3Vb.mjs} +1 -1
- package/node/esm/{BPMjPMRyVTEZq_6j.mjs → B0EM467vxmzaUp9t.mjs} +1 -1
- package/node/esm/{BpcTu_chuDjr_XFv.mjs → BUiM5r_ksWRJMWPn.mjs} +1 -1
- package/node/esm/{CE5fMGMmykts2yJP.mjs → BYhlpUYwaNUr67Yi.mjs} +1 -1
- package/node/esm/{COlzVELrEvgm2STX.mjs → Bd_YMUKA8RxBL4G2.mjs} +4 -4
- package/node/esm/{DHTbAHbCiEWhilV_.mjs → BgCEqNCStGMDZ1QF.mjs} +1 -1
- package/node/esm/{FUQMKIiQQ5m3xzeO.mjs → BguHdiclysorJICc.mjs} +1 -1
- package/node/esm/{C3XXdc_UXH2g2W5E.mjs → BlahUrDcsABBUCM0.mjs} +1 -1
- package/node/esm/{C91YeRrspETjFcRc.mjs → Bub_Mjqm7gIOrcpM.mjs} +2 -2
- package/node/esm/{aLt3NYdUcYQu4Ur4.mjs → CH0kTLjibrtP2Cbj.mjs} +1 -1
- package/node/esm/{i4aPmKocZebCBeSd.mjs → CHPFQjpRp8efzowW.mjs} +6 -6
- package/node/esm/{l0GtU6LYlBywzc9T.mjs → CtBn6NAJs8ogJXEf.mjs} +2 -2
- package/node/esm/{CzQMRmArhJ6blZJp.mjs → D1Kny6jQY-Z5cM3U.mjs} +1 -1
- package/node/esm/{CcLUKcJROXrbSXjb.mjs → D2CFdcWIygfybLGD.mjs} +1 -1
- package/node/esm/{CfpNgRvWmu36cTfV.mjs → DFc3ldcMwcvqOz8-.mjs} +5 -5
- package/node/esm/{cju5Gx-t_74o116W.mjs → DHtgb2GVYcKg4gyl.mjs} +2 -2
- package/node/esm/{DX7ysYSfnigj0ak8.mjs → DUzvBfMhVRALWCyY.mjs} +1 -1
- package/node/esm/{DxKxx-yEkSydHyWQ.mjs → DXMUS-l19Pg6Apgt.mjs} +1 -1
- package/node/esm/chart.mjs +19 -19
- package/node/esm/control.mjs +16 -16
- package/node/esm/{BcASbEBHzMKiXn5i.mjs → fFLn4uIFYXSk57YZ.mjs} +1 -1
- package/node/esm/group.mjs +27 -27
- package/node/esm/index.mjs +3640 -3610
- package/node/esm/note.mjs +10 -10
- package/node/esm/picture.mjs +182 -161
- package/node/esm/shape.mjs +169 -169
- package/node/esm/slicer.mjs +100 -95
- package/node/esm/{-6T2zqPkDm0WgUKI.mjs → xDrQGeYKZL5Q1dWB.mjs} +2 -2
- package/package.json +7 -7
- package/types/src/cell/CornerTriangle.d.ts +2 -1
- package/types/src/editor/SheetCellEditorLayer.d.ts +0 -5
- package/types/src/editor/formulaPresentation.d.ts +4 -3
- package/types/src/movable/IMovableArea.d.ts +11 -0
- package/types/src/sheet/IWorksheetElement.d.ts +13 -4
- package/types/src/theme/ExplicitTokens.d.ts +18 -0
- package/types/src/theme/ThemeRootStyles.d.ts +31 -0
- package/types/src/theme/buildTokensCSS.d.ts +15 -0
- package/types/src/theme/index.d.ts +2 -4
- package/types/src/theme/useAppColorScheme.d.ts +4 -1
- package/types/src/theme/useGridColorScheme.d.ts +2 -1
- package/types/src/theme/useSystemColors.d.ts +0 -14
- package/types/src/workbook/IWorkbookElement.d.ts +71 -10
package/node/esm/chart.mjs
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.
|
|
2
|
+
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.24
|
|
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, t as r } from "./
|
|
8
|
-
import { forwardRef as o, memo as n, useCallback as l, useLayoutEffect as
|
|
9
|
-
import { jsx as
|
|
7
|
+
import { i as e, n as t, t as r } from "./CHPFQjpRp8efzowW.mjs";
|
|
8
|
+
import { forwardRef as o, memo as n, useCallback as l, useLayoutEffect as a, useRef as i } from "react";
|
|
9
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
10
10
|
import { useImperativeElement as m } from "@sheetxl/utils-react";
|
|
11
11
|
import { useMergeRefs as c } from "react-merge-refs";
|
|
12
|
-
var
|
|
13
|
-
const { children: n, disabled:
|
|
14
|
-
|
|
12
|
+
var p = n(o((t, o) => {
|
|
13
|
+
const { children: n, disabled: p, style: g, chart: h, zoom: d = 1, isDragging: u, movable: f, onHide: x, onShow: E, onDragZone: v, onTap: b, adornmentHost: y, flip: S, gesture: w, ...A } = t, C = m(o, () => ({ isChartEditor: () => !0 }), []), D = i(null), T = c([C, D]), j = e(), z = f?.getRange()?.getWorksheet()?.getView()?.getChartElementSelection() ?? null;
|
|
14
|
+
a(() => {
|
|
15
15
|
v?.((e) => {
|
|
16
16
|
const t = "touches" in e ? e.touches[0] : e;
|
|
17
17
|
if (!t) return !0;
|
|
18
|
-
const r =
|
|
18
|
+
const r = D.current?.getElementAt(t.clientX, t.clientY) ?? null;
|
|
19
19
|
return !r || "chartArea" === r.getElementType();
|
|
20
20
|
});
|
|
21
21
|
}, [v]);
|
|
22
22
|
const H = l((e) => {
|
|
23
|
-
!
|
|
24
|
-
}, [f,
|
|
25
|
-
if (!
|
|
26
|
-
...
|
|
27
|
-
chart:
|
|
23
|
+
!p && e.element && "chartArea" !== e.element.getElementType() && (e.event.stopPropagation(), f && !f.isSelected() && f.select());
|
|
24
|
+
}, [f, p]);
|
|
25
|
+
if (!h.isDeleted()) return s(r, {
|
|
26
|
+
...A,
|
|
27
|
+
chart: h,
|
|
28
28
|
zoom: d,
|
|
29
29
|
colorScheme: j,
|
|
30
|
-
selection:
|
|
30
|
+
selection: p ? null : z,
|
|
31
31
|
onElementPress: H,
|
|
32
32
|
style: {
|
|
33
|
-
...
|
|
34
|
-
filter:
|
|
33
|
+
...g,
|
|
34
|
+
filter: p ? "blur(1px)" : void 0,
|
|
35
35
|
boxShadow: u ? "1px 1px 2px var(--sxl-color-shadow, rgba(0,0,0,.15))" : void 0
|
|
36
36
|
},
|
|
37
|
-
ref:
|
|
37
|
+
ref: T
|
|
38
38
|
});
|
|
39
39
|
}));
|
|
40
|
-
|
|
41
|
-
export {
|
|
40
|
+
p.displayName = "ChartEditor";
|
|
41
|
+
export { p as ChartEditor, r as ChartElement, t as nextSelected };
|
package/node/esm/control.mjs
CHANGED
|
@@ -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.
|
|
2
|
+
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.24
|
|
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 "./
|
|
7
|
+
import { t as e } from "./DUzvBfMhVRALWCyY.mjs";
|
|
8
8
|
import { IFont as t } from "@sheetxl/sdk";
|
|
9
9
|
import { memo as n, useEffect as r, useReducer as o, useRef as i } from "react";
|
|
10
10
|
import { jsx as l, jsxs as d } from "react/jsx-runtime";
|
|
@@ -29,22 +29,22 @@ var a = (e) => {
|
|
|
29
29
|
whiteSpace: "nowrap"
|
|
30
30
|
}, g = (t, i) => {
|
|
31
31
|
const d = n((n) => {
|
|
32
|
-
const { children: i, disabled: d, style: a, movable: c, zoom: g = 1, isDragging: h, onHide: p, onShow: u, onDragZone: m,
|
|
33
|
-
e(
|
|
34
|
-
|
|
32
|
+
const { children: i, disabled: d, style: a, movable: c, zoom: g = 1, isDragging: h, onHide: p, onShow: u, onDragZone: m, onTap: x, adornmentHost: y, flip: f, ...b } = n, v = c.getContent(), [, w] = o((e) => e + 1, 0);
|
|
33
|
+
e(v, { onAnyChange() {
|
|
34
|
+
w();
|
|
35
35
|
} });
|
|
36
|
-
const
|
|
36
|
+
const C = v, I = v, S = C.getLinkedCell?.() ?? null;
|
|
37
37
|
r(() => {
|
|
38
|
-
if (
|
|
39
|
-
}, [
|
|
40
|
-
const
|
|
38
|
+
if (S) return C.getLinkedRange?.()?.addListener(() => w(), { ignoreAddressChanges: !0 });
|
|
39
|
+
}, [v, S]);
|
|
40
|
+
const R = I.getListFillRange?.() ?? null;
|
|
41
41
|
if (r(() => {
|
|
42
|
-
if (
|
|
43
|
-
}, [
|
|
44
|
-
const
|
|
42
|
+
if (R) return I.getListSourceRange?.()?.addListener(() => w(), { ignoreAddressChanges: !0 });
|
|
43
|
+
}, [v, R]), v.isDeleted()) return null;
|
|
44
|
+
const k = c.getBounds();
|
|
45
45
|
return l("div", {
|
|
46
46
|
className: "sxl-form-control-renderer",
|
|
47
|
-
...
|
|
47
|
+
...b,
|
|
48
48
|
style: {
|
|
49
49
|
width: "100%",
|
|
50
50
|
height: "100%",
|
|
@@ -58,9 +58,9 @@ var a = (e) => {
|
|
|
58
58
|
inert: !0,
|
|
59
59
|
style: s,
|
|
60
60
|
children: l(t, {
|
|
61
|
-
control:
|
|
62
|
-
width:
|
|
63
|
-
height:
|
|
61
|
+
control: v,
|
|
62
|
+
width: k?.width ?? 0,
|
|
63
|
+
height: k?.height ?? 0
|
|
64
64
|
})
|
|
65
65
|
})
|
|
66
66
|
});
|
|
@@ -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.
|
|
2
|
+
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.24
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: SheetXL EULA — https://www.sheetxl.com/eula
|
package/node/esm/group.mjs
CHANGED
|
@@ -1,45 +1,45 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.
|
|
2
|
+
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.24
|
|
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 "./
|
|
8
|
-
import { h as t, i as o, p as n } from "./
|
|
7
|
+
import { t as e } from "./DUzvBfMhVRALWCyY.mjs";
|
|
8
|
+
import { h as t, i as o, p as n } from "./Bd_YMUKA8RxBL4G2.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";
|
|
12
12
|
var p = r(i((i, r) => {
|
|
13
|
-
const { children: p, disabled: m, style: c, container: u, movable: v, zoom: f = 1, isDragging: x, onHide: y, onShow: b, onDragZone: w,
|
|
13
|
+
const { children: p, disabled: m, style: c, container: u, movable: v, zoom: f = 1, isDragging: x, onHide: y, onShow: b, onDragZone: w, onTap: C, adornmentHost: E, flip: $, gesture: I, ...j } = i, [, B] = a((e) => e + 1, 0);
|
|
14
14
|
e(v ?? null, {
|
|
15
|
-
onBoundsChange:
|
|
16
|
-
onSelectionChange:
|
|
17
|
-
onAnyChange:
|
|
15
|
+
onBoundsChange: B,
|
|
16
|
+
onSelectionChange: B,
|
|
17
|
+
onAnyChange: B
|
|
18
18
|
});
|
|
19
|
-
const
|
|
20
|
-
e(
|
|
21
|
-
const [
|
|
19
|
+
const N = v?.getMovables() ?? null;
|
|
20
|
+
e(N, { onCollectionChange: B });
|
|
21
|
+
const [z] = h("movable-drag", null), D = s(n), H = N?.getItems({ ignoreHidden: !0 }) ?? [];
|
|
22
22
|
l(() => {
|
|
23
|
-
const e =
|
|
24
|
-
onBoundsChange:
|
|
25
|
-
onAnyChange:
|
|
26
|
-
onSelectionChange:
|
|
23
|
+
const e = H.map((e) => e.addListeners({
|
|
24
|
+
onBoundsChange: B,
|
|
25
|
+
onAnyChange: B,
|
|
26
|
+
onSelectionChange: B
|
|
27
27
|
}));
|
|
28
28
|
return () => {
|
|
29
29
|
for (const t of e) t();
|
|
30
30
|
};
|
|
31
|
-
}, [
|
|
32
|
-
const
|
|
33
|
-
if (u.isDeleted() || !v || !
|
|
34
|
-
const
|
|
35
|
-
`translate(${
|
|
31
|
+
}, [H.map((e) => e.getId()).join("|")]);
|
|
32
|
+
const S = v?.getBounds();
|
|
33
|
+
if (u.isDeleted() || !v || !S) return null;
|
|
34
|
+
const k = "none" === c?.pointerEvents, A = !k && !m && v.isSelected(), F = z?.[v.getId()] ?? null, O = F?.bounds ?? S, R = v.getFlip(), T = $ ?? F?.flip ?? R, G = (S.width > 0 ? O.width / S.width : 1) * (T.horizontal !== R.horizontal ? -1 : 1), L = (S.height > 0 ? O.height / S.height : 1) * (T.vertical !== R.vertical ? -1 : 1), M = v.getRotation() || 0, W = [
|
|
35
|
+
`translate(${O.width * f / 2}px, ${O.height * f / 2}px)`,
|
|
36
36
|
1 !== G || 1 !== L ? `scale(${G}, ${L})` : "",
|
|
37
37
|
M ? `rotate(${-M}deg)` : "",
|
|
38
|
-
`translate(${-(
|
|
38
|
+
`translate(${-(S.x + S.width / 2) * f}px, ${-(S.y + S.height / 2) * f}px)`
|
|
39
39
|
].filter(Boolean).join(" ");
|
|
40
40
|
return g("div", {
|
|
41
41
|
className: "sxl-group-editor",
|
|
42
|
-
...
|
|
42
|
+
...j,
|
|
43
43
|
ref: r,
|
|
44
44
|
style: {
|
|
45
45
|
width: "100%",
|
|
@@ -56,11 +56,11 @@ var p = r(i((i, r) => {
|
|
|
56
56
|
left: 0,
|
|
57
57
|
top: 0,
|
|
58
58
|
transformOrigin: "0 0",
|
|
59
|
-
transform:
|
|
59
|
+
transform: W,
|
|
60
60
|
pointerEvents: "none"
|
|
61
61
|
},
|
|
62
|
-
children:
|
|
63
|
-
const n = o(e.getContent().getType()), i =
|
|
62
|
+
children: H.map((e) => {
|
|
63
|
+
const n = o(e.getContent().getType()), i = z?.[e.getId()] ?? null, r = i?.bounds ?? e.getBounds();
|
|
64
64
|
if (!r || !n) return null;
|
|
65
65
|
const s = i?.rotation ?? (e.getRotation() || 0);
|
|
66
66
|
return d("div", {
|
|
@@ -83,19 +83,19 @@ var p = r(i((i, r) => {
|
|
|
83
83
|
flip: i?.flip ?? e.getFlip(),
|
|
84
84
|
disabled: m,
|
|
85
85
|
isDragging: x || !!i,
|
|
86
|
-
adornmentHost:
|
|
86
|
+
adornmentHost: D.get(e) ?? null,
|
|
87
87
|
style: {
|
|
88
88
|
position: "relative",
|
|
89
89
|
left: 0,
|
|
90
90
|
top: 0,
|
|
91
91
|
width: "100%",
|
|
92
92
|
height: "100%",
|
|
93
|
-
pointerEvents:
|
|
93
|
+
pointerEvents: k ? "none" : "auto"
|
|
94
94
|
}
|
|
95
95
|
})
|
|
96
96
|
}, e.getId());
|
|
97
97
|
})
|
|
98
|
-
}),
|
|
98
|
+
}), A ? d("svg", {
|
|
99
99
|
className: "sxl-group-edge",
|
|
100
100
|
width: "100%",
|
|
101
101
|
height: "100%",
|