{"_id":"@axis-love/mermaid","_rev":"4-607ec44d11281ce1b8723a40fbedcc3f","name":"@axis-love/mermaid","dist-tags":{"rc":"0.1.0-rc.1","latest":"0.2.0"},"versions":{"0.1.0-rc.0":{"name":"@axis-love/mermaid","version":"0.1.0-rc.0","license":"MIT","_id":"@axis-love/mermaid@0.1.0-rc.0","maintainers":[{"name":"nyxprime","email":"nyx@axis.love"}],"homepage":"https://github.com/axis-love/kmd-web/tree/main/packages/mermaid#readme","bugs":{"url":"https://github.com/axis-love/kmd-web/issues"},"dist":{"shasum":"9a3a50ebe883d8100aa73b54d6639f775c4f447f","tarball":"https://registry.npmjs.org/@axis-love/mermaid/-/mermaid-0.1.0-rc.0.tgz","fileCount":6,"integrity":"sha512-Ie9cO0JmG1GDcySNsJtqjU6lf42qdfIAFpfvQ4GmrbWO4fG9w5jAV5JrVbh31CUUjNgoJ0HwUFJxD9ccNONcVg==","signatures":[{"sig":"MEUCIF5zDDEBhTAzfYbICt2M/UJMs0o9nppUfFmtbPwtvOyiAiEAxSozXj7uTdoLUUfujAO7LAZwK5iAxBPOF80WK89eQrU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@axis-love%2fmermaid@0.1.0-rc.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":19241},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"b933d01f0a7838b26ac21c5842367f0520d3a751","private":false,"_npmUser":{"name":"nyxprime","email":"nyx@axis.love"},"repository":{"url":"git+https://github.com/axis-love/kmd-web.git","type":"git","directory":"packages/mermaid"},"_npmVersion":"10.8.2","description":"Optional Mermaid diagram rendering integration.","directories":{},"sideEffects":false,"_nodeVersion":"20.20.2","dependencies":{"@axis-love/core":"0.1.0-rc.0","@axis-love/contracts":"0.1.0-rc.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"mermaid":"11.14.0"},"_npmOperationalInternal":{"tmp":"tmp/mermaid_0.1.0-rc.0_1786267175150_0.31671659911624994","host":"s3://npm-registry-packages-npm-production"}},"0.1.0-rc.1":{"name":"@axis-love/mermaid","version":"0.1.0-rc.1","license":"MIT","_id":"@axis-love/mermaid@0.1.0-rc.1","maintainers":[{"name":"nyxprime","email":"nyx@axis.love"}],"homepage":"https://github.com/axis-love/kmd-web/tree/main/packages/mermaid#readme","bugs":{"url":"https://github.com/axis-love/kmd-web/issues"},"dist":{"shasum":"b0b59a3683477995a95684d2a66bf6fa76113e76","tarball":"https://registry.npmjs.org/@axis-love/mermaid/-/mermaid-0.1.0-rc.1.tgz","fileCount":6,"integrity":"sha512-LeeJZLgVFdBbzh3sCLnjJZ8c24YfeKVNyAPSeY6YLHsmISAfUv7qNOFEIejyOimx22Y4/ZRia+AtaUEB3u/V9Q==","signatures":[{"sig":"MEYCIQCcp2rPK2YMVnIjzfyIm9SUM5p9juUxMnIoC8pl+aRoNwIhAP/ebCeRKiDGOR6i9TxFe+eWVsayemcRr/M/Jcv+rnhM","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@axis-love%2fmermaid@0.1.0-rc.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":19241},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"e44634f36e2cd6737fedca70237f2046571ee4ba","private":false,"_npmUser":{"name":"nyxprime","email":"nyx@axis.love"},"repository":{"url":"git+https://github.com/axis-love/kmd-web.git","type":"git","directory":"packages/mermaid"},"_npmVersion":"10.8.2","description":"Optional Mermaid diagram rendering integration.","directories":{},"sideEffects":false,"_nodeVersion":"20.20.2","dependencies":{"@axis-love/core":"0.1.0-rc.1","@axis-love/contracts":"0.1.0-rc.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"mermaid":"11.14.0"},"_npmOperationalInternal":{"tmp":"tmp/mermaid_0.1.0-rc.1_1786285796311_0.9347495934610015","host":"s3://npm-registry-packages-npm-production"}},"0.1.0":{"name":"@axis-love/mermaid","version":"0.1.0","license":"MIT","_id":"@axis-love/mermaid@0.1.0","maintainers":[{"name":"nyxprime","email":"nyx@axis.love"}],"homepage":"https://github.com/axis-love/kmd-web/tree/main/packages/mermaid#readme","bugs":{"url":"https://github.com/axis-love/kmd-web/issues"},"dist":{"shasum":"7406df0d6b11fc654649e17e9c26c67e3dfd5909","tarball":"https://registry.npmjs.org/@axis-love/mermaid/-/mermaid-0.1.0.tgz","fileCount":11,"integrity":"sha512-w3HJ27eHK7NW8l9VVummFsTTKNLWU3efIHngtyiI7rIgg9ylG7SWkGrIRmOxTmGIdTbeTrDSDfKjKTIhIrHhjQ==","signatures":[{"sig":"MEQCICHWIdzcZmol1VgbUIYTh4/TqTqpZ8NA08SR6stW9AyOAiAeEL+hEJnNJiFfV/P5/mTwgt4R7NjYoT49kpdLEZ7o5w==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@axis-love%2fmermaid@0.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":62678},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"85fa623aa7785916a3efaf66cd38b8dc5bff55bd","private":false,"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:0c54ec4c-0c50-44fb-ad43-cc6835d7a912"}},"repository":{"url":"git+https://github.com/axis-love/kmd-web.git","type":"git","directory":"packages/mermaid"},"_npmVersion":"12.0.2","description":"Optional Mermaid diagram rendering integration.","directories":{},"sideEffects":false,"_nodeVersion":"22.23.1","dependencies":{"@axis-love/core":"0.1.0","@axis-love/contracts":"0.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"mermaid":"11.14.0"},"_npmOperationalInternal":{"tmp":"tmp/mermaid_0.1.0_1786431454990_0.9372464150646929","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@axis-love/mermaid","version":"0.2.0","description":"Optional Mermaid diagram rendering integration.","license":"MIT","repository":{"type":"git","url":"git+https://github.com/axis-love/kmd-web.git","directory":"packages/mermaid"},"bugs":{"url":"https://github.com/axis-love/kmd-web/issues"},"homepage":"https://github.com/axis-love/kmd-web/tree/main/packages/mermaid#readme","type":"module","private":false,"sideEffects":false,"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"types":"./dist/index.d.ts","main":"./dist/index.js","module":"./dist/index.js","dependencies":{"@axis-love/contracts":"0.2.0","@axis-love/core":"0.2.0"},"publishConfig":{"access":"public"},"peerDependencies":{"mermaid":"11.14.0"},"gitHead":"7d3a08bdd5c08184576a198b91774322a3f41f5e","_id":"@axis-love/mermaid@0.2.0","_nodeVersion":"22.23.2","_npmVersion":"12.0.2","dist":{"integrity":"sha512-n2CvM770aifhHgPvfaoMRJeaV3WC+JZyF4CNWgJ2T+QEJ3nW/7sDI4f5DulfZVoUgfF4fnaX534u6e3iEUL9wA==","shasum":"b981102e71962eb20c80b16b74897808137669c2","tarball":"https://registry.npmjs.org/@axis-love/mermaid/-/mermaid-0.2.0.tgz","fileCount":11,"unpackedSize":62678,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@axis-love%2fmermaid@0.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIHQ4/dYYJe1P/t1kpO5Q7uhgc8oc0+uMwx37n5zK1cNAAiEAtQ4zIPfdLJ5zgI0RbBCQX6+PeWE46dtvESF7zqOGbf4="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:0c54ec4c-0c50-44fb-ad43-cc6835d7a912"}},"directories":{},"maintainers":[{"name":"nyxprime","email":"nyx@axis.love"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mermaid_0.2.0_1787427110221_0.518472685403891"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-09T09:19:34.961Z","modified":"2026-08-22T19:31:50.681Z","0.1.0-rc.0":"2026-08-09T09:19:35.277Z","0.1.0-rc.1":"2026-08-09T14:29:56.449Z","0.1.0":"2026-08-11T06:57:35.158Z","0.2.0":"2026-08-22T19:31:50.362Z"},"bugs":{"url":"https://github.com/axis-love/kmd-web/issues"},"license":"MIT","homepage":"https://github.com/axis-love/kmd-web/tree/main/packages/mermaid#readme","repository":{"type":"git","url":"git+https://github.com/axis-love/kmd-web.git","directory":"packages/mermaid"},"description":"Optional Mermaid diagram rendering integration.","maintainers":[{"name":"nyxprime","email":"nyx@axis.love"}],"readme":"# @axis-love/mermaid\n\nOptional Mermaid diagram rendering for kmd-web. Core renders ```mermaid fences\nas placeholders; this package finds those placeholders in the DOM and renders\nthem into diagrams. Without this package installed, diagrams stay as readable\nsource text — the reader stays fully functional.\n\n```bash\nnpm install @axis-love/mermaid mermaid\n```\n\n`mermaid` is a peer dependency — the diagram engine is never bundled here.\nWhen installed alongside `@axis-love/browser`, the browser layer lazy-loads\nthis package automatically.\n\n## Example\n\n```ts\nimport { renderMermaidPlaceholders, stopMermaidThemeWatch } from \"@axis-love/mermaid\";\n\nconst container = document.querySelector(\".kmd-reader-content\");\n\n// Renders every placeholder and starts watching for live theme switches —\n// diagrams are redrawn automatically when the host changes theme.\nawait renderMermaidPlaceholders(container);\n\n// On teardown (e.g. unmounting the reader):\nstopMermaidThemeWatch(container);\n```\n\n## Theming (KWEB-055)\n\nDiagrams derive their colors from the `--kmd-*` design tokens of the\nsurrounding reader, so they match the active theme instead of Mermaid's stock\npalette — diagram lines are drawn at text strength, not surface-border\nstrength. `watchMermaidTheme` re-renders diagrams automatically when the host\nswitches themes at runtime.\n\n## Part of kmd-web\n\nThis package is part of the [kmd-web](https://github.com/axis-love/kmd-web)\nfamily. Full documentation lives in the repo's\n[docs/](https://github.com/axis-love/kmd-web/tree/main/docs) directory — see\n[features.md](https://github.com/axis-love/kmd-web/blob/main/docs/features.md).\n\n## License\n\nMIT\n","readmeFilename":"README.md"}