@sheetxl/utils-react 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.
- package/browser/cjs/index.cjs +2 -2
- package/browser/esm/index.mjs +170 -167
- package/node/esm/index.mjs +64 -61
- package/package.json +2 -2
- package/types/index.d.ts +1 -1
package/node/esm/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/utils-react - Utils React - Utilities for React capabilities needed for all SheetXL components. - v0.4.
|
|
2
|
+
* @license @sheetxl/utils-react - Utils React - Utilities for React capabilities needed for all SheetXL components. - v0.4.22
|
|
3
3
|
*
|
|
4
4
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -8,7 +8,7 @@ import { jsx as t, jsxs as e, Fragment as n } from "react/jsx-runtime";
|
|
|
8
8
|
import o, { useCallback as i, useRef as r, memo as s, forwardRef as l, useState as a, useEffect as c, useMemo as h, useImperativeHandle as u, useLayoutEffect as d, createElement as _, useReducer as p } from "react";
|
|
9
9
|
import m from "clsx";
|
|
10
10
|
import { useMeasure as f } from "react-use";
|
|
11
|
-
import { CommonUtils as g,
|
|
11
|
+
import { CommonUtils as g, InternalClipboard as y, ClipboardUtils as v, MimeType as x } from "@sheetxl/utils";
|
|
12
12
|
import * as b from "detect-it";
|
|
13
13
|
import { mergeRefs as w } from "react-merge-refs";
|
|
14
14
|
import { createRoot as S } from "react-dom/client";
|
|
@@ -622,7 +622,9 @@ const Kt = [], Ot = [], Vt = () => {
|
|
|
622
622
|
})(Ht)), Vt(), () => {
|
|
623
623
|
Kt.splice(Kt.findIndex((t2) => t2.key === n2), 1), Vt();
|
|
624
624
|
};
|
|
625
|
-
}
|
|
625
|
+
};
|
|
626
|
+
let Nt = null;
|
|
627
|
+
Nt || (Nt = (t2, e2, n2 = {}) => {
|
|
626
628
|
let o2, i2, r2 = false, s2 = false, l2 = [], { unmountIfNoConsumers: h2 = false } = n2;
|
|
627
629
|
const u2 = (t3) => {
|
|
628
630
|
i2 = t3, L(() => l2.forEach((e3) => e3(t3)));
|
|
@@ -633,20 +635,21 @@ const Kt = [], Ot = [], Vt = () => {
|
|
|
633
635
|
l2.splice(l2.indexOf(s3), 1), 0 === l2.length && h2 && (o2(), r2 = false);
|
|
634
636
|
}), []), n3;
|
|
635
637
|
};
|
|
636
|
-
};
|
|
637
|
-
|
|
638
|
+
});
|
|
639
|
+
const Rt = Nt;
|
|
640
|
+
let Ft = () => {
|
|
638
641
|
console.warn("You must call useEditMode before setting its state.");
|
|
639
642
|
};
|
|
640
|
-
const
|
|
643
|
+
const It = Rt(null, () => {
|
|
641
644
|
const [t2, e2] = a(null);
|
|
642
|
-
return
|
|
643
|
-
}),
|
|
644
|
-
const t2 =
|
|
645
|
+
return Ft = e2, t2;
|
|
646
|
+
}), Yt = () => {
|
|
647
|
+
const t2 = It();
|
|
645
648
|
return h(() => ({ setMode: (t3) => {
|
|
646
|
-
|
|
649
|
+
Ft((e2) => ("function" == typeof t3 && (t3 = t3(e2)), t3?.onModeChange?.(t3 ?? null), t3));
|
|
647
650
|
}, getMode: () => t2 }), [t2]);
|
|
648
651
|
};
|
|
649
|
-
class
|
|
652
|
+
class Xt {
|
|
650
653
|
constructor(t2, e2, n2, o2) {
|
|
651
654
|
this._listenersProperties = /* @__PURE__ */ new Set(), this._listenersExecute = /* @__PURE__ */ new Set(), this._key = t2, this._target = e2, this._applyProps(n2 || {}), this._callback = o2, void 0 === o2 && (this._callback = () => {
|
|
652
655
|
console.log(`implement: ${this.label()} : ${this.description()}`);
|
|
@@ -758,9 +761,9 @@ class Yt {
|
|
|
758
761
|
}), e2;
|
|
759
762
|
}
|
|
760
763
|
}
|
|
761
|
-
class
|
|
764
|
+
class jt extends Xt {
|
|
762
765
|
}
|
|
763
|
-
class
|
|
766
|
+
class Ut {
|
|
764
767
|
constructor(t2, e2) {
|
|
765
768
|
this._target = null, this._groupKey = null, this._root = null, this._parent = null, this._uuid = g.uuidV4(), this._target = t2, this._groupKey = e2 ?? null, this._root = this, this._nodes = /* @__PURE__ */ new Map(), this._nodes.set(e2, this), this._children = /* @__PURE__ */ new Map(), this._listeners = /* @__PURE__ */ new Set(), this._commandsByKey = /* @__PURE__ */ new Map(), this._commandsByShortcut = /* @__PURE__ */ new Map();
|
|
766
769
|
const n2 = this;
|
|
@@ -788,7 +791,7 @@ class jt {
|
|
|
788
791
|
n3 && (o2 = n3), t3 = t3._parent;
|
|
789
792
|
}
|
|
790
793
|
}
|
|
791
|
-
o2 || (o2 = new
|
|
794
|
+
o2 || (o2 = new Ut(t2, e2), o2._parent = this, o2._root = this._root, o2._unListenersByCommand = null, o2._listenersByKey = null, o2._commandsPropertyListener = null);
|
|
792
795
|
const i2 = (t3, o3) => {
|
|
793
796
|
!t3.has(e2) || n2 ? t3.set(e2, o3) : void 0 === n2 && console.warn("commandGroup already registered", e2);
|
|
794
797
|
};
|
|
@@ -820,7 +823,7 @@ class jt {
|
|
|
820
823
|
if (!u2) continue;
|
|
821
824
|
const d2 = Array.isArray(u2) ? u2 : [u2];
|
|
822
825
|
for (let t3 = 0; t3 < d2.length; t3++) {
|
|
823
|
-
const n3 =
|
|
826
|
+
const n3 = qt(d2[t3]), i3 = o2.get(n3);
|
|
824
827
|
i3 && !e2 && void 0 === e2 && console.warn(`Shortcut already registered: ${n3}, ${a2}, ${i3}.`), o2.set(n3, a2);
|
|
825
828
|
}
|
|
826
829
|
}
|
|
@@ -855,10 +858,10 @@ class jt {
|
|
|
855
858
|
findCommandByEvent(t2) {
|
|
856
859
|
const e2 = [];
|
|
857
860
|
t2.altKey && e2.push(E.Alt), t2.shiftKey && e2.push(E.Shift), t2.ctrlKey && e2.push(E.Ctrl), t2.metaKey && e2.push(E.Meta);
|
|
858
|
-
let n2 =
|
|
861
|
+
let n2 = qt({ key: t2.code, modifiers: e2 });
|
|
859
862
|
const o2 = this._commandsByShortcut;
|
|
860
863
|
let i2 = o2.get(n2);
|
|
861
|
-
i2 || (n2 =
|
|
864
|
+
i2 || (n2 = qt({ key: t2.key, modifiers: e2 }), i2 = o2.get(n2)), !i2 && t2.code.startsWith("Digit") && (n2 = qt({ key: t2.code.substring(5, t2.code.length), modifiers: e2 }), i2 = this._commandsByShortcut.get(n2)), !i2 && t2.code.startsWith("Key") && (i2 = qt({ key: t2.code.substring(3, t2.code.length), modifiers: e2 }), i2 = o2.get(n2));
|
|
862
865
|
let r2 = null;
|
|
863
866
|
return i2 && (r2 = this._commandsByKey.get(i2), r2 && r2.disabled() && (r2 = null), !r2 || r2.target() && r2.target().contains(t2.target) || (r2 = null)), r2 || (this._parent?.findCommandByEvent(t2) ?? null);
|
|
864
867
|
}
|
|
@@ -917,13 +920,13 @@ class jt {
|
|
|
917
920
|
}), t2;
|
|
918
921
|
}
|
|
919
922
|
}
|
|
920
|
-
const
|
|
923
|
+
const Zt = g.getOS() === g.OSType.MacOS || g.getOS() === g.OSType.IOS ? "Cmd" : "Ctrl", Gt = g.getOS() === g.OSType.MacOS || g.getOS() === g.OSType.IOS ? "⌘" : "^", qt = (t2, e2 = false) => {
|
|
921
924
|
const n2 = {};
|
|
922
925
|
for (let e3 = 0; t2.modifiers && e3 < t2.modifiers.length; e3++) n2[t2.modifiers[e3]] = true;
|
|
923
926
|
let o2 = "";
|
|
924
|
-
return (n2?.[E.Ctrl] || n2?.[E.Meta]) && (o2 += (o2.length > 0 ? "+" : "") + (e2 ?
|
|
927
|
+
return (n2?.[E.Ctrl] || n2?.[E.Meta]) && (o2 += (o2.length > 0 ? "+" : "") + (e2 ? Gt : Zt)), n2?.[E.Alt] && (o2 += e2 ? "⌥" : "Alt"), n2?.[E.Shift] && (o2 += (o2.length > 0 ? "+" : "") + (e2 ? "⇧" : "Shift")), o2 += (o2.length > 0 ? "+" : "") + G(t2.key), o2;
|
|
925
928
|
};
|
|
926
|
-
function
|
|
929
|
+
function Jt(t2, e2 = null) {
|
|
927
930
|
const n2 = r(e2);
|
|
928
931
|
n2.current = e2;
|
|
929
932
|
const [o2, i2] = p((t3) => t3 + 1, 0), s2 = h(() => Array.isArray(t2) ? t2 : [t2], [t2]);
|
|
@@ -947,7 +950,7 @@ function qt(t2, e2 = null) {
|
|
|
947
950
|
};
|
|
948
951
|
}, [t2]), o2;
|
|
949
952
|
}
|
|
950
|
-
const
|
|
953
|
+
const Qt = (t2, e2) => {
|
|
951
954
|
const n2 = [];
|
|
952
955
|
if (e2) for (let o2 = 0; o2 < e2.length; o2++) {
|
|
953
956
|
const i2 = e2[o2], r2 = i2 ? t2?.getCommand(i2) : null;
|
|
@@ -955,36 +958,36 @@ const Jt = (t2, e2) => {
|
|
|
955
958
|
}
|
|
956
959
|
return n2;
|
|
957
960
|
};
|
|
958
|
-
function
|
|
961
|
+
function te(t2, e2 = null, n2 = null, o2) {
|
|
959
962
|
const i2 = r(n2);
|
|
960
963
|
i2.current = n2, e2 && !Array.isArray(e2) && (e2 = [e2]);
|
|
961
|
-
const [s2, l2] = a(
|
|
964
|
+
const [s2, l2] = a(Qt(t2, e2)), h2 = o2 ? [...o2, t2] : [t2];
|
|
962
965
|
return c(() => {
|
|
963
966
|
const n3 = { onGroupChange: () => {
|
|
964
|
-
const n4 =
|
|
967
|
+
const n4 = Qt(t2, e2);
|
|
965
968
|
l2(n4), i2.current?.onChange?.(this);
|
|
966
969
|
} };
|
|
967
970
|
let o3;
|
|
968
971
|
e2 && e2.length > 0 && (o3 = { keys: e2 }, n3.onCommandChange = (n4, o4) => {
|
|
969
|
-
i2.current?.onChange?.(t2), l2(
|
|
972
|
+
i2.current?.onChange?.(t2), l2(Qt(t2, e2));
|
|
970
973
|
});
|
|
971
|
-
const r2 = t2?.addListener(n3, o3), s3 =
|
|
974
|
+
const r2 = t2?.addListener(n3, o3), s3 = Qt(t2, e2);
|
|
972
975
|
return l2(s3), i2.current?.onChange && i2.current?.onChange(t2), () => {
|
|
973
976
|
r2?.();
|
|
974
977
|
};
|
|
975
978
|
}, h2), s2;
|
|
976
979
|
}
|
|
977
|
-
const
|
|
980
|
+
const ee = { Toolbar: "toolbar", Menuitem: "menuitem" }, ne = Rt({ setClipboard: (t2) => {
|
|
978
981
|
throw new Error("This is only available via the useClipboard.");
|
|
979
|
-
}, getClipboard: () =>
|
|
980
|
-
const [t2, e2] = a(
|
|
982
|
+
}, getClipboard: () => y.Global, refNativeCopy: { current: null }, refNativeLastKey: { current: null } }, () => {
|
|
983
|
+
const [t2, e2] = a(y.Global);
|
|
981
984
|
return { setClipboard: (t3) => e2(t3), getClipboard: () => t2, refNativeCopy: r(null), refNativeLastKey: r(null) };
|
|
982
|
-
}),
|
|
983
|
-
const { source: e2, target: n2, onPaste: o2, onClipboardUpdate: r2, notifier: s2 = rt, commands: l2 } = t2, a2 = P(r2, [r2]), u2 = P(o2, [o2]), { getClipboard: d2, refNativeCopy: _2 } =
|
|
985
|
+
}), oe = (t2) => {
|
|
986
|
+
const { source: e2, target: n2, onPaste: o2, onClipboardUpdate: r2, notifier: s2 = rt, commands: l2 } = t2, a2 = P(r2, [r2]), u2 = P(o2, [o2]), { getClipboard: d2, refNativeCopy: _2 } = ne(), p2 = d2();
|
|
984
987
|
h(() => {
|
|
985
988
|
const t3 = e2?.element, o3 = n2?.element ?? e2?.element;
|
|
986
989
|
if (!l2) return;
|
|
987
|
-
const i2 = [new
|
|
990
|
+
const i2 = [new jt("cut", t3, { label: "Cut", description: "Remove the selection and put it on the clipboard so you can paste it somewhere else.", shortcut: { key: "X", modifiers: [E.Ctrl] } }), new jt("copy", t3, { label: "Copy", description: "Put a copy of the selection on the clipboard so you can paste it somewhere else.", shortcut: { key: "C", modifiers: [E.Ctrl] } }), new jt("paste", o3, { label: "Paste", description: "Add content on the clipboard to your document.", shortcut: [{ key: "V", modifiers: [E.Ctrl] }, { key: "F8", modifiers: [E.Ctrl] }] })];
|
|
988
991
|
l2?.addCommands(i2, true);
|
|
989
992
|
}, [l2]);
|
|
990
993
|
const m2 = P(async (t3) => {
|
|
@@ -1042,7 +1045,7 @@ const te = { Toolbar: "toolbar", Menuitem: "menuitem" }, ee = Nt({ setClipboard:
|
|
|
1042
1045
|
const e3 = await p2.readReference();
|
|
1043
1046
|
if (e3) return void await S2(null, e3, t3);
|
|
1044
1047
|
const n3 = [];
|
|
1045
|
-
n3[0] = await
|
|
1048
|
+
n3[0] = await v.readStringFromClipboard(p2, x.plain), n3[1] = await v.readHTMLFromClipboard(p2, x.html), n3[2] = await v.readBlobFromClipboard(p2, x.png);
|
|
1046
1049
|
const o3 = { text: n3[0] ?? null, html: n3[1] ?? null, image: n3[2] ?? null };
|
|
1047
1050
|
await S2(o3, null, t3);
|
|
1048
1051
|
} catch (t4) {
|
|
@@ -1058,9 +1061,9 @@ const te = { Toolbar: "toolbar", Menuitem: "menuitem" }, ee = Nt({ setClipboard:
|
|
|
1058
1061
|
const e4 = await p2.readReference();
|
|
1059
1062
|
a2?.(e4);
|
|
1060
1063
|
}, e3 = (t4) => {
|
|
1061
|
-
s2?.showMessage?.(
|
|
1064
|
+
s2?.showMessage?.(y.ErrorMessages.PermsRead, { onceKey: "clipboard.features" });
|
|
1062
1065
|
}, n3 = (t4) => {
|
|
1063
|
-
s2?.showMessage?.(
|
|
1066
|
+
s2?.showMessage?.(y.ErrorMessages.PermsWrite, { onceKey: "clipboard.features" });
|
|
1064
1067
|
};
|
|
1065
1068
|
return p2.addEventListener("clipboardchange", t3), p2.addEventListener("clipboarderrorread", e3), p2.addEventListener("clipboarderrorwrite", n3), () => {
|
|
1066
1069
|
p2.removeEventListener("clipboardchange", t3), p2.removeEventListener("clipboarderrorread", e3), p2.removeEventListener("clipboarderrorwrite", n3);
|
|
@@ -1070,7 +1073,7 @@ const te = { Toolbar: "toolbar", Menuitem: "menuitem" }, ee = Nt({ setClipboard:
|
|
|
1070
1073
|
l2?.getCommand("cut")?.updateCallback(b2).update({ disabled: !e2 || !n2 }), l2?.getCommand("copy")?.updateCallback(f2).update({ disabled: !e2 }), l2?.getCommand("paste")?.updateCallback(L2).update({ disabled: !n2 });
|
|
1071
1074
|
}, [e2, n2, l2]), { paste: L2, copy: f2, clipboard: p2 };
|
|
1072
1075
|
};
|
|
1073
|
-
function
|
|
1076
|
+
function ie(t2, e2 = true) {
|
|
1074
1077
|
const n2 = r(t2);
|
|
1075
1078
|
c(() => {
|
|
1076
1079
|
if (e2) {
|
|
@@ -1080,17 +1083,17 @@ function oe(t2, e2 = true) {
|
|
|
1080
1083
|
n2.current = t2;
|
|
1081
1084
|
});
|
|
1082
1085
|
}
|
|
1083
|
-
let
|
|
1084
|
-
var
|
|
1085
|
-
const
|
|
1086
|
-
const
|
|
1087
|
-
const [t2, e2] = o.useState(() =>
|
|
1088
|
-
return
|
|
1089
|
-
null == t2 && e2(
|
|
1086
|
+
let re = false, se = 0;
|
|
1087
|
+
var le = "undefined" != typeof document ? d : c;
|
|
1088
|
+
const ae = () => "sheetxl-ui-" + se++;
|
|
1089
|
+
const ce = o["useId".toString()], he = null != ce ? ce : function() {
|
|
1090
|
+
const [t2, e2] = o.useState(() => re ? ae() : void 0);
|
|
1091
|
+
return le(() => {
|
|
1092
|
+
null == t2 && e2(ae());
|
|
1090
1093
|
}, []), o.useEffect(() => {
|
|
1091
|
-
|
|
1094
|
+
re || (re = true);
|
|
1092
1095
|
}, []), t2;
|
|
1093
|
-
},
|
|
1096
|
+
}, ue = "Undo the last action.", de = "Repeat the last action or undo the redo.", _e = (t2) => `Redo ${t2}`, pe = ({ manager: t2, commands: e2, disabled: n2, notifier: o2 = rt }) => {
|
|
1094
1097
|
const i2 = P((e3) => {
|
|
1095
1098
|
try {
|
|
1096
1099
|
t2?.undo(e3);
|
|
@@ -1107,16 +1110,16 @@ const ae = o["useId".toString()], ce = null != ae ? ae : function() {
|
|
|
1107
1110
|
return h(() => {
|
|
1108
1111
|
if (!e2) return;
|
|
1109
1112
|
const t3 = { contains: (t4) => true, focus() {
|
|
1110
|
-
} }, n3 = [new
|
|
1113
|
+
} }, n3 = [new Xt("undo", t3, { label: "Undo", description: ue, shortcut: { key: "z", modifiers: [E.Ctrl] }, disabled: true }, i2), new Xt("redo", t3, { label: "Redo", description: de, shortcut: [{ key: "y", modifiers: [E.Ctrl] }, { key: "F4" }, { key: "Enter", modifiers: [E.Alt] }], disabled: true }, r2)];
|
|
1111
1114
|
e2?.addCommands(n3, true);
|
|
1112
1115
|
}, [e2]), c(() => {
|
|
1113
1116
|
if (!e2) return;
|
|
1114
1117
|
const o3 = () => {
|
|
1115
1118
|
const o4 = t2?.getTopUndoDescription(), i4 = {};
|
|
1116
1119
|
var r3;
|
|
1117
|
-
e2.getCommand("undo").update({ disabled: n2 || !t2 || !t2.hasUndo(), description: o4 ? (r3 = o4, `Undo ${r3}`) :
|
|
1120
|
+
e2.getCommand("undo").update({ disabled: n2 || !t2 || !t2.hasUndo(), description: o4 ? (r3 = o4, `Undo ${r3}`) : ue, state: i4, context: { undoManager: t2 } });
|
|
1118
1121
|
const s2 = t2?.getTopRedoDescription();
|
|
1119
|
-
e2.getCommand("redo").update({ disabled: n2 || !t2 || !t2.hasRedo(), description: s2 ?
|
|
1122
|
+
e2.getCommand("redo").update({ disabled: n2 || !t2 || !t2.hasRedo(), description: s2 ? _e(s2) : de, state: i4, context: { undoManager: t2 } });
|
|
1120
1123
|
};
|
|
1121
1124
|
if (o3(), !t2) return;
|
|
1122
1125
|
const i3 = t2.addListener({ onStackChange() {
|
|
@@ -1126,9 +1129,9 @@ const ae = o["useId".toString()], ce = null != ae ? ae : function() {
|
|
|
1126
1129
|
}, [t2, e2, n2]), { undo: i2, redo: r2 };
|
|
1127
1130
|
};
|
|
1128
1131
|
export {
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
+
Xt as Command,
|
|
1133
|
+
ee as CommandButtonType,
|
|
1134
|
+
Ut as CommandGroup,
|
|
1132
1135
|
rt as DefaultNotifier,
|
|
1133
1136
|
ft as FocusKeyNavigation,
|
|
1134
1137
|
C as HorizontalAlignment,
|
|
@@ -1142,7 +1145,7 @@ export {
|
|
|
1142
1145
|
$ as ScrollUtils,
|
|
1143
1146
|
O as Scrollbar,
|
|
1144
1147
|
D as ScrollbarOrientation,
|
|
1145
|
-
|
|
1148
|
+
jt as SimpleCommand,
|
|
1146
1149
|
Lt as SplitPane,
|
|
1147
1150
|
vt as SplitPaneResizer,
|
|
1148
1151
|
mt as ToolTipPlacement,
|
|
@@ -1154,20 +1157,20 @@ export {
|
|
|
1154
1157
|
tt as defaultCreateScrollbar,
|
|
1155
1158
|
Et as getDevicePixelRatio,
|
|
1156
1159
|
st as getPortalContainer,
|
|
1157
|
-
|
|
1160
|
+
qt as toShortcutString,
|
|
1158
1161
|
P as useCallbackRef,
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
+
Jt as useCommand,
|
|
1163
|
+
te as useCommands,
|
|
1164
|
+
oe as useCopyPaste,
|
|
1162
1165
|
Ct as useDevicePixelRatio,
|
|
1163
|
-
|
|
1166
|
+
Yt as useEditMode,
|
|
1164
1167
|
at as useFullscreenPortal,
|
|
1165
|
-
|
|
1166
|
-
|
|
1168
|
+
ne as useGlobalClipboard,
|
|
1169
|
+
he as useId,
|
|
1167
1170
|
Q as useImperativeElement,
|
|
1168
1171
|
Dt as useMouseDownAndHoldListener,
|
|
1169
1172
|
Tt as useOnClickOrFocusAway,
|
|
1170
1173
|
Mt as useSynchronizedPointerHandler,
|
|
1171
|
-
|
|
1172
|
-
|
|
1174
|
+
ie as useTraceUpdate,
|
|
1175
|
+
pe as useUndoManager
|
|
1173
1176
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sheetxl/utils-react",
|
|
3
3
|
"description": "Utils React - Utilities for React capabilities needed for all SheetXL components.",
|
|
4
|
-
"version": "0.4.
|
|
4
|
+
"version": "0.4.22",
|
|
5
5
|
"license": "SEE LICENSE IN <LICENSE>",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"exports": {
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
"react"
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
|
+
"@sheetxl/utils": "^0.4.22",
|
|
30
31
|
"clsx": "^2.1.1",
|
|
31
32
|
"detect-it": "^4.0.1",
|
|
32
33
|
"react-merge-refs": "^3.0.2",
|
|
@@ -34,7 +35,6 @@
|
|
|
34
35
|
"tiny-invariant": "^1.3.3"
|
|
35
36
|
},
|
|
36
37
|
"peerDependencies": {
|
|
37
|
-
"@sheetxl/utils": "^0.4.20",
|
|
38
38
|
"react": "^19.1.0",
|
|
39
39
|
"react-dom": "^19.1.0"
|
|
40
40
|
}
|
package/types/index.d.ts
CHANGED
|
@@ -1271,7 +1271,7 @@ export declare const useEditMode: () => EditModeHandler;
|
|
|
1271
1271
|
|
|
1272
1272
|
export declare function useFullscreenPortal(): FullscreenPortalRoot;
|
|
1273
1273
|
|
|
1274
|
-
export declare const useGlobalClipboard:
|
|
1274
|
+
export declare const useGlobalClipboard: any;
|
|
1275
1275
|
|
|
1276
1276
|
/**
|
|
1277
1277
|
* Uses React 18's built-in `useId()` when available, or falls back to a
|