@sheetxl/react 0.5.1 → 0.6.0

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 * as On from "react";
2
2
  import { forwardRef as ua, useRef as ca, useImperativeHandle as la, useEffect as fa, createElement as yr } from "react";
3
3
  /**
4
- * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.5.1
4
+ * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.6.0
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/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.5.1
2
+ * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.6.0
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,6 +1,6 @@
1
1
  import x, { memo as ce, useState as q, useRef as h, useCallback as ie, useEffect as M } from "react";
2
2
  /**
3
- * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.5.1
3
+ * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.6.0
4
4
  *
5
5
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
6
6
  * License: The license can be found at https://www.sheetxl.com/license.
@@ -9,7 +9,7 @@ import tt, { memo as ft, useMemo as Ce, useState as ue, forwardRef as wt, useRef
9
9
  import { STANDARD_KEY_CHARS as vi, useSelection as il, useHeaderSelection as wi, HeaderRenderer as yi, Grid as al, HeaderDivider as bi, SELECTION_CLIP_INSETS as jo, defaultSelectionRenderer as qi, useKeyboardEditorOverlay as Ci, Selection as sl, SVGLine as ao } from "@sheetxl/grid-react";
10
10
  import { unstable_batchedUpdates as Bn, createPortal as dl } from "react-dom";
11
11
  /**
12
- * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.5.1
12
+ * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.6.0
13
13
  *
14
14
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
15
15
  * License: The license can be found at https://www.sheetxl.com/license.
@@ -30,10 +30,10 @@ const jn = (e = 6e4) => new Date(Math.floor(Date.now() / e) * e), Ys = Object.fr
30
30
  const b = o.getSortField();
31
31
  b && (k = b.reverse);
32
32
  const D = o.getField(), E = D && D.criteria && D.criteria.length > 0;
33
- return k === !0 ? E ? "m 9.429858,10.25386 2,-1 v -3 l 3,-4 h -8 l 3,4 z M 5.849492,9.452298 H 4.24187 V 2.0761788 H 3.170122 V 9.452298 H 1.5625 l 2.143496,2.950446 z" : "m 13.109228,9.865914 h -1.607622 v -7.37612 h -1.071748 v 7.37612 H 8.822236 l 2.143496,2.950446 z M 0.75000004,9.15 4.3000002,13.094444 7.8500003,9.15 Z" : k === !1 ? E ? "m 9.429858,10.25386 2,-1 v -3 l 3,-4 h -8 l 3,4 z M 5.849492,5.0266248 H 4.24187 V 12.402744 H 3.170122 V 5.0266248 H 1.5625 l 2.143496,-2.950446 z" : "m 13.109228,5.44024 h -1.607622 v 7.37612 H 10.429858 V 5.44024 H 8.822236 L 10.965732,2.489794 Z M 0.75000004,9.15 4.3000002,13.094444 7.8500003,9.15 Z" : E ? "m 9.429858,10.25386 2,-1 v -3 l 3,-4 h -8 l 3,4 z M 0.75000004,9.15 4.3000002,13.094444 7.8500003,9.15 Z" : "m 3,5.025 4.5,5 4.5,-5 z";
33
+ return k === !0 ? E ? "m 9.429858,10.25386 2,-1 v -3 l 3,-4 h -8 l 3,4 z M 5.849492,9.452298 H 4.24187 V 2.0761788 H 3.170122 V 9.452298 H 1.5625 l 2.143496,2.950446 z" : "m 13.109228,9.865914 h -1.607622 v -7.37612 h -1.071748 v 7.37612 H 8.822236 l 2.143496,2.950446 z M 0.75000004,9.15 4.3000002,13.094444 7.8500003,9.15 Z" : k === !1 ? E ? "m 9.429858,10.25386 2,-1 v -3 l 3,-4 h -8 l 3,4 z M 5.849492,5.0266248 H 4.24187 V 12.402744 H 3.170122 V 5.0266248 H 1.5625 l 2.143496,-2.950446 z" : "m 13.109228,5.44024 h -1.607622 v 7.37612 H 10.429858 V 5.44024 H 8.822236 L 10.965732,2.489794 Z M 0.75000004,9.15 4.3000002,13.094444 7.8500003,9.15 Z" : E ? "m 9.429858,10.25386 2,-1 v -3 l 3,-4 h -8 l 3,4 z M 0.75000004,9.15 4.3000002,13.094444 7.8500003,9.15 Z" : "M 7.4533523,10.606423 2.2001838,4.9460198 2.966932,4.1188401 7.4533523,8.9589099 11.933438,4.1188401 12.700184,4.9460198";
34
34
  }, [o]), [y, d] = ue(!1), u = Math.min(Math.min(18, t.height - 8), t.width);
35
35
  return p("div", { style: { width: `${u}px`, height: `${u}px`, right: "0px", boxShadow: `0px 0px 0px 0.5px var(${y && !l ? "--sxl-app-color-primary-light, rgba(0,0,0,.55)" : "--sxl-app-color-border-button, grey"})`, backgroundColor: "var(--sxl-app-color-button-fill, white)", backgroundImage: "var(--sxl-app-image-background)", borderRadius: (u > 12 ? 1 : 0) + "px", marginRight: "2px", display: "flex", alignItems: "center", justifyContent: "center", cursor: l ? void 0 : "pointer", ...c }, onMouseEnter: () => d(!0), onMouseLeave: () => d(!1), onMouseDown: (k) => {
36
- i?.(k, o);
36
+ i?.(k, o), k.preventDefault();
37
37
  }, ...g, children: p("svg", { width: "" + 15 * r, height: "" + 15 * r, viewBox: "0 0 15 15", style: { fill: `var(${y && !l ? "--sxl-app-color-primary-dark" : "--sxl-app-color-button-text"}, grey)`, opacity: l ? 0.6 : 1 }, children: p("path", { d: s }) }) });
38
38
  }, xi = (e) => {
39
39
  const { value: t, coords: n, bounds: r, children: l, style: o, range: i, zoom: c = 1, view: g, bodyStyle: s, normalStyle: y, showFormulas: d, showZeros: u, docTheme: k, onLinkMouseDown: b, onFilterButtonMouseDown: D, filterButtonProps: E, createFilterButton: G = Si, ...H } = e, w = r.height / c, L = r.width / c, q = t, v = q.getValue(), S = t.getStyle(), F = s?.darkMode ?? !1;
@@ -2349,7 +2349,7 @@ The content is not applied.` }), new J("pasteFormulas", v, { label: "Paste Formu
2349
2349
  m.current = !0;
2350
2350
  const X = tt.lazy(async () => {
2351
2351
  try {
2352
- const Le = await import("./DYTJ1zZexaLNmYs-.mjs");
2352
+ const Le = await import("./BpOZx8aXJZvEwVlh.mjs");
2353
2353
  return m.current = !1, Ke.current = !0, v([...q]), Le;
2354
2354
  } catch (Le) {
2355
2355
  return console.warn(Le), be.current?.(!1), null;
@@ -4571,7 +4571,7 @@ const Md = (e) => {
4571
4571
  }, Dd = () => {
4572
4572
  const e = Yt(sr), [t] = ue(() => new oi());
4573
4573
  return Ce(() => e || t, [e]);
4574
- }, Bs = "_script-editor_iy654_5", Vs = tt.lazy(() => import("./96KvHRV2ipWdYiIr.mjs")), Hs = { lightbulb: { enabled: !1 }, tabSize: 2, acceptSuggestionOnCommitCharacter: !0, acceptSuggestionOnEnter: "on", accessibilitySupport: "auto", automaticLayout: !0, autoIndent: !1, codeLens: !0, colorDecorators: !0, contextmenu: !0, cursorBlinking: "blink", cursorSmoothCaretAnimation: !1, cursorStyle: "line", disableLayerHinting: !1, disableMonospaceOptimizations: !1, dragAndDrop: !0, glyphMargin: !0, fixedOverflowWidgets: !1, folding: !0, foldingStrategy: "auto", fontLigatures: !1, formatOnPaste: !0, formatOnType: !1, hideCursorInOverviewRuler: !1, highlightActiveIndentGuide: !0, links: !0, lineDecorationsWidth: 8, lineNumbersMinChars: 3, mouseWheelZoom: !1, multiCursorMergeOverlapping: !0, multiCursorModifier: "alt", overviewRulerBorder: !0, overviewRulerLanes: 2, quickSuggestions: !0, quickSuggestionsDelay: 100, readOnly: !1, renderControlCharacters: !1, renderFinalNewline: !0, renderIndentGuides: !0, renderLineHighlight: "all", renderWhitespace: "none", revealHorizontalRightPadding: 30, roundedSelection: !0, rulers: [], scrollBeyondLastColumn: 5, scrollBeyondLastLine: !0, selectOnLineNumbers: !0, selectionClipboard: !0, selectionHighlight: !0, showLightbulbIconMode: !1, showFoldingControls: "mouseover", smoothScrolling: !0, suggestOnTriggerCharacters: !0, wordBasedSuggestions: !0, wordSeparators: `~!@#$%^&*()-=+[{]}|;:'",.<>/?`, wordWrap: "off", wordWrapBreakAfterCharacters: " })]?|&,;", wordWrapBreakBeforeCharacters: "{([+", wordWrapBreakObtrusiveCharacters: ".", wordWrapColumn: 80, wordWrapMinified: !0, wrappingIndent: "none" };
4574
+ }, Bs = "_script-editor_iy654_5", Vs = tt.lazy(() => import("./DJZ9R5-OBtWHUjSv.mjs")), Hs = { lightbulb: { enabled: !1 }, tabSize: 2, acceptSuggestionOnCommitCharacter: !0, acceptSuggestionOnEnter: "on", accessibilitySupport: "auto", automaticLayout: !0, autoIndent: !1, codeLens: !0, colorDecorators: !0, contextmenu: !0, cursorBlinking: "blink", cursorSmoothCaretAnimation: !1, cursorStyle: "line", disableLayerHinting: !1, disableMonospaceOptimizations: !1, dragAndDrop: !0, glyphMargin: !0, fixedOverflowWidgets: !1, folding: !0, foldingStrategy: "auto", fontLigatures: !1, formatOnPaste: !0, formatOnType: !1, hideCursorInOverviewRuler: !1, highlightActiveIndentGuide: !0, links: !0, lineDecorationsWidth: 8, lineNumbersMinChars: 3, mouseWheelZoom: !1, multiCursorMergeOverlapping: !0, multiCursorModifier: "alt", overviewRulerBorder: !0, overviewRulerLanes: 2, quickSuggestions: !0, quickSuggestionsDelay: 100, readOnly: !1, renderControlCharacters: !1, renderFinalNewline: !0, renderIndentGuides: !0, renderLineHighlight: "all", renderWhitespace: "none", revealHorizontalRightPadding: 30, roundedSelection: !0, rulers: [], scrollBeyondLastColumn: 5, scrollBeyondLastLine: !0, selectOnLineNumbers: !0, selectionClipboard: !0, selectionHighlight: !0, showLightbulbIconMode: !1, showFoldingControls: "mouseover", smoothScrolling: !0, suggestOnTriggerCharacters: !0, wordBasedSuggestions: !0, wordSeparators: `~!@#$%^&*()-=+[{]}|;:'",.<>/?`, wordWrap: "off", wordWrapBreakAfterCharacters: " })]?|&,;", wordWrapBreakBeforeCharacters: "{([+", wordWrapBreakObtrusiveCharacters: ".", wordWrapColumn: 80, wordWrapMinified: !0, wrappingIndent: "none" };
4575
4575
  let Ln, On, en = ["define", "require"];
4576
4576
  const Jr = async (e, t, n) => {
4577
4577
  const r = e.getModel();
@@ -4736,7 +4736,7 @@ const Ed = ft(wt((e, t) => {
4736
4736
  }, []), O = Me(null), W = ie((P, $) => {
4737
4737
  u.current = { monaco: $, editor: P }, S(!0), j("Loading Types");
4738
4738
  const ge = w.getScripts().getModules().getItems()[0]?.getSource() ?? "";
4739
- P.setValue(ge), import("./BV_On6SKj_T710kF.mjs").then((Y) => Y.c).then(async (Y) => {
4739
+ P.setValue(ge), import("./CDHdjEGGmovCAo75.mjs").then((Y) => Y.c).then(async (Y) => {
4740
4740
  j(""), Y.AutoTypings.create(P, { shareCache: !0, dontAdaptEditorOptions: !0, monaco: $, onUpdate: (_, be) => {
4741
4741
  if (_.type === "LookedUpPackage" && _.success !== void 0) {
4742
4742
  const Ae = $.languages.typescript.typescriptDefaults.getDiagnosticsOptions();
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.5.1
2
+ * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.6.0
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.
@@ -37,11 +37,11 @@ const Ze = (e2 = 6e4) => new Date(Math.floor(Date.now() / e2) * e2), je = Object
37
37
  const t3 = r2.getSortField();
38
38
  t3 && (e3 = t3.reverse);
39
39
  const o3 = r2.getField(), n3 = o3 && o3.criteria && o3.criteria.length > 0;
40
- return true === e3 ? n3 ? "m 9.429858,10.25386 2,-1 v -3 l 3,-4 h -8 l 3,4 z M 5.849492,9.452298 H 4.24187 V 2.0761788 H 3.170122 V 9.452298 H 1.5625 l 2.143496,2.950446 z" : "m 13.109228,9.865914 h -1.607622 v -7.37612 h -1.071748 v 7.37612 H 8.822236 l 2.143496,2.950446 z M 0.75000004,9.15 4.3000002,13.094444 7.8500003,9.15 Z" : false === e3 ? n3 ? "m 9.429858,10.25386 2,-1 v -3 l 3,-4 h -8 l 3,4 z M 5.849492,5.0266248 H 4.24187 V 12.402744 H 3.170122 V 5.0266248 H 1.5625 l 2.143496,-2.950446 z" : "m 13.109228,5.44024 h -1.607622 v 7.37612 H 10.429858 V 5.44024 H 8.822236 L 10.965732,2.489794 Z M 0.75000004,9.15 4.3000002,13.094444 7.8500003,9.15 Z" : n3 ? "m 9.429858,10.25386 2,-1 v -3 l 3,-4 h -8 l 3,4 z M 0.75000004,9.15 4.3000002,13.094444 7.8500003,9.15 Z" : "m 3,5.025 4.5,5 4.5,-5 z";
40
+ return true === e3 ? n3 ? "m 9.429858,10.25386 2,-1 v -3 l 3,-4 h -8 l 3,4 z M 5.849492,9.452298 H 4.24187 V 2.0761788 H 3.170122 V 9.452298 H 1.5625 l 2.143496,2.950446 z" : "m 13.109228,9.865914 h -1.607622 v -7.37612 h -1.071748 v 7.37612 H 8.822236 l 2.143496,2.950446 z M 0.75000004,9.15 4.3000002,13.094444 7.8500003,9.15 Z" : false === e3 ? n3 ? "m 9.429858,10.25386 2,-1 v -3 l 3,-4 h -8 l 3,4 z M 5.849492,5.0266248 H 4.24187 V 12.402744 H 3.170122 V 5.0266248 H 1.5625 l 2.143496,-2.950446 z" : "m 13.109228,5.44024 h -1.607622 v 7.37612 H 10.429858 V 5.44024 H 8.822236 L 10.965732,2.489794 Z M 0.75000004,9.15 4.3000002,13.094444 7.8500003,9.15 Z" : n3 ? "m 9.429858,10.25386 2,-1 v -3 l 3,-4 h -8 l 3,4 z M 0.75000004,9.15 4.3000002,13.094444 7.8500003,9.15 Z" : "M 7.4533523,10.606423 2.2001838,4.9460198 2.966932,4.1188401 7.4533523,8.9589099 11.933438,4.1188401 12.700184,4.9460198";
41
41
  }, [r2]), [c2, g2] = oe(false);
42
42
  const u2 = Math.min(Math.min(18, t2.height - 8), t2.width);
43
43
  return G("div", { style: { width: `${u2}px`, height: `${u2}px`, right: "0px", boxShadow: `0px 0px 0px 0.5px var(${c2 && !l2 ? "--sxl-app-color-primary-light, rgba(0,0,0,.55)" : "--sxl-app-color-border-button, grey"})`, backgroundColor: "var(--sxl-app-color-button-fill, white)", backgroundImage: "var(--sxl-app-image-background)", borderRadius: (u2 > 12 ? 1 : 0) + "px", marginRight: "2px", display: "flex", alignItems: "center", justifyContent: "center", cursor: l2 ? void 0 : "pointer", ...a2 }, onMouseEnter: () => g2(true), onMouseLeave: () => g2(false), onMouseDown: (e3) => {
44
- i2?.(e3, r2);
44
+ i2?.(e3, r2), e3.preventDefault();
45
45
  }, ...s2, children: G("svg", { width: "" + 15 * n2, height: "" + 15 * n2, viewBox: "0 0 15 15", style: { fill: `var(${c2 && !l2 ? "--sxl-app-color-primary-dark" : "--sxl-app-color-button-text"}, grey)`, opacity: l2 ? 0.6 : 1 }, children: G("path", { d: d2 }) }) });
46
46
  }, et = (s2) => {
47
47
  const { value: d2, coords: c2, bounds: g2, children: u2, style: h2, range: m2, zoom: p2 = 1, view: f2, bodyStyle: w2, normalStyle: q2, showFormulas: v2, showZeros: y2, docTheme: b2, onLinkMouseDown: S2, onFilterButtonMouseDown: x2, filterButtonProps: k2, createFilterButton: R2 = Qe, ...M2 } = s2, T2 = g2.height / p2, A2 = g2.width / p2, z2 = d2, F2 = z2.getValue(), D2 = d2.getStyle(), E2 = w2?.darkMode ?? false;
@@ -2176,7 +2176,7 @@ const Rt = (e2, t2, o2 = null) => {
2176
2176
  ye2.current = true;
2177
2177
  const e3 = Q.lazy(async () => {
2178
2178
  try {
2179
- const e4 = await import("./CbjDGM3qD-3I0A3P.mjs");
2179
+ const e4 = await import("./pRXXW_aAnmpr0_LV.mjs");
2180
2180
  return ye2.current = false, Ce2.current = true, R2([...k2]), e4;
2181
2181
  } catch (e4) {
2182
2182
  return console.warn(e4), _2.current?.(false), null;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.5.1
2
+ * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.6.0
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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sheetxl/react",
3
3
  "description": "React - React components needed to build advanced grid and spreadsheet UIs.",
4
- "version": "0.5.1",
4
+ "version": "0.6.0",
5
5
  "license": "SEE LICENSE IN <LICENSE>",
6
6
  "type": "module",
7
7
  "exports": {
@@ -37,10 +37,10 @@
37
37
  "@dnd-kit/sortable": "^10.0.0",
38
38
  "@dnd-kit/utilities": "^3.2.2",
39
39
  "@monaco-editor/react": "^4.6.0",
40
- "@sheetxl/utils": "^0.5.1",
41
- "@sheetxl/utils-react": "^0.5.1",
42
- "@sheetxl/grid-react": "^0.5.1",
43
- "@sheetxl/sdk": "^0.5.1",
40
+ "@sheetxl/utils": "^0.6.0",
41
+ "@sheetxl/utils-react": "^0.6.0",
42
+ "@sheetxl/grid-react": "^0.6.0",
43
+ "@sheetxl/sdk": "^0.6.0",
44
44
  "clsx": "^2.1.1",
45
45
  "monaco-editor-auto-typings": "^0.4.6",
46
46
  "react-merge-refs": "^3.0.2",