@sheetxl/utils-react 0.7.18 → 0.7.20

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.
@@ -1,7 +1,7 @@
1
1
  import { jsxs as m, jsx as c } from "react/jsx-runtime";
2
2
  import { WalkingIcon as a } from "./index.mjs";
3
3
  /**
4
- * @license @sheetxl/utils-react - Utils React - Utilities for React capabilities needed for all SheetXL components. - v0.7.18
4
+ * @license @sheetxl/utils-react - Utils React - Utilities for React capabilities needed for all SheetXL components. - v0.7.20
5
5
  *
6
6
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
7
7
  * License: The license can be found at https://www.sheetxl.com/license.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license @sheetxl/utils-react - Utils React - Utilities for React capabilities needed for all SheetXL components. - v0.7.18
2
+ * @license @sheetxl/utils-react - Utils React - Utilities for React capabilities needed for all SheetXL components. - v0.7.20
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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license @sheetxl/utils-react - Utils React - Utilities for React capabilities needed for all SheetXL components. - v0.7.18
2
+ * @license @sheetxl/utils-react - Utils React - Utilities for React capabilities needed for all SheetXL components. - v0.7.20
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.
@@ -13,7 +13,7 @@ import { useMeasure as M } from "react-use";
13
13
  import T from "clsx";
14
14
  import { createRoot as C } from "react-dom/client";
15
15
  import { unstable_batchedUpdates as k, createPortal as P } from "react-dom";
16
- const D = { General: "general", Left: "left", Right: "right", Center: "center", Justify: "justify", Fill: "fill", Distributed: "distributed", CenterContinuous: "centerContinuous" }, A = { Shift: "shift", Alt: "alt", Ctrl: "ctrl", Meta: "meta" }, z = { BackSpace: 8, Tab: 9, Clear: 12, Enter: 13, Shift: 16, Control: 17, Alt: 18, Pause: 19, CapsLock: 20, Escape: 27, Space: 32, PageUp: 33, PageDown: 34, End: 35, Home: 36, Left: 37, Up: 38, Right: 39, Down: 40, Insert: 45, Delete: 46, Digit_8: 56, Y: 89, Z: 90, Meta: 91, F1: 112, F2: 113, F3: 114, F4: 115, F5: 116, F6: 117, F7: 118, F8: 119, F9: 120, F10: 121, F11: 122, F12: 123, NumLock: 144, ScrollLock: 145, BackSlash: 220, Slash: 191, BracketRight: 221, BracketLeft: 219 }, B = { Left: 1, Middle: 2, Right: 3 };
16
+ const D = { General: "general", Left: "left", Right: "right", Center: "center", Justify: "justify", Fill: "fill", Distributed: "distributed", CenterContinuous: "centerContinuous" }, z = { Shift: "shift", Alt: "alt", Ctrl: "ctrl", Meta: "meta" }, A = { BackSpace: 8, Tab: 9, Clear: 12, Enter: 13, Shift: 16, Control: 17, Alt: 18, Pause: 19, CapsLock: 20, Escape: 27, Space: 32, PageUp: 33, PageDown: 34, End: 35, Home: 36, Left: 37, Up: 38, Right: 39, Down: 40, Insert: 45, Delete: 46, Digit_8: 56, Y: 89, Z: 90, Meta: 91, F1: 112, F2: 113, F3: 114, F4: 115, F5: 116, F6: 117, F7: 118, F8: 119, F9: 120, F10: 121, F11: 122, F12: 123, NumLock: 144, ScrollLock: 145, BackSlash: 220, Slash: 191, BracketRight: 221, BracketLeft: 219 }, B = { Left: 1, Middle: 2, Right: 3 };
17
17
  class $ {
18
18
  constructor(t2, e2, n2, o2) {
19
19
  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 = () => {
@@ -239,7 +239,7 @@ class V {
239
239
  }
240
240
  findCommandByEvent(t2) {
241
241
  const e2 = [];
242
- t2.altKey && e2.push(A.Alt), t2.shiftKey && e2.push(A.Shift), t2.ctrlKey && e2.push(A.Ctrl), t2.metaKey && e2.push(A.Meta);
242
+ t2.altKey && e2.push(z.Alt), t2.shiftKey && e2.push(z.Shift), t2.ctrlKey && e2.push(z.Ctrl), t2.metaKey && e2.push(z.Meta);
243
243
  let n2 = X({ key: t2.code, modifiers: e2 });
244
244
  const o2 = this._commandsByShortcut;
245
245
  let r2 = o2.get(n2);
@@ -306,7 +306,7 @@ const F = t.getOS() === t.OSType.MacOS || t.getOS() === t.OSType.IOS ? "Cmd" : "
306
306
  const n2 = {};
307
307
  for (let e3 = 0; t2.modifiers && e3 < t2.modifiers.length; e3++) n2[t2.modifiers[e3]] = true;
308
308
  let o2 = "";
309
- return (n2?.[A.Ctrl] || n2?.[A.Meta]) && (o2 += (o2.length > 0 ? "+" : "") + (e2 ? j : F)), n2?.[A.Alt] && (o2 += e2 ? "⌥" : "Alt"), n2?.[A.Shift] && (o2 += (o2.length > 0 ? "+" : "") + (e2 ? "⇧" : "Shift")), o2 += (o2.length > 0 ? "+" : "") + H(t2.key), o2;
309
+ return (n2?.[z.Ctrl] || n2?.[z.Meta]) && (o2 += (o2.length > 0 ? "+" : "") + (e2 ? j : F)), n2?.[z.Alt] && (o2 += e2 ? "⌥" : "Alt"), n2?.[z.Shift] && (o2 += (o2.length > 0 ? "+" : "") + (e2 ? "⇧" : "Shift")), o2 += (o2.length > 0 ? "+" : "") + H(t2.key), o2;
310
310
  };
311
311
  function Y(e2, n2 = null) {
312
312
  const o2 = a(n2);
@@ -658,11 +658,11 @@ const Pt = kt;
658
658
  let Dt = () => {
659
659
  console.warn("You must call useEditMode before setting its state.");
660
660
  };
661
- const At = Pt(null, () => {
661
+ const zt = Pt(null, () => {
662
662
  const [t2, e2] = d(null);
663
663
  return Dt = e2, t2;
664
- }), zt = () => {
665
- const t2 = At();
664
+ }), At = () => {
665
+ const t2 = zt();
666
666
  return h(() => ({ setMode: (t3) => {
667
667
  Dt((e2) => ("function" == typeof t3 && (t3 = t3(e2)), t3?.onModeChange?.(t3 ?? null), t3));
668
668
  }, getMode: () => t2 }), [t2]);
@@ -676,7 +676,7 @@ const At = Pt(null, () => {
676
676
  h(() => {
677
677
  const t2 = n2?.element, e3 = s2?.element ?? n2?.element;
678
678
  if (!c2) return;
679
- const o2 = [new K("cut", t2, { label: "Cut", description: "Remove the selection and put it on the clipboard so you can paste it somewhere else.", icon: "cut", shortcut: { key: "X", modifiers: [A.Ctrl] } }), new K("copy", t2, { label: "Copy", description: "Put a copy of the selection on the clipboard so you can paste it somewhere else.", icon: "copy", shortcut: { key: "C", modifiers: [A.Ctrl] } }), new K("paste", e3, { label: "Paste", description: "Add content on the clipboard to your document.", icon: "paste.yellow", shortcut: [{ key: "V", modifiers: [A.Ctrl] }, { key: "F8", modifiers: [A.Ctrl] }] })];
679
+ const o2 = [new K("cut", t2, { label: "Cut", description: "Remove the selection and put it on the clipboard so you can paste it somewhere else.", icon: "cut", shortcut: { key: "X", modifiers: [z.Ctrl] } }), new K("copy", t2, { label: "Copy", description: "Put a copy of the selection on the clipboard so you can paste it somewhere else.", icon: "copy", shortcut: { key: "C", modifiers: [z.Ctrl] } }), new K("paste", e3, { label: "Paste", description: "Add content on the clipboard to your document.", icon: "paste.yellow", shortcut: [{ key: "V", modifiers: [z.Ctrl] }, { key: "F8", modifiers: [z.Ctrl] }] })];
680
680
  c2?.addCommands(o2, true);
681
681
  }, [c2]);
682
682
  const v2 = ht(async (t2) => {
@@ -814,7 +814,7 @@ const jt = "Undo the last action.", Xt = "Repeat the last action or undo the red
814
814
  return h(() => {
815
815
  if (!e2) return;
816
816
  const t3 = { contains: (t4) => true, focus() {
817
- } }, n3 = [new $("undo", t3, { label: "Undo", description: jt, shortcut: { key: "z", modifiers: [A.Ctrl] }, disabled: true }, r2), new $("redo", t3, { label: "Redo", description: Xt, shortcut: [{ key: "y", modifiers: [A.Ctrl] }, { key: "F4" }, { key: "Enter", modifiers: [A.Alt] }], disabled: true }, i2)];
817
+ } }, n3 = [new $("undo", t3, { label: "Undo", description: jt, shortcut: { key: "z", modifiers: [z.Ctrl] }, disabled: true }, r2), new $("redo", t3, { label: "Redo", description: Xt, shortcut: [{ key: "y", modifiers: [z.Ctrl] }, { key: "F4" }, { key: "Enter", modifiers: [z.Alt] }], disabled: true }, i2)];
818
818
  e2?.addCommands(n3, true);
819
819
  }, [e2]), u(() => {
820
820
  if (!e2) return;
@@ -882,7 +882,7 @@ const Jt = ({ children: t2 }) => {
882
882
  let o2 = e2;
883
883
  return "string" == typeof t2 && ((t2 = t2.trim().toLowerCase()).endsWith("px") ? (t2 = t2.substring(0, t2.length - 2), o2 = false) : t2.endsWith("%") && (t2 = t2.substring(0, t2.length - 1), o2 = true), t2 = parseFloat(t2)), o2 ? n2.percent = t2 : n2.pixels = t2, Object.freeze(n2);
884
884
  }, se = p(m((t2, e2) => {
885
- const { elementBefore: n2, elementAfter: o2, splitDirection: r2 = "row", fixedPane: i2 = null, position: s2, onPositionChange: c2, minBefore: p2, maxBefore: m2, minAfter: f2, maxAfter: _2, children: g2, className: y2, style: v2, disabled: w2 = false, onDragStart: b2, onDragResize: E2, onDragFinish: C2, resizerProps: k2 = ne, paneProps: P2 = ne, paneBeforeProps: D2 = ne, paneAfterProps: A2 = ne, createResizer: z2 = ee } = t2;
885
+ const { elementBefore: n2, elementAfter: o2, splitDirection: r2 = "row", fixedPane: i2 = null, position: s2, onPositionChange: c2, minBefore: p2, maxBefore: m2, minAfter: f2, maxAfter: _2, children: g2, className: y2, style: v2, disabled: w2 = false, onDragStart: b2, onDragResize: E2, onDragFinish: C2, resizerProps: k2 = ne, paneProps: P2 = ne, paneBeforeProps: D2 = ne, paneAfterProps: z2 = ne, createResizer: A2 = ee } = t2;
886
886
  if (g2) throw new Error("Use elementBefore and elementAfter instead of children.");
887
887
  const B2 = h(() => l.isValidElement(o2) && l.isValidElement(n2), [o2, n2]), $2 = h(() => {
888
888
  let t3 = null;
@@ -900,7 +900,7 @@ const Jt = ({ children: t2 }) => {
900
900
  h2 = (oe(o3.maxAfter, e3, false) ?? n3) - n3, u2 = oe(o3.minAfter, e3, false) ?? e3, d2 = Math.max(a2, h2), p3 = Math.min(c3, u2), s3 = Math.max(d2, Math.min(s3, p3)), u2 = Math.min(l2 - s3, oe(o3.maxAfter, l2 - s3, true) ?? l2), h2 = Math.min(l2 - s3, oe(o3.minAfter, l2 - s3, true) ?? l2), r3[0] = s3, r3[1] = l2 - r3[0];
901
901
  const m3 = Math.max(0, Math.min(100, s3 / l2 * 100));
902
902
  return i3[0] = m3, i3[1] = 100 - i3[0], { percents: i3, pixels: r3, minBefore: `${a2}px`, minAfter: `${h2}px`, maxBefore: `${r3[0]}px`, maxAfter: `${r3[1]}px` };
903
- })(O2, X2, j2, $2), [$2, O2, X2, j2, r2]), [U2, G2] = d(false), q2 = ht(b2, [b2]), Z2 = ht(E2, [E2]), J2 = ht(C2, [C2]), Q2 = a(null), tt2 = a(null), et2 = a(null), { style: nt2, className: ot2, ...rt2 } = P2, it2 = { minWidth: 0, minHeight: 0, maxWidth: "100%", maxHeight: "100%", height: "100%", widthResizer: "100%", display: "flex", overflow: "hidden", position: "relative", ...nt2 }, { className: st2, style: lt2, ...at2 } = D2, { className: ct2, style: ut2, ...dt2 } = A2, pt2 = { flex: "1 1 100%", width: "100%", ...v2, flexDirection: r2, display: "flex" }, { className: mt2, style: ft2, onPointerDown: _t2, ...gt2 } = k2, yt2 = ht((t3) => {
903
+ })(O2, X2, j2, $2), [$2, O2, X2, j2, r2]), [U2, G2] = d(false), q2 = ht(b2, [b2]), Z2 = ht(E2, [E2]), J2 = ht(C2, [C2]), Q2 = a(null), tt2 = a(null), et2 = a(null), { style: nt2, className: ot2, ...rt2 } = P2, it2 = { minWidth: 0, minHeight: 0, maxWidth: "100%", maxHeight: "100%", height: "100%", widthResizer: "100%", display: "flex", overflow: "hidden", position: "relative", ...nt2 }, { className: st2, style: lt2, ...at2 } = D2, { className: ct2, style: ut2, ...dt2 } = z2, pt2 = { flex: "1 1 100%", width: "100%", ...v2, flexDirection: r2, display: "flex" }, { className: mt2, style: ft2, onPointerDown: _t2, ...gt2 } = k2, yt2 = ht((t3) => {
904
904
  const e3 = ie(t3, null === i2);
905
905
  I2(e3);
906
906
  }, [i2]), vt2 = ht((t3) => {
@@ -919,7 +919,7 @@ const Jt = ({ children: t2 }) => {
919
919
  t3.stopPropagation(), t3.preventDefault();
920
920
  }, [O2, U2, s2, i2, X2]), bt2 = ht((t3) => {
921
921
  _t2?.(t3), t3.defaultPrevented || w2 || U2 || (G2(true), q2(), document.addEventListener("pointermove", vt2, { passive: false }), document.addEventListener("touchmove", vt2, { passive: false }), document.addEventListener("pointerup", wt2, { passive: false }));
922
- }, [_t2]), xt2 = Ft(e2, () => ({ setPosition: yt2, isSplitPane: () => true }), []), St2 = h(() => B2 ? z2?.({ key: "resizer", ref: L([W2, tt2]), className: T("resizer", mt2), onPointerDownCapture: bt2, style: { cursor: w2 ? void 0 : "row" === r2 ? "ew-resize" : "ns-resize", minWidth: "row" === r2 ? "2px" : void 0, minHeight: "row" !== r2 ? "2px" : void 0, boxSizing: "border-box", pointerEvents: "all", zIndex: 1, ...ft2 }, splitDirection: r2, disabled: w2, ...gt2 }) : null, [B2, mt2, gt2, r2, ft2, w2]), Et2 = "row" === r2 ? "Width" : "Height", Lt2 = h(() => {
922
+ }, [_t2]), xt2 = Ft(e2, () => ({ setPosition: yt2, isSplitPane: () => true }), []), St2 = h(() => B2 ? A2?.({ key: "resizer", ref: L([W2, tt2]), className: T("resizer", mt2), onPointerDownCapture: bt2, style: { cursor: w2 ? void 0 : "row" === r2 ? "ew-resize" : "ns-resize", minWidth: "row" === r2 ? "2px" : void 0, minHeight: "row" !== r2 ? "2px" : void 0, boxSizing: "border-box", pointerEvents: "all", zIndex: 1, ...ft2 }, splitDirection: r2, disabled: w2, ...gt2 }) : null, [B2, mt2, gt2, r2, ft2, w2]), Et2 = "row" === r2 ? "Width" : "Height", Lt2 = h(() => {
923
923
  if (!n2) return null;
924
924
  const t3 = { ...it2, ...lt2, flex: 0 === $2.fixedPaneOffset && null !== Y2?.pixels[0] ? `0 0 ${Math.round(Y2?.pixels[0])}px` : `1 1 ${Math.round(Y2?.percents[0] ?? 100)}%`, [`min${Et2}`]: Y2?.minBefore, [`max${Et2}`]: o2 ? Y2?.maxBefore : "100%" };
925
925
  return x("div", { ref: Q2, className: T("before", ot2, st2), style: t3, ...rt2, ...at2, children: n2 }, "before");
@@ -927,7 +927,7 @@ const Jt = ({ children: t2 }) => {
927
927
  if (!o2) return null;
928
928
  const t3 = { ...it2, ...ut2, flex: 1 === $2.fixedPaneOffset && null !== Y2?.pixels[1] ? `0 0 ${Math.round(Y2?.pixels[1])}px` : `1 1 ${Math.round(Y2?.percents[1] ?? 100)}%`, [`min${Et2}`]: Y2?.minAfter, [`max${Et2}`]: n2 ? Y2?.maxAfter : "100%" };
929
929
  return x("div", { ref: et2, className: T("after", ot2, ct2), style: t3, ...rt2, ...dt2, children: o2 }, "after");
930
- }, [o2, P2, A2, $2, Y2]);
930
+ }, [o2, P2, z2, $2, Y2]);
931
931
  return S("div", { ref: L([N2, xt2]), className: T("splitPane", "row" === r2 ? "vertical" : "horizontal", { dragging: U2 }, y2), style: pt2, children: [Lt2, St2, Mt2] });
932
932
  }));
933
933
  function le(t2) {
@@ -1159,7 +1159,7 @@ function de() {
1159
1159
  }
1160
1160
  se.displayName = "SplitPane";
1161
1161
  const pe = de();
1162
- pe.register("base", () => import("./C_7-Y_1zhHsxTW9L.mjs"));
1162
+ pe.register("base", () => import("./DIUtMpFEGWd4fFvO.mjs"));
1163
1163
  const me = (t2) => x("svg", { ...t2, children: x("path", {}) }), fe = { Icon: "_Icon_17dpm_10" }, _e = p((e2) => {
1164
1164
  const { iconKey: n2, packKey: o2, className: r2, style: i2, role: s2, title: a2, size: c2, ariaHidden: u2, sourceProps: d2, children: p2, ...m2 } = e2, [f2, _2] = l.useState(null);
1165
1165
  l.useEffect(() => {
@@ -1336,10 +1336,10 @@ class Me {
1336
1336
  return window.addEventListener("storage", e2), () => window.removeEventListener("storage", e2);
1337
1337
  }
1338
1338
  }
1339
- const Te = { Horizontal: "horizontal", Vertical: "vertical" }, Ce = { scrollbar: "_scrollbar_gqxsx_24", track: "_track_gqxsx_35", thumb: "_thumb_gqxsx_47", "scrollbar-button": "_scrollbar-button_gqxsx_89", "touch-thumb": "_touch-thumb_gqxsx_124" }, ke = "M 5.4951012,0.62494002 7.1746358,3.4734472 8.8557603,6.3226744 c 0.13425,0.2277477 0.18228,0.4945506 0.1356,0.7535218 -0.04665,0.2589712 -0.18504,0.4935661 -0.3908099,0.6625402 C 8.3948254,7.9076371 8.1348905,8.0001761 7.8664506,7.9999997 H 1.1503225 c -0.30278993,0 -0.59312985,-0.117841 -0.80720983,-0.3275159 -0.2140799,-0.2097042 -0.3343649,-0.4941244 -0.3343649,-0.7907107 -4.5e-4,-0.1955399 0.05205,-0.3876855 0.152205,-0.55688 L 1.8390472,3.4734031 3.5178618,0.62488125 C 3.7217717,0.27898385 4.0986166,0.0658413 4.5064365,0.0658413 c 0.4078199,0 0.7846648,0.21314255 0.9885747,0.55903995 z", Pe = "M 0.6632643,3.5136438 3.5117715,1.8341092 6.3609987,0.15298466 c 0.2277477,-0.13425 0.4945506,-0.18228 0.7535218,-0.1356 0.2589712,0.04665 0.4935661,0.18504 0.6625402,0.3908099 0.1689007,0.205725 0.2614397,0.4656599 0.2612633,0.73409984 v 6.7161281 c 0,0.3027899 -0.117841,0.5931298 -0.3275159,0.8072098 -0.2097042,0.2140799 -0.4941244,0.3343649 -0.7907107,0.3343649 -0.1955399,4.5e-4 -0.3876855,-0.05205 -0.55688,-0.152205 L 3.5117274,7.1696978 0.6632056,5.4908832 C 0.31730817,5.2869733 0.10416562,4.9101284 0.10416562,4.5023085 c 0,-0.4078199 0.21314255,-0.7846648 0.55903998,-0.9885747 z", De = { transform: "rotate(180deg)" }, Ae = (t2) => {
1339
+ const Te = { Horizontal: "horizontal", Vertical: "vertical" }, Ce = { scrollbar: "_scrollbar_gqxsx_24", track: "_track_gqxsx_35", thumb: "_thumb_gqxsx_47", "scrollbar-button": "_scrollbar-button_gqxsx_89", "touch-thumb": "_touch-thumb_gqxsx_124" }, ke = "M 5.4951012,0.62494002 7.1746358,3.4734472 8.8557603,6.3226744 c 0.13425,0.2277477 0.18228,0.4945506 0.1356,0.7535218 -0.04665,0.2589712 -0.18504,0.4935661 -0.3908099,0.6625402 C 8.3948254,7.9076371 8.1348905,8.0001761 7.8664506,7.9999997 H 1.1503225 c -0.30278993,0 -0.59312985,-0.117841 -0.80720983,-0.3275159 -0.2140799,-0.2097042 -0.3343649,-0.4941244 -0.3343649,-0.7907107 -4.5e-4,-0.1955399 0.05205,-0.3876855 0.152205,-0.55688 L 1.8390472,3.4734031 3.5178618,0.62488125 C 3.7217717,0.27898385 4.0986166,0.0658413 4.5064365,0.0658413 c 0.4078199,0 0.7846648,0.21314255 0.9885747,0.55903995 z", Pe = "M 0.6632643,3.5136438 3.5117715,1.8341092 6.3609987,0.15298466 c 0.2277477,-0.13425 0.4945506,-0.18228 0.7535218,-0.1356 0.2589712,0.04665 0.4935661,0.18504 0.6625402,0.3908099 0.1689007,0.205725 0.2614397,0.4656599 0.2612633,0.73409984 v 6.7161281 c 0,0.3027899 -0.117841,0.5931298 -0.3275159,0.8072098 -0.2097042,0.2140799 -0.4941244,0.3343649 -0.7907107,0.3343649 -0.1955399,4.5e-4 -0.3876855,-0.05205 -0.55688,-0.152205 L 3.5117274,7.1696978 0.6632056,5.4908832 C 0.31730817,5.2869733 0.10416562,4.9101284 0.10416562,4.5023085 c 0,-0.4078199 0.21314255,-0.7846648 0.55903998,-0.9885747 z", De = { transform: "rotate(180deg)" }, ze = (t2) => {
1340
1340
  const { style: e2, orientation: n2 = Te.Vertical, disabled: o2, ...r2 } = t2, i2 = n2 === Te.Vertical ? ke : Pe;
1341
1341
  return x("button", { style: e2, className: T(Ce["scrollbar-button"], n2, "scroll-button"), disabled: o2, ...r2, children: x("svg", { width: "9", height: "9", viewBox: "0 0 9 9", children: x("path", { d: i2 }) }) });
1342
- }, ze = (t2) => {
1342
+ }, Ae = (t2) => {
1343
1343
  const { style: e2, orientation: n2 = Te.Vertical, disabled: o2, ...r2 } = t2, i2 = n2 === Te.Vertical ? ke : Pe;
1344
1344
  return x("button", { style: e2, className: T(Ce["scrollbar-button"], n2, "scroll-button"), disabled: o2, ...r2, children: x("svg", { width: "9", height: "9", viewBox: "0 0 9 9", style: De, children: x("path", { d: i2 }) }) });
1345
1345
  }, Be = (t2) => {
@@ -1348,7 +1348,7 @@ const Te = { Horizontal: "horizontal", Vertical: "vertical" }, Ce = { scrollbar:
1348
1348
  }, $e = N().supportsTouchEvents, Ke = p(m((t2, e2) => {
1349
1349
  const { borderColor: n2 = "var(--sxl-app-color-primary, rgb(33, 115, 70))", backgroundColor: o2 = "var(--sxl-app-color-background, white)", fillColor: r2 = "var(--sxl-app-color-grey, grey)", borderWidth: i2 = 3, size: s2 = 22, style: l2, className: c2, onPointerDown: p2, onPointerMove: m2, onPointerUp: f2, orientation: _2 = Te.Vertical, offset: g2 = 0, currentTouchAnchor: y2, elementParent: v2, elementRoot: w2, key: b2, ...M2 } = t2;
1350
1350
  if (!$e) return null;
1351
- const C2 = ht(p2, [p2]), k2 = ht(m2, [m2]), D2 = ht(f2, [f2]), A2 = _2 === Te.Vertical, [z2, B2] = d(false), $2 = _t(h(() => ({ processTouch: true, consumeTouch: true, onPointerDown: (t3, e3) => {
1351
+ const C2 = ht(p2, [p2]), k2 = ht(m2, [m2]), D2 = ht(f2, [f2]), z2 = _2 === Te.Vertical, [A2, B2] = d(false), $2 = _t(h(() => ({ processTouch: true, consumeTouch: true, onPointerDown: (t3, e3) => {
1352
1352
  B2(true), C2?.(t3), t3.preventDefault(), t3.stopPropagation();
1353
1353
  }, onPointerMoveOrWait: (t3, e3, n3) => {
1354
1354
  k2?.(t3);
@@ -1356,19 +1356,19 @@ const Te = { Horizontal: "horizontal", Vertical: "vertical" }, Ce = { scrollbar:
1356
1356
  B2(false), D2?.(n3), t3.preventDefault(), t3.stopPropagation();
1357
1357
  } }), [])), K2 = h(() => {
1358
1358
  const t3 = s2 / 2 + i2 / 2 + 6;
1359
- return { x: A2 ? -t3 : g2 + s2, y: A2 ? g2 + s2 : -t3, width: 0, height: 0 };
1360
- }, [A2, g2, s2]), [O2, { y: I2, x: N2 }] = ct(), H2 = a(null), { getPortalContainer: R2, isFullscreen: W2 } = ft(), [V2, F2] = d(null);
1359
+ return { x: z2 ? -t3 : g2 + s2, y: z2 ? g2 + s2 : -t3, width: 0, height: 0 };
1360
+ }, [z2, g2, s2]), [O2, { y: I2, x: N2 }] = ct(), H2 = a(null), { getPortalContainer: R2, isFullscreen: W2 } = ft(), [V2, F2] = d(null);
1361
1361
  return u(() => {
1362
1362
  const t3 = H2.current?.getBoundingClientRect();
1363
1363
  if (!t3) return void F2(null);
1364
1364
  let a2 = 0, h2 = 0, u2 = v2;
1365
1365
  for (; u2; ) a2 += u2.scrollLeft, h2 += u2.scrollTop, u2 = w2 && u2 === w2.parentElement ? null : u2.parentElement;
1366
- F2(P(x("div", { className: T("touch-thumb", Ce["touch-thumb"], c2, Ce, { dragging: z2 }), ref: e2, style: { left: a2 + (t3?.x ?? 0) - (s2 + i2) / 2, top: h2 + (t3?.y ?? 0) - (s2 + i2) / 2, width: A2 ? s2 : 1.8 * s2, height: A2 ? 1.8 * s2 : s2, borderWidth: `${i2}px`, boxShadow: z2 ? `${o2} 0px 0px 0px 1.5px` : void 0, borderStyle: "solid", borderColor: n2, backgroundColor: o2, opacity: y2 ? 0 : void 0, transitionDuration: "160ms", backgroundImage: `url("data:image/svg+xml,%3Csvg width='6.4' height='12' viewBox='0 0 9.6 16' version='1.1' fill='${r2}' xmlns='http://www.w3.org/2000/svg' xmlns:svg='http://www.w3.org/2000/svg'%3E%3Cpath d='M 9.60008,14.40009 C 9.60008,15.28374 8.88368,16 8.00003,16 7.11639,16 6.40012,15.28374 6.40012,14.40009 c 0,-0.88365 0.71627,-1.60005 1.59991,-1.60005 0.88365,0 1.60005,0.7164 1.60005,1.60005 m 0,-6.40012 c 0,0.88364 -0.7164,1.60004 -1.60005,1.60004 -0.88364,0 -1.59991,-0.7164 -1.59991,-1.60004 0,-0.88365 0.71627,-1.60005 1.59991,-1.60005 0.88365,0 1.60005,0.7164 1.60005,1.60005 m 0,-6.40006 c 0,0.88365 -0.7164,1.60005 -1.60005,1.60005 -0.88364,0 -1.59991,-0.7164 -1.59991,-1.60005 C 6.40012,0.71626 7.11639,0 8.00003,0 8.88368,0 9.60008,0.71626 9.60008,1.59991 M 3.19996,14.40009 C 3.19996,15.28374 2.48369,16 1.60005,16 0.7164,16 0,15.28374 0,14.40009 c 0,-0.88365 0.7164,-1.60005 1.60005,-1.60005 0.88364,0 1.59991,0.7164 1.59991,1.60005 m 0,-6.40012 c 0,0.88364 -0.71627,1.60004 -1.59991,1.60004 C 0.7164,9.60001 0,8.88361 0,7.99997 0,7.11632 0.7164,6.39992 1.60005,6.39992 c 0.88364,0 1.59991,0.7164 1.59991,1.60005 m 0,-6.40006 c 0,0.88365 -0.71627,1.60005 -1.59991,1.60005 C 0.7164,3.19996 0,2.48356 0,1.59991 0,0.71626 0.7164,0 1.60005,0 2.48369,0 3.19996,0.71626 3.19996,1.59991' /%3E%3C/svg%3E%0A")`, backgroundRepeat: "no-repeat", backgroundPosition: "center center", ...l2 }, tabIndex: -1, onPointerDown: $2, ...M2 }), w2 ?? R2(), b2));
1367
- }, [I2, z2, n2, o2, r2, N2, K2?.x, K2?.y, K2?.width, K2?.height, c2, y2, o2, s2, i2, n2, v2, W2, b2]), K2 ? S(E, { children: [x("div", { ref: L([O2, H2]), style: { position: "absolute", left: K2.x, top: K2.y, opacity: 0 } }), V2] }) : null;
1366
+ F2(P(x("div", { className: T("touch-thumb", Ce["touch-thumb"], c2, Ce, { dragging: A2 }), ref: e2, style: { left: a2 + (t3?.x ?? 0) - (s2 + i2) / 2, top: h2 + (t3?.y ?? 0) - (s2 + i2) / 2, width: z2 ? s2 : 1.8 * s2, height: z2 ? 1.8 * s2 : s2, borderWidth: `${i2}px`, boxShadow: A2 ? `${o2} 0px 0px 0px 1.5px` : void 0, borderStyle: "solid", borderColor: n2, backgroundColor: o2, opacity: y2 ? 0 : void 0, transitionDuration: "160ms", backgroundImage: `url("data:image/svg+xml,%3Csvg width='6.4' height='12' viewBox='0 0 9.6 16' version='1.1' fill='${r2}' xmlns='http://www.w3.org/2000/svg' xmlns:svg='http://www.w3.org/2000/svg'%3E%3Cpath d='M 9.60008,14.40009 C 9.60008,15.28374 8.88368,16 8.00003,16 7.11639,16 6.40012,15.28374 6.40012,14.40009 c 0,-0.88365 0.71627,-1.60005 1.59991,-1.60005 0.88365,0 1.60005,0.7164 1.60005,1.60005 m 0,-6.40012 c 0,0.88364 -0.7164,1.60004 -1.60005,1.60004 -0.88364,0 -1.59991,-0.7164 -1.59991,-1.60004 0,-0.88365 0.71627,-1.60005 1.59991,-1.60005 0.88365,0 1.60005,0.7164 1.60005,1.60005 m 0,-6.40006 c 0,0.88365 -0.7164,1.60005 -1.60005,1.60005 -0.88364,0 -1.59991,-0.7164 -1.59991,-1.60005 C 6.40012,0.71626 7.11639,0 8.00003,0 8.88368,0 9.60008,0.71626 9.60008,1.59991 M 3.19996,14.40009 C 3.19996,15.28374 2.48369,16 1.60005,16 0.7164,16 0,15.28374 0,14.40009 c 0,-0.88365 0.7164,-1.60005 1.60005,-1.60005 0.88364,0 1.59991,0.7164 1.59991,1.60005 m 0,-6.40012 c 0,0.88364 -0.71627,1.60004 -1.59991,1.60004 C 0.7164,9.60001 0,8.88361 0,7.99997 0,7.11632 0.7164,6.39992 1.60005,6.39992 c 0.88364,0 1.59991,0.7164 1.59991,1.60005 m 0,-6.40006 c 0,0.88365 -0.71627,1.60005 -1.59991,1.60005 C 0.7164,3.19996 0,2.48356 0,1.59991 0,0.71626 0.7164,0 1.60005,0 2.48369,0 3.19996,0.71626 3.19996,1.59991' /%3E%3C/svg%3E%0A")`, backgroundRepeat: "no-repeat", backgroundPosition: "center center", ...l2 }, tabIndex: -1, onPointerDown: $2, ...M2 }), w2 ?? R2(), b2));
1367
+ }, [I2, A2, n2, o2, r2, N2, K2?.x, K2?.y, K2?.width, K2?.height, c2, y2, o2, s2, i2, n2, v2, W2, b2]), K2 ? S(E, { children: [x("div", { ref: L([O2, H2]), style: { position: "absolute", left: K2.x, top: K2.y, opacity: 0 } }), V2] }) : null;
1368
1368
  }));
1369
1369
  Ke.displayName = "TouchThumbHandle";
1370
1370
  const Oe = 24, Ie = p(m((t2, e2) => {
1371
- const { offset: n2 = 0, totalSize: o2 = 0, viewportSize: r2 = 0, style: i2, className: s2, orientation: l2 = Te.Vertical, onScrollOffset: c2, onScroll: p2, showCustomScrollButtons: m2, scrollButtonIncrement: _2 = 200, scrollButtonInitialRepeatDelay: g2 = 260, scrollButtonAdditionalRepeatDelay: y2 = 120, minThumbSize: v2 = Oe, maxThumbSize: w2, createScrollStartButton: b2 = Ae, createScrollEndButton: C2 = ze, touchThumbProps: k2, thumbProps: P2, onMouseDown: D2, ...A2 } = t2, z2 = "touch" === N().primaryInput, B2 = m2 ?? !z2;
1371
+ const { offset: n2 = 0, totalSize: o2 = 0, viewportSize: r2 = 0, style: i2, className: s2, orientation: l2 = Te.Vertical, onScrollOffset: c2, onScroll: p2, showCustomScrollButtons: m2, scrollButtonIncrement: _2 = 200, scrollButtonInitialRepeatDelay: g2 = 260, scrollButtonAdditionalRepeatDelay: y2 = 120, minThumbSize: v2 = Oe, maxThumbSize: w2, createScrollStartButton: b2 = ze, createScrollEndButton: C2 = Ae, touchThumbProps: k2, thumbProps: P2, onMouseDown: D2, ...z2 } = t2, A2 = "touch" === N().primaryInput, B2 = m2 ?? !A2;
1372
1372
  ht(p2, [p2]);
1373
1373
  const [$2, K2] = d({ offset: 0, length: 0, disabled: false }), O2 = a(-1), I2 = l2 === Te.Vertical, [H2, { width: R2, height: W2 }] = M(), V2 = I2 ? W2 : R2, F2 = ht((t3, e3, n3) => {
1374
1374
  if (0 === e3 || 0 === n3) {
@@ -1418,8 +1418,8 @@ const Oe = 24, Ie = p(m((t2, e2) => {
1418
1418
  const t3 = $2.disabled;
1419
1419
  if (t3) return null;
1420
1420
  const e3 = x("div", { ...P2, className: T(Ce.thumb, { disabled: t3 }), ref: lt2, role: "slider", "aria-label": I2 ? "Rows" : "Columns", "aria-orientation": I2 ? "vertical" : "horizontal", "aria-valuemin": 0, "aria-valuemax": Y2, "aria-valuenow": n2, tabIndex: 0, style: { ...P2?.style, position: "relative", [I2 ? "height" : "width"]: `${$2.length}px`, [I2 ? "width" : "height"]: "100%", transform: I2 ? `translateY(${$2.offset}px)` : `translateX(${$2.offset}px)`, [I2 ? "minHeight" : "minWidth"]: `${v2}px` }, onMouseDown: D2, onPointerDown: tt2, onPointerMove: nt2, onPointerUp: rt2 });
1421
- return !z2 || t3 ? e3 : S(E, { children: [e3, x(Ke, { ...k2, offset: $2.offset, orientation: I2 ? Te.Vertical : Te.Horizontal, onPointerDown: Q2, onPointerMove: et2, onPointerUp: ot2 })] });
1422
- }, [$2, v2, Y2, n2, I2, z2, D2, k2, P2]), [ct2, ut2] = d(null), dt2 = ht(() => {
1421
+ return !A2 || t3 ? e3 : S(E, { children: [e3, x(Ke, { ...k2, offset: $2.offset, orientation: I2 ? Te.Vertical : Te.Horizontal, onPointerDown: Q2, onPointerMove: et2, onPointerUp: ot2 })] });
1422
+ }, [$2, v2, Y2, n2, I2, A2, D2, k2, P2]), [ct2, ut2] = d(null), dt2 = ht(() => {
1423
1423
  let t3;
1424
1424
  t3 = "function" == typeof _2 ? _2(n2, r2, o2) : n2 - _2;
1425
1425
  const e3 = Math.max(0, t3);
@@ -1447,7 +1447,7 @@ const Oe = 24, Ie = p(m((t2, e2) => {
1447
1447
  const t3 = { orientation: l2, disabled: n2 >= Y2, onMouseUp: _t2, onMouseLeave: _t2, onMouseDown: () => gt2(n2, true, false) };
1448
1448
  return C2?.(t3);
1449
1449
  }, [B2, l2, n2, Y2, ct2]), wt2 = I2 ? "vertical" : "horizontal";
1450
- return S("div", { ref: L([J2, e2]), className: T(s2, Ce.scrollbar, wt2, { dragging: U2, "has-touch-thumb": z2 }), style: i2, ...A2, children: [yt2, x("div", { ref: H2, role: "scrollbar", "aria-orientation": wt2, "aria-valuemin": 0, "aria-valuemax": Y2, "aria-valuenow": n2, tabIndex: 0, className: T(Ce.track, "track", wt2), onMouseDown: D2, onPointerDown: it2, onKeyDown: st2, children: at2 }), vt2] });
1450
+ return S("div", { ref: L([J2, e2]), className: T(s2, Ce.scrollbar, wt2, { dragging: U2, "has-touch-thumb": A2 }), style: i2, ...z2, children: [yt2, x("div", { ref: H2, role: "scrollbar", "aria-orientation": wt2, "aria-valuemin": 0, "aria-valuemax": Y2, "aria-valuenow": n2, tabIndex: 0, className: T(Ce.track, "track", wt2), onMouseDown: D2, onPointerDown: it2, onKeyDown: st2, children: at2 }), vt2] });
1451
1451
  }));
1452
1452
  let Ne = Date.now, He = 1e3, Re = {}, We = 1;
1453
1453
  const Ve = (t2) => {
@@ -1653,8 +1653,8 @@ const Ue = (t2, e2) => x(Ie, { ...t2, ref: e2 }), Ge = Object.freeze(Object.defi
1653
1653
  } else if (Math.ceil(l2) > Math.ceil(t2) + 2) return l2;
1654
1654
  }
1655
1655
  return r2;
1656
- } }, Symbol.toStringTag, { value: "Module" })), qe = "_scrollpane_1fbi8_2", Ze = "_vertical-container_1fbi8_7", Je = "_horizontal-corner-container_1fbi8_12", Qe = "_horizontal-container_1fbi8_20", tn = "_scrollbar-sizer_1fbi8_26", en = "_scrollpane-content_1fbi8_34", nn = "_scrollpane-content-element_1fbi8_43", on = ({ width: t2, height: e2 }) => x("div", { className: "corner", style: { minWidth: `${t2}px`, width: `${t2}px`, minHeight: `${e2}px`, height: `${e2}px` } }), rn = p(m((t2, e2) => {
1657
- const { children: n2, viewport: o2, onScrollViewport: r2, showHorizontalScrollbar: i2 = true, showVerticalScrollbar: s2 = true, createScrollCorner: l2 = on, createHorizontalScrollbar: c2 = Ue, createVerticalScrollbar: d2 = Ue, style: p2, className: m2, touchElement: _2, disableTouch: g2, ...y2 } = t2, v2 = i2 && c2, w2 = s2 && d2, b2 = ht(r2, [r2]), L2 = Ft(e2, () => ({ isScrollPane: () => true }), []), C2 = a(null);
1656
+ } }, Symbol.toStringTag, { value: "Module" })), qe = { scrollpane: "_scrollpane_1fbi8_2", "vertical-container": "_vertical-container_1fbi8_7", "horizontal-corner-container": "_horizontal-corner-container_1fbi8_12", "scrollbar-sizer": "_scrollbar-sizer_1fbi8_26", "scrollpane-content": "_scrollpane-content_1fbi8_34", "scrollpane-content-element": "_scrollpane-content-element_1fbi8_43" }, Ze = ({ width: t2, height: e2 }) => x("div", { className: "corner", style: { minWidth: `${t2}px`, width: `${t2}px`, minHeight: `${e2}px`, height: `${e2}px` } }), Je = p(m((t2, e2) => {
1657
+ const { children: n2, viewport: o2, onScrollViewport: r2, showHorizontalScrollbar: i2 = true, showVerticalScrollbar: s2 = true, createScrollCorner: l2 = Ze, createHorizontalScrollbar: c2 = Ue, createVerticalScrollbar: d2 = Ue, style: p2, className: m2, touchElement: _2, disableTouch: g2, ...y2 } = t2, v2 = i2 && c2, w2 = s2 && d2, b2 = ht(r2, [r2]), L2 = Ft(e2, () => ({ isScrollPane: () => true }), []), C2 = a(null);
1658
1658
  u(() => {
1659
1659
  C2.current && (C2.current.__scrollTop === o2?.top && C2.current.__scrollLeft === o2?.left || C2.current.__isDecelerating || C2.current?.scrollTo(o2?.left, o2?.top, false));
1660
1660
  }, [o2?.left, o2?.top, _2]);
@@ -1664,9 +1664,9 @@ const Ue = (t2, e2) => x(Ie, { ...t2, ref: e2 }), Ge = Object.freeze(Object.defi
1664
1664
  C2.current?.doTouchStart(t3.touches, t3.timeStamp);
1665
1665
  }, []), D2 = f((t3) => {
1666
1666
  t3.preventDefault(), C2.current?.doTouchMove(t3.touches, t3.timeStamp);
1667
- }, []), A2 = f((t3) => {
1667
+ }, []), z2 = f((t3) => {
1668
1668
  C2.current?.doTouchEnd(t3.timeStamp);
1669
- }, []), z2 = f(({ containerWidth: t3, containerHeight: e3, totalWidth: n3, totalHeight: o3 }) => {
1669
+ }, []), A2 = f(({ containerWidth: t3, containerHeight: e3, totalWidth: n3, totalHeight: o3 }) => {
1670
1670
  C2.current.setDimensions(t3, e3, n3, o3);
1671
1671
  }, []);
1672
1672
  u(() => {
@@ -1676,10 +1676,10 @@ const Ue = (t2, e2) => x(Ie, { ...t2, ref: e2 }), Ge = Object.freeze(Object.defi
1676
1676
  const t4 = { scrollingX: true, scrollingY: true, decelerationRate: 0.95, penetrationAcceleration: 0.08 };
1677
1677
  C2.current = new Ye(k2, t4);
1678
1678
  }
1679
- N().supportsTouchEvents && (t3.addEventListener("touchstart", P2), t3.addEventListener("touchend", A2), t3.addEventListener("touchmove", D2)), z2({ containerWidth: o2?.width, containerHeight: o2?.height, totalWidth: o2?.totalWidth, totalHeight: o2?.totalHeight });
1679
+ N().supportsTouchEvents && (t3.addEventListener("touchstart", P2), t3.addEventListener("touchend", z2), t3.addEventListener("touchmove", D2)), A2({ containerWidth: o2?.width, containerHeight: o2?.height, totalWidth: o2?.totalWidth, totalHeight: o2?.totalHeight });
1680
1680
  }
1681
1681
  return () => {
1682
- t3?.removeEventListener("touchstart", P2), t3?.removeEventListener("touchend", A2), t3?.removeEventListener("touchmove", D2);
1682
+ t3?.removeEventListener("touchstart", P2), t3?.removeEventListener("touchend", z2), t3?.removeEventListener("touchmove", D2);
1683
1683
  };
1684
1684
  }, [o2?.width, o2?.height, o2?.totalWidth, o2?.totalHeight, g2, _2]);
1685
1685
  const [B2, { width: $2 }] = M(), [K2, { height: O2 }] = M(), I2 = h(() => {
@@ -1687,19 +1687,19 @@ const Ue = (t2, e2) => x(Ie, { ...t2, ref: e2 }), Ge = Object.freeze(Object.defi
1687
1687
  const t3 = d2({ orientation: Te.Vertical, offset: o2?.top, viewportSize: o2?.height, totalSize: o2?.totalHeight, onScrollOffset: (t4) => {
1688
1688
  b2?.({ top: t4 });
1689
1689
  } });
1690
- return x("div", { className: T("vertical-container", Ze), ref: B2, children: t3 });
1690
+ return x("div", { className: T("vertical-container", qe["vertical-container"]), ref: B2, children: t3 });
1691
1691
  }, [d2, o2?.top, o2?.height, o2?.totalHeight]), H2 = h(() => {
1692
1692
  if (!v2) return null;
1693
1693
  const t3 = c2({ orientation: Te.Horizontal, offset: o2?.left, viewportSize: o2?.width, totalSize: o2?.totalWidth, onScrollOffset: (t4) => {
1694
1694
  b2?.({ left: t4 });
1695
1695
  } });
1696
- return S("div", { className: T("horizontal-corner-container", Je), children: [x("div", { className: T("horizontal-container", Qe), style: { width: `calc(100% - ${$2}px)` }, children: x("div", { ref: K2, className: T("scrollbar-sizer", tn), children: t3 }) }), w2 ? l2({ width: $2, height: O2 }) : x(E, {})] });
1696
+ return S("div", { className: T("horizontal-corner-container", qe["horizontal-corner-container"]), children: [x("div", { className: T("horizontal-sizer", qe["horizontal-sizer"]), style: { width: `calc(100% - ${$2}px)` }, children: x("div", { ref: K2, className: T("scrollbar-sizer", qe["scrollbar-sizer"]), children: t3 }) }), w2 ? l2({ width: $2, height: O2 }) : x(E, {})] });
1697
1697
  }, [c2, o2?.left, o2?.width, o2?.totalWidth, w2, l2, $2, O2]);
1698
- return x("div", { className: T(m2, "scrollpane", qe), style: { minWidth: w2 ? `${$2}px` : void 0, minHeight: v2 ? `${O2}px` : void 0, ...p2 }, ...y2, ref: L2, children: S("div", { className: T("scrollpane-content", en), children: [S("div", { className: T("scrollpane-content-element", nn), children: [x("div", { className: T("scrollpane-content-element", nn), children: n2 }), w2 ? I2 : x(E, {})] }), v2 ? H2 : x(E, {})] }) });
1698
+ return x("div", { className: T(m2, "scrollpane", qe.scrollpane), style: { minWidth: w2 ? `${$2}px` : void 0, minHeight: v2 ? `${O2}px` : void 0, ...p2 }, ...y2, ref: L2, children: S("div", { className: T("scrollpane-content", qe["scrollpane-content"]), children: [S("div", { className: T("scrollpane-content-element", qe["scrollpane-content-element"]), children: [x("div", { className: T("scrollpane-content-element", qe["scrollpane-content-element"]), children: n2 }), w2 ? I2 : x(E, {})] }), v2 ? H2 : x(E, {})] }) });
1699
1699
  }));
1700
- rn.displayName = "ScrollPane";
1701
- const sn = 300, ln = 100, an = 1e6, cn = 100, hn = 50, un = p(m((t2, e2) => {
1702
- const { offset: n2 = 0, viewportSize: o2 = 0, totalSize: r2 = 0, minSize: i2 = 0, endGap: s2 = sn, endScrollIncrement: l2 = ln, style: a2 = I, onMouseDown: c2, onScrollOffset: u2, onScroll: p2, scaleLimit: m2 = an, scaleFactor: _2 = cn, precisionFactor: g2 = hn, createScrollbar: y2 = Ue, ...v2 } = t2;
1700
+ Je.displayName = "ScrollPane";
1701
+ const Qe = 300, tn = 100, en = 1e6, nn = 100, on = 50, rn = p(m((t2, e2) => {
1702
+ const { offset: n2 = 0, viewportSize: o2 = 0, totalSize: r2 = 0, minSize: i2 = 0, endGap: s2 = Qe, endScrollIncrement: l2 = tn, style: a2 = I, onMouseDown: c2, onScrollOffset: u2, onScroll: p2, scaleLimit: m2 = en, scaleFactor: _2 = nn, precisionFactor: g2 = on, createScrollbar: y2 = Ue, ...v2 } = t2;
1703
1703
  p2 && console.warn("onScroll not supported for VirtualScrollbar. Use onScrollOffset instead");
1704
1704
  const w2 = ht(c2, [c2]), [b2, x2] = d(false), S2 = h(() => {
1705
1705
  const t3 = 0 === m2 ? r2 : Math.min(r2 ?? 0, Math.max(i2 ?? 0, (n2 ?? 0) + (o2 ?? 0)) + (s2 ?? 0)), e3 = 0 !== m2 && t3 > m2 ? _2 : 1, l3 = e3 / g2, a3 = Math.ceil(t3 / e3);
@@ -1715,7 +1715,7 @@ const sn = 300, ln = 100, an = 1e6, cn = 100, hn = 50, un = p(m((t2, e2) => {
1715
1715
  }, [L2, M2]);
1716
1716
  return Ue({ style: a2, ...v2, offset: S2.offset, totalSize: S2.totalSize, viewportSize: S2.viewportSize, onMouseDown: T2, onScrollOffset: E2 }, e2);
1717
1717
  }));
1718
- un.displayName = "VirtualScrollbar";
1718
+ rn.displayName = "VirtualScrollbar";
1719
1719
  export {
1720
1720
  $ as Command,
1721
1721
  q as CommandButtonType,
@@ -1727,8 +1727,8 @@ export {
1727
1727
  J as FocusKeyNavigation,
1728
1728
  D as HorizontalAlignment,
1729
1729
  ye as InMemoryStore,
1730
- z as KeyCodes,
1731
- A as KeyModifiers,
1730
+ A as KeyCodes,
1731
+ z as KeyModifiers,
1732
1732
  Me as LocalStorageStore,
1733
1733
  B as MouseButtonCodes,
1734
1734
  ot as NotifierProvider,
@@ -1737,7 +1737,7 @@ export {
1737
1737
  qt as ReactErrorBoundary,
1738
1738
  W as ReactUtils,
1739
1739
  Q as RoundedTab,
1740
- rn as ScrollPane,
1740
+ Je as ScrollPane,
1741
1741
  Ge as ScrollUtils,
1742
1742
  Ie as Scrollbar,
1743
1743
  Te as ScrollbarOrientation,
@@ -1746,13 +1746,13 @@ export {
1746
1746
  ee as SplitPaneResizer,
1747
1747
  Z as ToolTipPlacement,
1748
1748
  Jt as UncaughtErrorBoundary,
1749
- un as VirtualScrollbar,
1749
+ rn as VirtualScrollbar,
1750
1750
  ge as WalkingIcon,
1751
1751
  de as createDynamicIconService,
1752
- on as defaultCreateScrollCorner,
1752
+ Ze as defaultCreateScrollCorner,
1753
1753
  Be as defaultCreateScrollEdgeButton,
1754
- ze as defaultCreateScrollEndButton,
1755
- Ae as defaultCreateScrollStartButton,
1754
+ Ae as defaultCreateScrollEndButton,
1755
+ ze as defaultCreateScrollStartButton,
1756
1756
  dt as getDevicePixelRatio,
1757
1757
  X as toShortcutString,
1758
1758
  ct as useAnimatedMeasure,
@@ -1761,7 +1761,7 @@ export {
1761
1761
  G as useCommands,
1762
1762
  $t as useCopyPaste,
1763
1763
  ut as useDevicePixelRatio,
1764
- zt as useEditMode,
1764
+ At as useEditMode,
1765
1765
  ft as useFullscreenPortal,
1766
1766
  Bt as useGlobalClipboard,
1767
1767
  Wt as useId,
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.7.18",
4
+ "version": "0.7.20",
5
5
  "license": "SEE LICENSE IN <LICENSE>",
6
6
  "type": "module",
7
7
  "exports": {
@@ -40,7 +40,7 @@
40
40
  "react"
41
41
  ],
42
42
  "dependencies": {
43
- "@sheetxl/utils": "^0.7.18",
43
+ "@sheetxl/utils": "^0.7.20",
44
44
  "clsx": "^2.1.1",
45
45
  "detect-it": "^4.0.1",
46
46
  "react-merge-refs": "^3.0.2",
package/types/index.d.ts CHANGED
@@ -431,6 +431,20 @@ export declare interface EnqueueNotifierOptions extends NotifierOptions {
431
431
  enqueueProps?: Record<string, any>;
432
432
  }
433
433
 
434
+ /**
435
+ * Props for an Error Panel
436
+ */
437
+ export declare interface ErrorPanelProps extends React.HTMLAttributes<HTMLDivElement> {
438
+ /**
439
+ * The error to show
440
+ */
441
+ error: any;
442
+ /**
443
+ * Ref to the element.
444
+ */
445
+ ref?: React.Ref<HTMLDivElement>;
446
+ }
447
+
434
448
  /**
435
449
  * Simple panel to trigger various error scenarios for testing error boundaries and logging.
436
450
  */
@@ -905,7 +919,11 @@ export declare interface IScrollbarAttributes extends HTMLDivElement {
905
919
  export declare interface IScrollbarElement extends IScrollbarAttributes, HTMLDivElement {
906
920
  }
907
921
 
908
- export declare interface IScrollPaneElement extends HTMLDivElement, ScrollPaneAttributes {
922
+ export declare interface IScrollPaneAttributes {
923
+ isScrollPane: () => true;
924
+ }
925
+
926
+ export declare interface IScrollPaneElement extends HTMLDivElement, IScrollPaneAttributes {
909
927
  }
910
928
 
911
929
  export declare interface IShowToolTipProperties {
@@ -992,6 +1010,37 @@ export declare const KeyModifiers: {
992
1010
 
993
1011
  export declare type KeyModifiers = typeof KeyModifiers[keyof typeof KeyModifiers];
994
1012
 
1013
+ /**
1014
+ * Props for LoadingPanel
1015
+ */
1016
+ export declare interface LoadingPanelProps extends React.HTMLAttributes<HTMLDivElement> {
1017
+ /**
1018
+ * A delay for showing the loading panel.
1019
+ *
1020
+ * @remarks
1021
+ * This helps prevent flicker if loading is very fast.
1022
+ */
1023
+ transitionDelay?: string;
1024
+ /**
1025
+ * Whether the background should be transparent.
1026
+ *
1027
+ * @defaultValue false
1028
+ */
1029
+ transparentBackground?: boolean;
1030
+ /**
1031
+ * Optional callback when mounted
1032
+ */
1033
+ onMount?: () => void;
1034
+ /**
1035
+ * Optional callback when unmounted
1036
+ */
1037
+ onUnmount?: () => void;
1038
+ /**
1039
+ * Ref to the element.
1040
+ */
1041
+ ref?: React.Ref<HTMLDivElement>;
1042
+ }
1043
+
995
1044
  /** LocalStorage state with cross-tab sync */
996
1045
  export declare class LocalStorageStore implements PersistenceStore {
997
1046
  private storage;
@@ -1280,8 +1329,8 @@ export declare interface ScrollbarProps extends default_2.HTMLAttributes<HTMLEle
1280
1329
  scrollButtonIncrement?: number | ((offset: number, viewport: number, totalSize: number) => number);
1281
1330
  scrollButtonInitialRepeatDelay?: number;
1282
1331
  scrollButtonAdditionalRepeatDelay?: number;
1283
- createScrollStartButton?: (props: ScrollButtonProps, ref?: default_2.Ref<HTMLElement>) => default_2.ReactElement;
1284
- createScrollEndButton?: (props: ScrollButtonProps, ref?: default_2.Ref<HTMLElement>) => default_2.ReactElement;
1332
+ createScrollStartButton?: (props: ScrollButtonProps) => default_2.ReactElement;
1333
+ createScrollEndButton?: (props: ScrollButtonProps) => default_2.ReactElement;
1285
1334
  touchThumbProps?: Partial<TouchThumbHandleProps>;
1286
1335
  thumbProps?: default_2.HTMLAttributes<HTMLElement>;
1287
1336
  }
@@ -1296,14 +1345,11 @@ export declare interface ScrollButtonProps {
1296
1345
  onClick?: (e: default_2.MouseEvent<HTMLElement>) => void;
1297
1346
  }
1298
1347
 
1299
- export declare const ScrollPane: default_2.FC<ScrollPaneProps & {
1300
- ref?: default_2.Ref<IScrollPaneElement>;
1301
- }>;
1302
-
1303
- export declare interface ScrollPaneAttributes {
1304
- isScrollPane: () => true;
1305
- }
1348
+ export declare const ScrollPane: default_2.NamedExoticComponent<Omit<ScrollPaneProps, "ref"> & default_2.RefAttributes<IScrollPaneElement>>;
1306
1349
 
1350
+ /**
1351
+ * Properties for the ScrollPane
1352
+ */
1307
1353
  export declare interface ScrollPaneProps extends React.HTMLAttributes<HTMLDivElement> {
1308
1354
  viewport: ScrollableViewport;
1309
1355
  onScrollViewport?: (scrollPoint: Partial<TopLeft>) => void;
@@ -1323,6 +1369,10 @@ export declare interface ScrollPaneProps extends React.HTMLAttributes<HTMLDivEle
1323
1369
  * @defaultValue false unless no touch events are detected
1324
1370
  */
1325
1371
  disableTouch?: boolean;
1372
+ /**
1373
+ * Reference to the scroll pane element
1374
+ */
1375
+ ref?: React.Ref<IScrollPaneElement>;
1326
1376
  }
1327
1377
 
1328
1378
  export declare interface ScrollState extends TopLeft {
@@ -1606,6 +1656,12 @@ declare const toPrettyKeyCode: (key: string) => string;
1606
1656
 
1607
1657
  export declare const toShortcutString: (keyStroke: IKeyStroke, modifierSymbol?: boolean) => string;
1608
1658
 
1659
+ declare interface TouchThumbHandleAttributes {
1660
+ }
1661
+
1662
+ declare interface TouchThumbHandleElement extends HTMLDivElement, TouchThumbHandleAttributes {
1663
+ }
1664
+
1609
1665
  declare interface TouchThumbHandleProps extends default_2.HTMLAttributes<HTMLElement> {
1610
1666
  /**
1611
1667
  * The orientation of the scrollbar.
@@ -1638,6 +1694,10 @@ declare interface TouchThumbHandleProps extends default_2.HTMLAttributes<HTMLEle
1638
1694
  elementRoot?: HTMLElement;
1639
1695
  key?: string;
1640
1696
  offset?: number;
1697
+ /**
1698
+ * Ref for the TouchThumbHandle element
1699
+ */
1700
+ ref?: default_2.Ref<TouchThumbHandleElement>;
1641
1701
  }
1642
1702
 
1643
1703
  export declare const UncaughtErrorBoundary: default_2.FC<{