Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions electron.vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/// <reference types="node" />

import * as primeVueAutoImportResolver from '@primevue/auto-import-resolver';
import tailwindcssPlugin from '@tailwindcss/vite';
import vuePlugin from '@vitejs/plugin-vue';
Expand Down Expand Up @@ -25,6 +27,10 @@ export default electronVite.defineConfig({
build: {
target: 'esnext'
},
define: {
__OPENCOR_DEV__:
((process as unknown as { env?: { NODE_ENV?: string } }).env?.NODE_ENV ?? 'development') !== 'production'
},
envDir: path.join(import.meta.dirname, 'src/renderer'),
optimizeDeps: {
esbuildOptions: {
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"url": "git+https://github.com/opencor/webapp.git"
},
"type": "module",
"version": "0.20260314.0",
"version": "0.20260317.0",
"engines": {
"bun": ">=1.2.0"
},
Expand Down Expand Up @@ -64,7 +64,7 @@
"xxhash-wasm": "^1.1.0"
},
"devDependencies": {
"@biomejs/biome": "^2.4.6",
"@biomejs/biome": "^2.4.7",
"@electron-toolkit/tsconfig": "^2.0.0",
"@electron-toolkit/utils": "^4.0.0",
"@tailwindcss/postcss": "^4.2.1",
Expand All @@ -76,7 +76,7 @@
"@wasm-fmt/clang-format": "^22.1.1",
"autoprefixer": "^10.4.27",
"cmake-js": "^8.0.0",
"electron": "^40.8.2",
"electron": "^41.0.2",
"electron-builder": "^26.8.1",
"electron-conf": "^1.3.0",
"electron-updater": "^6.8.3",
Expand Down
10 changes: 10 additions & 0 deletions src/renderer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,14 @@ import '@opencor/opencor/style.css';
</script>
```

- **Exposed methods:**

OpenCOR always exposes the following methods, which only have an effect when an `omex` prop is provided:

- `trackSimulationData(modelParameters: string[])`: adds the given parameter names to the list of tracked simulation data.
- `untrackSimulationData(modelParameters: string[])`: removes the given parameter names from the list of tracked simulation data.
- `untrackAllSimulationData()`: clears the list of tracked simulation data.

A parameter name is a string that identifies a parameter in the model and consists of the component in which the parameter is located and the name of the parameter itself, separated by a slash. For instance, `main/x` identifies the `x` parameter in the `main` component.

[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/opencor/webapp)
Loading
Loading