Skip to content

Build your personal knowledge base with Trilium Notes

refactor(mermaid): move into own directory

Elian Doran069d8b1ae4df
diff --git a/apps/client/src/widgets/note_types.tsx b/apps/client/src/widgets/note_types.tsx
index 433841fc03..b80d4d545e 100644
--- a/apps/client/src/widgets/note_types.tsx
+++ b/apps/client/src/widgets/note_types.tsx
@@ -84,7 +84,7 @@ export const TYPE_MAPPINGS: Record<ExtendedNoteType, NoteTypeMapping> = {
printable: true
},
mermaid: {
- view: () => import("./type_widgets/Mermaid"),
+ view: () => import("./type_widgets/mermaid/Mermaid"),
className: "note-detail-mermaid",
printable: true,
isFullHeight: true
diff --git a/apps/client/src/widgets/type_widgets/Mermaid.tsx b/apps/client/src/widgets/type_widgets/mermaid/Mermaid.tsx
similarity index 84%
rename from apps/client/src/widgets/type_widgets/Mermaid.tsx
rename to apps/client/src/widgets/type_widgets/mermaid/Mermaid.tsx
index 3d47d25fac..0339e48936 100644
--- a/apps/client/src/widgets/type_widgets/Mermaid.tsx
+++ b/apps/client/src/widgets/type_widgets/mermaid/Mermaid.tsx
@@ -1,9 +1,9 @@
import { useCallback } from "preact/hooks";
-import { getMermaidConfig, loadElkIfNeeded, postprocessMermaidSvg } from "../../services/mermaid";
-import NoteContentSwitcher from "../layout/NoteContentSwitcher";
-import SvgSplitEditor from "./helpers/SvgSplitEditor";
-import { TypeWidgetProps } from "./type_widget";
+import { getMermaidConfig, loadElkIfNeeded, postprocessMermaidSvg } from "../../../services/mermaid";
+import NoteContentSwitcher from "../../layout/NoteContentSwitcher";
+import SvgSplitEditor from "../helpers/SvgSplitEditor";
+import { TypeWidgetProps } from "../type_widget";
let idCounter = 1;
let registeredErrorReporter = false;