@sheetxl/scripting 0.3.11 → 0.3.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/cjs/{CbAigmjC3774Cl_d.cjs → BPCK-OXhIFYeaRjS.cjs} +3 -3
- package/browser/cjs/{BjbUU7OTA0Gpf4F2.cjs → BhQmJCzU9QiMmCMZ.cjs} +4 -4
- package/browser/cjs/{DzRscqB0h2mblcUQ.cjs → BxOKHFuglJsR_RXk.cjs} +1 -1
- package/browser/cjs/{_GoHRDIWHCYMsMI5.cjs → DT_-RhNCrKewVki6.cjs} +2 -2
- package/browser/cjs/{DvGK_UBplii1XWKv.cjs → Djs-8wVw8I-IzE1q.cjs} +2 -2
- package/browser/cjs/{BJUy5gBY3T29jJDn.cjs → JJReWGaUi6eDM-QL.cjs} +1 -1
- package/browser/cjs/index.cjs +2 -2
- package/browser/esm/{evy2D_DMauKvmqcW.mjs → 6IYC77HCTdSAGYGL.mjs} +4 -4
- package/browser/esm/{Cvjivo--MxBtUDD4.mjs → BPPXCABpKnWc7wGE.mjs} +4 -4
- package/browser/esm/{nfD8Lly-eJ-KXywQ.mjs → Ce7iyVeMQpZJgX24.mjs} +1 -1
- package/browser/esm/{CsUPlHwg2GkRqpgu.mjs → Cjh5HU13AysLnT7U.mjs} +1 -1
- package/browser/esm/{DJSmfGLFVxmqSgVA.mjs → DM8MGP5TREtrRAP1.mjs} +2 -2
- package/browser/esm/{Bcnp3yEZeo60ee9_.mjs → OVyFCWoDvUngXzRC.mjs} +2 -2
- package/browser/esm/index.mjs +2 -2
- package/licenses/dependencies.txt +2 -2
- package/node/esm/{CwXdopjghj8jaNMK.mjs → B5PN09Zh_zpBY4zF.mjs} +2 -2
- package/node/esm/{CvYmZpNi-LRs359l.mjs → BYfGO4SHFIybTMxR.mjs} +3 -3
- package/node/esm/{DFSMxZV6mZr-qXGk.mjs → BwtozNDdc0V5Nx3-.mjs} +1 -1
- package/node/esm/{pxhb_SPyNn5HT7p4.mjs → C0toyUAEIJ2I8di1.mjs} +4 -4
- package/node/esm/{OaVBdNAV4c3y7tmY.mjs → D0fS6t0dZSQtpD5p.mjs} +1 -1
- package/node/esm/index.mjs +2 -2
- package/package.json +3 -3
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";/**
|
|
2
|
-
* @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.3.
|
|
2
|
+
* @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.3.12
|
|
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 he=require("./
|
|
6
|
+
*/Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const he=require("./DT_-RhNCrKewVki6.cjs"),ie="n",ge="s",we="b",Ce="e",ae="z";var se,J,r;(J=se||(se={})).Orientation={Column:"column",Row:"row"},J.Orientations={...J.Orientation,Both:"both"},J.Direction={Up:"up",Down:"down",Left:"left",Right:"right"},(e=>{e.Code={Parse:0,Null:1,Div0:2,Value:3,Ref:4,Name:5,Num:6,NA:7,GettingData:8,Spill:9,Connect:10,Blocked:11,Unknown:12,Field:13,Calc:14,Busy:16,Python:19,Timeout:20},e.Label={Parse:"#PARSE!",Null:"#NULL!",Div0:"#DIV/0!",Value:"#VALUE!",Ref:"#REF!",Name:"#NAME?",Num:"#NUM!",NA:"#N/A",GettingData:"#GETTING_DATA",Spill:"#SPILL!",Connect:"#CONNECT!",Blocked:"#BLOCKED!",Unknown:"#UNKNOWN!",Field:"#FIELD!",Calc:"#CALC!",Busy:"#BUSY!",Python:"#PYTHON!",Timeout:"#TIMEOUT!"};class a extends Error{constructor(n,o,L,q){super(L,q),this._label=o,this._code=n,this.details=q}static{this.code=e.Code.Unknown}get isFormulaError(){return!0}getLabel(){return this._label}getCode(){return this._code}equals(n){return!!n&&(this._code===n._code||this._code===n.code)}get[Symbol.toStringTag](){return"[FormulaError]"}toString(){return this.message||this._label}}e.Known=a;class C extends a{constructor(n,o){super(e.Code.Parse,e.Label.Parse,n,o)}static{this.code=e.Code.Parse}getDetails(){const n=this.details;return{line:n?.line??1,column:n?.column??1,offset:n?.offset??0,length:n?.length??0}}}e.Parse=C;class p extends a{constructor(n,o){super(e.Code.Null,e.Label.Null,n,o)}static{this.code=e.Code.Null}}e.Null=p;class F extends a{constructor(n,o){super(e.Code.Div0,e.Label.Div0,n,o)}static{this.code=e.Code.Div0}}e.Div0=F;class R extends a{constructor(n,o){super(e.Code.Value,e.Label.Value,n,o)}static{this.code=e.Code.Value}}e.Value=R;class s extends a{constructor(n,o){super(e.Code.Ref,e.Label.Ref,n,o)}static{this.code=e.Code.Ref}}e.Ref=s;class K extends a{constructor(n,o){super(e.Code.Name,e.Label.Name,n,o)}static{this.code=e.Code.Name}}e.Name=K;class k extends a{constructor(n,o){super(e.Code.Num,e.Label.Num,n,o)}static{this.code=e.Code.Num}}e.Num=k;class b extends a{constructor(n,o){super(e.Code.NA,e.Label.NA,n,o)}static{this.code=e.Code.NA}}e.NA=b;class N extends a{constructor(n,o){super(e.Code.GettingData,e.Label.GettingData,n,o)}static{this.code=e.Code.GettingData}}e.GettingData=N;class d extends a{constructor(n,o){super(e.Code.Spill,e.Label.Spill,n,o)}static{this.code=e.Code.Spill}}e.Spill=d;class S extends a{constructor(n,o){super(e.Code.Connect,e.Label.Connect,n,o)}static{this.code=e.Code.Connect}}e.Connect=S;class G extends a{constructor(n,o){super(e.Code.Blocked,e.Label.Blocked,n,o)}static{this.code=e.Code.Blocked}}e.Blocked=G;class _ extends a{constructor(n,o){super(e.Code.Unknown,e.Label.Unknown,n,o)}static{this.code=e.Code.Unknown}}e.Unknown=_;class B extends a{constructor(n,o){super(e.Code.Field,e.Label.Field,n,o)}static{this.code=e.Code.Field}}e.Field=B;class W extends a{constructor(n,o){super(e.Code.Calc,e.Label.Calc,n,o)}static{this.code=e.Code.Calc}}e.Calc=W;class I extends a{constructor(n,o){super(e.Code.Busy,e.Label.Busy,n,o)}static{this.code=e.Code.Busy}}e.Busy=I;class A extends a{constructor(n,o){super(e.Code.Python,e.Label.Python,n,o)}static{this.code=e.Code.Python}}e.Python=A;class X extends a{constructor(n,o){super(e.Code.Timeout,e.Label.Timeout,n,o)}static{this.code=e.Code.Timeout}}e.Timeout=X})(r||(r={}));const y={};y[r.Code.Parse]=r.Parse,y[r.Code.Null]=r.Null,y[r.Code.Div0]=r.Div0,y[r.Code.Value]=r.Value,y[r.Code.Ref]=r.Ref,y[r.Code.Name]=r.Name,y[r.Code.Num]=r.Num,y[r.Code.NA]=r.NA,y[r.Code.GettingData]=r.GettingData,y[r.Code.Spill]=r.Spill,y[r.Code.Connect]=r.Connect,y[r.Code.Blocked]=r.Blocked,y[r.Code.Unknown]=r.Unknown,y[r.Code.Field]=r.Field,y[r.Code.Calc]=r.Calc,y[r.Code.Busy]=r.Busy,y[r.Code.Python]=r.Python,y[r.Code.Timeout]=r.Timeout;const ce=new Map,ne=new Map,de=new Map,ue=new Map,le=Object.keys(y);for(let e=0;e<le.length;e++){const a=le[e],C=y[a];de.set(r.Label[a],C),ue.set(r.Code[a],C);const p=new C;ce.set(p.getLabel(),p),ne.set(p.getCode(),p)}const xe=ne.get(r.Code.Unknown);var u;(u=r||(r={})).BuiltIn={Parse:new u.Parse,Null:new u.Null,Div0:new u.Div0,Value:new u.Value,Ref:new u.Ref,Name:new u.Name,Num:new u.Num,NA:new u.NA,GettingData:new u.GettingData,Spill:new u.Spill,Connect:new u.Connect,Blocked:new u.Blocked,Unknown:new u.Unknown,Field:new u.Field,Calc:new u.Calc,Busy:new u.Busy,Python:new u.Python,Timeout:new u.Timeout},u.getBuiltInByLabel=e=>ce.get(e),u.newTypedError=(e,a,C)=>{let p;return p=typeof e=="string"?de.get(e):ue.get(e),p||(p=u.Unknown),new p(a,C)},u.getBuiltInById=e=>ne.get(e)||xe;let z=null,Y=null;const be={compilerOptions:{target:"esnext"}};async function Te(e,a,C="/script.js",p="__SHEETXL"){try{const F=await async function(){if(z)return z;if(Y){if(await Y,!z)throw new Error("ESBuild initialization promise resolved, but instance is not available.");return z}let b,N;Y=new Promise((d,S)=>{b=d,N=S});try{const{initialize:d}=await Promise.resolve().then(()=>require("./BxOKHFuglJsR_RXk.cjs"));return z=await d(),b(),z}catch(d){throw console.error("Failed to import or initialize esbuild:",d),Y=null,N(d),d}}(),R="@sheetxl/primitives",s=`
|
|
7
7
|
export const FormulaContext = globalThis.${p}?.FormulaContext;
|
|
8
8
|
export const ScalarType = globalThis.${p}?.ScalarType;
|
|
9
9
|
export const Observable = globalThis.${p}?.Observable;
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
interface FirstTest {
|
|
16
16
|
isTrue?: boolean;
|
|
17
17
|
}
|
|
18
|
-
`,pe=new Map([["IReferenceRange","r"],["IRange","l"]]),me=new Map([["IWorkbook","workbook"],["ISheet","sheet"],["ICellRanges","ranges"],["ICellRange","range"],["IFormulaContext","context"]]),ee=(e,a)=>{Array.from(a.keys()).forEach(C=>{const p=a.get(C);a.set(`${e}.${C}`,p)})},Ne=new Map([["Scalar","*"],["FormulaError.Known",Ce],["Date","Date"],["JSON","JSON"]]),Se=new Map([]),te="SheetXL";ee(te,pe),ee(te,me),ee(te,Se);const Ee=new Map([["Promise",()=>({async:!0})],["Observable",()=>({stream:!0})]]);let H=null;async function Le(){if(H)return H;try{return await(await Promise.resolve().then(()=>require("./
|
|
18
|
+
`,pe=new Map([["IReferenceRange","r"],["IRange","l"]]),me=new Map([["IWorkbook","workbook"],["ISheet","sheet"],["ICellRanges","ranges"],["ICellRange","range"],["IFormulaContext","context"]]),ee=(e,a)=>{Array.from(a.keys()).forEach(C=>{const p=a.get(C);a.set(`${e}.${C}`,p)})},Ne=new Map([["Scalar","*"],["FormulaError.Known",Ce],["Date","Date"],["JSON","JSON"]]),Se=new Map([]),te="SheetXL";ee(te,pe),ee(te,me),ee(te,Se);const Ee=new Map([["Promise",()=>({async:!0})],["Observable",()=>({stream:!0})]]);let H=null;async function Le(){if(H)return H;try{return await(await Promise.resolve().then(()=>require("./JJReWGaUi6eDM-QL.cjs"))).initialize()}catch(e){throw H=null,e}finally{H=null}}exports.compileModule=async function(e){const a=e?.source??null;if(!a)return null;const C=(e.disableBundle||e.declarationsOnly)??!1,p=[ke(),Le()],F=await Promise.all(p),R=F[0],s=F[1];let K="",k=null;const b=[],N={allowJs:!0,declaration:!1,sourceMap:!1,inlineSourceMap:!1,inlineSources:!1,isolatedModules:!0,preserveConstEnums:!1,module:99,noResolve:!0,emitDeclarationOnly:!1,target:s.ScriptTarget.ES2020},d="script",S=`${d}.ts`,G="lib.d.ts",_="global.d.ts",B={[S]:a,[G]:`
|
|
19
19
|
/**
|
|
20
20
|
* Represents the completion of an asynchronous operation
|
|
21
21
|
*/
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";/**
|
|
2
|
-
* @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.3.
|
|
2
|
+
* @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.3.12
|
|
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
|
*/Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});let c=class{constructor(e){this._worker=null,this._nextId=1,this._pendingRequests=new Map,this._workerFactory=e}start(){if(typeof Worker>"u")throw new Error("Web Workers are not supported in this environment.");return this._worker||(this._worker=this._workerFactory(),this._worker.onmessage=e=>{const{id:n,result:t,error:r}=e.data,o=this._pendingRequests.get(n);if(o)if(this._pendingRequests.delete(n),r){const i=new Error(r.message);i.stack=r.stack,r.cause&&(i.cause=r.cause),o.reject(i)}else o.resolve(t)},this._worker.onerror=e=>{console.error("Worker error:",e),this._pendingRequests.forEach(n=>{n.reject(new Error(`Worker failed: ${e.message}`))}),this._pendingRequests.clear(),this._worker=null}),Promise.resolve()}execute(e){if(!this._worker)throw new Error("Worker is not initialized. Call start() first.");const n=this._nextId++;return new Promise((t,r)=>{this._pendingRequests.set(n,{resolve:t,reject:r}),this._worker.postMessage({id:n,params:e})})}terminate(){this._worker&&(this._worker.terminate(),this._worker=null)}};class u{constructor(n){this._onExecute=n}execute(n){return this._onExecute(n)}start(){return Promise.resolve()}terminate(){}}const s=`/**
|
|
7
|
-
* @license @sheetxl/primitives - Primitives - Base types for SheetXL functions. - v0.3.
|
|
7
|
+
* @license @sheetxl/primitives - Primitives - Base types for SheetXL functions. - v0.3.12
|
|
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.
|
|
@@ -223,7 +223,7 @@ var v;
|
|
|
223
223
|
return n = typeof e == "string" ? tt.get(e) : rt.get(e), n || (n = v.Unknown), new n(t, r);
|
|
224
224
|
}, v.getBuiltInById = (e) => Te.get(e) || Et;
|
|
225
225
|
/**
|
|
226
|
-
* @license @sheetxl/utils - Utils - Utilities used by most SheetXL components. - v0.3.
|
|
226
|
+
* @license @sheetxl/utils - Utils - Utilities used by most SheetXL components. - v0.3.12
|
|
227
227
|
*
|
|
228
228
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
229
229
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -1498,4 +1498,4 @@ var or = /* @__PURE__ */ Object.freeze({
|
|
|
1498
1498
|
__proto__: null,
|
|
1499
1499
|
initialize: nr
|
|
1500
1500
|
});
|
|
1501
|
-
`,a=typeof self<"u"&&self.Blob&&new Blob(["URL.revokeObjectURL(import.meta.url);",s],{type:"text/javascript;charset=utf-8"});function d(e){let n;try{if(n=a&&(self.URL||self.webkitURL).createObjectURL(a),!n)throw"";const t=new Worker(n,{type:"module",name:e?.name});return t.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(n)}),t}catch{return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(s),{type:"module",name:e?.name})}}const l=async()=>{const{compileModule:e}=await Promise.resolve().then(()=>require("./
|
|
1501
|
+
`,a=typeof self<"u"&&self.Blob&&new Blob(["URL.revokeObjectURL(import.meta.url);",s],{type:"text/javascript;charset=utf-8"});function d(e){let n;try{if(n=a&&(self.URL||self.webkitURL).createObjectURL(a),!n)throw"";const t=new Worker(n,{type:"module",name:e?.name});return t.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(n)}),t}catch{return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(s),{type:"module",name:e?.name})}}const l=async()=>{const{compileModule:e}=await Promise.resolve().then(()=>require("./BPCK-OXhIFYeaRjS.cjs")),n=new u(t=>e(t));return await n.start(),n};exports.createCompilerWorker=async function(){if(typeof process<"u"&&process.versions?.node&&typeof Worker>"u")return await l();if(typeof Worker<"u"){const e=new c(()=>new d);try{return await e.start(),e}catch(n){console.error("Failed to start TypescriptCompiler worker reverting to fallback:",n)}}return await l()};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";/**
|
|
2
|
-
* @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.3.
|
|
2
|
+
* @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.3.12
|
|
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,5 +1,5 @@
|
|
|
1
1
|
"use strict";/**
|
|
2
|
-
* @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.3.
|
|
2
|
+
* @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.3.12
|
|
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.
|
|
@@ -10,4 +10,4 @@ Please use Chrome or Edge if external copy and paste is required.`,k=`You do not
|
|
|
10
10
|
All copy and paste operations will be limited to the browser tab.`,jt={Safari:`The Safari browser does not support advanced copy and paste.
|
|
11
11
|
Copy and paste will be limited to within the browser tab.
|
|
12
12
|
|
|
13
|
-
Please use Chrome or Edge if external copy and paste is required.`,Perms:k,PermsWrite:T()===y.Safari?ut:k,PermsRead:T()===y.Safari?ut:k},N=async()=>new Promise(e=>{document.hasFocus()?e():globalThis.addEventListener?.("focus",()=>{e()},{once:!0}),document.activeElement.focus?.()}),B=async(e,t,r)=>{if(T()===y.Safari)return await r(new Error(jt.Safari));try{const n=async i=>{try{return await i()}catch(l){if(l.message?.includes("Document is not focused"))return!1;throw l}},o=await globalThis?.navigator?.permissions?.query({name:e,allowWithoutGesture:!0,allowWithoutSanitization:!0});let a=!1;if(o.state==="prompt"&&(a=await n(t)),a||o.state!=="granted"||(a=await t()),!a)return await r(new Error(o.state))}catch(n){return n.message==="No valid data on clipboard"||n.name==="DataError"?void 0:await r(n)}},Tt=async e=>{try{return await e.read({unsanitized:[h]})}catch{}return await e.read()};if(!globalThis.ClipboardItem){const e=(r,n)=>new Blob([n],{type:r});class t{constructor(n,o){this._items={},this._types=Object.keys(n);const a={},i=Object.keys(n);for(let l=0;l<i.length;l++){const s=i[l];let c=n[s];a[s]=typeof c=="string"?e(s,c):c}this._items=a,this._presentationStyle=o?.presentationStyle??"unspecified"}get types(){return this._types}getType(n){return Promise.resolve(this._items[n])}supports(n){return!0}}globalThis.ClipboardItem=t}const V=async(e,t=h)=>new Promise(async(r,n)=>{try{const o=await(async(a,i)=>{if(!a)return null;const l=await Tt(a);let s=!1;for(let c=0;!s&&l&&c<l.length;c++)if(s=l[c].types.includes(i),s)return await l[c].getType(i);return s?void 0:null})(e,t);if(o){const a=new FileReader;a.onload=()=>{r(a.result)},a.onerror=()=>{r("")},a.readAsText(o)}else r("")}catch(o){n(o)}}),dt=async(e,t=h)=>{const r=await V(e,t);if(!r)return null;let n=null;try{n=new DOMParser().parseFromString(r,h)}catch{console.warn("Can't parse html from clipboard.")}return n},C="clipboard-uuid",v="web text/uuid",ft=e=>`<div style="display:none" ${C}="${e}"/>`,Wt=(e,t)=>{let r=null;try{const n=new DOMParser().parseFromString(t,h);n.body.firstElementChild.setAttribute(C,e),r=n.getElementsByTagName("body")[0].innerHTML}catch(n){console.warn("Can't embed uuid.",n)}return r},pt=(e,t)=>{if(!t||!e)return!1;try{const r=t.querySelectorAll(`[${C}="${e}"]`);if(r&&r.length===1)return!0;if(t.querySelector("parsererror"))throw new Error("We are unable to parse node");return!1}catch{return!1}};class wt{constructor(t){if(t?.nativeClipboard===void 0||t?.nativeClipboard===!0)try{this._nativeClipboard=globalThis?.navigator.clipboard}catch{t?.nativeClipboard===!0&&console.warn("NativeClipboard option set to true but no native clipboard available.")}else this._nativeClipboard=t?.nativeClipboard===!1?null:t?.nativeClipboard;this._disableCheckOnFocus=t?.disableCheckOnFocus??!1,this._init()}async _checkForChanges(){this._nativeClipboard&&this._state&&!this._disableCheckOnFocus&&await B("clipboard-read",async()=>{await N();const t=await V(this._nativeClipboard,v);if(!this._state||t&&t===this._state.uuid)return!0;const r=await dt(this._nativeClipboard,h);return!this._state||(pt(this._state.uuid,r)||this.clear(),!0)},async t=>{t?.message==="denied"||t.message?.includes("Document is not focused")||T()===y.Safari||console.warn("Unable to detect clipboard changes: ",t)})}_init(){const t=this;this._listeners=new Map,this._listenersCapture=new Map,this._state=null,this._nativeClipboard&&(this._onFocus=()=>{t._checkForChanges()},this._onBlur=()=>{globalThis.addEventListener?.("focus",t._onFocus,{once:!0})},globalThis.addEventListener?.("blur",this._onBlur),this._nativeClipboard.addEventListener("clipboardchange",r=>{t._checkForChanges()}))}async read(){if(!this._nativeClipboard)return this._state?.items??null;const t=this;return await B("clipboard-read",async()=>{if(await N(),this._state?.uuid){const r=await V(this._nativeClipboard,v);if(r&&r===t._state.uuid)return!0;const n=await dt(this._nativeClipboard,h);if(pt(t._state?.uuid,n))return!0}return t._state={items:await Tt(this._nativeClipboard),uuid:null,ref:null},this.dispatchEvent(new Event("clipboardread")),!0},async r=>{this.dispatchEvent(new Event("clipboarderrorread"))}),this._state?.items??[]}async write(t){return this._write({uuid:R(),items:t,ref:null})}async _write(t){if(!this._nativeClipboard)return this._state=t,this.dispatchEvent(new Event("clipboardwrite")),this.dispatchEvent(new Event("clipboardchange")),null;const r=this,n=[],o=t.uuid;let a=t.items??[];const i=()=>{r._state={uuid:o,ref:t.ref,items:n},r.dispatchEvent(new Event("clipboardwrite")),r.dispatchEvent(new Event("clipboardchange"))};await B("clipboard-write",async()=>{await N(),o&&a.length===0&&(a.push(new ClipboardItem({[v]:new Blob([o],{type:v})})),a.push(new ClipboardItem({[h]:new Blob([ft(o)],{type:h})})));for(let l=0;l<Math.min(1,a.length);l++){const s=a[l];let c=s.types.indexOf(h),d=null;if(c!==-1){const f=await s.getType(h);d=await W(f),d&&(d=Wt(o,d))}if(!d&&s.types.includes(b)){const f=await s.getType(b);if(f){let p=null;typeof f=="string"?(console.warn("text as string",f),p=f):p=await W(f),p&&(d=`<div ${C}="${o}">${p}</div>`)}}if(!d&&s.types.includes(L)){const f=await s.getType(L),p=Ot(await f.arrayBuffer());d=`<div ${C}="${o}"><img src="${_t+p}"/></div>`}!d&&o&&(d=ft(o));const w=new Blob([d??""],{type:h}),u={};for(let f=0;f<s.types.length;f++){const p=s.types[f];u[p]=f===c?w:s.getType(p)}d&&c===-1&&(u[h]=w),o&&(u[v]=new Blob([o],{type:v})),n.push(new ClipboardItem(u))}try{n&&n.length!==0?await this._nativeClipboard.write(n):await(async l=>{l&&await l.writeText("")})(this._nativeClipboard)}catch(l){l.message?.includes("Document is not focused")||console.warn("Unable to write to native clipboard: ",l)}return i(),!0},async l=>{this.dispatchEvent(new Event("clipboarderrorwrite")),i()})}async writeReference(t){if(!t)return void this.clear();let r=null;const n={};try{const a=await t.toText?.()??null;a&&(n[b]=new Blob([a??""],{type:b}))}catch(a){r=a}try{const a=await t.toHtml?.()??null;a&&(n[h]=new Blob([a],{type:h}))}catch(a){r=a,console.warn("export to html",a)}try{const a=await t.toImage?.()??null;a&&(n[L]=a)}catch(a){r=a,console.warn("export to png",a)}const o=this._write({uuid:R(),ref:t,items:Object.keys(n).length>0?[new ClipboardItem(n)]:null});if(r)throw r;return o}clear(t=!1){this._state&&(this._state=null,t&&this._write({uuid:null,ref:null,items:null}),this.dispatchEvent(new Event("clipboardwrite")),this.dispatchEvent(new Event("clipboardchange")))}async readReference(){return await this.read(),this._state?.ref??null}readText(){return new Promise(async(t,r)=>{const n=await this.read();let o=null;for(let i=0;!o&&n&&i<n.length;i++)n[i].types.includes(b)&&(o=await n[i].getType(b));if(!o)return void t("");const a=new FileReader;a.onload=()=>{t(a.result)},a.readAsText(o),a.onerror=i=>{r(i)}})}async writeText(t){const r=[new ClipboardItem({[b]:new Blob([t],{type:b})})];return this._write({uuid:R(),items:r,ref:null})}addEventListener(t,r,n={}){const o=n?.capture?this._listenersCapture:this._listeners;let a=o.get(t);a||(a=new Map,o.set(t,a)),a.set(r,typeof n=="boolean"?{}:n)}dispatchEvent(t){if(!t)return;const r=n=>{const o=n.get(t.type);o&&o.forEach((a,i)=>{try{typeof i=="function"?i(t):i.handleEvent&&i.handleEvent(t),a.once&&o.delete(i)}catch(l){console.warn(l)}})};return r(this._listenersCapture),r(this._listeners),!0}removeEventListener(t,r,n){const o=n?.capture?this._listenersCapture:this._listeners,a=o.get(t);a&&(a.delete(r),a.size===0&&o.delete(t))}close(){globalThis.removeEventListener?.("focus",this._onFocus),globalThis.removeEventListener?.("blur",this._onBlur)}}var z;(z=wt||(wt={})).ErrorMessages=jt,z.Global=new z;let ht=null,q=null,M=null;const Vt=Object.freeze({compileTypescript:async function(e){if(!(e?.source??null))return null;if(q&&xt.deepEqual(q,e))return ht;const t=await async function(){if(M)return M;const{TypeScriptCompiler:n}=await Promise.resolve().then(()=>require("./
|
|
13
|
+
Please use Chrome or Edge if external copy and paste is required.`,Perms:k,PermsWrite:T()===y.Safari?ut:k,PermsRead:T()===y.Safari?ut:k},N=async()=>new Promise(e=>{document.hasFocus()?e():globalThis.addEventListener?.("focus",()=>{e()},{once:!0}),document.activeElement.focus?.()}),B=async(e,t,r)=>{if(T()===y.Safari)return await r(new Error(jt.Safari));try{const n=async i=>{try{return await i()}catch(l){if(l.message?.includes("Document is not focused"))return!1;throw l}},o=await globalThis?.navigator?.permissions?.query({name:e,allowWithoutGesture:!0,allowWithoutSanitization:!0});let a=!1;if(o.state==="prompt"&&(a=await n(t)),a||o.state!=="granted"||(a=await t()),!a)return await r(new Error(o.state))}catch(n){return n.message==="No valid data on clipboard"||n.name==="DataError"?void 0:await r(n)}},Tt=async e=>{try{return await e.read({unsanitized:[h]})}catch{}return await e.read()};if(!globalThis.ClipboardItem){const e=(r,n)=>new Blob([n],{type:r});class t{constructor(n,o){this._items={},this._types=Object.keys(n);const a={},i=Object.keys(n);for(let l=0;l<i.length;l++){const s=i[l];let c=n[s];a[s]=typeof c=="string"?e(s,c):c}this._items=a,this._presentationStyle=o?.presentationStyle??"unspecified"}get types(){return this._types}getType(n){return Promise.resolve(this._items[n])}supports(n){return!0}}globalThis.ClipboardItem=t}const V=async(e,t=h)=>new Promise(async(r,n)=>{try{const o=await(async(a,i)=>{if(!a)return null;const l=await Tt(a);let s=!1;for(let c=0;!s&&l&&c<l.length;c++)if(s=l[c].types.includes(i),s)return await l[c].getType(i);return s?void 0:null})(e,t);if(o){const a=new FileReader;a.onload=()=>{r(a.result)},a.onerror=()=>{r("")},a.readAsText(o)}else r("")}catch(o){n(o)}}),dt=async(e,t=h)=>{const r=await V(e,t);if(!r)return null;let n=null;try{n=new DOMParser().parseFromString(r,h)}catch{console.warn("Can't parse html from clipboard.")}return n},C="clipboard-uuid",v="web text/uuid",ft=e=>`<div style="display:none" ${C}="${e}"/>`,Wt=(e,t)=>{let r=null;try{const n=new DOMParser().parseFromString(t,h);n.body.firstElementChild.setAttribute(C,e),r=n.getElementsByTagName("body")[0].innerHTML}catch(n){console.warn("Can't embed uuid.",n)}return r},pt=(e,t)=>{if(!t||!e)return!1;try{const r=t.querySelectorAll(`[${C}="${e}"]`);if(r&&r.length===1)return!0;if(t.querySelector("parsererror"))throw new Error("We are unable to parse node");return!1}catch{return!1}};class wt{constructor(t){if(t?.nativeClipboard===void 0||t?.nativeClipboard===!0)try{this._nativeClipboard=globalThis?.navigator.clipboard}catch{t?.nativeClipboard===!0&&console.warn("NativeClipboard option set to true but no native clipboard available.")}else this._nativeClipboard=t?.nativeClipboard===!1?null:t?.nativeClipboard;this._disableCheckOnFocus=t?.disableCheckOnFocus??!1,this._init()}async _checkForChanges(){this._nativeClipboard&&this._state&&!this._disableCheckOnFocus&&await B("clipboard-read",async()=>{await N();const t=await V(this._nativeClipboard,v);if(!this._state||t&&t===this._state.uuid)return!0;const r=await dt(this._nativeClipboard,h);return!this._state||(pt(this._state.uuid,r)||this.clear(),!0)},async t=>{t?.message==="denied"||t.message?.includes("Document is not focused")||T()===y.Safari||console.warn("Unable to detect clipboard changes: ",t)})}_init(){const t=this;this._listeners=new Map,this._listenersCapture=new Map,this._state=null,this._nativeClipboard&&(this._onFocus=()=>{t._checkForChanges()},this._onBlur=()=>{globalThis.addEventListener?.("focus",t._onFocus,{once:!0})},globalThis.addEventListener?.("blur",this._onBlur),this._nativeClipboard.addEventListener("clipboardchange",r=>{t._checkForChanges()}))}async read(){if(!this._nativeClipboard)return this._state?.items??null;const t=this;return await B("clipboard-read",async()=>{if(await N(),this._state?.uuid){const r=await V(this._nativeClipboard,v);if(r&&r===t._state.uuid)return!0;const n=await dt(this._nativeClipboard,h);if(pt(t._state?.uuid,n))return!0}return t._state={items:await Tt(this._nativeClipboard),uuid:null,ref:null},this.dispatchEvent(new Event("clipboardread")),!0},async r=>{this.dispatchEvent(new Event("clipboarderrorread"))}),this._state?.items??[]}async write(t){return this._write({uuid:R(),items:t,ref:null})}async _write(t){if(!this._nativeClipboard)return this._state=t,this.dispatchEvent(new Event("clipboardwrite")),this.dispatchEvent(new Event("clipboardchange")),null;const r=this,n=[],o=t.uuid;let a=t.items??[];const i=()=>{r._state={uuid:o,ref:t.ref,items:n},r.dispatchEvent(new Event("clipboardwrite")),r.dispatchEvent(new Event("clipboardchange"))};await B("clipboard-write",async()=>{await N(),o&&a.length===0&&(a.push(new ClipboardItem({[v]:new Blob([o],{type:v})})),a.push(new ClipboardItem({[h]:new Blob([ft(o)],{type:h})})));for(let l=0;l<Math.min(1,a.length);l++){const s=a[l];let c=s.types.indexOf(h),d=null;if(c!==-1){const f=await s.getType(h);d=await W(f),d&&(d=Wt(o,d))}if(!d&&s.types.includes(b)){const f=await s.getType(b);if(f){let p=null;typeof f=="string"?(console.warn("text as string",f),p=f):p=await W(f),p&&(d=`<div ${C}="${o}">${p}</div>`)}}if(!d&&s.types.includes(L)){const f=await s.getType(L),p=Ot(await f.arrayBuffer());d=`<div ${C}="${o}"><img src="${_t+p}"/></div>`}!d&&o&&(d=ft(o));const w=new Blob([d??""],{type:h}),u={};for(let f=0;f<s.types.length;f++){const p=s.types[f];u[p]=f===c?w:s.getType(p)}d&&c===-1&&(u[h]=w),o&&(u[v]=new Blob([o],{type:v})),n.push(new ClipboardItem(u))}try{n&&n.length!==0?await this._nativeClipboard.write(n):await(async l=>{l&&await l.writeText("")})(this._nativeClipboard)}catch(l){l.message?.includes("Document is not focused")||console.warn("Unable to write to native clipboard: ",l)}return i(),!0},async l=>{this.dispatchEvent(new Event("clipboarderrorwrite")),i()})}async writeReference(t){if(!t)return void this.clear();let r=null;const n={};try{const a=await t.toText?.()??null;a&&(n[b]=new Blob([a??""],{type:b}))}catch(a){r=a}try{const a=await t.toHtml?.()??null;a&&(n[h]=new Blob([a],{type:h}))}catch(a){r=a,console.warn("export to html",a)}try{const a=await t.toImage?.()??null;a&&(n[L]=a)}catch(a){r=a,console.warn("export to png",a)}const o=this._write({uuid:R(),ref:t,items:Object.keys(n).length>0?[new ClipboardItem(n)]:null});if(r)throw r;return o}clear(t=!1){this._state&&(this._state=null,t&&this._write({uuid:null,ref:null,items:null}),this.dispatchEvent(new Event("clipboardwrite")),this.dispatchEvent(new Event("clipboardchange")))}async readReference(){return await this.read(),this._state?.ref??null}readText(){return new Promise(async(t,r)=>{const n=await this.read();let o=null;for(let i=0;!o&&n&&i<n.length;i++)n[i].types.includes(b)&&(o=await n[i].getType(b));if(!o)return void t("");const a=new FileReader;a.onload=()=>{t(a.result)},a.readAsText(o),a.onerror=i=>{r(i)}})}async writeText(t){const r=[new ClipboardItem({[b]:new Blob([t],{type:b})})];return this._write({uuid:R(),items:r,ref:null})}addEventListener(t,r,n={}){const o=n?.capture?this._listenersCapture:this._listeners;let a=o.get(t);a||(a=new Map,o.set(t,a)),a.set(r,typeof n=="boolean"?{}:n)}dispatchEvent(t){if(!t)return;const r=n=>{const o=n.get(t.type);o&&o.forEach((a,i)=>{try{typeof i=="function"?i(t):i.handleEvent&&i.handleEvent(t),a.once&&o.delete(i)}catch(l){console.warn(l)}})};return r(this._listenersCapture),r(this._listeners),!0}removeEventListener(t,r,n){const o=n?.capture?this._listenersCapture:this._listeners,a=o.get(t);a&&(a.delete(r),a.size===0&&o.delete(t))}close(){globalThis.removeEventListener?.("focus",this._onFocus),globalThis.removeEventListener?.("blur",this._onBlur)}}var z;(z=wt||(wt={})).ErrorMessages=jt,z.Global=new z;let ht=null,q=null,M=null;const Vt=Object.freeze({compileTypescript:async function(e){if(!(e?.source??null))return null;if(q&&xt.deepEqual(q,e))return ht;const t=await async function(){if(M)return M;const{TypeScriptCompiler:n}=await Promise.resolve().then(()=>require("./Djs-8wVw8I-IzE1q.cjs"));return M=new n,M}(),r=await t.compileModule(e);return ht=r,q=e,r}});exports.ScriptingUtils=Vt,exports.Yt=xt;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";/**
|
|
2
|
-
* @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.3.
|
|
2
|
+
* @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.3.12
|
|
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"});exports.TypeScriptCompiler=class{constructor(r={}){this.workerWrapper=null}async getWorkerWrapper(){if(this.workerWrapper)return this.workerWrapper;const{createCompilerWorker:r}=await Promise.resolve().then(()=>require("./
|
|
6
|
+
*/Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});exports.TypeScriptCompiler=class{constructor(r={}){this.workerWrapper=null}async getWorkerWrapper(){if(this.workerWrapper)return this.workerWrapper;const{createCompilerWorker:r}=await Promise.resolve().then(()=>require("./BhQmJCzU9QiMmCMZ.cjs"));return this.workerWrapper=await r(),this.workerWrapper}async compileModule(r){try{return(await this.getWorkerWrapper()).execute(r)}catch(e){throw console.error("Failed to compile using worker:",e),e}}terminate(){this.workerWrapper?.terminate(),this.workerWrapper=null}};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";/**
|
|
2
|
-
* @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.3.
|
|
2
|
+
* @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.3.12
|
|
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/browser/cjs/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";/**
|
|
2
|
-
* @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.3.
|
|
2
|
+
* @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.3.12
|
|
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 t=require("./
|
|
6
|
+
*/Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./DT_-RhNCrKewVki6.cjs");exports.ScriptingUtils=t.ScriptingUtils;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Y as he } from "./
|
|
1
|
+
import { Y as he } from "./OVyFCWoDvUngXzRC.mjs";
|
|
2
2
|
/**
|
|
3
|
-
* @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.3.
|
|
3
|
+
* @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.3.12
|
|
4
4
|
*
|
|
5
5
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
6
6
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -233,7 +233,7 @@ async function Te(e, a, C = "/script.js", p = "__SHEETXL") {
|
|
|
233
233
|
b = d, N = S;
|
|
234
234
|
});
|
|
235
235
|
try {
|
|
236
|
-
const { initialize: d } = await import("./
|
|
236
|
+
const { initialize: d } = await import("./Cjh5HU13AysLnT7U.mjs");
|
|
237
237
|
return I = await d(), b(), I;
|
|
238
238
|
} catch (d) {
|
|
239
239
|
throw console.error("Failed to import or initialize esbuild:", d), Y = null, N(d), d;
|
|
@@ -282,7 +282,7 @@ let H = null;
|
|
|
282
282
|
async function Le() {
|
|
283
283
|
if (H) return H;
|
|
284
284
|
try {
|
|
285
|
-
return await (await import("./
|
|
285
|
+
return await (await import("./Ce7iyVeMQpZJgX24.mjs")).initialize();
|
|
286
286
|
} catch (e) {
|
|
287
287
|
throw H = null, e;
|
|
288
288
|
} finally {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.3.
|
|
2
|
+
* @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.3.12
|
|
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.
|
|
@@ -47,7 +47,7 @@ class u {
|
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
const s = `/**
|
|
50
|
-
* @license @sheetxl/primitives - Primitives - Base types for SheetXL functions. - v0.3.
|
|
50
|
+
* @license @sheetxl/primitives - Primitives - Base types for SheetXL functions. - v0.3.12
|
|
51
51
|
*
|
|
52
52
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
53
53
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -266,7 +266,7 @@ var v;
|
|
|
266
266
|
return n = typeof e == "string" ? tt.get(e) : rt.get(e), n || (n = v.Unknown), new n(t, r);
|
|
267
267
|
}, v.getBuiltInById = (e) => Te.get(e) || Et;
|
|
268
268
|
/**
|
|
269
|
-
* @license @sheetxl/utils - Utils - Utilities used by most SheetXL components. - v0.3.
|
|
269
|
+
* @license @sheetxl/utils - Utils - Utilities used by most SheetXL components. - v0.3.12
|
|
270
270
|
*
|
|
271
271
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
272
272
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -1568,7 +1568,7 @@ async function p() {
|
|
|
1568
1568
|
return await l();
|
|
1569
1569
|
}
|
|
1570
1570
|
const l = async () => {
|
|
1571
|
-
const { compileModule: e } = await import("./
|
|
1571
|
+
const { compileModule: e } = await import("./6IYC77HCTdSAGYGL.mjs"), n = new u((t) => e(t));
|
|
1572
1572
|
return await n.start(), n;
|
|
1573
1573
|
};
|
|
1574
1574
|
export {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.3.
|
|
2
|
+
* @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.3.12
|
|
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,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.3.
|
|
2
|
+
* @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.3.12
|
|
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,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.3.
|
|
2
|
+
* @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.3.12
|
|
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.
|
|
@@ -10,7 +10,7 @@ class o {
|
|
|
10
10
|
}
|
|
11
11
|
async getWorkerWrapper() {
|
|
12
12
|
if (this.workerWrapper) return this.workerWrapper;
|
|
13
|
-
const { createCompilerWorker: r } = await import("./
|
|
13
|
+
const { createCompilerWorker: r } = await import("./BPPXCABpKnWc7wGE.mjs");
|
|
14
14
|
return this.workerWrapper = await r(), this.workerWrapper;
|
|
15
15
|
}
|
|
16
16
|
async compileModule(r) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.3.
|
|
2
|
+
* @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.3.12
|
|
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.
|
|
@@ -809,7 +809,7 @@ const Vt = Object.freeze({ compileTypescript: async function(e) {
|
|
|
809
809
|
if (q && $t.deepEqual(q, e)) return ht;
|
|
810
810
|
const t = await async function() {
|
|
811
811
|
if (M) return M;
|
|
812
|
-
const { TypeScriptCompiler: r } = await import("./
|
|
812
|
+
const { TypeScriptCompiler: r } = await import("./DM8MGP5TREtrRAP1.mjs");
|
|
813
813
|
return M = new r(), M;
|
|
814
814
|
}(), n = await t.compileModule(e);
|
|
815
815
|
return ht = n, q = e, n;
|
package/browser/esm/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { S as t } from "./
|
|
1
|
+
import { S as t } from "./OVyFCWoDvUngXzRC.mjs";
|
|
2
2
|
/**
|
|
3
|
-
* @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.3.
|
|
3
|
+
* @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.3.12
|
|
4
4
|
*
|
|
5
5
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
6
6
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Name: @sheetxl/primitives
|
|
2
|
-
Version: 0.3.
|
|
2
|
+
Version: 0.3.12
|
|
3
3
|
License: SEE LICENSE IN <LICENSE>
|
|
4
4
|
Private: false
|
|
5
5
|
Description: Primitives - Base types for SheetXL functions.
|
|
@@ -21,7 +21,7 @@ https://www.sheetxl.com/licensing-pricing
|
|
|
21
21
|
---
|
|
22
22
|
|
|
23
23
|
Name: @sheetxl/utils
|
|
24
|
-
Version: 0.3.
|
|
24
|
+
Version: 0.3.12
|
|
25
25
|
License: SEE LICENSE IN <LICENSE>
|
|
26
26
|
Private: false
|
|
27
27
|
Description: Utils - Utilities used by most SheetXL components.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.3.
|
|
2
|
+
* @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.3.12
|
|
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.
|
|
@@ -10,7 +10,7 @@ class o {
|
|
|
10
10
|
}
|
|
11
11
|
async getWorkerWrapper() {
|
|
12
12
|
if (this.workerWrapper) return this.workerWrapper;
|
|
13
|
-
const { createCompilerWorker: r } = await import("./
|
|
13
|
+
const { createCompilerWorker: r } = await import("./C0toyUAEIJ2I8di1.mjs");
|
|
14
14
|
return this.workerWrapper = await r(), this.workerWrapper;
|
|
15
15
|
}
|
|
16
16
|
async compileModule(r) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { e as he } from "./index.mjs";
|
|
2
2
|
/**
|
|
3
|
-
* @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.3.
|
|
3
|
+
* @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.3.12
|
|
4
4
|
*
|
|
5
5
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
6
6
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -233,7 +233,7 @@ async function Te(e, a, C = "/script.js", p = "__SHEETXL") {
|
|
|
233
233
|
b = d, N = S;
|
|
234
234
|
});
|
|
235
235
|
try {
|
|
236
|
-
const { initialize: d } = await import("./
|
|
236
|
+
const { initialize: d } = await import("./D0fS6t0dZSQtpD5p.mjs");
|
|
237
237
|
return I = await d(), b(), I;
|
|
238
238
|
} catch (d) {
|
|
239
239
|
throw console.error("Failed to import or initialize esbuild:", d), H = null, N(d), d;
|
|
@@ -282,7 +282,7 @@ let W = null;
|
|
|
282
282
|
async function Le() {
|
|
283
283
|
if (W) return W;
|
|
284
284
|
try {
|
|
285
|
-
return await (await import("./
|
|
285
|
+
return await (await import("./BwtozNDdc0V5Nx3-.mjs")).initialize();
|
|
286
286
|
} catch (e) {
|
|
287
287
|
throw W = null, e;
|
|
288
288
|
} finally {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.3.
|
|
2
|
+
* @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.3.12
|
|
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,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.3.
|
|
2
|
+
* @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.3.12
|
|
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.
|
|
@@ -47,7 +47,7 @@ class u {
|
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
const s = `/**
|
|
50
|
-
* @license @sheetxl/primitives - Primitives - Base types for SheetXL functions. - v0.3.
|
|
50
|
+
* @license @sheetxl/primitives - Primitives - Base types for SheetXL functions. - v0.3.12
|
|
51
51
|
*
|
|
52
52
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
53
53
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -266,7 +266,7 @@ var v;
|
|
|
266
266
|
return n = typeof e == "string" ? tt.get(e) : rt.get(e), n || (n = v.Unknown), new n(t, r);
|
|
267
267
|
}, v.getBuiltInById = (e) => Te.get(e) || Et;
|
|
268
268
|
/**
|
|
269
|
-
* @license @sheetxl/utils - Utils - Utilities used by most SheetXL components. - v0.3.
|
|
269
|
+
* @license @sheetxl/utils - Utils - Utilities used by most SheetXL components. - v0.3.12
|
|
270
270
|
*
|
|
271
271
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
272
272
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -1568,7 +1568,7 @@ async function p() {
|
|
|
1568
1568
|
return await l();
|
|
1569
1569
|
}
|
|
1570
1570
|
const l = async () => {
|
|
1571
|
-
const { compileModule: e } = await import("./
|
|
1571
|
+
const { compileModule: e } = await import("./BYfGO4SHFIybTMxR.mjs"), n = new u((t) => e(t));
|
|
1572
1572
|
return await n.start(), n;
|
|
1573
1573
|
};
|
|
1574
1574
|
export {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as s from "esbuild-wasm";
|
|
2
2
|
/**
|
|
3
|
-
* @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.3.
|
|
3
|
+
* @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.3.12
|
|
4
4
|
*
|
|
5
5
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
6
6
|
* License: The license can be found at https://www.sheetxl.com/license.
|
package/node/esm/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.3.
|
|
2
|
+
* @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.3.12
|
|
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.
|
|
@@ -811,7 +811,7 @@ const Vt = Object.freeze({ compileTypescript: async function(e) {
|
|
|
811
811
|
if (q && $t.deepEqual(q, e)) return ht;
|
|
812
812
|
const t = await async function() {
|
|
813
813
|
if (M) return M;
|
|
814
|
-
const { TypeScriptCompiler: r } = await import("./
|
|
814
|
+
const { TypeScriptCompiler: r } = await import("./B5PN09Zh_zpBY4zF.mjs");
|
|
815
815
|
return M = new r(), M;
|
|
816
816
|
}(), n = await t.compileModule(e);
|
|
817
817
|
return ht = n, q = e, n;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sheetxl/scripting",
|
|
3
3
|
"description": "Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild.",
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.12",
|
|
5
5
|
"license": "SEE LICENSE IN <LICENSE>",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"exports": {
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"typescript"
|
|
29
29
|
],
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@sheetxl/primitives": "^0.3.
|
|
32
|
-
"@sheetxl/utils": "^0.3.
|
|
31
|
+
"@sheetxl/primitives": "^0.3.12",
|
|
32
|
+
"@sheetxl/utils": "^0.3.12",
|
|
33
33
|
"path-browserify": "^1.0.1"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|