From d14f13ab4fd608045add415c360b0c6da6c6a6f8 Mon Sep 17 00:00:00 2001 From: Alan Garny Date: Mon, 12 Jan 2026 11:00:29 +1300 Subject: [PATCH 1/3] New version. --- package.json | 2 +- src/renderer/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 512fe9a3..a4019acc 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "url": "git+https://github.com/opencor/webapp.git" }, "type": "module", - "version": "0.20260110.1", + "version": "0.20260112.0", "scripts": { "archive:web": "bun src/renderer/scripts/archive.web.js", "build": "electron-vite build", diff --git a/src/renderer/package.json b/src/renderer/package.json index 0d914c4c..623b5937 100644 --- a/src/renderer/package.json +++ b/src/renderer/package.json @@ -39,7 +39,7 @@ }, "./style.css": "./dist/opencor.css" }, - "version": "0.20260110.1", + "version": "0.20260112.0", "scripts": { "build": "vite build", "build:lib": "vite build --config vite.lib.config.ts && cp index.d.ts dist/index.d.ts", From c969e3d0cf1c341400ab71930186a9623c448da2 Mon Sep 17 00:00:00 2001 From: Alan Garny Date: Mon, 12 Jan 2026 11:01:02 +1300 Subject: [PATCH 2/3] Updated our dependencies. --- bun.lock | 8 ++++---- package.json | 4 ++-- src/renderer/bun.lock | 4 ++-- src/renderer/package.json | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/bun.lock b/bun.lock index aec39fbf..cbb1b6f9 100644 --- a/bun.lock +++ b/bun.lock @@ -13,7 +13,7 @@ "primeicons": "^7.0.0", "primevue": "4.2.5", "quill": "^2.0.3", - "systeminformation": "^5.30.2", + "systeminformation": "^5.30.3", "ua-parser-js": "^2.0.7", "vue": "3.4.21", }, @@ -24,7 +24,7 @@ "@tailwindcss/postcss": "^4.1.18", "@tailwindcss/vite": "^4.1.18", "@types/crypto-js": "^4.2.2", - "@types/node": "^24.10.6", + "@types/node": "^24.10.7", "@types/plotly.js": "3.0.3", "@vitejs/plugin-vue": "^6.0.3", "@vue/tsconfig": "^0.8.1", @@ -383,7 +383,7 @@ "@types/ms": ["@types/ms@2.1.0", "", {}, "sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA=="], - "@types/node": ["@types/node@24.10.6", "", { "dependencies": { "undici-types": "~7.16.0" } }, "sha512-B8h60xgJMR/xmgyX9fncRzEW9gCxoJjdenUhke2v1JGOd/V66KopmWrLPXi5oUI4VuiGK+d+HlXJjDRZMj21EQ=="], + "@types/node": ["@types/node@24.10.7", "", { "dependencies": { "undici-types": "~7.16.0" } }, "sha512-+054pVMzVTmRQV8BhpGv3UyfZ2Llgl8rdpDTon+cUH9+na0ncBVXj3wTUKh14+Kiz18ziM3b4ikpP5/Pc0rQEQ=="], "@types/plist": ["@types/plist@3.0.5", "", { "dependencies": { "@types/node": "*", "xmlbuilder": ">=11.0.1" } }, "sha512-E6OCaRmAe4WDmWNsL/9RMqdkkzDCY1etutkflWk4c+AcjDU07Pcz1fQwTX0TQz+Pxqn9i4L1TU3UFpjnrcDgxA=="], @@ -1207,7 +1207,7 @@ "svg-tags": ["svg-tags@1.0.0", "", {}, "sha512-ovssysQTa+luh7A5Weu3Rta6FJlFBBbInjOh722LIt6klpU2/HtdUbszju/G4devcvk8PGt7FCLv5wftu3THUA=="], - "systeminformation": ["systeminformation@5.30.2", "", { "os": "!aix", "bin": { "systeminformation": "lib/cli.js" } }, "sha512-Rrt5oFTWluUVuPlbtn3o9ja+nvjdF3Um4DG0KxqfYvpzcx7Q9plZBTjJiJy9mAouua4+OI7IUGBaG9Zyt9NgxA=="], + "systeminformation": ["systeminformation@5.30.3", "", { "os": "!aix", "bin": { "systeminformation": "lib/cli.js" } }, "sha512-NgHJUpA+y7j4asLQa9jgBt+Eb2piyQIXQ+YjOyd2K0cHNwbNJ6I06F5afOqOiaCuV/wrEyGrb0olg4aFLlJD+A=="], "table": ["table@6.9.0", "", { "dependencies": { "ajv": "^8.0.1", "lodash.truncate": "^4.4.2", "slice-ansi": "^4.0.0", "string-width": "^4.2.3", "strip-ansi": "^6.0.1" } }, "sha512-9kY+CygyYM6j02t5YFHbNz2FN5QmYGv9zAjVp4lCDjlCw7amdckXlEt/bjMhUIfj4ThGRE4gCUH5+yGnNuPo5A=="], diff --git a/package.json b/package.json index a4019acc..082e32a4 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,7 @@ "primeicons": "^7.0.0", "primevue": "4.2.5", "quill": "^2.0.3", - "systeminformation": "^5.30.2", + "systeminformation": "^5.30.3", "ua-parser-js": "^2.0.7", "vue": "3.4.21" }, @@ -66,7 +66,7 @@ "@tailwindcss/postcss": "^4.1.18", "@tailwindcss/vite": "^4.1.18", "@types/crypto-js": "^4.2.2", - "@types/node": "^24.10.6", + "@types/node": "^24.10.7", "@types/plotly.js": "3.0.3", "@vitejs/plugin-vue": "^6.0.3", "@vue/tsconfig": "^0.8.1", diff --git a/src/renderer/bun.lock b/src/renderer/bun.lock index e5bd1b21..a03bca15 100644 --- a/src/renderer/bun.lock +++ b/src/renderer/bun.lock @@ -21,7 +21,7 @@ "@tailwindcss/postcss": "^4.1.18", "@tailwindcss/vite": "^4.1.18", "@types/crypto-js": "^4.2.2", - "@types/node": "^24.10.6", + "@types/node": "^24.10.7", "@types/plotly.js": "3.0.6", "@vitejs/plugin-vue": "^6.0.3", "@vue/tsconfig": "^0.8.1", @@ -280,7 +280,7 @@ "@types/estree": ["@types/estree@1.0.8", "", {}, "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w=="], - "@types/node": ["@types/node@24.10.6", "", { "dependencies": { "undici-types": "~7.16.0" } }, "sha512-B8h60xgJMR/xmgyX9fncRzEW9gCxoJjdenUhke2v1JGOd/V66KopmWrLPXi5oUI4VuiGK+d+HlXJjDRZMj21EQ=="], + "@types/node": ["@types/node@24.10.7", "", { "dependencies": { "undici-types": "~7.16.0" } }, "sha512-+054pVMzVTmRQV8BhpGv3UyfZ2Llgl8rdpDTon+cUH9+na0ncBVXj3wTUKh14+Kiz18ziM3b4ikpP5/Pc0rQEQ=="], "@types/plotly.js": ["@types/plotly.js@3.0.6", "", {}, "sha512-K+EhZsMUZ2Zjna5gaDOaEfdwKLtHUT7sSsBw2gbRT2mOLWVl9pI4FF8EDH2ytNAdgM/Gh6UhgfRiAtHfDAcY5g=="], diff --git a/src/renderer/package.json b/src/renderer/package.json index 623b5937..630afc28 100644 --- a/src/renderer/package.json +++ b/src/renderer/package.json @@ -72,7 +72,7 @@ "@tailwindcss/postcss": "^4.1.18", "@tailwindcss/vite": "^4.1.18", "@types/crypto-js": "^4.2.2", - "@types/node": "^24.10.6", + "@types/node": "^24.10.7", "@types/plotly.js": "3.0.6", "@vitejs/plugin-vue": "^6.0.3", "@vue/tsconfig": "^0.8.1", From 252ff4e5b501c24c450db8a3512414ef4251573b Mon Sep 17 00:00:00 2001 From: Alan Garny Date: Mon, 12 Jan 2026 11:00:20 +1300 Subject: [PATCH 3/3] TS: some minor cleaning up. --- .../views/SimulationExperimentView.vue | 22 ++++++++++++++----- src/renderer/src/libopencor/locApi.ts | 2 ++ src/renderer/src/libopencor/locUiJsonApi.ts | 4 ++-- 3 files changed, 20 insertions(+), 8 deletions(-) diff --git a/src/renderer/src/components/views/SimulationExperimentView.vue b/src/renderer/src/components/views/SimulationExperimentView.vue index eb5c5666..f0ee7977 100644 --- a/src/renderer/src/components/views/SimulationExperimentView.vue +++ b/src/renderer/src/components/views/SimulationExperimentView.vue @@ -70,15 +70,15 @@
@@ -88,7 +88,7 @@
, instanceTask: locSedA parameters.value.sort((parameter1: string, parameter2: string) => parameter1.localeCompare(parameter2)); } +// Type guards. + +function isScalarInput(input: locApi.IUiJsonInput): input is locApi.IUiJsonScalarInput { + return 'maximumValue' in input && 'minimumValue' in input; +} + +function isDiscreteInput(input: locApi.IUiJsonInput): input is locApi.IUiJsonDiscreteInput { + return 'possibleValues' in input; +} + // Standard mode. const standardDocument = props.file.document(); diff --git a/src/renderer/src/libopencor/locApi.ts b/src/renderer/src/libopencor/locApi.ts index 293a1ca8..1eb369bb 100644 --- a/src/renderer/src/libopencor/locApi.ts +++ b/src/renderer/src/libopencor/locApi.ts @@ -161,6 +161,7 @@ export { export { type IUiJson, + type IUiJsonDiscreteInput, type IUiJsonDiscreteInputPossibleValue, type IUiJsonInput, type IUiJsonOutput, @@ -168,6 +169,7 @@ export { type IUiJsonOutputPlot, type IUiJsonOutputPlotAdditionalTrace, type IUiJsonParameter, + type IUiJsonScalarInput, uiJsonIssues } from './locUiJsonApi.ts'; diff --git a/src/renderer/src/libopencor/locUiJsonApi.ts b/src/renderer/src/libopencor/locUiJsonApi.ts index ee1f88e3..ecd4711a 100644 --- a/src/renderer/src/libopencor/locUiJsonApi.ts +++ b/src/renderer/src/libopencor/locUiJsonApi.ts @@ -12,7 +12,7 @@ export interface IUiJson { export type IUiJsonInput = IUiJsonDiscreteInput | IUiJsonScalarInput; -interface IUiJsonDiscreteInput { +export interface IUiJsonDiscreteInput { defaultValue: number; id: string; name: string; @@ -25,7 +25,7 @@ export interface IUiJsonDiscreteInputPossibleValue { value: number; } -interface IUiJsonScalarInput { +export interface IUiJsonScalarInput { defaultValue: number; id: string; maximumValue: number;