FIX: Fixes from "the big split"

This commit is contained in:
Nicolás Hatcher
2025-01-18 00:54:29 +01:00
committed by Nicolás Hatcher Andrés
parent fa0b386abc
commit c88304ba96
10 changed files with 311 additions and 22 deletions

View File

@@ -4,7 +4,7 @@ version = "0.3.0"
authors = ["Nicolas Hatcher <nicolas@theuniverse.today>"] authors = ["Nicolas Hatcher <nicolas@theuniverse.today>"]
description = "IronCalc Web bindings" description = "IronCalc Web bindings"
license = "MIT/Apache-2.0" license = "MIT/Apache-2.0"
repository = "https://github.com/ironcalc/web-bindings" repository = "https://github.com/ironcalc/ironcalc"
edition = "2021" edition = "2021"
[lib] [lib]

View File

@@ -1,16 +1,16 @@
{ {
"name": "ironcalc", "name": "@ironcalc/workbook",
"version": "0.3.0", "version": "0.3.1",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "ironcalc", "name": "@ironcalc/workbook",
"version": "0.3.0", "version": "0.3.1",
"dependencies": { "dependencies": {
"@emotion/react": "^11.11.4", "@emotion/react": "^11.11.4",
"@emotion/styled": "^11.11.5", "@emotion/styled": "^11.11.5",
"@ironcalc/wasm": "file:../../bindings/wasm/pkg", "@ironcalc/wasm": "^0.3.0",
"@mui/material": "^5.15.15", "@mui/material": "^5.15.15",
"i18next": "^23.11.1", "i18next": "^23.11.1",
"lucide-react": "^0.427.0", "lucide-react": "^0.427.0",

View File

@@ -1,7 +1,6 @@
{ {
"name": "ironcalc", "name": "@ironcalc/workbook",
"private": true, "version": "0.3.1",
"version": "0.3.0",
"type": "module", "type": "module",
"main": "./dist/ironcalc.js", "main": "./dist/ironcalc.js",
"module": "./dist/ironcalc.js", "module": "./dist/ironcalc.js",
@@ -17,7 +16,7 @@
"dependencies": { "dependencies": {
"@emotion/react": "^11.11.4", "@emotion/react": "^11.11.4",
"@emotion/styled": "^11.11.5", "@emotion/styled": "^11.11.5",
"@ironcalc/wasm": "file:../../bindings/wasm/pkg", "@ironcalc/wasm": "^0.3.0",
"@mui/material": "^5.15.15", "@mui/material": "^5.15.15",
"i18next": "^23.11.1", "i18next": "^23.11.1",
"lucide-react": "^0.427.0", "lucide-react": "^0.427.0",
@@ -42,5 +41,8 @@
"@types/react": { "@types/react": {
"optional": true "optional": true
} }
} },
"files": [
"dist"
]
} }

View File

@@ -0,0 +1,2 @@
"@ironcalc/wasm": "^0.3.0",
"@ironcalc/wasm": "file:../../bindings/wasm/pkg",

View File

@@ -10,7 +10,7 @@
"dependencies": { "dependencies": {
"@emotion/react": "^11.14.0", "@emotion/react": "^11.14.0",
"@emotion/styled": "^11.14.0", "@emotion/styled": "^11.14.0",
"@ironcalc/ironcalc": "file:../../IronCalc", "@ironcalc/workbook": "^0.3.1",
"@mui/material": "^6.3.1", "@mui/material": "^6.3.1",
"lucide": "^0.469.0", "lucide": "^0.469.0",
"lucide-react": "^0.469.0", "lucide-react": "^0.469.0",
@@ -28,12 +28,13 @@
} }
}, },
"../../IronCalc": { "../../IronCalc": {
"name": "ironcalc", "name": "@ironcalc/workbook",
"version": "0.3.0", "version": "0.3.0",
"extraneous": true,
"dependencies": { "dependencies": {
"@emotion/react": "^11.11.4", "@emotion/react": "^11.11.4",
"@emotion/styled": "^11.11.5", "@emotion/styled": "^11.11.5",
"@ironcalc/wasm": "file:../../bindings/wasm/pkg", "@ironcalc/wasm": "^0.3.0",
"@mui/material": "^5.15.15", "@mui/material": "^5.15.15",
"i18next": "^23.11.1", "i18next": "^23.11.1",
"lucide-react": "^0.427.0", "lucide-react": "^0.427.0",
@@ -1023,9 +1024,220 @@
"node": ">=18" "node": ">=18"
} }
}, },
"node_modules/@ironcalc/ironcalc": { "node_modules/@ironcalc/wasm": {
"resolved": "../../IronCalc", "version": "0.3.0",
"link": true "resolved": "https://registry.npmjs.org/@ironcalc/wasm/-/wasm-0.3.0.tgz",
"integrity": "sha512-59i4G3Lb4U6IQoO2ayqPWQlyiAPC4EPoOrPQkXcAc5k0OiQVmg/lPBdjRN8jYz6Oo0M2CPiL4lo71kozhAhcjA=="
},
"node_modules/@ironcalc/workbook": {
"version": "0.3.1",
"resolved": "https://registry.npmjs.org/@ironcalc/workbook/-/workbook-0.3.1.tgz",
"integrity": "sha512-0IbiRwnUG1vRkemEeCkff1jt1CQfxLLFFpJs8I6fq8XOlSDm4y6Ov5yGoBY6ifupimx7/jdl/5EQqwt+DQxVRA==",
"dependencies": {
"@emotion/react": "^11.11.4",
"@emotion/styled": "^11.11.5",
"@ironcalc/wasm": "^0.3.0",
"@mui/material": "^5.15.15",
"i18next": "^23.11.1",
"lucide-react": "^0.427.0",
"react-colorful": "^5.6.1",
"react-i18next": "^13.5.0"
},
"peerDependencies": {
"@types/react": "^18.0.0",
"react": "^18.0.0"
},
"peerDependenciesMeta": {
"@types/react": {
"optional": true
}
}
},
"node_modules/@ironcalc/workbook/node_modules/@mui/core-downloads-tracker": {
"version": "5.16.14",
"resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-5.16.14.tgz",
"integrity": "sha512-sbjXW+BBSvmzn61XyTMun899E7nGPTXwqD9drm1jBUAvWEhJpPFIRxwQQiATWZnd9rvdxtnhhdsDxEGWI0jxqA==",
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/mui-org"
}
},
"node_modules/@ironcalc/workbook/node_modules/@mui/material": {
"version": "5.16.14",
"resolved": "https://registry.npmjs.org/@mui/material/-/material-5.16.14.tgz",
"integrity": "sha512-eSXQVCMKU2xc7EcTxe/X/rC9QsV2jUe8eLM3MUCPYbo6V52eCE436akRIvELq/AqZpxx2bwkq7HC0cRhLB+yaw==",
"dependencies": {
"@babel/runtime": "^7.23.9",
"@mui/core-downloads-tracker": "^5.16.14",
"@mui/system": "^5.16.14",
"@mui/types": "^7.2.15",
"@mui/utils": "^5.16.14",
"@popperjs/core": "^2.11.8",
"@types/react-transition-group": "^4.4.10",
"clsx": "^2.1.0",
"csstype": "^3.1.3",
"prop-types": "^15.8.1",
"react-is": "^19.0.0",
"react-transition-group": "^4.4.5"
},
"engines": {
"node": ">=12.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/mui-org"
},
"peerDependencies": {
"@emotion/react": "^11.5.0",
"@emotion/styled": "^11.3.0",
"@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0",
"react": "^17.0.0 || ^18.0.0 || ^19.0.0",
"react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0"
},
"peerDependenciesMeta": {
"@emotion/react": {
"optional": true
},
"@emotion/styled": {
"optional": true
},
"@types/react": {
"optional": true
}
}
},
"node_modules/@ironcalc/workbook/node_modules/@mui/private-theming": {
"version": "5.16.14",
"resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-5.16.14.tgz",
"integrity": "sha512-12t7NKzvYi819IO5IapW2BcR33wP/KAVrU8d7gLhGHoAmhDxyXlRoKiRij3TOD8+uzk0B6R9wHUNKi4baJcRNg==",
"dependencies": {
"@babel/runtime": "^7.23.9",
"@mui/utils": "^5.16.14",
"prop-types": "^15.8.1"
},
"engines": {
"node": ">=12.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/mui-org"
},
"peerDependencies": {
"@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0",
"react": "^17.0.0 || ^18.0.0 || ^19.0.0"
},
"peerDependenciesMeta": {
"@types/react": {
"optional": true
}
}
},
"node_modules/@ironcalc/workbook/node_modules/@mui/styled-engine": {
"version": "5.16.14",
"resolved": "https://registry.npmjs.org/@mui/styled-engine/-/styled-engine-5.16.14.tgz",
"integrity": "sha512-UAiMPZABZ7p8mUW4akDV6O7N3+4DatStpXMZwPlt+H/dA0lt67qawN021MNND+4QTpjaiMYxbhKZeQcyWCbuKw==",
"dependencies": {
"@babel/runtime": "^7.23.9",
"@emotion/cache": "^11.13.5",
"csstype": "^3.1.3",
"prop-types": "^15.8.1"
},
"engines": {
"node": ">=12.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/mui-org"
},
"peerDependencies": {
"@emotion/react": "^11.4.1",
"@emotion/styled": "^11.3.0",
"react": "^17.0.0 || ^18.0.0 || ^19.0.0"
},
"peerDependenciesMeta": {
"@emotion/react": {
"optional": true
},
"@emotion/styled": {
"optional": true
}
}
},
"node_modules/@ironcalc/workbook/node_modules/@mui/system": {
"version": "5.16.14",
"resolved": "https://registry.npmjs.org/@mui/system/-/system-5.16.14.tgz",
"integrity": "sha512-KBxMwCb8mSIABnKvoGbvM33XHyT+sN0BzEBG+rsSc0lLQGzs7127KWkCA6/H8h6LZ00XpBEME5MAj8mZLiQ1tw==",
"dependencies": {
"@babel/runtime": "^7.23.9",
"@mui/private-theming": "^5.16.14",
"@mui/styled-engine": "^5.16.14",
"@mui/types": "^7.2.15",
"@mui/utils": "^5.16.14",
"clsx": "^2.1.0",
"csstype": "^3.1.3",
"prop-types": "^15.8.1"
},
"engines": {
"node": ">=12.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/mui-org"
},
"peerDependencies": {
"@emotion/react": "^11.5.0",
"@emotion/styled": "^11.3.0",
"@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0",
"react": "^17.0.0 || ^18.0.0 || ^19.0.0"
},
"peerDependenciesMeta": {
"@emotion/react": {
"optional": true
},
"@emotion/styled": {
"optional": true
},
"@types/react": {
"optional": true
}
}
},
"node_modules/@ironcalc/workbook/node_modules/@mui/utils": {
"version": "5.16.14",
"resolved": "https://registry.npmjs.org/@mui/utils/-/utils-5.16.14.tgz",
"integrity": "sha512-wn1QZkRzSmeXD1IguBVvJJHV3s6rxJrfb6YuC9Kk6Noh9f8Fb54nUs5JRkKm+BOerRhj5fLg05Dhx/H3Ofb8Mg==",
"dependencies": {
"@babel/runtime": "^7.23.9",
"@mui/types": "^7.2.15",
"@types/prop-types": "^15.7.12",
"clsx": "^2.1.1",
"prop-types": "^15.8.1",
"react-is": "^19.0.0"
},
"engines": {
"node": ">=12.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/mui-org"
},
"peerDependencies": {
"@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0",
"react": "^17.0.0 || ^18.0.0 || ^19.0.0"
},
"peerDependenciesMeta": {
"@types/react": {
"optional": true
}
}
},
"node_modules/@ironcalc/workbook/node_modules/lucide-react": {
"version": "0.427.0",
"resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-0.427.0.tgz",
"integrity": "sha512-lv9s6c5BDF/ccuA0EgTdskTxIe11qpwBDmzRZHJAKtp8LTewAvDvOM+pTES9IpbBuTqkjiMhOmGpJ/CB+mKjFw==",
"peerDependencies": {
"react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0-rc"
}
}, },
"node_modules/@jridgewell/gen-mapping": { "node_modules/@jridgewell/gen-mapping": {
"version": "0.3.8", "version": "0.3.8",
@@ -1906,6 +2118,9 @@
"npm": ">=6" "npm": ">=6"
} }
}, },
"node_modules/bindings/wasm/pkg": {
"extraneous": true
},
"node_modules/browserslist": { "node_modules/browserslist": {
"version": "4.24.4", "version": "4.24.4",
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.4.tgz", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.4.tgz",
@@ -2214,6 +2429,36 @@
"resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",
"integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="
}, },
"node_modules/html-parse-stringify": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/html-parse-stringify/-/html-parse-stringify-3.0.1.tgz",
"integrity": "sha512-KknJ50kTInJ7qIScF3jeaFRpMpE8/lfiTdzf/twXyPBLAGrLRTmkz3AdTnKeh40X8k9L2fdYwEp/42WGXIRGcg==",
"dependencies": {
"void-elements": "3.1.0"
}
},
"node_modules/i18next": {
"version": "23.16.8",
"resolved": "https://registry.npmjs.org/i18next/-/i18next-23.16.8.tgz",
"integrity": "sha512-06r/TitrM88Mg5FdUXAKL96dJMzgqLE5dv3ryBAra4KCwD9mJ4ndOTS95ZuymIGoE+2hzfdaMak2X11/es7ZWg==",
"funding": [
{
"type": "individual",
"url": "https://locize.com"
},
{
"type": "individual",
"url": "https://locize.com/i18next.html"
},
{
"type": "individual",
"url": "https://www.i18next.com/how-to/faq#i18next-is-awesome.-how-can-i-support-the-project"
}
],
"dependencies": {
"@babel/runtime": "^7.23.2"
}
},
"node_modules/import-fresh": { "node_modules/import-fresh": {
"version": "3.3.0", "version": "3.3.0",
"resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz",
@@ -2499,6 +2744,15 @@
"node": ">=0.10.0" "node": ">=0.10.0"
} }
}, },
"node_modules/react-colorful": {
"version": "5.6.1",
"resolved": "https://registry.npmjs.org/react-colorful/-/react-colorful-5.6.1.tgz",
"integrity": "sha512-1exovf0uGTGyq5mXQT0zgQ80uvj2PCwvF8zY1RN9/vbJVSjSo3fsB/4L3ObbF7u70NduSiK4xu4Y6q1MHoUGEw==",
"peerDependencies": {
"react": ">=16.8.0",
"react-dom": ">=16.8.0"
}
},
"node_modules/react-dom": { "node_modules/react-dom": {
"version": "18.3.1", "version": "18.3.1",
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz",
@@ -2511,6 +2765,27 @@
"react": "^18.3.1" "react": "^18.3.1"
} }
}, },
"node_modules/react-i18next": {
"version": "13.5.0",
"resolved": "https://registry.npmjs.org/react-i18next/-/react-i18next-13.5.0.tgz",
"integrity": "sha512-CFJ5NDGJ2MUyBohEHxljOq/39NQ972rh1ajnadG9BjTk+UXbHLq4z5DKEbEQBDoIhUmmbuS/fIMJKo6VOax1HA==",
"dependencies": {
"@babel/runtime": "^7.22.5",
"html-parse-stringify": "^3.0.1"
},
"peerDependencies": {
"i18next": ">= 23.2.3",
"react": ">= 16.8.0"
},
"peerDependenciesMeta": {
"react-dom": {
"optional": true
},
"react-native": {
"optional": true
}
}
},
"node_modules/react-is": { "node_modules/react-is": {
"version": "19.0.0", "version": "19.0.0",
"resolved": "https://registry.npmjs.org/react-is/-/react-is-19.0.0.tgz", "resolved": "https://registry.npmjs.org/react-is/-/react-is-19.0.0.tgz",
@@ -2810,6 +3085,14 @@
"vite": ">=2.6.0" "vite": ">=2.6.0"
} }
}, },
"node_modules/void-elements": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/void-elements/-/void-elements-3.1.0.tgz",
"integrity": "sha512-Dhxzh5HZuiHQhbvTW9AMetFfBHDMYpo23Uo9btPXgdYP+3T5S+p+jgNy7spra+veYhBP2dCSgxR/i2Y02h5/6w==",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/yallist": { "node_modules/yallist": {
"version": "3.1.1", "version": "3.1.1",
"resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",

View File

@@ -13,7 +13,7 @@
"dependencies": { "dependencies": {
"@emotion/react": "^11.14.0", "@emotion/react": "^11.14.0",
"@emotion/styled": "^11.14.0", "@emotion/styled": "^11.14.0",
"@ironcalc/ironcalc": "file:../../IronCalc", "@ironcalc/workbook": "^0.3.1",
"@mui/material": "^6.3.1", "@mui/material": "^6.3.1",
"lucide": "^0.469.0", "lucide": "^0.469.0",
"lucide-react": "^0.469.0", "lucide-react": "^0.469.0",

View File

@@ -0,0 +1,2 @@
"@ironcalc/ironcalc": "file:../../IronCalc",
"@ironcalc/workbook": "^0.3.1",

View File

@@ -17,7 +17,7 @@ import {
} from "./components/storage"; } from "./components/storage";
// From IronCalc // From IronCalc
import { IronCalc, IronCalcIcon, Model, init } from "@ironcalc/ironcalc"; import { IronCalc, IronCalcIcon, Model, init } from "@ironcalc/workbook";
function App() { function App() {
const [model, setModel] = useState<Model | null>(null); const [model, setModel] = useState<Model | null>(null);

View File

@@ -1,6 +1,6 @@
import styled from "@emotion/styled"; import styled from "@emotion/styled";
import type { Model } from "@ironcalc/ironcalc"; import type { Model } from "@ironcalc/workbook";
import { IronCalcIcon, IronCalcLogo } from "@ironcalc/ironcalc"; import { IronCalcIcon, IronCalcLogo } from "@ironcalc/workbook";
import { CircleCheck } from "lucide-react"; import { CircleCheck } from "lucide-react";
import { useRef, useState } from "react"; import { useRef, useState } from "react";
// import { IronCalcIcon, IronCalcLogo } from "./../icons"; // import { IronCalcIcon, IronCalcLogo } from "./../icons";

View File

@@ -1,4 +1,4 @@
import { Model } from "@ironcalc/ironcalc"; import { Model } from "@ironcalc/workbook";
import { base64ToBytes, bytesToBase64 } from "./util"; import { base64ToBytes, bytesToBase64 } from "./util";
const MAX_WORKBOOKS = 50; const MAX_WORKBOOKS = 50;