memos/web
Claude 6fb7520518
feat(web): add theme-aware Mermaid diagram rendering
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.
2025-11-09 06:07:18 +00:00
..
public chore: enhance site.webmanifest in firefox (#4828) 2025-07-08 19:56:46 +08:00
src feat(web): add theme-aware Mermaid diagram rendering 2025-11-09 06:07:18 +00:00
.gitignore chore: update gitignore 2025-04-17 23:11:36 +08:00
.prettierrc.js
components.json feat: themes (#4824) 2025-07-07 20:13:22 +08:00
eslint.config.mjs refactor: migrate eslint 2025-04-01 00:04:43 +08:00
index.html chore: remove fixed theme color 2025-07-15 23:26:07 +08:00
MARKDOWN_STYLE_GUIDE.md chore: remove unused syntax 2025-10-27 08:31:57 +08:00
package.json chore: remove unused syntax 2025-10-27 08:31:57 +08:00
pnpm-lock.yaml chore: remove unused syntax 2025-10-27 08:31:57 +08:00
README.md
tsconfig.json
vite.config.mts refactor: update markdown parser 2025-10-26 11:28:40 +08:00

The frontend of Memos