@sheetxl/studio-vanilla 0.4.10 → 0.4.11

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 (131) hide show
  1. package/browser/cjs/B0rdyyttE2Aibsag.cjs +7 -0
  2. package/browser/cjs/B2e7dDI-zKoqXpIW.cjs +107 -0
  3. package/browser/cjs/BAyEOOtO-9sHQQRW.cjs +7 -0
  4. package/browser/cjs/BPTHTRDvNOVkUJGa.cjs +7 -0
  5. package/browser/cjs/BlSFY6zLlebuejdV.cjs +7 -0
  6. package/browser/cjs/BplA5pDzOJpfTZuA.cjs +7 -0
  7. package/browser/cjs/BshvMtUxTJHj3JQN.cjs +7 -0
  8. package/browser/cjs/BuWtGFX0HiBezGjw.cjs +7 -0
  9. package/browser/cjs/C5FXOMLhAu_KTjVe.cjs +7 -0
  10. package/browser/cjs/C7EZCTczsC-gkRcq.cjs +7 -0
  11. package/browser/cjs/CFcjX5-nVsgzdZ4F.cjs +7 -0
  12. package/browser/cjs/CjZbhk41S1qO_74G.cjs +7 -0
  13. package/browser/cjs/CuTW2Pt-L5n-hNxV.cjs +7 -0
  14. package/browser/cjs/D3iOk-Q2tRdUeTcn.cjs +7 -0
  15. package/browser/cjs/DFspSkki779xN-Ey.cjs +7 -0
  16. package/browser/cjs/DFtyXc7YFh9dIp74.cjs +7 -0
  17. package/browser/cjs/Db_Ew1r6yOMYylvA.cjs +7 -0
  18. package/browser/cjs/DgBn3aW39yjgm0X_.cjs +7 -0
  19. package/browser/cjs/DiBy6-IxLscyMW2y.cjs +7 -0
  20. package/browser/cjs/DrlS1oz9Nea8Pm3j.cjs +7 -0
  21. package/browser/cjs/Dx-jp_LJxWbAScyA.cjs +7 -0
  22. package/browser/cjs/SzxJv7OUs5ojl8gx.cjs +7 -0
  23. package/browser/cjs/T4SHYo66xDT3l9JN.cjs +7 -0
  24. package/browser/cjs/index.cjs +4 -3
  25. package/browser/cjs/vfUix5Di0Ro8tEID.cjs +7 -0
  26. package/browser/esm/B5kkStdEkTczERyM.mjs +7 -0
  27. package/browser/esm/B905wKzTtod-jbsD.mjs +7 -0
  28. package/browser/esm/BALnKy2Fp7fyk-lc.mjs +7 -0
  29. package/browser/esm/BDVJ7eOPpW5FnEAP.mjs +7 -0
  30. package/browser/esm/BGpv6Kq7eBlJy43T.mjs +7 -0
  31. package/browser/esm/BUSR_OK5Qi6hRPfw.mjs +7 -0
  32. package/browser/esm/BXUGsC1Mo3FP8vnW.mjs +7 -0
  33. package/browser/esm/BlGoi1_x9rUMpWMd.mjs +7 -0
  34. package/browser/esm/Bo_ZPRrOQrqOVHAF.mjs +7 -0
  35. package/browser/esm/BuURCm92KsyGHG9e.mjs +7 -0
  36. package/browser/esm/CFFC0SNc24a0Dxnh.mjs +7 -0
  37. package/browser/esm/CGZ5MX7afzMxDkCe.mjs +7 -0
  38. package/browser/esm/Cc_VWd0wF5-39LsI.mjs +7 -0
  39. package/browser/esm/Cq8D_M0jeHLcnRjg.mjs +7 -0
  40. package/browser/esm/CzmNwV9tfFYUp_gS.mjs +7 -0
  41. package/browser/esm/De6RPxc4p_jXLlT5.mjs +7 -0
  42. package/browser/esm/DlVZFM9ZR5jGyG0_.mjs +7 -0
  43. package/browser/esm/DqXxZP6yKF4U1YfY.mjs +7 -0
  44. package/browser/esm/DtmE60AvstK9u0Ta.mjs +107 -0
  45. package/browser/esm/Dz2OVgq3kxi1TkfX.mjs +7 -0
  46. package/browser/esm/PS0cqYnlMVEGOQpI.mjs +7 -0
  47. package/browser/esm/QBGUD1XS5_pysBLL.mjs +7 -0
  48. package/browser/esm/index.mjs +2 -8
  49. package/browser/esm/tFhROdVSw9KLQfUN.mjs +7 -0
  50. package/browser/esm/uGDCdtqxjqRCo4Xn.mjs +7 -0
  51. package/cdn/index.js +40 -44
  52. package/cdn/loader.js +1 -1
  53. package/package.json +5 -5
  54. package/browser/cjs/B1UGqZP_7Z0Ewpog.cjs +0 -6
  55. package/browser/cjs/B6m9VXoFseD4zuZ5.cjs +0 -6
  56. package/browser/cjs/BKePSaEpM6Z063z-.cjs +0 -161
  57. package/browser/cjs/Bqn0ZeP_srNfL9rG.cjs +0 -6
  58. package/browser/cjs/C-izbj62pQuZjOrT.cjs +0 -304
  59. package/browser/cjs/C-w-GX8N54TxTjjf.cjs +0 -6
  60. package/browser/cjs/C1QGdcqJ-9sdGTQR.cjs +0 -6
  61. package/browser/cjs/C38aiRglHLxZ8KRY.cjs +0 -6
  62. package/browser/cjs/C4JMn_hMnlOnDpQO.cjs +0 -6
  63. package/browser/cjs/CApEj4LhhPUvQjIG.cjs +0 -16
  64. package/browser/cjs/CFcJbmmXjWjl6fQH.cjs +0 -6
  65. package/browser/cjs/CKiDbCZ6rGgXK7yN.cjs +0 -42
  66. package/browser/cjs/CM8btXQsJbnFKXUm.cjs +0 -6
  67. package/browser/cjs/Cb0K3Wzp7BAa4zni.cjs +0 -15
  68. package/browser/cjs/CiAUhPU7v1BK-8Bb.cjs +0 -7
  69. package/browser/cjs/CsXS-EN0N5SZHTnQ.cjs +0 -145
  70. package/browser/cjs/Cu2eUomoF0HToa4l.cjs +0 -6
  71. package/browser/cjs/Cy7ii9B_Vqx94pbu.cjs +0 -19
  72. package/browser/cjs/CzI4ZcsmzsyPBpWN.cjs +0 -12
  73. package/browser/cjs/DKHzUx2gKXwboKy1.cjs +0 -11
  74. package/browser/cjs/DKc8wAq8dwbDddQn.cjs +0 -11
  75. package/browser/cjs/DMyKApbUVRtNYC4e.cjs +0 -6
  76. package/browser/cjs/DROR08HMGyg7rizQ.cjs +0 -6
  77. package/browser/cjs/DfGDZlbFVknGyu_X.cjs +0 -6
  78. package/browser/cjs/OQdqVM_6m78kE5Aj.cjs +0 -7
  79. package/browser/cjs/v4OEtYXaUw_GeiXM.cjs +0 -12
  80. package/browser/esm/4uEr84M4w57AMyDg.mjs +0 -1703
  81. package/browser/esm/B8Ja5DlyKAy8xfQD.mjs +0 -1365
  82. package/browser/esm/B9bN60uAvy62vnwt.mjs +0 -22
  83. package/browser/esm/BAOzSQdzHl43K9Hd.mjs +0 -50
  84. package/browser/esm/BQYSD5Nb35y0WeeV.mjs +0 -421
  85. package/browser/esm/BVcaNvORp_uKPQgJ.mjs +0 -46
  86. package/browser/esm/BqXO_cQhrMJu7JoQ.mjs +0 -3756
  87. package/browser/esm/C18A_DcIEHNYBDvR.mjs +0 -46
  88. package/browser/esm/C7FoKZbSzjvuY3UB.mjs +0 -43
  89. package/browser/esm/CCIJpHSbFPjTEF8S.mjs +0 -1665
  90. package/browser/esm/CHNPjJxb0GY_naLa.mjs +0 -25025
  91. package/browser/esm/CKHsU9LUNYowimxS.mjs +0 -1346
  92. package/browser/esm/C_Zx1tYjI3n7KKZH.mjs +0 -21
  93. package/browser/esm/Cm-m3bZh0V44y0li.mjs +0 -390
  94. package/browser/esm/D1e_ccSgcNXvWHgy.mjs +0 -151
  95. package/browser/esm/D47D26mVYSAdb5C8.mjs +0 -2178
  96. package/browser/esm/D9CdO3PtV12RnK8K.mjs +0 -1467
  97. package/browser/esm/D9x-Q8y57gePf-tE.mjs +0 -944
  98. package/browser/esm/DHhXutXh7b5LsU1m.mjs +0 -2346
  99. package/browser/esm/DIGFi66CQPMV3HsL.mjs +0 -84
  100. package/browser/esm/DamiTeQsSMP2Cwld.mjs +0 -58
  101. package/browser/esm/DhD48oFrbrnZ6Zg5.mjs +0 -13208
  102. package/browser/esm/Ln2ZalJgj1CiJJue.mjs +0 -50
  103. package/browser/esm/S9fgUO7h8YgZxoKH.mjs +0 -633
  104. package/browser/esm/qVAHcpq07IhtAaQc.mjs +0 -24
  105. package/browser/esm/xrzJ8ILZHb118Oyt.mjs +0 -41
  106. package/cdn/assets/2-xJlw77WsCoyz09.js +0 -24872
  107. package/cdn/assets/B-9FcTf3xBEVGdjV.js +0 -1467
  108. package/cdn/assets/B-p1i2SNRMunPXCF.js +0 -43
  109. package/cdn/assets/B3J6oAmsS7oLNFPd.js +0 -46
  110. package/cdn/assets/B8Ja5DlyKAy8xfQD.js +0 -1365
  111. package/cdn/assets/BG3YTMAzNKPRGoLs.js +0 -50
  112. package/cdn/assets/BQYSD5Nb35y0WeeV.js +0 -421
  113. package/cdn/assets/BbzUpvQOkxsN-yIH.js +0 -2346
  114. package/cdn/assets/BqXO_cQhrMJu7JoQ.js +0 -3756
  115. package/cdn/assets/Bt1JSlSpWXDOBfq3.js +0 -1703
  116. package/cdn/assets/CCIJpHSbFPjTEF8S.js +0 -1665
  117. package/cdn/assets/CKHsU9LUNYowimxS.js +0 -1346
  118. package/cdn/assets/CWLJZwD2GVXljoWG.js +0 -46
  119. package/cdn/assets/Cm-m3bZh0V44y0li.js +0 -390
  120. package/cdn/assets/CtQlXGkNWgI-vtGy.js +0 -2178
  121. package/cdn/assets/DIGFi66CQPMV3HsL.js +0 -84
  122. package/cdn/assets/DK4S0DbayChkfTD6.js +0 -58
  123. package/cdn/assets/DQvsBz9F1GS_S7r9.js +0 -50
  124. package/cdn/assets/DTOgv_zwXSur-yCq.js +0 -151
  125. package/cdn/assets/DYZjOnD8WWQkCYuH.js +0 -944
  126. package/cdn/assets/DhD48oFrbrnZ6Zg5.js +0 -13208
  127. package/cdn/assets/DhyAyTCDkMBf392P.js +0 -21
  128. package/cdn/assets/P7HeVw5SHROLSWBz.js +0 -24
  129. package/cdn/assets/S4Z0SN8x6EltjsHT.js +0 -22
  130. package/cdn/assets/S9fgUO7h8YgZxoKH.js +0 -633
  131. package/cdn/assets/guYe4C_6pE93QsDV.js +0 -41
package/cdn/index.js CHANGED
@@ -1,19 +1,19 @@
1
1
  /**
2
- * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.10
2
+ * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.11
3
3
  *
4
4
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
5
  * License: The license can be found at https://www.sheetxl.com/license.
6
6
  */
7
- const S = /* @__PURE__ */ new Map(), L = (e, n = {}) => {
8
- const { message: t, icon: r, customElement: p, hide: m = !1, className: a, cssVars: f = {} } = n;
7
+ const S = /* @__PURE__ */ new Map(), k = (e, o = {}) => {
8
+ const { message: t, icon: r, customElement: p, hide: m = !1, className: a, cssVars: u = {} } = o;
9
9
  if (m) return;
10
10
  const l = typeof e == "string" ? document.querySelector(e) : e;
11
11
  if (!l) return void console.warn(`Element with selector "${e}" not found for panel.`);
12
- let o;
13
- if (h(e), p) o = p;
12
+ let n;
13
+ if (h(e), p) n = p;
14
14
  else {
15
- o = document.createElement("div"), o.className = a ? `sheetxl-panel ${a}` : "sheetxl-panel";
16
- const u = Object.entries(f).map(([s, y]) => `--sheetxl-panel-${s}: ${y};`).join(" "), g = `
15
+ n = document.createElement("div"), n.className = a ? `sheetxl-panel ${a}` : "sheetxl-panel";
16
+ const f = Object.entries(u).map(([s, y]) => `--sheetxl-panel-${s}: ${y};`).join(" "), g = `
17
17
  @keyframes sheetxl-spin {
18
18
  from { transform: rotate(0deg); }
19
19
  to { transform: rotate(360deg); }
@@ -81,87 +81,83 @@ const S = /* @__PURE__ */ new Map(), L = (e, n = {}) => {
81
81
  margin: 0;
82
82
  }
83
83
  `, d = document.createElement("style");
84
- if (d.textContent = g, o.appendChild(d), r) {
84
+ if (d.textContent = g, n.appendChild(d), r) {
85
85
  const s = document.createElement("div");
86
- s.className = "sheetxl-icon", typeof r == "string" ? s.innerHTML = r : r instanceof HTMLElement && s.appendChild(r), o.appendChild(s);
86
+ s.className = "sheetxl-icon", typeof r == "string" ? s.innerHTML = r : r instanceof HTMLElement && s.appendChild(r), n.appendChild(s);
87
87
  }
88
88
  if (t) {
89
89
  const s = document.createElement("div");
90
- s.className = "sheetxl-message", s.textContent = t, o.appendChild(s);
90
+ s.className = "sheetxl-message", s.textContent = t, n.appendChild(s);
91
91
  }
92
- u && (o.style.cssText += u), window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches && o.classList.add("dark");
92
+ f && (n.style.cssText += f), window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches && n.classList.add("dark");
93
93
  }
94
- window.getComputedStyle(l).position === "static" && (l.style.position = "relative"), l.appendChild(o), S.set(e, o);
94
+ window.getComputedStyle(l).position === "static" && (l.style.position = "relative"), l.appendChild(n), S.set(e, n);
95
95
  }, h = (e) => {
96
- const n = S.get(e);
97
- n && n.parentNode && (n.parentNode.removeChild(n), S.delete(e));
98
- }, k = (e, n = {}) => {
99
- L(e, { message: "Loading SheetXL...", icon: `
96
+ const o = S.get(e);
97
+ o && o.parentNode && (o.parentNode.removeChild(o), S.delete(e));
98
+ }, L = (e, o = {}) => {
99
+ k(e, { icon: `
100
100
  <svg width="24" height="24" viewBox="0 0 24 24" style="animation: sheetxl-spin 1s linear infinite;">
101
101
  <circle cx="12" cy="12" r="10" fill="none" stroke="currentColor" stroke-width="2" stroke-dasharray="31.416" stroke-dashoffset="31.416">
102
102
  <animate attributeName="stroke-dasharray" dur="2s" values="0 31.416;15.708 15.708;0 31.416" repeatCount="indefinite"/>
103
103
  <animate attributeName="stroke-dashoffset" dur="2s" values="0;-15.708;-31.416" repeatCount="indefinite"/>
104
104
  </circle>
105
105
  </svg>
106
- `, className: "loading", ...n });
107
- }, b = (e, n = {}) => {
108
- L(e, { message: "Failed to load SheetXL", icon: `
106
+ `, className: "loading", ...o });
107
+ }, b = (e, o = {}) => {
108
+ k(e, { message: "Failed to load SheetXL", icon: `
109
109
  <svg width="24" height="24" viewBox="0 0 24 24" fill="currentColor">
110
110
  <path d="M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"/>
111
111
  </svg>
112
- `, className: "error", ...n });
112
+ `, className: "error", ...o });
113
113
  }, x = /* @__PURE__ */ new Map();
114
114
  let c;
115
- const C = async (e) => c || (c = await (async (n, t) => {
115
+ const C = async (e) => c || (c = await (async (o, t) => {
116
116
  try {
117
- if (t?.selector && k(t?.selector, t?.loading), !n) {
118
- const { resolveDependencies: r } = await import("./assets/DhyAyTCDkMBf392P.js");
119
- n = await r(t?.dependencies);
120
- }
121
- t?.licenseKey && await n.StudioMUI.LicenseManager.setLicenseKey(t.licenseKey), t?.selector && h(t?.selector);
117
+ t?.selector && L(t?.selector, t?.loading), t?.licenseKey && await o.StudioMUI.LicenseManager.setLicenseKey(t.licenseKey), t?.selector && h(t?.selector);
122
118
  } catch (r) {
123
119
  throw t?.selector && (h(t.selector), b(t.selector, { message: `Failed to initialize: ${r instanceof Error ? r.message : String(r)}`, ...t?.error })), console.error("Failed to initialize:", r), r;
124
120
  }
125
- return n;
126
- })(null, typeof e == "object" ? e : void 0), c), M = { attachStudio: async (e, n) => (c || (c = await C(e)), (async (t, r, p, m) => {
121
+ return o;
122
+ })(null, typeof e == "object" ? e : void 0), c), M = { attachStudio: async (e, o) => (c || (c = await C(e)), (async (t, r, p, m) => {
127
123
  if (!r) throw new Error("Either a 'selector' or a 'InitializationOptions' must be provided to attach.");
128
- const a = typeof r == "string" ? r : r.selector || "#sheetxl", f = typeof a == "string" ? document.querySelector(a) : a;
129
- if (!f) throw new Error(`Element with selector "${a}" not found.`);
124
+ const a = typeof r == "string" ? r : r.selector || "#sheetxl", u = typeof a == "string" ? document.querySelector(a) : a;
125
+ if (!u) throw new Error(`Element with selector "${a}" not found.`);
130
126
  if (x.has(a) && x.get(a) !== null) throw new Error(`SheetXL already attached to "${a}". Detach first if you want to re-attach.`);
131
127
  const l = typeof r == "object" ? r : null;
132
- k(a, l?.loading);
128
+ L(a, l?.loading);
133
129
  try {
134
130
  h(a);
135
- const o = t.ReactDOMClient.createRoot(f), u = t.React.createRef(), g = t.StudioMUI[p];
131
+ const n = t.ReactDOMClient.createRoot(u), f = t.React.createRef(), g = t.StudioMUI[p];
136
132
  let d = null;
137
133
  await new Promise((v) => {
138
- o.render(t.React.createElement(g, { ...m, ref: (i) => {
134
+ n.render(t.React.createElement(g, { ...m, ref: (i) => {
139
135
  i && (d = i, v());
140
136
  } }));
141
137
  });
142
- const y = { runtime: t, root: o };
138
+ const y = { runtime: t, root: n };
143
139
  x.set(a, y);
144
140
  let E = !1;
145
141
  return new Proxy(d, { get(v, i, z) {
146
142
  if (E) throw new Error(`SheetXL instance attached to "${a}" has been detached. Cannot access properties.`);
147
143
  return i === "update" ? (N) => {
148
- const $ = { ...m, ...N, ref: u };
149
- return o.render(t.React.createElement(g, $)), Promise.resolve();
150
- } : i === "detach" ? () => (x.delete(a), o.unmount(), E = !0, Promise.resolve()) : Reflect.get(v, i, z);
144
+ const $ = { ...m, ...N, ref: f };
145
+ return n.render(t.React.createElement(g, $)), Promise.resolve();
146
+ } : i === "detach" ? () => (x.delete(a), n.unmount(), E = !0, Promise.resolve()) : Reflect.get(v, i, z);
151
147
  } });
152
- } catch (o) {
153
- throw h(a), b(a, { message: `Failed to initialize: ${o instanceof Error ? o.message : String(o)}`, ...l?.error }), console.error("Failed to initialize:", o), o;
148
+ } catch (n) {
149
+ throw h(a), b(a, { message: `Failed to initialize: ${n instanceof Error ? n.message : String(n)}`, ...l?.error }), console.error("Failed to initialize:", n), n;
154
150
  }
155
- })(c, e, "Studio", n)), async initialize(e) {
151
+ })(c, e, "Studio", o)), async initialize(e) {
156
152
  await C(e);
157
153
  } }, w = document.currentScript;
158
154
  if (w) {
159
155
  console.log("SheetXL script tag:", w);
160
156
  const e = w.dataset ? w.dataset.target : "#sheetxl";
161
- document.querySelector(e) || console.error(`SheetXL: Target element "${e}" not found in the document.`), M.attachStudio(e, { autoFocus: !0 }).then((n) => {
162
- console.log("SheetXL studio created and attached:", n);
163
- }).catch((n) => {
164
- console.error("Error creating SheetXL studio:", n);
157
+ document.querySelector(e) || console.error(`SheetXL: Target element "${e}" not found in the document.`), M.attachStudio(e, { autoFocus: !0 }).then((o) => {
158
+ console.log("SheetXL studio created and attached:", o);
159
+ }).catch((o) => {
160
+ console.error("Error creating SheetXL studio:", o);
165
161
  });
166
162
  }
167
163
  const X = M;
package/cdn/loader.js CHANGED
@@ -1,5 +1,5 @@
1
1
  (function(e){typeof define=="function"&&define.amd?define(e):e()})(function(){"use strict";/**
2
- * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.10
2
+ * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.11
3
3
  *
4
4
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
5
  * License: The license can be found at https://www.sheetxl.com/license.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sheetxl/studio-vanilla",
3
3
  "description": "SheetXL Studio - Vanilla entry point for integrating SheetXL UI.",
4
- "version": "0.4.10",
4
+ "version": "0.4.11",
5
5
  "license": "SEE LICENSE IN <LICENSE>",
6
6
  "type": "module",
7
7
  "main": "./browser/esm/index.mjs",
@@ -41,13 +41,13 @@
41
41
  "@mui/styled-engine": "^6.5.0",
42
42
  "@mui/system": "^6.5.0",
43
43
  "@mui/utils": "^6.4.9",
44
- "@sheetxl/studio-mui": "^0.4.10",
44
+ "@sheetxl/studio-mui": "^0.4.11",
45
+ "react": "^19.1.0",
46
+ "react-dom": "^19.1.0",
45
47
  "csstype": "^3.1.3",
46
48
  "http-server": "^14.1.1"
47
49
  },
48
50
  "peerDependencies": {
49
- "@sheetxl/sdk": "^0.4.10",
50
- "react": "^19.1.0",
51
- "react-dom": "^19.1.0"
51
+ "@sheetxl/sdk": "^0.4.11"
52
52
  }
53
53
  }
@@ -1,6 +0,0 @@
1
- "use strict";/**
2
- * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.10
3
- *
4
- * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
- * License: The license can be found at https://www.sheetxl.com/license.
6
- */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),x=require("react"),t=require("@sheetxl/sdk"),n=require("./C-izbj62pQuZjOrT.cjs"),c=({range:d,options:a,cell:C,onDone:s,...b})=>{const[i,l]=x.useState(a??t.Sort.DefaultRangeOptions),u=n.fe(e=>{let r=null;e==="Sort"&&(r={...a,options:i}),s?.(r)},[i,s,a]);return o.jsx(n.v4,{title:"Sort",options:["Sort","Cancel"],onDone:u,...b,children:o.jsxs(n.Box,{sx:{display:"flex",flexDirection:"column"},children:[o.jsx(n.FormControlLabel,{control:o.jsx(n.Checkbox,{checked:!i.reverse,onChange:()=>l(e=>({...e,reverse:!e.reverse}))}),label:"Is Ascending",labelPlacement:"end"}),o.jsx(n.FormControlLabel,{control:o.jsx(n.Checkbox,{checked:i.hasHeader,onChange:()=>l(e=>({...e,hasHeader:!e.hasHeader}))}),label:"Has Header",labelPlacement:"end"}),o.jsx(n.FormControlLabel,{control:o.jsx(n.Checkbox,{checked:i.collatorOptions?.sensitivity===t.Sort.CaseSensitiveOptions.sensitivity,onChange:()=>l(e=>({...e,collatorOptions:i.collatorOptions?.sensitivity===t.Sort.CaseSensitiveOptions.sensitivity?t.Sort.CaseInsensitiveOptions:t.Sort.CaseSensitiveOptions}))}),label:"Case Sensitive",labelPlacement:"end"}),o.jsx(n.FormControlLabel,{control:o.jsx(n.Checkbox,{checked:i.orientation===t.IRange.Orientation.Row,onChange:()=>l(e=>{const r=e.orientation===t.IRange.Orientation.Row?t.IRange.Orientation.Column:t.IRange.Orientation.Row;return{...d.getDefaultSortCriteria(r,C).options,includeHidden:e.includeHidden,reverse:e.reverse,orientation:r}})}),label:"Row Sort",labelPlacement:"end"}),o.jsx(n.FormControlLabel,{control:o.jsx(n.Checkbox,{checked:i.includeHidden,onChange:()=>l(e=>({...e,includeHidden:!e.includeHidden}))}),label:"Include Hidden",labelPlacement:"end"})]})})};exports.SortDialog=c,exports.default=c;
@@ -1,6 +0,0 @@
1
- "use strict";/**
2
- * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.10
3
- *
4
- * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
- * License: The license can be found at https://www.sheetxl.com/license.
6
- */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),a=require("react"),t=require("./C-izbj62pQuZjOrT.cjs"),w=["Ok","Cancel"],k=a.memo(C=>{const{initialHyperlink:l=null,initialDisplay:b=null,onUpdateHyperlink:g,context:s,onOption:x,onValidateOption:p,onDone:u,options:f=w,defaultOption:d=f?.[0],cancelOption:r="Cancel",sx:F,...O}=C,P=a.useMemo(()=>(l??s?.()?.getHyperlink())!==null,[]),m=a.useMemo(()=>{let e=null,o=null;l&&(typeof l=="string"?o=l:e=l);const T=e??s?.()?.getHyperlink();return{address:o??T?.getAddress()??"",textToDisplay:T?.getDisplayText()??""}},[l,s]),[n,v]=a.useState(m.address),[c,D]=a.useState(()=>{const e=s?.().toTextUnformatted()??b;return e===m.address?"":e}),[$,h]=a.useState(!1),j=a.useCallback(e=>{D(e.target.value)},[]),y=a.useCallback(async(e,o)=>null,[]),H=t.fe(async e=>{e!==r&&g?.(n===""?null:{address:n},c),x?.(e,e===r,e===d),u?.()},[n,c,g,u,x,d,r]),I=t.fe(e=>{v(e.target.value),y(e.target.value,null)},[p]),M=t.fe(async e=>{let o=await Promise.resolve(p?.(e));try{o!==!1&&(o=await y(n,e))}catch{}return o??!0},[p]);return i.jsx(t.v4,{title:(P?"Edit":"Insert")+" Link",options:f,onDone:u,onOption:e=>H(e),onValidateOption:M,defaultOption:d,cancelOption:r,autoFocusSel:".autoFocus",sx:{width:"480px",...F},...O,children:i.jsxs(t.Box,{sx:{paddingTop:e=>e.spacing(1),paddingBottom:e=>e.spacing(0),rowGap:e=>e.spacing(1),display:"flex",flexDirection:"column"},children:[i.jsx(t.FormControl,{sx:{paddingTop:e=>e.spacing(1.5),minWidth:135,width:"100%"},size:"small",children:i.jsx(t.TextField,{label:"Address",placeholder:"Enter a url or cell reference.",onFocus:e=>{$||e.target?.select(),h(!0)},sx:{"& .MuiFormHelperText-root":{marginTop:e=>e.spacing(.5)}},InputLabelProps:{shrink:!0},InputProps:{inputProps:{className:"autoFocus",spellCheck:!1,autoComplete:"off",sx:{paddingTop:e=>e.spacing(1.25),paddingBottom:e=>e.spacing(.75),backgroundImage:`linear-gradient(${t.alpha("#fff",t.$n(5))}, ${t.alpha("#fff",t.$n(5))})`}}},value:n,onChange:I,onContextMenu:e=>{e.stopPropagation()}})}),i.jsx(t.FormControl,{sx:{paddingTop:e=>e.spacing(1.5),minWidth:135,width:"100%"},size:"small",children:i.jsx(t.TextField,{label:"Display Text",placeholder:n?.startsWith("#")?n.substring(1):n,onFocus:()=>{h(!0)},sx:{"& .MuiFormHelperText-root":{marginTop:e=>e.spacing(.5)}},InputLabelProps:{shrink:!0},InputProps:{inputProps:{spellCheck:!1,autoComplete:"off",sx:{paddingTop:e=>e.spacing(1.25),paddingBottom:e=>e.spacing(.75),backgroundImage:`linear-gradient(${t.alpha("#fff",t.$n(5))}, ${t.alpha("#fff",t.$n(5))})`}}},value:c,onChange:j,onContextMenu:e=>{e.stopPropagation()}})})]})})});exports.HyperlinkDialog=k,exports.default=k;