mirror of
https://github.com/usememos/memos.git
synced 2025-12-19 07:08:55 +08:00
Update MermaidBlock component to automatically adapt to light/dark theme changes, ensuring diagrams remain visually consistent with the app theme. Changes: - Add MutationObserver to watch for data-theme attribute changes - Map app themes to Mermaid themes (default-dark → dark, others → default) - Re-render diagrams automatically when theme switches - Maintain proper TypeScript typing for Mermaid theme values The component now responds instantly to theme changes, providing a seamless user experience when switching between light and dark modes or using "Sync with system" option. |
||
|---|---|---|
| .. | ||
| public | ||
| src | ||
| .gitignore | ||
| .prettierrc.js | ||
| components.json | ||
| eslint.config.mjs | ||
| index.html | ||
| MARKDOWN_STYLE_GUIDE.md | ||
| package.json | ||
| pnpm-lock.yaml | ||
| README.md | ||
| tsconfig.json | ||
| vite.config.mts | ||