fix: Mermaid Theme
This commit is contained in:
+1
-1
@@ -50,8 +50,8 @@
|
||||
"dependencies": {
|
||||
"@analytics/google-analytics": "^0.5.3",
|
||||
"@macfja/svelte-persistent-store": "^1.2.0",
|
||||
"daisyui": "^1.14.0",
|
||||
"analytics": "^0.7.14",
|
||||
"daisyui": "^1.14.0",
|
||||
"js-base64": "^3.7.0",
|
||||
"mermaid": "^8.12.1",
|
||||
"moment": "^2.29.1",
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
}
|
||||
|
||||
themeStore.subscribe(({ isDark }) => {
|
||||
editor && Monaco?.editor.setTheme(isDark ? 'vs-dark' : 'vs');
|
||||
editor && Monaco?.editor.setTheme(isDark ? 'mermaidTheme-dark' : 'mermaidTheme');
|
||||
});
|
||||
|
||||
const dispatch = createEventDispatcher<EditorEvents>();
|
||||
@@ -67,7 +67,7 @@
|
||||
text
|
||||
});
|
||||
});
|
||||
Monaco?.editor.setTheme($themeStore.isDark ? 'vs-dark' : 'vs');
|
||||
Monaco?.editor.setTheme($themeStore.isDark ? 'mermaidTheme-dark' : 'mermaidTheme');
|
||||
const resizeObserver = new ResizeObserver((entries) => {
|
||||
editor.layout({
|
||||
height: entries[0].contentRect.height,
|
||||
|
||||
@@ -365,9 +365,18 @@ export const initEditor = (monacoEditor): void => {
|
||||
}
|
||||
});
|
||||
|
||||
monacoEditor.editor.defineTheme('mermaidTheme-dark', {
|
||||
base: 'vs-dark',
|
||||
inherit: true,
|
||||
rules: [
|
||||
{ token: 'typeKeyword', foreground: '9650c8', fontStyle: 'bold' },
|
||||
{ token: 'transition', foreground: '008800', fontStyle: 'bold' }
|
||||
]
|
||||
});
|
||||
|
||||
monacoEditor.editor.defineTheme('mermaidTheme', {
|
||||
base: 'vs',
|
||||
inherit: false,
|
||||
inherit: true,
|
||||
rules: [
|
||||
{ token: 'typeKeyword', foreground: '9650c8', fontStyle: 'bold' },
|
||||
{ token: 'keyword', foreground: '649696' },
|
||||
|
||||
@@ -1694,6 +1694,14 @@ eslint-plugin-cypress@^2.11.3:
|
||||
dependencies:
|
||||
globals "^11.12.0"
|
||||
|
||||
eslint-plugin-es@^4.1.0:
|
||||
version "4.1.0"
|
||||
resolved "https://registry.yarnpkg.com/eslint-plugin-es/-/eslint-plugin-es-4.1.0.tgz#f0822f0c18a535a97c3e714e89f88586a7641ec9"
|
||||
integrity sha512-GILhQTnjYE2WorX5Jyi5i4dz5ALWxBIdQECVQavL6s7cI76IZTDWleTHkxz/QT3kvcs2QlGHvKLYsSlPOlPXnQ==
|
||||
dependencies:
|
||||
eslint-utils "^2.0.0"
|
||||
regexpp "^3.0.0"
|
||||
|
||||
eslint-plugin-mocha@^9.0.0:
|
||||
version "9.0.0"
|
||||
resolved "https://registry.npmjs.org/eslint-plugin-mocha/-/eslint-plugin-mocha-9.0.0.tgz"
|
||||
@@ -1740,7 +1748,7 @@ eslint-scope@^5.1.1:
|
||||
esrecurse "^4.3.0"
|
||||
estraverse "^4.1.1"
|
||||
|
||||
eslint-utils@^2.1.0:
|
||||
eslint-utils@^2.0.0, eslint-utils@^2.1.0:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz"
|
||||
integrity sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==
|
||||
@@ -3677,6 +3685,11 @@ reduce-css-calc@^2.1.8:
|
||||
css-unit-converter "^1.1.1"
|
||||
postcss-value-parser "^3.3.0"
|
||||
|
||||
regexpp@^3.0.0:
|
||||
version "3.2.0"
|
||||
resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2"
|
||||
integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==
|
||||
|
||||
regexpp@^3.1.0:
|
||||
version "3.1.0"
|
||||
resolved "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz"
|
||||
|
||||
Reference in New Issue
Block a user