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
4 changes: 2 additions & 2 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": "1.20261105.0",
"version": "1.20261105.1",
"engines": {
"bun": ">=1.2.0"
},
Expand Down Expand Up @@ -54,7 +54,7 @@
},
"devDependencies": {
"@biomejs/biome": "^2.6.5",
"@celldl/editor": "^0.20261029.0",
"@celldl/editor": "^0.20261105.0",
"@celldl/rdf": "^1.20260822.0",
"@electron-toolkit/tsconfig": "^2.0.0",
"@electron-toolkit/utils": "^4.0.0",
Expand Down
4 changes: 2 additions & 2 deletions src/renderer/bun.lock

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

9 changes: 9 additions & 0 deletions src/renderer/changelog.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
[
{
"version": "1.20261105.1",
"changes": [
{
"type": "improved",
"description": "Switching between CellDL files no longer loses their selection, zoom, scroll position, undo history, etc."
}
]
},
{
"version": "1.20261105.0",
"changes": [
Expand Down
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": "1.20261105.0",
"version": "1.20261105.1",
"libopencorVersion": "1.20261029.0",
"scripts": {
"build": "vite build && bun scripts/generate.version.ts",
Expand All @@ -63,7 +63,7 @@
},
"devDependencies": {
"@biomejs/biome": "^2.6.5",
"@celldl/editor": "^0.20261029.0",
"@celldl/editor": "^0.20261105.0",
"@celldl/rdf": "^1.20260822.0",
"@opencor/libopencor-types": "^1.20261029.0",
"@physiomelinks/bg2cellml": "^0.6.2",
Expand Down
10 changes: 5 additions & 5 deletions src/renderer/scripts/celldl.plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ import type { Plugin } from 'vite';
// Note: CellDL Editor's stylesheet has some global rules that target PrimeVue's components (e.g.,
// `.p-checkbox-checked .p-checkbox-icon { color: red !important; }`) or generic class names (e.g., `.error`),
// which would otherwise affect the rest of OpenCOR (see https://github.com/CellDL/CellDLEditor/issues/9). So, we
// scope those rules to the elements in which our CellDL Editor can be (see CellDLEditorView.vue and
// CellDLEditorHostComponent.vue). We leave alone the rules that only target CellDL Editor's own elements (incl.
// tippy.js' tooltips, which are appended to the document body), its icons (incl. PrimeIcons, which we also use),
// or its CSS variables, as well as the rules in Tailwind CSS' layers (i.e. Tailwind CSS' variables and standard
// scope those rules to CellDL Editor's root element, which has the `celldl-editor` class. We leave alone the
// rules that only target CellDL Editor's own elements (incl. tippy.js' tooltips, which are appended to the
// document body, and its diagram, which is in a shadow tree), its icons (incl. PrimeIcons, which we also use), or
// its CSS variables, as well as the rules in Tailwind CSS' layers (i.e. Tailwind CSS' variables and standard
// utility classes, e.g., `.hidden`, which, being layered, lose to any unlayered rule) and in keyframes. Our
// plugin must be enforced as 'pre', so that it processes CellDL Editor's stylesheet before Vite does.

const CELLDL_EDITOR_CSS = '/@celldl/editor/dist/';
const CELLDL_EDITOR_SCOPE = '.celldl-editor';
const UNSCOPED_SELECTOR =
/^(:root|\[data-tippy-root\]|\.tippy-|\.tooltip-|\.pi\b|\.pi-|\.ci\b|\.ci-|\.lucide|#celldl-|\.celldl-|#svg-container|#status-)/;
/^(:root|\[data-tippy-root\]|\.tippy-|\.tooltip-|\.pi\b|\.pi-|\.ci\b|\.ci-|\.lucide|#celldl-|\.celldl-|:host\b)/;

export const scopeCellDLEditorCssPlugin = (): Plugin => {
return {
Expand Down
Loading
Loading