Files
Mermix/package.json
Aleksey Shakhmatov bbc12ee4be feat(optimize): Diagram Doctor panel to declutter tangled flowcharts
Add an Optimize side panel that analyses the active flowchart and applies
one-click, reversible source rewrites to make dense graphs readable.

- optimize.ts: pure, label-aware flowchart parser + metrics, a 0-100
  readability score, and transforms — ELK layered layout, node/rank
  spacing + curved edges, de-emphasising cross-cutting hub edges
  (event bus / audit / cost-style fan-ins), duplicate-edge removal,
  direction toggle, and a non-destructive focus variant.
- mermaid.ts: register @mermaid-js/layout-elk so `layout: elk` renders.
- OptimizePanel.svelte + Toolbar toggle; panels are mutually exclusive.
- Preview: render the focus variant when a node is spotlighted, with a
  clear-focus pill.
- store/Editor: applySource() bumps a revision so programmatic rewrites
  re-sync CodeMirror and stay undoable with the editor's history.
2026-05-22 20:11:49 +03:00

40 lines
1.1 KiB
JSON

{
"name": "mermix",
"version": "0.1.0",
"description": "Cross-platform Mermaid diagram editor & viewer with Git-backed projects",
"type": "module",
"scripts": {
"dev": "vite",
"build": "svelte-check --tsconfig ./tsconfig.json && vite build",
"preview": "vite preview",
"check": "svelte-check --tsconfig ./tsconfig.json",
"tauri": "tauri",
"app:dev": "tauri dev",
"app:build": "tauri build"
},
"dependencies": {
"@codemirror/autocomplete": "^6.18.0",
"@codemirror/commands": "^6.6.0",
"@codemirror/language": "^6.10.2",
"@codemirror/lint": "^6.8.0",
"@codemirror/state": "^6.4.1",
"@codemirror/view": "^6.28.0",
"@lezer/highlight": "^1.2.0",
"@mermaid-js/layout-elk": "^0.2.1",
"@tauri-apps/api": "^2.0.0",
"@tauri-apps/plugin-dialog": "^2.0.0",
"codemirror": "^6.0.1",
"mermaid": "^11.2.0"
},
"devDependencies": {
"@sveltejs/vite-plugin-svelte": "^4.0.0",
"@tauri-apps/cli": "^2.0.0",
"@tsconfig/svelte": "^5.0.4",
"svelte": "^5.1.0",
"svelte-check": "^4.0.0",
"tslib": "^2.7.0",
"typescript": "^5.6.0",
"vite": "^5.4.0"
}
}