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
5 changes: 5 additions & 0 deletions .changeset/visimer-package-bump.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@inkeep/open-knowledge": patch
---

Mermaid WYSIWYG rendering now depends on `@visimer/{core,dom}@0.1.0` instead of `@inkeep/mermaid-wysiwyg-{core,dom}@0.1.0`. The upstream project moved to a scoped package name; the published dist ships the fixes we previously patched in tree, so the local patch is dropped.
13 changes: 6 additions & 7 deletions THIRD_PARTY_NOTICES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6247,15 +6247,15 @@ Copyright (c) 1991 - 1995, Stichting Mathematisch Centrum Amsterdam,

The packages below are authored and published by Inkeep and are licensed under GPL-3.0-or-later, the same license as OpenKnowledge itself (see the repository LICENSE for the full text). They are listed for completeness; they are not third-party material.

### `@inkeep/mermaid-wysiwyg-core@0.1.0`
Homepage: https://github.com/inkeep/mermaid-wysiwyg#readme
### `@visimer/core@0.1.0`
Homepage: https://github.com/inkeep/visimer#readme

Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Copyright (c) 2026 Inkeep

### `@inkeep/mermaid-wysiwyg-dom@0.1.0`
Homepage: https://github.com/inkeep/mermaid-wysiwyg#readme
### `@visimer/dom@0.1.0`
Homepage: https://github.com/inkeep/visimer#readme

Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Copyright (c) 2026 Inkeep

---

Expand All @@ -6266,7 +6266,6 @@ The following MIT-licensed packages are patched in this repository via pnpm's `p
| Package | Patch file |
| --- | --- |
| `@handlewithcare/remark-prosemirror@0.1.5` | `patches/@handlewithcare%2Fremark-prosemirror@0.1.5.patch` |
| `@inkeep/mermaid-wysiwyg-dom@0.1.0` | `patches/@inkeep%2Fmermaid-wysiwyg-dom@0.1.0.patch` |
| `@pierre/trees@1.0.0-beta.4` | `patches/@pierre%2Ftrees@1.0.0-beta.4.patch` |
| `@tiptap/extension-drag-handle@3.22.3` | `patches/@tiptap%2Fextension-drag-handle@3.22.3.patch` |
| `@tiptap/y-tiptap@3.0.3` | `patches/@tiptap%2Fy-tiptap@3.0.3.patch` |
Expand Down
4 changes: 2 additions & 2 deletions packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@
"@lezer/markdown": "^1.6.3",
"@lingui/core": "^6.0.1",
"@lingui/react": "^6.0.1",
"@inkeep/mermaid-wysiwyg-core": "^0.1.0",
"@inkeep/mermaid-wysiwyg-dom": "^0.1.0",
"@visimer/core": "^0.1.0",
"@visimer/dom": "^0.1.0",
"@opentelemetry/api": "^1.9.0",
"@opentelemetry/exporter-trace-otlp-http": "^0.204.0",
"@opentelemetry/instrumentation": "^0.204.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/app/src/editor/components/Mermaid.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
*
* Same testing-library-free convention as Math.test.tsx: `renderToString`
* from `react-dom/server` is the substrate. Mermaid renders via `useEffect`
* + an async lazy import + the mermaid-wysiwyg canvas view, so under
* + an async lazy import + the visimer canvas view, so under
* `renderToString` the component lands in its initial placeholder state
* (the effect fires only on real mount). Live SVG output is exercised via
* the Playwright visual-regression suite; canvas behavior (selection,
* popovers, in-place edits) is owned by the `mermaid-wysiwyg` package's
* popovers, in-place edits) is owned by the `visimer` package's
* own test suite.
*/

Expand Down
15 changes: 6 additions & 9 deletions packages/app/src/editor/components/Mermaid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
* for documents without diagrams; cost at first diagram is ~150 KB
* gzipped (entry ~11 KB + lazy diagram-type chunks 24-45 KB each).
*
* Rendering + editing are delegated to `mermaid-wysiwyg`
* (`@inkeep/mermaid-wysiwyg-core` + `@inkeep/mermaid-wysiwyg-dom`): the canvas view
* Rendering + editing are delegated to `visimer`
* (`@visimer/core` + `@visimer/dom`): the canvas view
* renders through our own lazy `mermaid` instance (full fidelity, same
* theming as before), correlates the SVG back to source entities, and
* overlays interaction — click-select with a per-entity action popover
Expand Down Expand Up @@ -38,10 +38,10 @@
* container below.
*/

import type { MermaidWysiwygEditor } from '@inkeep/mermaid-wysiwyg-core';
import type { MermaidCanvasView } from '@inkeep/mermaid-wysiwyg-dom';
import { Trans, useLingui } from '@lingui/react/macro';
import type { default as PanZoomNS, PanzoomObject } from '@panzoom/panzoom';
import type { MermaidWysiwygEditor } from '@visimer/core';
import type { MermaidCanvasView } from '@visimer/dom';
import {
AlertTriangle,
ArrowDown,
Expand Down Expand Up @@ -125,13 +125,10 @@ function loadMermaid() {
}

let wysiwygPromise: Promise<
[typeof import('@inkeep/mermaid-wysiwyg-core'), typeof import('@inkeep/mermaid-wysiwyg-dom')]
[typeof import('@visimer/core'), typeof import('@visimer/dom')]
> | null = null;
function loadWysiwyg() {
wysiwygPromise ||= Promise.all([
import('@inkeep/mermaid-wysiwyg-core'),
import('@inkeep/mermaid-wysiwyg-dom'),
]).catch((err) => {
wysiwygPromise ||= Promise.all([import('@visimer/core'), import('@visimer/dom')]).catch((err) => {
wysiwygPromise = null;
throw err;
});
Expand Down
Loading