{"_id":"@aether-labs/vitepress-mermaid","_rev":"4-4d08b722dc2f610e79940e62c583b2ee","name":"@aether-labs/vitepress-mermaid","dist-tags":{"latest":"0.1.3"},"versions":{"0.1.0":{"name":"@aether-labs/vitepress-mermaid","version":"0.1.0","license":"MIT","_id":"@aether-labs/vitepress-mermaid@0.1.0","maintainers":[{"name":"linshuohao","email":"1138674510@qq.com"}],"bin":{"aether-vitepress-mermaid":"dist/cli/index.js"},"dist":{"shasum":"a53ea80dd212646d736a4edc64b5de0182c7db5f","tarball":"https://registry.npmjs.org/@aether-labs/vitepress-mermaid/-/vitepress-mermaid-0.1.0.tgz","fileCount":79,"integrity":"sha512-qu2InvJssDVKsIZJd7BWD6d2QIR2icv2tqm85CdXTajEWrPOesgok5NbEdEig3dwrL4dVLlc6VEyhIXgBvJE0Q==","signatures":[{"sig":"MEYCIQCro5d6X54kjqY9V+vVWrs6Dh9Bw6facpFSNkIZTpYi+AIhAJ0Hon4BSJtl+xJlhSbyGsE7VWoaKZmwKZ06NpjFlSXa","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":92726},"type":"module","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/auto/index.js"},"./plugin":{"types":"./dist/plugin/index.d.ts","import":"./dist/plugin/index.js"},"./runtime":{"types":"./dist/runtime/index.d.ts","import":"./dist/runtime/index.js"},"./style.css":"./dist/style.css"},"gitHead":"4be86fb4541322735634cbd1ff04407f29de41d4","scripts":{"dev":"vitepress dev playground/docs","test":"vitest run","build":"pnpm build:ts && pnpm build:css","build:ts":"tsup && vue-tsc -p tsconfig.build.json","build:css":"mkdir -p dist && cp src/styles/index.css dist/style.css","typecheck":"vue-tsc --noEmit","test:watch":"vitest","prepublishOnly":"pnpm typecheck && pnpm test && pnpm build"},"_npmUser":{"name":"linshuohao","email":"1138674510@qq.com"},"_npmVersion":"11.16.0","description":"Zero-config Mermaid support for VitePress.","directories":{},"sideEffects":["./dist/style.css","./dist/runtime/index.css"],"_nodeVersion":"24.18.0","dependencies":{"magic-string":"^0.30.0"},"_hasShrinkwrap":false,"devDependencies":{"vue":"latest","tsup":"latest","jsdom":"^29.1.1","eslint":"latest","vitest":"latest","vue-tsc":"latest","prettier":"latest","vitepress":"latest","typescript":"latest","@types/node":"latest","markdown-it":"latest","unplugin-vue":"latest","@vue/test-utils":"latest","@types/markdown-it":"^14.1.2","@vitejs/plugin-vue":"latest"},"peerDependencies":{"vue":"^3.4.0 || ^3.5.0","mermaid":"^10.0.0 || ^11.0.0","vitepress":"^1.0.0 || ^2.0.0-alpha.0"},"_npmOperationalInternal":{"tmp":"tmp/vitepress-mermaid_0.1.0_1783493857890_0.32580611922533365","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@aether-labs/vitepress-mermaid","version":"0.1.1","license":"MIT","_id":"@aether-labs/vitepress-mermaid@0.1.1","maintainers":[{"name":"linshuohao","email":"1138674510@qq.com"}],"bin":{"aether-vitepress-mermaid":"dist/cli/index.js"},"dist":{"shasum":"48eb81cf386a456d0349d2f541cad9f44f447e1a","tarball":"https://registry.npmjs.org/@aether-labs/vitepress-mermaid/-/vitepress-mermaid-0.1.1.tgz","fileCount":79,"integrity":"sha512-lUlM2oncLtYA1EObdwYCQYfYx8mDOvgPvMxn3Ar2iirqv0tE9rZ/FIVBEJDGZOebSotPxQ78H6VXCu3tFB3Q6w==","signatures":[{"sig":"MEQCIGJZN2a1Sa9HjZcL5pnEBnx4NrnYW22xtZ5ZQF8nkrQ0AiAu63DukU3S29xoiuXDPmFuLqaCTR7lmireLrj0pEFq8Q==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":92726},"type":"module","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/auto/index.js"},"./plugin":{"types":"./dist/plugin/index.d.ts","import":"./dist/plugin/index.js"},"./runtime":{"types":"./dist/runtime/index.d.ts","import":"./dist/runtime/index.js"},"./style.css":"./dist/style.css"},"gitHead":"a43ff34e236cc6dfaf201e2dab565047d81e2539","scripts":{"dev":"vitepress dev playground/docs","test":"vitest run","build":"pnpm build:ts && pnpm build:css","build:ts":"tsup && vue-tsc -p tsconfig.build.json","build:css":"mkdir -p dist && cp src/styles/index.css dist/style.css","typecheck":"vue-tsc --noEmit","test:watch":"vitest","prepublishOnly":"pnpm typecheck && pnpm test && pnpm build"},"_npmUser":{"name":"linshuohao","email":"1138674510@qq.com"},"_npmVersion":"11.16.0","description":"Zero-config Mermaid support for VitePress.","directories":{},"sideEffects":["./dist/style.css","./dist/runtime/index.css"],"_nodeVersion":"24.18.0","dependencies":{"magic-string":"^0.30.0"},"_hasShrinkwrap":false,"devDependencies":{"vue":"latest","tsup":"latest","jsdom":"^29.1.1","eslint":"latest","vitest":"latest","vue-tsc":"latest","prettier":"latest","vitepress":"latest","typescript":"latest","@types/node":"latest","markdown-it":"latest","unplugin-vue":"latest","@vue/test-utils":"latest","@types/markdown-it":"^14.1.2","@vitejs/plugin-vue":"latest"},"peerDependencies":{"vue":"^3.4.0 || ^3.5.0","mermaid":"^10.0.0 || ^11.0.0","vitepress":"^1.0.0 || ^2.0.0-alpha.0"},"_npmOperationalInternal":{"tmp":"tmp/vitepress-mermaid_0.1.1_1783494258344_0.9618140793614725","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@aether-labs/vitepress-mermaid","version":"0.1.2","license":"MIT","_id":"@aether-labs/vitepress-mermaid@0.1.2","maintainers":[{"name":"linshuohao","email":"1138674510@qq.com"}],"bin":{"aether-vitepress-mermaid":"dist/cli/index.js"},"dist":{"shasum":"47691513ed37c855e70a80d355bc4bf4086cca35","tarball":"https://registry.npmjs.org/@aether-labs/vitepress-mermaid/-/vitepress-mermaid-0.1.2.tgz","fileCount":79,"integrity":"sha512-Z/DX+agPsNd0uZ6pIUHRLwsol2sSJJYsWTlt2JeqPkdHbMvqvlkP6xFXAWWu7bzrQ6fzN5ddzT155PvVglSQ0w==","signatures":[{"sig":"MEUCIDO4wi4WQz1yROnlmGMjxF/MjTJNv7XRQditSjcyGocoAiEAlovyxHjUU2asqQagGT7kjOaLeYWf1idTURJWn9fhdnU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":92721},"type":"module","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./plugin":{"types":"./dist/plugin/index.d.ts","import":"./dist/plugin/index.js"},"./runtime":{"types":"./dist/runtime/index.d.ts","import":"./dist/runtime/index.js"},"./style.css":"./dist/style.css"},"gitHead":"3fa1d38c05074c561c606409263f275cad9a3d53","scripts":{"dev":"vitepress dev playground/docs","test":"vitest run","build":"pnpm build:ts && pnpm build:css","build:ts":"tsup && vue-tsc -p tsconfig.build.json","build:css":"mkdir -p dist && cp src/styles/index.css dist/style.css","typecheck":"vue-tsc --noEmit","test:watch":"vitest","prepublishOnly":"pnpm typecheck && pnpm test && pnpm build"},"_npmUser":{"name":"linshuohao","email":"1138674510@qq.com"},"_npmVersion":"11.16.0","description":"Zero-config Mermaid support for VitePress.","directories":{},"sideEffects":["./dist/style.css","./dist/runtime/index.css"],"_nodeVersion":"24.18.0","dependencies":{"magic-string":"^0.30.0"},"_hasShrinkwrap":false,"devDependencies":{"vue":"latest","tsup":"latest","jsdom":"^29.1.1","eslint":"latest","vitest":"latest","vue-tsc":"latest","prettier":"latest","vitepress":"latest","typescript":"latest","@types/node":"latest","markdown-it":"latest","unplugin-vue":"latest","@vue/test-utils":"latest","@types/markdown-it":"^14.1.2","@vitejs/plugin-vue":"latest"},"peerDependencies":{"vue":"^3.4.0 || ^3.5.0","mermaid":"^10.0.0 || ^11.0.0","vitepress":"^1.0.0 || ^2.0.0-alpha.0"},"_npmOperationalInternal":{"tmp":"tmp/vitepress-mermaid_0.1.2_1783496102190_0.000373243004283097","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@aether-labs/vitepress-mermaid","version":"0.1.3","description":"Zero-config Mermaid support for VitePress.","type":"module","license":"MIT","bin":{"aether-vitepress-mermaid":"dist/cli/index.js"},"sideEffects":["./dist/style.css","./dist/runtime/index.css"],"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./plugin":{"types":"./dist/plugin/index.d.ts","import":"./dist/plugin/index.js"},"./runtime":{"types":"./dist/runtime/index.d.ts","import":"./dist/runtime/index.js"},"./style.css":"./dist/style.css"},"scripts":{"dev":"vitepress dev playground/docs","build":"pnpm build:ts && pnpm build:css","build:ts":"tsup && vue-tsc -p tsconfig.build.json","build:css":"mkdir -p dist && cp src/styles/index.css dist/style.css","typecheck":"vue-tsc --noEmit","test":"vitest run","test:watch":"vitest","prepublishOnly":"pnpm typecheck && pnpm test && pnpm build"},"peerDependencies":{"mermaid":"^10.0.0 || ^11.0.0","vitepress":"^1.0.0 || ^2.0.0-alpha.0","vue":"^3.4.0 || ^3.5.0"},"dependencies":{"magic-string":"^0.30.0"},"devDependencies":{"@types/markdown-it":"^14.1.2","@types/node":"latest","@vitejs/plugin-vue":"latest","@vue/test-utils":"latest","eslint":"latest","jsdom":"^29.1.1","markdown-it":"latest","prettier":"latest","tsup":"latest","typescript":"latest","unplugin-vue":"latest","vitepress":"latest","vitest":"latest","vue":"latest","vue-tsc":"latest"},"gitHead":"7e7a2fd8db6f661294c2cb1f160e1753f5def5fa","_id":"@aether-labs/vitepress-mermaid@0.1.3","_nodeVersion":"24.18.0","_npmVersion":"11.16.0","dist":{"integrity":"sha512-VUn4IhtFjT8NKQGTzg2rPrjYN48xBf9uV7i0HLKN4KpUj+fNg3j2LZdRM4glyjhVADlpiD8OTMj1h8MAvd4M7g==","shasum":"ffa10f50b439d04a6f805dcbb141284a23a66f41","tarball":"https://registry.npmjs.org/@aether-labs/vitepress-mermaid/-/vitepress-mermaid-0.1.3.tgz","fileCount":81,"unpackedSize":100170,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIB4Z8wwmE4N7DtbnozkGB4lnQPN1EPcNz+5lwQLnLhIkAiEArSthyL/CKwVN9jcwtMQgjew5VgAIP84wEOtf3xqS59s="}]},"_npmUser":{"name":"linshuohao","email":"1138674510@qq.com"},"directories":{},"maintainers":[{"name":"linshuohao","email":"1138674510@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/vitepress-mermaid_0.1.3_1783496952268_0.8464726918800993"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-08T06:57:37.761Z","modified":"2026-07-08T07:49:12.525Z","0.1.0":"2026-07-08T06:57:38.014Z","0.1.1":"2026-07-08T07:04:18.484Z","0.1.2":"2026-07-08T07:35:02.321Z","0.1.3":"2026-07-08T07:49:12.395Z"},"license":"MIT","description":"Zero-config Mermaid support for VitePress.","maintainers":[{"name":"linshuohao","email":"1138674510@qq.com"}],"readme":"# @aether-labs/vitepress-mermaid\n\nZero-config Mermaid support for VitePress.\n\n## Features\n\n- Standard ````mermaid` fenced code blocks\n- Client-first and SSR-safe rendering\n- Lazy import of `mermaid`\n- Dark mode re-rendering through VitePress `isDark`\n- Error fallback with source display\n- Does not override normal Shiki-powered code blocks\n- CLI init for the closest possible “zero-config” setup\n\n## Quick Start\n\n```bash\npnpm add -D @aether-labs/vitepress-mermaid mermaid\npnpm exec aether-vitepress-mermaid init\n```\n\nThen write Mermaid in Markdown:\n\n````md\n```mermaid\nflowchart TD\n  A[Markdown] --> B[VitePress]\n  B --> C[Mermaid SVG]\n```\n````\n\n## Manual Setup\n\nOnly `withMermaid` in config is required for Mermaid to work. The wrapper also registers the `MermaidDiagram` Vue component automatically.\n\n`.vitepress/config.ts`:\n\n```ts\nimport { defineConfig } from 'vitepress'\nimport { withMermaid } from '@aether-labs/vitepress-mermaid'\n\nexport default withMermaid(\n  defineConfig({\n    title: 'My Docs'\n  })\n)\n```\n\n`.vitepress/theme/index.ts` (optional — only needed if you want explicit theme-level control):\n\n```ts\nimport DefaultTheme from 'vitepress/theme'\nimport { withMermaidTheme } from '@aether-labs/vitepress-mermaid/runtime'\n\nexport default withMermaidTheme(DefaultTheme)\n```\n\n`withMermaidTheme` is optional when you already use `withMermaid` in config. Use it if you prefer wiring the runtime in theme, or if you need to combine it with other `enhanceApp` customizations.\n\n## Options\n\n```ts\nwithMermaid(defineConfig({}), {\n  markdown: {\n    languages: ['mermaid'],\n    defaultMeta: {\n      showSource: false,\n      interactive: false\n    }\n  }\n})\n```\n\nRuntime options can be passed through `withMermaid` (recommended) or the theme layer:\n\n```ts\nwithMermaid(defineConfig({}), {\n  runtime: {\n    securityLevel: 'strict',\n    theme: {\n      light: 'default',\n      dark: 'dark'\n    }\n  }\n})\n```\n\nOr via theme:\n\n```ts\nexport default withMermaidTheme(DefaultTheme, {\n  securityLevel: 'strict',\n  theme: {\n    light: 'default',\n    dark: 'dark'\n  }\n})\n```\n\n## Fence Meta\n\n````md\n```mermaid title=\"架构图\" showSource\nflowchart TD\n  A --> B\n```\n````\n\nSupported in v0.1 skeleton:\n\n- `title=\"...\"`\n- `showSource`\n- `interactive`\n\n## FAQ\n\n### Why not work after install only?\n\nVitePress does not auto-discover npm plugins. Run `pnpm exec aether-vitepress-mermaid init`, or manually wrap your config with `withMermaid`.\n\n### Why do I see \"Failed to resolve component: MermaidDiagram\"?\n\nThis means the Markdown plugin is active (mermaid fences are being converted), but the Vue component was not registered. Ensure your `.vitepress/config.ts` uses `withMermaid(...)`. If you are on an older version, upgrade to the latest package — or add `withMermaidTheme` in `.vitepress/theme/index.ts` as shown in Manual Setup.\n\n### Why client-first?\n\nMermaid rendering depends on browser DOM behavior. The package outputs `<ClientOnly>` by default and renders SVG after mount.\n\n### Why is Mermaid a peer dependency?\n\nThe host project already controls its VitePress/Vue stack, and Mermaid versions change quickly. Keeping Mermaid as a peer dependency avoids duplicate installs and version conflicts.\n","readmeFilename":"README.md"}