@sheetxl/studio-mui 0.7.5 → 0.7.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/LICENSE.md +1 -1
  2. package/browser/cjs/BCf8BQb2c8ANexW4.cjs +7 -0
  3. package/browser/cjs/BJ4pZo7s81ynDlzw.cjs +6 -0
  4. package/browser/cjs/{CuHwOikK2J1MLsHN.cjs → Bf70UQlMT3b0NoOZ.cjs} +1 -1
  5. package/browser/cjs/Bpq9GrV7al7xxJ_d.cjs +6 -0
  6. package/browser/cjs/BxlQ6aLh5_jUvk9w.cjs +20 -0
  7. package/browser/cjs/{B4uj1Smd-98Hab_l.cjs → CJSNNa8ySxzuEmoy.cjs} +2 -2
  8. package/browser/cjs/{D4c72fkCJiL-S_-a.cjs → CUND2W1xMwqPOHwD.cjs} +7 -7
  9. package/browser/cjs/{CJQkIVFa7S1AZcBP.cjs → Cg95aBJ4kuUq7jrz.cjs} +1 -1
  10. package/browser/cjs/Dcoq8P2O8-40waHl.cjs +6 -0
  11. package/browser/cjs/{JURSrTjvLJ8bc4Yl.cjs → DeoOsY5TkIAydt9W.cjs} +2 -2
  12. package/browser/cjs/index.cjs +3 -3
  13. package/browser/cjs/{D6pUyWwmIliDWT8B.cjs → j0lD5RrJ86CRlUNT.cjs} +2 -2
  14. package/browser/esm/{B7CJX7fKvv1vBk8-.mjs → 7tCRjNmDM5kf3BFa.mjs} +2 -2
  15. package/browser/esm/{hWToTYtpa0PFzhRm.mjs → BWxmPJd4f8qZMxaa.mjs} +17 -18
  16. package/browser/esm/{COI8Eg7HQcdPFGcZ.mjs → BbHGWXif6ytyfyHI.mjs} +1 -1
  17. package/browser/esm/{CajWEWsYWzynjFKw.mjs → BkhHyCmy1MwVFS1b.mjs} +2 -2
  18. package/browser/esm/{BbfPde9B9b4p64_L.mjs → Bo3cXzeDcP_Q9YvX.mjs} +2 -2
  19. package/browser/esm/CRDu7VFAa8NGcoHj.mjs +49 -0
  20. package/browser/esm/{C48fXszXYqcJMQni.mjs → Cd02kMBZDsozIA98.mjs} +12 -12
  21. package/browser/esm/CzdBzjYgP1i3pkPL.mjs +4455 -0
  22. package/browser/esm/DFppS_p4spncePDm.mjs +156 -0
  23. package/browser/esm/{KULqIIHcvNriSu7F.mjs → db-2uDA7mYS4QpHj.mjs} +1 -1
  24. package/browser/esm/index.mjs +70 -72
  25. package/browser/esm/{gpytxNaiTkBoZ6aj.mjs → nzc1811Pk5-sKDu5.mjs} +7 -7
  26. package/licenses/dependencies.txt +189 -222
  27. package/node/assets/style.css +1 -1
  28. package/node/esm/BVKo3uc0IreLNkkN.mjs +157 -0
  29. package/node/esm/{CuIak_iZn0ApypmT.mjs → BfnEq4EhLf8jJ0Gp.mjs} +1 -1
  30. package/node/esm/{BHFc6-pxJ_X3esj1.mjs → BgR1PWucIb0Zucr4.mjs} +1 -1
  31. package/node/esm/{DEnAvzkXoQEvscd-.mjs → BimlBylqyslj9fNg.mjs} +1 -1
  32. package/node/esm/{DExsoaMD7hWNhceb.mjs → BnGsbrQwjcaUFAdt.mjs} +13 -13
  33. package/node/esm/{DKhoTrOwIfMtft9r.mjs → CQhaL28vV1X6Xt2N.mjs} +43 -44
  34. package/node/esm/{NYFZEGBg9dFXwfFf.mjs → DB2ryaj4_Y8Lgyy_.mjs} +1 -1
  35. package/node/esm/{DQIYBoarjlonhEEn.mjs → X3qO0PKREgY9FMZU.mjs} +8 -8
  36. package/node/esm/index.mjs +1575 -1576
  37. package/node/esm/{DH3yxwtQR5c61iv3.mjs → rOozeXREjiU8jjPd.mjs} +14 -14
  38. package/package.json +15 -17
  39. package/types/index.d.ts +25 -93
  40. package/browser/cjs/BnpPHKTC6_96pDcW.cjs +0 -6
  41. package/browser/cjs/CHyGxDKCce-XV53l.cjs +0 -7
  42. package/browser/cjs/F4v-BOmzUXzCO3uz.cjs +0 -6
  43. package/browser/cjs/QQ4l7f6lYZb7S6td.cjs +0 -20
  44. package/browser/cjs/Td2md8ruASYOp_Rr.cjs +0 -6
  45. package/browser/cjs/jHU6TwhWd2lZX-VA.cjs +0 -6
  46. package/browser/esm/BhP57_jo4NnvHBgF.mjs +0 -64
  47. package/browser/esm/CGVa4zFRRZyFzDvh.mjs +0 -4489
  48. package/browser/esm/CkXFR3hHwNp6jfJV.mjs +0 -49
  49. package/browser/esm/CwAqw5gJ2yzuXbLx.mjs +0 -155
  50. package/node/esm/8qD_FXFKXbOqF2_X.mjs +0 -156
  51. package/node/esm/DQKU8gdXpx4S0S0D.mjs +0 -65
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.5
2
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.7
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.
@@ -7,11 +7,11 @@
7
7
  import { jsx as t } from "react/jsx-runtime";
8
8
  import { memo as n, useMemo as o, useState as e, useCallback as a } from "react";
9
9
  import { alpha as i, getOverlayAlpha as s } from "@mui/material/styles";
10
- import { Box as l, FormControl as r, TextField as p } from "@mui/material";
11
- import { useCallbackRef as c } from "@sheetxl/utils-react";
10
+ import { Box as l, FormControl as r, TextField as c } from "@mui/material";
11
+ import { useCallbackRef as p } from "@sheetxl/utils-react";
12
12
  import { OptionsDialog as m } from "@sheetxl/utils-mui";
13
13
  const u = ["Ok", "Cancel"], d = n((n2) => {
14
- const { initialComments: d2 = null, onUpdateComments: g, context: f, onOption: x, onValidateOption: h, onDone: C, options: O = u, defaultOption: y = O?.[0], cancelOption: w = "Cancel", sx: F, ...P } = n2, T = o(() => {
14
+ const { initialComments: d2 = null, onUpdateComments: g, context: f, onOption: x, onValidateOption: h, onDone: C, options: O = u, defaultOption: y = O?.[0], cancelOption: w = "Cancel", sx: F, ...T } = n2, k = o(() => {
15
15
  const t2 = d2 ?? f?.()?.getComments();
16
16
  let n3 = "";
17
17
  if (t2 && t2.content && t2.content.runs) {
@@ -22,8 +22,8 @@ const u = ["Ok", "Cancel"], d = n((n2) => {
22
22
  }
23
23
  }
24
24
  return n3;
25
- }, []), [k, v] = e(T), [I, b] = e(false), D = a(async (t2, n3) => null, []), B = c(async (t2) => {
26
- const n3 = "" === k ? [] : k.split("\n");
25
+ }, []), [v, b] = e(k), [D, I] = e(false), P = a(async (t2, n3) => null, []), B = p(async (t2) => {
26
+ const n3 = "" === v ? [] : v.split("\n");
27
27
  if (t2 !== w) {
28
28
  const t3 = [];
29
29
  for (let o3 = 0; o3 < n3.length; o3++) t3.push({ text: n3[o3] });
@@ -31,19 +31,19 @@ const u = ["Ok", "Cancel"], d = n((n2) => {
31
31
  g?.(o2);
32
32
  }
33
33
  x?.(t2, t2 === w, t2 === y), C?.();
34
- }, [k, g, C, x, y, w]), E = c((t2) => {
35
- v(t2.target.value), D(t2.target.value, null);
36
- }, [h]), M = c(async (t2) => {
34
+ }, [v, g, C, x, y, w]), E = p((t2) => {
35
+ b(t2.target.value), P(t2.target.value, null);
36
+ }, [h]), M = p(async (t2) => {
37
37
  let n3 = await Promise.resolve(h?.(t2));
38
38
  try {
39
- false !== n3 && (n3 = await D(k, t2));
39
+ false !== n3 && (n3 = await P(v, t2));
40
40
  } catch (t3) {
41
41
  }
42
42
  return n3 ?? true;
43
- }, [h, k]);
44
- return t(m, { title: (T ? "Edit" : "Insert") + " Comments", options: O, onDone: C, onOption: (t2) => B(t2), onValidateOption: M, defaultOption: y, cancelOption: w, autoFocusSel: ".autoFocus", sx: { width: "480px", ...F }, ...P, children: t(l, { sx: { paddingTop: (t2) => t2.spacing(1), paddingBottom: (t2) => t2.spacing(0), rowGap: (t2) => t2.spacing(1), display: "flex", flexDirection: "column" }, children: t(r, { sx: { paddingTop: (t2) => t2.spacing(1.5), minWidth: 135, width: "100%" }, size: "small", children: t(p, { label: "Comments", placeholder: "Enter a comment.", onFocus: (t2) => {
45
- I || t2.target?.select(), b(true);
46
- }, sx: { "& .MuiFormHelperText-root": { marginTop: (t2) => t2.spacing(0.5) } }, InputLabelProps: { shrink: true }, InputProps: { inputProps: { className: "autoFocus", spellCheck: false, autoComplete: "off", sx: { paddingTop: (t2) => t2.spacing(1.25), paddingBottom: (t2) => t2.spacing(0.75), backgroundImage: `linear-gradient(${i("#fff", s(5))}, ${i("#fff", s(5))})` } } }, value: k, onChange: E, onContextMenu: (t2) => {
43
+ }, [h, v]);
44
+ return t(m, { title: (k ? "Edit" : "Insert") + " Comments", options: O, onDone: C, onOption: (t2) => B(t2), onValidateOption: M, defaultOption: y, cancelOption: w, autoFocusSel: ".autoFocus", sx: { width: "480px", ...F }, ...T, children: t(l, { sx: { paddingTop: (t2) => t2.spacing(1), paddingBottom: (t2) => t2.spacing(0), rowGap: (t2) => t2.spacing(1), display: "flex", flexDirection: "column" }, children: t(r, { sx: { paddingTop: (t2) => t2.spacing(1.5), minWidth: 135, width: "100%" }, size: "small", children: t(c, { label: "Comments", placeholder: "Enter a comment.", onFocus: (t2) => {
45
+ D || t2.target?.select(), I(true);
46
+ }, sx: { "& .MuiFormHelperText-root": { marginTop: (t2) => t2.spacing(0.5) } }, slotProps: { inputLabel: { shrink: true }, htmlInput: { className: "autoFocus", spellCheck: false, autoComplete: "off", sx: { paddingTop: (t2) => t2.spacing(1.25), paddingBottom: (t2) => t2.spacing(0.75), backgroundImage: `linear-gradient(${i("#fff", s(5))}, ${i("#fff", s(5))})` } } }, value: v, onChange: E, onContextMenu: (t2) => {
47
47
  t2.stopPropagation();
48
48
  } }) }) }) });
49
49
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sheetxl/studio-mui",
3
3
  "description": "Studio - Spreadsheet UI built with SheetXL SDK using React & MUI.",
4
- "version": "0.7.5",
4
+ "version": "0.7.7",
5
5
  "license": "SEE LICENSE IN <LICENSE>",
6
6
  "type": "module",
7
7
  "exports": {
@@ -48,38 +48,36 @@
48
48
  "charting"
49
49
  ],
50
50
  "dependencies": {
51
- "@sheetxl/grid-react": "^0.7.5",
52
- "@sheetxl/io": "^0.7.5",
53
- "@sheetxl/react": "^0.7.5",
54
- "@sheetxl/sdk": "^0.7.5",
55
- "@sheetxl/utils": "^0.7.5",
56
- "@sheetxl/utils-mui": "^0.7.5",
57
- "@sheetxl/utils-react": "^0.7.5",
51
+ "@sheetxl/grid-react": "^0.7.7",
52
+ "@sheetxl/io": "^0.7.7",
53
+ "@sheetxl/react": "^0.7.7",
54
+ "@sheetxl/sdk": "^0.7.7",
55
+ "@sheetxl/utils": "^0.7.7",
56
+ "@sheetxl/utils-mui": "^0.7.7",
57
+ "@sheetxl/utils-react": "^0.7.7",
58
58
  "clsx": "^2.1.1",
59
59
  "csstype": "^3.1.3",
60
60
  "file-saver": "^2.0.5",
61
61
  "fuse.js": "^7.0.0",
62
62
  "notistack": "^3.0.1",
63
63
  "react-color": "^2.19.3",
64
- "react-error-boundary": "^6.0.0",
65
- "react-hook-form": "^7.54.2",
64
+ "react-hook-form": "^7.63.0",
66
65
  "react-merge-refs": "^3.0.2",
67
66
  "react-resizable": "^3.0.5",
68
67
  "react-transition-group": "^4.4.5",
69
68
  "react-use": "^17.6.0",
70
69
  "react-virtualized": "^9.22.6",
71
- "rooks": "^9.0.1",
70
+ "rooks": "^9.3.0",
72
71
  "tinycolor2": "^1.6.0"
73
72
  },
74
73
  "peerDependencies": {
75
74
  "@emotion/cache": "^11.14.0",
76
75
  "@emotion/react": "^11.14.0",
77
76
  "@emotion/styled": "^11.14.0",
78
- "@mui/icons-material": "^6.5.0",
79
- "@mui/material": "^6.5.0",
80
- "@mui/styled-engine": "^6.5.0",
81
- "@mui/system": "^6.5.0",
82
- "@mui/utils": "^6.4.9",
77
+ "@mui/material": "^7.3.2",
78
+ "@mui/styled-engine": "^7.3.2",
79
+ "@mui/system": "^7.3.2",
80
+ "@mui/utils": "^7.3.2",
83
81
  "react": "^19.1.0",
84
82
  "react-dom": "^19.1.0"
85
83
  },
@@ -87,6 +85,6 @@
87
85
  "@types/file-saver": "^2.0.5",
88
86
  "@types/react-resizable": "^3.0.8",
89
87
  "@types/react-transition-group": "^4.4.6",
90
- "@types/react-virtualized": "^9.22.0"
88
+ "@types/react-virtualized": "^9.22.3"
91
89
  }
92
90
  }
package/types/index.d.ts CHANGED
@@ -1,12 +1,12 @@
1
1
  import { BoxProps } from '@mui/material';
2
2
  import { Command } from '@sheetxl/utils-react';
3
- import { CommandButtonOptions } from '@sheetxl/utils-mui';
4
- import { CommandButtonProps } from '@sheetxl/utils-mui';
3
+ import { CommandButtonOptions } from '@sheetxl/utils-react';
4
+ import { CommandButtonProps } from '@sheetxl/utils-react';
5
5
  import { CommandButtonType } from '@sheetxl/utils-react';
6
6
  import { CommandContext } from '@sheetxl/react';
7
7
  import { CommandPopupButtonProps } from '@sheetxl/utils-mui';
8
- import { CommandToolbarProps } from '@sheetxl/utils-mui';
9
8
  import { default as default_2 } from 'react';
9
+ import { DefaultTaskPaneRegistry } from '@sheetxl/react';
10
10
  import { ErrorPanelProps } from '@sheetxl/utils-mui';
11
11
  import { ExhibitIconButtonProps } from '@sheetxl/utils-mui';
12
12
  import { ExhibitPopupButtonProps } from '@sheetxl/utils-mui';
@@ -25,7 +25,6 @@ import { ICommands } from '@sheetxl/utils-react';
25
25
  import { IMovable } from '@sheetxl/sdk';
26
26
  import { INamedCollection } from '@sheetxl/sdk';
27
27
  import { IReactNotifier } from '@sheetxl/utils-react';
28
- import { IScript } from '@sheetxl/sdk';
29
28
  import { ISheet } from '@sheetxl/sdk';
30
29
  import { ISheetElement } from '@sheetxl/react';
31
30
  import { IStyle } from '@sheetxl/sdk';
@@ -43,7 +42,6 @@ import { PopupButtonType } from '@sheetxl/utils-mui';
43
42
  import { ReadFormatType } from '@sheetxl/io';
44
43
  import { ReadWorkbookOptions } from '@sheetxl/io';
45
44
  import { RegisterOptions } from 'react-hook-form';
46
- import { ScriptEditorProps } from '@sheetxl/react';
47
45
  import { SheetProps } from '@sheetxl/react';
48
46
  import { SvgIconProps } from '@mui/material';
49
47
  import { SxProps } from '@mui/system';
@@ -346,6 +344,8 @@ export declare interface CustomColorPanelProps extends default_2.HTMLAttributes<
346
344
 
347
345
  export declare const defaultNewWorkbook: () => void;
348
346
 
347
+ export { DefaultTaskPaneRegistry }
348
+
349
349
  export declare const DeleteCellsCommandButton: default_2.NamedExoticComponent<Omit<DeleteCellsCommandButtonProps, "ref"> & default_2.RefAttributes<HTMLElement>>;
350
350
 
351
351
  export declare interface DeleteCellsCommandButtonProps extends CommandPopupButtonProps {
@@ -628,26 +628,6 @@ export declare interface InsertImageCommandButtonProps extends CommandPopupButto
628
628
  showQuickButton?: boolean;
629
629
  }
630
630
 
631
- /**
632
- * Menu for Inserting new Scripts
633
- */
634
- export declare const InsertScriptCommandButton: default_2.FC<InsertScriptCommandButtonProps & {
635
- ref?: any;
636
- }>;
637
-
638
- export declare interface InsertScriptCommandButtonProps extends CommandPopupButtonProps {
639
- /**
640
- * Path to fetch directory scripts from.
641
- */
642
- scriptPath?: string;
643
- }
644
-
645
- /**
646
- * Type returned via ref property
647
- */
648
- export declare interface IScriptWorkspaceElement extends ScriptWorkspaceAttributes, HTMLElement {
649
- }
650
-
651
631
  /**
652
632
  * Type returned via ref property
653
633
  */
@@ -815,6 +795,7 @@ export declare interface PresetTableStylesCommandButtonProps extends CommandPopu
815
795
  onSelectTableStyleName?: (styleName: string) => void;
816
796
  bodyStyle?: GridSurfaceStyle;
817
797
  usePreviewIcon?: boolean;
798
+ disabledQuickKey?: boolean;
818
799
  }
819
800
 
820
801
  /**
@@ -862,68 +843,6 @@ export declare interface RequestTitleOptions extends FocusOptions {
862
843
  requestReason?: string;
863
844
  }
864
845
 
865
- /**
866
- * Menu for Quick run of scripts.
867
- */
868
- export declare const RunScriptCommandButton: default_2.FC<RunScriptCommandButtonProps & {
869
- ref?: any;
870
- }>;
871
-
872
- export declare interface RunScriptCommandButtonProps extends CommandPopupButtonProps {
873
- }
874
-
875
- export declare const ScriptEditorToolbar: default_2.NamedExoticComponent<Omit<Omit<CommandToolbarProps, "createToolbarPalette">, "ref"> & default_2.RefAttributes<HTMLDivElement>>;
876
-
877
- /**
878
- * This tracks the selection of the sheet and
879
- * updates the a named range editor and a sheet cell editor.
880
- */
881
- export declare const ScriptWorkspace: default_2.FC<ScriptWorkspaceProps & ScriptWorkspaceAttribute>;
882
-
883
- export declare type ScriptWorkspaceAttribute = {
884
- ref?: default_2.Ref<IScriptWorkspaceElement>;
885
- };
886
-
887
- export declare interface ScriptWorkspaceAttributes {
888
- isScriptWorkspaceElement: () => true;
889
- }
890
-
891
- /**
892
- * Move this to another project. Automation-Editor
893
- */
894
- export declare interface ScriptWorkspaceProps extends default_2.HTMLAttributes<HTMLElement> {
895
- /**
896
- * MUI SX props {@link https://mui.com/system/getting-started/the-sx-prop/}
897
- */
898
- sx?: SxProps<Theme>;
899
- /**
900
- * The commands to use for the toolbar.
901
- */
902
- commands?: ICommands.IGroup;
903
- /**
904
- * If the values can be modified
905
- */
906
- readOnly?: boolean;
907
- /**
908
- * Called when the user request a close.
909
- */
910
- onClose?: () => void;
911
- /**
912
- * Allows for component to be autoFocused.
913
- * @remarks
914
- * If a string is provided this will be used as a querySelector to find the initial focusable component.
915
- */
916
- autoFocusSel?: string;
917
- /**
918
- * Props to pass to the editor.
919
- */
920
- editorProps?: ScriptEditorProps;
921
- /**
922
- * The script module to interact with.
923
- */
924
- scripts: IScript;
925
- }
926
-
927
846
  /**
928
847
  * By default we will print examples message if dev and eval only
929
848
  *
@@ -1189,6 +1108,19 @@ declare interface SwatchProps extends default_2.HTMLAttributes<HTMLElement> {
1189
1108
  darkMode?: boolean;
1190
1109
  }
1191
1110
 
1111
+ /**
1112
+ * TODO
1113
+ * - save last searches (up/down arrow to navigate) (in preferences/workbook?)
1114
+ * - later add indexing so we can do real-time search and count
1115
+ */
1116
+ export declare const TableDetailsPanel: default_2.NamedExoticComponent<TableDetailsPanelProps & default_2.RefAttributes<HTMLDivElement>>;
1117
+
1118
+ export declare interface TableDetailsPanelProps extends default_2.HTMLAttributes<HTMLDivElement> {
1119
+ command?: ICommand<ITable, CommandContext.Table>;
1120
+ commands: ICommands.IGroup;
1121
+ context?: CommandContext.Table;
1122
+ }
1123
+
1192
1124
  /**
1193
1125
  * This is a way to canvas based TableStylePreview. It has a simple rendering but is lightweight.
1194
1126
  */
@@ -1225,7 +1157,7 @@ export declare interface TableStyleOptionsElement extends TableStyleOptionsAttri
1225
1157
  * Shows options with tables.
1226
1158
  * TODO - We will later also have the options as commands.
1227
1159
  */
1228
- export declare const TableStyleOptionsPanel: default_2.FC<TableStyleOptionsPanelProps & TableStyleOptionsAttribute>;
1160
+ export declare const TableStyleOptionsPanel: default_2.NamedExoticComponent<TableStyleOptionsPanelProps & default_2.RefAttributes<TableStyleOptionsElement>>;
1229
1161
 
1230
1162
  /**
1231
1163
  * This is a panel that is used to configure options for a table.
@@ -1408,10 +1340,6 @@ export declare interface useWorkbookCommandsOptions {
1408
1340
  target: ICommands.ITarget | (() => ICommands.ITarget);
1409
1341
  commands: ICommands.IGroup;
1410
1342
  onExecute?: () => void;
1411
- /**
1412
- * When the sidebar is being requested to be shown.
1413
- */
1414
- onShowSidebar?: () => void;
1415
1343
  /**
1416
1344
  * Whether dark mode is enabled.
1417
1345
  */
@@ -1486,7 +1414,7 @@ export declare interface WorkbookElementProps extends Omit<PaperProps, 'autoFocu
1486
1414
  * Callback for when the workbook is loaded. Useful for hiding/showing
1487
1415
  * loading panels.
1488
1416
  */
1489
- onElementLoad?: (event: WorkbookLoadEvent) => void;
1417
+ onElementLoad?: (event: WorkbookLoadEvent) => void | Promise<void>;
1490
1418
  /**
1491
1419
  * MUI SX props {@link https://mui.com/system/getting-started/the-sx-prop/}
1492
1420
  */
@@ -1599,6 +1527,10 @@ export declare interface WorkbookElementProps extends Omit<PaperProps, 'autoFocu
1599
1527
  * @returns A React Element representing the Sheet.
1600
1528
  */
1601
1529
  renderSheet?: (props: SheetProps) => default_2.ReactElement;
1530
+ /**
1531
+ * Allows users to Wrap stage children in Top level Context
1532
+ */
1533
+ mainWrapper?: (children: default_2.ReactNode) => default_2.ReactElement;
1602
1534
  /**
1603
1535
  * Show the horizontal scrollbar
1604
1536
  */
@@ -1,6 +0,0 @@
1
- "use strict";/**
2
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.5
3
- *
4
- * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
- * License: The license can be found at https://www.sheetxl.com/license.
6
- */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),s=require("react"),d=require("@mui/material/styles"),r=require("@mui/material"),T=require("@mui/icons-material"),a=require("@sheetxl/sdk"),x=require("@sheetxl/utils-react"),l=require("@sheetxl/utils-mui"),ne=require("./QQ4l7f6lYZb7S6td.cjs"),A=s.memo(I=>{const{label:C,value:f,options:c,onSelect:g,tabIndex:y=0,...E}=I,[k,b]=s.useState(()=>X(f,c));s.useEffect(()=>{b(X(f,c))},[f,c]);const S=x.useCallbackRef(h=>{b(h.target.value),g?.(c[h.target.value])},[g,c]),p=s.useMemo(()=>Object.keys(c).map(h=>t.jsx(r.MenuItem,{value:h,children:h},h)),[c]);return t.jsxs(r.FormControl,{sx:{minWidth:135},size:"small",children:[t.jsx(r.InputLabel,{children:C}),t.jsx(r.Select,{inputProps:{tabIndex:y},value:k,label:C,onChange:S,sx:{backgroundImage:`linear-gradient(${d.alpha("#fff",d.getOverlayAlpha(5))}, ${d.alpha("#fff",d.getOverlayAlpha(5))})`},...E,children:p})]})}),K={Workbook:"workbook",Sheet:"sheet"},G={enter:140,exit:140},Q={Formulas:a.ICell.Content.Formulas,Values:a.ICell.Content.Values,Notes:a.ICell.Content.Notes,Comments:a.ICell.Content.Comments},Y={...Q};delete Y.Values;const te={"By Rows":!0,"By Columns":!1},X=(I,C)=>{const f=Object.keys(C);for(let c=0;c<f.length;c++){const g=f[c];if(C[g]===I)return g}},J=s.memo(I=>{const{replace:C=!1,findText:f,replaceText:c,findOptions:g,replaceOptions:y,title:E,onHide:k,onFindOrReplace:b,...S}=I,p=s.useRef(null),h=s.useRef(null),M=s.useRef(null),D=s.useRef(null),P=s.useRef(null),q=s.useRef(null),W=(e,n)=>{n&&(n.start(e,{center:!1}),setTimeout(()=>n.stop(e),180))},[L,v]=s.useState(!1),[F,Z]=s.useState(!1),[m,w]=s.useState(C),[$,B]=s.useState(!1),[V,N]=s.useState(!1),[o,u]=s.useState({findText:null,replaceText:null,replace:C,replaceOptions:{},findOptions:{matchCase:!1,matchEntireCell:!1,useRegex:!1,orientation:a.IRange.Orientation.Row,fields:[a.ICell.Content.Formulas]},scope:K.Sheet}),R=x.useCallbackRef(async(e,n,i,j)=>{if(!b)return;const O={...o};O.replaceOptions={...O.replaceOptions},O.findOptions={...O.findOptions},O.replaceOptions.maxCount=i?void 0:1,O.replace=n,n&&o.findOptions.fields?.[0]===a.ICell.Content.Values&&(O.findOptions.fields=[a.ICell.Content.Formulas]),O.findOptions.reverse=!e;const ee=await b({autoFocus:j,...O});B(ee===0)},[o,b]);s.useEffect(()=>{B(!1)},[o,F,m]);const H=x.useCallbackRef((e,n)=>{if(e.keyCode===x.KeyCodes.Enter){if(!o.findText)return;let i=!0,j=!1;e.shiftKey&&(i=!1),n?(e.ctrlKey&&e.altKey&&(j=!0),W(e,j?q.current:P.current)):W(e,i?D.current:M.current),R(i,n,j,!1)}},[o]),z=s.useRef(null);s.useLayoutEffect(()=>{u(e=>{const n={...e};n.findText=f&&f.length>0?f:e.findText??"",v(!0),c!==void 0&&(n.replaceText=c),g&&(n.findOptions={...n.findOptions,...g}),n.replaceText||(n.replaceText=""),n.replaceOptions&&(n.replaceOptions={...n.replaceOptions}),y&&(n.replaceOptions={...n.replaceOptions,...y}),o.findOptions.fields?.[0]||(o.findOptions.fields=[a.ICell.Content.Formulas]);const i=!(!y&&c===void 0);return i&&w(i),n}),V||z.current?.focus()},[f,c,g,y]),s.useEffect(()=>{m?(o.findOptions.fields[0],a.ICell.Content.Values):v(!0)},[m]),s.useEffect(()=>{if(L&&p.current&&o.findText===p.current.value)return p.current===document.activeElement||p.current.contains(document.activeElement)?(p.current?.select(),void v(!1)):void p.current.addEventListener("focus",()=>{p.current?.select(),v(!1)},{once:!0})},[L,o]);const[_,{width:U}]=ne.useMeasure();return t.jsx(l.InternalWindow,{ref:z,title:E??(m?"Find & Replace":"Find"),initialPosition:{y:"35"},autoFocusSel:".input",onHide:k,onFocus:()=>N(!0),onBlur:()=>{N(!1),B(!1)},PaperProps:{elevation:V?3:1},...S,children:t.jsxs(r.DialogContent,{dividers:!0,ref:_,sx:{display:"flex",flexDirection:"column",paddingLeft:e=>e.spacing(1.5),paddingRight:e=>e.spacing(1.5)},onKeyDown:e=>{if(e.key==="h"&&e.ctrlKey)w(!0),p.current?.contains(document.activeElement)&&h.current?.focus();else if(e.key==="f"&&e.ctrlKey)p.current?.focus();else if(e.key==="c"&&e.altKey)u(n=>{const i={...n};return i.findOptions.matchCase=!n.findOptions.matchCase,i});else if(e.key==="e"&&e.altKey)u(n=>{const i={...n};return i.findOptions.matchEntireCell=!n.findOptions.matchEntireCell,i});else{if(e.key!=="r"||!e.altKey)return;u(n=>{const i={...n};return i.findOptions.useRegex=!n.findOptions.useRegex,i})}e.preventDefault()},children:[t.jsxs(r.Box,{sx:{display:"flex",flexDirection:"row",gap:e=>e.spacing(1)},children:[t.jsxs(r.Box,{sx:{display:"flex",flexDirection:"row",alignItems:"start",gap:e=>e.spacing(.25),paddingTop:"3px"},children:[t.jsx(l.ExhibitOptionButton,{selected:F,onSelectToggle:e=>{Z(e)},preventFocus:!0,label:"Toggle Additional Options",icon:l.themeIcon(t.jsx(l.FindOptionsIcon,{}))}),t.jsx(l.ExhibitOptionButton,{selected:m,onSelectToggle:e=>{w(e)},preventFocus:!0,label:"Toggle Replace",icon:l.themeIcon(t.jsx(l.FindReplaceToggleIcon,{})),shortcut:{key:m?"F":"H",modifiers:[x.KeyModifiers.Ctrl]}})]}),t.jsxs(r.Box,{sx:{display:"flex",flexDirection:"column",maxWidth:"100%",boxSizing:"border-box"},children:[t.jsxs(r.Box,{sx:{display:"flex",flexDirection:"row",alignItems:"center"},children:[t.jsx(r.TextField,{label:"Find",InputLabelProps:{shrink:!0},InputProps:{sx:{paddingRight:e=>e.spacing(1),minWidth:U>460?"20em":void 0,backgroundImage:`linear-gradient(${d.alpha("#fff",d.getOverlayAlpha(5))}, ${d.alpha("#fff",d.getOverlayAlpha(5))})`},inputProps:{draggable:!1,ref:p,className:"input",autoFocus:!0,spellCheck:!1,autoComplete:"off",sx:{paddingTop:e=>e.spacing(1.25),paddingBottom:e=>e.spacing(.75)}},endAdornment:t.jsx(r.InputAdornment,{sx:{transform:"scale(0.75) translateX(16px)"},position:"end",children:t.jsxs(r.Box,{sx:{display:"flex",alignItems:"center",flexDirection:"row",gap:"1px"},children:[t.jsx(l.ExhibitOptionButton,{selected:o.findOptions.matchCase,onSelectToggle:e=>{u(n=>{const i={...n};return i.findOptions.matchCase=e,i})},label:"Match Case",shortcut:{key:"C",modifiers:[x.KeyModifiers.Alt]},icon:l.themeIcon(t.jsx(l.FindCaseSensitiveIcon,{}))}),t.jsx(l.ExhibitOptionButton,{selected:o.findOptions.matchEntireCell,onSelectToggle:e=>{u(n=>{const i={...n};return i.findOptions.matchEntireCell=e,i})},label:"Match Entire Cell",shortcut:{key:"E",modifiers:[x.KeyModifiers.Alt]},icon:l.themeIcon(t.jsx(l.FindWholeWordIcon,{}))}),t.jsx(l.ExhibitOptionButton,{selected:o.findOptions.useRegex,onSelectToggle:e=>{u(n=>{const i={...n};return i.findOptions.useRegex=e,i})},label:"Use Regular Expression",shortcut:{key:"R",modifiers:[x.KeyModifiers.Alt]},icon:l.themeIcon(t.jsx(l.FindRegExIcon,{}))})]})})},sx:{flex:"1 1 100%",marginRight:e=>e.spacing(1),"& .MuiOutlinedInput-notchedOutline":{borderColor:e=>$?`${e.palette.error.main} !important`:void 0},"& .MuiInputLabel-outlined":{color:e=>$?`${e.palette.error.main} !important`:void 0}},value:o.findText??"",onChange:e=>{u(n=>{const i={...n};return i.findText=e.target.value,i})},onKeyDown:e=>H(e,!1),onContextMenu:e=>{e.stopPropagation()}}),t.jsx(l.ExhibitOptionButton,{selected:o.findOptions.reverse,onSelectToggle:e=>{R(!1,!1)},touchRippleRef:M,label:"",shortcut:{key:"Enter",modifiers:[x.KeyModifiers.Shift]},icon:l.themeIcon(o.findOptions.orientation!==a.IRange.Orientation.Column?t.jsx(T.ArrowBack,{}):t.jsx(T.ArrowUpward,{})),disabled:!o.findText}),t.jsx(l.ExhibitOptionButton,{selected:!o.findOptions.reverse,onSelectToggle:e=>{R(!0,!1)},touchRippleRef:D,label:"Next Match",shortcut:{key:"Enter"},icon:l.themeIcon(o.findOptions.orientation!==a.IRange.Orientation.Column?t.jsx(T.ArrowForward,{}):t.jsx(T.ArrowDownward,{})),disabled:!o.findText})]}),t.jsx(r.Collapse,{in:m,timeout:G,onExit:()=>{p.current?.focus()},children:t.jsxs(r.Box,{sx:{display:"flex",flexDirection:"row",alignItems:"center",marginTop:e=>e.spacing(2)},children:[t.jsx(r.TextField,{label:"Replace",InputLabelProps:{shrink:!0},InputProps:{sx:{paddingRight:e=>e.spacing(1),backgroundImage:`linear-gradient(${d.alpha("#fff",d.getOverlayAlpha(5))}, ${d.alpha("#fff",d.getOverlayAlpha(5))})`},inputProps:{ref:h,className:"input",spellCheck:!1,autoComplete:"off",sx:{paddingTop:e=>e.spacing(1.25),paddingBottom:e=>e.spacing(.75)}}},sx:{flex:"1 1 100%",marginRight:e=>e.spacing(1)},value:o.replaceText??"",onChange:e=>{u(n=>{const i={...n};return i.replaceText=e.target.value,i})},onKeyDown:e=>H(e,!0),onContextMenu:e=>{e.stopPropagation()}}),t.jsx(l.ExhibitOptionButton,{onSelectToggle:e=>{R(!0,!0)},touchRippleRef:P,label:"Replace",shortcut:{key:"Enter"},icon:l.themeIcon(t.jsx(l.FindReplaceIcon,{})),disabled:!o.findText}),t.jsx(l.ExhibitOptionButton,{onSelectToggle:e=>{R(!0,!0,!0)},touchRippleRef:q,label:"Replace All",shortcut:{key:"Enter",modifiers:[x.KeyModifiers.Ctrl,x.KeyModifiers.Alt]},icon:l.themeIcon(t.jsx(l.FindReplaceAllIcon,{})),disabled:!o.findText})]})})]})]}),t.jsx(r.Collapse,{in:F,timeout:G,onExit:()=>{p.current?.focus()},children:t.jsxs(r.Box,{sx:{minHeight:"10px",flex:"1 1 100%",display:"flex",flexDirection:"column",gap:e=>e.spacing(.5),marginTop:e=>e.spacing(1)},children:[t.jsx(l.ExhibitDivider,{orientation:"horizontal",sx:{marginBottom:e=>e.spacing(1.5)}}),t.jsxs(r.Box,{sx:{display:"flex",flexDirection:U>=413?"row":"column",justifyContent:"space-evenly",alignItems:"center",rowGap:e=>e.spacing(2)},tabIndex:-1,children:[t.jsx(A,{label:"Within",value:o.scope,options:K,onSelect:e=>{u(n=>{const i={...n};return i.scope=e,i})}}),t.jsx(A,{label:"Search",value:o.findOptions.orientation!==a.IRange.Orientation.Column,options:te,onSelect:e=>{u(n=>{const i={...n};return i.findOptions.orientation=e?a.IRange.Orientation.Row:a.IRange.Orientation.Column,i})}}),t.jsx(A,{label:"Look in",value:m&&o.findOptions.fields?.[0]===a.ICell.Content.Values?a.ICell.Content.Formulas:o.findOptions.fields?.[0],options:m?Y:Q,onSelect:e=>{u(n=>{const i={...n};return i.findOptions.fields=[e],i})}})]})]})})]})})});exports.FindReplaceWindow=J,exports.ScopeOptions=K,exports.default=J;
@@ -1,7 +0,0 @@
1
- "use strict";/**
2
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.5
3
- *
4
- * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
- * License: The license can be found at https://www.sheetxl.com/license.
6
- */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),l=require("react"),c=require("@mui/material/styles"),g=require("@mui/material"),m=require("@sheetxl/utils-react"),I=require("@sheetxl/utils-mui"),M=["Ok","Cancel"],b=l.memo(y=>{const{initialComments:k=null,onUpdateComments:f,context:v,onOption:x,onValidateOption:p,onDone:u,options:h=M,defaultOption:d=h?.[0],cancelOption:s="Cancel",sx:F,...T}=y,C=l.useMemo(()=>{const e=k??v?.()?.getComments();let t="";if(e&&e.content&&e.content.runs){const o=e.content.runs;for(let i=0;i<o.length;i++){const a=o[i];t+=a?.text}}return t},[]),[n,q]=l.useState(C),[j,P]=l.useState(!1),O=l.useCallback(async(e,t)=>null,[]),w=m.useCallbackRef(async e=>{const t=n===""?[]:n.split(`
7
- `);if(e!==s){const o=[];for(let a=0;a<t.length;a++)o.push({text:t[a]});f?.({content:{runs:o}})}x?.(e,e===s,e===d),u?.()},[n,f,u,x,d,s]),D=m.useCallbackRef(e=>{q(e.target.value),O(e.target.value,null)},[p]),S=m.useCallbackRef(async e=>{let t=await Promise.resolve(p?.(e));try{t!==!1&&(t=await O(n,e))}catch{}return t??!0},[p,n]);return r.jsx(I.OptionsDialog,{title:(C?"Edit":"Insert")+" Comments",options:h,onDone:u,onOption:e=>w(e),onValidateOption:S,defaultOption:d,cancelOption:s,autoFocusSel:".autoFocus",sx:{width:"480px",...F},...T,children:r.jsx(g.Box,{sx:{paddingTop:e=>e.spacing(1),paddingBottom:e=>e.spacing(0),rowGap:e=>e.spacing(1),display:"flex",flexDirection:"column"},children:r.jsx(g.FormControl,{sx:{paddingTop:e=>e.spacing(1.5),minWidth:135,width:"100%"},size:"small",children:r.jsx(g.TextField,{label:"Comments",placeholder:"Enter a comment.",onFocus:e=>{j||e.target?.select(),P(!0)},sx:{"& .MuiFormHelperText-root":{marginTop:e=>e.spacing(.5)}},InputLabelProps:{shrink:!0},InputProps:{inputProps:{className:"autoFocus",spellCheck:!1,autoComplete:"off",sx:{paddingTop:e=>e.spacing(1.25),paddingBottom:e=>e.spacing(.75),backgroundImage:`linear-gradient(${c.alpha("#fff",c.getOverlayAlpha(5))}, ${c.alpha("#fff",c.getOverlayAlpha(5))})`}}},value:n,onChange:D,onContextMenu:e=>{e.stopPropagation()}})})})})});exports.CommentsDialog=b,exports.default=b;
@@ -1,6 +0,0 @@
1
- "use strict";/**
2
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.5
3
- *
4
- * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
- * License: The license can be found at https://www.sheetxl.com/license.
6
- */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),s=require("react"),a=require("@mui/material"),l=require("@sheetxl/utils-react"),i=require("@sheetxl/utils-mui"),H=require("@sheetxl/react"),c=require("./QQ4l7f6lYZb7S6td.cjs"),b=s.memo(f=>{const{title:w,onHide:S,autoFocusSel:j=".range-input input",context:C,command:g,commands:u,...T}=f,[B,m]=s.useState(!1),[x,p]=s.useState(!1),h=s.useRef(null),[q,v]=s.useReducer(e=>e+1,0),[R,{width:L}]=c.useMeasure();l.useCommand(g);const o=C??g.context(),t=o.table(),[I,N]=s.useState(()=>t?o.getNames().getRanges(t.getRange()):null),D=s.useMemo(()=>t?.getName()??"",[t]);H.useModelListener(o.table(),{onAnchorCoordsChange(e){N(o.getNames().getRanges(e.getRange()))},onProtectedChange(e){v()}});const F=l.useCallbackRef(e=>{o?.table().setName(e)},[o]),P=l.useCallbackRef(e=>{o?.table().resize(e.at(0))},[o]);let y=null;o.table()||(y=n.jsx("div",{style:{position:"absolute",top:"0",left:"0",width:"100%",height:"100%",opacity:1,display:"flex",alignItems:"center",justifyItems:"center",justifyContent:"center",boxSizing:"border-box"},children:n.jsx("div",{children:"No table selected"})}));const d=l.useNotifier();return n.jsx(i.InternalWindow,{ref:h,title:w??"Table Details",initialPosition:{y:"35"},autoFocusSel:j,onHide:S,onFocus:()=>m(!0),onBlur:e=>{h?.current?.contains(e.relatedTarget)||m(!1)},PaperProps:{elevation:B?3:1},...T,children:n.jsxs(a.DialogContent,{dividers:!0,ref:R,sx:{display:"flex",flexDirection:"column",position:"relative",paddingLeft:e=>e.spacing(1.5),paddingRight:e=>e.spacing(1.5)},children:[n.jsxs(a.Box,{sx:{display:"flex",flexDirection:"column",transition:"opacity 60ms",opacity:o.table()?1:0},children:[n.jsx(a.Box,{sx:{display:"flex",flexDirection:"row",gap:e=>e.spacing(1)},children:n.jsx(a.Box,{sx:{display:"flex",flexDirection:"column",maxWidth:"100%",boxSizing:"border-box",paddingLeft:e=>e.spacing(2),paddingRight:e=>e.spacing(2)},children:n.jsxs(a.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center"},children:[n.jsx(c.NamedInput,{formName:"name",defaultInput:D,value:t?.getName()??"No table",onChangeInput:F,onValidate:e=>{t&&t.getName().toLowerCase()===e.toLowerCase()||o?.getNames().validateName(e)},disabled:t?.isProtected()??!0,onFocus:e=>{x||e.target?.select(),p(!0)}}),n.jsx(c.RangeInput,{formName:"range",value:I,onChangeInput:P,resolvedAddress:o.getNames().getRanges.bind(o.getNames()),disabled:t?.isProtected()??!0,onFocus:e=>{x||e.target?.select(),p(!0)}})]})})}),n.jsxs(a.Box,{sx:{minHeight:"10px",flex:"1 1 100%",display:"flex",flexDirection:"column",gap:e=>e.spacing(.5),marginTop:e=>e.spacing(1)},children:[n.jsx(i.ExhibitDivider,{orientation:"horizontal",sx:{marginTop:e=>e.spacing(1.5),marginBottom:e=>e.spacing(.75)}}),n.jsx(c.TableStyleOptionsPanel,{disabled:t?.isProtected(),styleOptions:t?.getStyleOptions()??null,onStyleOptionsChange:e=>{t.updateStyleOptions(e)},showHeaderRow:t?.getShowHeaders(),onShowHeaderRowChange:e=>{try{t.setShowHeaders(e)}catch(r){d.showError(r)}},showTotalRow:t?.getShowTotals(),onShowTotalRowChange:e=>{try{t.setShowTotals(e)}catch(r){d.showError(r)}},showFilterButton:t?.getFilter()?t.getShowFilterButton():null,onShowFilterButtonChange:e=>{try{t.setShowFilterButton(e)}catch(r){d.showError(r)}}}),n.jsx(a.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column",marginTop:e=>e.spacing(2),marginBottom:e=>e.spacing(1)},children:n.jsx(c.TableStylePreview,{table:t,styles:o.styles(),bodyStyle:o.bodyStyle(),cellHeight:30,isLive:!0})}),n.jsx(i.ExhibitDivider,{orientation:"horizontal"}),n.jsxs(a.Box,{sx:{display:"flex",flexDirection:"column",justifyContent:"center"},children:[n.jsx(i.CommandButton,{variant:l.CommandButtonType.Menuitem,command:u.getCommand("convertTableToRange"),commandState:t,icon:i.themeIcon(n.jsx(i.InsertTableIcon,{}))}),n.jsx(i.CommandButton,{variant:l.CommandButtonType.Menuitem,commandState:t,command:u.getCommand("deleteTable"),icon:i.themeIcon(n.jsx(i.InsertTableIcon,{}))})]})]})]}),y]})})});exports.TableDetailsWindow=b,exports.default=b;