@sheetxl/studio-vanilla 0.4.7 → 0.4.8

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 (92) hide show
  1. package/README.md +3 -3
  2. package/browser/cjs/{C14PMFhYpGUhrvq1.cjs → 3nTDo2EiTknjadbt.cjs} +1 -1
  3. package/browser/cjs/6Wu3sLyx-7NM6CXS.cjs +301 -0
  4. package/browser/cjs/B11W4AIKbkJQG6ug.cjs +6 -0
  5. package/browser/cjs/{Bgl5W-fCpnnnO3_F.cjs → BCnlTOmUDmizyvVV.cjs} +2 -2
  6. package/browser/cjs/{DE5MhliNUlcqzd9C.cjs → BIPxYhhi1F-y0gSm.cjs} +3 -3
  7. package/browser/cjs/{D5I2M8yOTfapq6d7.cjs → BYhOQCFEzewgsKDn.cjs} +2 -2
  8. package/browser/cjs/{C73dxZSAw05vqEtJ.cjs → BqLDj2GlSzX8ZN3l.cjs} +1 -1
  9. package/browser/cjs/{00LGtBNvHHqHMD_7.cjs → C2B3wbeahcHlbOBZ.cjs} +2 -2
  10. package/browser/cjs/C6nZKAevPqj8zJY-.cjs +6 -0
  11. package/browser/cjs/{B0pcLInszgzhrjui.cjs → CD_HItzF2RneMAER.cjs} +2 -2
  12. package/browser/cjs/{D8WkJStmUKY23vEC.cjs → CE5NVYltiso41NzK.cjs} +1 -1
  13. package/browser/cjs/{DPgVQdCYWI3fGYJ2.cjs → CHSE1pa8SMApg4BM.cjs} +2 -2
  14. package/browser/cjs/{HCih5BN1MZGUuqGG.cjs → CTXKzcsm-W1ujL_U.cjs} +6 -6
  15. package/browser/cjs/{CQAkk0gbl342HFs-.cjs → CcQjGGiCx6Qz7yJ4.cjs} +1 -1
  16. package/browser/cjs/{BC5f5sl2pjp8FYIk.cjs → Cqymi9AOXO_JYvY4.cjs} +2 -2
  17. package/browser/cjs/{DGlLxziqSNTW0c6v.cjs → D6pPBbRPLTNFSXuO.cjs} +1 -1
  18. package/browser/cjs/{DNQqhDlfagjGC2sO.cjs → DMUSzq5n2k0WNFw6.cjs} +2 -2
  19. package/browser/cjs/DWTMnPR33rKK87Xt.cjs +12 -0
  20. package/browser/cjs/{BBuQH_geF9Xg5HPn.cjs → Dds58NEqJ0OalWH3.cjs} +4 -4
  21. package/browser/cjs/{BKUcozo2wEv2ay2w.cjs → Dy4SB47It0LGbh2I.cjs} +1 -1
  22. package/browser/cjs/{DUrNYTSMA5KQTG77.cjs → VJLb1uMfbKAUW1QF.cjs} +8 -8
  23. package/browser/cjs/{DyQffD3gRWH5-nOp.cjs → bHWvGntvmuk8t7sX.cjs} +2 -2
  24. package/browser/cjs/{Clp5qh0fApIxsE35.cjs → euAV1pPrNOIb6DV4.cjs} +2 -2
  25. package/browser/cjs/{BC9xtBySc8rix4-F.cjs → i0D2haODisHW8uGg.cjs} +1 -1
  26. package/browser/cjs/index.cjs +2 -2
  27. package/browser/cjs/{DDFDUxH5Mew5rcdT.cjs → oNi7wirDlZ81Lm0Z.cjs} +1 -1
  28. package/browser/cjs/z1aNSOtWsEE21p2H.cjs +6 -0
  29. package/browser/esm/{f7jo5w0h4-vNZtjZ.mjs → 2RGq163l1wYJKGsa.mjs} +10886 -10877
  30. package/{cdn/assets/Cjl-eP68w6LXe0zR.js → browser/esm/4C7Rg83L5RYFoOvl.mjs} +5 -5
  31. package/{cdn/assets/CGL2dNgGZEziA1cG.js → browser/esm/6KgR81NK4yzANTBT.mjs} +8 -8
  32. package/{cdn/assets/D7ubLFCJK5RzTJOF.js → browser/esm/B1CYiJmSpyx4TD5r.mjs} +20 -20
  33. package/{cdn/assets/CzeybhBUMRs64-Mp.js → browser/esm/B7qUiL1xPnzfOHZw.mjs} +1 -1
  34. package/{cdn/assets/CHsVgElx78EEmCPY.js → browser/esm/BEFQcBJ71bA297Zu.mjs} +1 -1
  35. package/browser/esm/{C8PrD3vZULKFp7HL.mjs → BEIn7yNWsHNJisB6.mjs} +3 -3
  36. package/browser/esm/{DnEhhjrb_iK5ugui.mjs → BM74iVi-iQkHbrfo.mjs} +2 -2
  37. package/browser/esm/{DE0B_sDQJ2uyFacb.mjs → BP8kNG31HYSkk1VW.mjs} +26 -26
  38. package/browser/esm/{CdbRlOwSBEqFzw-Q.mjs → CA_DRvBOFOlhezCt.mjs} +8 -8
  39. package/browser/esm/{CrnqRK0Y_R59nkb0.mjs → CDkmbShJijwq4EBo.mjs} +6 -6
  40. package/browser/esm/{IhAvisOcXUTXM4fs.mjs → CPi83FXApMlTaVbs.mjs} +1 -1
  41. package/browser/esm/{bMPbHealpRV0cNsU.mjs → C_hRuPoaT857EnC1.mjs} +5 -5
  42. package/browser/esm/{fLUOP3GBZp9qFVpK.mjs → CjVsKZEPAncg5mIk.mjs} +1 -1
  43. package/browser/esm/{DQj7TIf3hkBsvgpu.mjs → Ckz080o58XOgRhqj.mjs} +2 -2
  44. package/browser/esm/{DJBqN2bozSAMAOUl.mjs → ClXspoNrNV-A8BaL.mjs} +2 -2
  45. package/browser/esm/{BssMWXVsjFZUIbK_.mjs → DQ0Li3WfKbZxSFuB.mjs} +2 -2
  46. package/browser/esm/{D03_7nbUXeSyElQe.mjs → DXyJaUwHLq39-Jfa.mjs} +5 -5
  47. package/browser/esm/{t16pmig4Yv-yOK3J.mjs → D_FC0zteMRPriWTD.mjs} +1 -1
  48. package/browser/esm/{CxesFvTfE_FHHeOa.mjs → DnWiOUNTPvi_llPT.mjs} +1 -1
  49. package/browser/esm/{B6OcmPVBCjTZiEO8.mjs → DyUvHYGMNA9W2zL6.mjs} +1 -1
  50. package/browser/esm/{DCLOetlYWQ4f6912.mjs → EUFvcP5R4HFDLn2V.mjs} +5 -5
  51. package/browser/esm/cSe92c0HnvbRwiVM.mjs +944 -0
  52. package/{cdn/assets/CSnM9G1CZ81wivjo.js → browser/esm/eXQ_1uhRMyN-hfDZ.mjs} +1 -1
  53. package/browser/esm/{BepIgOjpel6ND31E.mjs → h4NbNvV8KCL9Tl1v.mjs} +16 -16
  54. package/browser/esm/index.mjs +2 -2
  55. package/{cdn/assets/CNdoHnLQKWWUIXFN.js → browser/esm/xlL3Ai-ka9qMVeua.mjs} +2 -2
  56. package/cdn/assets/{CUqr4I0B5RzMvyfH.js → B2hDWpWSEoChxhVY.js} +11896 -11887
  57. package/{browser/esm/CzeybhBUMRs64-Mp.mjs → cdn/assets/B7qUiL1xPnzfOHZw.js} +1 -1
  58. package/{browser/esm/CHsVgElx78EEmCPY.mjs → cdn/assets/BEFQcBJ71bA297Zu.js} +1 -1
  59. package/cdn/assets/{DucOHAWR0Drvzaz2.js → BXBP2rNGQxrgUPvU.js} +5 -5
  60. package/cdn/assets/{BPKaeP61qs19hdJx.js → BgChN-ZVYUOMDX9_.js} +26 -26
  61. package/cdn/assets/{ChAbZK53mfolDCTD.js → Bvy1txLm7c3LbPL7.js} +6 -6
  62. package/cdn/assets/{BWyjsqZ8W7LRq-2H.js → C1x5-f1q8NeSwRA2.js} +16 -16
  63. package/{browser/esm/DfczJdsv--tsazCR.mjs → cdn/assets/C5NMOq74C3Sme49x.js} +20 -20
  64. package/cdn/assets/{BKMHTFN6LTvRZnlS.js → CLA1BGtRbWm0K0U0.js} +2 -2
  65. package/cdn/assets/{IhAvisOcXUTXM4fs.js → CPi83FXApMlTaVbs.js} +1 -1
  66. package/cdn/assets/{fLUOP3GBZp9qFVpK.js → CjVsKZEPAncg5mIk.js} +1 -1
  67. package/cdn/assets/{CRv8MUg-_zmoKFIt.js → CpVan9KpuEGXgwIK.js} +2 -2
  68. package/cdn/assets/{B-7gpSVkQWekyOlk.js → CtDntnnwJW1rZ3sM.js} +5 -5
  69. package/cdn/assets/{BFDNPYBEj2T1cP38.js → CuG5WoZ4OOj9RCsv.js} +3 -3
  70. package/{browser/esm/CnL3YzjxBxFK7qfL.mjs → cdn/assets/DTvvMKZZfsVRhbow.js} +5 -5
  71. package/cdn/assets/{t16pmig4Yv-yOK3J.js → D_FC0zteMRPriWTD.js} +1 -1
  72. package/cdn/assets/{CB496hBmWELULf2f.js → Dbd0AFDlzQDW0tOg.js} +5 -5
  73. package/cdn/assets/{CxesFvTfE_FHHeOa.js → DnWiOUNTPvi_llPT.js} +1 -1
  74. package/cdn/assets/{DPdbTtHJ9qzLqsDN.js → DppHXtCDGzttFdS4.js} +2 -2
  75. package/cdn/assets/{CvfZjHPPpLdHBSRa.js → DuU1-7vd87A1wfGJ.js} +2 -2
  76. package/cdn/assets/{B6OcmPVBCjTZiEO8.js → DyUvHYGMNA9W2zL6.js} +1 -1
  77. package/{browser/esm/C3vvXeb_u4RQddV1.mjs → cdn/assets/O1XID2whLDb1cTWS.js} +8 -8
  78. package/{browser/esm/CSnM9G1CZ81wivjo.mjs → cdn/assets/eXQ_1uhRMyN-hfDZ.js} +1 -1
  79. package/cdn/assets/{D8lNg-ZFq3SVt0qa.js → g4FhlroGKmJM7Utd.js} +8 -8
  80. package/cdn/assets/tJI1G_FjDgqWo3rJ.js +944 -0
  81. package/{browser/esm/CNdoHnLQKWWUIXFN.mjs → cdn/assets/xlL3Ai-ka9qMVeua.js} +2 -2
  82. package/cdn/index.js +24 -24
  83. package/cdn/loader.js +2 -2
  84. package/package.json +3 -3
  85. package/types/index.d.ts +8 -8
  86. package/browser/cjs/BO0CySmcqi-pkV4p.cjs +0 -6
  87. package/browser/cjs/BoG6Gi-uqIbSJdRv.cjs +0 -12
  88. package/browser/cjs/DD6f8EPYnuPb41GO.cjs +0 -6
  89. package/browser/cjs/DsuUTTVqL23hXXxq.cjs +0 -6
  90. package/browser/cjs/Dva96jeug6x2xYZm.cjs +0 -301
  91. package/browser/esm/6w21A0XUkGBQu8-3.mjs +0 -940
  92. package/cdn/assets/CHZP9CrMHXri-Ghe.js +0 -940
@@ -1,6 +1,6 @@
1
1
  "use strict";/**
2
- * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.7
2
+ * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.8
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
- */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),r=require("react"),l=require("@sheetxl/sdk"),t=require("./Dva96jeug6x2xYZm.cjs"),q=["Ok","Cancel"],T=r.memo(v=>{const{initialValue:j,context:y,onOption:x,onValidateOption:u,onInputOption:b,onDone:c,options:f=q,defaultOption:p=f?.[0],cancelOption:m="Cancel",sx:k,...S}=v,[a,h]=r.useState(j),[O,N]=r.useState(!1),d=r.useCallback(async(e,n)=>!0,[]),g=t.me(async e=>{b?.(a,e),x?.(e,e===m,e===p),c?.()},[a,b,c,x,m,p]),$=t.me(async e=>{e.keyCode===t.rn.Enter&&await d?.(a,null)!==!1&&g(p)},[a,g]),P=t.me(e=>{h(e.target.value),d?.(e.target.value,null)},[u]),w=t.me(async e=>{let n=await Promise.resolve(u?.(e));try{n!==!1&&(n=await Promise.resolve(d?.(a,e))??!0)}catch{}return n??!0},[u]),[C,F]=r.useState(l.NumberFormat.Styles.lookupStyle(a).formatType??l.NumberFormat.Type.Custom);r.useEffect(()=>{F(l.NumberFormat.Styles.lookupStyle(a).formatType??l.NumberFormat.Type.Custom)},[a]);const I=r.useMemo(()=>{const e=l.NumberFormat.Styles.lookupPrimary(),n=i=>o.jsx(t.MenuItem,{value:i,children:i},i),s=Object.keys(e).map(i=>n(e[i].formatType));return s.push(n(l.NumberFormat.Type.Custom)),s},[]),D=r.useCallback(e=>{const n=e.target.value;F(n);const s=l.NumberFormat.Styles.lookupDefault(n);s&&h(s)},[]),M=r.useMemo(()=>{const e=y();return e.createTemporaryCell({value:e.getValue()??12345,style:{numberFormat:a}})},[C,a,y]);return o.jsx(t.b4,{title:"Number Format",options:f,onDone:c,onOption:e=>g(e),onValidateOption:w,defaultOption:p,cancelOption:m,autoFocusSel:".autoFocus",sx:{width:"580px",...k},...S,children:o.jsxs(t.Box,{sx:{paddingTop:e=>e.spacing(1),paddingBottom:e=>e.spacing(0),rowGap:e=>e.spacing(1),display:"flex",flexDirection:"column"},children:[o.jsxs(t.FormControl,{sx:{minWidth:135},size:"small",children:[o.jsx(t.InputLabel,{children:"Category"}),o.jsx(t.Select,{value:C,label:"Category",onChange:D,sx:{backgroundImage:`linear-gradient(${t.alpha("#fff",t.$n(5))}, ${t.alpha("#fff",t.$n(5))})`},children:I})]}),o.jsx(t.FormControl,{sx:{paddingTop:e=>e.spacing(1.5),minWidth:135,width:"100%"},size:"small",children:o.jsx(t.TextField,{label:"Code",onFocus:e=>{O||e.target?.select(),N(!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:a,onChange:P,onKeyDown:$,onContextMenu:e=>{e.stopPropagation()}})}),o.jsxs(t.Box,{children:[o.jsx(t.Typography,{variant:"caption",component:"div",sx:{paddingLeft:e=>e.spacing(2)},children:"Preview"}),o.jsx(t.Typography,{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:M.getNumberFormat().displayText||"(empty)"})]})]})})});exports.NumberFormatDialog=T,exports.default=T;
6
+ */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),r=require("react"),l=require("@sheetxl/sdk"),t=require("./6Wu3sLyx-7NM6CXS.cjs"),q=["Ok","Cancel"],T=r.memo(v=>{const{initialValue:j,context:y,onOption:x,onValidateOption:u,onInputOption:f,onDone:c,options:b=q,defaultOption:p=b?.[0],cancelOption:m="Cancel",sx:k,...S}=v,[a,h]=r.useState(j),[O,N]=r.useState(!1),d=r.useCallback(async(e,n)=>!0,[]),g=t.fe(async e=>{f?.(a,e),x?.(e,e===m,e===p),c?.()},[a,f,c,x,m,p]),$=t.fe(async e=>{e.keyCode===t.rn.Enter&&await d?.(a,null)!==!1&&g(p)},[a,g]),P=t.fe(e=>{h(e.target.value),d?.(e.target.value,null)},[u]),w=t.fe(async e=>{let n=await Promise.resolve(u?.(e));try{n!==!1&&(n=await Promise.resolve(d?.(a,e))??!0)}catch{}return n??!0},[u]),[C,F]=r.useState(l.NumberFormat.Styles.lookupStyle(a).formatType??l.NumberFormat.Type.Custom);r.useEffect(()=>{F(l.NumberFormat.Styles.lookupStyle(a).formatType??l.NumberFormat.Type.Custom)},[a]);const I=r.useMemo(()=>{const e=l.NumberFormat.Styles.lookupPrimary(),n=i=>o.jsx(t.MenuItem,{value:i,children:i},i),s=Object.keys(e).map(i=>n(e[i].formatType));return s.push(n(l.NumberFormat.Type.Custom)),s},[]),D=r.useCallback(e=>{const n=e.target.value;F(n);const s=l.NumberFormat.Styles.lookupDefault(n);s&&h(s)},[]),M=r.useMemo(()=>{const e=y();return e.createTemporaryCell({value:e.getValue()??12345,style:{numberFormat:a}})},[C,a,y]);return o.jsx(t.b4,{title:"Number Format",options:b,onDone:c,onOption:e=>g(e),onValidateOption:w,defaultOption:p,cancelOption:m,autoFocusSel:".autoFocus",sx:{width:"580px",...k},...S,children:o.jsxs(t.Box,{sx:{paddingTop:e=>e.spacing(1),paddingBottom:e=>e.spacing(0),rowGap:e=>e.spacing(1),display:"flex",flexDirection:"column"},children:[o.jsxs(t.FormControl,{sx:{minWidth:135},size:"small",children:[o.jsx(t.InputLabel,{children:"Category"}),o.jsx(t.Select,{value:C,label:"Category",onChange:D,sx:{backgroundImage:`linear-gradient(${t.alpha("#fff",t.$n(5))}, ${t.alpha("#fff",t.$n(5))})`},children:I})]}),o.jsx(t.FormControl,{sx:{paddingTop:e=>e.spacing(1.5),minWidth:135,width:"100%"},size:"small",children:o.jsx(t.TextField,{label:"Code",onFocus:e=>{O||e.target?.select(),N(!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:a,onChange:P,onKeyDown:$,onContextMenu:e=>{e.stopPropagation()}})}),o.jsxs(t.Box,{children:[o.jsx(t.Typography,{variant:"caption",component:"div",sx:{paddingLeft:e=>e.spacing(2)},children:"Preview"}),o.jsx(t.Typography,{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:M.getNumberFormat().displayText||"(empty)"})]})]})})});exports.NumberFormatDialog=T,exports.default=T;
@@ -1,6 +1,6 @@
1
1
  "use strict";/**
2
- * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.7
2
+ * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.8
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
- */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react/jsx-runtime"),l=require("react"),n=require("./Dva96jeug6x2xYZm.cjs"),F=["Ok","Cancel"],V=l.memo(C=>{const{value:a=null,context:t,onOption:p,onValidateOption:k,onDone:g,onUpdate:m,options:x=F,defaultOption:f=x?.[0],cancelOption:y="Cancel",sx:h,...v}=C,N=l.useMemo(()=>t?.getNames().findValidName("Range1"),[]),d=l.useMemo(()=>{if(!a)return!0},[]),[o,R]=l.useState({displayText:a?.getName()??N,errorText:null}),[s,b]=l.useState({displayValue:a?.getRanges()??t?.selection()??null,errorText:null}),[T,O]=l.useState(!1),S=l.useCallback(async e=>!o.errorText&&!s.errorText,[t]),j=n.me((e,i,c)=>{if(!i){let r=null;d?r=t?.getNames().addReference(o?.displayText,s?.displayValue,!1):(a.getType()==="reference"&&a.doBatch(()=>{a.setName(o?.displayText),a.setReference(s?.displayValue)},`Edit Named '${o?.displayText}'`),r=a),r&&(r.select(),m(r,d))}p?.(e,i,c),g?.()},[t,o,s,g,p,f,y,m]),M=n.me(e=>{let i=null;try{t?.getNames().validateName(e)}catch(c){i=c.message}R({displayText:e,errorText:i})},[]),w=n.me(e=>{a&&a.getName().toLowerCase()===e.toLowerCase()||t?.getNames().validateName(e)},[t,a]),D=l.useCallback(e=>{b({displayValue:e??null,errorText:null})},[]);return u.jsx(n.b4,{title:(d?"Define":"Edit")+" Range",options:x,onOption:j,onValidateOption:S,defaultOption:f,cancelOption:y,autoFocusSel:".autoFocus",sx:{width:"460px",...h},...v,children:u.jsxs(n.Box,{sx:{paddingTop:e=>e.spacing(1),paddingBottom:e=>e.spacing(0),rowGap:e=>e.spacing(1),range:"flex",flexDirection:"column"},children:[u.jsx(n.sM,{formName:"name",defaultInput:N,value:o.displayText,onChangeInput:M,onValidate:w,onFocus:e=>{T||e.target?.select(),O(!0)}}),u.jsx(n.cM,{formName:"range",value:s.displayValue,onChangeInput:D,resolvedAddress:t.getNames().getRanges.bind(t.getNames()),onFocus:e=>{T||e.target?.select(),O(!0)}})]})})});exports.NamedReferenceDialog=V,exports.default=V;
6
+ */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react/jsx-runtime"),l=require("react"),n=require("./6Wu3sLyx-7NM6CXS.cjs"),F=["Ok","Cancel"],V=l.memo(C=>{const{value:a=null,context:t,onOption:p,onValidateOption:k,onDone:g,onUpdate:m,options:x=F,defaultOption:f=x?.[0],cancelOption:y="Cancel",sx:h,...v}=C,N=l.useMemo(()=>t?.getNames().findValidName("Range1"),[]),d=l.useMemo(()=>{if(!a)return!0},[]),[o,R]=l.useState({displayText:a?.getName()??N,errorText:null}),[s,b]=l.useState({displayValue:a?.getRanges()??t?.selection()??null,errorText:null}),[T,O]=l.useState(!1),S=l.useCallback(async e=>!o.errorText&&!s.errorText,[t]),j=n.fe((e,i,c)=>{if(!i){let r=null;d?r=t?.getNames().addReference(o?.displayText,s?.displayValue,!1):(a.getType()==="reference"&&a.doBatch(()=>{a.setName(o?.displayText),a.setReference(s?.displayValue)},`Edit Named '${o?.displayText}'`),r=a),r&&(r.select(),m(r,d))}p?.(e,i,c),g?.()},[t,o,s,g,p,f,y,m]),M=n.fe(e=>{let i=null;try{t?.getNames().validateName(e)}catch(c){i=c.message}R({displayText:e,errorText:i})},[]),w=n.fe(e=>{a&&a.getName().toLowerCase()===e.toLowerCase()||t?.getNames().validateName(e)},[t,a]),D=l.useCallback(e=>{b({displayValue:e??null,errorText:null})},[]);return u.jsx(n.b4,{title:(d?"Define":"Edit")+" Range",options:x,onOption:j,onValidateOption:S,defaultOption:f,cancelOption:y,autoFocusSel:".autoFocus",sx:{width:"460px",...h},...v,children:u.jsxs(n.Box,{sx:{paddingTop:e=>e.spacing(1),paddingBottom:e=>e.spacing(0),rowGap:e=>e.spacing(1),range:"flex",flexDirection:"column"},children:[u.jsx(n.sM,{formName:"name",defaultInput:N,value:o.displayText,onChangeInput:M,onValidate:w,onFocus:e=>{T||e.target?.select(),O(!0)}}),u.jsx(n.cM,{formName:"range",value:s.displayValue,onChangeInput:D,resolvedAddress:t.getNames().getRanges.bind(t.getNames()),onFocus:e=>{T||e.target?.select(),O(!0)}})]})})});exports.NamedReferenceDialog=V,exports.default=V;
@@ -1,5 +1,5 @@
1
1
  "use strict";/**
2
- * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.7
2
+ * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.8
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.
@@ -1,6 +1,6 @@
1
1
  "use strict";/**
2
- * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.7
2
+ * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.8
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
- */require("react"),require("react/jsx-runtime"),require("react-dom/client");const e=require("./Dva96jeug6x2xYZm.cjs");module.exports=e.SheetXL;
6
+ */require("react"),require("react/jsx-runtime"),require("react-dom/client");const e=require("./6Wu3sLyx-7NM6CXS.cjs");module.exports=e.SheetXL;
@@ -1,5 +1,5 @@
1
1
  "use strict";/**
2
- * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.7
2
+ * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.8
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.
@@ -0,0 +1,6 @@
1
+ "use strict";/**
2
+ * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.8
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 S=require("@sheetxl/sdk");exports.fromBufferCSV=async(a,d)=>{const{papaParseConfig:i,setValuesOptions:f,createWorkbookOptions:h}=d??{},o=await Promise.resolve().then(()=>require("./CE5NVYltiso41NzK.cjs")).then(n=>n.p),m=new TextDecoder().decode(a);let p=-1;const t=new S.Workbook(h),u=t.getSelectedSheet().getEntireRange().startIncrementalUpdates({orientation:S.IRange.Orientation.Row}),c=d?.onProgress;let e=0;const r={...i,transform:(n,g)=>{i?.transform&&(n=i.transform(n,g));const s=g;s===0&&p++;let l=n??"";return u.pushAt(p,s,l),e++,e%1e5==0&&c?.(e),n}};return o.parse(m,r).data,u.apply({textParser:!0,...f}),t},exports.toBufferCSV=async(a,d)=>{const{trimLeadingBlankRow:i=!0,trimLeadingBlankColumn:f=!0,excludeHidden:h=!1,sheetKey:o=null,papaParseConfig:m={}}=d||{},p=await Promise.resolve().then(()=>require("./CE5NVYltiso41NzK.cjs")).then(s=>s.p);if(!a)throw new Error("workbook must be specified");let t=null;if(o===null?t=a.getSelectedSheet():typeof o=="number"?t=a.getSheets().search()[o]:typeof o=="string"&&(t=a.getSheets().getByName(o)),!t)throw new Error("invalid sheetKey specified");let u=null;const c=[];let e=null,r=t.getUsedRange({excludeHidden:h});if(!r)throw new Error("Nothing to export");if(!i||!f){const s=i?r.getRowStart():0,l=f?r.getColumnStart():0;r=r.getOffsetTo(s,l)}r.forEach((s,l)=>{const w=l.getCoords(),y=l.getCell();u!==w.rowIndex&&(e&&c.push(e),e=[],u=w.rowIndex);const x=y.toTextUnformatted()??"";e.push(x)},{includeEmpty:!0,address:null}),e&&c.push(e);const n={...m},g=p.unparse(c,n);return new TextEncoder().encode(g).buffer};