@sheetxl/studio-mui 0.8.0-beta.11 → 0.8.0-beta.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/esm/{DDc6rDuU9JAo1DH_.mjs → 6QDKC3DXaJjdTQvn.mjs} +3 -3
- package/browser/esm/{LZoYSQAYV2wksnDv.mjs → B8-aNCyDzXh-3BnN.mjs} +5 -5
- package/browser/esm/{Bujtz_Guj88d03vI.mjs → BEjT3zSht5iH93uB.mjs} +6 -6
- package/browser/esm/{Ds3XRkne7HxcXD8J.mjs → BKB6y-l1USxdLM8V.mjs} +2 -2
- package/browser/esm/{BED6h6YAwCf1HEQJ.mjs → BKE2ez65WLb02bOy.mjs} +1 -1
- package/browser/esm/{C9pIZVACtl9unFOp.mjs → BOKRcLS0QikMyoWf.mjs} +2 -2
- package/browser/esm/{DdcZrjMLWVukWcU5.mjs → BTH-nzAPniB6G4TG.mjs} +814 -685
- package/browser/esm/{BYE9gCDWKyx6mnVs.mjs → Bbvx7IiwR5jW-Hwu.mjs} +114 -103
- package/browser/esm/{zqilJefihVd7At2T.mjs → BgYy8t04q74BFK5_.mjs} +7 -7
- package/browser/esm/{CynTY0oNtyJnoaBq.mjs → BniGX5aeZXM9zMWH.mjs} +1 -1
- package/browser/esm/{D9ISy7VkaRRFJl46.mjs → BsxCXTfNJhFrldW9.mjs} +4 -4
- package/browser/esm/{D3rRUK4dIM5gUSmj.mjs → BwbheU7gonBpE9Bs.mjs} +2 -2
- package/browser/esm/{DDczwkXhz_MHub4z.mjs → BzLjlI67XDv3JcvA.mjs} +2 -2
- package/browser/esm/{DsoNMWDwHZP8UXQd.mjs → C3KoAU2WKPxC5-u7.mjs} +1 -1
- package/browser/esm/{DTpRkgsTm_zYnWfW.mjs → C9HzAN75sBq35kZg.mjs} +1 -1
- package/browser/esm/{BknfGJouygmnpFIU.mjs → CMbJhvtUGfi-wQ3o.mjs} +2 -2
- package/browser/esm/{DnGaP5F7mLwCGUYG.mjs → CQd6qQ6b5R96lYkQ.mjs} +206 -124
- package/browser/esm/{DV6i9RQZfJiKtEaJ.mjs → CYDqU_DnwM2dkv3O.mjs} +678 -623
- package/browser/esm/{ChSVxkPTIjgcC8PL.mjs → CYNVxcg3QJ1RHCwS.mjs} +2 -2
- package/browser/esm/{BjvD_4t2KGsZP5V8.mjs → CcyyIgMejaWOK8qw.mjs} +3 -3
- package/browser/esm/{ClBvNPeNCAhuVWrG.mjs → CkmieJ2_aHVESg8Q.mjs} +1 -1
- package/browser/esm/{Di3BUxA0SqFWWgeg.mjs → CtVEsNpA7LivARDl.mjs} +1 -1
- package/browser/esm/{w_JrR69vEpvoyeMy.mjs → CyRZCFT_uVfmLkoB.mjs} +1 -1
- package/browser/esm/{DpD4fg2WcyiKX_2K.mjs → D2KYXweAKTJVnLbt.mjs} +5 -5
- package/browser/esm/{G0Inqm6Eqw47dMpa.mjs → D9KI3TDs1Ed_en8o.mjs} +1 -1
- package/browser/esm/{CEtXsBzEjEKk9GOj.mjs → DAX7uqV05BahXHL1.mjs} +2 -2
- package/browser/esm/{COlZu93LRwuBvjE-.mjs → DFEz0RMRQrGo3tWC.mjs} +2 -2
- package/browser/esm/{DG21x7RKDpge6zAE.mjs → DLP2vkb2VDlGGA1A.mjs} +1 -1
- package/browser/esm/{BXhNFzyEGokTF-BL.mjs → DSIQFoVhlKSPzucu.mjs} +2 -2
- package/browser/esm/{Buqcl7J75MJrhpVE.mjs → DWUrXikL8TyDNRrI.mjs} +8 -8
- package/browser/esm/{0BWO0bLZ8Vm_dKd2.mjs → DYypTSo0adN5dUTS.mjs} +13 -13
- package/browser/esm/{CTjqDD-swFMZzI-Y.mjs → D_x6k92V4etahUtS.mjs} +2 -2
- package/browser/esm/{YThnrg3PadGs7B4j.mjs → DeSHnKGHmL3Lwl6t.mjs} +143 -137
- package/browser/esm/{BlE_8o8tO2AgAlaj.mjs → DkRUwiADZvoEL2xg.mjs} +1 -1
- package/browser/esm/{BAbq4-I5f5oUiNaF.mjs → DlGOcFqQzrYB9wiZ.mjs} +4 -4
- package/browser/esm/{C0wlMAIn9iREPK6w.mjs → DvDPtmuD-1bVFXhc.mjs} +1 -1
- package/browser/esm/{DKtJxrpN0axtuQ0l.mjs → DyKgCJS1jQMxcPFF.mjs} +1 -1
- package/browser/esm/{CWkOgdL7mOKiTR62.mjs → ERVyjcGWX4mUl1p_.mjs} +4 -4
- package/browser/esm/{HViD4Wfoi0mmqk9w.mjs → H8Dxocn689KdLYhD.mjs} +1 -1
- package/browser/esm/{Brsh5yscJ_4uKFXp.mjs → LF4eGB9EZ_W6kUXC.mjs} +2 -2
- package/browser/esm/{BokqKEpU6TFgfRs6.mjs → PSYAcayGMjkZauMz.mjs} +2 -2
- package/browser/esm/{DJOOed_OtB-XT7f3.mjs → TT3Q8r0Jww_zZmNv.mjs} +6 -6
- package/browser/esm/{C8JU4KsMasmLvojI.mjs → UMji8dlv0GKyfjRw.mjs} +1 -1
- package/browser/esm/UWvqHAyCVY3D-8Pk.mjs +242 -0
- package/browser/esm/{DRSCS6aLiYmPjUz1.mjs → aNYq27kJA5RA4L_0.mjs} +365 -362
- package/browser/esm/{CBD4RiRKbbZtSXV-.mjs → dn1AnYOyR4bZamV4.mjs} +3 -3
- package/browser/esm/{ttjcNHcFn8O6hfnd.mjs → eKakg1lFqn9dZkOO.mjs} +11 -11
- package/browser/esm/index.mjs +290 -287
- package/browser/esm/{CyLn6zOOp_biA3xU.mjs → jbPNLnRSS8Xt5_Zd.mjs} +8 -8
- package/browser/esm/{BvhYPwX3GrRaO9CM.mjs → oj398-Nn8Gb8Cmu7.mjs} +3 -3
- package/browser/esm/{DEv4pIEgYr5C7etm.mjs → qyIg2o8AfCcwCuVZ.mjs} +1 -1
- package/browser/esm/{xFqkfN8QMCxvsetB.mjs → w9rl3kS5ehDc2U18.mjs} +1 -1
- package/node/esm/{Do-zCKziWhoG5eAv.mjs → A-6VdAxUYuVCsS80.mjs} +2 -2
- package/node/esm/{Db3dbaYLKUO66T9s.mjs → BN5K-JWYdHJtnF5G.mjs} +473 -418
- package/node/esm/{CSAnTp5rwId0DUb8.mjs → BRSLQ_UNOJKAWRUq.mjs} +127 -116
- package/node/esm/{Bph-sR3l6AYWeuxK.mjs → BVCjSh6m3Z_Cd6DD.mjs} +2 -2
- package/node/esm/{4HmLH0bPVJCZLgik.mjs → BVyN4cLnT2ii1GMj.mjs} +1 -1
- package/node/esm/{zITjZ7R4raDqhP-n.mjs → BWG2FA3rbsOsBHQM.mjs} +3 -3
- package/node/esm/{DMXLxp3T0E0SRTQc.mjs → BZVe_afv1tfvExD6.mjs} +1 -1
- package/node/esm/{CYIoK22I6Yvv12_x.mjs → BiBMdXkWOUHZpWcb.mjs} +1 -1
- package/node/esm/{1bf4gn-2vld4BZ9u.mjs → Bj-UqmrrHdVSX4vS.mjs} +1 -1
- package/node/esm/{CuMePia6i_8yfJ6S.mjs → Blxb1C2eUbWoXcsl.mjs} +9 -9
- package/node/esm/{CZyA9uD4SkTvqp_G.mjs → BmySpSgR3H6eUK0L.mjs} +253 -253
- package/node/esm/{CPq-MIdEnc-53JpF.mjs → C86bIpa86VUEVY3_.mjs} +2 -2
- package/node/esm/CVeYUjvKIc1XuPC1.mjs +242 -0
- package/node/esm/{XEDcegsv5AGKBfu2.mjs → Cg1eqOYlWMCprF6j.mjs} +2 -2
- package/node/esm/{BlN7G0DVC24zauig.mjs → CksDVaPvtllTUe7F.mjs} +1 -1
- package/node/esm/{BPzcW4BejRqso338.mjs → D0HpdVWcePBpfQHX.mjs} +3 -3
- package/node/esm/{DfCuL8AUxMFoEG2s.mjs → DEK0D7wAs-O0YMBq.mjs} +36 -36
- package/node/esm/{DLqBHdFp6wvm6EGs.mjs → DFZctv5meqoQLuQF.mjs} +1 -1
- package/node/esm/{BIMkjQUwG4Ih-6Sh.mjs → DQ9BkHy3YgoLqyAw.mjs} +1 -1
- package/node/esm/{D-xqQ5qOSd6WrzwJ.mjs → DTtGcAuClHgv-5s6.mjs} +1 -1
- package/node/esm/{CvRbu8JPxFarsSR-.mjs → DcUXYRkJLeQFybOy.mjs} +5 -5
- package/node/esm/{CjC6s3RUJQNCF7mP.mjs → DjB5CHk5N8mYRiAW.mjs} +1 -1
- package/node/esm/{DeZJlLk8WJ3BLtLs.mjs → DopRYDglwpRFuZ9y.mjs} +3 -3
- package/node/esm/E3iNwBp5FzwRWhBH.mjs +489 -0
- package/node/esm/{DWqvf4H5F2wMnZ0L.mjs → Mm5HFZHyaIJ5EfYO.mjs} +1 -1
- package/node/esm/{CWcv7UVXF8IUB0PC.mjs → VLp3LfRG5Njlf4Mp.mjs} +15 -15
- package/node/esm/{CyafafEgfmjLqE5O.mjs → YTiLYQEQ-ST2j-Yd.mjs} +1 -1
- package/node/esm/{DdEzhVqYTrGODXrz.mjs → h5Tt_pl2Dpa9vaR-.mjs} +1 -1
- package/node/esm/index.mjs +2936 -2800
- package/node/esm/{BR45ogAR-hY2bE60.mjs → nVZW0-P7DISm9GFM.mjs} +1 -1
- package/node/esm/{yCUxQuqVuC4DHKPx.mjs → sKA_898BrWm-kfiS.mjs} +1 -1
- package/node/esm/{3WghtBXAvCDwcVrq.mjs → uySjOpgLC6iCqgC-.mjs} +1 -1
- package/node/esm/{BNg4QQY0WAPLE0q7.mjs → xw7vek0VNw7ofbq1.mjs} +3 -3
- package/node/esm/{DpJ2gmZJioCyq8La.mjs → zZTOpRFxWBgeZTpk.mjs} +166 -160
- package/package.json +9 -9
- package/resources/locales/de/groups.cmd.json +16 -1
- package/resources/locales/de/ui.msg.json +3 -1
- package/resources/locales/en/groups.cmd.json +16 -1
- package/resources/locales/en/ui.msg.json +3 -1
- package/types/src/border/BorderPopupButton.d.ts +1 -1
- package/types/src/color/ColorPopupButton.d.ts +1 -1
- package/types/src/command/AccountingStyleCommandButton.d.ts +1 -1
- package/types/src/command/DocThemeCommandButton.d.ts +1 -1
- package/types/src/command/FontFamilyCommandButton.d.ts +1 -1
- package/types/src/command/FontSizeCommandButton.d.ts +1 -1
- package/types/src/command/InsertCellControlCommandButton.d.ts +17 -0
- package/types/src/command/LanguageCommandButton.d.ts +1 -1
- package/types/src/command/LocaleCommandButton.d.ts +1 -1
- package/types/src/command/index.d.ts +1 -0
- package/types/src/conditionalFormat/IconPickerPopupButton.d.ts +1 -1
- package/types/src/conditions/ConditionEditor.d.ts +1 -1
- package/types/src/conditions/MembershipOption.d.ts +1 -1
- package/types/src/conditions/OperatorAndParamEditor.d.ts +1 -1
- package/types/src/conditions/OperatorSelectPopupButton.d.ts +1 -1
- package/types/src/conditions/SelectorSelect.d.ts +1 -1
- package/types/src/dataValidation/DataValidationEditorPanel.d.ts +1 -1
- package/types/src/dialog/HyperlinkDialog.d.ts +15 -0
- package/types/src/externalLink/ExternalLinkSettingsTab.d.ts +1 -1
- package/types/src/fill/PatternPopupButton.d.ts +1 -1
- package/types/src/filter/ColumnMenu.d.ts +1 -1
- package/types/src/formulaBar/IFormulaBar.d.ts +4 -2
- package/types/src/itemsPanel/ItemsPanel.d.ts +5 -0
- package/types/src/named/NamedDetailsPanel.d.ts +2 -2
- package/types/src/shape/ShapeGalleryCommandButton.d.ts +18 -0
- package/types/src/shape/ShapePlugin.d.ts +2 -0
- package/types/src/shape/index.d.ts +1 -1
- package/types/src/statusBar/PendingStatus.d.ts +19 -0
- package/types/src/statusBar/index.d.ts +1 -0
- package/types/src/studio/StudioProps.d.ts +10 -10
- package/types/src/template/TemplatePanel.d.ts +5 -1
- package/types/src/theme/ThemeSelectPopupButton.d.ts +1 -1
- package/types/src/toolbar/WorkbookToolbars.d.ts +1 -1
- package/types/src/workbook/DefaultRenderers.d.ts +30 -18
- package/types/src/workbook/WorkbookElement.d.ts +5 -4
- package/types/src/workbook/WorkbookStrip.d.ts +8 -7
- package/types/src/workbook/index.d.ts +1 -1
- package/browser/esm/QgaAIDUMmBQBsXP9.mjs +0 -236
- package/node/esm/B0bdb_6p7fQI_ivo.mjs +0 -236
- package/node/esm/DatM6eEYPpAtIMy-.mjs +0 -405
- package/types/src/shape/InsertShapeCommandButton.d.ts +0 -20
package/browser/esm/index.mjs
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
(function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.appendChild(document.createTextNode(`._sheetxl-reset_11z3j_1{margin:0;padding:0;line-height:1;display:block}._sheetxl-reset_11z3j_1 table,._sheetxl-reset_11z3j_1 thead,._sheetxl-reset_11z3j_1 tbody,._sheetxl-reset_11z3j_1 tfoot,._sheetxl-reset_11z3j_1 tr,._sheetxl-reset_11z3j_1 th,._sheetxl-reset_11z3j_1 td{border-collapse:inherit;border-spacing:0;border:none;border-color:inherit;width:auto;height:auto;vertical-align:inherit;text-align:left;font-weight:inherit;-webkit-border-horizontal-spacing:0;-webkit-border-vertical-spacing:0;margin:0;padding:0;display:block}._sheetxl-reset_11z3j_1 th,._sheetxl-reset_11z3j_1 td{display:inline}html{color:initial}._stats-items_151a8_1{flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:2px;min-width:0;max-height:1rem;display:flex;overflow:hidden}._stats-item_151a8_1{flex-shrink:0}._stats-item-label_151a8_15{user-select:none;white-space:nowrap;cursor:pointer;border-radius:2px;align-items:center;gap:4px;padding:0 4px;transition:background-color .2s;display:flex}._stats-item-label_151a8_15:hover{background-color:#0000000a}._stats-item-label_151a8_15:active{background-color:#00000014}._formula-bar_uer84_1{flex-direction:row;flex:100%;align-items:start;display:flex}._details-panel_mdq6z_1{box-sizing:border-box;background:0 0;flex-direction:column;flex:auto;align-items:stretch;width:100%;height:100%;display:flex;overflow:hidden}._editor_mdq6z_13{flex-direction:column;height:100%;display:flex}._editor-panel_mdq6z_19{flex-direction:column;display:flex}._editor-buttons_mdq6z_24{justify-content:flex-end;display:flex}._card_mdq6z_29{flex-direction:column;display:flex}._table-style-options-container_1kfn2_1{container-type:inline-size}._table-style-options_1kfn2_1{user-select:none;grid-template-columns:1fr;display:grid;@container (width>600px){grid-template-rows:repeat(3,auto);grid-auto-columns:1fr;grid-auto-flow:column;gap:2px}}._range-row_1yps2_1{flex-direction:column;flex:100%;align-items:center;row-gap:8px;width:100%;display:flex;@container (width>600px){flex-direction:row;justify-content:space-between;gap:12px}}._action-row_1yps2_17{flex-direction:column;align-items:start;gap:4px;width:100%;display:flex;@container (width>600px){flex-direction:row;justify-content:space-evenly;align-items:center}}._card_h0jnt_7{width:100%}._actionRoot_h0jnt_11{justify-content:space-between;padding:8px 8px 8px 16px}._icons_h0jnt_16{align-items:center;margin-left:auto;display:flex}._expand_h0jnt_22{color:var(--sxl-color-error-content);padding:8px;transition:all .2s ease-in-out;transform:rotate(0)}._expandOpen_h0jnt_29{transform:rotate(180deg)}._stackTraceContainer_h0jnt_33{padding:16px}._paper_h0jnt_37{background-color:#fff;padding:16px}._checkIcon_h0jnt_42{padding-right:4px;font-size:20px}._button_h0jnt_47{text-transform:none;padding:0}._styled-resizer_fdl5y_3{background-color:var(--sxl-color-neutral,grey)}._styled-resizer_fdl5y_3:hover,.splitPane.dragging ._styled-resizer_fdl5y_3{background-color:var(--sxl-color-primary,blue)}/*$vite$:1*/`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();
|
|
2
2
|
/**
|
|
3
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.
|
|
3
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.13
|
|
4
4
|
*
|
|
5
5
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
6
6
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
7
7
|
*/
|
|
8
|
-
import { $ as e, A as t, B as n, C as r,
|
|
9
|
-
import { c as
|
|
10
|
-
import { t as
|
|
11
|
-
import { a as
|
|
12
|
-
import { t as
|
|
13
|
-
import { a as
|
|
14
|
-
import { n as
|
|
15
|
-
import { t as
|
|
16
|
-
import { n as
|
|
17
|
-
import { t as
|
|
18
|
-
import { n as
|
|
19
|
-
import { a as
|
|
20
|
-
import { t as
|
|
21
|
-
import { t as
|
|
22
|
-
import { Color as
|
|
23
|
-
import { DefaultTaskPaneRegistry as
|
|
24
|
-
import { CommandButtonType as
|
|
25
|
-
import { Suspense as
|
|
26
|
-
import { CommandButton as Y, CommandGroup as
|
|
27
|
-
import { Fragment as
|
|
28
|
-
import { Box as $, FormControl as
|
|
29
|
-
import { defineLazyModule as
|
|
30
|
-
var
|
|
8
|
+
import { $ as e, A as t, B as n, C as r, Ct as i, D as a, E as o, Et as s, F as c, G as l, H as u, I as d, J as f, K as p, L as m, M as h, N as g, O as _, P as v, Q as y, R as b, S as x, St as S, T as C, Tt as w, U as T, V as E, W as D, X as O, Y as k, Z as A, _ as j, _t as M, a as N, at as P, b as ee, bt as te, c as ne, ct as F, d as re, dt as ie, et as I, f as ae, ft as oe, g as se, gt as ce, h as le, ht as ue, i as de, it as fe, j as pe, k as me, l as he, lt as ge, m as _e, mt as ve, n as ye, nt as be, o as xe, ot as Se, p as Ce, pt as we, q as Te, r as Ee, s as De, st as Oe, tt as ke, u as Ae, ut as je, v as Me, vt as Ne, w as Pe, wt as Fe, x as Ie, xt as Le, y as Re, yt as ze, z as Be } from "./BTH-nzAPniB6G4TG.mjs";
|
|
9
|
+
import { c as Ve, i as He, l as Ue, n as We, o as Ge, r as Ke, s as qe, t as Je } from "./BEjT3zSht5iH93uB.mjs";
|
|
10
|
+
import { t as Ye } from "./UMji8dlv0GKyfjRw.mjs";
|
|
11
|
+
import { a as Xe } from "./jbPNLnRSS8Xt5_Zd.mjs";
|
|
12
|
+
import { t as L } from "./CkmieJ2_aHVESg8Q.mjs";
|
|
13
|
+
import { a as Ze, c as Qe, n as $e, o as et, s as tt, t as nt } from "./DYypTSo0adN5dUTS.mjs";
|
|
14
|
+
import { n as rt, r as it, t as at } from "./TT3Q8r0Jww_zZmNv.mjs";
|
|
15
|
+
import { t as ot } from "./H8Dxocn689KdLYhD.mjs";
|
|
16
|
+
import { n as st, t as ct } from "./6QDKC3DXaJjdTQvn.mjs";
|
|
17
|
+
import { t as lt } from "./BKE2ez65WLb02bOy.mjs";
|
|
18
|
+
import { n as ut, r as dt, t as ft } from "./PSYAcayGMjkZauMz.mjs";
|
|
19
|
+
import { a as pt, i as mt, n as ht, o as gt, r as _t, t as vt } from "./DFEz0RMRQrGo3tWC.mjs";
|
|
20
|
+
import { t as yt } from "./CYNVxcg3QJ1RHCwS.mjs";
|
|
21
|
+
import { t as bt } from "./DvDPtmuD-1bVFXhc.mjs";
|
|
22
|
+
import { Color as xt, IFill as R, LicenseManager as St, LicenseManager as Ct } from "@sheetxl/sdk";
|
|
23
|
+
import { DefaultTaskPaneRegistry as wt, ThemeStateDefaults as Tt, ThemeStateKey as Et, WorkbookIO as Dt, WorkbookIO as Ot, setPrintExamplesOnLoad as kt, useInputField as At, useModelListener as jt, useRangeListener as Mt, useWindowChrome as Nt, useWorkbook as Pt, useWorkbookFormat as Ft, useWorkbookName as It } from "@sheetxl/react";
|
|
24
|
+
import { CommandButtonType as Lt, DynamicIcon as z, RenderSlot as Rt, createThemeScopeClass as zt, lazyComponent as Bt, useCallbackRef as B, useCommandButtonEntry as Vt, useCommandButtonRegistry as Ht, useCommands as Ut, useFloatStack as Wt, useLocationSearch as Gt, usePersistentState as Kt, useResolvedThemeMode as qt, useTextSelectionDrag as Jt, useTranslator as V } from "@sheetxl/utils-react";
|
|
25
|
+
import { Suspense as Yt, createElement as Xt, forwardRef as H, memo as U, useCallback as W, useEffect as G, useId as Zt, useImperativeHandle as Qt, useLayoutEffect as $t, useMemo as K, useRef as q, useState as J } from "react";
|
|
26
|
+
import { CommandButton as Y, CommandGroup as en, CommandPopupButton as X, ExhibitDivider as tn, ExhibitIconButton as nn, ExhibitPopupIconButton as rn, ExhibitTooltip as an, LabelIcon as on, LazyLoadErrorPanel as sn, SimpleTooltip as cn, defaultRenderPopupPanel as ln, renderMembers as un } from "@sheetxl/utils-mui";
|
|
27
|
+
import { Fragment as dn, jsx as Z, jsxs as Q } from "react/jsx-runtime";
|
|
28
|
+
import { Box as $, FormControl as fn, InputAdornment as pn, InputLabel as mn, MenuItem as hn, Paper as gn, Select as _n, TextField as vn, Typography as yn, useMediaQuery as bn, useTheme as xn } from "@mui/material";
|
|
29
|
+
import { defineLazyModule as Sn } from "@sheetxl/utils";
|
|
30
|
+
var Cn = (e) => {
|
|
31
31
|
e.button === 0 && e.preventDefault();
|
|
32
|
-
},
|
|
33
|
-
let { disabled: n, className: r, sx: i, defaultInput: a, value: o, formName: s, formOptions: c, onChangeInput: l, onChangeText: u, onDone: d, changeOn: f, onValidate: p, apiRef: m, label: h, helperText: g, showError: _ = !0, onChangeError: v, hideAdornment: y, propsInput: b, onKeyDown: x, onFocus: S, ...C } = e, w =
|
|
32
|
+
}, wn = U(H((e, t) => {
|
|
33
|
+
let { disabled: n, className: r, sx: i, defaultInput: a, value: o, formName: s, formOptions: c, onChangeInput: l, onChangeText: u, onDone: d, changeOn: f, onValidate: p, apiRef: m, label: h, helperText: g, showError: _ = !0, onChangeError: v, hideAdornment: y, propsInput: b, onKeyDown: x, onFocus: S, ...C } = e, w = V(), T = Jt(), E = h ?? w("namedInput.label"), D = ot(), O = s && D ? D.register(s, c) : null, k = At({
|
|
34
34
|
value: o ?? "",
|
|
35
35
|
onChange: l,
|
|
36
36
|
onChangeText: u,
|
|
@@ -39,7 +39,7 @@ var en = (e) => {
|
|
|
39
39
|
onValidate: p,
|
|
40
40
|
disabled: n
|
|
41
41
|
});
|
|
42
|
-
|
|
42
|
+
Qt(m, () => k, [k]);
|
|
43
43
|
let A = q(D);
|
|
44
44
|
A.current = D;
|
|
45
45
|
let j = q(v);
|
|
@@ -50,10 +50,10 @@ var en = (e) => {
|
|
|
50
50
|
let e = A.current;
|
|
51
51
|
e && (k.error ? e.setError(s, { message: w(k.error) }) : e.clearErrors(s));
|
|
52
52
|
}, [k.error, s]);
|
|
53
|
-
let N = f === "done", P = k.engaged && k.dirty,
|
|
54
|
-
if (!y && N) return Q(
|
|
53
|
+
let N = f === "done", P = k.engaged && k.dirty, ee = K(() => {
|
|
54
|
+
if (!y && N) return Q(pn, {
|
|
55
55
|
tabIndex: -1,
|
|
56
|
-
onMouseDown:
|
|
56
|
+
onMouseDown: Cn,
|
|
57
57
|
"aria-hidden": !P,
|
|
58
58
|
sx: {
|
|
59
59
|
display: "flex",
|
|
@@ -65,34 +65,34 @@ var en = (e) => {
|
|
|
65
65
|
}
|
|
66
66
|
},
|
|
67
67
|
position: "end",
|
|
68
|
-
children: [Z(
|
|
68
|
+
children: [Z(nn, {
|
|
69
69
|
dense: !0,
|
|
70
70
|
outlined: !1,
|
|
71
71
|
color: "primary",
|
|
72
72
|
"aria-label": "commit-input",
|
|
73
|
-
icon: Z(
|
|
73
|
+
icon: Z(z, { iconKey: "CheckSuccess" }),
|
|
74
74
|
propsTooltip: {
|
|
75
75
|
label: w("referenceInput.commit"),
|
|
76
76
|
simple: !0
|
|
77
77
|
},
|
|
78
78
|
disabled: !!k.error,
|
|
79
79
|
tabIndex: -1,
|
|
80
|
-
onMouseDown:
|
|
80
|
+
onMouseDown: Cn,
|
|
81
81
|
onClick: () => {
|
|
82
82
|
k.commit();
|
|
83
83
|
}
|
|
84
|
-
}), Z(
|
|
84
|
+
}), Z(nn, {
|
|
85
85
|
dense: !0,
|
|
86
86
|
outlined: !1,
|
|
87
87
|
color: "warning",
|
|
88
88
|
"aria-label": "cancel-input",
|
|
89
|
-
icon: Z(
|
|
89
|
+
icon: Z(z, { iconKey: "CloseError" }),
|
|
90
90
|
propsTooltip: {
|
|
91
91
|
label: w("referenceInput.cancel"),
|
|
92
92
|
simple: !0
|
|
93
93
|
},
|
|
94
94
|
tabIndex: -1,
|
|
95
|
-
onMouseDown:
|
|
95
|
+
onMouseDown: Cn,
|
|
96
96
|
onClick: () => {
|
|
97
97
|
k.cancel();
|
|
98
98
|
}
|
|
@@ -106,7 +106,7 @@ var en = (e) => {
|
|
|
106
106
|
k.cancel,
|
|
107
107
|
!!k.error
|
|
108
108
|
]);
|
|
109
|
-
return Z(
|
|
109
|
+
return Z(fn, {
|
|
110
110
|
sx: {
|
|
111
111
|
minWidth: 135,
|
|
112
112
|
width: "100%",
|
|
@@ -114,9 +114,9 @@ var en = (e) => {
|
|
|
114
114
|
},
|
|
115
115
|
size: "small",
|
|
116
116
|
ref: t,
|
|
117
|
-
className:
|
|
117
|
+
className: L("sxl-input-field", r),
|
|
118
118
|
...C,
|
|
119
|
-
children: Z(
|
|
119
|
+
children: Z(vn, {
|
|
120
120
|
label: E,
|
|
121
121
|
placeholder: a,
|
|
122
122
|
disabled: n,
|
|
@@ -124,7 +124,7 @@ var en = (e) => {
|
|
|
124
124
|
helperText: k.error && _ ? w(k.error) : g === void 0 ? " " : g,
|
|
125
125
|
sx: { "& .MuiFormHelperText-root": { marginTop: (e) => e.spacing(.5) } },
|
|
126
126
|
slotProps: {
|
|
127
|
-
input: { endAdornment:
|
|
127
|
+
input: { endAdornment: ee },
|
|
128
128
|
inputLabel: { shrink: !0 },
|
|
129
129
|
htmlInput: {
|
|
130
130
|
spellCheck: !1,
|
|
@@ -132,7 +132,7 @@ var en = (e) => {
|
|
|
132
132
|
onPointerDown: T.onPointerDown,
|
|
133
133
|
onDragStart: T.onDragStart,
|
|
134
134
|
...b,
|
|
135
|
-
className:
|
|
135
|
+
className: L("autoFocus", b?.className),
|
|
136
136
|
name: s,
|
|
137
137
|
readOnly: n,
|
|
138
138
|
sx: {
|
|
@@ -163,40 +163,40 @@ var en = (e) => {
|
|
|
163
163
|
})
|
|
164
164
|
});
|
|
165
165
|
}));
|
|
166
|
-
|
|
167
|
-
var
|
|
168
|
-
let { groupKey: n = "workbook", disabled: r, ...i } = e, [a, o] = J([]), s =
|
|
166
|
+
wn.displayName = "InputField";
|
|
167
|
+
var Tn = U(H((e, t) => {
|
|
168
|
+
let { groupKey: n = "workbook", disabled: r, ...i } = e, [a, o] = J([]), s = Ot.canWrite(), c = Ot.canRead();
|
|
169
169
|
G(() => {
|
|
170
170
|
let e = !0;
|
|
171
|
-
return
|
|
171
|
+
return Ot.getWriteFormats().then((t) => {
|
|
172
172
|
e && o(t);
|
|
173
173
|
}), () => {
|
|
174
174
|
e = !1;
|
|
175
175
|
};
|
|
176
176
|
}, []);
|
|
177
|
-
let l =
|
|
177
|
+
let l = Pt(), u = Ft(l), d = K(() => {
|
|
178
178
|
if (a.length === 0) return null;
|
|
179
179
|
let e = u?.toLowerCase();
|
|
180
180
|
return (e ? a.find((t) => t.key.toLowerCase() === e) ?? a.find((t) => t.exts?.some((t) => t.toLowerCase() === e)) : void 0) ?? a.find((e) => e.exts?.some((e) => e.toLowerCase() === "sxl")) ?? a.find((e) => !e.advanced) ?? a[0];
|
|
181
|
-
}, [a, u]), [f] =
|
|
181
|
+
}, [a, u]), [f] = Ut(d ? `saveWorkbookAs${d.key}` : []), p = Ht(), m = p.resolveMembers("newWorkbookOptions") ?? ["newWorkbook"], h = B((e) => {
|
|
182
182
|
let t = {
|
|
183
|
-
variant:
|
|
183
|
+
variant: Lt.Menuitem,
|
|
184
184
|
groupKey: n,
|
|
185
185
|
disabled: r
|
|
186
|
-
}, i = Q(
|
|
186
|
+
}, i = Q(dn, { children: [
|
|
187
187
|
m.length > 1 ? Z(X, {
|
|
188
188
|
...t,
|
|
189
189
|
quickCommand: "newWorkbook",
|
|
190
|
-
|
|
191
|
-
let t =
|
|
192
|
-
variant:
|
|
190
|
+
renderPopupPanel: (e) => {
|
|
191
|
+
let t = un(m, {
|
|
192
|
+
variant: Lt.Menuitem,
|
|
193
193
|
dividerOrientation: "horizontal",
|
|
194
194
|
groupKey: "newWorkbookOptions",
|
|
195
195
|
registry: p,
|
|
196
196
|
propsCommandButton: { disabled: r },
|
|
197
197
|
propsCommandPopup: { disabled: r }
|
|
198
198
|
});
|
|
199
|
-
return
|
|
199
|
+
return ln({
|
|
200
200
|
...e,
|
|
201
201
|
children: t,
|
|
202
202
|
onClick: () => {
|
|
@@ -208,24 +208,24 @@ var nn = U(Ot((e, t) => {
|
|
|
208
208
|
...t,
|
|
209
209
|
commandKey: "newWorkbook"
|
|
210
210
|
}),
|
|
211
|
-
Z(
|
|
211
|
+
Z(tn, { orientation: "horizontal" }),
|
|
212
212
|
c ? Z(X, {
|
|
213
213
|
...t,
|
|
214
214
|
quickCommand: "openWorkbook",
|
|
215
|
-
|
|
215
|
+
renderPopupPanel: (e) => {
|
|
216
216
|
let n = {
|
|
217
217
|
...t,
|
|
218
218
|
groupKey: "openWorkbookOptions"
|
|
219
|
-
}, r = [
|
|
219
|
+
}, r = [Xt(Y, {
|
|
220
220
|
...n,
|
|
221
221
|
key: "device",
|
|
222
222
|
commandKey: "openWorkbook"
|
|
223
|
-
}),
|
|
223
|
+
}), Xt(Y, {
|
|
224
224
|
...n,
|
|
225
225
|
key: "web",
|
|
226
226
|
commandKey: "openWorkbookFromUrl"
|
|
227
227
|
})];
|
|
228
|
-
return
|
|
228
|
+
return ln({
|
|
229
229
|
...e,
|
|
230
230
|
children: r,
|
|
231
231
|
onClick: () => {
|
|
@@ -237,25 +237,25 @@ var nn = U(Ot((e, t) => {
|
|
|
237
237
|
s && a.length > 0 ? Z(X, {
|
|
238
238
|
...t,
|
|
239
239
|
quickCommand: "saveWorkbook",
|
|
240
|
-
|
|
240
|
+
renderPopupPanel: (e) => {
|
|
241
241
|
let n = {
|
|
242
242
|
...t,
|
|
243
243
|
groupKey: "saveWorkbookOptions"
|
|
244
|
-
}, r = [
|
|
244
|
+
}, r = [Xt(Y, {
|
|
245
245
|
...n,
|
|
246
246
|
key: "saveWorkbookAs",
|
|
247
247
|
commandKey: "saveWorkbookAs",
|
|
248
248
|
label: f?.getLabel("saveWorkbookOptions"),
|
|
249
249
|
icon: f?.getIcon("saveWorkbookOptions")
|
|
250
250
|
})], i = a.filter((e) => !e.advanced && e.key !== d?.key);
|
|
251
|
-
return i.length > 0 && r.push(Z(
|
|
251
|
+
return i.length > 0 && r.push(Z(tn, { orientation: "horizontal" }, "divider")), i.forEach((e) => {
|
|
252
252
|
let t = e.key, i = `saveWorkbookAs${t}`;
|
|
253
|
-
r.push(
|
|
253
|
+
r.push(Xt(Y, {
|
|
254
254
|
...n,
|
|
255
255
|
key: t,
|
|
256
256
|
commandKey: i
|
|
257
257
|
}));
|
|
258
|
-
}),
|
|
258
|
+
}), ln({
|
|
259
259
|
...e,
|
|
260
260
|
children: r,
|
|
261
261
|
onClick: () => {
|
|
@@ -265,7 +265,7 @@ var nn = U(Ot((e, t) => {
|
|
|
265
265
|
}
|
|
266
266
|
}) : null
|
|
267
267
|
] });
|
|
268
|
-
return
|
|
268
|
+
return ln({
|
|
269
269
|
...e,
|
|
270
270
|
children: i,
|
|
271
271
|
onClick: (t) => {
|
|
@@ -280,7 +280,7 @@ var nn = U(Ot((e, t) => {
|
|
|
280
280
|
f,
|
|
281
281
|
m,
|
|
282
282
|
p
|
|
283
|
-
]), g =
|
|
283
|
+
]), g = Vt("fileOptions"), _ = g?.getLabel?.() ?? "File", v = g?.getDescription?.() ?? "Options for saving and loading the workbook.";
|
|
284
284
|
return Z(X, {
|
|
285
285
|
disabled: r,
|
|
286
286
|
groupKey: n,
|
|
@@ -295,22 +295,22 @@ var nn = U(Ot((e, t) => {
|
|
|
295
295
|
}
|
|
296
296
|
},
|
|
297
297
|
...i,
|
|
298
|
-
|
|
299
|
-
icon: Z(
|
|
298
|
+
renderPopupPanel: h,
|
|
299
|
+
icon: Z(on, {
|
|
300
300
|
className: "label",
|
|
301
301
|
icon: null,
|
|
302
302
|
label: _
|
|
303
303
|
})
|
|
304
304
|
});
|
|
305
305
|
}));
|
|
306
|
-
|
|
307
|
-
var
|
|
308
|
-
let { groupKey: n, disabled: r, ...i } = e, [a] =
|
|
306
|
+
Tn.displayName = "FileCommandButton";
|
|
307
|
+
var En = U(H((e, t) => {
|
|
308
|
+
let { groupKey: n, disabled: r, ...i } = e, [a] = Ut(["themeMode"]), o = Vt("appearanceOptions"), s = B((e) => {
|
|
309
309
|
let t = {
|
|
310
|
-
variant:
|
|
310
|
+
variant: Lt.Menuitem,
|
|
311
311
|
groupKey: "appearanceOptions",
|
|
312
312
|
disabled: r
|
|
313
|
-
}, n = Q(
|
|
313
|
+
}, n = Q(dn, { children: [
|
|
314
314
|
Z(Y, {
|
|
315
315
|
...t,
|
|
316
316
|
commandKey: "themeMode"
|
|
@@ -319,7 +319,7 @@ var rn = U(Ot((e, t) => {
|
|
|
319
319
|
...t,
|
|
320
320
|
commandKey: "defaultThemeMode"
|
|
321
321
|
}),
|
|
322
|
-
Z(
|
|
322
|
+
Z(tn, { orientation: "horizontal" }),
|
|
323
323
|
Z(Y, {
|
|
324
324
|
...t,
|
|
325
325
|
commandKey: "enableDarkGrid"
|
|
@@ -329,7 +329,7 @@ var rn = U(Ot((e, t) => {
|
|
|
329
329
|
commandKey: "enableDarkImages"
|
|
330
330
|
})
|
|
331
331
|
] });
|
|
332
|
-
return
|
|
332
|
+
return ln({
|
|
333
333
|
...e,
|
|
334
334
|
children: n
|
|
335
335
|
});
|
|
@@ -337,11 +337,11 @@ var rn = U(Ot((e, t) => {
|
|
|
337
337
|
r,
|
|
338
338
|
a,
|
|
339
339
|
n
|
|
340
|
-
]), c = a?.getState(), l =
|
|
340
|
+
]), c = a?.getState(), l = bn("(prefers-color-scheme: dark)"), u = c === "dark" || c === null && l, d = a?.getState() !== null;
|
|
341
341
|
return Z(X, {
|
|
342
342
|
ref: t,
|
|
343
343
|
quickCommand: "themeMode",
|
|
344
|
-
|
|
344
|
+
renderPopupPanel: s,
|
|
345
345
|
label: o?.getLabel?.(),
|
|
346
346
|
tooltip: o?.getDescription?.(),
|
|
347
347
|
onQuickClick: () => {
|
|
@@ -350,16 +350,16 @@ var rn = U(Ot((e, t) => {
|
|
|
350
350
|
selected: d,
|
|
351
351
|
...i
|
|
352
352
|
});
|
|
353
|
-
})),
|
|
353
|
+
})), Dn = U(H((e, t) => {
|
|
354
354
|
let { ...n } = e;
|
|
355
|
-
return Z(
|
|
355
|
+
return Z(en, {
|
|
356
356
|
ref: t,
|
|
357
357
|
groupKey: "insertFunctionSumOptions",
|
|
358
358
|
...n
|
|
359
359
|
});
|
|
360
360
|
}));
|
|
361
|
-
function
|
|
362
|
-
return e ===
|
|
361
|
+
function On(e, t, n) {
|
|
362
|
+
return e === R.BuiltInSheetPattern.Solid ? {
|
|
363
363
|
foreground: n,
|
|
364
364
|
background: t
|
|
365
365
|
} : {
|
|
@@ -367,12 +367,12 @@ function on(e, t, n) {
|
|
|
367
367
|
background: n
|
|
368
368
|
};
|
|
369
369
|
}
|
|
370
|
-
|
|
371
|
-
var
|
|
370
|
+
Dn.displayName = "InsertFunctionSumCommandPopupButton";
|
|
371
|
+
var kn = U((e) => {
|
|
372
372
|
let { patternType: t, foreground: n, background: r, createCell: i, darkMode: a = !1, className: o, style: s, ...c } = e, l = K(() => {
|
|
373
|
-
let e =
|
|
373
|
+
let e = On(t, n, r);
|
|
374
374
|
return i({ style: { fill: {
|
|
375
|
-
type:
|
|
375
|
+
type: R.Type.Pattern,
|
|
376
376
|
patternType: t,
|
|
377
377
|
foreground: e.foreground ?? void 0,
|
|
378
378
|
background: e.background ?? void 0
|
|
@@ -385,7 +385,7 @@ var sn = U((e) => {
|
|
|
385
385
|
a
|
|
386
386
|
]);
|
|
387
387
|
return Z("div", {
|
|
388
|
-
className:
|
|
388
|
+
className: L("sxl-pattern-swatch", o),
|
|
389
389
|
style: {
|
|
390
390
|
width: "100%",
|
|
391
391
|
height: "100%",
|
|
@@ -395,53 +395,53 @@ var sn = U((e) => {
|
|
|
395
395
|
...c
|
|
396
396
|
});
|
|
397
397
|
});
|
|
398
|
-
|
|
399
|
-
var
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
398
|
+
kn.displayName = "PatternSwatch";
|
|
399
|
+
var An = Object.freeze([
|
|
400
|
+
R.BuiltInSheetPattern.Solid,
|
|
401
|
+
R.BuiltInSheetPattern.DarkGray,
|
|
402
|
+
R.BuiltInSheetPattern.MediumGray,
|
|
403
|
+
R.BuiltInSheetPattern.LightGray,
|
|
404
|
+
R.BuiltInSheetPattern.Gray125,
|
|
405
|
+
R.BuiltInSheetPattern.Gray0625,
|
|
406
|
+
R.BuiltInSheetPattern.DarkHorizontal,
|
|
407
|
+
R.BuiltInSheetPattern.DarkVertical,
|
|
408
|
+
R.BuiltInSheetPattern.DarkDown,
|
|
409
|
+
R.BuiltInSheetPattern.DarkUp,
|
|
410
|
+
R.BuiltInSheetPattern.DarkGrid,
|
|
411
|
+
R.BuiltInSheetPattern.DarkTrellis,
|
|
412
|
+
R.BuiltInSheetPattern.LightHorizontal,
|
|
413
|
+
R.BuiltInSheetPattern.LightVertical,
|
|
414
|
+
R.BuiltInSheetPattern.LightDown,
|
|
415
|
+
R.BuiltInSheetPattern.LightUp,
|
|
416
|
+
R.BuiltInSheetPattern.LightGrid,
|
|
417
|
+
R.BuiltInSheetPattern.LightTrellis
|
|
418
418
|
]);
|
|
419
|
-
function
|
|
419
|
+
function jn(e, t) {
|
|
420
420
|
switch (t) {
|
|
421
|
-
case
|
|
422
|
-
case
|
|
423
|
-
case
|
|
424
|
-
case
|
|
425
|
-
case
|
|
426
|
-
case
|
|
427
|
-
case
|
|
428
|
-
case
|
|
429
|
-
case
|
|
430
|
-
case
|
|
431
|
-
case
|
|
432
|
-
case
|
|
433
|
-
case
|
|
434
|
-
case
|
|
435
|
-
case
|
|
436
|
-
case
|
|
437
|
-
case
|
|
438
|
-
case
|
|
439
|
-
case
|
|
421
|
+
case R.BuiltInSheetPattern.None: return e("fill.pattern.none");
|
|
422
|
+
case R.BuiltInSheetPattern.Solid: return e("fill.pattern.solid");
|
|
423
|
+
case R.BuiltInSheetPattern.Gray0625: return e("fill.pattern.gray0625");
|
|
424
|
+
case R.BuiltInSheetPattern.Gray125: return e("fill.pattern.gray125");
|
|
425
|
+
case R.BuiltInSheetPattern.LightGray: return e("fill.pattern.lightGray");
|
|
426
|
+
case R.BuiltInSheetPattern.MediumGray: return e("fill.pattern.mediumGray");
|
|
427
|
+
case R.BuiltInSheetPattern.DarkGray: return e("fill.pattern.darkGray");
|
|
428
|
+
case R.BuiltInSheetPattern.LightHorizontal: return e("fill.pattern.lightHorizontal");
|
|
429
|
+
case R.BuiltInSheetPattern.LightVertical: return e("fill.pattern.lightVertical");
|
|
430
|
+
case R.BuiltInSheetPattern.LightDown: return e("fill.pattern.lightDown");
|
|
431
|
+
case R.BuiltInSheetPattern.LightUp: return e("fill.pattern.lightUp");
|
|
432
|
+
case R.BuiltInSheetPattern.LightGrid: return e("fill.pattern.lightGrid");
|
|
433
|
+
case R.BuiltInSheetPattern.LightTrellis: return e("fill.pattern.lightTrellis");
|
|
434
|
+
case R.BuiltInSheetPattern.DarkHorizontal: return e("fill.pattern.darkHorizontal");
|
|
435
|
+
case R.BuiltInSheetPattern.DarkVertical: return e("fill.pattern.darkVertical");
|
|
436
|
+
case R.BuiltInSheetPattern.DarkDown: return e("fill.pattern.darkDown");
|
|
437
|
+
case R.BuiltInSheetPattern.DarkUp: return e("fill.pattern.darkUp");
|
|
438
|
+
case R.BuiltInSheetPattern.DarkGrid: return e("fill.pattern.darkGrid");
|
|
439
|
+
case R.BuiltInSheetPattern.DarkTrellis: return e("fill.pattern.darkTrellis");
|
|
440
440
|
default: return t;
|
|
441
441
|
}
|
|
442
442
|
}
|
|
443
|
-
var
|
|
444
|
-
let { selectedPattern: t, foreground: n, background: r, onSelectPattern: i, createCell: a, darkMode: o = !1, disabled: s, ...c } = e, l =
|
|
443
|
+
var Mn = U((e) => {
|
|
444
|
+
let { selectedPattern: t, foreground: n, background: r, onSelectPattern: i, createCell: a, darkMode: o = !1, disabled: s, ...c } = e, l = V(), u = B(i ?? ((e) => {}), [i]), d = W((e) => {
|
|
445
445
|
let { closeFloat: i } = e;
|
|
446
446
|
return Z($, {
|
|
447
447
|
sx: {
|
|
@@ -450,12 +450,12 @@ var un = U((e) => {
|
|
|
450
450
|
gap: "4px",
|
|
451
451
|
padding: "8px"
|
|
452
452
|
},
|
|
453
|
-
children:
|
|
454
|
-
label:
|
|
453
|
+
children: An.map((e) => Z(an, {
|
|
454
|
+
label: jn(l, e),
|
|
455
455
|
children: Z($, {
|
|
456
456
|
role: "button",
|
|
457
457
|
tabIndex: 0,
|
|
458
|
-
"aria-label":
|
|
458
|
+
"aria-label": jn(l, e),
|
|
459
459
|
"aria-pressed": e === t,
|
|
460
460
|
onMouseDown: (e) => e.preventDefault(),
|
|
461
461
|
onMouseUp: () => {
|
|
@@ -473,7 +473,7 @@ var un = U((e) => {
|
|
|
473
473
|
outlineOffset: "-1px",
|
|
474
474
|
"&:hover": { outline: (e) => `2px solid ${e.palette.primary.light}` }
|
|
475
475
|
},
|
|
476
|
-
children: Z(
|
|
476
|
+
children: Z(kn, {
|
|
477
477
|
patternType: e,
|
|
478
478
|
foreground: n,
|
|
479
479
|
background: r,
|
|
@@ -492,10 +492,10 @@ var un = U((e) => {
|
|
|
492
492
|
u,
|
|
493
493
|
l
|
|
494
494
|
]);
|
|
495
|
-
return Z(
|
|
495
|
+
return Z(rn, {
|
|
496
496
|
disabled: s,
|
|
497
|
-
tooltip: l("fill.patternTooltip", { pattern:
|
|
498
|
-
|
|
497
|
+
tooltip: l("fill.patternTooltip", { pattern: jn(l, t) }),
|
|
498
|
+
renderPopupPanel: d,
|
|
499
499
|
icon: Z($, {
|
|
500
500
|
sx: {
|
|
501
501
|
width: "48px",
|
|
@@ -505,7 +505,7 @@ var un = U((e) => {
|
|
|
505
505
|
outlineOffset: "-1px",
|
|
506
506
|
overflow: "hidden"
|
|
507
507
|
},
|
|
508
|
-
children: Z(
|
|
508
|
+
children: Z(kn, {
|
|
509
509
|
patternType: t,
|
|
510
510
|
foreground: n,
|
|
511
511
|
background: r,
|
|
@@ -516,13 +516,13 @@ var un = U((e) => {
|
|
|
516
516
|
...c
|
|
517
517
|
});
|
|
518
518
|
});
|
|
519
|
-
|
|
520
|
-
var
|
|
519
|
+
Mn.displayName = "PatternPopupButton";
|
|
520
|
+
var Nn = {
|
|
521
521
|
resizeOnOverflow: !1,
|
|
522
522
|
placement: "bottom",
|
|
523
523
|
offsets: [0, 2],
|
|
524
524
|
shift: { padding: 8 }
|
|
525
|
-
},
|
|
525
|
+
}, Pn = ((e) => {
|
|
526
526
|
let t = [], n = e.length;
|
|
527
527
|
for (let r = 0; r < n; r++) {
|
|
528
528
|
let [i, a] = e[(r + n - 1) % n], [o, s, c] = e[r], [l, u] = e[(r + 1) % n], d = (e, t) => {
|
|
@@ -558,24 +558,24 @@ var dn = {
|
|
|
558
558
|
6,
|
|
559
559
|
1.5
|
|
560
560
|
]
|
|
561
|
-
]),
|
|
561
|
+
]), Fn = (e) => Math.max(0, Math.min(1, e)), In = (e, t, n) => {
|
|
562
562
|
try {
|
|
563
|
-
return (e instanceof
|
|
563
|
+
return (e instanceof xt ? e : new xt(e, t)).toCSS(n);
|
|
564
564
|
} catch {
|
|
565
565
|
return "transparent";
|
|
566
566
|
}
|
|
567
|
-
},
|
|
567
|
+
}, Ln = (e, t, n) => {
|
|
568
568
|
try {
|
|
569
|
-
let r = new
|
|
569
|
+
let r = new xt(e, n).toRGBA(), i = new xt(t, n).toRGBA(), a = (e, t) => Math.round((e + t) / 2).toString(16).padStart(2, "0");
|
|
570
570
|
return `${a(r.red, i.red)}${a(r.green, i.green)}${a(r.blue, i.blue)}`;
|
|
571
571
|
} catch {
|
|
572
572
|
return e;
|
|
573
573
|
}
|
|
574
|
-
},
|
|
575
|
-
let { percent: t, disabled: n, inputRef: r, onChange: i } = e, a =
|
|
574
|
+
}, Rn = (e, t) => e.offset === t.offset && String(e.color) === String(t.color), zn = (e, t) => e.length === t.length && e.every((e, n) => Rn(e, t[n])), Bn = U((e) => {
|
|
575
|
+
let { percent: t, disabled: n, inputRef: r, onChange: i } = e, a = V(), [o, s] = J(String(t)), [c, l] = J(!1);
|
|
576
576
|
return G(() => {
|
|
577
577
|
c || s(String(t));
|
|
578
|
-
}, [t, c]), Z(
|
|
578
|
+
}, [t, c]), Z(vn, {
|
|
579
579
|
type: "number",
|
|
580
580
|
size: "small",
|
|
581
581
|
disabled: n,
|
|
@@ -599,7 +599,7 @@ var dn = {
|
|
|
599
599
|
style: { textAlign: "right" }
|
|
600
600
|
},
|
|
601
601
|
inputLabel: { shrink: !0 },
|
|
602
|
-
input: { endAdornment: Z(
|
|
602
|
+
input: { endAdornment: Z(pn, {
|
|
603
603
|
position: "end",
|
|
604
604
|
disableTypography: !0,
|
|
605
605
|
children: "%"
|
|
@@ -608,13 +608,13 @@ var dn = {
|
|
|
608
608
|
sx: { width: 120 }
|
|
609
609
|
});
|
|
610
610
|
});
|
|
611
|
-
|
|
612
|
-
var
|
|
613
|
-
let { index: t, stop: n, offset: r, schemeLookup: i, recentColors: a, darkMode: o, disabled: s, canRemove: c, rampRef: l, onDrag: u, onMove: d, onPreviewColor: f, onChangeColor: p, onRemove: m, onOpenChange: h } = e, g =
|
|
611
|
+
Bn.displayName = "StopPositionField";
|
|
612
|
+
var Vn = U((e) => {
|
|
613
|
+
let { index: t, stop: n, offset: r, schemeLookup: i, recentColors: a, darkMode: o, disabled: s, canRemove: c, rampRef: l, onDrag: u, onMove: d, onPreviewColor: f, onChangeColor: p, onRemove: m, onOpenChange: h } = e, g = V(), _ = xn(), v = K(() => new xt(n.color, i), [n.color, i]), [y, b] = J(void 0), [x, S] = J(null), [C, w] = J(!1), [T, E] = J(!1), [D, O] = J(!1), [k, A] = J(!1), j = q(null), M = q(!1), N = B((e) => {
|
|
614
614
|
b(e), f(t, e ?? null);
|
|
615
|
-
}, [t, f]), P =
|
|
615
|
+
}, [t, f]), P = B((e) => {
|
|
616
616
|
d(t, e / 100);
|
|
617
|
-
}, [t, d]),
|
|
617
|
+
}, [t, d]), ee = Math.round(100 * r), te = In(y ?? v, i, o), ne = W((e) => {
|
|
618
618
|
let { closeFloat: n } = e;
|
|
619
619
|
return Q($, {
|
|
620
620
|
className: "sxl-gradient-stop-popup",
|
|
@@ -622,7 +622,7 @@ var yn = U((e) => {
|
|
|
622
622
|
display: "flex",
|
|
623
623
|
flexDirection: "column"
|
|
624
624
|
},
|
|
625
|
-
children: [Z(
|
|
625
|
+
children: [Z(He, {
|
|
626
626
|
selectedColor: v,
|
|
627
627
|
previewColor: y,
|
|
628
628
|
disableAlpha: !0,
|
|
@@ -643,8 +643,8 @@ var yn = U((e) => {
|
|
|
643
643
|
paddingX: 1,
|
|
644
644
|
paddingBottom: 1
|
|
645
645
|
},
|
|
646
|
-
children: Z(
|
|
647
|
-
percent:
|
|
646
|
+
children: Z(Bn, {
|
|
647
|
+
percent: ee,
|
|
648
648
|
disabled: s,
|
|
649
649
|
inputRef: j,
|
|
650
650
|
onChange: P
|
|
@@ -654,7 +654,7 @@ var yn = U((e) => {
|
|
|
654
654
|
}, [
|
|
655
655
|
v,
|
|
656
656
|
y,
|
|
657
|
-
|
|
657
|
+
ee,
|
|
658
658
|
t,
|
|
659
659
|
i,
|
|
660
660
|
a,
|
|
@@ -663,71 +663,71 @@ var yn = U((e) => {
|
|
|
663
663
|
N,
|
|
664
664
|
p,
|
|
665
665
|
P
|
|
666
|
-
]),
|
|
666
|
+
]), F = Wt({
|
|
667
667
|
anchor: x,
|
|
668
668
|
label: "gradient-stop",
|
|
669
|
-
|
|
670
|
-
propsPopper:
|
|
669
|
+
renderPopupPanel: ne,
|
|
670
|
+
propsPopper: Nn,
|
|
671
671
|
onOpen: () => {
|
|
672
672
|
w(!0), h(t, !0), M.current && (M.current = !1, requestAnimationFrame(() => j.current?.focus()));
|
|
673
673
|
},
|
|
674
674
|
onClose: () => {
|
|
675
675
|
w(!1), h(t, !1), N(void 0);
|
|
676
676
|
}
|
|
677
|
-
}),
|
|
678
|
-
M.current = e,
|
|
679
|
-
}, [
|
|
680
|
-
C ?
|
|
677
|
+
}), re = B((e) => {
|
|
678
|
+
M.current = e, F.reference.open(0);
|
|
679
|
+
}, [F]), ie = B(() => {
|
|
680
|
+
C ? F.reference.close(0) : re(!1);
|
|
681
681
|
}, [
|
|
682
682
|
C,
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
]),
|
|
686
|
-
s || e.button !== 0 || (e.currentTarget.setPointerCapture(e.pointerId),
|
|
683
|
+
F,
|
|
684
|
+
re
|
|
685
|
+
]), I = q(null), ae = B((e) => {
|
|
686
|
+
s || e.button !== 0 || (e.currentTarget.setPointerCapture(e.pointerId), I.current = {
|
|
687
687
|
pointerId: e.pointerId,
|
|
688
688
|
startX: e.clientX,
|
|
689
689
|
startOffset: r,
|
|
690
690
|
moved: !1,
|
|
691
691
|
offset: r
|
|
692
692
|
});
|
|
693
|
-
}, [s, r]),
|
|
694
|
-
let n =
|
|
693
|
+
}, [s, r]), oe = B((e) => {
|
|
694
|
+
let n = I.current;
|
|
695
695
|
if (!n || n.pointerId !== e.pointerId) return;
|
|
696
696
|
let r = e.clientX - n.startX;
|
|
697
697
|
if (!n.moved) {
|
|
698
698
|
if (Math.abs(r) < 3) return;
|
|
699
|
-
n.moved = !0, E(!0), A(!1),
|
|
699
|
+
n.moved = !0, E(!0), A(!1), F.reference.close(0);
|
|
700
700
|
}
|
|
701
701
|
let i = l.current?.getBoundingClientRect().width ?? 0;
|
|
702
|
-
n.offset = i > 0 ?
|
|
702
|
+
n.offset = i > 0 ? Fn(n.startOffset + r / i) : n.startOffset, u(t, n.offset, !1);
|
|
703
703
|
}, [
|
|
704
704
|
t,
|
|
705
705
|
l,
|
|
706
|
-
|
|
706
|
+
F,
|
|
707
707
|
u
|
|
708
|
-
]),
|
|
709
|
-
let n =
|
|
708
|
+
]), se = B((e) => {
|
|
709
|
+
let n = I.current;
|
|
710
710
|
if (n && n.pointerId === e.pointerId) {
|
|
711
|
-
if (
|
|
712
|
-
|
|
711
|
+
if (I.current = null, n.moved) return E(!1), u(t, n.offset, !0), void d(t, n.offset);
|
|
712
|
+
ie();
|
|
713
713
|
}
|
|
714
714
|
}, [
|
|
715
715
|
t,
|
|
716
716
|
u,
|
|
717
717
|
d,
|
|
718
|
-
|
|
719
|
-
]),
|
|
720
|
-
let n =
|
|
721
|
-
n && n.pointerId === e.pointerId && (
|
|
722
|
-
}, [t, u]),
|
|
718
|
+
ie
|
|
719
|
+
]), ce = B((e) => {
|
|
720
|
+
let n = I.current;
|
|
721
|
+
n && n.pointerId === e.pointerId && (I.current = null, n.moved && (E(!1), u(t, n.startOffset, !0)));
|
|
722
|
+
}, [t, u]), le = B((e) => {
|
|
723
723
|
if (s) return;
|
|
724
724
|
let n = e.shiftKey ? .1 : .01;
|
|
725
725
|
switch (e.key) {
|
|
726
726
|
case "ArrowLeft":
|
|
727
|
-
d(t,
|
|
727
|
+
d(t, Fn(r - n));
|
|
728
728
|
break;
|
|
729
729
|
case "ArrowRight":
|
|
730
|
-
d(t,
|
|
730
|
+
d(t, Fn(r + n));
|
|
731
731
|
break;
|
|
732
732
|
case "Home":
|
|
733
733
|
d(t, 0);
|
|
@@ -741,11 +741,11 @@ var yn = U((e) => {
|
|
|
741
741
|
break;
|
|
742
742
|
case "Enter":
|
|
743
743
|
case " ":
|
|
744
|
-
|
|
744
|
+
re(!0);
|
|
745
745
|
break;
|
|
746
746
|
case "Escape":
|
|
747
747
|
if (!C) return;
|
|
748
|
-
|
|
748
|
+
F.reference.close(0);
|
|
749
749
|
break;
|
|
750
750
|
default: return;
|
|
751
751
|
}
|
|
@@ -756,11 +756,11 @@ var yn = U((e) => {
|
|
|
756
756
|
r,
|
|
757
757
|
c,
|
|
758
758
|
C,
|
|
759
|
-
|
|
760
|
-
|
|
759
|
+
F,
|
|
760
|
+
re,
|
|
761
761
|
d,
|
|
762
762
|
m
|
|
763
|
-
]),
|
|
763
|
+
]), ue = C || T || D, de = !s && !T && !C && k, fe = Q($, {
|
|
764
764
|
className: "sxl-gradient-stop-toolbar",
|
|
765
765
|
onPointerDown: (e) => {
|
|
766
766
|
e.stopPropagation();
|
|
@@ -770,7 +770,7 @@ var yn = U((e) => {
|
|
|
770
770
|
alignItems: "center",
|
|
771
771
|
gap: .25
|
|
772
772
|
},
|
|
773
|
-
children: [Z(
|
|
773
|
+
children: [Z(nn, {
|
|
774
774
|
tabIndex: -1,
|
|
775
775
|
propsTooltip: {
|
|
776
776
|
label: g("fill.gradientStopColor"),
|
|
@@ -780,27 +780,27 @@ var yn = U((e) => {
|
|
|
780
780
|
className: "color-wrapper",
|
|
781
781
|
sx: {
|
|
782
782
|
lineHeight: 0,
|
|
783
|
-
"& .activeColor": { fill:
|
|
783
|
+
"& .activeColor": { fill: te }
|
|
784
784
|
},
|
|
785
|
-
children: Z(
|
|
785
|
+
children: Z(z, { iconKey: "circle.colored" })
|
|
786
786
|
}),
|
|
787
787
|
onClick: () => {
|
|
788
|
-
A(!1),
|
|
788
|
+
A(!1), ie();
|
|
789
789
|
}
|
|
790
|
-
}), Z(
|
|
790
|
+
}), Z(nn, {
|
|
791
791
|
tabIndex: -1,
|
|
792
792
|
disabled: !c,
|
|
793
793
|
propsTooltip: {
|
|
794
794
|
label: g("fill.gradientRemoveStop"),
|
|
795
795
|
simple: !0
|
|
796
796
|
},
|
|
797
|
-
icon: Z(
|
|
797
|
+
icon: Z(z, { iconKey: "Close" }),
|
|
798
798
|
onClick: () => m(t)
|
|
799
799
|
})]
|
|
800
800
|
});
|
|
801
|
-
return Q(
|
|
802
|
-
title:
|
|
803
|
-
open:
|
|
801
|
+
return Q(dn, { children: [Z(cn, {
|
|
802
|
+
title: fe,
|
|
803
|
+
open: de,
|
|
804
804
|
onOpen: () => A(!0),
|
|
805
805
|
onClose: () => A(!1),
|
|
806
806
|
enterDelay: 250,
|
|
@@ -821,19 +821,19 @@ var yn = U((e) => {
|
|
|
821
821
|
ref: S,
|
|
822
822
|
role: "button",
|
|
823
823
|
tabIndex: s ? -1 : 0,
|
|
824
|
-
"aria-label": g("fill.gradientStop", { position:
|
|
824
|
+
"aria-label": g("fill.gradientStop", { position: ee }),
|
|
825
825
|
"aria-disabled": s || void 0,
|
|
826
|
-
className:
|
|
826
|
+
className: L("sxl-gradient-stop", {
|
|
827
827
|
"sxl-gradient-stop-open": C,
|
|
828
828
|
"sxl-gradient-stop-dragging": T
|
|
829
829
|
}),
|
|
830
|
-
onPointerDown:
|
|
831
|
-
onPointerMove:
|
|
832
|
-
onPointerUp:
|
|
833
|
-
onPointerCancel:
|
|
830
|
+
onPointerDown: ae,
|
|
831
|
+
onPointerMove: oe,
|
|
832
|
+
onPointerUp: se,
|
|
833
|
+
onPointerCancel: ce,
|
|
834
834
|
onFocus: () => O(!0),
|
|
835
835
|
onBlur: () => O(!1),
|
|
836
|
-
onKeyDown:
|
|
836
|
+
onKeyDown: le,
|
|
837
837
|
sx: {
|
|
838
838
|
position: "absolute",
|
|
839
839
|
left: 100 * r + "%",
|
|
@@ -847,7 +847,7 @@ var yn = U((e) => {
|
|
|
847
847
|
touchAction: "none",
|
|
848
848
|
outline: "none",
|
|
849
849
|
zIndex: +!!T,
|
|
850
|
-
filter:
|
|
850
|
+
filter: ue ? `drop-shadow(0 1px 2px ${_.palette.action.active})` : void 0
|
|
851
851
|
},
|
|
852
852
|
children: Z("svg", {
|
|
853
853
|
width: 14,
|
|
@@ -855,28 +855,28 @@ var yn = U((e) => {
|
|
|
855
855
|
viewBox: "0 0 14 17",
|
|
856
856
|
"aria-hidden": "true",
|
|
857
857
|
children: Z("path", {
|
|
858
|
-
d:
|
|
859
|
-
fill:
|
|
860
|
-
stroke:
|
|
861
|
-
strokeWidth:
|
|
858
|
+
d: Pn,
|
|
859
|
+
fill: te,
|
|
860
|
+
stroke: ue ? _.palette.primary.main : _.palette.text.secondary,
|
|
861
|
+
strokeWidth: ue ? 1.5 : 1,
|
|
862
862
|
strokeLinejoin: "round"
|
|
863
863
|
})
|
|
864
864
|
})
|
|
865
865
|
})
|
|
866
|
-
}),
|
|
866
|
+
}), F.component] });
|
|
867
867
|
});
|
|
868
|
-
|
|
869
|
-
var
|
|
870
|
-
let { stops: t, onChange: n, minStops: r = 2, maxStops: i = 8, schemeLookup: a, recentColors: o, darkMode: s = !1, disabled: c = !1, className: l, ...u } = e, d =
|
|
868
|
+
Vn.displayName = "StopHandle";
|
|
869
|
+
var Hn = U((e) => {
|
|
870
|
+
let { stops: t, onChange: n, minStops: r = 2, maxStops: i = 8, schemeLookup: a, recentColors: o, darkMode: s = !1, disabled: c = !1, className: l, ...u } = e, d = V(), f = q(null), p = q({
|
|
871
871
|
known: [],
|
|
872
872
|
next: 1
|
|
873
873
|
}), m = K(() => {
|
|
874
874
|
let e = p.current, n = ((e, t, n) => {
|
|
875
|
-
for (let n of t) if (
|
|
875
|
+
for (let n of t) if (zn(e, n.stops)) return n.keys;
|
|
876
876
|
let r = /* @__PURE__ */ new Set();
|
|
877
877
|
return e.map((e) => {
|
|
878
878
|
for (let n of t) {
|
|
879
|
-
let t = n.stops.findIndex((t, i) => !r.has(n.keys[i]) &&
|
|
879
|
+
let t = n.stops.findIndex((t, i) => !r.has(n.keys[i]) && Rn(t, e));
|
|
880
880
|
if (t >= 0) return r.add(n.keys[t]), n.keys[t];
|
|
881
881
|
}
|
|
882
882
|
return -1;
|
|
@@ -887,33 +887,33 @@ var bn = U((e) => {
|
|
|
887
887
|
keys: n
|
|
888
888
|
}, ...e.known].slice(0, 3)), n;
|
|
889
889
|
}, [t]), [h, g] = J(null), [_, v] = J(null), [y, b] = J(null);
|
|
890
|
-
|
|
890
|
+
$t(() => {
|
|
891
891
|
g((e) => {
|
|
892
892
|
if (!e?.released) return e;
|
|
893
893
|
let n = m.indexOf(e.key);
|
|
894
894
|
return n >= 0 && t[n].offset === e.offset ? null : e;
|
|
895
895
|
});
|
|
896
|
-
}, [t, m]),
|
|
896
|
+
}, [t, m]), $t(() => {
|
|
897
897
|
if (!h?.released) return;
|
|
898
898
|
let e = window.setTimeout(() => g((e) => e?.released ? null : e), 1e3);
|
|
899
899
|
return () => window.clearTimeout(e);
|
|
900
900
|
}, [h]);
|
|
901
|
-
let x = !c && t.length < i, S = !c && t.length > r, C =
|
|
901
|
+
let x = !c && t.length < i, S = !c && t.length > r, C = B((e) => {
|
|
902
902
|
let t = [...e].sort((e, t) => e.stop.offset - t.stop.offset), r = {
|
|
903
903
|
stops: t.map((e) => e.stop),
|
|
904
904
|
keys: t.map((e) => e.key)
|
|
905
905
|
}, i = p.current;
|
|
906
906
|
i.known = [r, ...i.known].slice(0, 3), n(r.stops.slice());
|
|
907
|
-
}, [n]), w =
|
|
907
|
+
}, [n]), w = B(() => t.map((e, t) => ({
|
|
908
908
|
stop: e,
|
|
909
909
|
key: m[t]
|
|
910
|
-
})), [t, m]), T =
|
|
910
|
+
})), [t, m]), T = B((e, t, n) => {
|
|
911
911
|
g({
|
|
912
912
|
key: m[e],
|
|
913
913
|
offset: t,
|
|
914
914
|
released: n
|
|
915
915
|
});
|
|
916
|
-
}, [m]), E =
|
|
916
|
+
}, [m]), E = B((e, t) => {
|
|
917
917
|
C(w().map((n, r) => r === e ? {
|
|
918
918
|
...n,
|
|
919
919
|
stop: {
|
|
@@ -921,15 +921,15 @@ var bn = U((e) => {
|
|
|
921
921
|
offset: t
|
|
922
922
|
}
|
|
923
923
|
} : n));
|
|
924
|
-
}, [w, C]), D =
|
|
924
|
+
}, [w, C]), D = B((e, t) => {
|
|
925
925
|
v(t ? {
|
|
926
926
|
key: m[e],
|
|
927
927
|
color: t
|
|
928
928
|
} : null);
|
|
929
|
-
}, [m]), O =
|
|
929
|
+
}, [m]), O = B((e, t) => {
|
|
930
930
|
let n = m[e];
|
|
931
931
|
b((e) => t ? n : e === n ? null : e);
|
|
932
|
-
}, [m]), k =
|
|
932
|
+
}, [m]), k = B((e, t) => {
|
|
933
933
|
C(w().map((n, r) => r === e ? {
|
|
934
934
|
...n,
|
|
935
935
|
stop: {
|
|
@@ -937,14 +937,14 @@ var bn = U((e) => {
|
|
|
937
937
|
color: t.toString()
|
|
938
938
|
}
|
|
939
939
|
} : n));
|
|
940
|
-
}, [w, C]), A =
|
|
940
|
+
}, [w, C]), A = B((e) => {
|
|
941
941
|
t.length <= r || C(w().filter((t, n) => n !== e));
|
|
942
942
|
}, [
|
|
943
943
|
t,
|
|
944
944
|
r,
|
|
945
945
|
w,
|
|
946
946
|
C
|
|
947
|
-
]), j =
|
|
947
|
+
]), j = B((e) => {
|
|
948
948
|
if (t.length >= i) return;
|
|
949
949
|
let n = [...t].sort((e, t) => e.offset - t.offset), r = e;
|
|
950
950
|
if (r === void 0) {
|
|
@@ -959,7 +959,7 @@ var bn = U((e) => {
|
|
|
959
959
|
C([...w(), {
|
|
960
960
|
stop: {
|
|
961
961
|
offset: r,
|
|
962
|
-
color:
|
|
962
|
+
color: Ln(o.color, s.color, a)
|
|
963
963
|
},
|
|
964
964
|
key: p.current.next++
|
|
965
965
|
}]);
|
|
@@ -969,10 +969,10 @@ var bn = U((e) => {
|
|
|
969
969
|
a,
|
|
970
970
|
w,
|
|
971
971
|
C
|
|
972
|
-
]), M =
|
|
972
|
+
]), M = B((e) => {
|
|
973
973
|
if (!x || e.button !== 0 || y !== null || e.target.closest(".sxl-gradient-stop")) return;
|
|
974
974
|
let t = e.currentTarget.getBoundingClientRect();
|
|
975
|
-
t.width <= 0 || j(
|
|
975
|
+
t.width <= 0 || j(Fn((e.clientX - t.left) / t.width));
|
|
976
976
|
}, [
|
|
977
977
|
x,
|
|
978
978
|
y,
|
|
@@ -980,7 +980,7 @@ var bn = U((e) => {
|
|
|
980
980
|
]), N = K(() => {
|
|
981
981
|
let e = t.map((e, t) => ({
|
|
982
982
|
offset: h?.key === m[t] ? h.offset : e.offset,
|
|
983
|
-
css:
|
|
983
|
+
css: In(_?.key === m[t] ? _.color : e.color, a, s)
|
|
984
984
|
}));
|
|
985
985
|
return e.sort((e, t) => e.offset - t.offset), `linear-gradient(90deg, ${e.map((e) => `${e.css} ${(100 * e.offset).toFixed(2)}%`).join(", ")})`;
|
|
986
986
|
}, [
|
|
@@ -992,7 +992,7 @@ var bn = U((e) => {
|
|
|
992
992
|
s
|
|
993
993
|
]);
|
|
994
994
|
return Q($, {
|
|
995
|
-
className:
|
|
995
|
+
className: L("sxl-gradient-stops", l),
|
|
996
996
|
sx: {
|
|
997
997
|
display: "flex",
|
|
998
998
|
alignItems: "flex-start",
|
|
@@ -1021,7 +1021,7 @@ var bn = U((e) => {
|
|
|
1021
1021
|
cursor: x ? "copy" : "default",
|
|
1022
1022
|
opacity: c ? .5 : 1
|
|
1023
1023
|
},
|
|
1024
|
-
children: t.map((e, t) => Z(
|
|
1024
|
+
children: t.map((e, t) => Z(Vn, {
|
|
1025
1025
|
index: t,
|
|
1026
1026
|
stop: e,
|
|
1027
1027
|
offset: h?.key === m[t] ? h.offset : e.offset,
|
|
@@ -1039,28 +1039,28 @@ var bn = U((e) => {
|
|
|
1039
1039
|
onOpenChange: O
|
|
1040
1040
|
}, m[t]))
|
|
1041
1041
|
})
|
|
1042
|
-
}), Z(
|
|
1042
|
+
}), Z(nn, {
|
|
1043
1043
|
disabled: !x,
|
|
1044
1044
|
propsTooltip: {
|
|
1045
1045
|
label: d("fill.gradientAddStop"),
|
|
1046
1046
|
simple: !0
|
|
1047
1047
|
},
|
|
1048
|
-
icon: Z(
|
|
1048
|
+
icon: Z(z, { iconKey: "Add" }),
|
|
1049
1049
|
onClick: () => j(),
|
|
1050
1050
|
sx: { marginTop: "-3px" }
|
|
1051
1051
|
})]
|
|
1052
1052
|
});
|
|
1053
1053
|
});
|
|
1054
|
-
|
|
1055
|
-
var
|
|
1056
|
-
let { value: t, onChange: n, minStops: r, maxStops: i, schemeLookup: a, recentColors: o, darkMode: s = !1, disabled: c = !1, className: l, ...u } = e, d =
|
|
1054
|
+
Hn.displayName = "GradientStopsBar";
|
|
1055
|
+
var Un = U((e) => {
|
|
1056
|
+
let { value: t, onChange: n, minStops: r, maxStops: i, schemeLookup: a, recentColors: o, darkMode: s = !1, disabled: c = !1, className: l, ...u } = e, d = V(), f = B((e) => {
|
|
1057
1057
|
n({
|
|
1058
1058
|
...t,
|
|
1059
1059
|
...e
|
|
1060
1060
|
});
|
|
1061
|
-
}, [t, n]), p = t.gradientType ===
|
|
1061
|
+
}, [t, n]), p = t.gradientType === R.GradientType.Linear;
|
|
1062
1062
|
return Q($, {
|
|
1063
|
-
className:
|
|
1063
|
+
className: L("sxl-gradient-editor", l),
|
|
1064
1064
|
sx: {
|
|
1065
1065
|
display: "flex",
|
|
1066
1066
|
flexDirection: "column",
|
|
@@ -1075,30 +1075,30 @@ var xn = U((e) => {
|
|
|
1075
1075
|
gap: 1,
|
|
1076
1076
|
alignItems: "center"
|
|
1077
1077
|
},
|
|
1078
|
-
children: [Q(
|
|
1078
|
+
children: [Q(fn, {
|
|
1079
1079
|
size: "small",
|
|
1080
1080
|
sx: {
|
|
1081
1081
|
minWidth: 132,
|
|
1082
1082
|
flex: "1 1 132px"
|
|
1083
1083
|
},
|
|
1084
|
-
children: [Z(
|
|
1084
|
+
children: [Z(mn, {
|
|
1085
1085
|
shrink: !0,
|
|
1086
1086
|
children: d("fill.gradientStyle")
|
|
1087
|
-
}), Q(
|
|
1087
|
+
}), Q(_n, {
|
|
1088
1088
|
label: d("fill.gradientStyle"),
|
|
1089
1089
|
notched: !0,
|
|
1090
1090
|
disabled: c,
|
|
1091
1091
|
value: t.gradientType,
|
|
1092
1092
|
onChange: (e) => f({ gradientType: e.target.value }),
|
|
1093
|
-
children: [Z(
|
|
1094
|
-
value:
|
|
1093
|
+
children: [Z(hn, {
|
|
1094
|
+
value: R.GradientType.Linear,
|
|
1095
1095
|
children: d("fill.gradientLinear")
|
|
1096
|
-
}), Z(
|
|
1097
|
-
value:
|
|
1096
|
+
}), Z(hn, {
|
|
1097
|
+
value: R.GradientType.Path,
|
|
1098
1098
|
children: d("fill.gradientRadial")
|
|
1099
1099
|
})]
|
|
1100
1100
|
})]
|
|
1101
|
-
}), Z(
|
|
1101
|
+
}), Z(vn, {
|
|
1102
1102
|
label: d("fill.gradientAngle"),
|
|
1103
1103
|
type: "number",
|
|
1104
1104
|
size: "small",
|
|
@@ -1125,12 +1125,12 @@ var xn = U((e) => {
|
|
|
1125
1125
|
gap: .5,
|
|
1126
1126
|
minWidth: 0
|
|
1127
1127
|
},
|
|
1128
|
-
children: [Z(
|
|
1128
|
+
children: [Z(yn, {
|
|
1129
1129
|
variant: "caption",
|
|
1130
1130
|
component: "div",
|
|
1131
1131
|
sx: { color: "text.secondary" },
|
|
1132
1132
|
children: d("fill.gradientStops")
|
|
1133
|
-
}), Z(
|
|
1133
|
+
}), Z(Hn, {
|
|
1134
1134
|
stops: t.stops,
|
|
1135
1135
|
onChange: (e) => f({ stops: e }),
|
|
1136
1136
|
minStops: r,
|
|
@@ -1143,8 +1143,8 @@ var xn = U((e) => {
|
|
|
1143
1143
|
})]
|
|
1144
1144
|
});
|
|
1145
1145
|
});
|
|
1146
|
-
|
|
1147
|
-
var
|
|
1146
|
+
Un.displayName = "GradientEditor";
|
|
1147
|
+
var Wn = (e) => {
|
|
1148
1148
|
let t = e.getStops();
|
|
1149
1149
|
return {
|
|
1150
1150
|
gradientType: e.getGradientType(),
|
|
@@ -1152,10 +1152,10 @@ var Sn = (e) => {
|
|
|
1152
1152
|
stops: t.length >= 2 ? t.map((e) => ({
|
|
1153
1153
|
offset: e.getOffset(),
|
|
1154
1154
|
color: e.getColor().toString()
|
|
1155
|
-
})) : [...
|
|
1155
|
+
})) : [...Gn.stops]
|
|
1156
1156
|
};
|
|
1157
|
-
},
|
|
1158
|
-
gradientType:
|
|
1157
|
+
}, Gn = Object.freeze({
|
|
1158
|
+
gradientType: R.GradientType.Linear,
|
|
1159
1159
|
angle: 90,
|
|
1160
1160
|
stops: [{
|
|
1161
1161
|
offset: 0,
|
|
@@ -1164,18 +1164,18 @@ var Sn = (e) => {
|
|
|
1164
1164
|
offset: 1,
|
|
1165
1165
|
color: "4472c4"
|
|
1166
1166
|
}]
|
|
1167
|
-
}),
|
|
1167
|
+
}), Kn = /* @__PURE__ */ new Set(/* @__PURE__ */ "square.elevation.variant.title.onKeyDown.workbook.onWorkbookChange.onDocumentError.propsDocumentError.renderDocumentError.propsDocumentLoading.renderDocumentLoading.propsWorkbook.onWorkbookLoad.propsTaskPaneArea.renderTaskPaneArea.taskPaneSide.logo.onDirtyChange.propsDocumentTitle.showFormulaBar.propsFormulaBar.renderFormulaBar.formulaBarPlacement.manageVisualViewport.editable.showStatusBar.propsStatusBar.renderStatusBar.propsToolbar.renderToolbar.topLeft.topRight.muiTheme.tokens.cssBaseline.autoFocus.licenseKey.prefetch".split(".")), qn = Sn("studio:eagerStudio", () => import("./CYDqU_DnwM2dkv3O.mjs")), Jn = ({ error: e, onShown: t }) => (G(() => {
|
|
1168
1168
|
t();
|
|
1169
|
-
}, []), Z(
|
|
1170
|
-
let { sx: n, style:
|
|
1169
|
+
}, []), Z(sn, { error: e })), Yn = U(H((e, t) => {
|
|
1170
|
+
let { sx: n, style: i, className: a, licenseKey: o, renderDocumentLoading: s = r, propsDocumentLoading: c, onWorkbookLoad: l, onDocumentError: u, ...d } = e, [f, p] = ((e) => {
|
|
1171
1171
|
let t = {}, n = {};
|
|
1172
|
-
for (let r in e) (
|
|
1172
|
+
for (let r in e) (Kn.has(r) ? t : n)[r] = e[r];
|
|
1173
1173
|
return [t, n];
|
|
1174
|
-
})(
|
|
1175
|
-
|
|
1176
|
-
let [
|
|
1174
|
+
})(d);
|
|
1175
|
+
o && Ct.setLicenseKey(o);
|
|
1176
|
+
let [m] = Kt(Et.Mode, Tt[Et.Mode]), { themeMode: h } = qt({ mode: m ?? void 0 }), g = h === "dark", [_, v] = J(null), y = zt("studio", Zt()), [b, x] = J(!1), S = K(() => !s || b ? null : Z(gn, {
|
|
1177
1177
|
style: {
|
|
1178
|
-
backgroundColor: `var(--sxl-color-base-100, ${
|
|
1178
|
+
backgroundColor: `var(--sxl-color-base-100, ${g ? "#121212" : "#fff"})`,
|
|
1179
1179
|
inset: 0,
|
|
1180
1180
|
width: "100%",
|
|
1181
1181
|
height: "100%",
|
|
@@ -1185,20 +1185,23 @@ var Sn = (e) => {
|
|
|
1185
1185
|
justifyContent: "center",
|
|
1186
1186
|
zIndex: 9900
|
|
1187
1187
|
},
|
|
1188
|
-
children:
|
|
1188
|
+
children: Z(Rt, {
|
|
1189
|
+
render: s,
|
|
1190
|
+
props: c ?? {}
|
|
1191
|
+
})
|
|
1189
1192
|
}), [
|
|
1190
|
-
o,
|
|
1191
1193
|
s,
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1194
|
+
c,
|
|
1195
|
+
g,
|
|
1196
|
+
b
|
|
1197
|
+
]), C = K(() => Bt(qn.load, { renderError: ({ error: e }) => Z(Jn, {
|
|
1195
1198
|
error: e,
|
|
1196
|
-
onShown: () =>
|
|
1199
|
+
onShown: () => x(!0)
|
|
1197
1200
|
}) }), []);
|
|
1198
1201
|
return Q($, {
|
|
1199
|
-
ref:
|
|
1200
|
-
className:
|
|
1201
|
-
"data-sxl-theme-mode":
|
|
1202
|
+
ref: v,
|
|
1203
|
+
className: L("sheetxl-studio", y, a),
|
|
1204
|
+
"data-sxl-theme-mode": h,
|
|
1202
1205
|
sx: n,
|
|
1203
1206
|
style: {
|
|
1204
1207
|
display: "flex",
|
|
@@ -1210,27 +1213,27 @@ var Sn = (e) => {
|
|
|
1210
1213
|
minHeight: 0,
|
|
1211
1214
|
position: "relative",
|
|
1212
1215
|
overflow: "hidden",
|
|
1213
|
-
...
|
|
1216
|
+
...i
|
|
1214
1217
|
},
|
|
1215
|
-
...
|
|
1216
|
-
children: [Z(
|
|
1218
|
+
...p,
|
|
1219
|
+
children: [Z(Yt, {
|
|
1217
1220
|
fallback: null,
|
|
1218
|
-
children: Z(
|
|
1219
|
-
...
|
|
1220
|
-
host:
|
|
1221
|
-
scopeClass:
|
|
1222
|
-
onWorkbookLoad: (e) => (requestAnimationFrame(() => requestAnimationFrame(() =>
|
|
1223
|
-
onDocumentError: (e) => (
|
|
1224
|
-
renderDocumentLoading:
|
|
1221
|
+
children: Z(C, {
|
|
1222
|
+
...f,
|
|
1223
|
+
host: _,
|
|
1224
|
+
scopeClass: y,
|
|
1225
|
+
onWorkbookLoad: (e) => (requestAnimationFrame(() => requestAnimationFrame(() => x(!0))), l?.(e)),
|
|
1226
|
+
onDocumentError: (e) => (x(!0), u?.(e)),
|
|
1227
|
+
renderDocumentLoading: null,
|
|
1225
1228
|
ref: t
|
|
1226
1229
|
})
|
|
1227
|
-
}),
|
|
1230
|
+
}), S]
|
|
1228
1231
|
});
|
|
1229
1232
|
}));
|
|
1230
|
-
|
|
1231
|
-
var
|
|
1232
|
-
let { source: t, startWith: n, templatePath: r, onWorkbookLoad: i, onWorkbookChange: a, onDirtyChange: o, documentTitle: s, confirmOnClose: c, keyboardGuard: l, ...u } = e, d =
|
|
1233
|
-
|
|
1233
|
+
Yn.displayName = "Studio";
|
|
1234
|
+
var Xn = (e = {}) => {
|
|
1235
|
+
let { source: t, startWith: n, templatePath: r, onWorkbookLoad: i, onWorkbookChange: a, onDirtyChange: o, documentTitle: s, confirmOnClose: c, keyboardGuard: l, ...u } = e, d = Gt(), [f, p] = J(null), [m, h] = J(!1), g = It(f);
|
|
1236
|
+
Nt(g, m, {
|
|
1234
1237
|
documentTitle: s,
|
|
1235
1238
|
confirmOnClose: c,
|
|
1236
1239
|
keyboardGuard: l
|
|
@@ -1265,7 +1268,7 @@ var kn = (e = {}) => {
|
|
|
1265
1268
|
h(e), S.current?.(e);
|
|
1266
1269
|
}, []);
|
|
1267
1270
|
G(() => {
|
|
1268
|
-
n === "welcome" && _ === void 0 &&
|
|
1271
|
+
n === "welcome" && _ === void 0 && ye(r);
|
|
1269
1272
|
}, [
|
|
1270
1273
|
n,
|
|
1271
1274
|
_,
|
|
@@ -1291,4 +1294,4 @@ var kn = (e = {}) => {
|
|
|
1291
1294
|
onWorkbookLoad: E
|
|
1292
1295
|
};
|
|
1293
1296
|
};
|
|
1294
|
-
export {
|
|
1297
|
+
export { d as AnomaliesPlugin, En as AppearanceCommandButton, Ve as AutoColorPosition, i as BorderCommandButton, Xe as BorderPopupButton, Je as BorderStylePopupButton, Ye as BorderTemplateIcon, ge as CalculationOptionsCommandButton, f as CalculationRequiredStatus, k as CircularReferenceStatus, qe as ColorButton, Ge as ColorButtonList, $e as ColorCommandButton, He as ColorPanel, Ue as ColorPanelType, Ke as ColorPopupButton, c as ColumnMenu, yt as CommentCard, m as CommentsPlugin, Gn as DEFAULT_GRADIENT, wt as DefaultTaskPaneRegistry, y as DefaultWorkbookToolbars, je as DocThemeCommandButton, Ee as DocumentTitle, b as ExternalLinksPlugin, pe as FORMAT_TASK_PANE_KEY, u as FORMULA_BAR_EDITOR_ID, ct as FORMULA_FIELD_ABOVE_LABEL_HEIGHT, Tn as FileCommandButton, C as FillMenu, nt as FontFamilyCommandButton, Qe as FontSizeCommandButton, h as FormatPlugin, E as FormulaBar, st as FormulaField, pt as FunctionArgumentsPanel, gt as FunctionSearchPanel, Un as GradientEditor, Hn as GradientStopsBar, fe as INSERT_CELL_CONTROL_OPTIONS_KEY, vt as INSERT_FUNCTION_PAGE_CLASS, wn as InputField, P as InsertCellControlCommandButton, Se as InsertFunctionCommandPopupButton, ht as InsertFunctionOption, Dn as InsertFunctionSumCommandPopupButton, _t as InsertFunctionWizard, ut as ItemCard, dt as ItemCardAction, ft as ItemsSearchField, St as LicenseManager, Be as MobileFormulaBar, n as MobileInputToolbar, l as NamedCollectionEditor, D as NamedPlugin, S as NumberFormatCommandButton, Ze as NumberFormatOption, O as NumberStats, An as PATTERN_GALLERY, bt as PasswordField, ze as PasteCommandButton, Mn as PatternPopupButton, kn as PatternSwatch, Te as PendingStatus, Ne as PresetCellStylesCommandButton, lt as PresetChip, v as PresetSlicerStylesCommandButton, at as PresetTableStylesCommandButton, t as ProtectionPlugin, me as SheetTabMenu, Fe as SheetZoomCommandButton, A as SheetZoomScale, _ as SheetsAllMenu, g as SlicerPlugin, p as StatusBar, Yn as Studio, We as StyledStrokeIcon, M as TablePlugin, rt as TableStyleCanvasPreview, it as TableStylePreview, N as TableToolbar, te as TextEffectsCommandButton, w as TextRotateGroupButton, ce as ThemeSelectButton, ue as ThemeSelectPanel, ve as ThemeSelectPopupButton, Le as UndoRedoCommandButton, F as WalkingCopyCommandButton, o as WorkbookContextMenu, de as WorkbookElement, Dt as WorkbookIO, a as WorkbookStrip, e as WorkbookToolbars, ie as createStudioThemeCSS, oe as createThemeFromMUITheme, xe as defaultRenderColumnMenu, De as defaultRenderCommentCard, ne as defaultRenderContextMenu, he as defaultRenderFillMenu, Ae as defaultRenderFormulaBar, re as defaultRenderHyperlinkCard, ae as defaultRenderMovableMenu, Ce as defaultRenderOutlineButton, _e as defaultRenderOutlineLevelButton, le as defaultRenderSheetTab, se as defaultRenderSheetTabMenu, j as defaultRenderSheetsAll, Me as defaultRenderStatusBar, Re as defaultRenderTableToolbar, ee as defaultRenderTabs, I as defaultRenderToolbar, Ie as defaultRenderTooltip, x as defaultRenderWorkbookError, r as defaultRenderWorkbookLoading, Pe as defaultRenderWorksheet, et as numberFormatCategoryLabel, tt as numberFormatTypeLabel, mt as optionsForPage, jn as patternLabel, Oe as registerSheetCommandGroups, s as registerStudioCommandCatalogs, ke as registerStudioCommandGroups, be as registerWorkbookCommandGroups, kt as setPrintExamplesOnLoad, Wn as toGradientValue, On as toPatternSlots, we as tokensToMuiOptions, T as useFormulaBarSession, jt as useModelListener, Mt as useRangeListener, Xn as useStudioApp };
|