@opencor/opencor 0.20250822.1 → 0.20250826.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,7 @@
1
- import { c as ce, g as gl } from "./index-Bf8mb7fA.js";
1
+ var ce = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
2
+ function gl(n) {
3
+ return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
4
+ }
2
5
  var pl = typeof global == "object" && global && global.Object === Object && global, yo = typeof self == "object" && self && self.Object === Object && self, Zt = pl || yo || Function("return this")(), de = Zt.Symbol, ml = Object.prototype, vo = ml.hasOwnProperty, Eo = ml.toString, yr = de ? de.toStringTag : void 0;
3
6
  function Ao(n) {
4
7
  var t = vo.call(n, yr), e = n[yr];
@@ -7508,13 +7511,13 @@ A.register({
7508
7511
  "ui/color-picker": ho,
7509
7512
  "ui/tooltip": go
7510
7513
  }, !0);
7511
- const _g = Nt.AttributeMap, Sg = Nt.Op, Og = Nt.OpIterator;
7514
+ const Lg = Nt.AttributeMap, _g = Nt.Op, Sg = Nt.OpIterator;
7512
7515
  export {
7513
- _g as AttributeMap,
7516
+ Lg as AttributeMap,
7514
7517
  k as Delta,
7515
7518
  Xt as Module,
7516
- Sg as Op,
7517
- Og as OpIterator,
7519
+ _g as Op,
7520
+ Sg as OpIterator,
7518
7521
  Qh as Parchment,
7519
7522
  xe as Range,
7520
7523
  A as default
package/package.json CHANGED
@@ -24,7 +24,6 @@
24
24
  "combine"
25
25
  ],
26
26
  "license": "Apache-2.0",
27
- "main": "dist/opencor.umd.js",
28
27
  "module": "dist/opencor.es.js",
29
28
  "name": "@opencor/opencor",
30
29
  "productName": "OpenCOR",
@@ -37,12 +36,11 @@
37
36
  "exports": {
38
37
  ".": {
39
38
  "types": "./dist/index.d.ts",
40
- "import": "./dist/opencor.es.js",
41
- "require": "./dist/opencor.umd.js"
39
+ "import": "./dist/opencor.es.js"
42
40
  },
43
41
  "./style.css": "./dist/opencor.css"
44
42
  },
45
- "version": "0.20250822.1",
43
+ "version": "0.20250826.0",
46
44
  "peerDependencies": {
47
45
  "vue": "^3.4.21"
48
46
  },
@@ -54,8 +52,6 @@
54
52
  "@vueuse/core": "12.8.2",
55
53
  "js-cookie": "^3.0.5",
56
54
  "jsonschema": "^1.5.0",
57
- "mathjs": "^14.6.0",
58
- "plotly.js-gl2d-dist-min": "3.1.0",
59
55
  "primeicons": "^7.0.0",
60
56
  "primevue": "4.2.5",
61
57
  "quill": "^2.0.3",
@@ -72,7 +68,7 @@
72
68
  "@vue/eslint-config-typescript": "^14.6.0",
73
69
  "@vue/tsconfig": "^0.8.1",
74
70
  "autoprefixer": "^10.4.21",
75
- "eslint": "^9.33.0",
71
+ "eslint": "^9.34.0",
76
72
  "prettier": "^3.6.2",
77
73
  "unplugin-vue-components": "^29.0.0",
78
74
  "vite": "^7.1.3"
package/src/App.vue CHANGED
@@ -1,9 +1,7 @@
1
1
  <template>
2
- <div id="app" class="h-screen overflow-hidden">
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
- </div>
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" /> -->
9
7
  </template>
@@ -0,0 +1,21 @@
1
+ <template>
2
+ <div class="h-screen">
3
+ <Splitter class="h-full" layout="vertical">
4
+ <SplitterPanel class="flex items-center justify-center bg-blue-500" :size="15">Top panel...</SplitterPanel>
5
+ <SplitterPanel :size="50">
6
+ <Splitter>
7
+ <SplitterPanel class="flex items-center justify-center bg-red-500" :size="15">Left panel...</SplitterPanel>
8
+ <SplitterPanel :size="50">
9
+ <OpenCOR />
10
+ <!-- <OpenCOR omex="https://raw.githubusercontent.com/opencor/webapp/refs/heads/main/tests/models/lorenz.cellml" /> -->
11
+ <!-- <OpenCOR omex="https://raw.githubusercontent.com/opencor/webapp/refs/heads/main/tests/models/lorenz.omex" /> -->
12
+ <!-- <OpenCOR omex="https://raw.githubusercontent.com/opencor/webapp/refs/heads/main/tests/models/ui/lorenz.omex" /> -->
13
+ <!-- <OpenCOR omex="https://models.physiomeproject.org/workspace/b7c/rawfile/e0ae8d2d56aaaa091e23e1ee7e84cacbda1dfb6b/lorenz.omex" /> -->
14
+ </SplitterPanel>
15
+ <SplitterPanel class="flex items-center justify-center bg-red-500" :size="35">Right panel...</SplitterPanel>
16
+ </Splitter>
17
+ </SplitterPanel>
18
+ <SplitterPanel class="flex items-center justify-center bg-blue-500" :size="35">Bottom panel...</SplitterPanel>
19
+ </Splitter>
20
+ </div>
21
+ </template>
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <BlockUI id="blockUi" :blocked="!uiEnabled" class="h-full">
2
+ <BlockUI id="blockUi" :blocked="!uiEnabled" class="overflow-hidden" :style="blockUiStyle">
3
3
  <Toast id="toast" :pt:root:style="{ position: 'absolute' }" />
4
4
  <BackgroundComponent v-show="loadingOpencorMessageVisible || loadingModelMessageVisible || omex === undefined" />
5
5
  <BlockingMessageComponent message="Loading OpenCOR..." v-show="loadingOpencorMessageVisible" />
@@ -17,6 +17,7 @@
17
17
  <DragNDropComponent v-show="dragAndDropCounter > 0" />
18
18
  <div v-show="!electronApi && omex === undefined">
19
19
  <MainMenu
20
+ v-show="mainMenuVisible"
20
21
  :uiEnabled="compUiEnabled"
21
22
  :hasFiles="hasFiles"
22
23
  @about="onAbout"
@@ -546,6 +547,23 @@ electronApi?.onSelect((filePath: string) => {
546
547
 
547
548
  vueCommon.trackElementHeight('blockUi')
548
549
 
550
+ // Set the height of our block UI.
551
+
552
+ const blockUiStyle = vue.ref({})
553
+ const mainMenuVisible = vue.ref<boolean>(false)
554
+
555
+ vue.onMounted(() => {
556
+ // Set the height of our block UI to either '100vh' or '100%', depending on the height of our document element.
557
+
558
+ blockUiStyle.value =
559
+ window.getComputedStyle(document.documentElement).height === '0px' ? { height: '100vh' } : { height: '100%' }
560
+
561
+ // We have set the height of our block UI, so we can now safely show our main menu.
562
+ // Note: indeed, to properly determine the height of our document element, we must ensure that our own height is zero.
563
+
564
+ mainMenuVisible.value = true
565
+ })
566
+
549
567
  // If a COMBINE archive is provided then open it (and then the Simulation Experiment view will be shown in isolation) or
550
568
  // carry as normal (i.e. the whole OpenCOR UI will be shown).
551
569
 
@@ -34,7 +34,7 @@
34
34
  </template>
35
35
 
36
36
  <script setup lang="ts">
37
- import * as mathjs from 'mathjs'
37
+ import * as mathjs from 'https://cdn.jsdelivr.net/npm/mathjs@14.6.0/+esm'
38
38
  import * as vue from 'vue'
39
39
 
40
40
  import * as locCommon from '../../common/locCommon'
@@ -6,7 +6,7 @@
6
6
  </template>
7
7
 
8
8
  <script setup lang="ts">
9
- import Plotly from 'plotly.js-gl2d-dist-min'
9
+ import Plotly from 'https://cdn.jsdelivr.net/npm/plotly.js-gl2d-dist-min@3.1.0/+esm'
10
10
  import * as vue from 'vue'
11
11
 
12
12
  import * as vueCommon from '../../common/vueCommon'
package/src/main.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { createApp } from 'vue'
2
2
 
3
3
  import App from './App.vue'
4
+ // import App from './ContainerApp.vue'
4
5
 
5
6
  createApp(App).mount('#app')