Files
openidea/package.json
l0ng-ai 75c88a993f feat(markdown): Render Mermaid diagrams in the preview
Fenced ```mermaid blocks in the Markdown preview are drawn as diagrams.
The mermaid library is loaded on demand, only for previews that contain
a diagram, and renders with securityLevel "strict". Diagram colours come
from the theme tokens and are redrawn when the theme changes.

A block with a syntax error keeps its source visible and shows the
parser message below it. Results are cached per source and theme, so
edits elsewhere in the file don't redraw diagrams, and an edited diagram
keeps its previous drawing until the new one is ready.

Fixes #79

Claude-Session: https://claude.ai/code/session_01VUYsdXA2nkF5v6zsC93dpn
2026-10-27 16:22:28 +08:00

83 lines
2.7 KiB
JSON

{
"name": "openidea",
"private": true,
"description": "An open-source IDE inspired by IntelliJ IDEA",
"version": "0.1.16",
"license": "Apache-2.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc --noEmit && vite build",
"preview": "vite preview",
"tauri": "tauri",
"test": "vitest run",
"test:watch": "vitest",
"lint": "eslint .",
"format": "prettier --write .",
"typecheck": "tsc --noEmit && tsc -p tsconfig.node.json --noEmit && tsc -p perf --noEmit && tsc -p scripts --noEmit",
"gen:bindings": "cargo test -p openidea --test export_bindings",
"gen:theme-docs": "node scripts/theme/gen-docs.ts",
"theme:import-intellij": "node scripts/theme/import-intellij-theme.ts",
"dev:app": "tauri dev --config src-tauri/tauri.dev.conf.json",
"e2e": "playwright test",
"perf": "node perf/run.ts",
"perf:rust": "node perf/rust.ts"
},
"dependencies": {
"@codemirror/autocomplete": "^6.20.3",
"@codemirror/commands": "^6.11.1",
"@codemirror/language": "^6.13.1",
"@codemirror/language-data": "^6.5.2",
"@codemirror/lint": "^6.9.7",
"@codemirror/merge": "^6.12.2",
"@codemirror/search": "^6.7.2",
"@codemirror/state": "^6.7.6",
"@codemirror/view": "^6.43.14",
"@floating-ui/react-dom": "^2.1.9",
"@fontsource-variable/inter": "^5.3.0",
"@fontsource-variable/jetbrains-mono": "^5.3.0",
"@lezer/highlight": "^1.2.5",
"@replit/codemirror-vim": "6.4.0",
"@tanstack/react-virtual": "^3.14.21",
"@tauri-apps/api": "^2",
"@tauri-apps/plugin-dialog": "^2.8.3",
"@tauri-apps/plugin-opener": "^2",
"@xterm/addon-fit": "^0.11.0",
"@xterm/addon-search": "^0.16.0",
"@xterm/xterm": "^6.0.0",
"anser": "^2.3.5",
"clsx": "^2.1.1",
"codemirror": "^6.0.2",
"dompurify": "^3.4.17",
"emmet": "2.4.11",
"immer": "^11.1.21",
"marked": "^18.1.1",
"mermaid": "12.1.0",
"react": "^19.1.0",
"react-dom": "^19.1.0",
"react-resizable-panels": "^4.14.6",
"zustand": "^5.0.15"
},
"devDependencies": {
"@eslint/js": "^10.0.1",
"@playwright/test": "^1.64.1",
"@tauri-apps/cli": "^2",
"@testing-library/jest-dom": "^7.0.1",
"@testing-library/react": "^16.3.3",
"@testing-library/user-event": "^14.6.8",
"@types/dompurify": "^3.2.0",
"@types/node": "^26.6.5",
"@types/react": "^19.1.8",
"@types/react-dom": "^19.1.6",
"@vitejs/plugin-react": "^6.0.2",
"eslint": "^10.13.0",
"eslint-plugin-react-hooks": "^7.1.1",
"jsdom": "^30.1.3",
"prettier": "^3.9.10",
"typescript": "~6.0.3",
"typescript-eslint": "^8.71.2",
"vite": "^8.0.16",
"vitest": "^5.0.5"
}
}