From c88304ba96399a028e14caa801a80a0cfc552c85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Hatcher?= Date: Sat, 18 Jan 2025 00:54:29 +0100 Subject: [PATCH] FIX: Fixes from "the big split" --- bindings/wasm/Cargo.toml | 2 +- webapp/IronCalc/package-lock.json | 10 +- webapp/IronCalc/package.json | 12 +- webapp/IronCalc/package.json.patch | 2 + .../frontend/package-lock.json | 295 +++++++++++++++++- webapp/app.ironcalc.com/frontend/package.json | 2 +- .../frontend/package.json.patch | 2 + webapp/app.ironcalc.com/frontend/src/App.tsx | 2 +- .../frontend/src/components/FileBar.tsx | 4 +- .../frontend/src/components/storage.ts | 2 +- 10 files changed, 311 insertions(+), 22 deletions(-) create mode 100644 webapp/IronCalc/package.json.patch create mode 100644 webapp/app.ironcalc.com/frontend/package.json.patch diff --git a/bindings/wasm/Cargo.toml b/bindings/wasm/Cargo.toml index 3a9a522..e929a24 100644 --- a/bindings/wasm/Cargo.toml +++ b/bindings/wasm/Cargo.toml @@ -4,7 +4,7 @@ version = "0.3.0" authors = ["Nicolas Hatcher "] description = "IronCalc Web bindings" license = "MIT/Apache-2.0" -repository = "https://github.com/ironcalc/web-bindings" +repository = "https://github.com/ironcalc/ironcalc" edition = "2021" [lib] diff --git a/webapp/IronCalc/package-lock.json b/webapp/IronCalc/package-lock.json index e52916a..ef6f0a2 100644 --- a/webapp/IronCalc/package-lock.json +++ b/webapp/IronCalc/package-lock.json @@ -1,16 +1,16 @@ { - "name": "ironcalc", - "version": "0.3.0", + "name": "@ironcalc/workbook", + "version": "0.3.1", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "ironcalc", - "version": "0.3.0", + "name": "@ironcalc/workbook", + "version": "0.3.1", "dependencies": { "@emotion/react": "^11.11.4", "@emotion/styled": "^11.11.5", - "@ironcalc/wasm": "file:../../bindings/wasm/pkg", + "@ironcalc/wasm": "^0.3.0", "@mui/material": "^5.15.15", "i18next": "^23.11.1", "lucide-react": "^0.427.0", diff --git a/webapp/IronCalc/package.json b/webapp/IronCalc/package.json index 2450d3c..4750d94 100644 --- a/webapp/IronCalc/package.json +++ b/webapp/IronCalc/package.json @@ -1,7 +1,6 @@ { - "name": "ironcalc", - "private": true, - "version": "0.3.0", + "name": "@ironcalc/workbook", + "version": "0.3.1", "type": "module", "main": "./dist/ironcalc.js", "module": "./dist/ironcalc.js", @@ -17,7 +16,7 @@ "dependencies": { "@emotion/react": "^11.11.4", "@emotion/styled": "^11.11.5", - "@ironcalc/wasm": "file:../../bindings/wasm/pkg", + "@ironcalc/wasm": "^0.3.0", "@mui/material": "^5.15.15", "i18next": "^23.11.1", "lucide-react": "^0.427.0", @@ -42,5 +41,8 @@ "@types/react": { "optional": true } - } + }, + "files": [ + "dist" + ] } diff --git a/webapp/IronCalc/package.json.patch b/webapp/IronCalc/package.json.patch new file mode 100644 index 0000000..9b3e2c5 --- /dev/null +++ b/webapp/IronCalc/package.json.patch @@ -0,0 +1,2 @@ +"@ironcalc/wasm": "^0.3.0", +"@ironcalc/wasm": "file:../../bindings/wasm/pkg", \ No newline at end of file diff --git a/webapp/app.ironcalc.com/frontend/package-lock.json b/webapp/app.ironcalc.com/frontend/package-lock.json index d8a8f8d..64a0251 100644 --- a/webapp/app.ironcalc.com/frontend/package-lock.json +++ b/webapp/app.ironcalc.com/frontend/package-lock.json @@ -10,7 +10,7 @@ "dependencies": { "@emotion/react": "^11.14.0", "@emotion/styled": "^11.14.0", - "@ironcalc/ironcalc": "file:../../IronCalc", + "@ironcalc/workbook": "^0.3.1", "@mui/material": "^6.3.1", "lucide": "^0.469.0", "lucide-react": "^0.469.0", @@ -28,12 +28,13 @@ } }, "../../IronCalc": { - "name": "ironcalc", + "name": "@ironcalc/workbook", "version": "0.3.0", + "extraneous": true, "dependencies": { "@emotion/react": "^11.11.4", "@emotion/styled": "^11.11.5", - "@ironcalc/wasm": "file:../../bindings/wasm/pkg", + "@ironcalc/wasm": "^0.3.0", "@mui/material": "^5.15.15", "i18next": "^23.11.1", "lucide-react": "^0.427.0", @@ -1023,9 +1024,220 @@ "node": ">=18" } }, - "node_modules/@ironcalc/ironcalc": { - "resolved": "../../IronCalc", - "link": true + "node_modules/@ironcalc/wasm": { + "version": "0.3.0", + "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": { "version": "0.3.8", @@ -1906,6 +2118,9 @@ "npm": ">=6" } }, + "node_modules/bindings/wasm/pkg": { + "extraneous": true + }, "node_modules/browserslist": { "version": "4.24.4", "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", "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": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", @@ -2499,6 +2744,15 @@ "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": { "version": "18.3.1", "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", @@ -2511,6 +2765,27 @@ "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": { "version": "19.0.0", "resolved": "https://registry.npmjs.org/react-is/-/react-is-19.0.0.tgz", @@ -2810,6 +3085,14 @@ "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": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", diff --git a/webapp/app.ironcalc.com/frontend/package.json b/webapp/app.ironcalc.com/frontend/package.json index 2dd6502..45955ad 100644 --- a/webapp/app.ironcalc.com/frontend/package.json +++ b/webapp/app.ironcalc.com/frontend/package.json @@ -13,7 +13,7 @@ "dependencies": { "@emotion/react": "^11.14.0", "@emotion/styled": "^11.14.0", - "@ironcalc/ironcalc": "file:../../IronCalc", + "@ironcalc/workbook": "^0.3.1", "@mui/material": "^6.3.1", "lucide": "^0.469.0", "lucide-react": "^0.469.0", diff --git a/webapp/app.ironcalc.com/frontend/package.json.patch b/webapp/app.ironcalc.com/frontend/package.json.patch new file mode 100644 index 0000000..b32afdd --- /dev/null +++ b/webapp/app.ironcalc.com/frontend/package.json.patch @@ -0,0 +1,2 @@ +"@ironcalc/ironcalc": "file:../../IronCalc", +"@ironcalc/workbook": "^0.3.1", \ No newline at end of file diff --git a/webapp/app.ironcalc.com/frontend/src/App.tsx b/webapp/app.ironcalc.com/frontend/src/App.tsx index 92c70e0..d2c72fc 100644 --- a/webapp/app.ironcalc.com/frontend/src/App.tsx +++ b/webapp/app.ironcalc.com/frontend/src/App.tsx @@ -17,7 +17,7 @@ import { } from "./components/storage"; // From IronCalc -import { IronCalc, IronCalcIcon, Model, init } from "@ironcalc/ironcalc"; +import { IronCalc, IronCalcIcon, Model, init } from "@ironcalc/workbook"; function App() { const [model, setModel] = useState(null); diff --git a/webapp/app.ironcalc.com/frontend/src/components/FileBar.tsx b/webapp/app.ironcalc.com/frontend/src/components/FileBar.tsx index c1d4802..b929f20 100644 --- a/webapp/app.ironcalc.com/frontend/src/components/FileBar.tsx +++ b/webapp/app.ironcalc.com/frontend/src/components/FileBar.tsx @@ -1,6 +1,6 @@ import styled from "@emotion/styled"; -import type { Model } from "@ironcalc/ironcalc"; -import { IronCalcIcon, IronCalcLogo } from "@ironcalc/ironcalc"; +import type { Model } from "@ironcalc/workbook"; +import { IronCalcIcon, IronCalcLogo } from "@ironcalc/workbook"; import { CircleCheck } from "lucide-react"; import { useRef, useState } from "react"; // import { IronCalcIcon, IronCalcLogo } from "./../icons"; diff --git a/webapp/app.ironcalc.com/frontend/src/components/storage.ts b/webapp/app.ironcalc.com/frontend/src/components/storage.ts index d1f3125..7e9a5e3 100644 --- a/webapp/app.ironcalc.com/frontend/src/components/storage.ts +++ b/webapp/app.ironcalc.com/frontend/src/components/storage.ts @@ -1,4 +1,4 @@ -import { Model } from "@ironcalc/ironcalc"; +import { Model } from "@ironcalc/workbook"; import { base64ToBytes, bytesToBase64 } from "./util"; const MAX_WORKBOOKS = 50;