@sheetxl/studio-mui 0.8.0-beta.10 → 0.8.0-beta.12

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 (150) hide show
  1. package/browser/esm/{ByeL_BZuJ2kl8gtf.mjs → 0IBZhOJaVmzJxuTv.mjs} +1 -1
  2. package/browser/esm/2nRxqrNYbmEn8fS8.mjs +386 -0
  3. package/browser/esm/{fb126BNj3F8URR19.mjs → 7fVZXXuonYb6Z7FU.mjs} +3 -3
  4. package/browser/esm/BAzhmMX4Fk_qnUTp.mjs +414 -0
  5. package/browser/esm/BGL3x0W74D7qZXlf.mjs +318 -0
  6. package/browser/esm/BHGr2gsFofTdAFxq.mjs +515 -0
  7. package/browser/esm/{DU3J8Gcf-WpBxNYg.mjs → BKhcJI-G15D3kGap.mjs} +4 -4
  8. package/browser/esm/BNbub9weuqm3mcoF.mjs +335 -0
  9. package/browser/esm/BSv9MVJaz1DVEffm.mjs +975 -0
  10. package/browser/esm/BWfLpYmd3cSgJ0C6.mjs +141 -0
  11. package/browser/esm/BZqwbIE8qzjSOYcJ.mjs +582 -0
  12. package/browser/esm/BZy9xUrYpAtnKeji.mjs +1288 -0
  13. package/browser/esm/{CIu1bjPJe_x31Oww.mjs → BnkwC5rsg9LZyhoP.mjs} +3 -3
  14. package/browser/esm/BpJsBv413cNQpyg0.mjs +319 -0
  15. package/browser/esm/BpVrgbVISiTDyFR3.mjs +197 -0
  16. package/browser/esm/BsngRDhvVYGVBJeK.mjs +1546 -0
  17. package/browser/esm/{C1Rp2hZrApo5MUc8.mjs → C29TKq47CbXs652l.mjs} +2 -2
  18. package/browser/esm/{CEvZe2cZK-voZTif.mjs → C8p2iMad_NNCwGI_.mjs} +5 -5
  19. package/browser/esm/CBzXksWnb-1gGEWZ.mjs +212 -0
  20. package/browser/esm/{IQLeaAbtGTipUsOD.mjs → CFIAWgpU3UyepLBn.mjs} +25 -24
  21. package/browser/esm/CJD4jF4m9cBGHzr_.mjs +31 -0
  22. package/browser/esm/{CjznclrKqJRi7u9O.mjs → CMc7G7cevxzPGxr9.mjs} +2 -2
  23. package/browser/esm/{B1Yp_uy1vFHcJB3U.mjs → CYtULLhY9M2m3DeH.mjs} +1 -1
  24. package/browser/esm/CeF35ZeFP28Do5Zx.mjs +1379 -0
  25. package/browser/esm/{xKiLJKiLxto8SayF.mjs → CjYKDxU4EP2Kf_vo.mjs} +2 -2
  26. package/browser/esm/{D8al_cJ4U-NgzwoK.mjs → Cq82lvdjyBvlJ8xJ.mjs} +19 -17
  27. package/browser/esm/{X1Db3b_7b_7OuCk6.mjs → CuRxFAO42JkQvMEx.mjs} +1 -1
  28. package/browser/esm/Cvk2yY90hpgXWMAt.mjs +103 -0
  29. package/browser/esm/D0slJycx3nq53qmf.mjs +14 -0
  30. package/browser/esm/{9eKCkvqpMQwqcXiw.mjs → D2jzliMwAo2ENpfi.mjs} +1 -1
  31. package/browser/esm/D5Fn0Hqllwv5HY6i.mjs +7581 -0
  32. package/browser/esm/D5N4nGaZsXtrHAOh.mjs +831 -0
  33. package/browser/esm/D7AqPfyhMiuda5l5.mjs +412 -0
  34. package/browser/esm/DHZA48ZMCETvHmeP.mjs +161 -0
  35. package/browser/esm/DX2_vf7WX6uRLaOZ.mjs +94 -0
  36. package/browser/esm/DaxpbAF1ShkT7hNU.mjs +490 -0
  37. package/browser/esm/{D6S8kVTzOjCn0-SK.mjs → Db3oHfXiRtcH015t.mjs} +162 -156
  38. package/browser/esm/Dt47Huh1l3C4_5_w.mjs +87 -0
  39. package/browser/esm/{DmCQbW4zwkT_Rq88.mjs → DtPt0phL7m56YfHZ.mjs} +1 -1
  40. package/browser/esm/{CoSiOS-og0zFw4Ws.mjs → DtTDaXmnWUoG4VBO.mjs} +2 -2
  41. package/browser/esm/{DHY19rkSiiRZxShC.mjs → DuuyN4-7K6_io2Py.mjs} +3 -3
  42. package/browser/esm/{yZxC4qUENOlMhVUH.mjs → NeGeLF3gbGMZyV6E.mjs} +1 -1
  43. package/browser/esm/PY3Br5Bo_TxcCnCU.mjs +252 -0
  44. package/browser/esm/WIhvQtBkGiw-oFUs.mjs +2566 -0
  45. package/browser/esm/WgIvwAENeO8LANax.mjs +437 -0
  46. package/browser/esm/{DBtc4lku0uHVcqWn.mjs → Yjq3p_7eVGFw2Jod.mjs} +3 -3
  47. package/browser/esm/index.mjs +1053 -192
  48. package/browser/esm/jFRFCWlkD7Dsrhkh.mjs +236 -0
  49. package/browser/esm/lKXEDVt2ow1NlWJj.mjs +392 -0
  50. package/browser/esm/{Blaj2R5hYxtLAW__.mjs → oC0OwOddhOD0OoCJ.mjs} +6 -6
  51. package/browser/esm/{sFOAxZpxXo-qvDSp.mjs → tIKqpsA0vNXH9EgU.mjs} +1 -1
  52. package/browser/esm/{5cbK03T_Oh3tNdR7.mjs → u84rSnESjxqB6gay.mjs} +1 -1
  53. package/licenses/dependencies.txt +94 -94
  54. package/node/esm/{BcwMb6CyVfvEwbHn.mjs → B8Ls4Eh1k8-Yiry_.mjs} +1 -1
  55. package/node/esm/{CKu1AtRgyltyEdEN.mjs → B9X3n8MglL4OitAV.mjs} +1 -1
  56. package/node/esm/{ETK6T6G0SIcFXDe5.mjs → BBGoyqs2L_ccSH1e.mjs} +40 -40
  57. package/node/esm/BLv99aovW4R3C5PE.mjs +515 -0
  58. package/node/esm/BUGU_5lUtnCRlp3n.mjs +519 -0
  59. package/node/esm/BalROFG_oa9PFs9Q.mjs +141 -0
  60. package/node/esm/{ah3CUg4-VmNstGk_.mjs → BqVxnA1mo52ubjdf.mjs} +2 -2
  61. package/node/esm/C3FCh9xju2SccUIE.mjs +1283 -0
  62. package/node/esm/{Bb1sLMqXWKjdve23.mjs → C4F6WY8M4nkLyxdb.mjs} +2 -2
  63. package/node/esm/CKWeipCqqpLnLE5e.mjs +391 -0
  64. package/node/esm/CTnVNfz4eqFnM92M.mjs +212 -0
  65. package/node/esm/Cfi_ly8fBDZZdiZT.mjs +72 -0
  66. package/node/esm/CgKa6JuyJ1tTodev.mjs +1703 -0
  67. package/node/esm/{cqzp431iNSLWictb.mjs → Cq53M7bAUSXMNq1f.mjs} +22 -22
  68. package/node/esm/{BYsG3KYVmxSe_CIQ.mjs → Cr8AYWUoU-XVt0hu.mjs} +1 -1
  69. package/node/esm/CyuOE595I2e-U4cG.mjs +236 -0
  70. package/node/esm/D72CupF9mfy2D1Xa.mjs +94 -0
  71. package/node/esm/{DNSjK5DAH3M14Qbc.mjs → DGDHFK8okuVbRCe5.mjs} +1 -1
  72. package/node/esm/{B8SQfjKjzYHLxzZR.mjs → DJFkALt4XrwkMbnU.mjs} +163 -157
  73. package/node/esm/DJpwI8PlKBI2rk0r.mjs +319 -0
  74. package/node/esm/{DZzvTQxIKr9LbEsA.mjs → DQaGPUYbgL4Y5YZW.mjs} +32 -30
  75. package/node/esm/{D9rzScOA9pEYFrtz.mjs → DsNYnq4NtYBxPmeA.mjs} +20 -20
  76. package/node/esm/DygDgOpa9sJ6YFVS.mjs +385 -0
  77. package/node/esm/Dz0Hg87UcJ-awwiI.mjs +489 -0
  78. package/node/esm/M7YxvRPGCuxuk9aK.mjs +142 -0
  79. package/node/esm/QNjtpX8rIpqGGLEJ.mjs +1379 -0
  80. package/node/esm/{B_jRGdwGFkudwmL-.mjs → ZzvsynJTCSuChYS-.mjs} +1 -1
  81. package/node/esm/{ci8d-mF1H9wnYzix.mjs → di_8-pXh90j4BO4j.mjs} +1 -1
  82. package/node/esm/dm8dmEaTIqfmgyeL.mjs +412 -0
  83. package/node/esm/{D6oQL8knsPpgdXuk.mjs → fmya3XQnTGyQisvT.mjs} +2 -2
  84. package/node/esm/gPYAb_A0T5ZwcQ1E.mjs +318 -0
  85. package/node/esm/index.mjs +8915 -13417
  86. package/node/esm/wB8xMpyJ_NvE16yG.mjs +975 -0
  87. package/node/esm/zGAcd4Jr7wkvXDBS.mjs +197 -0
  88. package/package.json +9 -9
  89. package/resources/locales/de/groups.cmd.json +4 -0
  90. package/resources/locales/de/ui.msg.json +100 -1
  91. package/resources/locales/en/groups.cmd.json +4 -0
  92. package/resources/locales/en/ui.msg.json +100 -1
  93. package/types/src/anchorItems/AnchorItemsDescriptor.d.ts +4 -4
  94. package/types/src/anomalies/AnomaliesPlugin.d.ts +5 -0
  95. package/types/src/anomalies/AnomaliesTaskPane.d.ts +17 -0
  96. package/types/src/anomalies/index.d.ts +3 -0
  97. package/types/src/border/BorderPopupButton.d.ts +1 -1
  98. package/types/src/border/BorderTemplateIcon.d.ts +6 -1
  99. package/types/src/chart/ChartFormatPanel.d.ts +20 -0
  100. package/types/src/chart/ChartPlugin.d.ts +6 -0
  101. package/types/src/chart/index.d.ts +3 -0
  102. package/types/src/color/ColorPopupButton.d.ts +1 -1
  103. package/types/src/command/AccountingStyleCommandButton.d.ts +1 -1
  104. package/types/src/command/DocThemeCommandButton.d.ts +1 -1
  105. package/types/src/command/FontFamilyCommandButton.d.ts +1 -1
  106. package/types/src/command/FontSizeCommandButton.d.ts +1 -1
  107. package/types/src/command/InsertCellControlCommandButton.d.ts +17 -0
  108. package/types/src/command/LanguageCommandButton.d.ts +1 -1
  109. package/types/src/command/LocaleCommandButton.d.ts +1 -1
  110. package/types/src/command/index.d.ts +1 -0
  111. package/types/src/comments/CommentCard.d.ts +2 -2
  112. package/types/src/conditionalFormat/IconPickerPopupButton.d.ts +1 -1
  113. package/types/src/conditions/ConditionEditor.d.ts +1 -1
  114. package/types/src/conditions/OperatorAndParamEditor.d.ts +1 -1
  115. package/types/src/conditions/OperatorSelectPopupButton.d.ts +1 -1
  116. package/types/src/conditions/useFormulaOption.d.ts +2 -2
  117. package/types/src/dialog/WorkbookStatisticsDialog.d.ts +1 -1
  118. package/types/src/fill/PatternPopupButton.d.ts +1 -1
  119. package/types/src/format/BorderPreview.d.ts +11 -4
  120. package/types/src/format/useFormatSelection.d.ts +4 -4
  121. package/types/src/formulaBar/IFormulaBar.d.ts +4 -2
  122. package/types/src/formulaBar/MobileFormulaBar.d.ts +18 -6
  123. package/types/src/formulaBar/MobileInputToolbar.d.ts +9 -3
  124. package/types/src/formulaBar/useFormulaBarSession.d.ts +6 -3
  125. package/types/src/index.d.ts +15 -6
  126. package/types/src/itemsPanel/ItemsPanel.d.ts +5 -0
  127. package/types/src/named/NamedDetailsPanel.d.ts +2 -2
  128. package/types/src/protection/ProtectedCellsPanel.d.ts +2 -2
  129. package/types/src/protection/{SheetProtectionPanel.d.ts → WorksheetProtectionPanel.d.ts} +6 -6
  130. package/types/src/protection/index.d.ts +1 -1
  131. package/types/src/slicer/PresetSlicerStylesCommandButton.d.ts +2 -2
  132. package/types/src/statusBar/PendingStatus.d.ts +19 -0
  133. package/types/src/statusBar/index.d.ts +1 -0
  134. package/types/src/studio/StudioProps.d.ts +10 -10
  135. package/types/src/template/TemplatePanel.d.ts +5 -1
  136. package/types/src/theme/ThemeSelectPopupButton.d.ts +1 -1
  137. package/types/src/toolbar/WorkbookToolbars.d.ts +1 -1
  138. package/types/src/workbook/DefaultRenderers.d.ts +31 -19
  139. package/types/src/workbook/WorkbookContextMenu.d.ts +4 -0
  140. package/types/src/workbook/WorkbookElement.d.ts +5 -4
  141. package/types/src/workbook/WorkbookStrip.d.ts +8 -7
  142. package/types/src/workbook/index.d.ts +1 -1
  143. package/browser/esm/Biy7bhzzzPb5sfRN.mjs +0 -152
  144. package/browser/esm/COv-m-c2byCgvU3M.mjs +0 -14861
  145. package/browser/esm/CtEFHbzYNvYjDYvi.mjs +0 -236
  146. package/browser/esm/Die9NXVFveHvcCT-.mjs +0 -4205
  147. package/browser/esm/sam1KGQZ59B_fADz.mjs +0 -1941
  148. package/node/esm/BYVLi0md4AYuDsB_.mjs +0 -236
  149. package/node/esm/BYwXhrEwkRAt9nJS.mjs +0 -71
  150. package/node/esm/Cmt8Wv806N7NmE4Y.mjs +0 -3344
@@ -1,19 +1,19 @@
1
1
  /**
2
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.10
2
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.12
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
7
  import { Color as e, VERSION as t } from "@sheetxl/sdk";
8
8
  import { useGridColorScheme as r } from "@sheetxl/react";
9
- import { DynamicIcon as i, ReactUtils as n, useTranslator as o } from "@sheetxl/utils-react";
10
- import { forwardRef as l, memo as s, useCallback as c, useEffect as d, useLayoutEffect as p, useMemo as u, useRef as m, useState as h } from "react";
11
- import { ExhibitIconButton as g } from "@sheetxl/utils-mui";
12
- import { Fragment as f, jsx as x, jsxs as y } from "react/jsx-runtime";
13
- import { Box as b, Button as v, ButtonBase as w, Chip as k, Divider as C, InputAdornment as M, ListItemIcon as $, ListItemText as A, Menu as R, MenuItem as D, Skeleton as S, TextField as I, Typography as E } from "@mui/material";
14
- import { listResources as z } from "@sheetxl/utils";
15
- import L from "clsx";
16
- var N = (t, r) => {
9
+ import { DynamicIcon as i, ReactUtils as n, RenderSlot as o, useTranslator as a } from "@sheetxl/utils-react";
10
+ import { forwardRef as s, memo as c, useCallback as d, useEffect as p, useLayoutEffect as u, useMemo as m, useRef as h, useState as g } from "react";
11
+ import { ExhibitIconButton as f } from "@sheetxl/utils-mui";
12
+ import { Fragment as x, jsx as y, jsxs as b } from "react/jsx-runtime";
13
+ import { Box as v, Button as w, ButtonBase as k, Chip as C, Divider as M, InputAdornment as $, ListItemIcon as R, ListItemText as A, Menu as D, MenuItem as S, Skeleton as I, TextField as E, Typography as z } from "@mui/material";
14
+ import { listResources as L, releaseChannel as N } from "@sheetxl/utils";
15
+ import T from "clsx";
16
+ var U = (t, r) => {
17
17
  if (!t?.color) return null;
18
18
  try {
19
19
  const i = new e(t.color).toCSS("dark" === r.palette.mode);
@@ -24,20 +24,20 @@ var N = (t, r) => {
24
24
  } catch {
25
25
  return null;
26
26
  }
27
- }, T = "8 / 5", U = (e) => {
27
+ }, K = "8 / 5", W = (e) => {
28
28
  const { entry: t, category: i } = e, n = ("dark" === r() ? t.thumbnailDarkUrl : void 0) ?? t.thumbnailUrl;
29
- return x(K, {
29
+ return y(P, {
30
30
  src: n,
31
31
  category: i
32
32
  }, n);
33
- }, K = (e) => {
34
- const { src: t, category: r } = e, [n, o] = h(t ? "loading" : "failed");
35
- return y(b, {
33
+ }, P = (e) => {
34
+ const { src: t, category: r } = e, [n, o] = g(t ? "loading" : "failed");
35
+ return b(v, {
36
36
  className: "template-thumbnail",
37
37
  sx: {
38
38
  position: "relative",
39
39
  width: "100%",
40
- aspectRatio: T,
40
+ aspectRatio: K,
41
41
  overflow: "hidden",
42
42
  borderRadius: 1,
43
43
  border: (e) => `1px solid ${e.palette.divider}`,
@@ -47,13 +47,13 @@ var N = (t, r) => {
47
47
  alignItems: "center",
48
48
  justifyContent: "center"
49
49
  },
50
- children: ["failed" === n ? x(i, {
50
+ children: ["failed" === n ? y(i, {
51
51
  iconKey: "FileNew",
52
52
  style: {
53
53
  fontSize: "2.5rem",
54
54
  opacity: .4
55
55
  }
56
- }) : x("img", {
56
+ }) : y("img", {
57
57
  src: t,
58
58
  alt: "",
59
59
  loading: "lazy",
@@ -68,18 +68,18 @@ var N = (t, r) => {
68
68
  opacity: "loaded" === n ? 1 : 0,
69
69
  transition: "opacity 150ms ease-out"
70
70
  }
71
- }), r?.color ? x(b, { sx: (e) => ({
71
+ }), r?.color ? y(v, { sx: (e) => ({
72
72
  position: "absolute",
73
73
  top: 0,
74
74
  left: 0,
75
75
  right: 0,
76
76
  height: "3px",
77
- backgroundColor: N(r, e)?.fill
77
+ backgroundColor: U(r, e)?.fill
78
78
  }) }) : null]
79
79
  });
80
- }, W = (e) => {
80
+ }, F = (e) => {
81
81
  const { entry: t, category: r, onSelect: i } = e;
82
- return y(w, {
82
+ return b(k, {
83
83
  className: "template-tile",
84
84
  disableRipple: !0,
85
85
  onClick: i,
@@ -102,17 +102,17 @@ var N = (t, r) => {
102
102
  outlineOffset: "-2px"
103
103
  }
104
104
  },
105
- children: [x(U, {
105
+ children: [y(W, {
106
106
  entry: t,
107
107
  category: r
108
- }), y(b, {
108
+ }), b(v, {
109
109
  sx: { minWidth: 0 },
110
- children: [x(E, {
110
+ children: [y(z, {
111
111
  variant: "subtitle2",
112
112
  component: "div",
113
113
  noWrap: !0,
114
114
  children: t.title
115
- }), r ? y(E, {
115
+ }), r ? b(z, {
116
116
  variant: "caption",
117
117
  component: "div",
118
118
  noWrap: !0,
@@ -122,16 +122,16 @@ var N = (t, r) => {
122
122
  alignItems: "center",
123
123
  gap: .75
124
124
  },
125
- children: [r.color ? x(b, {
125
+ children: [r.color ? y(v, {
126
126
  component: "span",
127
127
  sx: (e) => ({
128
128
  width: "8px",
129
129
  height: "8px",
130
130
  borderRadius: "50%",
131
131
  flex: "none",
132
- backgroundColor: N(r, e)?.fill
132
+ backgroundColor: U(r, e)?.fill
133
133
  })
134
- }) : null, x(b, {
134
+ }) : null, y(v, {
135
135
  component: "span",
136
136
  sx: {
137
137
  overflow: "hidden",
@@ -142,7 +142,7 @@ var N = (t, r) => {
142
142
  }) : null]
143
143
  })]
144
144
  });
145
- }, P = () => y(b, {
145
+ }, B = () => b(v, {
146
146
  sx: {
147
147
  padding: 1,
148
148
  display: "flex",
@@ -150,74 +150,74 @@ var N = (t, r) => {
150
150
  gap: .75
151
151
  },
152
152
  children: [
153
- x(S, {
153
+ y(I, {
154
154
  variant: "rectangular",
155
155
  sx: {
156
156
  width: "100%",
157
157
  height: "auto",
158
- aspectRatio: T,
158
+ aspectRatio: K,
159
159
  borderRadius: 1
160
160
  }
161
161
  }),
162
- x(S, {
162
+ y(I, {
163
163
  variant: "text",
164
164
  width: "60%"
165
165
  }),
166
- x(S, {
166
+ y(I, {
167
167
  variant: "text",
168
168
  width: "35%"
169
169
  })
170
170
  ]
171
- }), F = s(l((e, t) => {
172
- const { catalog: r, onSelect: i, filter: a, groupBy: l, renderTile: s, tileMinWidth: c = 180, emptyLabel: g, visibleRows: f, sx: w = n.EmptyCssProperties, style: k, className: C, onKeyDown: M, ...$ } = e, A = o(), R = m(null), [D, S] = h(0), I = m(null);
173
- I.current = () => {
174
- const e = R.current?.querySelector(".template-grid")?.firstElementChild, t = (e?.offsetHeight ? e : e?.firstElementChild)?.getBoundingClientRect().height;
175
- t && S(t);
176
- }, p(() => {
177
- f && I.current?.();
178
- }), d(() => {
179
- const e = R.current;
180
- if (!f || !e) return;
181
- const t = new ResizeObserver(() => I.current?.());
171
+ }), H = c(s((e, t) => {
172
+ const { catalog: r, onSelect: i, filter: l, groupBy: s, renderTile: c, tileMinWidth: d = 180, emptyLabel: f, visibleRows: x, sx: k = n.EmptyCssProperties, style: C, className: M, onKeyDown: $, ...R } = e, A = a(), D = h(null), [S, I] = g(0), E = h(null);
173
+ E.current = () => {
174
+ const e = D.current?.querySelector(".template-grid")?.firstElementChild, t = (e?.offsetHeight ? e : e?.firstElementChild)?.getBoundingClientRect().height;
175
+ t && I(t);
176
+ }, u(() => {
177
+ x && E.current?.();
178
+ }), p(() => {
179
+ const e = D.current;
180
+ if (!x || !e) return;
181
+ const t = new ResizeObserver(() => E.current?.());
182
182
  return t.observe(e), () => t.disconnect();
183
- }, [f]);
184
- const z = u(() => new Map(r.categories.map((e) => [e.id, e])), [r.categories]), N = u(() => {
185
- const e = a ? r.entries.filter(a) : r.entries;
186
- if (!l) return [{
183
+ }, [x]);
184
+ const L = m(() => new Map(r.categories.map((e) => [e.id, e])), [r.categories]), N = m(() => {
185
+ const e = l ? r.entries.filter(l) : r.entries;
186
+ if (!s) return [{
187
187
  key: null,
188
188
  entries: e
189
189
  }];
190
190
  const t = /* @__PURE__ */ new Map();
191
191
  for (const e of r.categories) t.set(e.id, []);
192
192
  for (const r of e) {
193
- const e = l(r);
193
+ const e = s(r);
194
194
  let i = t.get(e);
195
195
  i || t.set(e, i = []), i.push(r);
196
196
  }
197
197
  return [...t].filter(([, e]) => e.length > 0).map(([e, t]) => ({
198
198
  key: e,
199
- title: z.get(e)?.title ?? e,
199
+ title: L.get(e)?.title ?? e,
200
200
  entries: t
201
201
  }));
202
202
  }, [
203
203
  r.entries,
204
204
  r.categories,
205
- z,
206
- a,
207
- l
208
- ]), T = {
205
+ L,
206
+ l,
207
+ s
208
+ ]), U = {
209
209
  display: "grid",
210
- gridTemplateColumns: `repeat(auto-fill, minmax(${c}px, 1fr))`,
210
+ gridTemplateColumns: `repeat(auto-fill, minmax(${d}px, 1fr))`,
211
211
  gap: "8px"
212
212
  };
213
- let U;
214
- return U = "loading" === r.status ? x(b, {
213
+ let K;
214
+ return K = "loading" === r.status ? y(v, {
215
215
  className: "template-grid",
216
- sx: T,
216
+ sx: U,
217
217
  "aria-busy": "true",
218
218
  "aria-label": A("template.loading"),
219
- children: Array.from({ length: 6 }, (e, t) => x(P, {}, t))
220
- }) : "error" === r.status ? y(b, {
219
+ children: Array.from({ length: 6 }, (e, t) => y(B, {}, t))
220
+ }) : "error" === r.status ? b(v, {
221
221
  sx: {
222
222
  display: "flex",
223
223
  flexDirection: "column",
@@ -226,28 +226,28 @@ var N = (t, r) => {
226
226
  padding: 4,
227
227
  textAlign: "center"
228
228
  },
229
- children: [x(E, {
229
+ children: [y(z, {
230
230
  variant: "body2",
231
231
  sx: { color: "text.secondary" },
232
232
  children: A("template.loadFailed")
233
- }), x(v, {
233
+ }), y(w, {
234
234
  variant: "outlined",
235
235
  size: "small",
236
236
  onClick: r.retry,
237
237
  children: A("template.retry")
238
238
  })]
239
- }) : N.every((e) => 0 === e.entries.length) ? x(E, {
239
+ }) : N.every((e) => 0 === e.entries.length) ? y(z, {
240
240
  variant: "body2",
241
241
  sx: {
242
242
  color: "text.secondary",
243
243
  padding: 4,
244
244
  textAlign: "center"
245
245
  },
246
- children: g ?? A("template.empty")
247
- }) : N.map((e) => y(b, {
246
+ children: f ?? A("template.empty")
247
+ }) : N.map((e) => b(v, {
248
248
  role: "group",
249
249
  "aria-label": e.title,
250
- children: [e.title ? x(E, {
250
+ children: [e.title ? y(z, {
251
251
  variant: "overline",
252
252
  component: "div",
253
253
  sx: {
@@ -255,40 +255,46 @@ var N = (t, r) => {
255
255
  paddingX: 1
256
256
  },
257
257
  children: e.title
258
- }) : null, x(b, {
258
+ }) : null, y(v, {
259
259
  className: "template-grid",
260
- sx: T,
260
+ sx: U,
261
261
  children: e.entries.map((e) => {
262
262
  const t = {
263
- category: z.get(e.category),
263
+ category: L.get(e.category),
264
264
  onSelect: () => i?.(e)
265
265
  };
266
- return s ? x(b, {
266
+ return c ? y(v, {
267
267
  sx: { display: "contents" },
268
- children: s(e, t)
269
- }, e.id) : x(W, {
268
+ children: y(o, {
269
+ render: c,
270
+ props: {
271
+ entry: e,
272
+ ...t
273
+ }
274
+ })
275
+ }, e.id) : y(F, {
270
276
  entry: e,
271
277
  ...t
272
278
  }, e.id);
273
279
  })
274
280
  })]
275
- }, e.key ?? "")), x(b, {
281
+ }, e.key ?? "")), y(v, {
276
282
  ref: t,
277
- className: L(C, "template-panel"),
278
- sx: w,
279
- style: f && D ? {
283
+ className: T(M, "template-panel"),
284
+ sx: k,
285
+ style: x && S ? {
280
286
  boxSizing: "content-box",
281
287
  scrollbarGutter: "stable",
282
- height: `${Math.ceil(f * D + 8 * (f - 1))}px`,
283
- minHeight: `${Math.ceil(D)}px`,
284
- ...k
285
- } : k,
286
- ...$,
287
- children: x(b, {
288
- ref: R,
288
+ height: `${Math.ceil(x * S + 8 * (x - 1))}px`,
289
+ minHeight: `${Math.ceil(S)}px`,
290
+ ...C
291
+ } : C,
292
+ ...R,
293
+ children: y(v, {
294
+ ref: D,
289
295
  onKeyDown: (e) => {
290
- if (M?.(e), e.defaultPrevented) return;
291
- const t = R.current;
296
+ if ($?.(e), e.defaultPrevented) return;
297
+ const t = D.current;
292
298
  if (!t) return;
293
299
  const r = Array.from(t.querySelectorAll(".template-tile")), i = r.indexOf(document.activeElement);
294
300
  if (i < 0) return;
@@ -319,12 +325,12 @@ var N = (t, r) => {
319
325
  }
320
326
  l = Math.max(0, Math.min(r.length - 1, l)), e.preventDefault(), r[l].focus();
321
327
  },
322
- children: U
328
+ children: K
323
329
  })
324
330
  });
325
331
  }));
326
- F.displayName = "TemplatePanel";
327
- var B = (e, t, r) => u(() => {
332
+ H.displayName = "TemplatePanel";
333
+ var O = (e, t, r) => m(() => {
328
334
  if (!t.trim() && 0 === r.length) return;
329
335
  const i = new Map(e.map((e) => [e.id, e])), n = r.length > 0 ? new Set(r) : null;
330
336
  return (e) => !(n && !n.has(e.category)) && ((e, t, r) => {
@@ -340,9 +346,9 @@ var B = (e, t, r) => u(() => {
340
346
  e,
341
347
  t,
342
348
  r
343
- ]), H = [], O = (e) => {
349
+ ]), j = [], V = (e) => {
344
350
  const { category: t } = e;
345
- return x(b, {
351
+ return y(v, {
346
352
  component: "span",
347
353
  sx: (e) => ({
348
354
  display: "inline-block",
@@ -350,18 +356,18 @@ var B = (e, t, r) => u(() => {
350
356
  height: "10px",
351
357
  borderRadius: "50%",
352
358
  flex: "none",
353
- backgroundColor: N(t, e)?.fill ?? e.palette.action.selected
359
+ backgroundColor: U(t, e)?.fill ?? e.palette.action.selected
354
360
  })
355
361
  });
356
- }, j = (e) => {
362
+ }, Y = (e) => {
357
363
  const { category: t, onDelete: r } = e;
358
- return x(k, {
364
+ return y(C, {
359
365
  size: "small",
360
366
  label: t.title,
361
367
  title: t.description,
362
368
  onDelete: r,
363
369
  sx: (e) => {
364
- const r = N(t, e);
370
+ const r = U(t, e);
365
371
  return {
366
372
  marginY: .25,
367
373
  marginRight: .5,
@@ -386,30 +392,30 @@ var B = (e, t, r) => u(() => {
386
392
  };
387
393
  }
388
394
  });
389
- }, V = (e) => {
390
- const { value: t, onChange: r, categories: n, categoryIds: a = H, onCategoryIdsChange: l, sx: s } = e, c = o(), d = m(null), [p, b] = h(null), v = !!l && (n?.length ?? 0) > 1, k = u(() => {
391
- if (!v || 0 === a.length) return [];
395
+ }, q = (e) => {
396
+ const { value: t, onChange: r, categories: n, categoryIds: o = j, onCategoryIdsChange: l, sx: s } = e, c = a(), d = h(null), [p, u] = g(null), v = !!l && (n?.length ?? 0) > 1, w = m(() => {
397
+ if (!v || 0 === o.length) return [];
392
398
  const e = new Map(n.map((e) => [e.id, e]));
393
- return a.map((t) => e.get(t)).filter((e) => !!e);
399
+ return o.map((t) => e.get(t)).filter((e) => !!e);
394
400
  }, [
395
401
  v,
396
402
  n,
397
- a
398
- ]), S = (e) => {
403
+ o
404
+ ]), C = (e) => {
399
405
  l?.(e), d.current?.focus();
400
- }, E = () => {
401
- b(null), d.current?.focus();
402
- }, z = x(i, { iconKey: "Find" });
403
- let L = x(M, {
406
+ }, I = () => {
407
+ u(null), d.current?.focus();
408
+ }, z = y(i, { iconKey: "Find" });
409
+ let L = y($, {
404
410
  position: "start",
405
411
  children: z
406
412
  });
407
413
  if (v) {
408
414
  const e = c("template.filterByCategory");
409
- L = y(f, { children: [x(M, {
415
+ L = b(x, { children: [y($, {
410
416
  position: "start",
411
417
  sx: { marginRight: .5 },
412
- children: y(w, {
418
+ children: b(k, {
413
419
  "aria-label": e,
414
420
  title: e,
415
421
  "aria-haspopup": "menu",
@@ -417,7 +423,7 @@ var B = (e, t, r) => u(() => {
417
423
  onMouseDown: (e) => {
418
424
  0 === e.button && e.preventDefault();
419
425
  },
420
- onClick: (e) => b(e.currentTarget),
426
+ onClick: (e) => u(e.currentTarget),
421
427
  sx: {
422
428
  display: "flex",
423
429
  alignItems: "center",
@@ -428,7 +434,7 @@ var B = (e, t, r) => u(() => {
428
434
  color: "inherit",
429
435
  "&:hover, &.Mui-focusVisible": { backgroundColor: "action.hover" }
430
436
  },
431
- children: [z, x(i, {
437
+ children: [z, y(i, {
432
438
  iconKey: "ExpandMore",
433
439
  style: {
434
440
  fontSize: "1rem",
@@ -436,23 +442,23 @@ var B = (e, t, r) => u(() => {
436
442
  }
437
443
  })]
438
444
  })
439
- }), k.map((e) => x(j, {
445
+ }), w.map((e) => y(Y, {
440
446
  category: e,
441
- onDelete: () => S(a.filter((t) => t !== e.id))
447
+ onDelete: () => C(o.filter((t) => t !== e.id))
442
448
  }, e.id))] });
443
449
  }
444
- const N = !!t || k.length > 0;
445
- return y(f, { children: [x(I, {
450
+ const N = !!t || w.length > 0;
451
+ return b(x, { children: [y(E, {
446
452
  size: "small",
447
453
  value: t,
448
- placeholder: k.length > 0 ? void 0 : c("template.search"),
454
+ placeholder: w.length > 0 ? void 0 : c("template.search"),
449
455
  inputRef: d,
450
456
  onChange: (e) => r(e.target.value),
451
457
  onKeyDown: (e) => {
452
- if ("Escape" === e.key && N) e.stopPropagation(), t ? r("") : S([]);
453
- else if ("Backspace" === e.key && k.length > 0) {
458
+ if ("Escape" === e.key && N) e.stopPropagation(), t ? r("") : C([]);
459
+ else if ("Backspace" === e.key && w.length > 0) {
454
460
  const t = d.current;
455
- e.target === t && 0 === t.selectionStart && 0 === t.selectionEnd && (e.preventDefault(), S(a.slice(0, -1)));
461
+ e.target === t && 0 === t.selectionStart && 0 === t.selectionEnd && (e.preventDefault(), C(o.slice(0, -1)));
456
462
  }
457
463
  },
458
464
  sx: s,
@@ -484,18 +490,18 @@ var B = (e, t, r) => u(() => {
484
490
  }
485
491
  },
486
492
  startAdornment: L,
487
- endAdornment: N ? x(M, {
493
+ endAdornment: N ? y($, {
488
494
  position: "end",
489
- children: x(g, {
495
+ children: y(f, {
490
496
  "aria-label": c("template.clearSearch"),
491
497
  propsTooltip: { label: c("template.clearSearch") },
492
498
  onMouseDown: (e) => {
493
499
  0 === e.button && e.preventDefault();
494
500
  },
495
501
  onClick: () => {
496
- r(""), S([]);
502
+ r(""), C([]);
497
503
  },
498
- icon: x(i, { iconKey: "Close" }),
504
+ icon: y(i, { iconKey: "Close" }),
499
505
  size: "small"
500
506
  })
501
507
  }) : void 0
@@ -506,27 +512,27 @@ var B = (e, t, r) => u(() => {
506
512
  "aria-label": c("template.search")
507
513
  }
508
514
  }
509
- }), v ? y(R, {
515
+ }), v ? b(D, {
510
516
  anchorEl: p,
511
517
  open: !!p,
512
- onClose: E,
518
+ onClose: I,
513
519
  disableRestoreFocus: !0,
514
520
  slotProps: { list: {
515
521
  dense: !0,
516
522
  "aria-label": c("dialog.template.categories")
517
523
  } },
518
524
  children: [n.map((e) => {
519
- const t = a.includes(e.id);
520
- return y(D, {
525
+ const t = o.includes(e.id);
526
+ return b(S, {
521
527
  selected: t,
522
528
  title: e.description,
523
529
  onClick: () => {
524
- l(t ? a.filter((t) => t !== e.id) : [...a, e.id]), E();
530
+ l(t ? o.filter((t) => t !== e.id) : [...o, e.id]), I();
525
531
  },
526
532
  children: [
527
- x($, { children: x(O, { category: e }) }),
528
- x(A, { children: e.title }),
529
- t ? x(i, {
533
+ y(R, { children: y(V, { category: e }) }),
534
+ y(A, { children: e.title }),
535
+ t ? y(i, {
530
536
  iconKey: "Check",
531
537
  style: {
532
538
  fontSize: "1rem",
@@ -535,20 +541,20 @@ var B = (e, t, r) => u(() => {
535
541
  }) : null
536
542
  ]
537
543
  }, e.id);
538
- }), k.length > 0 ? [x(C, {}, "divider"), y(D, {
544
+ }), w.length > 0 ? [y(M, {}, "divider"), b(S, {
539
545
  onClick: () => {
540
- l([]), E();
546
+ l([]), I();
541
547
  },
542
- children: [x($, {}), x(A, { children: c("template.allCategories") })]
548
+ children: [y(R, {}), y(A, { children: c("template.allCategories") })]
543
549
  }, "all")] : null]
544
550
  }) : null] });
545
- }, Y = "local" === t ? "beta" : /^\d+\.\d+\.\d+-([0-9A-Za-z-]+)/.exec(t)?.[1], q = `https://unpkg.com/@sheetxl/templates-workbook${Y ? `@${Y}` : ""}/dist`, X = "templates-workbook", Z = (e) => e.replace(/\.[^/.]+$/, "").replace(/([a-z])([A-Z])/g, "$1 $2").replace(/[-_]+/g, " ").trim().replace(/\b\w/g, (e) => e.toUpperCase()), G = (e, t) => {
546
- const r = `${e}${e.endsWith("/") ? "" : "/"}${X}/${t}`;
551
+ }, X = N(t), G = `https://unpkg.com/@sheetxl/templates-workbook${X ? `@${X}` : ""}/dist`, Z = "templates-workbook", _ = (e) => e.replace(/\.[^/.]+$/, "").replace(/([a-z])([A-Z])/g, "$1 $2").replace(/[-_]+/g, " ").trim().replace(/\b\w/g, (e) => e.toUpperCase()), J = (e, t) => {
552
+ const r = `${e}${e.endsWith("/") ? "" : "/"}${Z}/${t}`;
547
553
  return "undefined" == typeof document ? r : new URL(r, document.baseURI).href;
548
- }, _ = (e) => "string" == typeof e && e ? e : void 0, J = /* @__PURE__ */ new Map(), Q = (e = q) => {
549
- let t = J.get(e);
554
+ }, Q = (e) => "string" == typeof e && e ? e : void 0, ee = /* @__PURE__ */ new Map(), te = (e = G) => {
555
+ let t = ee.get(e);
550
556
  return t || (t = (async () => {
551
- const t = (await z("templates", X, e)).find((e) => void 0 !== e.meta?.schema);
557
+ const t = (await L("templates", Z, e)).find((e) => void 0 !== e.meta?.schema);
552
558
  if (!t) throw new Error(`No template catalog found at '${e}'.`);
553
559
  return 1 !== Math.floor(Number(t.meta?.schema)) ? (console.warn(`Template catalog at '${e}' has schema ${t.meta?.schema}; expected 1.`), {
554
560
  categories: [],
@@ -556,34 +562,34 @@ var B = (e, t, r) => u(() => {
556
562
  }) : ((e, t) => {
557
563
  const r = Array.isArray(e.meta?.categories) ? e.meta.categories : [], i = [], n = /* @__PURE__ */ new Set();
558
564
  for (const e of r) {
559
- const t = _(e?.id);
565
+ const t = Q(e?.id);
560
566
  t && !n.has(t) && (n.add(t), i.push({
561
567
  id: t,
562
- title: _(e.title) ?? Z(t),
563
- description: _(e.description),
564
- icon: _(e.icon),
565
- color: _(e.color)
568
+ title: Q(e.title) ?? _(t),
569
+ description: Q(e.description),
570
+ icon: Q(e.icon),
571
+ color: Q(e.color)
566
572
  }));
567
573
  }
568
574
  const o = [];
569
575
  for (const r of e.entries) {
570
576
  const e = r.path, a = e.split("/");
571
577
  if (2 !== a.length || !/\.(?:xlsx|sxl|csv)$/i.test(e)) continue;
572
- const l = _(r.category) ?? a[0];
578
+ const l = Q(r.category) ?? a[0];
573
579
  n.has(l) || (n.add(l), i.push({
574
580
  id: l,
575
- title: Z(l)
581
+ title: _(l)
576
582
  }));
577
- const s = _(r.thumbnail), c = _(r.thumbnailDark);
583
+ const s = Q(r.thumbnail), c = Q(r.thumbnailDark);
578
584
  o.push({
579
585
  id: e,
580
- title: _(r.title) ?? Z(a[1]),
586
+ title: Q(r.title) ?? _(a[1]),
581
587
  category: l,
582
- description: _(r.description),
588
+ description: Q(r.description),
583
589
  tags: Array.isArray(r.tags) ? r.tags.filter((e) => "string" == typeof e) : void 0,
584
- thumbnailUrl: s ? G(t, s) : void 0,
585
- thumbnailDarkUrl: c ? G(t, c) : void 0,
586
- sourceUrl: G(t, e)
590
+ thumbnailUrl: s ? J(t, s) : void 0,
591
+ thumbnailDarkUrl: c ? J(t, c) : void 0,
592
+ sourceUrl: J(t, e)
587
593
  });
588
594
  }
589
595
  return {
@@ -591,22 +597,22 @@ var B = (e, t, r) => u(() => {
591
597
  entries: o
592
598
  };
593
599
  })(t, e);
594
- })(), J.set(e, t), t.catch(() => {
595
- J.delete(e);
600
+ })(), ee.set(e, t), t.catch(() => {
601
+ ee.delete(e);
596
602
  })), t;
597
- }, ee = (e = {}) => {
598
- const { path: t = q } = e, [r, i] = h(0), [n, o] = h({
603
+ }, re = (e = {}) => {
604
+ const { path: t = G } = e, [r, i] = g(0), [n, o] = g({
599
605
  status: "loading",
600
606
  categories: [],
601
607
  entries: []
602
608
  });
603
- d(() => {
609
+ p(() => {
604
610
  let e = !1;
605
611
  return o((e) => "loading" === e.status ? e : {
606
612
  status: "loading",
607
613
  categories: [],
608
614
  entries: []
609
- }), Q(t).then((t) => {
615
+ }), te(t).then((t) => {
610
616
  e || o({
611
617
  status: "ready",
612
618
  ...t
@@ -624,9 +630,9 @@ var B = (e, t, r) => u(() => {
624
630
  }, [t, r]);
625
631
  return {
626
632
  ...n,
627
- retry: c(() => {
633
+ retry: d(() => {
628
634
  i((e) => e + 1);
629
635
  }, [])
630
636
  };
631
637
  };
632
- export { F as a, B as i, ee as n, V as r, Q as t };
638
+ export { H as a, O as i, re as n, q as r, te as t };