Skip to content

Commit ecdc140

Browse files
authored
Version 0.20251206.0.
2 parents 8d8c800 + 4ac65c6 commit ecdc140

File tree

8 files changed

+144
-138
lines changed

8 files changed

+144
-138
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"url": "git+https://github.com/opencor/webapp.git"
2424
},
2525
"type": "module",
26-
"version": "0.20251205.2",
26+
"version": "0.20251206.0",
2727
"scripts": {
2828
"archive:web": "bun src/renderer/scripts/archive.web.js",
2929
"build": "electron-vite build",

src/renderer/README.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,12 @@ There are two versions of OpenCOR:
77
1. **OpenCOR:** a desktop application that can be run on [Intel](https://en.wikipedia.org/wiki/List_of_Intel_processors)-based and [ARM](https://en.wikipedia.org/wiki/ARM_architecture_family)-based [Windows](https://en.wikipedia.org/wiki/Microsoft_Windows), [Linux](https://en.wikipedia.org/wiki/Linux), and [macOS](https://en.wikipedia.org/wiki/MacOS) machines; and
88
2. **OpenCOR's Web app:** a [Web app](https://en.wikipedia.org/wiki/Web_application) that can be run on a Web browser.
99

10-
This package is a [Vue 3](https://vuejs.org/) component for OpenCOR, built with the [Composition API](https://vuejs.org/guide/extras/composition-api-faq).
10+
Some characteristics of this package are that:
11+
- It is built as a [Vue 3](https://vuejs.org/) component using the [Composition API](https://vuejs.org/guide/extras/composition-api-faq).
12+
- It uses [PrimeVue](https://www.primefaces.org/primevue/) as its UI framework.
13+
- It uses [Tailwind CSS](https://tailwindcss.com/) for styling.
14+
- It can be used as a standalone Web app or embedded in a Vue 3 application.
15+
- It uses [CSS containment](https://developer.mozilla.org/en-US/docs/Web/CSS/Guides/Containment) to prevent CSS leakage when embedded in an application that uses a different UI framework.
1116

1217
## Usage
1318

@@ -36,7 +41,9 @@ When no `omex` prop is provided, the component gives access to all of OpenCOR's
3641

3742
```vue
3843
<template>
39-
<OpenCOR />
44+
<div style="height: 100vh; height: 100dvh;">
45+
<OpenCOR />
46+
</div>
4047
</template>
4148
4249
<script setup lang="ts">
@@ -53,7 +60,9 @@ When an `omex` prop is provided, the component goes straight into OpenCOR's simu
5360

5461
```vue
5562
<template>
56-
<OpenCOR omex="https://raw.githubusercontent.com/opencor/webapp/refs/heads/main/tests/models/ui/lorenz.omex" />
63+
<div style="height: 100vh; height: 100dvh;">
64+
<OpenCOR omex="https://raw.githubusercontent.com/opencor/webapp/refs/heads/main/tests/models/ui/lorenz.omex" />
65+
</div>
5766
</template>
5867
5968
<script setup lang="ts">

src/renderer/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
},
4040
"./style.css": "./dist/opencor.css"
4141
},
42-
"version": "0.20251205.2",
42+
"version": "0.20251206.0",
4343
"scripts": {
4444
"build": "vite build",
4545
"build:lib": "vite build --config vite.lib.config.ts && cp index.d.ts dist/index.d.ts",

src/renderer/src/App.vue

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
<template>
2-
<OpenCOR />
3-
<!-- <OpenCOR omex="https://raw.githubusercontent.com/opencor/webapp/refs/heads/main/tests/models/lorenz.cellml" /> -->
4-
<!-- <OpenCOR omex="https://raw.githubusercontent.com/opencor/webapp/refs/heads/main/tests/models/lorenz.omex" /> -->
5-
<!-- <OpenCOR omex="https://raw.githubusercontent.com/opencor/webapp/refs/heads/main/tests/models/ui/lorenz.omex" /> -->
6-
<!-- <OpenCOR omex="https://models.physiomeproject.org/workspace/b7c/rawfile/e0ae8d2d56aaaa091e23e1ee7e84cacbda1dfb6b/lorenz.omex" /> -->
7-
<!-- <OpenCOR :omex="rawLorenzOmexFile" /> -->
2+
<div class="h-screen">
3+
<OpenCOR />
4+
<!-- <OpenCOR omex="https://raw.githubusercontent.com/opencor/webapp/refs/heads/main/tests/models/lorenz.cellml" /> -->
5+
<!-- <OpenCOR omex="https://raw.githubusercontent.com/opencor/webapp/refs/heads/main/tests/models/lorenz.omex" /> -->
6+
<!-- <OpenCOR omex="https://raw.githubusercontent.com/opencor/webapp/refs/heads/main/tests/models/ui/lorenz.omex" /> -->
7+
<!-- <OpenCOR omex="https://models.physiomeproject.org/workspace/b7c/rawfile/e0ae8d2d56aaaa091e23e1ee7e84cacbda1dfb6b/lorenz.omex" /> -->
8+
<!-- <OpenCOR :omex="rawLorenzOmexFile" /> -->
9+
</div>
810
</template>
911

1012
<!-- <script setup lang="ts">

src/renderer/src/components/ContentsComponent.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
:width="width"
1313
:height="height"
1414
:isActive="isActive"
15-
:interactiveEnabled="interactiveEnabled"
15+
:uiEnabled="uiEnabled"
1616
:file="fileTab.file"
1717
:isActiveFile="fileTab.file.path() === activeFile"
1818
:simulationOnly="simulationOnly"
@@ -66,7 +66,7 @@
6666
:width="width"
6767
:height="heightMinusFileTablist"
6868
:isActive="isActive"
69-
:interactiveEnabled="interactiveEnabled"
69+
:uiEnabled="uiEnabled"
7070
:file="fileTab.file"
7171
:isActiveFile="fileTab.file.path() === activeFile"
7272
:uiJson="fileTab.uiJson"
@@ -97,8 +97,8 @@ const props = defineProps<{
9797
width: number;
9898
height: number;
9999
isActive: boolean;
100-
interactiveEnabled: boolean;
101100
simulationOnly?: boolean;
101+
uiEnabled: boolean;
102102
}>();
103103
defineExpose({ openFile, closeCurrentFile, closeAllFiles, hasFile, hasFiles, selectFile });
104104
@@ -266,7 +266,7 @@ vue.onMounted(() => {
266266
267267
if (common.isDesktop()) {
268268
vueusecore.onKeyStroke((event: KeyboardEvent) => {
269-
if (!props.isActive || !props.interactiveEnabled || fileTabs.value.length === 0) {
269+
if (!props.isActive || !props.uiEnabled || fileTabs.value.length === 0) {
270270
return;
271271
}
272272

src/renderer/src/components/MainMenu.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ import * as common from '../common/common';
3333
3434
const props = defineProps<{
3535
isActive: boolean;
36-
interactiveEnabled: boolean;
3736
hasFiles: boolean;
37+
uiEnabled: boolean;
3838
}>();
3939
4040
const emit = defineEmits([
@@ -191,7 +191,7 @@ vue.onMounted(() => {
191191
192192
if (common.isDesktop()) {
193193
vueusecore.onKeyStroke((event: KeyboardEvent) => {
194-
if (!props.isActive || !props.interactiveEnabled) {
194+
if (!props.isActive || !props.uiEnabled) {
195195
return;
196196
}
197197

0 commit comments

Comments
 (0)