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
24 changes: 12 additions & 12 deletions bun.lock

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

4 changes: 2 additions & 2 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.20260303.0",
"version": "0.20260303.1",
"engines": {
"bun": ">=1.2.0"
},
Expand Down Expand Up @@ -63,7 +63,7 @@
"xxhash-wasm": "^1.1.0"
},
"devDependencies": {
"@biomejs/biome": "^2.4.4",
"@biomejs/biome": "^2.4.5",
"@electron-toolkit/tsconfig": "^2.0.0",
"@electron-toolkit/utils": "^4.0.0",
"@tailwindcss/postcss": "^4.2.1",
Expand Down
24 changes: 12 additions & 12 deletions src/renderer/bun.lock

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

7 changes: 2 additions & 5 deletions src/renderer/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import { Component } from 'vue';
export { IOpenCORProps, Theme } from './index.ts';

import { IOpenCORProps } from './index.ts';
export { IOpenCORProps };

export declare const OpenCOR: Component<IOpenCORProps>;
export declare const OpenCOR: import('vue').Component<IOpenCORProps>;
export default OpenCOR;
5 changes: 1 addition & 4 deletions src/renderer/index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
import OpenCOR from './src/components/OpenCOR.vue';

export type Theme = 'light' | 'dark' | 'system';

export interface IOpenCORProps {
omex?: string | Uint8Array;
theme?: Theme;
}

export { OpenCOR };
export default OpenCOR;
export { default, default as OpenCOR } from './src/components/OpenCOR.vue';
4 changes: 2 additions & 2 deletions src/renderer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
},
"./style.css": "./dist/opencor.css"
},
"version": "0.20260303.0",
"version": "0.20260303.1",
"scripts": {
"build": "vite build && bun scripts/generate.version.js",
"build:lib": "vite build --config vite.lib.config.ts && bun scripts/copy.indexdts.js",
Expand Down Expand Up @@ -74,7 +74,7 @@
"xxhash-wasm": "^1.1.0"
},
"devDependencies": {
"@biomejs/biome": "^2.4.4",
"@biomejs/biome": "^2.4.5",
"@tailwindcss/postcss": "^4.2.1",
"@tailwindcss/vite": "^4.2.1",
"@types/node": "^25.3.3",
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
</template>

<style>
@import "tailwindcss/preflight.css" layer(base);
@import "tailwindcss/preflight.css" layer(base);
</style>
2 changes: 1 addition & 1 deletion src/renderer/src/AppWithMultipleInstances.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@
</template>

<style>
@import "tailwindcss/preflight.css" layer(base);
@import "tailwindcss/preflight.css" layer(base);
</style>
2 changes: 1 addition & 1 deletion src/renderer/src/AppWithOmex.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
</template>

<style>
@import "tailwindcss/preflight.css" layer(base);
@import "tailwindcss/preflight.css" layer(base);
</style>
2 changes: 1 addition & 1 deletion src/renderer/src/AppWithRawOmex.vue
Original file line number Diff line number Diff line change
Expand Up @@ -143,5 +143,5 @@ const rawLorenzOmexFile = vue.ref<Uint8Array>(
</script>

<style>
@import "tailwindcss/preflight.css" layer(base);
@import "tailwindcss/preflight.css" layer(base);
</style>
31 changes: 31 additions & 0 deletions src/renderer/src/AppWithSimulationData.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<template>
<OpenCOR ref="opencorRef" omex="https://raw.githubusercontent.com/opencor/webapp/refs/heads/main/tests/models/ui/lorenz.omex" />
</template>

<script setup lang="ts">
import * as vue from 'vue';

import OpenCOR from './components/OpenCOR.vue';

const opencorRef = vue.ref<InstanceType<typeof OpenCOR> | null>(null);

vue.onMounted(() => {
if (opencorRef.value) {
for (const modelParameter of ['VOI', 'main/t', 'main/x', 'main/y', 'main/z', 'unknown']) {
opencorRef.value
.simulationData(modelParameter)
.then((simulationData: Float64Array) => {
console.log(`Simulation data for "${modelParameter}":`);
console.log(simulationData);
})
.catch((error) => {
console.error(error);
});
}
}
});
</script>

<style>
@import "tailwindcss/preflight.css" layer(base);
</style>
2 changes: 1 addition & 1 deletion src/renderer/src/AppWithinContainers.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@
</template>

<style>
@import "tailwindcss/preflight.css" layer(base);
@import "tailwindcss/preflight.css" layer(base);
</style>
1 change: 1 addition & 0 deletions src/renderer/src/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export const NO_DELAY: number = 0;
export const SHORT_DELAY: number = 69;
export const MEDIUM_DELAY: number = 169;
export const LONG_DELAY: number = 369;
export const HUGE_DELAY: number = 969;

export const TOAST_LIFE: number = 3000;

Expand Down
2 changes: 1 addition & 1 deletion src/renderer/src/common/vueCommon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import type { Theme } from '../../index.ts';

export const activeInstanceUid = vueusecore.createGlobalState(() => vue.ref<string | null>(null));

// Theme composable to know whether OpenCOR uses light mode, dark mode, or system mode.
// A composable to know whether OpenCOR uses light mode, dark mode, or system mode.

export const useTheme = vueusecore.createGlobalState(() => {
const prefersColorScheme = window.matchMedia('(prefers-color-scheme: light)');
Expand Down
Loading