@sheetxl/studio-mui 0.8.0-beta.1 → 0.8.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/cjs/3k_KqDFr-AybPztc.cjs +5 -0
- package/browser/cjs/{zQsyZpeXAvcVXJMs.cjs → 3uprnzi2l0iT17Dg.cjs} +1 -1
- package/browser/cjs/B9GcCj7sj8XdjPZF.cjs +1 -0
- package/browser/cjs/{CJLwX_A3y3TQUmzj.cjs → BGvoJjUs21bbuE1i.cjs} +1 -1
- package/browser/cjs/{CYxc8vnRi8dNpDPk.cjs → BHb7TnK1NmimV4OX.cjs} +1 -1
- package/browser/cjs/BJ-wdkCaXqJaejKf.cjs +1 -0
- package/browser/cjs/BQMCM3iFn4MNWAkB.cjs +1 -0
- package/browser/cjs/BXkdjAb4jpTr412c.cjs +1 -0
- package/browser/cjs/Bc-YisjBtD56vBAW.cjs +1 -0
- package/browser/cjs/Bi26L7L89ZK_y5Pk.cjs +1 -0
- package/browser/cjs/CucKgy044KxMHXrx.cjs +13 -0
- package/browser/cjs/Cy_XmYq6BsWmCXkk.cjs +3 -0
- package/browser/cjs/Dq9lIOzvxW3EKYkD.cjs +8 -0
- package/browser/cjs/M0_dvdYwhikqP9kg.cjs +2 -0
- package/browser/cjs/QI6GKw7uo1f8gY8C.cjs +1 -0
- package/browser/cjs/eCw4rAEIYE3BftpG.cjs +1 -0
- package/browser/cjs/iFPhqab5w95hHEsT.cjs +1 -0
- package/browser/cjs/index.cjs +2 -2
- package/browser/esm/{zWTZ8BvT4hjgC2ua.mjs → 5g7MBAjbFzuopMX2.mjs} +2 -2
- package/browser/esm/B1W2xsRdzsYUrUHN.mjs +12903 -0
- package/browser/esm/{UJOXCQv6KrG1gY3l.mjs → B4D1LSp8TE_B0AMm.mjs} +8 -16
- package/browser/esm/{Bz5LiUe3SZ8g42Ia.mjs → B52mSQ33rrDgVfpp.mjs} +1 -1
- package/browser/esm/{DNDrQKMTzKzNMjl-.mjs → BPrlXHjf0rCkbBBI.mjs} +1 -1
- package/browser/esm/BZd916TsMZ7YvxWP.mjs +293 -0
- package/browser/esm/{Cd6n1XUgF0VItpkH.mjs → BaEXUwMO4qxI8cAG.mjs} +1 -1
- package/browser/esm/{CDU0rqpLNVtMLI-f.mjs → BbIR6fcRDFkeZXY0.mjs} +1 -1
- package/browser/esm/{CVBub6pgTsJzCc5m.mjs → BmThVkDnqURs7csb.mjs} +2100 -2214
- package/browser/esm/{CVfuCNRpODUw04IH.mjs → Bz1JPslneg_PywLn.mjs} +1 -1
- package/browser/esm/{rU8xNPVQtDSnujM-.mjs → CBtvZnCU5MNRuW6b.mjs} +3 -3
- package/browser/esm/CWSv0l0QyooaSl9L.mjs +268 -0
- package/browser/esm/{BUGepznywvV0tUjW.mjs → Cq9FaaUpYJPogPlO.mjs} +2 -2
- package/browser/esm/{3ydDykDMtDYbfVVn.mjs → D0TdGLsNoKJ8y8nS.mjs} +113 -111
- package/browser/esm/{CBU3LgLYmqtQjJbu.mjs → D5VhIdFEqZBP23Ch.mjs} +1 -1
- package/browser/esm/{BoLxSRdEWt-Yg2RI.mjs → DAmyMhko6L63rwJo.mjs} +130 -103
- package/browser/esm/{Cj2pgCNqBCGl4rTX.mjs → DKyW2a-ZhqkFjZvH.mjs} +569 -540
- package/browser/esm/DSAOtFgAoMMKXSJb.mjs +152 -0
- package/browser/esm/De_bbgjFGMBk8KXa.mjs +117 -0
- package/browser/esm/Dkw9Yr0Bp5RI5pRw.mjs +222 -0
- package/browser/esm/MplcRTnOYfsuQGe3.mjs +410 -0
- package/browser/esm/{DMLXV4EKl1NCp_jk.mjs → U9pABiBV0P__iZJE.mjs} +3 -3
- package/browser/esm/{ChwS_ougBsogOEsP.mjs → _7FBRywOYc4gCFK2.mjs} +2 -2
- package/browser/esm/cLX3kRi9vDkGiZwr.mjs +115 -0
- package/browser/esm/index.mjs +466 -135
- package/browser/esm/{BZBJG2tDdD3-VujP.mjs → krJU2tCMk9QwcRcw.mjs} +195 -174
- package/licenses/dependencies.txt +73 -73
- package/node/esm/BSj2vMFtYCJk4miD.mjs +4462 -0
- package/node/esm/{BwZcoHDBmLPIVOT5.mjs → Byoa9Sx18Y73xJBM.mjs} +1 -1
- package/node/esm/{C-boHCnJditFzng3.mjs → C0yEFO9L8odxQW-z.mjs} +32 -40
- package/node/esm/{CHi3AuWEwEPOg9IZ.mjs → C6ookLy8qjozoGUP.mjs} +1 -1
- package/node/esm/{DXZrzWee8K5FPOW1.mjs → CF-mBw8E2TnnbVJp.mjs} +2 -2
- package/node/esm/CQtseVjtpzUKq41p.mjs +294 -0
- package/node/esm/{BhqI3pQFkV8K_612.mjs → C_xnlCmxuBdmK2nV.mjs} +1 -1
- package/node/esm/CvZ05tWUwCH6MJas.mjs +268 -0
- package/node/esm/{yCHAZKxJR7qY_ySy.mjs → D1uCpJvXqZ16A3-X.mjs} +143 -141
- package/node/esm/{DM7K7-284z-PczVz.mjs → DbzH9CwsCrtCs4Ug.mjs} +1 -1
- package/node/esm/{Qpuqm6xBr_da38Ht.mjs → DdBJbvx8UwH8CmkE.mjs} +163 -135
- package/node/esm/DlNtuQ_K-rgj0iJU.mjs +116 -0
- package/node/esm/Dsc5FSbIPxmlRzwV.mjs +414 -0
- package/node/esm/index.mjs +7716 -4114
- package/node/esm/k8Q5jiL-22BAHe4i.mjs +115 -0
- package/node/esm/{CUMKTjYv6VTkcWYi.mjs → oLdQArapyVclkMMy.mjs} +1 -1
- package/node/esm/{BA7VzUQ2sKRLTZ5c.mjs → pZBq3MVKHmZiBS8U.mjs} +1 -1
- package/package.json +9 -9
- package/resources/locales/de/groups.cmd.json +24 -6
- package/resources/locales/de/studio.cmd.json +18 -1
- package/resources/locales/de/ui.msg.json +251 -30
- package/resources/locales/en/groups.cmd.json +24 -6
- package/resources/locales/en/studio.cmd.json +18 -1
- package/resources/locales/en/ui.msg.json +202 -30
- package/types/src/anchorItems/AnchorItemsDescriptor.d.ts +11 -1
- package/types/src/anchorItems/AnchorItemsPanel.d.ts +14 -0
- package/types/src/anchorItems/AnchoredRangeField.d.ts +40 -0
- package/types/src/anchorItems/index.d.ts +1 -0
- package/types/src/border/BorderPopupButton.d.ts +6 -6
- package/types/src/border/BorderStylePopupButton.d.ts +3 -3
- package/types/src/border/BorderTemplateIcon.d.ts +24 -0
- package/types/src/border/index.d.ts +1 -0
- package/types/src/color/ColorPanel.d.ts +8 -2
- package/types/src/color/ColorPopupButton.d.ts +2 -1
- package/types/src/command/NumberFormatQuickButtons.d.ts +32 -0
- package/types/src/conditions/BetweenOption.d.ts +1 -1
- package/types/src/conditions/ConditionEditor.d.ts +6 -1
- package/types/src/conditions/ConditionUtils.d.ts +31 -0
- package/types/src/conditions/DateTimeOption.d.ts +4 -4
- package/types/src/conditions/ExpressionOption.d.ts +6 -6
- package/types/src/conditions/ListSourceOption.d.ts +31 -0
- package/types/src/conditions/ScalarOption.d.ts +6 -6
- package/types/src/conditions/index.d.ts +1 -1
- package/types/src/conditions/useFormulaOption.d.ts +54 -0
- package/types/src/dataValidation/DataValidationDetailsPanel.d.ts +7 -1
- package/types/src/dataValidation/DataValidationDetailsTaskPane.d.ts +3 -2
- package/types/src/dataValidation/DataValidationEditorPanel.d.ts +9 -2
- package/types/src/dataValidation/DataValidationIcon.d.ts +22 -0
- package/types/src/dataValidation/DataValidationTitle.d.ts +13 -0
- package/types/src/dialog/FillSeriesDialog.d.ts +16 -0
- package/types/src/dialog/TableNewDialog.d.ts +1 -4
- package/types/src/dialog/index.d.ts +0 -1
- package/types/src/externalLink/ExternalLinkCardBody.d.ts +9 -0
- package/types/src/externalLink/ExternalLinkChip.d.ts +18 -0
- package/types/src/externalLink/ExternalLinkLocation.d.ts +18 -0
- package/types/src/externalLink/ExternalLinkSettingsTab.d.ts +18 -0
- package/types/src/externalLink/ExternalLinksPanel.d.ts +11 -0
- package/types/src/externalLink/ExternalLinksPlugin.d.ts +5 -0
- package/types/src/externalLink/ExternalLinksTaskPane.d.ts +19 -0
- package/types/src/externalLink/index.d.ts +8 -0
- package/types/src/fill/GradientEditor.d.ts +39 -0
- package/types/src/fill/PatternPopupButton.d.ts +26 -0
- package/types/src/fill/PatternSwatch.d.ts +53 -0
- package/types/src/fill/index.d.ts +4 -0
- package/types/src/filter/FilterList.d.ts +9 -6
- package/types/src/form/FormulaField.d.ts +25 -2
- package/types/src/form/InputField.d.ts +30 -0
- package/types/src/format/AlignmentPanel.d.ts +14 -0
- package/types/src/format/BorderPanel.d.ts +22 -0
- package/types/src/format/BorderPreview.d.ts +84 -0
- package/types/src/format/FillPanel.d.ts +25 -0
- package/types/src/format/FontPanel.d.ts +12 -0
- package/types/src/format/FormatCellPreview.d.ts +35 -0
- package/types/src/format/FormatPanelParts.d.ts +83 -0
- package/types/src/format/FormatPlugin.d.ts +11 -0
- package/types/src/format/FormatTaskPane.d.ts +39 -0
- package/types/src/format/NumberFormatOption.d.ts +43 -0
- package/types/src/{numberFormat → format}/NumberFormatPanel.d.ts +20 -0
- package/types/src/format/index.d.ts +13 -0
- package/types/src/format/useFormatSelection.d.ts +92 -0
- package/types/src/index.d.ts +3 -1
- package/types/src/itemsPanel/EditorPanel.d.ts +5 -1
- package/types/src/itemsPanel/ItemCard.d.ts +10 -1
- package/types/src/itemsPanel/ItemsDescriptor.d.ts +55 -19
- package/types/src/itemsPanel/ItemsPanel.d.ts +9 -0
- package/types/src/named/NamedDetailsPanel.d.ts +9 -2
- package/types/src/named/NamedDetailsTaskPane.d.ts +3 -2
- package/types/src/named/NamedEditorPanel.d.ts +1 -1
- package/types/src/named/NamedExpressionField.d.ts +32 -0
- package/types/src/named/NamedKindChip.d.ts +38 -0
- package/types/src/protectedRange/ProtectedRangeDetailsPanel.d.ts +6 -0
- package/types/src/protectedRange/ProtectedRangeDraft.d.ts +22 -0
- package/types/src/protectedRange/ProtectedRangeEditorPanel.d.ts +0 -14
- package/types/src/protectedRange/index.d.ts +2 -1
- package/types/src/protection/ManageProtectionTaskPane.d.ts +29 -0
- package/types/src/protection/PasswordDialog.d.ts +32 -0
- package/types/src/protection/PasswordField.d.ts +35 -0
- package/types/src/protection/ProtectedCellsPanel.d.ts +20 -0
- package/types/src/protection/ProtectionPlugin.d.ts +11 -0
- package/types/src/protection/SheetProtectionPanel.d.ts +35 -0
- package/types/src/protection/WorkbookProtectionPanel.d.ts +34 -15
- package/types/src/protection/WorkbookProtectionTab.d.ts +22 -0
- package/types/src/protection/index.d.ts +7 -1
- package/types/src/studio/CommandsWrapper.d.ts +3 -0
- package/types/src/studio/EagerStudio.d.ts +14 -1
- package/types/src/studio/StudioCommandProvider.d.ts +3 -0
- package/types/src/studio/StudioCommands.d.ts +38 -2
- package/types/src/studio/StudioProps.d.ts +41 -0
- package/types/src/studio/splitStudioProps.d.ts +7 -0
- package/types/src/studio/useStudioApp.d.ts +20 -1
- package/types/src/template/TemplateCommands.d.ts +29 -0
- package/types/src/template/TemplateDialog.d.ts +19 -0
- package/types/src/template/TemplatePanel.d.ts +50 -0
- package/types/src/template/TemplateSearchField.d.ts +13 -0
- package/types/src/template/WelcomeDialog.d.ts +29 -0
- package/types/src/template/index.d.ts +3 -0
- package/types/src/template/useTemplateCatalog.d.ts +69 -0
- package/types/src/workbook/DefaultRenderers.d.ts +2 -0
- package/types/src/workbook/FillMenu.d.ts +21 -0
- package/types/src/workbook/index.d.ts +1 -0
- package/browser/cjs/B_D3JKseVvpRyX-E.cjs +0 -1
- package/browser/cjs/BeKpqOx8It0RD0Rf.cjs +0 -2
- package/browser/cjs/Bj-EvSYeDfqmU0V6.cjs +0 -2
- package/browser/cjs/Bte6P3MhSjajJmmY.cjs +0 -7
- package/browser/cjs/CZm1jVZaHQ246prW.cjs +0 -1
- package/browser/cjs/Cm1APq2MraYNNhyI.cjs +0 -1
- package/browser/cjs/DO8V31Z1ewgMA1di.cjs +0 -5
- package/browser/cjs/Djsiad0Qha1Y-YaS.cjs +0 -1
- package/browser/cjs/IASAYG6qgv7lJY7y.cjs +0 -1
- package/browser/cjs/UnMhi28mbvLiOXQe.cjs +0 -1
- package/browser/cjs/Vbigo0kFP3PFfmeA.cjs +0 -1
- package/browser/cjs/w2GjebPlOFv3pCbm.cjs +0 -1
- package/browser/cjs/z0rB4fK6X1M6PpVD.cjs +0 -11
- package/browser/esm/BuY3uV47Bwbqpasq.mjs +0 -219
- package/browser/esm/CAs1MWvJTcRfJy26.mjs +0 -217
- package/browser/esm/C_XvSsQ9BVdHffCO.mjs +0 -47
- package/browser/esm/FT29q8yNwsEpVZjt.mjs +0 -9257
- package/browser/esm/Hb1rlHT4tE5hLcjM.mjs +0 -82
- package/browser/esm/s46El7mT6oKLSnYB.mjs +0 -411
- package/node/esm/9FY82fj1R1c-AczW.mjs +0 -47
- package/node/esm/DxXM8qHi0Oz4Zovl.mjs +0 -4575
- package/node/esm/sQt2wWGTRLzqeJdG.mjs +0 -82
- package/types/src/conditionalFormat/ConditionalFormatRangeField.d.ts +0 -32
- package/types/src/conditions/InSetOption.d.ts +0 -37
- package/types/src/dialog/NumberFormatDialog.d.ts +0 -12
- package/types/src/numberFormat/NumberFormatTaskPane.d.ts +0 -12
- package/types/src/numberFormat/index.d.ts +0 -8
- package/types/src/protectedRange/ProtectedRangeDetailsTaskPane.d.ts +0 -3
- package/types/src/protectedRange/ProtectedRangePlugin.d.ts +0 -2
- package/types/src/protection/WorkbookProtectionDialog.d.ts +0 -23
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.3
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
6
|
*/
|
|
7
|
-
import { DynamicIcon as e, KeyCodes as t, KeyModifiers as n, ReactUtils as o, keyEventCanonicals as r, keyStrokeToCanonical as l } from "@sheetxl/utils-react";
|
|
8
|
-
import
|
|
7
|
+
import { DynamicIcon as e, KeyCodes as t, KeyModifiers as n, ReactUtils as o, keyEventCanonicals as r, keyStrokeToCanonical as l, useTranslator as i } from "@sheetxl/utils-react";
|
|
8
|
+
import a, { useCallback as s, useEffect as c, useMemo as p, useRef as d, useState as u } from "react";
|
|
9
9
|
import { InternalWindow as h } from "@sheetxl/utils-mui";
|
|
10
|
-
import { jsx as
|
|
11
|
-
import { Box as
|
|
12
|
-
import { CommonUtils as
|
|
13
|
-
var
|
|
10
|
+
import { jsx as m, jsxs as g } from "react/jsx-runtime";
|
|
11
|
+
import { Box as f, Checkbox as x, Chip as y, DialogContent as b, FormControlLabel as v, IconButton as S, InputAdornment as k, TextField as C, Tooltip as K, Typography as w, emphasize as $ } from "@mui/material";
|
|
12
|
+
import { CommonUtils as A, TimerUtils as L } from "@sheetxl/utils";
|
|
13
|
+
var z = (e) => e.replace(/\n\n+/g, "\n").trim(), P = /* @__PURE__ */ new Set([
|
|
14
14
|
"Control",
|
|
15
15
|
"Shift",
|
|
16
16
|
"Alt",
|
|
17
17
|
"Meta"
|
|
18
|
-
]),
|
|
18
|
+
]), D = (e) => {
|
|
19
19
|
let t = e;
|
|
20
20
|
const n = /* @__PURE__ */ new Set();
|
|
21
21
|
for (const e of [
|
|
@@ -27,26 +27,26 @@ var L = (e) => e.replace(/\n\n+/g, "\n").trim(), z = /* @__PURE__ */ new Set([
|
|
|
27
27
|
key: t,
|
|
28
28
|
mods: n
|
|
29
29
|
};
|
|
30
|
-
},
|
|
30
|
+
}, I = A.getPlatform() === A.OSType.MacOS || A.getPlatform() === A.OSType.IOS, M = [
|
|
31
31
|
n.Ctrl,
|
|
32
32
|
n.Alt,
|
|
33
33
|
n.Shift,
|
|
34
34
|
n.Meta
|
|
35
|
-
],
|
|
35
|
+
], B = (e) => {
|
|
36
36
|
switch (e) {
|
|
37
|
-
case n.Ctrl: return
|
|
37
|
+
case n.Ctrl: return I ? "Cmd" : "Ctrl";
|
|
38
38
|
case n.Alt: return "Alt";
|
|
39
39
|
case n.Shift: return "Shift";
|
|
40
40
|
case n.Meta: return "Meta";
|
|
41
41
|
default: return e;
|
|
42
42
|
}
|
|
43
|
-
},
|
|
43
|
+
}, F = (e) => {
|
|
44
44
|
const t = new Set(e);
|
|
45
|
-
return
|
|
46
|
-
},
|
|
45
|
+
return M.filter((e) => t.has(e));
|
|
46
|
+
}, R = (e) => {
|
|
47
47
|
const t = [];
|
|
48
48
|
return e.ctrlKey && t.push(n.Ctrl), e.altKey && t.push(n.Alt), e.shiftKey && t.push(n.Shift), e.metaKey && t.push(n.Meta), t;
|
|
49
|
-
},
|
|
49
|
+
}, T = ({ children: e }) => m(f, {
|
|
50
50
|
component: "kbd",
|
|
51
51
|
sx: {
|
|
52
52
|
display: "inline-flex",
|
|
@@ -63,34 +63,34 @@ var L = (e) => e.replace(/\n\n+/g, "\n").trim(), z = /* @__PURE__ */ new Set([
|
|
|
63
63
|
whiteSpace: "nowrap",
|
|
64
64
|
borderRadius: "5px",
|
|
65
65
|
color: (e) => e.palette.text.secondary,
|
|
66
|
-
backgroundColor: (e) =>
|
|
66
|
+
backgroundColor: (e) => $(e.palette.background.paper, .07),
|
|
67
67
|
border: (e) => `solid 1px ${e.palette.divider}`,
|
|
68
68
|
borderBottomWidth: "2px"
|
|
69
69
|
},
|
|
70
70
|
children: e
|
|
71
|
-
}),
|
|
71
|
+
}), W = () => m(f, {
|
|
72
72
|
component: "span",
|
|
73
73
|
sx: {
|
|
74
74
|
fontSize: "0.7rem",
|
|
75
75
|
color: (e) => e.palette.text.disabled
|
|
76
76
|
},
|
|
77
77
|
children: "+"
|
|
78
|
-
}),
|
|
78
|
+
}), E = ({ labels: e, dangling: t = !1 }) => g(f, {
|
|
79
79
|
sx: {
|
|
80
80
|
display: "flex",
|
|
81
81
|
alignItems: "center",
|
|
82
82
|
gap: "1px"
|
|
83
83
|
},
|
|
84
|
-
children: [e.map((e, t) =>
|
|
85
|
-
}),
|
|
84
|
+
children: [e.map((e, t) => g(a.Fragment, { children: [t > 0 && m(W, {}), m(T, { children: e })] }, t)), t && m(W, {})]
|
|
85
|
+
}), O = ({ stroke: e }) => {
|
|
86
86
|
if (!e?.key) return null;
|
|
87
|
-
const t =
|
|
88
|
-
return t.push(o.toPrettyKeyCode(e.key)),
|
|
87
|
+
const t = F(e.modifiers ?? []).map(B);
|
|
88
|
+
return t.push(o.toPrettyKeyCode(e.key)), m(E, { labels: t });
|
|
89
89
|
};
|
|
90
|
-
function
|
|
91
|
-
const { commands: o, sx:
|
|
90
|
+
function j(n) {
|
|
91
|
+
const { commands: o, sx: a, ...h } = n, b = i(), [A, M] = u(!1), [T, W] = u(""), [j, X] = u(null), [H, N] = u(!1), [U, Y] = u(null), [q, G] = u(null), [J, Q] = u(null), V = d(null), Z = p(() => {
|
|
92
92
|
let e = o.getAllCommands();
|
|
93
|
-
|
|
93
|
+
A && (e = e.filter((e) => e.command.getShortcut())), e = [...e].sort((e, t) => {
|
|
94
94
|
const n = e.command.getScope?.() ?? e.groupKey, o = t.command.getScope?.() ?? t.groupKey, r = n.localeCompare(o);
|
|
95
95
|
return 0 !== r ? r : e.command.getLabel().localeCompare(t.command.getLabel());
|
|
96
96
|
});
|
|
@@ -101,7 +101,7 @@ function O(n) {
|
|
|
101
101
|
icon: e.getIcon(),
|
|
102
102
|
scope: r,
|
|
103
103
|
scopeLabel: e.getScopeLabel?.() ?? r,
|
|
104
|
-
description:
|
|
104
|
+
description: z(e.getDescription())
|
|
105
105
|
}, a = e.getShortcut(), s = Array.isArray(a) ? a.length ? a : [null] : [a ?? null];
|
|
106
106
|
for (const e of s) {
|
|
107
107
|
const o = e ? l(e) : null, a = `${r}\0${i.label}\0${o ?? ""}`;
|
|
@@ -114,11 +114,11 @@ function O(n) {
|
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
116
|
return t;
|
|
117
|
-
}, [
|
|
118
|
-
|
|
117
|
+
}, [A, o]), _ = p(() => j ? Z.filter((e) => e.scope === j) : Z, [Z, j]), [ee, te] = u(null);
|
|
118
|
+
c(() => {
|
|
119
119
|
let e = !1;
|
|
120
120
|
return import("fuse.js").then((t) => {
|
|
121
|
-
e ||
|
|
121
|
+
e || te(new t.default(_, {
|
|
122
122
|
threshold: .3,
|
|
123
123
|
ignoreLocation: !0,
|
|
124
124
|
keys: [
|
|
@@ -128,33 +128,35 @@ function O(n) {
|
|
|
128
128
|
"scopeLabel"
|
|
129
129
|
]
|
|
130
130
|
}));
|
|
131
|
+
}).catch((e) => {
|
|
132
|
+
console.warn("Shortcut search is unavailable:", e);
|
|
131
133
|
}), () => {
|
|
132
134
|
e = !0;
|
|
133
135
|
};
|
|
134
|
-
}, [
|
|
135
|
-
const [
|
|
136
|
-
|
|
137
|
-
if (
|
|
136
|
+
}, [_]);
|
|
137
|
+
const [ne, oe] = u(Z);
|
|
138
|
+
c(() => {
|
|
139
|
+
if (H) return q ? void oe(_.filter((e) => {
|
|
138
140
|
if (!e.canonical) return !1;
|
|
139
|
-
const t =
|
|
140
|
-
if (!
|
|
141
|
-
for (const e of
|
|
141
|
+
const t = D(e.canonical);
|
|
142
|
+
if (!q.keys.has(t.key)) return !1;
|
|
143
|
+
for (const e of q.mods) if (!t.mods.has(e)) return !1;
|
|
142
144
|
return !0;
|
|
143
|
-
})) : void
|
|
144
|
-
|
|
145
|
-
const e =
|
|
146
|
-
0 !== e.length ?
|
|
147
|
-
}, 90)() :
|
|
145
|
+
})) : void oe(_);
|
|
146
|
+
ee ? L.debounce(() => {
|
|
147
|
+
const e = T.trim();
|
|
148
|
+
0 !== e.length ? oe(ee.search(e).map((e) => e.item)) : oe(_);
|
|
149
|
+
}, 90)() : oe(_);
|
|
148
150
|
}, [
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
151
|
+
H,
|
|
152
|
+
q,
|
|
153
|
+
ee,
|
|
154
|
+
T,
|
|
155
|
+
_
|
|
154
156
|
]);
|
|
155
|
-
const
|
|
157
|
+
const re = p(() => {
|
|
156
158
|
const e = /* @__PURE__ */ new Map();
|
|
157
|
-
for (const t of
|
|
159
|
+
for (const t of ne) {
|
|
158
160
|
let n = e.get(t.scope);
|
|
159
161
|
n || (n = [], e.set(t.scope, n)), n.push(t);
|
|
160
162
|
}
|
|
@@ -163,19 +165,19 @@ function O(n) {
|
|
|
163
165
|
scopeLabel: t[0].scopeLabel,
|
|
164
166
|
rows: t
|
|
165
167
|
}));
|
|
166
|
-
}, [
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
}, [
|
|
170
|
-
const
|
|
171
|
-
N(e),
|
|
172
|
-
}, []),
|
|
168
|
+
}, [ne]), le = p(() => Z.find((e) => e.scope === j)?.scopeLabel ?? j, [Z, j]), ie = H ? !!U : T.length > 0, ae = ie && 0 === ne.length;
|
|
169
|
+
c(() => {
|
|
170
|
+
V.current?.focus();
|
|
171
|
+
}, [H]);
|
|
172
|
+
const se = s((e) => {
|
|
173
|
+
N(e), W(""), Y(null), G(null), Q(null);
|
|
174
|
+
}, []), ce = s((e) => {
|
|
173
175
|
if ("Tab" === e.key) return;
|
|
174
|
-
if (e.which === t.Escape) return
|
|
175
|
-
if (e.preventDefault(), e.stopPropagation(), "Backspace" === e.key) return
|
|
176
|
+
if (e.which === t.Escape) return U || J ? (Y(null), G(null), Q(null)) : se(!1), e.stopPropagation(), void e.preventDefault();
|
|
177
|
+
if (e.preventDefault(), e.stopPropagation(), "Backspace" === e.key) return Y(null), G(null), void Q(null);
|
|
176
178
|
const n = e.nativeEvent;
|
|
177
|
-
if (
|
|
178
|
-
|
|
179
|
+
if (P.has(e.key)) return Y(null), G(null), void Q(R(n));
|
|
180
|
+
Q(null), Y(((e) => {
|
|
179
181
|
const t = [];
|
|
180
182
|
e.ctrlKey && t.push("ctrl"), e.altKey && t.push("alt"), e.shiftKey && t.push("shift"), e.metaKey && t.push("meta");
|
|
181
183
|
const n = e.code;
|
|
@@ -184,50 +186,50 @@ function O(n) {
|
|
|
184
186
|
key: o,
|
|
185
187
|
modifiers: t
|
|
186
188
|
};
|
|
187
|
-
})(n)),
|
|
188
|
-
const t = [...r(e)].map(
|
|
189
|
+
})(n)), G(((e) => {
|
|
190
|
+
const t = [...r(e)].map(D);
|
|
189
191
|
return {
|
|
190
192
|
keys: new Set(t.map((e) => e.key)),
|
|
191
193
|
mods: t[0]?.mods ?? /* @__PURE__ */ new Set()
|
|
192
194
|
};
|
|
193
195
|
})(n));
|
|
194
196
|
}, [
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
]),
|
|
199
|
-
if (
|
|
200
|
-
const t =
|
|
201
|
-
|
|
202
|
-
}, [
|
|
203
|
-
|
|
204
|
-
}, []),
|
|
205
|
-
|
|
206
|
-
}, [
|
|
207
|
-
title:
|
|
208
|
-
children:
|
|
197
|
+
U,
|
|
198
|
+
J,
|
|
199
|
+
se
|
|
200
|
+
]), pe = s((e) => {
|
|
201
|
+
if (U) return;
|
|
202
|
+
const t = R(e.nativeEvent);
|
|
203
|
+
Q(t.length ? t : null);
|
|
204
|
+
}, [U]), de = s((e) => {
|
|
205
|
+
X((t) => t === e ? null : e);
|
|
206
|
+
}, []), ue = s(() => {
|
|
207
|
+
H ? (Y(null), G(null), Q(null)) : W(""), V.current?.focus();
|
|
208
|
+
}, [H]), he = H ? !!(U || J && J.length > 0) : T.length > 0, me = m(K, {
|
|
209
|
+
title: H ? "Search by name (ESC)" : `Search by shortcut (${I ? "Cmd" : "Ctrl"}+K)`,
|
|
210
|
+
children: m(S, {
|
|
209
211
|
"aria-label": "toggle shortcut capture",
|
|
210
|
-
color:
|
|
211
|
-
onClick: () =>
|
|
212
|
+
color: H ? "primary" : "default",
|
|
213
|
+
onClick: () => se(!H),
|
|
212
214
|
sx: {
|
|
213
215
|
flexShrink: 0,
|
|
214
|
-
border: (e) => `solid 1px ${
|
|
216
|
+
border: (e) => `solid 1px ${H ? e.palette.primary.main : e.palette.divider}`,
|
|
215
217
|
borderRadius: (e) => `${e.shape.borderRadius}px`
|
|
216
218
|
},
|
|
217
|
-
children:
|
|
219
|
+
children: m(e, { iconKey: "Keyboard" })
|
|
218
220
|
})
|
|
219
221
|
});
|
|
220
|
-
return
|
|
222
|
+
return g(f, {
|
|
221
223
|
style: {
|
|
222
224
|
height: 460,
|
|
223
225
|
width: "100%",
|
|
224
226
|
display: "flex",
|
|
225
227
|
flexDirection: "column"
|
|
226
228
|
},
|
|
227
|
-
sx: [{ fontFamily: (e) => e.typography.fontFamily }, ...Array.isArray(
|
|
229
|
+
sx: [{ fontFamily: (e) => e.typography.fontFamily }, ...Array.isArray(a) ? a : [a]],
|
|
228
230
|
...h,
|
|
229
231
|
children: [
|
|
230
|
-
|
|
232
|
+
g(f, {
|
|
231
233
|
sx: {
|
|
232
234
|
display: "flex",
|
|
233
235
|
alignItems: "center",
|
|
@@ -235,27 +237,27 @@ function O(n) {
|
|
|
235
237
|
marginBottom: (e) => e.spacing(1.5)
|
|
236
238
|
},
|
|
237
239
|
children: [
|
|
238
|
-
|
|
239
|
-
inputRef:
|
|
240
|
+
m(C, {
|
|
241
|
+
inputRef: V,
|
|
240
242
|
slotProps: {
|
|
241
243
|
input: {
|
|
242
244
|
sx: { backgroundColor: (e) => e.palette.action.hover },
|
|
243
|
-
startAdornment:
|
|
245
|
+
startAdornment: H && (U || J && J.length > 0) ? m(k, {
|
|
244
246
|
position: "start",
|
|
245
247
|
sx: { marginRight: "6px" },
|
|
246
|
-
children:
|
|
247
|
-
labels:
|
|
248
|
+
children: U ? m(O, { stroke: U }) : m(E, {
|
|
249
|
+
labels: F(J).map(B),
|
|
248
250
|
dangling: !0
|
|
249
251
|
})
|
|
250
252
|
}) : void 0,
|
|
251
|
-
endAdornment:
|
|
253
|
+
endAdornment: he ? m(k, {
|
|
252
254
|
position: "end",
|
|
253
|
-
children:
|
|
254
|
-
"aria-label":
|
|
255
|
-
onClick:
|
|
255
|
+
children: m(S, {
|
|
256
|
+
"aria-label": H ? "clear shortcut" : "clear search",
|
|
257
|
+
onClick: ue,
|
|
256
258
|
edge: "end",
|
|
257
259
|
size: "small",
|
|
258
|
-
children:
|
|
260
|
+
children: m(e, { iconKey: "Close" })
|
|
259
261
|
})
|
|
260
262
|
}) : void 0
|
|
261
263
|
},
|
|
@@ -263,58 +265,58 @@ function O(n) {
|
|
|
263
265
|
className: "input",
|
|
264
266
|
autoFocus: !0,
|
|
265
267
|
spellCheck: !1,
|
|
266
|
-
placeholder:
|
|
268
|
+
placeholder: H ? U || J && J.length > 0 ? "" : "Press a shortcut… (Esc to exit)" : "Type to search commands, scopes, or descriptions",
|
|
267
269
|
autoComplete: "off",
|
|
268
|
-
"aria-label":
|
|
270
|
+
"aria-label": H ? "Press a shortcut to find its command" : "Search commands",
|
|
269
271
|
sx: {
|
|
270
272
|
paddingTop: (e) => e.spacing(1),
|
|
271
273
|
paddingBottom: (e) => e.spacing(1),
|
|
272
|
-
caretColor: (e) =>
|
|
274
|
+
caretColor: (e) => H ? e.palette.primary.main : void 0
|
|
273
275
|
}
|
|
274
276
|
}
|
|
275
277
|
},
|
|
276
278
|
sx: {
|
|
277
279
|
flex: "1 1 auto",
|
|
278
|
-
"& .MuiOutlinedInput-notchedOutline": { borderColor: (e) =>
|
|
280
|
+
"& .MuiOutlinedInput-notchedOutline": { borderColor: (e) => ae ? `${e.palette.error.main} !important` : H ? `${e.palette.primary.main} !important` : void 0 }
|
|
279
281
|
},
|
|
280
|
-
value:
|
|
282
|
+
value: H ? "" : T,
|
|
281
283
|
onChange: (e) => {
|
|
282
|
-
|
|
284
|
+
H || W(e.target.value);
|
|
283
285
|
},
|
|
284
|
-
onKeyDown:
|
|
285
|
-
if ((e.ctrlKey || e.metaKey) && ("k" === e.key || "K" === e.key)) return
|
|
286
|
-
e.which === t.Escape &&
|
|
286
|
+
onKeyDown: H ? ce : (e) => {
|
|
287
|
+
if ((e.ctrlKey || e.metaKey) && ("k" === e.key || "K" === e.key)) return se(!0), e.stopPropagation(), void e.preventDefault();
|
|
288
|
+
e.which === t.Escape && T.length > 0 && (W(""), e.stopPropagation(), e.preventDefault());
|
|
287
289
|
},
|
|
288
|
-
onKeyUp:
|
|
290
|
+
onKeyUp: H ? pe : void 0,
|
|
289
291
|
onContextMenu: (e) => e.stopPropagation()
|
|
290
292
|
}),
|
|
291
|
-
|
|
292
|
-
|
|
293
|
+
me,
|
|
294
|
+
m(v, {
|
|
293
295
|
sx: {
|
|
294
296
|
flexShrink: 0,
|
|
295
297
|
marginRight: 0
|
|
296
298
|
},
|
|
297
|
-
control:
|
|
298
|
-
checked:
|
|
299
|
-
onChange: () =>
|
|
299
|
+
control: m(x, {
|
|
300
|
+
checked: A,
|
|
301
|
+
onChange: () => M(!A)
|
|
300
302
|
}),
|
|
301
|
-
label: "
|
|
303
|
+
label: b("shortcutKeys.onlyKeyBindings"),
|
|
302
304
|
labelPlacement: "start"
|
|
303
305
|
})
|
|
304
306
|
]
|
|
305
307
|
}),
|
|
306
|
-
|
|
308
|
+
j && m(f, {
|
|
307
309
|
sx: {
|
|
308
310
|
display: "flex",
|
|
309
311
|
marginBottom: 1
|
|
310
312
|
},
|
|
311
|
-
children:
|
|
313
|
+
children: m(y, {
|
|
312
314
|
size: "small",
|
|
313
|
-
label:
|
|
314
|
-
onDelete: () =>
|
|
315
|
+
label: b("shortcutKeys.scopeFilter", { scope: le }),
|
|
316
|
+
onDelete: () => X(null)
|
|
315
317
|
})
|
|
316
318
|
}),
|
|
317
|
-
|
|
319
|
+
m(f, {
|
|
318
320
|
sx: {
|
|
319
321
|
flex: "1 1 100%",
|
|
320
322
|
minHeight: 0,
|
|
@@ -322,20 +324,20 @@ function O(n) {
|
|
|
322
324
|
border: (e) => `solid ${e.palette.divider} 1px`,
|
|
323
325
|
overflow: "visible"
|
|
324
326
|
},
|
|
325
|
-
children:
|
|
327
|
+
children: m(f, {
|
|
326
328
|
sx: {
|
|
327
329
|
height: "100%",
|
|
328
330
|
overflow: "auto"
|
|
329
331
|
},
|
|
330
|
-
children: 0 ===
|
|
332
|
+
children: 0 === re.length ? m(f, {
|
|
331
333
|
sx: {
|
|
332
334
|
padding: 3,
|
|
333
335
|
textAlign: "center",
|
|
334
|
-
color: (e) =>
|
|
336
|
+
color: (e) => ae ? e.palette.error.main : e.palette.text.secondary
|
|
335
337
|
},
|
|
336
|
-
children:
|
|
337
|
-
}) :
|
|
338
|
-
onClick: () =>
|
|
338
|
+
children: b(ie ? "shortcutKeys.noMatches" : "shortcutKeys.none")
|
|
339
|
+
}) : re.map((t) => g(f, { children: [g(f, {
|
|
340
|
+
onClick: () => de(t.scope),
|
|
339
341
|
sx: {
|
|
340
342
|
position: "sticky",
|
|
341
343
|
top: "-1px",
|
|
@@ -353,16 +355,16 @@ function O(n) {
|
|
|
353
355
|
fontWeight: 600,
|
|
354
356
|
letterSpacing: "0.04em",
|
|
355
357
|
textTransform: "uppercase",
|
|
356
|
-
backgroundColor: (e) =>
|
|
357
|
-
boxShadow: (e) => `0 -2px 0 0 ${
|
|
358
|
+
backgroundColor: (e) => $(e.palette.background.paper, .04),
|
|
359
|
+
boxShadow: (e) => `0 -2px 0 0 ${$(e.palette.background.paper, .04)}`,
|
|
358
360
|
borderBottom: (e) => `solid 1px ${e.palette.divider}`,
|
|
359
|
-
color: (e) =>
|
|
361
|
+
color: (e) => j === t.scope ? e.palette.primary.main : e.palette.text.secondary,
|
|
360
362
|
"&:hover": {
|
|
361
363
|
color: (e) => e.palette.text.primary,
|
|
362
|
-
backgroundColor: (e) =>
|
|
364
|
+
backgroundColor: (e) => $(e.palette.background.paper, .09)
|
|
363
365
|
}
|
|
364
366
|
},
|
|
365
|
-
children: [
|
|
367
|
+
children: [m("span", { children: t.scopeLabel }), m(w, {
|
|
366
368
|
component: "span",
|
|
367
369
|
sx: {
|
|
368
370
|
fontSize: "inherit",
|
|
@@ -371,21 +373,21 @@ function O(n) {
|
|
|
371
373
|
children: t.rows.length
|
|
372
374
|
})]
|
|
373
375
|
}), t.rows.map((t) => {
|
|
374
|
-
return
|
|
376
|
+
return g(f, {
|
|
375
377
|
sx: {
|
|
376
378
|
paddingX: 1.5,
|
|
377
379
|
paddingY: .75,
|
|
378
380
|
borderBottom: (e) => `solid 1px ${e.palette.divider}`,
|
|
379
381
|
"&:hover": { backgroundColor: (e) => e.palette.action.hover }
|
|
380
382
|
},
|
|
381
|
-
children: [
|
|
383
|
+
children: [g(f, {
|
|
382
384
|
sx: {
|
|
383
385
|
display: "flex",
|
|
384
386
|
alignItems: "center",
|
|
385
387
|
gap: 1
|
|
386
388
|
},
|
|
387
389
|
children: [
|
|
388
|
-
|
|
390
|
+
m(f, {
|
|
389
391
|
sx: {
|
|
390
392
|
flexShrink: 0,
|
|
391
393
|
display: "flex",
|
|
@@ -394,21 +396,21 @@ function O(n) {
|
|
|
394
396
|
height: "var(--icon-size, 20px)",
|
|
395
397
|
color: (e) => e.palette.text.icon ?? e.palette.action.active
|
|
396
398
|
},
|
|
397
|
-
children: (n = t.icon, n && "string" != typeof n ? n :
|
|
399
|
+
children: (n = t.icon, n && "string" != typeof n ? n : m(e, { iconKey: n }))
|
|
398
400
|
}),
|
|
399
|
-
|
|
401
|
+
m(w, {
|
|
400
402
|
sx: {
|
|
401
403
|
flex: "1 1 auto",
|
|
402
404
|
fontWeight: 500
|
|
403
405
|
},
|
|
404
406
|
children: t.label
|
|
405
407
|
}),
|
|
406
|
-
t.shortcut &&
|
|
408
|
+
t.shortcut && m(f, {
|
|
407
409
|
sx: { flexShrink: 0 },
|
|
408
|
-
children:
|
|
410
|
+
children: m(O, { stroke: t.shortcut })
|
|
409
411
|
})
|
|
410
412
|
]
|
|
411
|
-
}), t.description &&
|
|
413
|
+
}), t.description && m(w, {
|
|
412
414
|
component: "div",
|
|
413
415
|
sx: {
|
|
414
416
|
marginTop: "2px",
|
|
@@ -424,7 +426,7 @@ function O(n) {
|
|
|
424
426
|
})] }, t.scope))
|
|
425
427
|
})
|
|
426
428
|
}),
|
|
427
|
-
|
|
429
|
+
m(f, {
|
|
428
430
|
sx: {
|
|
429
431
|
display: "flex",
|
|
430
432
|
flexShrink: 0,
|
|
@@ -434,19 +436,19 @@ function O(n) {
|
|
|
434
436
|
userSelect: "none",
|
|
435
437
|
justifyContent: "flex-end"
|
|
436
438
|
},
|
|
437
|
-
children:
|
|
439
|
+
children: m(w, {
|
|
438
440
|
noWrap: !0,
|
|
439
441
|
component: "div",
|
|
440
|
-
sx: { color: (e) =>
|
|
441
|
-
children:
|
|
442
|
+
sx: { color: (e) => ae ? e.palette.error.main : e.palette.text.secondary },
|
|
443
|
+
children: b(ie ? "shortcutKeys.countFound" : "shortcutKeys.count", { count: ne.length })
|
|
442
444
|
})
|
|
443
445
|
})
|
|
444
446
|
]
|
|
445
447
|
});
|
|
446
448
|
}
|
|
447
|
-
var
|
|
449
|
+
var X = (e) => {
|
|
448
450
|
const { title: n = "Shortcut Keys", commands: o, sx: r, ...l } = e;
|
|
449
|
-
return
|
|
451
|
+
return m(h, {
|
|
450
452
|
isModal: !0,
|
|
451
453
|
onKeyDown: (e) => {
|
|
452
454
|
e.keyCode === t.F1 && e.preventDefault();
|
|
@@ -458,13 +460,13 @@ var j = (e) => {
|
|
|
458
460
|
title: n,
|
|
459
461
|
autoFocusSel: ".input",
|
|
460
462
|
...l,
|
|
461
|
-
children:
|
|
463
|
+
children: m(b, {
|
|
462
464
|
dividers: !0,
|
|
463
|
-
children:
|
|
465
|
+
children: m(j, {
|
|
464
466
|
commands: o,
|
|
465
467
|
sx: { marginBottom: "8px" }
|
|
466
468
|
})
|
|
467
469
|
})
|
|
468
470
|
});
|
|
469
471
|
};
|
|
470
|
-
export {
|
|
472
|
+
export { X as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.3
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|