@sheetxl/studio-vanilla 0.4.5 → 0.4.7
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/{Dy2mMhpvMlCllisC.cjs → 00LGtBNvHHqHMD_7.cjs} +2 -2
- package/browser/cjs/{C0Ag2mVRVKUqpwjf.cjs → B0pcLInszgzhrjui.cjs} +2 -2
- package/browser/cjs/{Bik-sJFqWM9QWE02.cjs → BBuQH_geF9Xg5HPn.cjs} +2 -2
- package/browser/cjs/{CjCQXZWYE2qphsOq.cjs → BC5f5sl2pjp8FYIk.cjs} +2 -2
- package/browser/cjs/{BrUHZtygCDnfCKfg.cjs → BC9xtBySc8rix4-F.cjs} +1 -1
- package/browser/cjs/{CbQPktEA8H9UdGJU.cjs → BKUcozo2wEv2ay2w.cjs} +1 -1
- package/browser/cjs/{CLINfheObLnHCgdg.cjs → BO0CySmcqi-pkV4p.cjs} +2 -2
- package/browser/cjs/{B7kECvUjpFzne-uF.cjs → Bgl5W-fCpnnnO3_F.cjs} +2 -2
- package/browser/cjs/{7rLaycfobcKo_kq5.cjs → BoG6Gi-uqIbSJdRv.cjs} +4 -4
- package/browser/cjs/{ChmaPA-0mZc0XUIa.cjs → C14PMFhYpGUhrvq1.cjs} +1 -1
- package/browser/cjs/{Dm665D5ufxmlltru.cjs → C73dxZSAw05vqEtJ.cjs} +1 -1
- package/browser/cjs/{CPsAOtBZzjhklUe6.cjs → CQAkk0gbl342HFs-.cjs} +1 -1
- package/browser/cjs/{B9w7ujy00h7e8Fvz.cjs → Clp5qh0fApIxsE35.cjs} +2 -2
- package/browser/cjs/{CIz6DYhS1vu2HfPi.cjs → D5I2M8yOTfapq6d7.cjs} +2 -2
- package/browser/cjs/{Dzy80YtKvA7bbUzS.cjs → D8WkJStmUKY23vEC.cjs} +1 -1
- package/browser/cjs/{0B1iL81KtvYSnhhq.cjs → DD6f8EPYnuPb41GO.cjs} +2 -2
- package/browser/cjs/{CbDrVkYD5wu0uAjG.cjs → DDFDUxH5Mew5rcdT.cjs} +1 -1
- package/browser/cjs/{BDXYk-b9YYeVSE4I.cjs → DE5MhliNUlcqzd9C.cjs} +2 -2
- package/browser/cjs/{s3-EXU_z_ArlL2uk.cjs → DGlLxziqSNTW0c6v.cjs} +1 -1
- package/browser/cjs/DNQqhDlfagjGC2sO.cjs +12 -0
- package/browser/cjs/{BK_zGoKaTtpB1zem.cjs → DPgVQdCYWI3fGYJ2.cjs} +2 -2
- package/browser/cjs/{DdEPMjow4ZPJLvxg.cjs → DUrNYTSMA5KQTG77.cjs} +4 -4
- package/browser/cjs/{Br3mSp3T5HwaBF6S.cjs → DsuUTTVqL23hXXxq.cjs} +2 -2
- package/browser/cjs/{DlzKH-IkOGSCy01K.cjs → Dva96jeug6x2xYZm.cjs} +36 -36
- package/browser/cjs/{CcIRAkO7FxQJcoUu.cjs → DyQffD3gRWH5-nOp.cjs} +2 -2
- package/browser/cjs/{DQ6GVbVirj0afjB4.cjs → HCih5BN1MZGUuqGG.cjs} +3 -3
- package/browser/cjs/index.cjs +2 -2
- package/browser/esm/{R3-9Vs759U_IrWS0.mjs → 6w21A0XUkGBQu8-3.mjs} +4 -4
- package/browser/esm/{Dlmn7cD8IMHcO8QV.mjs → B6OcmPVBCjTZiEO8.mjs} +1 -1
- package/browser/esm/{YQ75fz7WPgEZ7iqd.mjs → BepIgOjpel6ND31E.mjs} +3 -3
- package/browser/esm/{DeBap1E0o2fiIUXn.mjs → BssMWXVsjFZUIbK_.mjs} +2 -2
- package/browser/esm/{DcRaHkEX0PTfgRz8.mjs → C3vvXeb_u4RQddV1.mjs} +2 -2
- package/browser/esm/{1f6TNXbG6GNeV731.mjs → C8PrD3vZULKFp7HL.mjs} +3 -3
- package/{cdn/assets/CKl3yY2R5FFNVhfY.js → browser/esm/CHsVgElx78EEmCPY.mjs} +1 -1
- package/browser/esm/CNdoHnLQKWWUIXFN.mjs +84 -0
- package/browser/esm/{C4QEVfdMT-rlept2.mjs → CSnM9G1CZ81wivjo.mjs} +1 -1
- package/browser/esm/{Bu3cxpNx9EjzX079.mjs → CdbRlOwSBEqFzw-Q.mjs} +2 -2
- package/browser/esm/{B3Mh5nyl6xChfQzq.mjs → CnL3YzjxBxFK7qfL.mjs} +2 -2
- package/browser/esm/{C0mZi6_ow6mTizdr.mjs → CrnqRK0Y_R59nkb0.mjs} +6 -6
- package/{cdn/assets/CAZP7WXiGGAAWaA4.js → browser/esm/CxesFvTfE_FHHeOa.mjs} +1 -1
- package/{cdn/assets/8c1tfkOHX_hmgLQL.js → browser/esm/CzeybhBUMRs64-Mp.mjs} +1 -1
- package/browser/esm/{D-zKnwkk0AzBVwph.mjs → D03_7nbUXeSyElQe.mjs} +2 -2
- package/browser/esm/{B3QyiMqQUOCVkRek.mjs → DCLOetlYWQ4f6912.mjs} +2 -2
- package/browser/esm/{BgsaotxKIiWsR2Pj.mjs → DE0B_sDQJ2uyFacb.mjs} +34 -34
- package/browser/esm/{CPJ8tPdBfN819I3R.mjs → DJBqN2bozSAMAOUl.mjs} +2 -2
- package/browser/esm/{D2Pmd6RHWjY0gfsV.mjs → DQj7TIf3hkBsvgpu.mjs} +2 -2
- package/browser/esm/{CLCwP5KKZDfh18_b.mjs → DfczJdsv--tsazCR.mjs} +3 -3
- package/browser/esm/{B6mfBS5Fp8LFQI00.mjs → DnEhhjrb_iK5ugui.mjs} +2 -2
- package/browser/esm/{BgI7ZIj--p_zF_hQ.mjs → IhAvisOcXUTXM4fs.mjs} +1 -1
- package/browser/esm/{DTAJwA_dqjxlumX9.mjs → bMPbHealpRV0cNsU.mjs} +2 -2
- package/browser/esm/{BgY9j44guQOP_fvm.mjs → f7jo5w0h4-vNZtjZ.mjs} +10 -10
- package/{cdn/assets/DuBnylmXIfm18-dL.js → browser/esm/fLUOP3GBZp9qFVpK.mjs} +1 -1
- package/browser/esm/index.mjs +2 -2
- package/browser/esm/{CmXErieix2FDbOwK.mjs → t16pmig4Yv-yOK3J.mjs} +1 -1
- package/cdn/assets/{DTPSQuJ3JRqZXMUt.js → B-7gpSVkQWekyOlk.js} +2 -2
- package/cdn/assets/{Dlmn7cD8IMHcO8QV.js → B6OcmPVBCjTZiEO8.js} +1 -1
- package/cdn/assets/{BHqCrOXpW9BgJQ9T.js → BFDNPYBEj2T1cP38.js} +3 -3
- package/cdn/assets/{DoroD9N_2k6AqWOg.js → BKMHTFN6LTvRZnlS.js} +2 -2
- package/cdn/assets/{obrIHAoumWmtgmD_.js → BPKaeP61qs19hdJx.js} +34 -34
- package/cdn/assets/{2No66gjityIZv-rk.js → BWyjsqZ8W7LRq-2H.js} +3 -3
- package/cdn/assets/{Db1VVlAKq3DhPw8x.js → CB496hBmWELULf2f.js} +2 -2
- package/cdn/assets/{CsicVpiu9NvgDG1d.js → CGL2dNgGZEziA1cG.js} +2 -2
- package/cdn/assets/{BnyKUs9Vb-lXY0Dg.js → CHZP9CrMHXri-Ghe.js} +4 -4
- package/{browser/esm/CKl3yY2R5FFNVhfY.mjs → cdn/assets/CHsVgElx78EEmCPY.js} +1 -1
- package/cdn/assets/CNdoHnLQKWWUIXFN.js +84 -0
- package/cdn/assets/{CWUn5vs1-1BWS2yZ.js → CRv8MUg-_zmoKFIt.js} +2 -2
- package/cdn/assets/{C4QEVfdMT-rlept2.js → CSnM9G1CZ81wivjo.js} +1 -1
- package/cdn/assets/{C-_MGUuF0GXf60DF.js → CUqr4I0B5RzMvyfH.js} +9 -9
- package/cdn/assets/{DVnQORc033euBn1U.js → ChAbZK53mfolDCTD.js} +6 -6
- package/cdn/assets/{Dauwd4VOrJfzqBmA.js → Cjl-eP68w6LXe0zR.js} +2 -2
- package/cdn/assets/{DHcD8NDHUU4VitQ-.js → CvfZjHPPpLdHBSRa.js} +2 -2
- package/{browser/esm/CAZP7WXiGGAAWaA4.mjs → cdn/assets/CxesFvTfE_FHHeOa.js} +1 -1
- package/{browser/esm/8c1tfkOHX_hmgLQL.mjs → cdn/assets/CzeybhBUMRs64-Mp.js} +1 -1
- package/cdn/assets/{UiJgIrN9udmFo4tA.js → D7ubLFCJK5RzTJOF.js} +3 -3
- package/cdn/assets/{Cpz3v3OfgwIZz7lJ.js → D8lNg-ZFq3SVt0qa.js} +2 -2
- package/cdn/assets/{BotLtn-zKrfEk7le.js → DPdbTtHJ9qzLqsDN.js} +2 -2
- package/cdn/assets/{2Kxj-c9oMgcJMq_B.js → DucOHAWR0Drvzaz2.js} +2 -2
- package/cdn/assets/{BgI7ZIj--p_zF_hQ.js → IhAvisOcXUTXM4fs.js} +1 -1
- package/{browser/esm/DuBnylmXIfm18-dL.mjs → cdn/assets/fLUOP3GBZp9qFVpK.js} +1 -1
- package/cdn/assets/{CmXErieix2FDbOwK.js → t16pmig4Yv-yOK3J.js} +1 -1
- package/cdn/index.js +2 -2
- package/cdn/loader.js +1 -1
- package/package.json +3 -3
- package/browser/cjs/7UkhsKdd_HTC5f7O.cjs +0 -12
- package/browser/esm/MJJDAWOz_kMbIjQy.mjs +0 -84
- package/cdn/assets/MJJDAWOz_kMbIjQy.js +0 -84
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import { memo as E, useMemo as M, useState as x, useCallback as j } from "react";
|
|
3
|
-
import { v as r, b as S, B as V, F as $, T as z, a as h, ay as C } from "./
|
|
3
|
+
import { v as r, b as S, B as V, F as $, T as z, a as h, ay as C } from "./CUqr4I0B5RzMvyfH.js";
|
|
4
4
|
/**
|
|
5
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.
|
|
5
|
+
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.7
|
|
6
6
|
*
|
|
7
7
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
8
8
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as t, jsxs as f } from "react/jsx-runtime";
|
|
2
2
|
import { memo as G, useState as x, useCallback as O, useEffect as H, useMemo as w } from "react";
|
|
3
3
|
import { NumberFormat as n } from "@sheetxl/sdk";
|
|
4
|
-
import { v as l, av as K, b as q, B as P, F as S, aw as A, ax as J, a as p, ay as c, T as Q, $, az as U } from "./
|
|
4
|
+
import { v as l, av as K, b as q, B as P, F as S, aw as A, ax as J, a as p, ay as c, T as Q, $, az as U } from "./CUqr4I0B5RzMvyfH.js";
|
|
5
5
|
/**
|
|
6
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.
|
|
6
|
+
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.7
|
|
7
7
|
*
|
|
8
8
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
9
9
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as d, jsxs as k } from "react/jsx-runtime";
|
|
2
2
|
import { memo as E, useMemo as V, useState as p, useCallback as h } from "react";
|
|
3
|
-
import { v as u, b as L, B as S, aO as A, aP as G } from "./
|
|
3
|
+
import { v as u, b as L, B as S, aO as A, aP as G } from "./CUqr4I0B5RzMvyfH.js";
|
|
4
4
|
/**
|
|
5
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.
|
|
5
|
+
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.7
|
|
6
6
|
*
|
|
7
7
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
8
8
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.
|
|
2
|
+
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.7
|
|
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/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.
|
|
2
|
+
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.7
|
|
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,7 +1,7 @@
|
|
|
1
1
|
import * as Je from "react";
|
|
2
2
|
import { createElement as $r, forwardRef as Ya, useRef as Xa, useImperativeHandle as Wa, useEffect as Ha } from "react";
|
|
3
3
|
/**
|
|
4
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.
|
|
4
|
+
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.7
|
|
5
5
|
*
|
|
6
6
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
7
7
|
* License: The license can be found at https://www.sheetxl.com/license.
|
package/cdn/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.
|
|
2
|
+
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.7
|
|
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.
|
|
@@ -115,7 +115,7 @@ let c;
|
|
|
115
115
|
const b = async (e) => c || (c = await (async (n, t) => {
|
|
116
116
|
try {
|
|
117
117
|
if (t?.selector && C(t?.selector, t?.loading), !n) {
|
|
118
|
-
const { resolveDependencies: r } = await import("./assets/
|
|
118
|
+
const { resolveDependencies: r } = await import("./assets/CvfZjHPPpLdHBSRa.js");
|
|
119
119
|
n = await r(t?.dependencies);
|
|
120
120
|
}
|
|
121
121
|
t?.licenseKey && await n.StudioMUI.LicenseManager.setLicenseKey(t.licenseKey), t?.selector && h(t?.selector);
|
package/cdn/loader.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
(function(e){typeof define=="function"&&define.amd?define(e):e()})(function(){"use strict";/**
|
|
2
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.
|
|
2
|
+
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.7
|
|
3
3
|
*
|
|
4
4
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sheetxl/studio-vanilla",
|
|
3
3
|
"description": "SheetXL Studio - Vanilla entry point for integrating SheetXL UI.",
|
|
4
|
-
"version": "0.4.
|
|
4
|
+
"version": "0.4.7",
|
|
5
5
|
"license": "SEE LICENSE IN <LICENSE>",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./browser/esm/index.mjs",
|
|
@@ -41,12 +41,12 @@
|
|
|
41
41
|
"@mui/styled-engine": "^6.5.0",
|
|
42
42
|
"@mui/system": "^6.5.0",
|
|
43
43
|
"@mui/utils": "^6.4.9",
|
|
44
|
-
"@sheetxl/studio-mui": "^0.4.
|
|
44
|
+
"@sheetxl/studio-mui": "^0.4.7",
|
|
45
45
|
"csstype": "^3.1.3",
|
|
46
46
|
"http-server": "^14.1.1"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"@sheetxl/sdk": "^0.4.
|
|
49
|
+
"@sheetxl/sdk": "^0.4.7",
|
|
50
50
|
"react": "^19.1.0",
|
|
51
51
|
"react-dom": "^19.1.0"
|
|
52
52
|
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";/**
|
|
2
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.5
|
|
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 J=require("@sheetxl/sdk");exports.fromBufferJSON=async(b,l)=>{let c=b;(function(t){if(t.byteLength<4)return!1;const i=new Uint8Array(t),r={gzip:[31,139],zip:[80,75,3,4],bz2:[66,90,104],br:[206,178,207,129]},n=Object.keys(r);for(let s=0;s<n.length;s++){const o=n[s],e=r[o];let f=!0;for(let a=0;a<e.length;a++)if(i[a]!==e[a]){f=!1;break}if(f)return o}return!1})(c)&&(c=await async function(t,i="gzip"){let r;t instanceof SharedArrayBuffer?(r=new ArrayBuffer(t.byteLength),new Uint8Array(r).set(new Uint8Array(t))):r=t;const n=new Blob([r]).stream(),s=new DecompressionStream(i),o=n.pipeThrough(s);return(await new Response(o).blob()).arrayBuffer()}(c));let g=new TextDecoder().decode(c);const p=JSON.parse(g),w={...l?.constructorOptions??{},json:p};return new J.Workbook(w)},exports.toBufferJSON=async(b,l)=>{const c=await b.toJSON(),g=l?.whiteSpace??0;let p;l?.beforeWrite?.(b,c),p=g===0?JSON.stringify(c):function(i,r=2){const n=[];function s(o){const e=r*o;return n[e]===void 0&&(n[e]=" ".repeat(e)),n[e]}return function o(e,f,a,B){if(e==null||typeof e!="object")return JSON.stringify(e);const d=s(f),A=s(f+1);if(Array.isArray(e)){const u=e.length;if(u===0)return"[]";if(a!==0)return JSON.stringify(e);let y=`[
|
|
7
|
-
`;for(let h=0;h<u;h++)y+=A+o(e[h],f+1,a+1,!0),h<u-1&&(y+=`,
|
|
8
|
-
`);return y+=`
|
|
9
|
-
`+d+"]",y}const m=Object.keys(e),O=m.length;if(O===0)return"{}";if(!(a<2))return JSON.stringify(e);let S=`{
|
|
10
|
-
`;B||(a=0);for(let u=0;u<O;u++){const y=m[u];S+=A+JSON.stringify(y)+": "+o(e[y],f+1,a,!1),u<O-1&&(S+=`,
|
|
11
|
-
`)}return S+=`
|
|
12
|
-
`+d+"}",S}(i,0,0,!1)}(c,g);let w=new TextEncoder().encode(p).buffer;const t=l?.compress??!0;return t&&(w=await async function(i,r="gzip"){let n;i instanceof SharedArrayBuffer?(n=new ArrayBuffer(i.byteLength),new Uint8Array(n).set(new Uint8Array(i))):n=i;const s=new ReadableStream({start(f){f.enqueue(n),f.close()}}),o=new CompressionStream(r),e=s.pipeThrough(o);return(await new Response(e).blob()).arrayBuffer()}(w,typeof t=="string"?t:void 0)),w};
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { Workbook as J } from "@sheetxl/sdk";
|
|
2
|
-
/**
|
|
3
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.5
|
|
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 k = async (p, l) => {
|
|
9
|
-
const c = await p.toJSON(), b = l?.whiteSpace ?? 0;
|
|
10
|
-
let g;
|
|
11
|
-
l?.beforeWrite?.(p, c), g = b === 0 ? JSON.stringify(c) : function(i, r = 2) {
|
|
12
|
-
const n = [];
|
|
13
|
-
function s(o) {
|
|
14
|
-
const e = r * o;
|
|
15
|
-
return n[e] === void 0 && (n[e] = " ".repeat(e)), n[e];
|
|
16
|
-
}
|
|
17
|
-
return function o(e, f, a, B) {
|
|
18
|
-
if (e == null || typeof e != "object") return JSON.stringify(e);
|
|
19
|
-
const A = s(f), d = s(f + 1);
|
|
20
|
-
if (Array.isArray(e)) {
|
|
21
|
-
const u = e.length;
|
|
22
|
-
if (u === 0) return "[]";
|
|
23
|
-
if (a !== 0) return JSON.stringify(e);
|
|
24
|
-
let y = `[
|
|
25
|
-
`;
|
|
26
|
-
for (let h = 0; h < u; h++) y += d + o(e[h], f + 1, a + 1, !0), h < u - 1 && (y += `,
|
|
27
|
-
`);
|
|
28
|
-
return y += `
|
|
29
|
-
` + A + "]", y;
|
|
30
|
-
}
|
|
31
|
-
const m = Object.keys(e), O = m.length;
|
|
32
|
-
if (O === 0) return "{}";
|
|
33
|
-
if (!(a < 2)) return JSON.stringify(e);
|
|
34
|
-
let S = `{
|
|
35
|
-
`;
|
|
36
|
-
B || (a = 0);
|
|
37
|
-
for (let u = 0; u < O; u++) {
|
|
38
|
-
const y = m[u];
|
|
39
|
-
S += d + JSON.stringify(y) + ": " + o(e[y], f + 1, a, !1), u < O - 1 && (S += `,
|
|
40
|
-
`);
|
|
41
|
-
}
|
|
42
|
-
return S += `
|
|
43
|
-
` + A + "}", S;
|
|
44
|
-
}(i, 0, 0, !1);
|
|
45
|
-
}(c, b);
|
|
46
|
-
let w = new TextEncoder().encode(g).buffer;
|
|
47
|
-
const t = l?.compress ?? !0;
|
|
48
|
-
return t && (w = await async function(i, r = "gzip") {
|
|
49
|
-
let n;
|
|
50
|
-
i instanceof SharedArrayBuffer ? (n = new ArrayBuffer(i.byteLength), new Uint8Array(n).set(new Uint8Array(i))) : n = i;
|
|
51
|
-
const s = new ReadableStream({ start(f) {
|
|
52
|
-
f.enqueue(n), f.close();
|
|
53
|
-
} }), o = new CompressionStream(r), e = s.pipeThrough(o);
|
|
54
|
-
return (await new Response(e).blob()).arrayBuffer();
|
|
55
|
-
}(w, typeof t == "string" ? t : void 0)), w;
|
|
56
|
-
}, z = async (p, l) => {
|
|
57
|
-
let c = p;
|
|
58
|
-
(function(t) {
|
|
59
|
-
if (t.byteLength < 4) return !1;
|
|
60
|
-
const i = new Uint8Array(t), r = { gzip: [31, 139], zip: [80, 75, 3, 4], bz2: [66, 90, 104], br: [206, 178, 207, 129] }, n = Object.keys(r);
|
|
61
|
-
for (let s = 0; s < n.length; s++) {
|
|
62
|
-
const o = n[s], e = r[o];
|
|
63
|
-
let f = !0;
|
|
64
|
-
for (let a = 0; a < e.length; a++) if (i[a] !== e[a]) {
|
|
65
|
-
f = !1;
|
|
66
|
-
break;
|
|
67
|
-
}
|
|
68
|
-
if (f) return o;
|
|
69
|
-
}
|
|
70
|
-
return !1;
|
|
71
|
-
})(c) && (c = await async function(t, i = "gzip") {
|
|
72
|
-
let r;
|
|
73
|
-
t instanceof SharedArrayBuffer ? (r = new ArrayBuffer(t.byteLength), new Uint8Array(r).set(new Uint8Array(t))) : r = t;
|
|
74
|
-
const n = new Blob([r]).stream(), s = new DecompressionStream(i), o = n.pipeThrough(s);
|
|
75
|
-
return (await new Response(o).blob()).arrayBuffer();
|
|
76
|
-
}(c));
|
|
77
|
-
let b = new TextDecoder().decode(c);
|
|
78
|
-
const g = JSON.parse(b), w = { ...l?.constructorOptions ?? {}, json: g };
|
|
79
|
-
return new J(w);
|
|
80
|
-
};
|
|
81
|
-
export {
|
|
82
|
-
z as fromBufferJSON,
|
|
83
|
-
k as toBufferJSON
|
|
84
|
-
};
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { Workbook as J } from "@sheetxl/sdk";
|
|
2
|
-
/**
|
|
3
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.5
|
|
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 k = async (p, l) => {
|
|
9
|
-
const c = await p.toJSON(), b = l?.whiteSpace ?? 0;
|
|
10
|
-
let g;
|
|
11
|
-
l?.beforeWrite?.(p, c), g = b === 0 ? JSON.stringify(c) : function(i, r = 2) {
|
|
12
|
-
const n = [];
|
|
13
|
-
function s(o) {
|
|
14
|
-
const e = r * o;
|
|
15
|
-
return n[e] === void 0 && (n[e] = " ".repeat(e)), n[e];
|
|
16
|
-
}
|
|
17
|
-
return function o(e, f, a, B) {
|
|
18
|
-
if (e == null || typeof e != "object") return JSON.stringify(e);
|
|
19
|
-
const A = s(f), d = s(f + 1);
|
|
20
|
-
if (Array.isArray(e)) {
|
|
21
|
-
const u = e.length;
|
|
22
|
-
if (u === 0) return "[]";
|
|
23
|
-
if (a !== 0) return JSON.stringify(e);
|
|
24
|
-
let y = `[
|
|
25
|
-
`;
|
|
26
|
-
for (let h = 0; h < u; h++) y += d + o(e[h], f + 1, a + 1, !0), h < u - 1 && (y += `,
|
|
27
|
-
`);
|
|
28
|
-
return y += `
|
|
29
|
-
` + A + "]", y;
|
|
30
|
-
}
|
|
31
|
-
const m = Object.keys(e), O = m.length;
|
|
32
|
-
if (O === 0) return "{}";
|
|
33
|
-
if (!(a < 2)) return JSON.stringify(e);
|
|
34
|
-
let S = `{
|
|
35
|
-
`;
|
|
36
|
-
B || (a = 0);
|
|
37
|
-
for (let u = 0; u < O; u++) {
|
|
38
|
-
const y = m[u];
|
|
39
|
-
S += d + JSON.stringify(y) + ": " + o(e[y], f + 1, a, !1), u < O - 1 && (S += `,
|
|
40
|
-
`);
|
|
41
|
-
}
|
|
42
|
-
return S += `
|
|
43
|
-
` + A + "}", S;
|
|
44
|
-
}(i, 0, 0, !1);
|
|
45
|
-
}(c, b);
|
|
46
|
-
let w = new TextEncoder().encode(g).buffer;
|
|
47
|
-
const t = l?.compress ?? !0;
|
|
48
|
-
return t && (w = await async function(i, r = "gzip") {
|
|
49
|
-
let n;
|
|
50
|
-
i instanceof SharedArrayBuffer ? (n = new ArrayBuffer(i.byteLength), new Uint8Array(n).set(new Uint8Array(i))) : n = i;
|
|
51
|
-
const s = new ReadableStream({ start(f) {
|
|
52
|
-
f.enqueue(n), f.close();
|
|
53
|
-
} }), o = new CompressionStream(r), e = s.pipeThrough(o);
|
|
54
|
-
return (await new Response(e).blob()).arrayBuffer();
|
|
55
|
-
}(w, typeof t == "string" ? t : void 0)), w;
|
|
56
|
-
}, z = async (p, l) => {
|
|
57
|
-
let c = p;
|
|
58
|
-
(function(t) {
|
|
59
|
-
if (t.byteLength < 4) return !1;
|
|
60
|
-
const i = new Uint8Array(t), r = { gzip: [31, 139], zip: [80, 75, 3, 4], bz2: [66, 90, 104], br: [206, 178, 207, 129] }, n = Object.keys(r);
|
|
61
|
-
for (let s = 0; s < n.length; s++) {
|
|
62
|
-
const o = n[s], e = r[o];
|
|
63
|
-
let f = !0;
|
|
64
|
-
for (let a = 0; a < e.length; a++) if (i[a] !== e[a]) {
|
|
65
|
-
f = !1;
|
|
66
|
-
break;
|
|
67
|
-
}
|
|
68
|
-
if (f) return o;
|
|
69
|
-
}
|
|
70
|
-
return !1;
|
|
71
|
-
})(c) && (c = await async function(t, i = "gzip") {
|
|
72
|
-
let r;
|
|
73
|
-
t instanceof SharedArrayBuffer ? (r = new ArrayBuffer(t.byteLength), new Uint8Array(r).set(new Uint8Array(t))) : r = t;
|
|
74
|
-
const n = new Blob([r]).stream(), s = new DecompressionStream(i), o = n.pipeThrough(s);
|
|
75
|
-
return (await new Response(o).blob()).arrayBuffer();
|
|
76
|
-
}(c));
|
|
77
|
-
let b = new TextDecoder().decode(c);
|
|
78
|
-
const g = JSON.parse(b), w = { ...l?.constructorOptions ?? {}, json: g };
|
|
79
|
-
return new J(w);
|
|
80
|
-
};
|
|
81
|
-
export {
|
|
82
|
-
z as fromBufferJSON,
|
|
83
|
-
k as toBufferJSON
|
|
84
|
-
};
|