@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,10 +1,10 @@
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
- import { a as t, i as e, n as a, r as i } from "./B8SQfjKjzYHLxzZR.mjs";
7
+ import { a as t, i as e, n as a, r as i } from "./DJFkALt4XrwkMbnU.mjs";
8
8
  import { useTranslator as o } from "@sheetxl/utils-react";
9
9
  import { useCallback as r, useState as s } from "react";
10
10
  import { InternalWindow as n } from "@sheetxl/utils-mui";
@@ -0,0 +1,391 @@
1
+ /**
2
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.12
3
+ *
4
+ * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
+ * License: The license can be found at https://www.sheetxl.com/license.
6
+ */
7
+ import { n as e, r as t, t as r } from "./M7YxvRPGCuxuk9aK.mjs";
8
+ import { ItemCard as a, ItemsSearchField as n, c as s, o as i } from "./index.mjs";
9
+ import { DynamicIcon as o, NotifierType as l, useNotifier as c, useTranslator as d } from "@sheetxl/utils-react";
10
+ import { forwardRef as p, memo as g, useCallback as u, useEffect as m, useMemo as f, useReducer as h, useRef as x, useState as y } from "react";
11
+ import { SimpleTooltip as v } from "@sheetxl/utils-mui";
12
+ import { jsx as b, jsxs as w } from "react/jsx-runtime";
13
+ import { Box as C, Button as M, IconButton as S, Typography as B } from "@mui/material";
14
+ import D from "clsx";
15
+ import { useMergeRefs as I } from "react-merge-refs";
16
+ var k = g((e) => {
17
+ const { children: t, messageKeys: r, onSave: a, onCancel: n, className: o, ...l } = e, c = d(), p = x(/* @__PURE__ */ new Set()), g = f(() => ({ register: (e) => (p.current.add(e), () => {
18
+ p.current.delete(e);
19
+ }) }), []), m = u(() => {
20
+ let e = !0;
21
+ for (const t of Array.from(p.current)) t() || (e = !1);
22
+ e && a();
23
+ }, [a]), h = f(() => D("sxl-items-editor", "sxl-anchor-items-editor", o, {}, s.editor), [o]);
24
+ return w(C, {
25
+ sx: {
26
+ display: "flex",
27
+ flexDirection: "column",
28
+ justifyContent: "space-between",
29
+ height: "100%",
30
+ gap: (e) => e.spacing(2)
31
+ },
32
+ ...l,
33
+ className: h,
34
+ children: [b(i.Provider, {
35
+ value: g,
36
+ children: t
37
+ }), b(C, {
38
+ className: s["editor-buttons"],
39
+ sx: {
40
+ gap: (e) => e.spacing(1),
41
+ paddingTop: (e) => e.spacing(2),
42
+ borderTop: (e) => `1px solid ${e.palette.divider}`
43
+ },
44
+ children: w(C, {
45
+ sx: {
46
+ display: "grid",
47
+ gridAutoFlow: "column",
48
+ gridAutoColumns: "1fr",
49
+ gap: (e) => e.spacing(1)
50
+ },
51
+ children: [b(M, {
52
+ variant: "outlined",
53
+ onClick: n,
54
+ children: c(r.cancel)
55
+ }), b(M, {
56
+ variant: "contained",
57
+ onClick: m,
58
+ children: c(r.save)
59
+ })]
60
+ })
61
+ })]
62
+ });
63
+ });
64
+ k.displayName = "EditorPanel";
65
+ var E = .5, T = 0, R = /* @__PURE__ */ new WeakMap(), N = g(p((i, p) => {
66
+ const { title: g, workbook: N, descriptor: j, args: O, headerActions: K, listActions: L, footer: P, dragReorder: A = !1, className: F, ...W } = i, $ = d(), U = c(), X = j.messageKeys, Y = f(() => {
67
+ const { createDraft: e, save: t, EditorBody: r } = j;
68
+ return e && t && r && X.cancel && X.save ? {
69
+ createDraft: e,
70
+ commit: t,
71
+ EditorBody: r,
72
+ keys: {
73
+ cancel: X.cancel,
74
+ save: X.save
75
+ }
76
+ } : null;
77
+ }, [j, X]), [q, z] = y(!1), [G, H] = y(null), [J, Q] = y(""), V = x(null), Z = x(null), [_, ee] = h((e) => e + 1, 0);
78
+ m(() => j.subscribe(N, {
79
+ onChange: () => ee(),
80
+ onInvalidated: () => {
81
+ H(null), ee();
82
+ }
83
+ }), [N, j]);
84
+ const te = x(void 0);
85
+ m(() => {
86
+ if (te.current === O) return;
87
+ te.current = O;
88
+ const e = O?.draft;
89
+ try {
90
+ let t = null, r = null;
91
+ void 0 !== e ? j.isReadOnly(N) || (t = j.createSeededDraft?.(N, e) ?? null) : O?.insert && Y && !j.isReadOnly(N) ? t = Y.createDraft(N) : void 0 !== O?.edit && Y && !j.isReadOnly(N) && (r = O.edit, t = Y.createDraft(N, r)), t && H({
92
+ draft: t,
93
+ target: r
94
+ });
95
+ } catch (e) {
96
+ U.showMessage?.(e.message, { type: l.Error });
97
+ }
98
+ }, [
99
+ O,
100
+ N,
101
+ j,
102
+ Y,
103
+ U
104
+ ]);
105
+ const re = x(N);
106
+ re.current !== N && (re.current = N, null !== G && H(null));
107
+ const ae = j.isReadOnly(N), ne = !ae && null !== Y, se = A && !ae && !!j.moveBy, ie = x(!1);
108
+ t(Z, se, ie);
109
+ const oe = u((e, t) => {
110
+ const r = j.getItems(N)[e];
111
+ if (void 0 !== r) {
112
+ ie.current = !0;
113
+ try {
114
+ j.moveBy(r, t - e, N);
115
+ } catch (e) {
116
+ ie.current = !1, U.showMessage?.(e.message, { type: l.Error });
117
+ }
118
+ }
119
+ }, [
120
+ j,
121
+ N,
122
+ U
123
+ ]), le = u(async () => {
124
+ if (G && Y) {
125
+ try {
126
+ await j.beforeSave?.(G.draft);
127
+ const e = j.validate?.(G.draft) ?? null;
128
+ if (e) return void U.showMessage?.($(e), { type: l.Error });
129
+ await Y.commit(N, G.draft, G.target);
130
+ } catch (e) {
131
+ U.showMessage?.(e.message, { type: l.Error });
132
+ return;
133
+ }
134
+ H(null);
135
+ }
136
+ }, [
137
+ G,
138
+ j,
139
+ Y,
140
+ N,
141
+ U,
142
+ $
143
+ ]), ce = f(() => {
144
+ const t = j.getItems(N), s = !!j.getSearchText, i = s ? J.trim().toLowerCase() : "", c = i ? t.filter((e) => j.getSearchText(e, $).toLowerCase().includes(i)) : t, d = se && !i, p = [];
145
+ if (0 === t.length) return p.push(b(C, { sx: { flex: "1 1 0" } }, "spacer-top")), p.push(w(C, {
146
+ sx: {
147
+ display: "flex",
148
+ flex: "0 0 auto",
149
+ flexDirection: "column",
150
+ alignItems: "center",
151
+ alignSelf: "center",
152
+ gap: (e) => e.spacing(2.5),
153
+ maxWidth: "min(360px, 90%)"
154
+ },
155
+ children: [b(B, {
156
+ variant: "body2",
157
+ align: "center",
158
+ children: ne && X.addPrompt ? $(X.addPrompt) : $(X.none)
159
+ }), ne && X.new && b(M, {
160
+ variant: "contained",
161
+ sx: { textTransform: "none" },
162
+ onClick: () => {
163
+ H({
164
+ draft: Y.createDraft(N),
165
+ target: null
166
+ });
167
+ },
168
+ children: $(X.new)
169
+ })]
170
+ }, "no-items")), p.push(b(C, { sx: { flex: "1.5 1 0" } }, "spacer-bottom")), (K || L) && p.unshift(w(C, {
171
+ sx: {
172
+ display: "flex",
173
+ alignItems: "center",
174
+ justifyContent: "flex-end",
175
+ flex: "0 0 auto"
176
+ },
177
+ children: [K, L]
178
+ }, "header-actions")), p;
179
+ if (p.push(w(C, {
180
+ sx: {
181
+ display: "flex",
182
+ alignItems: "center",
183
+ justifyContent: "center"
184
+ },
185
+ children: [
186
+ b(C, {
187
+ sx: { flex: "1 1 100%" },
188
+ children: X.heading ? b(B, {
189
+ variant: "body2",
190
+ children: $(X.heading)
191
+ }) : null
192
+ }),
193
+ K,
194
+ ne && X.insert && b(v, {
195
+ disableInteractive: !0,
196
+ title: $(X.insert),
197
+ children: b(S, {
198
+ onClick: (e) => {
199
+ e.stopPropagation(), H({
200
+ draft: Y.createDraft(N),
201
+ target: null
202
+ });
203
+ },
204
+ children: b(o, { iconKey: "Insert" })
205
+ })
206
+ }, "add-new")
207
+ ]
208
+ }, "add-new")), s && p.push(b(n, {
209
+ value: J,
210
+ onChange: Q,
211
+ placeholder: X.search ? $(X.search) : void 0,
212
+ clearLabel: X.clearSearch ? $(X.clearSearch) : void 0,
213
+ sx: {
214
+ flexShrink: 0,
215
+ mx: E
216
+ }
217
+ }, "search")), L && p.push(b(C, {
218
+ sx: {
219
+ display: "flex",
220
+ alignItems: "center",
221
+ justifyContent: "flex-end",
222
+ flex: "0 0 auto",
223
+ mx: E,
224
+ mt: -.5
225
+ },
226
+ children: L
227
+ }, "list-actions")), 0 === c.length) return p.push(b(C, { sx: { flex: "1 1 0" } }, "spacer-top")), p.push(b(B, {
228
+ variant: "body2",
229
+ align: "center",
230
+ sx: {
231
+ color: "text.secondary",
232
+ alignSelf: "center",
233
+ maxWidth: "min(360px, 90%)"
234
+ },
235
+ children: X.noMatches ? $(X.noMatches) : null
236
+ }, "no-matches")), p.push(b(C, { sx: { flex: "1.5 1 0" } }, "spacer-bottom")), p;
237
+ const g = c.map((e) => j.getItemKey?.(e) ?? ((e) => {
238
+ let t = R.get(e);
239
+ return void 0 === t && (t = "item-" + T++, R.set(e, t)), t;
240
+ })(e)), u = [];
241
+ c.forEach((e, n) => {
242
+ const s = j.isItemReadOnly?.(e, N) ?? ae, o = i ? t.indexOf(e) : n, c = b(a, {
243
+ item: e,
244
+ messageKeys: X,
245
+ title: j.getCardTitle(e, $),
246
+ subtitle: j.getCardSubtitle?.(e, $),
247
+ Subtitle: j.CardSubtitle,
248
+ readOnly: s,
249
+ canMoveUp: o > 0,
250
+ canMoveDown: o < t.length - 1,
251
+ onMoveBy: j.moveBy ? (t) => j.moveBy(e, t, N) : void 0,
252
+ onDuplicate: j.duplicate ? () => {
253
+ try {
254
+ j.duplicate(e, N);
255
+ } catch (e) {
256
+ U.showMessage?.(e.message, { type: l.Error });
257
+ }
258
+ } : void 0,
259
+ onDelete: () => {
260
+ try {
261
+ j.delete(e, N);
262
+ } catch (e) {
263
+ U.showMessage?.(e.message, { type: l.Error });
264
+ }
265
+ },
266
+ onEdit: Y ? () => H({
267
+ draft: Y.createDraft(N, e),
268
+ target: e
269
+ }) : void 0,
270
+ onSelect: j.select ? () => {
271
+ try {
272
+ j.select(e, N);
273
+ } catch (e) {
274
+ U.showMessage?.(e.message, { type: l.Error });
275
+ }
276
+ } : void 0,
277
+ subscribeItem: j.subscribeItem,
278
+ Media: j.CardMedia,
279
+ Body: j.CardBody
280
+ }, g[n]);
281
+ u.push(d ? b(r, {
282
+ id: g[n],
283
+ disabled: s,
284
+ children: c
285
+ }, g[n]) : c);
286
+ });
287
+ const m = b(C, {
288
+ ref: Z,
289
+ sx: {
290
+ display: "flex",
291
+ flex: "1 1 auto",
292
+ flexDirection: "column",
293
+ overflowY: "auto",
294
+ overflowX: "visible",
295
+ paddingLeft: (e) => e.spacing(E),
296
+ paddingRight: (e) => e.spacing(E),
297
+ paddingTop: (e) => e.spacing(E),
298
+ paddingBottom: (e) => e.spacing(E),
299
+ gap: (e) => e.spacing(1.5)
300
+ },
301
+ children: u
302
+ }, "list-container");
303
+ return p.push(d ? b(e, {
304
+ ids: g,
305
+ onMove: oe,
306
+ scrollRef: Z,
307
+ children: m
308
+ }, "list-container") : m), p;
309
+ }, [
310
+ _,
311
+ $,
312
+ ae,
313
+ ne,
314
+ Y,
315
+ N,
316
+ j,
317
+ K,
318
+ L,
319
+ U,
320
+ se,
321
+ oe,
322
+ J
323
+ ]), de = f(() => D("sxl-items-details", "sxl-anchor-items-details", `sxl-${j.key}-details`, F, {
324
+ editing: null !== G,
325
+ "sxl-has-focus": q,
326
+ "sxl-read-only": ae
327
+ }, s["details-panel"]), [
328
+ F,
329
+ q,
330
+ ae,
331
+ G,
332
+ j
333
+ ]), pe = I([V, p]);
334
+ if (null !== G && Y) {
335
+ const e = Y.EditorBody;
336
+ return b(C, {
337
+ onFocus: () => z(!0),
338
+ onBlur: (e) => {
339
+ V?.current?.contains(e.relatedTarget) || z(!1);
340
+ },
341
+ ref: pe,
342
+ sx: {
343
+ paddingLeft: (e) => e.spacing(1.5),
344
+ paddingRight: (e) => e.spacing(1.5),
345
+ paddingTop: (e) => e.spacing(1.5),
346
+ paddingBottom: (e) => e.spacing(1.5)
347
+ },
348
+ className: de,
349
+ ...W,
350
+ children: b(k, {
351
+ messageKeys: Y.keys,
352
+ onSave: le,
353
+ onCancel: () => H(null),
354
+ children: b(e, {
355
+ draft: G.draft,
356
+ workbook: N
357
+ })
358
+ })
359
+ });
360
+ }
361
+ return w(C, {
362
+ onFocus: () => z(!0),
363
+ onBlur: (e) => {
364
+ V?.current?.contains(e.relatedTarget) || z(!1);
365
+ },
366
+ ref: pe,
367
+ sx: {
368
+ gap: (e) => e.spacing(1),
369
+ paddingLeft: (e) => e.spacing(1.5),
370
+ paddingRight: (e) => e.spacing(1.5),
371
+ paddingTop: (e) => e.spacing(1.5),
372
+ paddingBottom: (e) => e.spacing(1.5)
373
+ },
374
+ className: de,
375
+ ...W,
376
+ children: [ce, P ? b(C, {
377
+ sx: {
378
+ flex: "0 0 auto",
379
+ mx: -1.5,
380
+ mb: -1.5,
381
+ px: 1.5,
382
+ py: .5,
383
+ borderTop: 1,
384
+ borderColor: "divider"
385
+ },
386
+ children: P
387
+ }) : null]
388
+ });
389
+ }));
390
+ N.displayName = "ItemsPanel";
391
+ export { N as t };
@@ -0,0 +1,212 @@
1
+ /**
2
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.12
3
+ *
4
+ * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
+ * License: The license can be found at https://www.sheetxl.com/license.
6
+ */
7
+ import { ICellRange as e } from "@sheetxl/sdk";
8
+ import { addRangeAnnotations as r, clearRangeAnnotations as o, useModelListener as a } from "@sheetxl/react";
9
+ import { DynamicIcon as n } from "@sheetxl/utils-react";
10
+ import { memo as t, useEffect as l, useState as s } from "react";
11
+ import { SimpleTooltip as i } from "@sheetxl/utils-mui";
12
+ import { jsx as c, jsxs as d } from "react/jsx-runtime";
13
+ import { Box as m, Button as u, Chip as h, IconButton as p, Typography as x } from "@mui/material";
14
+ var f = "anomalies", g = {
15
+ formula: "Inconsistent formula",
16
+ formulaRange: "Omits adjacent cells",
17
+ numberStoredAsText: "Number stored as text",
18
+ emptyCellReference: "Refers to an empty cell",
19
+ unlockedFormula: "Unlocked formula",
20
+ hardcodeInRun: "Typed value in a run of formulas",
21
+ styleBreak: "Format break"
22
+ }, y = (e, r) => `'${e.getName().replace(/'/g, "''")}'!${r}`, v = (e) => {
23
+ const r = e.evidence, o = [];
24
+ return void 0 !== r.axis && o.push("row" === r.axis ? "run left and right" : "run above and below"), void 0 !== r.expected && o.push(`run has ${r.expected}`), void 0 !== r.actual && o.push(`here ${r.actual}`), void 0 !== r.reference && o.push(`reads ${r.reference}`), void 0 !== r.omitted && o.push(`stops before ${r.omitted}`), Number(r.thickness) > 1 && o.push(`${r.thickness} thick`), 1 === Number(r.flanks) && o.push("one cell each side"), o.join(" · ");
25
+ }, w = t((t) => {
26
+ const { model: w, args: k, entryKey: b, frame: $, ref: C, ...N } = t, [S, A] = s(() => w?.getSelectedWorksheet() ?? null);
27
+ a(w, { onSheetsChange() {
28
+ A(w?.getSelectedWorksheet() ?? null);
29
+ } });
30
+ const [R, W] = s(null), [D, z] = s(() => /* @__PURE__ */ new Set()), [I, T] = s(0), [j, E] = s(S);
31
+ j !== S && (E(S), W(null), z(/* @__PURE__ */ new Set()));
32
+ const F = () => {
33
+ w && o(w, {
34
+ intent: "working",
35
+ source: f
36
+ });
37
+ };
38
+ if (l(() => F, [w]), !w || !S) return null;
39
+ const M = R?.filter((e) => !D.has(e.key)) ?? [], B = M.reduce((e, r) => e + r.rows * r.cols, 0);
40
+ return d(m, {
41
+ ref: C,
42
+ ...N,
43
+ className: "sxl-anomalies-pane",
44
+ sx: {
45
+ display: "flex",
46
+ flexDirection: "column",
47
+ width: "100%",
48
+ minWidth: 0,
49
+ flex: "1 1 auto",
50
+ height: "100%",
51
+ minHeight: 0,
52
+ overflowX: "hidden"
53
+ },
54
+ children: [d(m, {
55
+ sx: {
56
+ display: "flex",
57
+ alignItems: "center",
58
+ gap: 1,
59
+ flex: "0 0 auto",
60
+ px: 1.5,
61
+ py: 1,
62
+ borderBottom: 1,
63
+ borderColor: "divider"
64
+ },
65
+ children: [c(u, {
66
+ variant: "contained",
67
+ size: "small",
68
+ sx: { textTransform: "none" },
69
+ onClick: () => {
70
+ F();
71
+ const r = performance.now();
72
+ W(((r) => {
73
+ const o = r.getUsedRange();
74
+ return o ? [...o.getRegions(e.Feature.Anomalies)].map((e) => {
75
+ const r = e.getCoords();
76
+ return {
77
+ key: `${r.rowStart},${r.colStart},${r.rowEnd},${r.colEnd}`,
78
+ coords: r,
79
+ address: e.getAddress(),
80
+ rows: e.getRowCount(),
81
+ cols: e.getColumnCount(),
82
+ anomalies: e.getCell().getAnomalies()
83
+ };
84
+ }) : [];
85
+ })(S)), T(Math.round(performance.now() - r)), z(/* @__PURE__ */ new Set());
86
+ },
87
+ children: "Analyze"
88
+ }), c(x, {
89
+ variant: "body2",
90
+ sx: {
91
+ color: "text.secondary",
92
+ minWidth: 0,
93
+ overflow: "hidden",
94
+ textOverflow: "ellipsis",
95
+ whiteSpace: "nowrap"
96
+ },
97
+ children: null === R ? S.getName() : `${S.getName()} · ${M.length} regions · ${B} cells · ${I} ms`
98
+ })]
99
+ }), d(m, {
100
+ className: "sxl-anomalies-list",
101
+ sx: {
102
+ flex: "1 1 auto",
103
+ minHeight: 0,
104
+ overflowY: "auto",
105
+ display: "flex",
106
+ flexDirection: "column",
107
+ gap: 1,
108
+ p: 1.5
109
+ },
110
+ onMouseLeave: F,
111
+ children: [null === R ? c(x, {
112
+ variant: "body2",
113
+ sx: { color: "text.secondary" },
114
+ children: "Analyze lists where this sheet breaks its own patterns."
115
+ }) : 0 === M.length ? c(x, {
116
+ variant: "body2",
117
+ sx: { color: "text.secondary" },
118
+ children: "Nothing breaks a pattern here."
119
+ }) : null, M.map((e) => d(m, {
120
+ className: "sxl-anomalies-card",
121
+ onMouseEnter: () => ((e) => {
122
+ r(w, "working", [{ range: y(S, e.address) }], { source: f });
123
+ })(e),
124
+ onClick: () => {
125
+ S.getRange(e.coords).select();
126
+ },
127
+ sx: {
128
+ display: "flex",
129
+ flexDirection: "column",
130
+ gap: .5,
131
+ flex: "0 0 auto",
132
+ border: 1,
133
+ borderColor: "divider",
134
+ borderRadius: 1,
135
+ px: 1.25,
136
+ py: 1,
137
+ cursor: "pointer",
138
+ "&:hover": { borderColor: "primary.main" }
139
+ },
140
+ children: [d(m, {
141
+ sx: {
142
+ display: "flex",
143
+ alignItems: "center",
144
+ gap: 1
145
+ },
146
+ children: [
147
+ c(x, {
148
+ variant: "body2",
149
+ sx: { fontWeight: 600 },
150
+ children: e.address
151
+ }),
152
+ c(x, {
153
+ variant: "caption",
154
+ sx: { color: "text.secondary" },
155
+ children: `${e.rows}×${e.cols} · rank ${e.anomalies[0]?.rank ?? 0}`
156
+ }),
157
+ c(m, { sx: { flex: "1 1 auto" } }),
158
+ c(i, {
159
+ disableInteractive: !0,
160
+ title: "Dismiss",
161
+ children: c(p, {
162
+ size: "small",
163
+ "aria-label": "Dismiss",
164
+ onClick: (r) => {
165
+ r.stopPropagation(), F(), z((r) => new Set(r).add(e.key));
166
+ },
167
+ children: c(n, { iconKey: "Close" })
168
+ })
169
+ })
170
+ ]
171
+ }), e.anomalies.map((e, r) => {
172
+ const o = e.evidence.corroborated, a = e.evidence.layer;
173
+ return d(m, {
174
+ sx: {
175
+ display: "flex",
176
+ flexDirection: "column",
177
+ gap: .25
178
+ },
179
+ children: [
180
+ c(x, {
181
+ variant: "body2",
182
+ children: `${g[e.check] ?? e.check}${a ? ` · ${a}` : ""}`
183
+ }),
184
+ c(x, {
185
+ variant: "caption",
186
+ sx: {
187
+ color: "text.secondary",
188
+ overflowWrap: "anywhere"
189
+ },
190
+ children: v(e)
191
+ }),
192
+ Array.isArray(o) && o.length > 0 ? c(m, {
193
+ sx: {
194
+ display: "flex",
195
+ flexWrap: "wrap",
196
+ gap: .5
197
+ },
198
+ children: o.map((e) => c(h, {
199
+ size: "small",
200
+ variant: "outlined",
201
+ label: e
202
+ }, e))
203
+ }) : null
204
+ ]
205
+ }, r);
206
+ })]
207
+ }, e.key))]
208
+ })]
209
+ });
210
+ });
211
+ w.displayName = "AnomaliesTaskPane";
212
+ export { w as AnomaliesTaskPane, w as default };
@@ -0,0 +1,72 @@
1
+ /**
2
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.12
3
+ *
4
+ * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
+ * License: The license can be found at https://www.sheetxl.com/license.
6
+ */
7
+ import { c as e, t } from "./gPYAb_A0T5ZwcQ1E.mjs";
8
+ import { t as o } from "./BUGU_5lUtnCRlp3n.mjs";
9
+ import { IFill as l, ShapeStyleUtils as r } from "@sheetxl/sdk";
10
+ import { useGridColorScheme as s } from "@sheetxl/react";
11
+ import { useTranslator as i } from "@sheetxl/utils-react";
12
+ import { memo as a, useEffect as n, useReducer as p } from "react";
13
+ import { jsx as m, jsxs as c } from "react/jsx-runtime";
14
+ import { Box as d, Typography as h } from "@mui/material";
15
+ var u = (e, t, o) => {
16
+ const s = e.toJSON();
17
+ let i = null;
18
+ try {
19
+ i = o.getTheme()?.toJSON() ?? null;
20
+ } catch {
21
+ i = null;
22
+ }
23
+ const a = r.resolve(s ? {
24
+ ...s,
25
+ stroke: void 0
26
+ } : null, i, r.inheritedGroupFill(t)).stroke?.fill, n = a?.type === l.Type.Solid ? a.color : void 0;
27
+ return n ? o.parseColor(n) : o.getNormal().getFont().getColor();
28
+ }, k = (e) => m(h, {
29
+ variant: "subtitle2",
30
+ component: "div",
31
+ children: e.children
32
+ }), g = a((l) => {
33
+ const { movable: r, sheet: a } = l, h = i(), g = r.getContent(), [, y] = p((e) => e + 1, 0);
34
+ n(() => g.addListeners({ onAnyChange: y }), [g]);
35
+ const f = a.getStyles(), S = "dark" === s(), v = g.isReadOnly(), C = g.getStyle(), x = {
36
+ fill: C.getFill(),
37
+ styles: f,
38
+ schemeLookup: f.schemeLookup(),
39
+ darkMode: S,
40
+ disabled: v,
41
+ createCell: (e) => a.createCell(e),
42
+ applyFill: (e, t) => {
43
+ C.setFill(e, { description: t });
44
+ }
45
+ }, F = {
46
+ stroke: C.getStroke(),
47
+ stated: C.toJSON()?.stroke ?? null,
48
+ autoColor: u(g, r, f),
49
+ styles: f,
50
+ schemeLookup: f.schemeLookup(),
51
+ darkMode: S,
52
+ disabled: v,
53
+ applyStroke: (e, t) => {
54
+ C.setStroke(e, { description: t });
55
+ }
56
+ };
57
+ return c(d, {
58
+ sx: {
59
+ ...e,
60
+ gap: 2,
61
+ paddingTop: (e) => e.spacing(1)
62
+ },
63
+ children: [
64
+ m(k, { children: h("shape.pane.fill") }),
65
+ m(t, { selection: x }),
66
+ m(k, { children: h("shape.pane.line") }),
67
+ m(o, { selection: F })
68
+ ]
69
+ });
70
+ });
71
+ g.displayName = "ShapeFormatPanel";
72
+ export { g as ShapeFormatPanel };