@sheetxl/studio-vanilla 0.4.21 → 0.5.0

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 (184) hide show
  1. package/browser/cjs/2QmtjcI-saz2rkIA.cjs +6 -0
  2. package/browser/cjs/3UFq2FybsZfoS4JL.cjs +6 -0
  3. package/browser/cjs/B-fFQgxMHns-eg-y.cjs +6 -0
  4. package/browser/cjs/{n6CXzSocLW_BCO8w.cjs → B2hhcNzdkhGrH1O6.cjs} +6 -6
  5. package/browser/cjs/BASsCVA0ArIVtY7I.cjs +6 -0
  6. package/browser/cjs/BAxy7pwmXg8SI_oi.cjs +6 -0
  7. package/browser/cjs/BCwHln5zBNJSn0bb.cjs +6 -0
  8. package/browser/cjs/BQYUcoxlHrpI0-pX.cjs +6 -0
  9. package/browser/cjs/BVbQCweLw_r05vPF.cjs +15 -0
  10. package/browser/cjs/BYJxHR3K0UQJ8mYe.cjs +6 -0
  11. package/browser/cjs/Ba8eoGTjjWBH8TbP.cjs +6 -0
  12. package/browser/cjs/BdCoVNJwhPpWfQw2.cjs +6 -0
  13. package/browser/cjs/BkZzUVGQfrUTPE_K.cjs +6 -0
  14. package/browser/cjs/BlpCu5z9eT8rzsZl.cjs +6 -0
  15. package/browser/cjs/BlqTaZ2U_mKVK2lb.cjs +6 -0
  16. package/browser/cjs/BpeteRa_oZ-wN4Yl.cjs +6 -0
  17. package/browser/cjs/BxqDS9XynU5GFbP7.cjs +16 -0
  18. package/browser/cjs/ByB_fmjdLNTv0T0U.cjs +145 -0
  19. package/browser/cjs/C-6TpShR6Bn0HnEd.cjs +7 -0
  20. package/browser/cjs/C5T_oiCG4PwTFSZA.cjs +6 -0
  21. package/browser/cjs/C5e1IjdRuLyAQqNX.cjs +7 -0
  22. package/browser/cjs/CAZoVQtxsVdAtVKy.cjs +6 -0
  23. package/browser/cjs/CBS2kMyEf0c_PUbQ.cjs +12 -0
  24. package/browser/cjs/CO7VEOXret0qr-X3.cjs +6 -0
  25. package/browser/cjs/CVIlAq9nwlOXfHMl.cjs +161 -0
  26. package/browser/cjs/CZEOikBcE4OIr49t.cjs +6 -0
  27. package/browser/cjs/Ce8AVRntRnXZtgzH.cjs +6 -0
  28. package/browser/cjs/ClEZHGlmkSIz6S1O.cjs +6 -0
  29. package/browser/cjs/CvO-oyQ3syx7EGUA.cjs +6 -0
  30. package/browser/cjs/CwqvcNlwUtXJrzsk.cjs +6 -0
  31. package/browser/cjs/D-su0R92LmYTQVL3.cjs +11 -0
  32. package/browser/cjs/D178aT-dgy-ngzYG.cjs +6 -0
  33. package/browser/cjs/D5z-zqUVI3G9JXBC.cjs +1501 -0
  34. package/browser/cjs/D68uE8Ovq38Aj-88.cjs +330 -0
  35. package/browser/cjs/D8mjDoZ4Yyous_Fc.cjs +6 -0
  36. package/browser/cjs/DASsVvQwE2-IWxLR.cjs +6 -0
  37. package/browser/cjs/DBavSByKdf-juvFm.cjs +32 -0
  38. package/browser/cjs/DHRZzqw46ad6Mtw6.cjs +6 -0
  39. package/browser/cjs/DJZBxKlTP03_1kyT.cjs +6 -0
  40. package/browser/cjs/DKq35Q191eW-MovK.cjs +6 -0
  41. package/browser/cjs/DMUFBhoYpT3ai2Sb.cjs +6 -0
  42. package/browser/cjs/DX2XUDUIVBx4UFrJ.cjs +6 -0
  43. package/browser/cjs/DdzEWCcupF-0WS8y.cjs +11 -0
  44. package/browser/cjs/Dg9j6yGv8nrILfzN.cjs +6 -0
  45. package/browser/cjs/DjB9MJwDT6_HgF4U.cjs +6 -0
  46. package/browser/cjs/Dl5mwbo0ahDUm0he.cjs +6 -0
  47. package/browser/cjs/DmT6vIsFpZJ2c8cx.cjs +15 -0
  48. package/browser/cjs/Hi6aVJR9PyRbNYjO.cjs +6 -0
  49. package/browser/cjs/K7QHOvYV_yvLLjsS.cjs +6 -0
  50. package/browser/cjs/LhLQSvaxn8yxAIwj.cjs +6 -0
  51. package/browser/cjs/MgEzGw411nlqjqfH.cjs +42 -0
  52. package/browser/cjs/WJXT0W6bS3bZdAUV.cjs +6 -0
  53. package/browser/cjs/f_Vbi-Lelt9tKZrz.cjs +19 -0
  54. package/browser/cjs/index.cjs +2 -80
  55. package/browser/cjs/tNT3tUxdeIp_Iq2Y.cjs +7 -0
  56. package/browser/cjs/vNEwUuTKk3qucC3P.cjs +6 -0
  57. package/browser/cjs/xMzLyo_gIl82xG8k.cjs +6 -0
  58. package/browser/cjs/yc1bXLJ1yRhBFy0X.cjs +124 -0
  59. package/browser/esm/2fFz5u9jPgrNzcVF.mjs +21 -0
  60. package/browser/esm/2kXHnuU_uz-F9i1S.mjs +44550 -0
  61. package/browser/esm/5F1_gQbzWEFsWO0i.mjs +84 -0
  62. package/browser/esm/9MchcnSGrYDjX4zQ.mjs +46 -0
  63. package/browser/esm/Af7aikoKHz0rpjfv.mjs +10 -0
  64. package/browser/esm/B1Kc7dS9N2PVqxMT.mjs +10 -0
  65. package/browser/esm/B8ePgT5XZ0JlU3T6.mjs +1352 -0
  66. package/browser/esm/B8uy0BSOVjfUw27f.mjs +12 -0
  67. package/browser/esm/BFweWj2oKpTGl7m3.mjs +1672 -0
  68. package/browser/esm/BLseM2hNBI2PgQaX.mjs +13391 -0
  69. package/browser/esm/BUNUi9F3xbjfUKty.mjs +24 -0
  70. package/browser/esm/BV3ROKbw5yMVArqX.mjs +10 -0
  71. package/browser/esm/BXKXqOluLdKs4-V0.mjs +3802 -0
  72. package/browser/esm/BZpMA4DGM1kbVAKF.mjs +10 -0
  73. package/browser/esm/Bg59p3YlNG6o7-M3.mjs +260 -0
  74. package/browser/esm/BlFzVqIUaXFtDy81.mjs +10 -0
  75. package/browser/esm/BtBECeJ4mwD7SUx8.mjs +3936 -0
  76. package/browser/esm/Buw1VxSLsNI8pSYS.mjs +5585 -0
  77. package/browser/esm/BxoWypkKac-_VAm5.mjs +39 -0
  78. package/browser/esm/By3EkyTg3ZYh63C7.mjs +56 -0
  79. package/browser/esm/CDu4VlyMAQ3nxTQG.mjs +10 -0
  80. package/browser/esm/CJ9ZL3uskq3W6s-m.mjs +10 -0
  81. package/browser/esm/CP_sGa9QGT2Nq5ym.mjs +1702 -0
  82. package/browser/esm/CaIFrnjL0xBOtFfM.mjs +10 -0
  83. package/browser/esm/CeP-AnEtOGkuxLqE.mjs +10 -0
  84. package/browser/esm/CjScjxhY2mD7nPZA.mjs +633 -0
  85. package/browser/esm/CozWNYg-NXzV84fz.mjs +10 -0
  86. package/browser/esm/Cprnt9pNXzIiMmkN.mjs +29 -0
  87. package/browser/esm/Cq-wjvtZ92uenxU1.mjs +20 -0
  88. package/browser/esm/CsVeeu8D1A8I-BbH.mjs +1575 -0
  89. package/browser/esm/CzMxOWYq4nqRtKmm.mjs +1366 -0
  90. package/browser/esm/D9MGSJr45cVRF75O.mjs +1466 -0
  91. package/browser/esm/DAUV_w2uv0nHdk5N.mjs +10 -0
  92. package/browser/esm/DIypkIIonThPr-Vt.mjs +47 -0
  93. package/browser/esm/DOG1CaEQVF1sTUFi.mjs +10 -0
  94. package/browser/esm/DOv9FndcEVmQ2LJK.mjs +392 -0
  95. package/browser/esm/DSCVDOwTpDzUVuFj.mjs +10 -0
  96. package/browser/esm/DYF-8AnNDaQUy3aL.mjs +2344 -0
  97. package/browser/esm/Dd0avXHDTPFrx-ot.mjs +44 -0
  98. package/browser/esm/DdQY6IuT4OziHv5i.mjs +48 -0
  99. package/browser/esm/DfRKIODWn8ElqMWa.mjs +425 -0
  100. package/browser/esm/Dfbzljrnj4KrvtaN.mjs +10 -0
  101. package/browser/esm/DfdWpPG9ZcbRBGUg.mjs +10 -0
  102. package/browser/esm/Di8JLQMx61fnrhOn.mjs +10 -0
  103. package/browser/esm/DirXlaTG7TKxrqSR.mjs +10 -0
  104. package/browser/esm/DjGdyf6zsnIMRkQb.mjs +41 -0
  105. package/browser/esm/Dm4Fun7UoovVHafs.mjs +147 -0
  106. package/browser/esm/DwpS4SI4gT1eqfOs.mjs +10 -0
  107. package/browser/esm/DzZDYedlR-CIW2TI.mjs +21 -0
  108. package/browser/esm/HlyDPlaZCA3IOmF2.mjs +2081 -0
  109. package/browser/esm/PzIeb5aTX9JzTTfm.mjs +424 -0
  110. package/browser/esm/{NBuS53B7u8hItiXf.mjs → QPkYQWSepZNIhJst.mjs} +937 -933
  111. package/browser/esm/UENfAV2nBd83yFu7.mjs +10 -0
  112. package/browser/esm/YYqCu_-Z9nzvEseu.mjs +10 -0
  113. package/browser/esm/aEhgzbKqmuKv1oqm.mjs +10 -0
  114. package/browser/esm/bxGRTnY732xGNtpL.mjs +10 -0
  115. package/browser/esm/index.mjs +4 -176
  116. package/browser/esm/zQSjT9VbN7kMDV88.mjs +21 -0
  117. package/cdn/assets/2fFz5u9jPgrNzcVF.js +21 -0
  118. package/cdn/assets/7ZUzaBw_VH3Cvii1.js +1702 -0
  119. package/cdn/assets/7bmIdE8Moi7orOeU.js +50 -0
  120. package/cdn/assets/Af7aikoKHz0rpjfv.js +10 -0
  121. package/cdn/assets/B1Kc7dS9N2PVqxMT.js +10 -0
  122. package/cdn/assets/B6QHusAaPSos46yi.js +3802 -0
  123. package/cdn/assets/B8ePgT5XZ0JlU3T6.js +1352 -0
  124. package/cdn/assets/B8uy0BSOVjfUw27f.js +12 -0
  125. package/cdn/assets/BFweWj2oKpTGl7m3.js +1672 -0
  126. package/cdn/assets/BGF-bSrwdriQTytG.js +1466 -0
  127. package/cdn/assets/BLseM2hNBI2PgQaX.js +13391 -0
  128. package/cdn/assets/BQvzpOcCO8uM_ZaF.js +46 -0
  129. package/cdn/assets/BUNUi9F3xbjfUKty.js +24 -0
  130. package/cdn/assets/BV3ROKbw5yMVArqX.js +10 -0
  131. package/cdn/assets/BZpMA4DGM1kbVAKF.js +10 -0
  132. package/cdn/assets/BlFzVqIUaXFtDy81.js +10 -0
  133. package/cdn/assets/BrwV_8GjxcVuWuUk.js +44377 -0
  134. package/cdn/assets/C7SHJrlOqTIZCB3t.js +41 -0
  135. package/cdn/assets/CCbJipmDawMQQxRJ.js +36 -0
  136. package/cdn/assets/CDu4VlyMAQ3nxTQG.js +10 -0
  137. package/cdn/assets/CEcpUxbZ1W-G1EPq.js +2346 -0
  138. package/cdn/assets/CJ9ZL3uskq3W6s-m.js +10 -0
  139. package/cdn/assets/CaIFrnjL0xBOtFfM.js +10 -0
  140. package/cdn/assets/CaN0O_koLgCkhgEh.js +1575 -0
  141. package/cdn/assets/CeP-AnEtOGkuxLqE.js +10 -0
  142. package/cdn/assets/CjScjxhY2mD7nPZA.js +633 -0
  143. package/cdn/assets/ClkFsS16G5memDzX.js +22 -0
  144. package/cdn/assets/CmUGAy0Bu36DiwJO.js +84 -0
  145. package/cdn/assets/CozWNYg-NXzV84fz.js +10 -0
  146. package/cdn/assets/CsYr_9x-OIQSqGIL.js +27 -0
  147. package/cdn/assets/CzEv6qEIPTHOwOdU.js +2083 -0
  148. package/cdn/assets/CzMF1riupKc6HLGE.js +6481 -0
  149. package/cdn/assets/CzMxOWYq4nqRtKmm.js +1366 -0
  150. package/cdn/assets/D-W_ANt_qJ9dfGy9.js +425 -0
  151. package/cdn/assets/DAI9BFZBDQlMP1v4.js +149 -0
  152. package/cdn/assets/DAUV_w2uv0nHdk5N.js +10 -0
  153. package/cdn/assets/DOG1CaEQVF1sTUFi.js +10 -0
  154. package/cdn/assets/DSCVDOwTpDzUVuFj.js +10 -0
  155. package/cdn/assets/DSv3gXCV9xifjdta.js +23 -0
  156. package/cdn/assets/DaYZ-afnc3QhJo5R.js +58 -0
  157. package/cdn/assets/Dfbzljrnj4KrvtaN.js +10 -0
  158. package/cdn/assets/DfdWpPG9ZcbRBGUg.js +10 -0
  159. package/cdn/assets/Di8JLQMx61fnrhOn.js +10 -0
  160. package/cdn/assets/DirXlaTG7TKxrqSR.js +10 -0
  161. package/cdn/assets/DivRRrwWTqpDEOsE.js +392 -0
  162. package/cdn/assets/DlGa-wREL0uZB2Nx.js +43 -0
  163. package/cdn/assets/DlMH1vSjXgvZMwQJ.js +90 -0
  164. package/cdn/assets/Dml7K4XhLTRwUDTY.js +27 -0
  165. package/cdn/assets/DwpS4SI4gT1eqfOs.js +10 -0
  166. package/cdn/assets/G0GROjU63_EPzAF7.js +241 -0
  167. package/cdn/assets/NoCZPCkSed8lQpNi.js +46 -0
  168. package/cdn/assets/O-MB9oo65vbYOjfG.js +260 -0
  169. package/cdn/assets/PzIeb5aTX9JzTTfm.js +424 -0
  170. package/cdn/assets/UENfAV2nBd83yFu7.js +10 -0
  171. package/cdn/assets/V2bW77WyjoyjJMvZ.js +5585 -0
  172. package/cdn/assets/YJiNeqIJTFYDQPxS.js +3936 -0
  173. package/cdn/assets/YYqCu_-Z9nzvEseu.js +10 -0
  174. package/cdn/assets/Yp0FxpbZyyvU_u6y.js +49 -0
  175. package/cdn/assets/aEhgzbKqmuKv1oqm.js +10 -0
  176. package/cdn/assets/bxGRTnY732xGNtpL.js +10 -0
  177. package/cdn/assets/djN8Su_7GYF42GqX.js +21 -0
  178. package/cdn/assets/m-A0SfNBx32zKuZU.js +29 -0
  179. package/cdn/assets/uvZYEIW4EfvcdsXG.js +12 -0
  180. package/cdn/assets/zZGhctwBXNlAYrJr.js +21 -0
  181. package/cdn/index.js +2 -2
  182. package/cdn/loader.js +1 -1
  183. package/package.json +3 -3
  184. package/cdn/assets/CY8njwo06MWkoPz2.js +0 -21
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.5.0
3
+ *
4
+ * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
+ * License: The license can be found at https://www.sheetxl.com/license.
6
+ */
7
+ const e = { DELAY: { s: "Returns the input value after a delay.", p: { time: { d: "the delay time in milliseconds. Default is 1000ms (1 second)." }, input: { d: "returns the input." }, label: { d: "optional label for the delay function.", v: "No label" } }, h: "Testing" }, WAIT: { s: "Starts waiting for event", p: { type: { d: "the type of message." }, input: { d: "an optional dependency." } }, h: "Testing" } };
8
+ export {
9
+ e as default
10
+ };
@@ -0,0 +1,47 @@
1
+ import { r as s, T as p, t as L, f as n, j as t, S as R, B as j, g as O, I as W, h as G, k as c, l as u, n as H, o as S, M as K } from "./2kXHnuU_uz-F9i1S.mjs";
2
+ /**
3
+ * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.5.0
4
+ *
5
+ * (C) 2025-present SheetXL Inc. & Michael T. Ford
6
+ * License: The license can be found at https://www.sheetxl.com/license.
7
+ */
8
+ const q = ["Ok", "Cancel"], J = s.memo((F) => {
9
+ const { initialValue: w, context: f, onOption: h, onValidateOption: d, onInputOption: C, onDone: m, options: b = q, defaultOption: r = b?.[0], cancelOption: g = "Cancel", sx: P, ...D } = F, [a, k] = s.useState(w), [I, $] = s.useState(!1), x = s.useCallback(async (e, o) => !0, []), y = p(async (e) => {
10
+ C?.(a, e), h?.(e, e === g, e === r), m?.();
11
+ }, [a, C, m, h, g, r]), M = p(async (e) => {
12
+ e.keyCode === L.Enter && await x?.(a, null) !== !1 && y(r);
13
+ }, [a, y]), N = p((e) => {
14
+ k(e.target.value), x?.(e.target.value, null);
15
+ }, [d]), V = p(async (e) => {
16
+ let o = await Promise.resolve(d?.(e));
17
+ try {
18
+ o !== !1 && (o = await Promise.resolve(x?.(a, e)) ?? !0);
19
+ } catch {
20
+ }
21
+ return o ?? !0;
22
+ }, [d]), [v, T] = s.useState(n.Styles.lookupStyle(a).formatType ?? n.Type.Custom);
23
+ s.useEffect(() => {
24
+ T(n.Styles.lookupStyle(a).formatType ?? n.Type.Custom);
25
+ }, [a]);
26
+ const B = s.useMemo(() => {
27
+ const e = n.Styles.lookupPrimary(), o = (i) => t.jsx(K, { value: i, children: i }, i), l = Object.keys(e).map((i) => o(e[i].formatType));
28
+ return l.push(o(n.Type.Custom)), l;
29
+ }, []), z = s.useCallback((e) => {
30
+ const o = e.target.value;
31
+ T(o);
32
+ const l = n.Styles.lookupDefault(o);
33
+ l && k(l);
34
+ }, []), E = s.useMemo(() => {
35
+ const e = f();
36
+ return e.createTemporaryCell({ value: e.getValue() ?? 12345, style: { numberFormat: a } });
37
+ }, [v, a, f]);
38
+ return t.jsx(R, { title: "Number Format", options: b, onDone: m, onOption: (e) => y(e), onValidateOption: V, defaultOption: r, cancelOption: g, autoFocusSel: ".autoFocus", sx: { width: "580px", ...P }, ...D, children: t.jsxs(j, { sx: { paddingTop: (e) => e.spacing(1), paddingBottom: (e) => e.spacing(0), rowGap: (e) => e.spacing(1), display: "flex", flexDirection: "column" }, children: [t.jsxs(O, { sx: { minWidth: 135 }, size: "small", children: [t.jsx(W, { children: "Category" }), t.jsx(G, { value: v, label: "Category", onChange: z, sx: { backgroundImage: `linear-gradient(${c("#fff", u(5))}, ${c("#fff", u(5))})` }, children: B })] }), t.jsx(O, { sx: { paddingTop: (e) => e.spacing(1.5), minWidth: 135, width: "100%" }, size: "small", children: t.jsx(H, { label: "Code", onFocus: (e) => {
39
+ I || e.target?.select(), $(!0);
40
+ }, sx: { "& .MuiFormHelperText-root": { marginTop: (e) => e.spacing(0.5) } }, InputLabelProps: { shrink: !0 }, InputProps: { inputProps: { className: "autoFocus", spellCheck: !1, autoComplete: "off", sx: { paddingTop: (e) => e.spacing(1.25), paddingBottom: (e) => e.spacing(0.75), backgroundImage: `linear-gradient(${c("#fff", u(5))}, ${c("#fff", u(5))})` } } }, value: a, onChange: N, onKeyDown: M, onContextMenu: (e) => {
41
+ e.stopPropagation();
42
+ } }) }), t.jsxs(j, { children: [t.jsx(S, { variant: "caption", component: "div", sx: { paddingLeft: (e) => e.spacing(2) }, children: "Preview" }), t.jsx(S, { variant: "body2", component: "div", sx: { borderRadius: (e) => `${e.shape.borderRadius}px`, padding: (e) => e.spacing(1), border: (e) => `1px solid ${e.palette.grey[400]}` }, children: E.getNumberFormat().displayText || "(empty)" })] })] }) });
43
+ });
44
+ export {
45
+ J as NumberFormatDialog,
46
+ J as default
47
+ };
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.5.0
3
+ *
4
+ * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
+ * License: The license can be found at https://www.sheetxl.com/license.
6
+ */
7
+ const t = { BAHTTEXT: { s: "Converts a number to baht (Thai) text", p: { number: { d: "is the number to convert" } } } };
8
+ export {
9
+ t as default
10
+ };
@@ -0,0 +1,392 @@
1
+ import { r as u, m as T } from "./2kXHnuU_uz-F9i1S.mjs";
2
+ /**
3
+ * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.5.0
4
+ *
5
+ * (C) 2025-present SheetXL Inc. & Michael T. Ford
6
+ * License: The license can be found at https://www.sheetxl.com/license.
7
+ */
8
+ function me(e, t, r) {
9
+ return t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
10
+ }
11
+ function ne(e, t) {
12
+ var r = Object.keys(e);
13
+ if (Object.getOwnPropertySymbols) {
14
+ var n = Object.getOwnPropertySymbols(e);
15
+ t && (n = n.filter(function(o) {
16
+ return Object.getOwnPropertyDescriptor(e, o).enumerable;
17
+ })), r.push.apply(r, n);
18
+ }
19
+ return r;
20
+ }
21
+ function oe(e) {
22
+ for (var t = 1; t < arguments.length; t++) {
23
+ var r = arguments[t] != null ? arguments[t] : {};
24
+ t % 2 ? ne(Object(r), !0).forEach(function(n) {
25
+ me(e, n, r[n]);
26
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : ne(Object(r)).forEach(function(n) {
27
+ Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
28
+ });
29
+ }
30
+ return e;
31
+ }
32
+ function ie(e, t) {
33
+ (t == null || t > e.length) && (t = e.length);
34
+ for (var r = 0, n = new Array(t); r < t; r++) n[r] = e[r];
35
+ return n;
36
+ }
37
+ function ye(e, t, r) {
38
+ return t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
39
+ }
40
+ function ue(e, t) {
41
+ var r = Object.keys(e);
42
+ if (Object.getOwnPropertySymbols) {
43
+ var n = Object.getOwnPropertySymbols(e);
44
+ t && (n = n.filter(function(o) {
45
+ return Object.getOwnPropertyDescriptor(e, o).enumerable;
46
+ })), r.push.apply(r, n);
47
+ }
48
+ return r;
49
+ }
50
+ function ce(e) {
51
+ for (var t = 1; t < arguments.length; t++) {
52
+ var r = arguments[t] != null ? arguments[t] : {};
53
+ t % 2 ? ue(Object(r), !0).forEach(function(n) {
54
+ ye(e, n, r[n]);
55
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : ue(Object(r)).forEach(function(n) {
56
+ Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
57
+ });
58
+ }
59
+ return e;
60
+ }
61
+ function V(e) {
62
+ return function t() {
63
+ for (var r = this, n = arguments.length, o = new Array(n), i = 0; i < n; i++) o[i] = arguments[i];
64
+ return o.length >= e.length ? e.apply(this, o) : function() {
65
+ for (var c = arguments.length, a = new Array(c), g = 0; g < c; g++) a[g] = arguments[g];
66
+ return t.apply(r, [].concat(o, a));
67
+ };
68
+ };
69
+ }
70
+ function U(e) {
71
+ return {}.toString.call(e).includes("Object");
72
+ }
73
+ function z(e) {
74
+ return typeof e == "function";
75
+ }
76
+ var R = V(function(e, t) {
77
+ throw new Error(e[t] || e.default);
78
+ })({ initialIsRequired: "initial state is required", initialType: "initial state should be an object", initialContent: "initial state shouldn't be an empty object", handlerType: "handler should be an object or a function", handlersType: "all handlers should be a functions", selectorType: "selector should be a function", changeType: "provided value of changes should be an object", changeField: 'it seams you want to change a field in the state which is not specified in the "initial" state', default: "an unknown error accured in `state-local` package" }), ve = function(e, t) {
79
+ return U(t) || R("changeType"), Object.keys(t).some(function(r) {
80
+ return n = e, o = r, !Object.prototype.hasOwnProperty.call(n, o);
81
+ var n, o;
82
+ }) && R("changeField"), t;
83
+ }, be = function(e) {
84
+ z(e) || R("selectorType");
85
+ }, we = function(e) {
86
+ z(e) || U(e) || R("handlerType"), U(e) && Object.values(e).some(function(t) {
87
+ return !z(t);
88
+ }) && R("handlersType");
89
+ }, Oe = function(e) {
90
+ var t;
91
+ e || R("initialIsRequired"), U(e) || R("initialType"), t = e, Object.keys(t).length || R("initialContent");
92
+ };
93
+ function je(e, t) {
94
+ return z(t) ? t(e.current) : t;
95
+ }
96
+ function Me(e, t) {
97
+ return e.current = ce(ce({}, e.current), t), t;
98
+ }
99
+ function Ee(e, t, r) {
100
+ return z(t) ? t(e.current) : Object.keys(r).forEach(function(n) {
101
+ var o;
102
+ return (o = t[n]) === null || o === void 0 ? void 0 : o.call(t, e.current[n]);
103
+ }), r;
104
+ }
105
+ var Q, Pe = function(e) {
106
+ var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
107
+ Oe(e), we(t);
108
+ var r = { current: e }, n = V(Ee)(r, t), o = V(Me)(r), i = V(ve)(e), c = V(je)(r);
109
+ return [function() {
110
+ var a = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : function(g) {
111
+ return g;
112
+ };
113
+ return be(a), a(r.current);
114
+ }, function(a) {
115
+ (function() {
116
+ for (var g = arguments.length, p = new Array(g), O = 0; O < g; O++) p[O] = arguments[O];
117
+ return function(b) {
118
+ return p.reduceRight(function(E, P) {
119
+ return P(E);
120
+ }, b);
121
+ };
122
+ })(n, o, i, c)(a);
123
+ }];
124
+ }, se = { configIsRequired: "the configuration object is required", configType: "the configuration object should be an object", default: "an unknown error accured in `@monaco-editor/loader` package", deprecation: `Deprecation warning!
125
+ You are using deprecated way of configuration.
126
+
127
+ Instead of using
128
+ monaco.config({ urls: { monacoBase: '...' } })
129
+ use
130
+ monaco.config({ paths: { vs: '...' } })
131
+
132
+ For more please check the link https://github.com/suren-atoyan/monaco-loader#config
133
+ ` }, ae = (Q = function(e, t) {
134
+ throw new Error(e[t] || e.default);
135
+ }, function e() {
136
+ for (var t = this, r = arguments.length, n = new Array(r), o = 0; o < r; o++) n[o] = arguments[o];
137
+ return n.length >= Q.length ? Q.apply(this, n) : function() {
138
+ for (var i = arguments.length, c = new Array(i), a = 0; a < i; a++) c[a] = arguments[a];
139
+ return e.apply(t, [].concat(n, c));
140
+ };
141
+ })(se), Re = function(e) {
142
+ var t;
143
+ return e || ae("configIsRequired"), t = e, {}.toString.call(t).includes("Object") || ae("configType"), e.urls ? (console.warn(se.deprecation), { paths: { vs: e.urls.monacoBase } }) : e;
144
+ };
145
+ function fe(e, t) {
146
+ return Object.keys(t).forEach(function(r) {
147
+ t[r] instanceof Object && e[r] && Object.assign(t[r], fe(e[r], t[r]));
148
+ }), oe(oe({}, e), t);
149
+ }
150
+ var Se = { type: "cancelation", msg: "operation is manually canceled" };
151
+ function W(e) {
152
+ var t = !1, r = new Promise(function(n, o) {
153
+ e.then(function(i) {
154
+ return t ? o(Se) : n(i);
155
+ }), e.catch(o);
156
+ });
157
+ return r.cancel = function() {
158
+ return t = !0;
159
+ }, r;
160
+ }
161
+ var X, de = function(e) {
162
+ if (Array.isArray(e)) return e;
163
+ }(X = Pe({ config: { paths: { vs: "https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/min/vs" } }, isInitialized: !1, resolve: null, reject: null, monaco: null })) || function(e) {
164
+ if (typeof Symbol < "u" && Symbol.iterator in Object(e)) {
165
+ var t = [], r = !0, n = !1, o = void 0;
166
+ try {
167
+ for (var i, c = e[Symbol.iterator](); !(r = (i = c.next()).done) && (t.push(i.value), t.length !== 2); r = !0) ;
168
+ } catch (a) {
169
+ n = !0, o = a;
170
+ } finally {
171
+ try {
172
+ r || c.return == null || c.return();
173
+ } finally {
174
+ if (n) throw o;
175
+ }
176
+ }
177
+ return t;
178
+ }
179
+ }(X) || function(e) {
180
+ if (e) {
181
+ if (typeof e == "string") return ie(e, 2);
182
+ var t = Object.prototype.toString.call(e).slice(8, -1);
183
+ return t === "Object" && e.constructor && (t = e.constructor.name), t === "Map" || t === "Set" ? Array.from(e) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? ie(e, 2) : void 0;
184
+ }
185
+ }(X) || function() {
186
+ throw new TypeError(`Invalid attempt to destructure non-iterable instance.
187
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
188
+ }(), q = de[0], B = de[1];
189
+ function ke(e) {
190
+ return document.body.appendChild(e);
191
+ }
192
+ function xe(e) {
193
+ var t, r, n = q(function(i) {
194
+ return { config: i.config, reject: i.reject };
195
+ }), o = (t = "".concat(n.config.paths.vs, "/loader.js"), r = document.createElement("script"), t && (r.src = t), r);
196
+ return o.onload = function() {
197
+ return e();
198
+ }, o.onerror = n.reject, o;
199
+ }
200
+ function Ie() {
201
+ var e = q(function(r) {
202
+ return { config: r.config, resolve: r.resolve, reject: r.reject };
203
+ }), t = window.require;
204
+ t.config(e.config), t(["vs/editor/editor.main"], function(r) {
205
+ ge(r), e.resolve(r);
206
+ }, function(r) {
207
+ e.reject(r);
208
+ });
209
+ }
210
+ function ge(e) {
211
+ q().monaco || B({ monaco: e });
212
+ }
213
+ var Z = new Promise(function(e, t) {
214
+ return B({ resolve: e, reject: t });
215
+ }), Y = { config: function(e) {
216
+ var t = Re(e), r = t.monaco, n = function(o, i) {
217
+ if (o == null) return {};
218
+ var c, a, g = function(O, b) {
219
+ if (O == null) return {};
220
+ var E, P, S = {}, k = Object.keys(O);
221
+ for (P = 0; P < k.length; P++) E = k[P], b.indexOf(E) >= 0 || (S[E] = O[E]);
222
+ return S;
223
+ }(o, i);
224
+ if (Object.getOwnPropertySymbols) {
225
+ var p = Object.getOwnPropertySymbols(o);
226
+ for (a = 0; a < p.length; a++) c = p[a], i.indexOf(c) >= 0 || Object.prototype.propertyIsEnumerable.call(o, c) && (g[c] = o[c]);
227
+ }
228
+ return g;
229
+ }(t, ["monaco"]);
230
+ B(function(o) {
231
+ return { config: fe(o.config, n), monaco: r };
232
+ });
233
+ }, init: function() {
234
+ var e = q(function(t) {
235
+ return { monaco: t.monaco, isInitialized: t.isInitialized, resolve: t.resolve };
236
+ });
237
+ if (!e.isInitialized) {
238
+ if (B({ isInitialized: !0 }), e.monaco) return e.resolve(e.monaco), W(Z);
239
+ if (window.monaco && window.monaco.editor) return ge(window.monaco), e.resolve(window.monaco), W(Z);
240
+ (function() {
241
+ for (var t = arguments.length, r = new Array(t), n = 0; n < t; n++) r[n] = arguments[n];
242
+ return function(o) {
243
+ return r.reduceRight(function(i, c) {
244
+ return c(i);
245
+ }, o);
246
+ };
247
+ })(ke, xe)(Ie);
248
+ }
249
+ return W(Z);
250
+ }, __getMonacoInstance: function() {
251
+ return q(function(e) {
252
+ return e.monaco;
253
+ });
254
+ } }, Te = { display: "flex", position: "relative", textAlign: "initial" }, Ce = { width: "100%" }, Ae = { display: "none" }, De = { container: { display: "flex", height: "100%", width: "100%", justifyContent: "center", alignItems: "center" } }, Ve = function({ children: e }) {
255
+ return T.createElement("div", { style: De.container }, e);
256
+ }, pe = u.memo(function({ width: e, height: t, isEditorReady: r, loading: n, _ref: o, className: i, wrapperProps: c }) {
257
+ return T.createElement("section", { style: { ...Te, width: e, height: t }, ...c }, !r && T.createElement(Ve, null, n), T.createElement("div", { ref: o, style: { ...Ce, ...!r && Ae }, className: i }));
258
+ }), ee = function(e) {
259
+ u.useEffect(e, []);
260
+ }, j = function(e, t, r = !0) {
261
+ let n = u.useRef(!0);
262
+ u.useEffect(n.current || !r ? () => {
263
+ n.current = !1;
264
+ } : e, t);
265
+ };
266
+ function L() {
267
+ }
268
+ function I(e, t, r, n) {
269
+ return i = n, (o = e).editor.getModel(le(o, i)) || function(c, a, g, p) {
270
+ return c.editor.createModel(a, g, p ? le(c, p) : void 0);
271
+ }(e, t, r, n);
272
+ var o, i;
273
+ }
274
+ function le(e, t) {
275
+ return e.Uri.parse(t);
276
+ }
277
+ var qe = u.memo(function({ original: e, modified: t, language: r, originalLanguage: n, modifiedLanguage: o, originalModelPath: i, modifiedModelPath: c, keepCurrentOriginalModel: a = !1, keepCurrentModifiedModel: g = !1, theme: p = "light", loading: O = "Loading...", options: b = {}, height: E = "100%", width: P = "100%", className: S, wrapperProps: k = {}, beforeMount: $ = L, onMount: G = L }) {
278
+ let [w, C] = u.useState(!1), [A, m] = u.useState(!0), y = u.useRef(null), f = u.useRef(null), D = u.useRef(null), v = u.useRef(G), l = u.useRef($), x = u.useRef(!1);
279
+ ee(() => {
280
+ let s = Y.init();
281
+ return s.then((d) => (f.current = d) && m(!1)).catch((d) => d?.type !== "cancelation" && console.error("Monaco initialization: error:", d)), () => y.current ? function() {
282
+ let d = y.current?.getModel();
283
+ a || d?.original?.dispose(), g || d?.modified?.dispose(), y.current?.dispose();
284
+ }() : s.cancel();
285
+ }), j(() => {
286
+ if (y.current && f.current) {
287
+ let s = y.current.getOriginalEditor(), d = I(f.current, e || "", n || r || "text", i || "");
288
+ d !== s.getModel() && s.setModel(d);
289
+ }
290
+ }, [i], w), j(() => {
291
+ if (y.current && f.current) {
292
+ let s = y.current.getModifiedEditor(), d = I(f.current, t || "", o || r || "text", c || "");
293
+ d !== s.getModel() && s.setModel(d);
294
+ }
295
+ }, [c], w), j(() => {
296
+ let s = y.current.getModifiedEditor();
297
+ s.getOption(f.current.editor.EditorOption.readOnly) ? s.setValue(t || "") : t !== s.getValue() && (s.executeEdits("", [{ range: s.getModel().getFullModelRange(), text: t || "", forceMoveMarkers: !0 }]), s.pushUndoStop());
298
+ }, [t], w), j(() => {
299
+ y.current?.getModel()?.original.setValue(e || "");
300
+ }, [e], w), j(() => {
301
+ let { original: s, modified: d } = y.current.getModel();
302
+ f.current.editor.setModelLanguage(s, n || r || "text"), f.current.editor.setModelLanguage(d, o || r || "text");
303
+ }, [r, n, o], w), j(() => {
304
+ f.current?.editor.setTheme(p);
305
+ }, [p], w), j(() => {
306
+ y.current?.updateOptions(b);
307
+ }, [b], w);
308
+ let _ = u.useCallback(() => {
309
+ if (!f.current) return;
310
+ l.current(f.current);
311
+ let s = I(f.current, e || "", n || r || "text", i || ""), d = I(f.current, t || "", o || r || "text", c || "");
312
+ y.current?.setModel({ original: s, modified: d });
313
+ }, [r, t, o, e, n, i, c]), N = u.useCallback(() => {
314
+ !x.current && D.current && (y.current = f.current.editor.createDiffEditor(D.current, { automaticLayout: !0, ...b }), _(), f.current?.editor.setTheme(p), C(!0), x.current = !0);
315
+ }, [b, p, _]);
316
+ return u.useEffect(() => {
317
+ w && v.current(y.current, f.current);
318
+ }, [w]), u.useEffect(() => {
319
+ !A && !w && N();
320
+ }, [A, w, N]), T.createElement(pe, { width: P, height: E, isEditorReady: w, loading: O, _ref: D, className: S, wrapperProps: k });
321
+ }), _e = function() {
322
+ let [e, t] = u.useState(Y.__getMonacoInstance());
323
+ return ee(() => {
324
+ let r;
325
+ return e || (r = Y.init(), r.then((n) => {
326
+ t(n);
327
+ })), () => r?.cancel();
328
+ }), e;
329
+ }, F = /* @__PURE__ */ new Map(), Le = u.memo(function({ defaultValue: e, defaultLanguage: t, defaultPath: r, value: n, language: o, path: i, theme: c = "light", line: a, loading: g = "Loading...", options: p = {}, overrideServices: O = {}, saveViewState: b = !0, keepCurrentModel: E = !1, width: P = "100%", height: S = "100%", className: k, wrapperProps: $ = {}, beforeMount: G = L, onMount: w = L, onChange: C, onValidate: A = L }) {
330
+ let [m, y] = u.useState(!1), [f, D] = u.useState(!0), v = u.useRef(null), l = u.useRef(null), x = u.useRef(null), _ = u.useRef(w), N = u.useRef(G), s = u.useRef(), d = u.useRef(n), he = function(h) {
331
+ let M = u.useRef();
332
+ return u.useEffect(() => {
333
+ M.current = h;
334
+ }, [h]), M.current;
335
+ }(i), te = u.useRef(!1), H = u.useRef(!1);
336
+ ee(() => {
337
+ let h = Y.init();
338
+ return h.then((M) => (v.current = M) && D(!1)).catch((M) => M?.type !== "cancelation" && console.error("Monaco initialization: error:", M)), () => l.current ? (s.current?.dispose(), E ? b && F.set(i, l.current.saveViewState()) : l.current.getModel()?.dispose(), void l.current.dispose()) : h.cancel();
339
+ }), j(() => {
340
+ let h = I(v.current, e || n || "", t || o || "", i || r || "");
341
+ h !== l.current?.getModel() && (b && F.set(he, l.current?.saveViewState()), l.current?.setModel(h), b && l.current?.restoreViewState(F.get(i)));
342
+ }, [i], m), j(() => {
343
+ l.current?.updateOptions(p);
344
+ }, [p], m), j(() => {
345
+ !l.current || n === void 0 || (l.current.getOption(v.current.editor.EditorOption.readOnly) ? l.current.setValue(n) : n !== l.current.getValue() && (H.current = !0, l.current.executeEdits("", [{ range: l.current.getModel().getFullModelRange(), text: n, forceMoveMarkers: !0 }]), l.current.pushUndoStop(), H.current = !1));
346
+ }, [n], m), j(() => {
347
+ let h = l.current?.getModel();
348
+ h && o && v.current?.editor.setModelLanguage(h, o);
349
+ }, [o], m), j(() => {
350
+ a !== void 0 && l.current?.revealLine(a);
351
+ }, [a], m), j(() => {
352
+ v.current?.editor.setTheme(c);
353
+ }, [c], m);
354
+ let re = u.useCallback(() => {
355
+ if (x.current && v.current && !te.current) {
356
+ N.current(v.current);
357
+ let h = i || r, M = I(v.current, n || e || "", t || o || "", h || "");
358
+ l.current = v.current?.editor.create(x.current, { model: M, automaticLayout: !0, ...p }, O), b && l.current.restoreViewState(F.get(h)), v.current.editor.setTheme(c), a !== void 0 && l.current.revealLine(a), y(!0), te.current = !0;
359
+ }
360
+ }, [e, t, r, n, o, i, p, O, b, c, a]);
361
+ return u.useEffect(() => {
362
+ m && _.current(l.current, v.current);
363
+ }, [m]), u.useEffect(() => {
364
+ !f && !m && re();
365
+ }, [f, m, re]), d.current = n, u.useEffect(() => {
366
+ m && C && (s.current?.dispose(), s.current = l.current?.onDidChangeModelContent((h) => {
367
+ H.current || C(l.current.getValue(), h);
368
+ }));
369
+ }, [m, C]), u.useEffect(() => {
370
+ if (m) {
371
+ let h = v.current.editor.onDidChangeMarkers((M) => {
372
+ let J = l.current.getModel()?.uri;
373
+ if (J && M.find((K) => K.path === J.path)) {
374
+ let K = v.current.editor.getModelMarkers({ resource: J });
375
+ A?.(K);
376
+ }
377
+ });
378
+ return () => {
379
+ h?.dispose();
380
+ };
381
+ }
382
+ return () => {
383
+ };
384
+ }, [m, A]), T.createElement(pe, { width: P, height: S, isEditorReady: m, loading: g, _ref: x, className: k, wrapperProps: $ });
385
+ }), Ne = Le;
386
+ export {
387
+ qe as DiffEditor,
388
+ Le as Editor,
389
+ Ne as default,
390
+ Y as loader,
391
+ _e as useMonaco
392
+ };
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.5.0
3
+ *
4
+ * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
+ * License: The license can be found at https://www.sheetxl.com/license.
6
+ */
7
+ const t = { FILTERXML: { s: "Returns specific data from XML content using the specified XPath.", p: { xml: { d: "is a string in valid XML format." }, xpath: { d: "is a string in standard XPath format." } } } };
8
+ export {
9
+ t as default
10
+ };