@sheetxl/studio-vanilla 0.3.17 → 0.3.19

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 (87) hide show
  1. package/browser/cjs/{Bc3a9_6Ve1YHGowK.cjs → 2FwFu5228wr-ARkA.cjs} +3 -3
  2. package/browser/cjs/B32tWc1qRv4tY12p.cjs +6 -0
  3. package/browser/cjs/{BnVtO_MwV8I3mDul.cjs → BA4eX47IpP00-8so.cjs} +2 -2
  4. package/browser/cjs/{DLSKs1QVKEKXE0w6.cjs → BKPCa_z6dnIQn-0l.cjs} +1 -1
  5. package/browser/cjs/{DKAdHUu3UvatZtg2.cjs → BWs24EHW-tVFgT-x.cjs} +2 -2
  6. package/browser/cjs/{tyAHtYASyFxcUsnd.cjs → BdvCvAgiry0f4S23.cjs} +1 -1
  7. package/browser/cjs/{DvL9Sc8iPPufipGY.cjs → CDKv578p0EwvHjZp.cjs} +1 -1
  8. package/browser/cjs/{C6fuW2cVa9dQZ4Je.cjs → CIo606dkZ8lkuDJ3.cjs} +1 -1
  9. package/browser/cjs/{DC6xjrFPr2HOnpEZ.cjs → CY7-VXmdgBslTVMX.cjs} +3 -3
  10. package/browser/cjs/{CTOC9ZTrMjZHrqbQ.cjs → Ce6oHmr7gMYWd8Yd.cjs} +5 -5
  11. package/browser/cjs/{Br7LE-apfiyLpwKT.cjs → Cfdd6ktavWDYX9ND.cjs} +1 -1
  12. package/browser/cjs/{BGcNUqTfmjyHIbaI.cjs → Cjh4Y6CzIKElfhND.cjs} +2 -2
  13. package/browser/cjs/{Bb-lqHwGFvmeBzPZ.cjs → Cnk7ISRHexlfGYia.cjs} +1 -1
  14. package/browser/cjs/{BserbrusW-zB2hKv.cjs → D0TmTI_7aDwkiyE4.cjs} +2 -2
  15. package/browser/cjs/{DxbPSb3PKSwud1HY.cjs → DJC4cn9wXv_q5aHy.cjs} +2 -2
  16. package/browser/cjs/{B0W8Ro2JrQ96SBYz.cjs → DPk0an7l4dAKSvt4.cjs} +6 -6
  17. package/browser/cjs/{cyLp79UpmhtbS2yS.cjs → DQu9kotW1g223yHH.cjs} +45 -45
  18. package/browser/cjs/{DzNRMZunrlSGwLSb.cjs → Do4JoiMPrmr8e_3I.cjs} +2 -2
  19. package/browser/cjs/DtwZ1dCv4IJK54Md.cjs +6 -0
  20. package/browser/cjs/{BnQxin2UUpaly5NP.cjs → MSGlzfMbdkBj2ODr.cjs} +1 -1
  21. package/browser/cjs/{CmpPGljzpUKgOIxx.cjs → USAsNV7756AJ-v-3.cjs} +1 -1
  22. package/browser/cjs/{CG4QG81y7pyNQwcS.cjs → bLAfby6zV0qLxdQi.cjs} +2 -2
  23. package/browser/cjs/{DSPikvyWE4g-uDuD.cjs → gPTujfwB4RqxIcij.cjs} +1 -1
  24. package/browser/cjs/index.cjs +2 -2
  25. package/browser/cjs/{B_3Ajb0Oax8flgwH.cjs → lObc2MW6JiaOpm-q.cjs} +2 -2
  26. package/browser/cjs/{TghIPPRKOuPkkaj_.cjs → mSxg83umiyMZNf9-.cjs} +2 -2
  27. package/browser/cjs/{CKZhKYw44E-Ni1nu.cjs → vWIDSfediysRj8eo.cjs} +6 -6
  28. package/{cdn/assets/CZUKS6s-vZgN9aos.js → browser/esm/4b-cAFWAwXYZkw0D.mjs} +1 -1
  29. package/browser/esm/{B8rvcrFdHFZY1Sz4.mjs → B8OZHivNmO5OFLTi.mjs} +17 -17
  30. package/browser/esm/BGvOrkSiilN4Dt_5.mjs +46 -0
  31. package/browser/esm/{BL2AZ33IU3F9bUt7.mjs → BjXzbYB0kCMhwN3Y.mjs} +2621 -2534
  32. package/browser/esm/{BH8SzwM3UkwJ3Eap.mjs → BlxEnptsgkGA0_21.mjs} +9 -9
  33. package/browser/esm/{BPrdUtlmJCtc3q1E.mjs → Bm440-d54x4naZeO.mjs} +1 -1
  34. package/{cdn/assets/CKDR83IC6nVl5Ejn.js → browser/esm/BnmsWZ7pB-RvN8Ce.mjs} +8 -8
  35. package/{cdn/assets/B1YbVSzaF3q-DvkR.js → browser/esm/BorGhlvsrSc8KIw4.mjs} +9 -9
  36. package/{cdn/assets/CXH_df_BJWGouWGx.js → browser/esm/Brg-pw5qowVCqKUF.mjs} +1 -1
  37. package/browser/esm/{Bzij_asTK4-12wX9.mjs → C2UMejLEXH1i7UT_.mjs} +3 -3
  38. package/browser/esm/{JNJMM7jPjOx60cf7.mjs → C6ty7TIqMKf0jms4.mjs} +1 -1
  39. package/browser/esm/{BMUhikJUsjFxek33.mjs → CDha50D0Zqdh75RO.mjs} +47 -47
  40. package/browser/esm/{D4Vwg7DdbgL5-gzc.mjs → CHNBfqp5n8JaC7UU.mjs} +3 -3
  41. package/{cdn/assets/BxSEIQhicQfdXtJF.js → browser/esm/CkOpEOqipQhoCXbp.mjs} +7 -7
  42. package/browser/esm/{CMBCkSY-ay1nfbs_.mjs → CxJ9wqppH10FCE7E.mjs} +2 -2
  43. package/browser/esm/{C3DBhxZlYozBEVla.mjs → D8V8o3E9AIpGCaJ0.mjs} +5 -5
  44. package/browser/esm/{CBWY-rnGz5x3lEXM.mjs → DGbBeyHSDhhZ67G7.mjs} +91 -91
  45. package/browser/esm/{u3fz83lT2CnMmRBA.mjs → DHtJbuH4VrIp2owl.mjs} +4 -4
  46. package/browser/esm/{C8xqJMf37wA-WPT0.mjs → DNEd6u6uOJT1ngWx.mjs} +7 -7
  47. package/browser/esm/{YdKPg8NGmPUPJuwl.mjs → DTW0B_xW-HuS3NuK.mjs} +5 -5
  48. package/browser/esm/{_Rc93Vlm8MW1zcHZ.mjs → DzowkvQRyggO7Ijl.mjs} +1 -1
  49. package/browser/esm/{CfoeArGH9Iu0fzXt.mjs → FNXLcvV7DgUq6zwL.mjs} +1 -1
  50. package/{cdn/assets/XBRwKmVZSI2nKxkp.js → browser/esm/SWAv_VgEKg95ORt5.mjs} +1 -1
  51. package/browser/esm/index.mjs +2 -2
  52. package/browser/esm/{CKipCLj2Z39o67b7.mjs → vYT-yKp90JOPBqDa.mjs} +2 -2
  53. package/{cdn/assets/CNjDb--pc3V19tGB.js → browser/esm/vsx7PlJlMQvNPm_L.mjs} +1 -1
  54. package/browser/esm/{BTLRhd22C-Nd_eBp.mjs → zovGkWpLePhgQd_n.mjs} +1 -1
  55. package/{browser/esm/CZUKS6s-vZgN9aos.mjs → cdn/assets/4b-cAFWAwXYZkw0D.js} +1 -1
  56. package/cdn/assets/{l9P-OMHe7Eutt2ON.js → 8QCrFIzHmtIoeBJm.js} +4 -4
  57. package/{browser/esm/BlH7pxV8dydnI68w.mjs → cdn/assets/8xNW6edqjY-klal3.js} +9 -9
  58. package/cdn/assets/{k3_rVDX-B8ArpvvF.js → BJlG0NMA-JM_rPkc.js} +91 -91
  59. package/cdn/assets/{B4xbV8b1vgkFuf8S.js → BNcPMWtsY8_g-EN4.js} +5 -5
  60. package/cdn/assets/BhwpQU1T51VKYXPZ.js +46 -0
  61. package/cdn/assets/{BPrdUtlmJCtc3q1E.js → Bm440-d54x4naZeO.js} +1 -1
  62. package/{browser/esm/CXH_df_BJWGouWGx.mjs → cdn/assets/Brg-pw5qowVCqKUF.js} +1 -1
  63. package/cdn/assets/{5Ol3UAykJGv4enb7.js → BrkvsmfqGj5-gULd.js} +2 -2
  64. package/cdn/assets/{OH4OLMUwFOvLynOc.js → BtcEbQwXXgpwi-Wc.js} +17 -17
  65. package/cdn/assets/{B0iEzLbaCkkrdj7y.js → C4-fZEqFmgf4Ryrf.js} +5 -5
  66. package/cdn/assets/{JNJMM7jPjOx60cf7.js → C6ty7TIqMKf0jms4.js} +1 -1
  67. package/cdn/assets/{C-FnVtey6FtIMdLg.js → CD48E90J73F2rFJF.js} +3 -3
  68. package/{browser/esm/BKcHYlDCeQadoUAd.mjs → cdn/assets/D3-MLKMldcoobrMe.js} +8 -8
  69. package/cdn/assets/{C40I-vetBKD2pUv3.js → DVoDFCX7Bv_zFVVi.js} +4599 -4512
  70. package/cdn/assets/{I7By3WBOaNjGDp5W.js → DkRkxpsLaXOm1dGc.js} +7 -7
  71. package/cdn/assets/{DB7EL7vNAfpdzGYu.js → DoNQnutyjVRliOV0.js} +2 -2
  72. package/cdn/assets/{CliYamYDN65pX6vp.js → DzXbXyuxyjtFLOXt.js} +9 -9
  73. package/cdn/assets/{_Rc93Vlm8MW1zcHZ.js → DzowkvQRyggO7Ijl.js} +1 -1
  74. package/cdn/assets/{CfoeArGH9Iu0fzXt.js → FNXLcvV7DgUq6zwL.js} +1 -1
  75. package/{browser/esm/XBRwKmVZSI2nKxkp.mjs → cdn/assets/SWAv_VgEKg95ORt5.js} +1 -1
  76. package/cdn/assets/{BIq8iXWFphwulDEI.js → TXu1jpI8ASN4INNu.js} +47 -47
  77. package/cdn/assets/{Dbhi34qDFM0nygPU.js → aAVhloO6mFh8WJzi.js} +3 -3
  78. package/{browser/esm/CNjDb--pc3V19tGB.mjs → cdn/assets/vsx7PlJlMQvNPm_L.js} +1 -1
  79. package/{browser/esm/C_5TG94caiLqXYi9.mjs → cdn/assets/yLoKmwpXykv9-Elu.js} +7 -7
  80. package/cdn/assets/{BTLRhd22C-Nd_eBp.js → zovGkWpLePhgQd_n.js} +1 -1
  81. package/cdn/index.js +2 -2
  82. package/cdn/loader.js +1 -1
  83. package/package.json +3 -3
  84. package/browser/cjs/DdImTaClMFBNUqjw.cjs +0 -6
  85. package/browser/cjs/Q-FApIecuUKlV75X.cjs +0 -6
  86. package/browser/esm/Bynz8AXGVCdHXnWS.mjs +0 -46
  87. package/cdn/assets/CVrbSur8obLaWUEL.js +0 -46
@@ -1,10 +1,10 @@
1
1
  import { jsx as i, jsxs as p } from "react/jsx-runtime";
2
2
  import { memo as oe, useRef as C, useState as b, useEffect as L, useLayoutEffect as pe, useMemo as de } from "react";
3
3
  import { ICell as c, IRange as R } from "@sheetxl/sdk";
4
- import { t as D, w as H, av as ue, W as fe, aA as ge, aB as me, B as O, aC as m, ah as x, aD as xe, a8 as y, aE as he, a as _, c as k, aF as Oe, aG as Ce, aH as ye, aI as be, ay as w, aJ as ve, aK as Te, ak as Re, az as ke, F as we, aw as Ee, ax as Fe } from "./BL2AZ33IU3F9bUt7.mjs";
5
- import { C as ee } from "./CBWY-rnGz5x3lEXM.mjs";
4
+ import { t as D, v as H, av as ue, V as fe, aA as ge, aB as me, B as O, aC as m, ah as x, aD as xe, a8 as y, aE as he, T as _, a as k, aF as Oe, aG as Ce, aH as ye, aI as be, ay as w, aJ as ve, aK as Te, ak as Re, az as ke, F as we, aw as Ee, ax as Fe } from "./BjXzbYB0kCMhwN3Y.mjs";
5
+ import { C as ee } from "./DGbBeyHSDhhZ67G7.mjs";
6
6
  /**
7
- * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.17
7
+ * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.19
8
8
  *
9
9
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
10
10
  * License: The license can be found at https://www.sheetxl.com/license.
@@ -27,23 +27,23 @@ const Ae = { "By Rows": !0, "By Columns": !1 }, ie = (E, h) => {
27
27
  if (h[d] === E) return d;
28
28
  }
29
29
  }, ze = oe((E) => {
30
- const { replace: h = !1, findText: r, replaceText: a, findOptions: d, replaceOptions: v, title: A, onHide: K, onFindOrReplace: T, ...P } = E, s = C(null), u = C(null), W = C(null), $ = C(null), j = C(null), N = C(null), G = (e, t) => {
30
+ const { replace: h = !1, findText: r, replaceText: a, findOptions: d, replaceOptions: v, title: A, onHide: K, onFindOrReplace: T, ...P } = E, s = C(null), u = C(null), $ = C(null), W = C(null), j = C(null), N = C(null), G = (e, t) => {
31
31
  t && (t.start(e, { center: !1 }), setTimeout(() => t.stop(e), 180));
32
- }, [J, I] = b(!1), [B, le] = b(!1), [f, M] = b(h), [U, V] = b(!1), [X, q] = b(!1), [o, l] = b({ findText: null, replaceText: null, replace: h, replaceOptions: {}, findOptions: { matchCase: !1, matchEntireCell: !1, useRegex: !1, orientation: R.Orientation.Row, fields: [c.Content.Formulas] }, scope: te.Sheet }), F = H(async (e, t, n, S) => {
32
+ }, [J, I] = b(!1), [V, le] = b(!1), [f, B] = b(h), [U, M] = b(!1), [X, q] = b(!1), [o, l] = b({ findText: null, replaceText: null, replace: h, replaceOptions: {}, findOptions: { matchCase: !1, matchEntireCell: !1, useRegex: !1, orientation: R.Orientation.Row, fields: [c.Content.Formulas] }, scope: te.Sheet }), F = H(async (e, t, n, S) => {
33
33
  if (!T) return;
34
34
  const g = { ...o };
35
35
  g.replaceOptions = { ...g.replaceOptions }, g.findOptions = { ...g.findOptions }, g.replaceOptions.maxCount = n ? void 0 : 1, g.replace = t, t && o.findOptions.fields?.[0] === c.Content.Values && (g.findOptions.fields = [c.Content.Formulas]), g.findOptions.reverse = !e;
36
36
  const ce = await T({ autoFocus: S, ...g });
37
- V(ce === 0);
37
+ M(ce === 0);
38
38
  }, [o, T]);
39
39
  L(() => {
40
- V(!1);
41
- }, [o, B, f]);
40
+ M(!1);
41
+ }, [o, V, f]);
42
42
  const Q = H((e, t) => {
43
43
  if (e.keyCode === ue.Enter) {
44
44
  if (!o.findText) return;
45
45
  let n = !0, S = !1;
46
- e.shiftKey && (n = !1), t ? (e.ctrlKey && e.altKey && (S = !0), G(e, S ? N.current : j.current)) : G(e, n ? $.current : W.current), F(n, t, S, !1);
46
+ e.shiftKey && (n = !1), t ? (e.ctrlKey && e.altKey && (S = !0), G(e, S ? N.current : j.current)) : G(e, n ? W.current : $.current), F(n, t, S, !1);
47
47
  }
48
48
  }, [o]), Y = C(null);
49
49
  pe(() => {
@@ -51,7 +51,7 @@ const Ae = { "By Rows": !0, "By Columns": !1 }, ie = (E, h) => {
51
51
  const t = { ...e };
52
52
  t.findText = r && r.length > 0 ? r : e.findText ?? "", I(!0), a !== void 0 && (t.replaceText = a), d && (t.findOptions = { ...t.findOptions, ...d }), t.replaceText || (t.replaceText = ""), t.replaceOptions && (t.replaceOptions = { ...t.replaceOptions }), v && (t.replaceOptions = { ...t.replaceOptions, ...v }), o.findOptions.fields?.[0] || (o.findOptions.fields = [c.Content.Formulas]);
53
53
  const n = !(!v && a === void 0);
54
- return n && M(n), t;
54
+ return n && B(n), t;
55
55
  }), X || Y.current?.focus();
56
56
  }, [r, a, d, v]), L(() => {
57
57
  f ? (o.findOptions.fields[0], c.Content.Values) : I(!0);
@@ -62,9 +62,9 @@ const Ae = { "By Rows": !0, "By Columns": !1 }, ie = (E, h) => {
62
62
  }, [J, o]);
63
63
  const [re, { width: Z }] = fe();
64
64
  return i(ge, { title: A ?? (f ? "Find & Replace" : "Find"), initialPosition: { y: "35" }, autoFocusSel: ".input", refWindow: Y, onHide: K, onFocus: () => q(!0), onBlur: () => {
65
- q(!1), V(!1);
65
+ q(!1), M(!1);
66
66
  }, PaperProps: { elevation: X ? 3 : 1 }, ...P, children: p(me, { dividers: !0, ref: re, sx: { display: "flex", flexDirection: "column", paddingLeft: (e) => e.spacing(1.5), paddingRight: (e) => e.spacing(1.5) }, onKeyDown: (e) => {
67
- if (e.key === "h" && e.ctrlKey) M(!0), s.current?.contains(document.activeElement) && u.current?.focus();
67
+ if (e.key === "h" && e.ctrlKey) B(!0), s.current?.contains(document.activeElement) && u.current?.focus();
68
68
  else if (e.key === "f" && e.ctrlKey) s.current?.focus();
69
69
  else if (e.key === "c" && e.altKey) l((t) => {
70
70
  const n = { ...t };
@@ -82,10 +82,10 @@ const Ae = { "By Rows": !0, "By Columns": !1 }, ie = (E, h) => {
82
82
  });
83
83
  }
84
84
  e.preventDefault();
85
- }, children: [p(O, { sx: { display: "flex", flexDirection: "row", gap: (e) => e.spacing(1) }, children: [p(O, { sx: { display: "flex", flexDirection: "row", alignItems: "start", gap: (e) => e.spacing(0.25), paddingTop: "3px" }, children: [i(m, { selected: B, onSelectToggle: (e) => {
85
+ }, children: [p(O, { sx: { display: "flex", flexDirection: "row", gap: (e) => e.spacing(1) }, children: [p(O, { sx: { display: "flex", flexDirection: "row", alignItems: "start", gap: (e) => e.spacing(0.25), paddingTop: "3px" }, children: [i(m, { selected: V, onSelectToggle: (e) => {
86
86
  le(e);
87
87
  }, preventFocus: !0, label: "Toggle Additional Options", icon: x(i(xe, {})) }), i(m, { selected: f, onSelectToggle: (e) => {
88
- M(e);
88
+ B(e);
89
89
  }, preventFocus: !0, label: "Toggle Replace", icon: x(i(he, {})), shortcut: { key: f ? "F" : "H", modifiers: [y.Ctrl] } })] }), p(O, { sx: { display: "flex", flexDirection: "column", maxWidth: "100%", boxSizing: "border-box" }, children: [p(O, { sx: { display: "flex", flexDirection: "row", alignItems: "center" }, children: [i(_, { label: "Find", InputLabelProps: { shrink: !0 }, InputProps: { sx: { paddingRight: (e) => e.spacing(1), minWidth: Z > 460 ? "20em" : void 0, backgroundImage: `linear-gradient(${k("#fff", w(5))}, ${k("#fff", w(5))})` }, inputProps: { draggable: !1, ref: s, className: "input", autoFocus: !0, spellCheck: !1, autoComplete: "off", sx: { paddingTop: (e) => e.spacing(1.25), paddingBottom: (e) => e.spacing(0.75) } }, endAdornment: i(Oe, { sx: { transform: "scale(0.75) translateX(16px)" }, position: "end", children: p(O, { sx: { display: "flex", alignItems: "center", flexDirection: "row", gap: "1px" }, children: [i(m, { selected: o.findOptions.matchCase, onSelectToggle: (e) => {
90
90
  l((t) => {
91
91
  const n = { ...t };
@@ -110,9 +110,9 @@ const Ae = { "By Rows": !0, "By Columns": !1 }, ie = (E, h) => {
110
110
  e.stopPropagation();
111
111
  } }), i(m, { selected: o.findOptions.reverse, onSelectToggle: (e) => {
112
112
  F(!1, !1);
113
- }, touchRippleRef: W, label: "", shortcut: { key: "Enter", modifiers: [y.Shift] }, icon: x(o.findOptions.orientation !== R.Orientation.Column ? i(Se, {}) : i(De, {})), disabled: !o.findText }), i(m, { selected: !o.findOptions.reverse, onSelectToggle: (e) => {
113
+ }, touchRippleRef: $, label: "", shortcut: { key: "Enter", modifiers: [y.Shift] }, icon: x(o.findOptions.orientation !== R.Orientation.Column ? i(Se, {}) : i(De, {})), disabled: !o.findText }), i(m, { selected: !o.findOptions.reverse, onSelectToggle: (e) => {
114
114
  F(!0, !1);
115
- }, touchRippleRef: $, label: "Next Match", shortcut: { key: "Enter" }, icon: x(o.findOptions.orientation !== R.Orientation.Column ? i(Le, {}) : i(Ie, {})), disabled: !o.findText })] }), i(ee, { in: f, timeout: ne, onExit: () => {
115
+ }, touchRippleRef: W, label: "Next Match", shortcut: { key: "Enter" }, icon: x(o.findOptions.orientation !== R.Orientation.Column ? i(Le, {}) : i(Ie, {})), disabled: !o.findText })] }), i(ee, { in: f, timeout: ne, onExit: () => {
116
116
  s.current?.focus();
117
117
  }, children: p(O, { sx: { display: "flex", flexDirection: "row", alignItems: "center", marginTop: (e) => e.spacing(2) }, children: [i(_, { label: "Replace", InputLabelProps: { shrink: !0 }, InputProps: { sx: { paddingRight: (e) => e.spacing(1), backgroundImage: `linear-gradient(${k("#fff", w(5))}, ${k("#fff", w(5))})` }, inputProps: { ref: u, className: "input", spellCheck: !1, autoComplete: "off", sx: { paddingTop: (e) => e.spacing(1.25), paddingBottom: (e) => e.spacing(0.75) } } }, sx: { flex: "1 1 100%", marginRight: (e) => e.spacing(1) }, value: o.replaceText ?? "", onChange: (e) => {
118
118
  l((t) => {
@@ -125,7 +125,7 @@ const Ae = { "By Rows": !0, "By Columns": !1 }, ie = (E, h) => {
125
125
  F(!0, !0);
126
126
  }, touchRippleRef: j, label: "Replace", shortcut: { key: "Enter" }, icon: x(i(ve, {})), disabled: !o.findText }), i(m, { onSelectToggle: (e) => {
127
127
  F(!0, !0, !0);
128
- }, touchRippleRef: N, label: "Replace All", shortcut: { key: "Enter", modifiers: [y.Ctrl, y.Alt] }, icon: x(i(Te, {})), disabled: !o.findText })] }) })] })] }), i(ee, { in: B, timeout: ne, onExit: () => {
128
+ }, touchRippleRef: N, label: "Replace All", shortcut: { key: "Enter", modifiers: [y.Ctrl, y.Alt] }, icon: x(i(Te, {})), disabled: !o.findText })] }) })] })] }), i(ee, { in: V, timeout: ne, onExit: () => {
129
129
  s.current?.focus();
130
130
  }, children: p(O, { sx: { minHeight: "10px", flex: "1 1 100%", display: "flex", flexDirection: "column", gap: (e) => e.spacing(0.5), marginTop: (e) => e.spacing(1) }, children: [i(Re, { orientation: "horizontal", sx: { marginBottom: (e) => e.spacing(1.5) } }), p(O, { sx: { display: "flex", flexDirection: Z >= 413 ? "row" : "column", justifyContent: "space-evenly", alignItems: "center", rowGap: (e) => e.spacing(2) }, tabIndex: -1, children: [i(z, { label: "Within", value: o.scope, options: te, onSelect: (e) => {
131
131
  l((t) => {
@@ -0,0 +1,46 @@
1
+ import { jsx as o, jsxs as A } from "react/jsx-runtime";
2
+ import { memo as E, useMemo as b, useState as g, useCallback as O } from "react";
3
+ import { v as f, b as S, B as U, F as P, T as D, a as l, ay as p } from "./BjXzbYB0kCMhwN3Y.mjs";
4
+ /**
5
+ * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.19
6
+ *
7
+ * (C) 2025-present SheetXL Inc. & Michael T. Ford
8
+ * License: The license can be found at https://www.sheetxl.com/license.
9
+ */
10
+ const V = ["Ok", "Cancel"], J = E((F) => {
11
+ const { initialHyperlink: n = null, initialDisplay: v = null, onUpdateHyperlink: m, context: s, onOption: x, onValidateOption: r, onDone: d, options: h = V, defaultOption: c = h?.[0], cancelOption: i = "Cancel", sx: H, ...I } = F, w = b(() => (n ?? s?.()?.getHyperlink()) !== null, []), y = b(() => {
12
+ let a = null, t = null;
13
+ n && (typeof n == "string" ? t = n : a = n);
14
+ const C = a ?? s?.()?.getHyperlink();
15
+ return { address: t ?? C?.getAddress() ?? "", textToDisplay: C?.getDisplayText() ?? "" };
16
+ }, [n, s]), [e, M] = g(y.address), [u, B] = g(() => {
17
+ const a = s?.().toTextUnformatted() ?? v;
18
+ return a === y.address ? "" : a;
19
+ }), [$, k] = g(!1), L = O((a) => {
20
+ B(a.target.value);
21
+ }, []), T = O(async (a, t) => null, []), W = f(async (a) => {
22
+ a !== i && m?.(e === "" ? null : { address: e }, u), x?.(a, a === i, a === c), d?.();
23
+ }, [e, u, m, d, x, c, i]), j = f((a) => {
24
+ M(a.target.value), T(a.target.value, null);
25
+ }, [r]), z = f(async (a) => {
26
+ let t = await Promise.resolve(r?.(a));
27
+ try {
28
+ t !== !1 && (t = await T(e, a));
29
+ } catch {
30
+ }
31
+ return t ?? !0;
32
+ }, [r]);
33
+ return o(S, { title: (w ? "Edit" : "Insert") + " Link", options: h, onDone: d, onOption: (a) => W(a), onValidateOption: z, defaultOption: c, cancelOption: i, autoFocusSel: ".autoFocus", sx: { width: "480px", ...H }, ...I, children: A(U, { sx: { paddingTop: (a) => a.spacing(1), paddingBottom: (a) => a.spacing(0), rowGap: (a) => a.spacing(1), display: "flex", flexDirection: "column" }, children: [o(P, { sx: { paddingTop: (a) => a.spacing(1.5), minWidth: 135, width: "100%" }, size: "small", children: o(D, { label: "Address", placeholder: "Enter a url or cell reference.", onFocus: (a) => {
34
+ $ || a.target?.select(), k(!0);
35
+ }, sx: { "& .MuiFormHelperText-root": { marginTop: (a) => a.spacing(0.5) } }, InputLabelProps: { shrink: !0 }, InputProps: { inputProps: { className: "autoFocus", spellCheck: !1, autoComplete: "off", sx: { paddingTop: (a) => a.spacing(1.25), paddingBottom: (a) => a.spacing(0.75), backgroundImage: `linear-gradient(${l("#fff", p(5))}, ${l("#fff", p(5))})` } } }, value: e, onChange: j, onContextMenu: (a) => {
36
+ a.stopPropagation();
37
+ } }) }), o(P, { sx: { paddingTop: (a) => a.spacing(1.5), minWidth: 135, width: "100%" }, size: "small", children: o(D, { label: "Display Text", placeholder: e?.startsWith("#") ? e.substring(1) : e, onFocus: () => {
38
+ k(!0);
39
+ }, sx: { "& .MuiFormHelperText-root": { marginTop: (a) => a.spacing(0.5) } }, InputLabelProps: { shrink: !0 }, InputProps: { inputProps: { spellCheck: !1, autoComplete: "off", sx: { paddingTop: (a) => a.spacing(1.25), paddingBottom: (a) => a.spacing(0.75), backgroundImage: `linear-gradient(${l("#fff", p(5))}, ${l("#fff", p(5))})` } } }, value: u, onChange: L, onContextMenu: (a) => {
40
+ a.stopPropagation();
41
+ } }) })] }) });
42
+ });
43
+ export {
44
+ J as HyperlinkDialog,
45
+ J as default
46
+ };