Skip to content

Conversation

@typelets
Copy link
Owner

@typelets typelets commented Nov 3, 2025

Summary

Adds a Mermaid.js diagram editor as a first-class note type with interactive preview, zoom/pan controls, and export capabilities.

Features

Diagram Editor

  • Monaco code editor with live Mermaid preview (25/75 default split)
  • Auto-save (1.5s debounce), zoom (0.25x-3x), pan/drag navigation
  • Theme-aware rendering + print optimization (forces light mode)
  • Export: PNG (auto-crop), SVG, clipboard copy with visual confirmation
  • 6 professional templates: flowchart, sequence, class, state, gantt, pie

UI Integration

  • Create diagrams from notes panel (+ button → templates menu)
  • Cyan Network icon indicator in note cards
  • "Diagrams" filter option in filter dropdown
  • Full CRUD support (star, hide, archive, delete, move to folder)

Mobile App Improvements

  • Removed offline-first complexity (15+ files deleted)
  • Simplified to API-driven architecture with smart caching
  • Refactored screen structure for better maintainability

Backwards Compatibility

  • Existing notes without type field work as regular notes
  • Filter treats undefined type as non-diagram
  • No breaking changes to API contracts

Bundle Impact

  • DiagramEditor: ~50KB (lazy loaded)
  • Mermaid: ~200KB (lazy loaded)
  • Monaco: 3.6MB (already lazy loaded)

Testing

Manual testing completed:

  • ✅ Diagram creation from templates
  • ✅ Auto-save, export (PNG/SVG/clipboard)
  • ✅ Zoom/pan, theme switching, print
  • ✅ Filter functionality
  • ✅ CRUD operations
  • ✅ Mobile app navigation and caching

@typelets typelets self-assigned this Nov 3, 2025
@typelets typelets merged commit 0a73769 into main Nov 3, 2025
3 checks passed
@github-actions
Copy link
Contributor

github-actions bot commented Nov 3, 2025

🎉 This PR is included in version 1.33.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants