@sheetxl/studio-mui 0.7.28-beta.4 → 0.8.0-beta.10

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 (243) hide show
  1. package/browser/esm/{Drbpg4A9TaJUZd5A.mjs → 5cbK03T_Oh3tNdR7.mjs} +7 -5
  2. package/browser/esm/{GCJRjX28QYfxi-Lg.mjs → 9eKCkvqpMQwqcXiw.mjs} +1 -1
  3. package/browser/esm/B1Yp_uy1vFHcJB3U.mjs +13 -0
  4. package/browser/esm/Biy7bhzzzPb5sfRN.mjs +152 -0
  5. package/browser/esm/Blaj2R5hYxtLAW__.mjs +117 -0
  6. package/browser/esm/{CVxEcB8lAnOQ-oPh.mjs → ByeL_BZuJ2kl8gtf.mjs} +46 -47
  7. package/browser/esm/{BLjxQ1NUjmULb00s.mjs → C1Rp2hZrApo5MUc8.mjs} +2 -2
  8. package/browser/esm/{C7WFuxTBA8MWoOQj.mjs → CEvZe2cZK-voZTif.mjs} +5 -5
  9. package/browser/esm/{RbGJTMzxMTlkFlTq.mjs → CIu1bjPJe_x31Oww.mjs} +195 -174
  10. package/browser/esm/COv-m-c2byCgvU3M.mjs +14861 -0
  11. package/browser/esm/CjznclrKqJRi7u9O.mjs +77 -0
  12. package/browser/esm/{DoOWIBDSfgrvMmNO.mjs → CoSiOS-og0zFw4Ws.mjs} +587 -556
  13. package/browser/esm/{6GrWBX-cyxTRJerw.mjs → CtEFHbzYNvYjDYvi.mjs} +7 -7
  14. package/browser/esm/D6S8kVTzOjCn0-SK.mjs +627 -0
  15. package/browser/esm/{BVC0iuc28yuEcyua.mjs → D8al_cJ4U-NgzwoK.mjs} +1 -1
  16. package/browser/esm/DBtc4lku0uHVcqWn.mjs +71 -0
  17. package/browser/esm/{CDyYtk9WscSzj5I5.mjs → DHY19rkSiiRZxShC.mjs} +130 -103
  18. package/browser/esm/{DdbgnOWM0tle1jeT.mjs → DU3J8Gcf-WpBxNYg.mjs} +11 -10
  19. package/browser/esm/Die9NXVFveHvcCT-.mjs +4205 -0
  20. package/browser/esm/{CccE_2DTbTMNIfQM.mjs → DmCQbW4zwkT_Rq88.mjs} +1 -1
  21. package/browser/esm/IQLeaAbtGTipUsOD.mjs +516 -0
  22. package/browser/esm/{DhMl3LbgjdX8Nz7b.mjs → X1Db3b_7b_7OuCk6.mjs} +178 -129
  23. package/browser/esm/fb126BNj3F8URR19.mjs +225 -0
  24. package/browser/esm/index.mjs +418 -135
  25. package/browser/esm/sFOAxZpxXo-qvDSp.mjs +293 -0
  26. package/browser/esm/sam1KGQZ59B_fADz.mjs +1941 -0
  27. package/browser/esm/xKiLJKiLxto8SayF.mjs +256 -0
  28. package/browser/esm/yZxC4qUENOlMhVUH.mjs +68 -0
  29. package/licenses/dependencies.txt +58 -311
  30. package/node/esm/B8SQfjKjzYHLxzZR.mjs +632 -0
  31. package/node/esm/{CgA8rdWVZEpIUpsM.mjs → BYVLi0md4AYuDsB_.mjs} +1 -1
  32. package/node/esm/BYsG3KYVmxSe_CIQ.mjs +294 -0
  33. package/node/esm/BYwXhrEwkRAt9nJS.mjs +71 -0
  34. package/node/esm/B_jRGdwGFkudwmL-.mjs +68 -0
  35. package/node/esm/Bb1sLMqXWKjdve23.mjs +77 -0
  36. package/node/esm/{ELTc6e1FF88hBAev.mjs → BcwMb6CyVfvEwbHn.mjs} +69 -70
  37. package/node/esm/{DYlYrd0A73WoQQgM.mjs → CKu1AtRgyltyEdEN.mjs} +1 -1
  38. package/node/esm/Cmt8Wv806N7NmE4Y.mjs +3344 -0
  39. package/node/esm/{6PuhMTJrzLciGI0Z.mjs → D6oQL8knsPpgdXuk.mjs} +2 -2
  40. package/node/esm/{BxTFDoMd-nowfxfb.mjs → D9rzScOA9pEYFrtz.mjs} +1 -1
  41. package/node/esm/DNSjK5DAH3M14Qbc.mjs +521 -0
  42. package/node/esm/{C2HawKeialuFRR9r.mjs → DZzvTQxIKr9LbEsA.mjs} +1 -1
  43. package/node/esm/{uJOy7zjNtP0IqGoa.mjs → ETK6T6G0SIcFXDe5.mjs} +163 -135
  44. package/node/esm/ah3CUg4-VmNstGk_.mjs +256 -0
  45. package/node/esm/{DPhvWXmDun8bC0_v.mjs → ci8d-mF1H9wnYzix.mjs} +1 -1
  46. package/node/esm/cqzp431iNSLWictb.mjs +116 -0
  47. package/node/esm/index.mjs +14783 -6793
  48. package/package.json +15 -18
  49. package/resources/locales/de/groups.cmd.json +29 -16
  50. package/resources/locales/de/studio.cmd.json +18 -1
  51. package/resources/locales/de/ui.msg.json +350 -40
  52. package/resources/locales/en/groups.cmd.json +39 -17
  53. package/resources/locales/en/studio.cmd.json +18 -1
  54. package/resources/locales/en/ui.msg.json +306 -40
  55. package/types/src/anchorItems/AnchorItemsDescriptor.d.ts +17 -1
  56. package/types/src/anchorItems/AnchorItemsPanel.d.ts +14 -0
  57. package/types/src/anchorItems/AnchoredRangeField.d.ts +40 -0
  58. package/types/src/anchorItems/index.d.ts +1 -0
  59. package/types/src/border/BorderPopupButton.d.ts +6 -6
  60. package/types/src/border/BorderStylePopupButton.d.ts +3 -3
  61. package/types/src/border/BorderTemplateIcon.d.ts +24 -0
  62. package/types/src/border/index.d.ts +1 -0
  63. package/types/src/color/ColorPanel.d.ts +8 -2
  64. package/types/src/color/ColorPopupButton.d.ts +2 -1
  65. package/types/src/command/NumberFormatQuickButtons.d.ts +32 -0
  66. package/types/src/command/PresetCellStylesCommandButton.d.ts +3 -3
  67. package/types/src/command/SheetZoomCommandButton.d.ts +4 -3
  68. package/types/src/comments/CommentCard.d.ts +41 -0
  69. package/types/src/comments/CommentsPlugin.d.ts +6 -0
  70. package/types/src/comments/CommentsTaskPane.d.ts +23 -0
  71. package/types/src/comments/index.d.ts +4 -0
  72. package/types/src/conditionalFormat/ConditionalFormatStylePicker.d.ts +4 -4
  73. package/types/src/conditionalFormat/IconPickerPopupButton.d.ts +2 -2
  74. package/types/src/conditionalFormat/IconSetRulePanel.d.ts +1 -1
  75. package/types/src/conditions/BetweenOption.d.ts +6 -1
  76. package/types/src/conditions/CombinatorOption.d.ts +7 -0
  77. package/types/src/conditions/ConditionEditor.d.ts +61 -4
  78. package/types/src/conditions/ConditionUtils.d.ts +65 -6
  79. package/types/src/conditions/ExpressionOption.d.ts +12 -6
  80. package/types/src/conditions/MembershipOption.d.ts +67 -0
  81. package/types/src/conditions/OperatorAndParamEditor.d.ts +36 -1
  82. package/types/src/conditions/ScalarOption.d.ts +25 -6
  83. package/types/src/conditions/SelectorSelect.d.ts +16 -7
  84. package/types/src/conditions/index.d.ts +1 -1
  85. package/types/src/conditions/useFormulaOption.d.ts +54 -0
  86. package/types/src/dataValidation/DataValidationDetailsPanel.d.ts +7 -1
  87. package/types/src/dataValidation/DataValidationDetailsTaskPane.d.ts +3 -2
  88. package/types/src/dataValidation/DataValidationEditorPanel.d.ts +13 -2
  89. package/types/src/dataValidation/DataValidationIcon.d.ts +22 -0
  90. package/types/src/dataValidation/DataValidationTitle.d.ts +13 -0
  91. package/types/src/dialog/FillSeriesDialog.d.ts +16 -0
  92. package/types/src/dialog/OutlineSettingsDialog.d.ts +12 -0
  93. package/types/src/dialog/TableNewDialog.d.ts +1 -4
  94. package/types/src/dialog/_ShortcutSearch.d.ts +26 -0
  95. package/types/src/dialog/index.d.ts +0 -2
  96. package/types/src/externalLink/ExternalLinkCardBody.d.ts +9 -0
  97. package/types/src/externalLink/ExternalLinkChip.d.ts +18 -0
  98. package/types/src/externalLink/ExternalLinkLocation.d.ts +18 -0
  99. package/types/src/externalLink/ExternalLinkSettingsTab.d.ts +18 -0
  100. package/types/src/externalLink/ExternalLinksPanel.d.ts +11 -0
  101. package/types/src/externalLink/ExternalLinksPlugin.d.ts +5 -0
  102. package/types/src/externalLink/ExternalLinksTaskPane.d.ts +19 -0
  103. package/types/src/externalLink/index.d.ts +8 -0
  104. package/types/src/fill/GradientEditor.d.ts +41 -0
  105. package/types/src/fill/GradientStopsBar.d.ts +43 -0
  106. package/types/src/fill/PatternPopupButton.d.ts +26 -0
  107. package/types/src/fill/PatternSwatch.d.ts +53 -0
  108. package/types/src/fill/index.d.ts +5 -0
  109. package/types/src/filter/ColumnMenu.d.ts +31 -1
  110. package/types/src/filter/index.d.ts +0 -1
  111. package/types/src/form/FormulaField.d.ts +35 -6
  112. package/types/src/form/InputField.d.ts +35 -5
  113. package/types/src/format/AlignmentPanel.d.ts +13 -0
  114. package/types/src/format/BorderPanel.d.ts +22 -0
  115. package/types/src/format/BorderPreview.d.ts +94 -0
  116. package/types/src/format/FillPanel.d.ts +65 -0
  117. package/types/src/format/FontPanel.d.ts +12 -0
  118. package/types/src/format/FormatCellPreview.d.ts +35 -0
  119. package/types/src/format/FormatPanelParts.d.ts +85 -0
  120. package/types/src/format/FormatPlugin.d.ts +11 -0
  121. package/types/src/format/FormatTaskPane.d.ts +39 -0
  122. package/types/src/format/LinePanel.d.ts +53 -0
  123. package/types/src/format/LinePreviews.d.ts +71 -0
  124. package/types/src/format/NumberFormatOption.d.ts +43 -0
  125. package/types/src/{numberFormat → format}/NumberFormatPanel.d.ts +20 -0
  126. package/types/src/format/index.d.ts +14 -0
  127. package/types/src/format/useFormatSelection.d.ts +93 -0
  128. package/types/src/formulaBar/IFormulaBar.d.ts +11 -0
  129. package/types/src/formulaBar/MobileFormulaBar.d.ts +21 -0
  130. package/types/src/formulaBar/MobileInputToolbar.d.ts +37 -0
  131. package/types/src/formulaBar/index.d.ts +3 -0
  132. package/types/src/formulaBar/useFormulaBarSession.d.ts +65 -0
  133. package/types/src/index.d.ts +7 -1
  134. package/types/src/itemsPanel/EditorCommit.d.ts +32 -0
  135. package/types/src/itemsPanel/EditorPanel.d.ts +4 -1
  136. package/types/src/itemsPanel/ItemCard.d.ts +60 -8
  137. package/types/src/itemsPanel/ItemsDescriptor.d.ts +68 -19
  138. package/types/src/itemsPanel/ItemsPanel.d.ts +9 -0
  139. package/types/src/itemsPanel/ItemsSearchField.d.ts +17 -0
  140. package/types/src/itemsPanel/index.d.ts +2 -0
  141. package/types/src/named/NamedDetailsPanel.d.ts +9 -2
  142. package/types/src/named/NamedDetailsTaskPane.d.ts +3 -2
  143. package/types/src/named/NamedEditorPanel.d.ts +1 -1
  144. package/types/src/named/NamedExpressionField.d.ts +32 -0
  145. package/types/src/named/NamedKindChip.d.ts +38 -0
  146. package/types/src/picture/PicturePlugin.d.ts +6 -0
  147. package/types/src/picture/index.d.ts +2 -0
  148. package/types/src/protectedRange/ProtectedRangeDetailsPanel.d.ts +6 -0
  149. package/types/src/protectedRange/ProtectedRangeDraft.d.ts +22 -0
  150. package/types/src/protectedRange/ProtectedRangeEditorPanel.d.ts +0 -14
  151. package/types/src/protectedRange/index.d.ts +2 -1
  152. package/types/src/protection/ManageProtectionTaskPane.d.ts +29 -0
  153. package/types/src/protection/PasswordDialog.d.ts +32 -0
  154. package/types/src/protection/PasswordField.d.ts +35 -0
  155. package/types/src/protection/ProtectedCellsPanel.d.ts +20 -0
  156. package/types/src/protection/ProtectionPlugin.d.ts +11 -0
  157. package/types/src/protection/SheetProtectionPanel.d.ts +35 -0
  158. package/types/src/protection/WorkbookProtectionPanel.d.ts +34 -15
  159. package/types/src/protection/WorkbookProtectionTab.d.ts +22 -0
  160. package/types/src/protection/index.d.ts +7 -1
  161. package/types/src/shape/InsertShapeCommandButton.d.ts +20 -0
  162. package/types/src/shape/ShapeFormatPanel.d.ts +11 -0
  163. package/types/src/shape/ShapePlugin.d.ts +6 -0
  164. package/types/src/shape/index.d.ts +3 -0
  165. package/types/src/slicer/PresetSlicerStylesCommandButton.d.ts +18 -0
  166. package/types/src/slicer/SlicerPlugin.d.ts +6 -0
  167. package/types/src/slicer/index.d.ts +3 -0
  168. package/types/src/statusBar/SheetZoomScale.d.ts +6 -0
  169. package/types/src/studio/CommandsWrapper.d.ts +5 -0
  170. package/types/src/studio/EagerStudio.d.ts +14 -1
  171. package/types/src/studio/StudioCommandProvider.d.ts +10 -0
  172. package/types/src/studio/StudioCommands.d.ts +40 -4
  173. package/types/src/studio/StudioProps.d.ts +64 -2
  174. package/types/src/studio/StudioSplitPane.d.ts +1 -1
  175. package/types/src/studio/formulaBarPlacement.d.ts +35 -0
  176. package/types/src/studio/splitStudioProps.d.ts +7 -0
  177. package/types/src/studio/useStudioApp.d.ts +31 -18
  178. package/types/src/template/TemplateCommands.d.ts +29 -0
  179. package/types/src/template/TemplateDialog.d.ts +19 -0
  180. package/types/src/template/TemplatePanel.d.ts +50 -0
  181. package/types/src/template/TemplateSearchField.d.ts +29 -0
  182. package/types/src/template/WelcomeDialog.d.ts +29 -0
  183. package/types/src/template/categoryColor.d.ts +8 -0
  184. package/types/src/template/index.d.ts +3 -0
  185. package/types/src/template/useTemplateCatalog.d.ts +71 -0
  186. package/types/src/toolbar/WorkbookToolbars.d.ts +1 -1
  187. package/types/src/workbook/DefaultRenderers.d.ts +15 -1
  188. package/types/src/workbook/FillMenu.d.ts +21 -0
  189. package/types/src/workbook/OutlineButtons.d.ts +11 -0
  190. package/types/src/workbook/WorkbookElement.d.ts +1 -1
  191. package/types/src/workbook/index.d.ts +1 -0
  192. package/browser/cjs/BQJKf40kttQWOzLw.cjs +0 -20
  193. package/browser/cjs/BTZ5uzK0wHzpiZGC.cjs +0 -1
  194. package/browser/cjs/B_D3JKseVvpRyX-E.cjs +0 -1
  195. package/browser/cjs/BeKpqOx8It0RD0Rf.cjs +0 -2
  196. package/browser/cjs/Bj-EvSYeDfqmU0V6.cjs +0 -2
  197. package/browser/cjs/Bo9Kx3L_XQkGPBJ5.cjs +0 -1
  198. package/browser/cjs/Bte6P3MhSjajJmmY.cjs +0 -7
  199. package/browser/cjs/C97KHSuikAbr1qVM.cjs +0 -1
  200. package/browser/cjs/CJLwX_A3y3TQUmzj.cjs +0 -1
  201. package/browser/cjs/CPSc2VSYZeZ1B9mi.cjs +0 -1
  202. package/browser/cjs/CPcBvw4ZPwHVTUZF.cjs +0 -1
  203. package/browser/cjs/CYxc8vnRi8dNpDPk.cjs +0 -1
  204. package/browser/cjs/CZm1jVZaHQ246prW.cjs +0 -1
  205. package/browser/cjs/CdDYyAfccXme8w6m.cjs +0 -1
  206. package/browser/cjs/Cm1APq2MraYNNhyI.cjs +0 -1
  207. package/browser/cjs/DO8V31Z1ewgMA1di.cjs +0 -5
  208. package/browser/cjs/Djsiad0Qha1Y-YaS.cjs +0 -1
  209. package/browser/cjs/IASAYG6qgv7lJY7y.cjs +0 -1
  210. package/browser/cjs/KZvriGbhEOVkQD0b.cjs +0 -1
  211. package/browser/cjs/UnMhi28mbvLiOXQe.cjs +0 -1
  212. package/browser/cjs/Vbigo0kFP3PFfmeA.cjs +0 -1
  213. package/browser/cjs/iMWEL01eC83oU-YY.cjs +0 -1
  214. package/browser/cjs/index.cjs +0 -2
  215. package/browser/cjs/w2GjebPlOFv3pCbm.cjs +0 -1
  216. package/browser/cjs/z0rB4fK6X1M6PpVD.cjs +0 -11
  217. package/browser/cjs/zQsyZpeXAvcVXJMs.cjs +0 -1
  218. package/browser/esm/6seXVm4fUaBp34tP.mjs +0 -217
  219. package/browser/esm/C1PiodbCgkhztxU5.mjs +0 -411
  220. package/browser/esm/C5XQW-A03GP8EZ3s.mjs +0 -52
  221. package/browser/esm/CZGRaL9mjYTo8fAd.mjs +0 -105
  222. package/browser/esm/DTWkitCkayiinpgU.mjs +0 -219
  223. package/browser/esm/DbHn3Fq4gYggsoXV.mjs +0 -5429
  224. package/browser/esm/DxBsD4nDbg_OWhYG.mjs +0 -47
  225. package/browser/esm/HZXAXZqrC43FBvGk.mjs +0 -82
  226. package/browser/esm/dgkVCh7lmm1Twqmo.mjs +0 -9257
  227. package/browser/esm/l5BsxVQszkPy_n34.mjs +0 -1150
  228. package/node/esm/-9Hcp_VKJtR9fWlC.mjs +0 -470
  229. package/node/esm/B-3Ypi8akR-GxIpw.mjs +0 -82
  230. package/node/esm/CbhFnQCOA5TjhFB1.mjs +0 -106
  231. package/node/esm/CxqL51jVpIL4ncWW.mjs +0 -47
  232. package/node/esm/D-x3LVzppkKf5be_.mjs +0 -4575
  233. package/types/src/conditionalFormat/ConditionalFormatRangeField.d.ts +0 -32
  234. package/types/src/conditions/DateTimeOption.d.ts +0 -43
  235. package/types/src/conditions/InSetOption.d.ts +0 -37
  236. package/types/src/dialog/CommentsDialog.d.ts +0 -11
  237. package/types/src/dialog/NumberFormatDialog.d.ts +0 -12
  238. package/types/src/filter/FilterList.d.ts +0 -28
  239. package/types/src/numberFormat/NumberFormatTaskPane.d.ts +0 -12
  240. package/types/src/numberFormat/index.d.ts +0 -8
  241. package/types/src/protectedRange/ProtectedRangeDetailsTaskPane.d.ts +0 -3
  242. package/types/src/protectedRange/ProtectedRangePlugin.d.ts +0 -2
  243. package/types/src/protection/WorkbookProtectionDialog.d.ts +0 -23
@@ -1,21 +1,61 @@
1
1
  /**
2
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.28-beta.4
2
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.10
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 o, { useCallback as s, useEffect as c, useMemo as l, useRef as u, useState as d } from "react";
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 g, Chip as ee, DialogContent as _, FormControlLabel as te, IconButton as v, InputAdornment as y, TextField as ne, Tooltip as b, Typography as x, emphasize as S } from "@mui/material";
12
- import { CommonUtils as C, TimerUtils as re } from "@sheetxl/utils";
13
- var ie = (e) => e.replace(/\n\n+/g, "\n").trim(), ae = /* @__PURE__ */ new Set([
11
+ import { Box as h, Checkbox as g, Chip as te, DialogContent as _, FormControlLabel as ne, IconButton as v, InputAdornment as y, TextField as re, Tooltip as ie, Typography as b, emphasize as x } from "@mui/material";
12
+ import { CommonUtils as S, TimerUtils as ae } from "@sheetxl/utils";
13
+ var C = /* @__PURE__ */ new Set([
14
+ "a",
15
+ "e",
16
+ "i",
17
+ "o",
18
+ "u",
19
+ "y"
20
+ ]), w = (e) => e ? e.replace(/(\p{Ll})(\p{Lu})/gu, "$1 $2").toLowerCase().split(/[^\p{L}\p{N}]+/u).filter((e) => e.length > 0) : [], T = (e, t) => {
21
+ let n = e.length + 1, r = t.length + 1, i = [];
22
+ for (let e = 0; e < n; e++) i.push(Array(r).fill(0)), i[e][0] = e;
23
+ for (let e = 0; e < r; e++) i[0][e] = e;
24
+ for (let a = 1; a < n; a++) for (let n = 1; n < r; n++) {
25
+ let r = e[a - 1] === t[n - 1] ? 0 : 1, o = Math.min(i[a - 1][n] + 1, i[a][n - 1] + 1, i[a - 1][n - 1] + r);
26
+ a > 1 && n > 1 && e[a - 1] === t[n - 2] && e[a - 2] === t[n - 1] && (o = Math.min(o, i[a - 2][n - 2] + 1)), i[a][n] = o;
27
+ }
28
+ return i[n - 1][r - 1];
29
+ }, E = (e, t) => {
30
+ let n = e.length;
31
+ if (n < 4 || t.length < n - 1) return -1;
32
+ let r = e[n - 1];
33
+ if (!C.has(r) && !t.includes(r)) return -1;
34
+ let i = n >= 8 ? 2 : 1, a = -1;
35
+ for (let r = n - 1; r <= Math.min(n + 1, t.length); r++) {
36
+ let n = T(e, t.slice(0, r));
37
+ n <= i && (a === -1 || n < a) && (a = n);
38
+ }
39
+ return a;
40
+ }, oe = (e, t) => {
41
+ let n = (t) => t.some((t) => t.startsWith(e));
42
+ return n(t.label) ? 3 : n(t.scope) ? 2 : +!!n(t.description);
43
+ }, se = (e, t) => {
44
+ let n = (t, n) => {
45
+ let r = 0;
46
+ for (let i of t) {
47
+ let t = E(e, i);
48
+ t >= 0 && (r = Math.max(r, n / (1 + t)));
49
+ }
50
+ return r;
51
+ };
52
+ return Math.max(n(t.label, 3), n(t.scope, 2));
53
+ }, ce = (e) => e.replace(/\n\n+/g, "\n").trim(), le = /* @__PURE__ */ new Set([
14
54
  "Control",
15
55
  "Shift",
16
56
  "Alt",
17
57
  "Meta"
18
- ]), w = (e) => {
58
+ ]), D = (e) => {
19
59
  let t = e, n = /* @__PURE__ */ new Set();
20
60
  for (let e of [
21
61
  "mod",
@@ -26,26 +66,26 @@ var ie = (e) => e.replace(/\n\n+/g, "\n").trim(), ae = /* @__PURE__ */ new Set([
26
66
  key: t,
27
67
  mods: n
28
68
  };
29
- }, T = C.getPlatform() === C.OSType.MacOS || C.getPlatform() === C.OSType.IOS, E = [
69
+ }, O = S.getPlatform() === S.OSType.MacOS || S.getPlatform() === S.OSType.IOS, k = [
30
70
  n.Ctrl,
31
71
  n.Alt,
32
72
  n.Shift,
33
73
  n.Meta
34
- ], D = (e) => {
74
+ ], A = (e) => {
35
75
  switch (e) {
36
- case n.Ctrl: return T ? "Cmd" : "Ctrl";
76
+ case n.Ctrl: return O ? "Cmd" : "Ctrl";
37
77
  case n.Alt: return "Alt";
38
78
  case n.Shift: return "Shift";
39
79
  case n.Meta: return "Meta";
40
80
  default: return e;
41
81
  }
42
- }, O = (e) => {
82
+ }, j = (e) => {
43
83
  let t = new Set(e);
44
- return E.filter((e) => t.has(e));
45
- }, k = (e) => {
84
+ return k.filter((e) => t.has(e));
85
+ }, M = (e) => {
46
86
  let t = [];
47
87
  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
- }, A = ({ children: e }) => p(h, {
88
+ }, N = ({ children: e }) => p(h, {
49
89
  component: "kbd",
50
90
  sx: {
51
91
  display: "inline-flex",
@@ -62,34 +102,34 @@ var ie = (e) => e.replace(/\n\n+/g, "\n").trim(), ae = /* @__PURE__ */ new Set([
62
102
  whiteSpace: "nowrap",
63
103
  borderRadius: "5px",
64
104
  color: (e) => e.palette.text.secondary,
65
- backgroundColor: (e) => S(e.palette.background.paper, .07),
105
+ backgroundColor: (e) => x(e.palette.background.paper, .07),
66
106
  border: (e) => `solid 1px ${e.palette.divider}`,
67
107
  borderBottomWidth: "2px"
68
108
  },
69
109
  children: e
70
- }), j = () => p(h, {
110
+ }), P = () => p(h, {
71
111
  component: "span",
72
112
  sx: {
73
113
  fontSize: "0.7rem",
74
114
  color: (e) => e.palette.text.disabled
75
115
  },
76
116
  children: "+"
77
- }), M = ({ labels: e, dangling: t = !1 }) => m(h, {
117
+ }), F = ({ labels: e, dangling: t = !1 }) => m(h, {
78
118
  sx: {
79
119
  display: "flex",
80
120
  alignItems: "center",
81
121
  gap: "1px"
82
122
  },
83
- children: [e.map((e, t) => m(o.Fragment, { children: [t > 0 && p(j, {}), p(A, { children: e })] }, t)), t && p(j, {})]
84
- }), N = ({ stroke: e }) => {
123
+ children: [e.map((e, t) => m(s.Fragment, { children: [t > 0 && p(P, {}), p(N, { children: e })] }, t)), t && p(P, {})]
124
+ }), I = ({ stroke: e }) => {
85
125
  if (!e?.key) return null;
86
- let t = O(e.modifiers ?? []).map(D);
87
- return t.push(r.toPrettyKeyCode(e.key)), p(M, { labels: t });
126
+ let t = j(e.modifiers ?? []).map(A);
127
+ return t.push(r.toPrettyKeyCode(e.key)), p(F, { labels: t });
88
128
  };
89
- function P(n) {
90
- let { commands: r, sx: o, ...f } = n, [_, C] = d(!1), [E, A] = d(""), [j, P] = d(null), [F, I] = d(!1), [L, R] = d(null), [z, B] = d(null), [V, H] = d(null), U = u(null), W = l(() => {
129
+ function L(n) {
130
+ let { commands: r, sx: s, ...f } = n, _ = o(), [S, C] = d(!1), [T, E] = d(""), [k, N] = d(null), [P, L] = d(!1), [R, z] = d(null), [B, V] = d(null), [H, U] = d(null), W = ee(null), G = u(() => {
91
131
  let e = r.getAllCommands();
92
- _ && (e = e.filter((e) => e.command.getShortcut())), e = [...e].sort((e, t) => {
132
+ S && (e = e.filter((e) => e.command.getShortcut())), e = [...e].sort((e, t) => {
93
133
  let n = e.command.getScope?.() ?? e.groupKey, r = t.command.getScope?.() ?? t.groupKey, i = n.localeCompare(r);
94
134
  return i === 0 ? e.command.getLabel().localeCompare(t.command.getLabel()) : i;
95
135
  });
@@ -100,7 +140,7 @@ function P(n) {
100
140
  icon: e.getIcon(),
101
141
  scope: i,
102
142
  scopeLabel: e.getScopeLabel?.() ?? i,
103
- description: ie(e.getDescription())
143
+ description: ce(e.getDescription())
104
144
  }, s = e.getShortcut(), c = Array.isArray(s) ? s.length ? s : [null] : [s ?? null];
105
145
  for (let e of c) {
106
146
  let r = e ? a(e) : null, s = `${i}\0${o.label}\0${r ?? ""}`;
@@ -113,45 +153,54 @@ function P(n) {
113
153
  }
114
154
  }
115
155
  return t;
116
- }, [_, r]), G = l(() => j ? W.filter((e) => e.scope === j) : W, [W, j]), [K, q] = d(null);
117
- c(() => {
118
- let e = !1;
119
- return import("./l5BsxVQszkPy_n34.mjs").then((t) => {
120
- e || q(new t.default(G, {
121
- threshold: .3,
122
- ignoreLocation: !0,
123
- keys: [
124
- "label",
125
- "description",
126
- "scope",
127
- "scopeLabel"
128
- ]
129
- }));
130
- }), () => {
131
- e = !0;
156
+ }, [S, r]), K = u(() => k ? G.filter((e) => e.scope === k) : G, [G, k]), q = u(() => ((e) => {
157
+ let t = e.map((e) => ({
158
+ item: e,
159
+ label: w(e.label),
160
+ scope: [...w(e.scope), ...w(e.scopeLabel)],
161
+ description: w(e.description)
162
+ })), n = (e, n) => {
163
+ let r = [];
164
+ return t.forEach((t, i) => {
165
+ let a = 0;
166
+ for (let r of e) {
167
+ let e = oe(r, t);
168
+ if (e === 0 && n && (e = se(r, t)), e === 0) return;
169
+ a += e;
170
+ }
171
+ r.push({
172
+ item: t.item,
173
+ score: a,
174
+ order: i
175
+ });
176
+ }), r.sort((e, t) => t.score - e.score || e.order - t.order), r.map((e) => e.item);
177
+ };
178
+ return (t) => {
179
+ let r = w(t);
180
+ if (r.length === 0) return [...e];
181
+ let i = n(r, !1);
182
+ return i.length > 0 ? i : n(r, !0);
132
183
  };
133
- }, [G]);
134
- let [J, Y] = d(W);
135
- c(() => {
136
- if (F) return z ? void Y(G.filter((e) => {
184
+ })(K), [K]), [J, Y] = d(G);
185
+ l(() => {
186
+ if (P) return B ? void Y(K.filter((e) => {
137
187
  if (!e.canonical) return !1;
138
- let t = w(e.canonical);
139
- if (!z.keys.has(t.key)) return !1;
140
- for (let e of z.mods) if (!t.mods.has(e)) return !1;
188
+ let t = D(e.canonical);
189
+ if (!B.keys.has(t.key)) return !1;
190
+ for (let e of B.mods) if (!t.mods.has(e)) return !1;
141
191
  return !0;
142
- })) : void Y(G);
143
- K ? re.debounce(() => {
144
- let e = E.trim();
145
- e.length === 0 ? Y(G) : Y(K.search(e).map((e) => e.item));
146
- }, 90)() : Y(G);
192
+ })) : void Y(K);
193
+ ae.debounce(() => {
194
+ Y(q(T));
195
+ }, 90)();
147
196
  }, [
148
- F,
149
- z,
150
- K,
151
- E,
152
- G
197
+ P,
198
+ B,
199
+ q,
200
+ T,
201
+ K
153
202
  ]);
154
- let X = l(() => {
203
+ let X = u(() => {
155
204
  let e = /* @__PURE__ */ new Map();
156
205
  for (let t of J) {
157
206
  let n = e.get(t.scope);
@@ -162,19 +211,19 @@ function P(n) {
162
211
  scopeLabel: t[0].scopeLabel,
163
212
  rows: t
164
213
  }));
165
- }, [J]), oe = l(() => W.find((e) => e.scope === j)?.scopeLabel ?? j, [W, j]), Z = F ? !!L : E.length > 0, Q = Z && J.length === 0;
166
- c(() => {
167
- U.current?.focus();
168
- }, [F]);
169
- let $ = s((e) => {
170
- I(e), A(""), R(null), B(null), H(null);
171
- }, []), se = s((e) => {
214
+ }, [J]), ue = u(() => G.find((e) => e.scope === k)?.scopeLabel ?? k, [G, k]), Z = P ? !!R : T.length > 0, Q = Z && J.length === 0;
215
+ l(() => {
216
+ W.current?.focus();
217
+ }, [P]);
218
+ let $ = c((e) => {
219
+ L(e), E(""), z(null), V(null), U(null);
220
+ }, []), de = c((e) => {
172
221
  if (e.key === "Tab") return;
173
- if (e.which === t.Escape) return L || V ? (R(null), B(null), H(null)) : $(!1), e.stopPropagation(), void e.preventDefault();
174
- if (e.preventDefault(), e.stopPropagation(), e.key === "Backspace") return R(null), B(null), void H(null);
222
+ if (e.which === t.Escape) return R || H ? (z(null), V(null), U(null)) : $(!1), e.stopPropagation(), void e.preventDefault();
223
+ if (e.preventDefault(), e.stopPropagation(), e.key === "Backspace") return z(null), V(null), void U(null);
175
224
  let n = e.nativeEvent;
176
- if (ae.has(e.key)) return R(null), B(null), void H(k(n));
177
- H(null), R(((e) => {
225
+ if (le.has(e.key)) return z(null), V(null), void U(M(n));
226
+ U(null), z(((e) => {
178
227
  let t = [];
179
228
  e.ctrlKey && t.push("ctrl"), e.altKey && t.push("alt"), e.shiftKey && t.push("shift"), e.metaKey && t.push("meta");
180
229
  let n = e.code, r = e.key;
@@ -182,34 +231,34 @@ function P(n) {
182
231
  key: r,
183
232
  modifiers: t
184
233
  };
185
- })(n)), B(((e) => {
186
- let t = [...i(e)].map(w);
234
+ })(n)), V(((e) => {
235
+ let t = [...i(e)].map(D);
187
236
  return {
188
237
  keys: new Set(t.map((e) => e.key)),
189
238
  mods: t[0]?.mods ?? /* @__PURE__ */ new Set()
190
239
  };
191
240
  })(n));
192
241
  }, [
193
- L,
194
- V,
242
+ R,
243
+ H,
195
244
  $
196
- ]), ce = s((e) => {
197
- if (L) return;
198
- let t = k(e.nativeEvent);
199
- H(t.length ? t : null);
200
- }, [L]), le = s((e) => {
201
- P((t) => t === e ? null : e);
202
- }, []), ue = s(() => {
203
- F ? (R(null), B(null), H(null)) : A(""), U.current?.focus();
204
- }, [F]), de = F ? !!(L || V && V.length > 0) : E.length > 0, fe = p(b, {
205
- title: F ? "Search by name (ESC)" : `Search by shortcut (${T ? "Cmd" : "Ctrl"}+K)`,
245
+ ]), fe = c((e) => {
246
+ if (R) return;
247
+ let t = M(e.nativeEvent);
248
+ U(t.length ? t : null);
249
+ }, [R]), pe = c((e) => {
250
+ N((t) => t === e ? null : e);
251
+ }, []), me = c(() => {
252
+ P ? (z(null), V(null), U(null)) : E(""), W.current?.focus();
253
+ }, [P]), he = P ? !!(R || H && H.length > 0) : T.length > 0, ge = p(ie, {
254
+ title: P ? "Search by name (ESC)" : `Search by shortcut (${O ? "Cmd" : "Ctrl"}+K)`,
206
255
  children: p(v, {
207
256
  "aria-label": "toggle shortcut capture",
208
- color: F ? "primary" : "default",
209
- onClick: () => $(!F),
257
+ color: P ? "primary" : "default",
258
+ onClick: () => $(!P),
210
259
  sx: {
211
260
  flexShrink: 0,
212
- border: (e) => `solid 1px ${F ? e.palette.primary.main : e.palette.divider}`,
261
+ border: (e) => `solid 1px ${P ? e.palette.primary.main : e.palette.divider}`,
213
262
  borderRadius: (e) => `${e.shape.borderRadius}px`
214
263
  },
215
264
  children: p(e, { iconKey: "Keyboard" })
@@ -222,7 +271,7 @@ function P(n) {
222
271
  display: "flex",
223
272
  flexDirection: "column"
224
273
  },
225
- sx: [{ fontFamily: (e) => e.typography.fontFamily }, ...Array.isArray(o) ? o : [o]],
274
+ sx: [{ fontFamily: (e) => e.typography.fontFamily }, ...Array.isArray(s) ? s : [s]],
226
275
  ...f,
227
276
  children: [
228
277
  m(h, {
@@ -233,24 +282,24 @@ function P(n) {
233
282
  marginBottom: (e) => e.spacing(1.5)
234
283
  },
235
284
  children: [
236
- p(ne, {
237
- inputRef: U,
285
+ p(re, {
286
+ inputRef: W,
238
287
  slotProps: {
239
288
  input: {
240
289
  sx: { backgroundColor: (e) => e.palette.action.hover },
241
- startAdornment: F && (L || V && V.length > 0) ? p(y, {
290
+ startAdornment: P && (R || H && H.length > 0) ? p(y, {
242
291
  position: "start",
243
292
  sx: { marginRight: "6px" },
244
- children: L ? p(N, { stroke: L }) : p(M, {
245
- labels: O(V).map(D),
293
+ children: R ? p(I, { stroke: R }) : p(F, {
294
+ labels: j(H).map(A),
246
295
  dangling: !0
247
296
  })
248
297
  }) : void 0,
249
- endAdornment: de ? p(y, {
298
+ endAdornment: he ? p(y, {
250
299
  position: "end",
251
300
  children: p(v, {
252
- "aria-label": F ? "clear shortcut" : "clear search",
253
- onClick: ue,
301
+ "aria-label": P ? "clear shortcut" : "clear search",
302
+ onClick: me,
254
303
  edge: "end",
255
304
  size: "small",
256
305
  children: p(e, { iconKey: "Close" })
@@ -261,55 +310,55 @@ function P(n) {
261
310
  className: "input",
262
311
  autoFocus: !0,
263
312
  spellCheck: !1,
264
- placeholder: F ? L || V && V.length > 0 ? "" : "Press a shortcut… (Esc to exit)" : "Type to search commands, scopes, or descriptions",
313
+ placeholder: P ? R || H && H.length > 0 ? "" : "Press a shortcut… (Esc to exit)" : "Type to search commands, scopes, or descriptions",
265
314
  autoComplete: "off",
266
- "aria-label": F ? "Press a shortcut to find its command" : "Search commands",
315
+ "aria-label": P ? "Press a shortcut to find its command" : "Search commands",
267
316
  sx: {
268
317
  paddingTop: (e) => e.spacing(1),
269
318
  paddingBottom: (e) => e.spacing(1),
270
- caretColor: (e) => F ? e.palette.primary.main : void 0
319
+ caretColor: (e) => P ? e.palette.primary.main : void 0
271
320
  }
272
321
  }
273
322
  },
274
323
  sx: {
275
324
  flex: "1 1 auto",
276
- "& .MuiOutlinedInput-notchedOutline": { borderColor: (e) => Q ? `${e.palette.error.main} !important` : F ? `${e.palette.primary.main} !important` : void 0 }
325
+ "& .MuiOutlinedInput-notchedOutline": { borderColor: (e) => Q ? `${e.palette.error.main} !important` : P ? `${e.palette.primary.main} !important` : void 0 }
277
326
  },
278
- value: F ? "" : E,
327
+ value: P ? "" : T,
279
328
  onChange: (e) => {
280
- F || A(e.target.value);
329
+ P || E(e.target.value);
281
330
  },
282
- onKeyDown: F ? se : (e) => {
331
+ onKeyDown: P ? de : (e) => {
283
332
  if ((e.ctrlKey || e.metaKey) && (e.key === "k" || e.key === "K")) return $(!0), e.stopPropagation(), void e.preventDefault();
284
- e.which === t.Escape && E.length > 0 && (A(""), e.stopPropagation(), e.preventDefault());
333
+ e.which === t.Escape && T.length > 0 && (E(""), e.stopPropagation(), e.preventDefault());
285
334
  },
286
- onKeyUp: F ? ce : void 0,
335
+ onKeyUp: P ? fe : void 0,
287
336
  onContextMenu: (e) => e.stopPropagation()
288
337
  }),
289
- fe,
290
- p(te, {
338
+ ge,
339
+ p(ne, {
291
340
  sx: {
292
341
  flexShrink: 0,
293
342
  marginRight: 0
294
343
  },
295
344
  control: p(g, {
296
- checked: _,
297
- onChange: () => C(!_)
345
+ checked: S,
346
+ onChange: () => C(!S)
298
347
  }),
299
- label: "With key bindings",
348
+ label: _("shortcutKeys.onlyKeyBindings"),
300
349
  labelPlacement: "start"
301
350
  })
302
351
  ]
303
352
  }),
304
- j && p(h, {
353
+ k && p(h, {
305
354
  sx: {
306
355
  display: "flex",
307
356
  marginBottom: 1
308
357
  },
309
- children: p(ee, {
358
+ children: p(te, {
310
359
  size: "small",
311
- label: `Scope: ${oe}`,
312
- onDelete: () => P(null)
360
+ label: _("shortcutKeys.scopeFilter", { scope: ue }),
361
+ onDelete: () => N(null)
313
362
  })
314
363
  }),
315
364
  p(h, {
@@ -331,9 +380,9 @@ function P(n) {
331
380
  textAlign: "center",
332
381
  color: (e) => Q ? e.palette.error.main : e.palette.text.secondary
333
382
  },
334
- children: Z ? "No matching shortcuts" : "No shortcuts"
383
+ children: _(Z ? "shortcutKeys.noMatches" : "shortcutKeys.none")
335
384
  }) : X.map((t) => m(h, { children: [m(h, {
336
- onClick: () => le(t.scope),
385
+ onClick: () => pe(t.scope),
337
386
  sx: {
338
387
  position: "sticky",
339
388
  top: "-1px",
@@ -351,16 +400,16 @@ function P(n) {
351
400
  fontWeight: 600,
352
401
  letterSpacing: "0.04em",
353
402
  textTransform: "uppercase",
354
- backgroundColor: (e) => S(e.palette.background.paper, .04),
355
- boxShadow: (e) => `0 -2px 0 0 ${S(e.palette.background.paper, .04)}`,
403
+ backgroundColor: (e) => x(e.palette.background.paper, .04),
404
+ boxShadow: (e) => `0 -2px 0 0 ${x(e.palette.background.paper, .04)}`,
356
405
  borderBottom: (e) => `solid 1px ${e.palette.divider}`,
357
- color: (e) => j === t.scope ? e.palette.primary.main : e.palette.text.secondary,
406
+ color: (e) => k === t.scope ? e.palette.primary.main : e.palette.text.secondary,
358
407
  "&:hover": {
359
408
  color: (e) => e.palette.text.primary,
360
- backgroundColor: (e) => S(e.palette.background.paper, .09)
409
+ backgroundColor: (e) => x(e.palette.background.paper, .09)
361
410
  }
362
411
  },
363
- children: [p("span", { children: t.scopeLabel }), p(x, {
412
+ children: [p("span", { children: t.scopeLabel }), p(b, {
364
413
  component: "span",
365
414
  sx: {
366
415
  fontSize: "inherit",
@@ -394,7 +443,7 @@ function P(n) {
394
443
  },
395
444
  children: (n = t.icon, n && typeof n != "string" ? n : p(e, { iconKey: n }))
396
445
  }),
397
- p(x, {
446
+ p(b, {
398
447
  sx: {
399
448
  flex: "1 1 auto",
400
449
  fontWeight: 500
@@ -403,10 +452,10 @@ function P(n) {
403
452
  }),
404
453
  t.shortcut && p(h, {
405
454
  sx: { flexShrink: 0 },
406
- children: p(N, { stroke: t.shortcut })
455
+ children: p(I, { stroke: t.shortcut })
407
456
  })
408
457
  ]
409
- }), t.description && p(x, {
458
+ }), t.description && p(b, {
410
459
  component: "div",
411
460
  sx: {
412
461
  marginTop: "2px",
@@ -432,17 +481,17 @@ function P(n) {
432
481
  userSelect: "none",
433
482
  justifyContent: "flex-end"
434
483
  },
435
- children: p(x, {
484
+ children: p(b, {
436
485
  noWrap: !0,
437
486
  component: "div",
438
487
  sx: { color: (e) => Q ? e.palette.error.main : e.palette.text.secondary },
439
- children: `${J.length === 0 ? "No" : J.length} shortcut${J.length === 1 ? "" : "s"}${Z ? " found" : ""}`
488
+ children: _(Z ? "shortcutKeys.countFound" : "shortcutKeys.count", { count: J.length })
440
489
  })
441
490
  })
442
491
  ]
443
492
  });
444
493
  }
445
- var F = (e) => {
494
+ var R = (e) => {
446
495
  let { title: n = "Shortcut Keys", commands: r, sx: i, ...a } = e;
447
496
  return p(f, {
448
497
  isModal: !0,
@@ -458,11 +507,11 @@ var F = (e) => {
458
507
  ...a,
459
508
  children: p(_, {
460
509
  dividers: !0,
461
- children: p(P, {
510
+ children: p(L, {
462
511
  commands: r,
463
512
  sx: { marginBottom: "8px" }
464
513
  })
465
514
  })
466
515
  });
467
516
  };
468
- export { F as default };
517
+ export { R as default };