diff --git a/cypress/snapshots.js b/cypress/snapshots.js index 6f6a02aa..e4c22f2d 100644 --- a/cypress/snapshots.js +++ b/cypress/snapshots.js @@ -16,7 +16,7 @@ module.exports = { "1": "{\"code\":\"graph TD\\n A[Party] -->|Get money| B(Go shopping!!)\\n \",\"mermaid\":\"{\\n \\\"theme\\\": \\\"forest\\\",\\n \\\"test\\\": \\\"hello world\\\"\\n}\",\"updateEditor\":false,\"autoSync\":true,\"updateDiagram\":true,\"loader\":{\"type\":\"files\",\"config\":{\"codeURL\":\"https://gist.githubusercontent.com/sidharthv96/6268a23e673a533dcb198f241fd7012a/raw/4eb03887e6a41397e80bdcdbf94017c498f8f1e2/code.mmd\",\"configURL\":\"https://gist.githubusercontent.com/sidharthv96/6268a23e673a533dcb198f241fd7012a/raw/4eb03887e6a41397e80bdcdbf94017c498f8f1e2/config.json\"}}}" } }, - "__version": "8.5.0", + "__version": "8.7.0", "Auto sync tests": { "should dim diagram when code is edited": { "1": "{\"code\":\"graph TD\\n A[Christmas] -->|Get money| B(Go shopping)\\n B --> C{Let me think}\\n C -->|One| D[Laptop]\\n C -->|Two| E[iPhone]\\n C -->|Three| F[fa:fa-car Car]\\n C --> Test\",\"mermaid\":\"{\\n \\\"theme\\\": \\\"default\\\"\\n}\",\"updateEditor\":false,\"autoSync\":false,\"updateDiagram\":false}" diff --git a/package.json b/package.json index 8f222814..ec793970 100644 --- a/package.json +++ b/package.json @@ -57,6 +57,7 @@ "mermaid": "8.13.3", "moment": "^2.29.1", "monaco-editor": "^0.29.1", + "monaco-mermaid": "^1.0.1", "random-word-slugs": "^0.1.5" }, "lint-staged": { diff --git a/src/lib/components/editor/editor.svelte b/src/lib/components/editor/editor.svelte index 949ad654..536bb427 100644 --- a/src/lib/components/editor/editor.svelte +++ b/src/lib/components/editor/editor.svelte @@ -4,7 +4,7 @@ import { themeStore } from '$lib/util/theme'; import type monaco from 'monaco-editor'; import { createEventDispatcher, onMount } from 'svelte'; - import { initEditor } from './util'; + import initEditor from 'monaco-mermaid'; let divEl: HTMLDivElement = null; let editor: monaco.editor.IStandaloneCodeEditor;