@sheetxl/studio-mui 0.8.0-beta.1 → 0.8.0-beta.2
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/BNqyPYRxYISp-uEg.cjs +1 -0
- package/browser/cjs/BXkdjAb4jpTr412c.cjs +1 -0
- package/browser/cjs/Bc-YisjBtD56vBAW.cjs +1 -0
- package/browser/cjs/CuqM721PsKey3yMP.cjs +1 -0
- package/browser/cjs/Cy_XmYq6BsWmCXkk.cjs +3 -0
- package/browser/cjs/D948H7ell-f87BX3.cjs +1 -0
- package/browser/cjs/Dy6O3OWbDBKIj_Ak.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/index.cjs +2 -2
- package/browser/cjs/rCZbExyf1Q3aHloQ.cjs +13 -0
- package/browser/esm/{UJOXCQv6KrG1gY3l.mjs → 894KM-_Oc5cB6ExA.mjs} +8 -16
- package/browser/esm/B1YOQZHyO_dmHUN4.mjs +293 -0
- package/browser/esm/BQSamOMBAoFdQdJe.mjs +12903 -0
- package/browser/esm/{BoLxSRdEWt-Yg2RI.mjs → BlZiWp3SB3wH5O38.mjs} +130 -103
- package/browser/esm/{DMLXV4EKl1NCp_jk.mjs → Bo74PCF42KVYJF0j.mjs} +3 -3
- package/browser/esm/{ChwS_ougBsogOEsP.mjs → C2Eke_9Dj_m6mtMj.mjs} +2 -2
- package/browser/esm/C5-J1xiO3O1-qaaP.mjs +268 -0
- package/browser/esm/CIbDvsCeLOFHzzId.mjs +152 -0
- package/browser/esm/CNLLwRPWnd4PJgPO.mjs +117 -0
- package/browser/esm/{3ydDykDMtDYbfVVn.mjs → CppDmJ4ckCH3alQf.mjs} +113 -111
- package/browser/esm/{CVBub6pgTsJzCc5m.mjs → CyHNVjgkMYZYlJpY.mjs} +2100 -2214
- package/browser/esm/{Bz5LiUe3SZ8g42Ia.mjs → D7fA9EyCNSzQMgxg.mjs} +1 -1
- package/browser/esm/D8VPmFDvXDE778_x.mjs +222 -0
- package/browser/esm/{Cj2pgCNqBCGl4rTX.mjs → DE7MVTTfExTzvyMW.mjs} +569 -540
- package/browser/esm/DEEnXLhYlUARg6MU.mjs +410 -0
- package/browser/esm/{Cd6n1XUgF0VItpkH.mjs → DIGlcemS7napWyKW.mjs} +1 -1
- package/browser/esm/{rU8xNPVQtDSnujM-.mjs → DN4cwAPYCrtR4gS9.mjs} +3 -3
- package/browser/esm/{DNDrQKMTzKzNMjl-.mjs → DSGFnb1gYyL22p0t.mjs} +1 -1
- package/browser/esm/DlEshYp6NPfHxFvI.mjs +115 -0
- package/browser/esm/{BZBJG2tDdD3-VujP.mjs → Dv3hSCyjvwo6GcH1.mjs} +195 -174
- package/browser/esm/{CBU3LgLYmqtQjJbu.mjs → GmQ9XFFY3hi1L_Ej.mjs} +1 -1
- package/browser/esm/{CVfuCNRpODUw04IH.mjs → _v6Wbw_y3QgJy3qY.mjs} +1 -1
- package/browser/esm/{BUGepznywvV0tUjW.mjs → iM5uEM9H4e8HGt5y.mjs} +2 -2
- package/browser/esm/index.mjs +466 -135
- package/browser/esm/{zWTZ8BvT4hjgC2ua.mjs → xGJU5xUJx3HF317Q.mjs} +2 -2
- package/browser/esm/{CDU0rqpLNVtMLI-f.mjs → z3zkU7Jf3WJ2_Z_P.mjs} +1 -1
- package/licenses/dependencies.txt +73 -73
- package/node/esm/{C-boHCnJditFzng3.mjs → BI8XFczUY--Db2n3.mjs} +32 -40
- package/node/esm/{yCHAZKxJR7qY_ySy.mjs → BJi0FlhIqCMEwROu.mjs} +143 -141
- package/node/esm/{BA7VzUQ2sKRLTZ5c.mjs → BMoRatciTqOi1HkT.mjs} +1 -1
- package/node/esm/BgxeTfCn3jZHGwd7.mjs +414 -0
- package/node/esm/{BhqI3pQFkV8K_612.mjs → BoDCV8cDmFVAYtaW.mjs} +1 -1
- package/node/esm/C0M1VbsIRuRauUI-.mjs +268 -0
- package/node/esm/{CUMKTjYv6VTkcWYi.mjs → CCWQ116Z67Kz78Uo.mjs} +1 -1
- package/node/esm/C_oV7ldFStOF_fAd.mjs +115 -0
- package/node/esm/DAji2BXelmIUxioS.mjs +116 -0
- package/node/esm/{DXZrzWee8K5FPOW1.mjs → DN-bhyNbuBbNB0Ky.mjs} +2 -2
- package/node/esm/{BwZcoHDBmLPIVOT5.mjs → DVaQ6xIbKQgBk0uw.mjs} +1 -1
- package/node/esm/{Qpuqm6xBr_da38Ht.mjs → DVshSSmP5QZU7GoY.mjs} +163 -135
- package/node/esm/{DM7K7-284z-PczVz.mjs → Dbv0IltYad9SQrj3.mjs} +1 -1
- package/node/esm/{CHi3AuWEwEPOg9IZ.mjs → DvMAUBSQsZmIsRxi.mjs} +1 -1
- package/node/esm/OmUP1AfaJcOxWQAg.mjs +4462 -0
- package/node/esm/cJDXopFIX6f3_oi3.mjs +294 -0
- package/node/esm/index.mjs +7716 -4114
- 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.2
|
|
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 r, keyEventCanonicals as i, keyStrokeToCanonical as a } from "@sheetxl/utils-react";
|
|
8
|
-
import
|
|
7
|
+
import { DynamicIcon as e, KeyCodes as t, KeyModifiers as n, ReactUtils as r, keyEventCanonicals as i, keyStrokeToCanonical as a, useTranslator as o } from "@sheetxl/utils-react";
|
|
8
|
+
import s, { useCallback as c, useEffect as l, useMemo as u, useRef as ee, useState as d } from "react";
|
|
9
9
|
import { InternalWindow as f } from "@sheetxl/utils-mui";
|
|
10
10
|
import { jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
11
|
-
import { Box as h, Checkbox as
|
|
12
|
-
import { CommonUtils as C, TimerUtils as
|
|
13
|
-
var
|
|
11
|
+
import { Box as h, Checkbox as te, Chip as g, DialogContent as _, FormControlLabel as v, IconButton as y, InputAdornment as b, TextField as ne, Tooltip as re, Typography as x, emphasize as S } from "@mui/material";
|
|
12
|
+
import { CommonUtils as C, TimerUtils as ie } from "@sheetxl/utils";
|
|
13
|
+
var ae = (e) => e.replace(/\n\n+/g, "\n").trim(), w = /* @__PURE__ */ new Set([
|
|
14
14
|
"Control",
|
|
15
15
|
"Shift",
|
|
16
16
|
"Alt",
|
|
17
17
|
"Meta"
|
|
18
|
-
]),
|
|
18
|
+
]), T = (e) => {
|
|
19
19
|
let t = e, n = /* @__PURE__ */ new Set();
|
|
20
20
|
for (let e of [
|
|
21
21
|
"mod",
|
|
@@ -26,26 +26,26 @@ var ie = (e) => e.replace(/\n\n+/g, "\n").trim(), ae = /* @__PURE__ */ new Set([
|
|
|
26
26
|
key: t,
|
|
27
27
|
mods: n
|
|
28
28
|
};
|
|
29
|
-
},
|
|
29
|
+
}, E = C.getPlatform() === C.OSType.MacOS || C.getPlatform() === C.OSType.IOS, D = [
|
|
30
30
|
n.Ctrl,
|
|
31
31
|
n.Alt,
|
|
32
32
|
n.Shift,
|
|
33
33
|
n.Meta
|
|
34
|
-
],
|
|
34
|
+
], O = (e) => {
|
|
35
35
|
switch (e) {
|
|
36
|
-
case n.Ctrl: return
|
|
36
|
+
case n.Ctrl: return E ? "Cmd" : "Ctrl";
|
|
37
37
|
case n.Alt: return "Alt";
|
|
38
38
|
case n.Shift: return "Shift";
|
|
39
39
|
case n.Meta: return "Meta";
|
|
40
40
|
default: return e;
|
|
41
41
|
}
|
|
42
|
-
}, O = (e) => {
|
|
43
|
-
let t = new Set(e);
|
|
44
|
-
return E.filter((e) => t.has(e));
|
|
45
42
|
}, k = (e) => {
|
|
43
|
+
let t = new Set(e);
|
|
44
|
+
return D.filter((e) => t.has(e));
|
|
45
|
+
}, A = (e) => {
|
|
46
46
|
let t = [];
|
|
47
47
|
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;
|
|
48
|
-
},
|
|
48
|
+
}, j = ({ children: e }) => p(h, {
|
|
49
49
|
component: "kbd",
|
|
50
50
|
sx: {
|
|
51
51
|
display: "inline-flex",
|
|
@@ -67,29 +67,29 @@ var ie = (e) => e.replace(/\n\n+/g, "\n").trim(), ae = /* @__PURE__ */ new Set([
|
|
|
67
67
|
borderBottomWidth: "2px"
|
|
68
68
|
},
|
|
69
69
|
children: e
|
|
70
|
-
}),
|
|
70
|
+
}), M = () => p(h, {
|
|
71
71
|
component: "span",
|
|
72
72
|
sx: {
|
|
73
73
|
fontSize: "0.7rem",
|
|
74
74
|
color: (e) => e.palette.text.disabled
|
|
75
75
|
},
|
|
76
76
|
children: "+"
|
|
77
|
-
}),
|
|
77
|
+
}), N = ({ labels: e, dangling: t = !1 }) => m(h, {
|
|
78
78
|
sx: {
|
|
79
79
|
display: "flex",
|
|
80
80
|
alignItems: "center",
|
|
81
81
|
gap: "1px"
|
|
82
82
|
},
|
|
83
|
-
children: [e.map((e, t) => m(
|
|
84
|
-
}),
|
|
83
|
+
children: [e.map((e, t) => m(s.Fragment, { children: [t > 0 && p(M, {}), p(j, { children: e })] }, t)), t && p(M, {})]
|
|
84
|
+
}), P = ({ stroke: e }) => {
|
|
85
85
|
if (!e?.key) return null;
|
|
86
|
-
let t =
|
|
87
|
-
return t.push(r.toPrettyKeyCode(e.key)), p(
|
|
86
|
+
let t = k(e.modifiers ?? []).map(O);
|
|
87
|
+
return t.push(r.toPrettyKeyCode(e.key)), p(N, { labels: t });
|
|
88
88
|
};
|
|
89
|
-
function
|
|
90
|
-
let { commands: r, sx:
|
|
89
|
+
function F(n) {
|
|
90
|
+
let { commands: r, sx: s, ...f } = n, _ = o(), [C, D] = d(!1), [j, M] = d(""), [F, I] = d(null), [L, oe] = d(!1), [R, z] = d(null), [B, V] = d(null), [H, U] = d(null), W = ee(null), G = u(() => {
|
|
91
91
|
let e = r.getAllCommands();
|
|
92
|
-
|
|
92
|
+
C && (e = e.filter((e) => e.command.getShortcut())), e = [...e].sort((e, t) => {
|
|
93
93
|
let n = e.command.getScope?.() ?? e.groupKey, r = t.command.getScope?.() ?? t.groupKey, i = n.localeCompare(r);
|
|
94
94
|
return i === 0 ? e.command.getLabel().localeCompare(t.command.getLabel()) : i;
|
|
95
95
|
});
|
|
@@ -100,7 +100,7 @@ function P(n) {
|
|
|
100
100
|
icon: e.getIcon(),
|
|
101
101
|
scope: i,
|
|
102
102
|
scopeLabel: e.getScopeLabel?.() ?? i,
|
|
103
|
-
description:
|
|
103
|
+
description: ae(e.getDescription())
|
|
104
104
|
}, s = e.getShortcut(), c = Array.isArray(s) ? s.length ? s : [null] : [s ?? null];
|
|
105
105
|
for (let e of c) {
|
|
106
106
|
let r = e ? a(e) : null, s = `${i}\0${o.label}\0${r ?? ""}`;
|
|
@@ -113,11 +113,11 @@ function P(n) {
|
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
115
|
return t;
|
|
116
|
-
}, [
|
|
117
|
-
|
|
116
|
+
}, [C, r]), K = u(() => F ? G.filter((e) => e.scope === F) : G, [G, F]), [q, se] = d(null);
|
|
117
|
+
l(() => {
|
|
118
118
|
let e = !1;
|
|
119
|
-
return import("./
|
|
120
|
-
e ||
|
|
119
|
+
return import("./GmQ9XFFY3hi1L_Ej.mjs").then((t) => {
|
|
120
|
+
e || se(new t.default(K, {
|
|
121
121
|
threshold: .3,
|
|
122
122
|
ignoreLocation: !0,
|
|
123
123
|
keys: [
|
|
@@ -127,31 +127,33 @@ function P(n) {
|
|
|
127
127
|
"scopeLabel"
|
|
128
128
|
]
|
|
129
129
|
}));
|
|
130
|
+
}).catch((e) => {
|
|
131
|
+
console.warn("Shortcut search is unavailable:", e);
|
|
130
132
|
}), () => {
|
|
131
133
|
e = !0;
|
|
132
134
|
};
|
|
133
|
-
}, [
|
|
134
|
-
let [J, Y] = d(
|
|
135
|
-
|
|
136
|
-
if (
|
|
135
|
+
}, [K]);
|
|
136
|
+
let [J, Y] = d(G);
|
|
137
|
+
l(() => {
|
|
138
|
+
if (L) return B ? void Y(K.filter((e) => {
|
|
137
139
|
if (!e.canonical) return !1;
|
|
138
|
-
let t =
|
|
139
|
-
if (!
|
|
140
|
-
for (let e of
|
|
140
|
+
let t = T(e.canonical);
|
|
141
|
+
if (!B.keys.has(t.key)) return !1;
|
|
142
|
+
for (let e of B.mods) if (!t.mods.has(e)) return !1;
|
|
141
143
|
return !0;
|
|
142
|
-
})) : void Y(
|
|
143
|
-
|
|
144
|
-
let e =
|
|
145
|
-
e.length === 0 ? Y(
|
|
146
|
-
}, 90)() : Y(
|
|
144
|
+
})) : void Y(K);
|
|
145
|
+
q ? ie.debounce(() => {
|
|
146
|
+
let e = j.trim();
|
|
147
|
+
e.length === 0 ? Y(K) : Y(q.search(e).map((e) => e.item));
|
|
148
|
+
}, 90)() : Y(K);
|
|
147
149
|
}, [
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
150
|
+
L,
|
|
151
|
+
B,
|
|
152
|
+
q,
|
|
153
|
+
j,
|
|
154
|
+
K
|
|
153
155
|
]);
|
|
154
|
-
let X =
|
|
156
|
+
let X = u(() => {
|
|
155
157
|
let e = /* @__PURE__ */ new Map();
|
|
156
158
|
for (let t of J) {
|
|
157
159
|
let n = e.get(t.scope);
|
|
@@ -162,19 +164,19 @@ function P(n) {
|
|
|
162
164
|
scopeLabel: t[0].scopeLabel,
|
|
163
165
|
rows: t
|
|
164
166
|
}));
|
|
165
|
-
}, [J]),
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
}, [
|
|
169
|
-
let $ =
|
|
170
|
-
|
|
171
|
-
}, []),
|
|
167
|
+
}, [J]), ce = u(() => G.find((e) => e.scope === F)?.scopeLabel ?? F, [G, F]), Z = L ? !!R : j.length > 0, Q = Z && J.length === 0;
|
|
168
|
+
l(() => {
|
|
169
|
+
W.current?.focus();
|
|
170
|
+
}, [L]);
|
|
171
|
+
let $ = c((e) => {
|
|
172
|
+
oe(e), M(""), z(null), V(null), U(null);
|
|
173
|
+
}, []), le = c((e) => {
|
|
172
174
|
if (e.key === "Tab") return;
|
|
173
|
-
if (e.which === t.Escape) return
|
|
174
|
-
if (e.preventDefault(), e.stopPropagation(), e.key === "Backspace") return
|
|
175
|
+
if (e.which === t.Escape) return R || H ? (z(null), V(null), U(null)) : $(!1), e.stopPropagation(), void e.preventDefault();
|
|
176
|
+
if (e.preventDefault(), e.stopPropagation(), e.key === "Backspace") return z(null), V(null), void U(null);
|
|
175
177
|
let n = e.nativeEvent;
|
|
176
|
-
if (
|
|
177
|
-
|
|
178
|
+
if (w.has(e.key)) return z(null), V(null), void U(A(n));
|
|
179
|
+
U(null), z(((e) => {
|
|
178
180
|
let t = [];
|
|
179
181
|
e.ctrlKey && t.push("ctrl"), e.altKey && t.push("alt"), e.shiftKey && t.push("shift"), e.metaKey && t.push("meta");
|
|
180
182
|
let n = e.code, r = e.key;
|
|
@@ -182,34 +184,34 @@ function P(n) {
|
|
|
182
184
|
key: r,
|
|
183
185
|
modifiers: t
|
|
184
186
|
};
|
|
185
|
-
})(n)),
|
|
186
|
-
let t = [...i(e)].map(
|
|
187
|
+
})(n)), V(((e) => {
|
|
188
|
+
let t = [...i(e)].map(T);
|
|
187
189
|
return {
|
|
188
190
|
keys: new Set(t.map((e) => e.key)),
|
|
189
191
|
mods: t[0]?.mods ?? /* @__PURE__ */ new Set()
|
|
190
192
|
};
|
|
191
193
|
})(n));
|
|
192
194
|
}, [
|
|
193
|
-
|
|
194
|
-
|
|
195
|
+
R,
|
|
196
|
+
H,
|
|
195
197
|
$
|
|
196
|
-
]),
|
|
197
|
-
if (
|
|
198
|
-
let t =
|
|
199
|
-
|
|
200
|
-
}, [
|
|
201
|
-
|
|
202
|
-
}, []),
|
|
203
|
-
|
|
204
|
-
}, [
|
|
205
|
-
title:
|
|
206
|
-
children: p(
|
|
198
|
+
]), ue = c((e) => {
|
|
199
|
+
if (R) return;
|
|
200
|
+
let t = A(e.nativeEvent);
|
|
201
|
+
U(t.length ? t : null);
|
|
202
|
+
}, [R]), de = c((e) => {
|
|
203
|
+
I((t) => t === e ? null : e);
|
|
204
|
+
}, []), fe = c(() => {
|
|
205
|
+
L ? (z(null), V(null), U(null)) : M(""), W.current?.focus();
|
|
206
|
+
}, [L]), pe = L ? !!(R || H && H.length > 0) : j.length > 0, me = p(re, {
|
|
207
|
+
title: L ? "Search by name (ESC)" : `Search by shortcut (${E ? "Cmd" : "Ctrl"}+K)`,
|
|
208
|
+
children: p(y, {
|
|
207
209
|
"aria-label": "toggle shortcut capture",
|
|
208
|
-
color:
|
|
209
|
-
onClick: () => $(!
|
|
210
|
+
color: L ? "primary" : "default",
|
|
211
|
+
onClick: () => $(!L),
|
|
210
212
|
sx: {
|
|
211
213
|
flexShrink: 0,
|
|
212
|
-
border: (e) => `solid 1px ${
|
|
214
|
+
border: (e) => `solid 1px ${L ? e.palette.primary.main : e.palette.divider}`,
|
|
213
215
|
borderRadius: (e) => `${e.shape.borderRadius}px`
|
|
214
216
|
},
|
|
215
217
|
children: p(e, { iconKey: "Keyboard" })
|
|
@@ -222,7 +224,7 @@ function P(n) {
|
|
|
222
224
|
display: "flex",
|
|
223
225
|
flexDirection: "column"
|
|
224
226
|
},
|
|
225
|
-
sx: [{ fontFamily: (e) => e.typography.fontFamily }, ...Array.isArray(
|
|
227
|
+
sx: [{ fontFamily: (e) => e.typography.fontFamily }, ...Array.isArray(s) ? s : [s]],
|
|
226
228
|
...f,
|
|
227
229
|
children: [
|
|
228
230
|
m(h, {
|
|
@@ -234,23 +236,23 @@ function P(n) {
|
|
|
234
236
|
},
|
|
235
237
|
children: [
|
|
236
238
|
p(ne, {
|
|
237
|
-
inputRef:
|
|
239
|
+
inputRef: W,
|
|
238
240
|
slotProps: {
|
|
239
241
|
input: {
|
|
240
242
|
sx: { backgroundColor: (e) => e.palette.action.hover },
|
|
241
|
-
startAdornment:
|
|
243
|
+
startAdornment: L && (R || H && H.length > 0) ? p(b, {
|
|
242
244
|
position: "start",
|
|
243
245
|
sx: { marginRight: "6px" },
|
|
244
|
-
children:
|
|
245
|
-
labels:
|
|
246
|
+
children: R ? p(P, { stroke: R }) : p(N, {
|
|
247
|
+
labels: k(H).map(O),
|
|
246
248
|
dangling: !0
|
|
247
249
|
})
|
|
248
250
|
}) : void 0,
|
|
249
|
-
endAdornment:
|
|
251
|
+
endAdornment: pe ? p(b, {
|
|
250
252
|
position: "end",
|
|
251
|
-
children: p(
|
|
252
|
-
"aria-label":
|
|
253
|
-
onClick:
|
|
253
|
+
children: p(y, {
|
|
254
|
+
"aria-label": L ? "clear shortcut" : "clear search",
|
|
255
|
+
onClick: fe,
|
|
254
256
|
edge: "end",
|
|
255
257
|
size: "small",
|
|
256
258
|
children: p(e, { iconKey: "Close" })
|
|
@@ -261,55 +263,55 @@ function P(n) {
|
|
|
261
263
|
className: "input",
|
|
262
264
|
autoFocus: !0,
|
|
263
265
|
spellCheck: !1,
|
|
264
|
-
placeholder:
|
|
266
|
+
placeholder: L ? R || H && H.length > 0 ? "" : "Press a shortcut… (Esc to exit)" : "Type to search commands, scopes, or descriptions",
|
|
265
267
|
autoComplete: "off",
|
|
266
|
-
"aria-label":
|
|
268
|
+
"aria-label": L ? "Press a shortcut to find its command" : "Search commands",
|
|
267
269
|
sx: {
|
|
268
270
|
paddingTop: (e) => e.spacing(1),
|
|
269
271
|
paddingBottom: (e) => e.spacing(1),
|
|
270
|
-
caretColor: (e) =>
|
|
272
|
+
caretColor: (e) => L ? e.palette.primary.main : void 0
|
|
271
273
|
}
|
|
272
274
|
}
|
|
273
275
|
},
|
|
274
276
|
sx: {
|
|
275
277
|
flex: "1 1 auto",
|
|
276
|
-
"& .MuiOutlinedInput-notchedOutline": { borderColor: (e) => Q ? `${e.palette.error.main} !important` :
|
|
278
|
+
"& .MuiOutlinedInput-notchedOutline": { borderColor: (e) => Q ? `${e.palette.error.main} !important` : L ? `${e.palette.primary.main} !important` : void 0 }
|
|
277
279
|
},
|
|
278
|
-
value:
|
|
280
|
+
value: L ? "" : j,
|
|
279
281
|
onChange: (e) => {
|
|
280
|
-
|
|
282
|
+
L || M(e.target.value);
|
|
281
283
|
},
|
|
282
|
-
onKeyDown:
|
|
284
|
+
onKeyDown: L ? le : (e) => {
|
|
283
285
|
if ((e.ctrlKey || e.metaKey) && (e.key === "k" || e.key === "K")) return $(!0), e.stopPropagation(), void e.preventDefault();
|
|
284
|
-
e.which === t.Escape &&
|
|
286
|
+
e.which === t.Escape && j.length > 0 && (M(""), e.stopPropagation(), e.preventDefault());
|
|
285
287
|
},
|
|
286
|
-
onKeyUp:
|
|
288
|
+
onKeyUp: L ? ue : void 0,
|
|
287
289
|
onContextMenu: (e) => e.stopPropagation()
|
|
288
290
|
}),
|
|
289
|
-
|
|
290
|
-
p(
|
|
291
|
+
me,
|
|
292
|
+
p(v, {
|
|
291
293
|
sx: {
|
|
292
294
|
flexShrink: 0,
|
|
293
295
|
marginRight: 0
|
|
294
296
|
},
|
|
295
|
-
control: p(
|
|
296
|
-
checked:
|
|
297
|
-
onChange: () =>
|
|
297
|
+
control: p(te, {
|
|
298
|
+
checked: C,
|
|
299
|
+
onChange: () => D(!C)
|
|
298
300
|
}),
|
|
299
|
-
label: "
|
|
301
|
+
label: _("shortcutKeys.onlyKeyBindings"),
|
|
300
302
|
labelPlacement: "start"
|
|
301
303
|
})
|
|
302
304
|
]
|
|
303
305
|
}),
|
|
304
|
-
|
|
306
|
+
F && p(h, {
|
|
305
307
|
sx: {
|
|
306
308
|
display: "flex",
|
|
307
309
|
marginBottom: 1
|
|
308
310
|
},
|
|
309
|
-
children: p(
|
|
311
|
+
children: p(g, {
|
|
310
312
|
size: "small",
|
|
311
|
-
label:
|
|
312
|
-
onDelete: () =>
|
|
313
|
+
label: _("shortcutKeys.scopeFilter", { scope: ce }),
|
|
314
|
+
onDelete: () => I(null)
|
|
313
315
|
})
|
|
314
316
|
}),
|
|
315
317
|
p(h, {
|
|
@@ -331,9 +333,9 @@ function P(n) {
|
|
|
331
333
|
textAlign: "center",
|
|
332
334
|
color: (e) => Q ? e.palette.error.main : e.palette.text.secondary
|
|
333
335
|
},
|
|
334
|
-
children: Z ? "
|
|
336
|
+
children: _(Z ? "shortcutKeys.noMatches" : "shortcutKeys.none")
|
|
335
337
|
}) : X.map((t) => m(h, { children: [m(h, {
|
|
336
|
-
onClick: () =>
|
|
338
|
+
onClick: () => de(t.scope),
|
|
337
339
|
sx: {
|
|
338
340
|
position: "sticky",
|
|
339
341
|
top: "-1px",
|
|
@@ -354,7 +356,7 @@ function P(n) {
|
|
|
354
356
|
backgroundColor: (e) => S(e.palette.background.paper, .04),
|
|
355
357
|
boxShadow: (e) => `0 -2px 0 0 ${S(e.palette.background.paper, .04)}`,
|
|
356
358
|
borderBottom: (e) => `solid 1px ${e.palette.divider}`,
|
|
357
|
-
color: (e) =>
|
|
359
|
+
color: (e) => F === t.scope ? e.palette.primary.main : e.palette.text.secondary,
|
|
358
360
|
"&:hover": {
|
|
359
361
|
color: (e) => e.palette.text.primary,
|
|
360
362
|
backgroundColor: (e) => S(e.palette.background.paper, .09)
|
|
@@ -403,7 +405,7 @@ function P(n) {
|
|
|
403
405
|
}),
|
|
404
406
|
t.shortcut && p(h, {
|
|
405
407
|
sx: { flexShrink: 0 },
|
|
406
|
-
children: p(
|
|
408
|
+
children: p(P, { stroke: t.shortcut })
|
|
407
409
|
})
|
|
408
410
|
]
|
|
409
411
|
}), t.description && p(x, {
|
|
@@ -436,13 +438,13 @@ function P(n) {
|
|
|
436
438
|
noWrap: !0,
|
|
437
439
|
component: "div",
|
|
438
440
|
sx: { color: (e) => Q ? e.palette.error.main : e.palette.text.secondary },
|
|
439
|
-
children:
|
|
441
|
+
children: _(Z ? "shortcutKeys.countFound" : "shortcutKeys.count", { count: J.length })
|
|
440
442
|
})
|
|
441
443
|
})
|
|
442
444
|
]
|
|
443
445
|
});
|
|
444
446
|
}
|
|
445
|
-
var
|
|
447
|
+
var I = (e) => {
|
|
446
448
|
let { title: n = "Shortcut Keys", commands: r, sx: i, ...a } = e;
|
|
447
449
|
return p(f, {
|
|
448
450
|
isModal: !0,
|
|
@@ -458,11 +460,11 @@ var F = (e) => {
|
|
|
458
460
|
...a,
|
|
459
461
|
children: p(_, {
|
|
460
462
|
dividers: !0,
|
|
461
|
-
children: p(
|
|
463
|
+
children: p(F, {
|
|
462
464
|
commands: r,
|
|
463
465
|
sx: { marginBottom: "8px" }
|
|
464
466
|
})
|
|
465
467
|
})
|
|
466
468
|
});
|
|
467
469
|
};
|
|
468
|
-
export {
|
|
470
|
+
export { I as default };
|