{"_id":"@mermaid-js/layout-tidy-tree","_rev":"3-84b5d6863e853e52cb3cbf97d13a961b","name":"@mermaid-js/layout-tidy-tree","dist-tags":{"latest":"0.2.2"},"versions":{"0.2.0":{"name":"@mermaid-js/layout-tidy-tree","version":"0.2.0","keywords":["diagram","markdown","tidy-tree","mermaid","layout"],"license":"MIT","_id":"@mermaid-js/layout-tidy-tree@0.2.0","maintainers":[{"name":"knsv","email":"knsv@sveido.com"},{"name":"ugnikalnis","email":"mindaugas.laganeckas@gmail.com"},{"name":"ashishjain0512","email":"ashishjain0512@gmail.com"},{"name":"sidv","email":"npmjs@sidharth.dev"},{"name":"aloisklink","email":"alois@aloisklink.com"},{"name":"p_brolin47","email":"per@mermaidchart.com"}],"contributors":[{"name":"Knut Sveidqvist"},{"name":"Sidharth Vinod"}],"homepage":"https://github.com/mermaid-js/mermaid#readme","bugs":{"url":"https://github.com/mermaid-js/mermaid/issues"},"dist":{"shasum":"b35b7bd048d79798b8c5c4071383dae376d317fb","tarball":"https://registry.npmjs.org/@mermaid-js/layout-tidy-tree/-/layout-tidy-tree-0.2.0.tgz","fileCount":27,"integrity":"sha512-0bZFuMQKgpW16cQ4MlUkLTi8l4UUz1pQ0tokGAuR/uVSo2BYvixYBPGxYm13fyQ5M/UUSjUQQ0Zo2nrWUKPwSA==","signatures":[{"sig":"MEQCIHbAHn7uxu59z550UB6XxND0aUgpaPfgHepLrYNhmsZEAiBERKJcx2MdlriaW2WNOTGMns/YRWV+cMpwts/iG3ChGw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@mermaid-js%2flayout-tidy-tree@0.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":217707},"type":"module","_from":"file:mermaid-js-layout-tidy-tree-0.2.0.tgz","types":"dist/layouts.d.ts","module":"dist/mermaid-layout-tidy-tree.core.mjs","exports":{".":{"types":"./dist/layouts.d.ts","import":"./dist/mermaid-layout-tidy-tree.core.mjs"},"./":"./"},"scripts":{},"_npmUser":{"name":"sidv","email":"npmjs@sidharth.dev"},"_resolved":"/tmp/0265aa4e7534d95efeadf53979c274df/mermaid-js-layout-tidy-tree-0.2.0.tgz","_integrity":"sha512-0bZFuMQKgpW16cQ4MlUkLTi8l4UUz1pQ0tokGAuR/uVSo2BYvixYBPGxYm13fyQ5M/UUSjUQQ0Zo2nrWUKPwSA==","repository":{"url":"git+https://github.com/mermaid-js/mermaid.git","type":"git"},"_npmVersion":"10.9.2","description":"Tidy-tree layout engine for mermaid","directories":{},"_nodeVersion":"22.14.0","dependencies":{"d3":"^7.9.0","non-layered-tidy-tree-layout":"^2.0.2"},"_hasShrinkwrap":false,"devDependencies":{"mermaid":"^11.11.0","@types/d3":"^7.4.3"},"peerDependencies":{"mermaid":"^11.0.2"},"_npmOperationalInternal":{"tmp":"tmp/layout-tidy-tree_0.2.0_1756998486010_0.4917203336991449","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@mermaid-js/layout-tidy-tree","version":"0.2.1","keywords":["diagram","markdown","tidy-tree","mermaid","layout"],"license":"MIT","_id":"@mermaid-js/layout-tidy-tree@0.2.1","maintainers":[{"name":"knsv","email":"knsv@sveido.com"},{"name":"ugnikalnis","email":"mindaugas.laganeckas@gmail.com"},{"name":"ashishjain0512","email":"ashishjain0512@gmail.com"},{"name":"sidv","email":"npmjs@sidharth.dev"},{"name":"aloisklink","email":"alois@aloisklink.com"},{"name":"p_brolin47","email":"per@mermaidchart.com"}],"contributors":[{"name":"Knut Sveidqvist"},{"name":"Sidharth Vinod"}],"homepage":"https://github.com/mermaid-js/mermaid#readme","bugs":{"url":"https://github.com/mermaid-js/mermaid/issues"},"dist":{"shasum":"4d43c2701fad38c709df3d898ae7594074856590","tarball":"https://registry.npmjs.org/@mermaid-js/layout-tidy-tree/-/layout-tidy-tree-0.2.1.tgz","fileCount":27,"integrity":"sha512-LZFmu6SZmAR5N/aesR7ya5JwEjCrGh7J64n7vFmHqVDHDJjIx+LsEi0dmt0WTYbP4wdKFLLykpvRsemRgAnLXA==","signatures":[{"sig":"MEUCIEHQVl3jgqc9B9d92GD6J/X9xh2aRI1STsHRX3Q3pvKKAiEA/ChCFWbsY36+55UkHt5wTkWCaU1ezoeA2546rnjSqCk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@mermaid-js%2flayout-tidy-tree@0.2.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":241283},"type":"module","_from":"file:mermaid-js-layout-tidy-tree-0.2.1.tgz","types":"dist/layouts.d.ts","module":"dist/mermaid-layout-tidy-tree.core.mjs","exports":{".":{"types":"./dist/layouts.d.ts","import":"./dist/mermaid-layout-tidy-tree.core.mjs"},"./":"./"},"scripts":{},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:c650c708-dc2e-45d6-876a-8cb25abe82d0"}},"_resolved":"/tmp/034b1a0fc86c1b546dd357e341c71f69/mermaid-js-layout-tidy-tree-0.2.1.tgz","_integrity":"sha512-LZFmu6SZmAR5N/aesR7ya5JwEjCrGh7J64n7vFmHqVDHDJjIx+LsEi0dmt0WTYbP4wdKFLLykpvRsemRgAnLXA==","repository":{"url":"git+https://github.com/mermaid-js/mermaid.git","type":"git"},"_npmVersion":"11.8.0","description":"Tidy-tree layout engine for mermaid","directories":{},"_nodeVersion":"22.14.0","dependencies":{"d3":"^7.9.0"},"_hasShrinkwrap":false,"devDependencies":{"mermaid":"^11.12.2","@types/d3":"^7.4.3","non-layered-tidy-tree-layout":"^2.0.2"},"peerDependencies":{"mermaid":"^11.0.2"},"_npmOperationalInternal":{"tmp":"tmp/layout-tidy-tree_0.2.1_1769676576938_0.9180253908020235","host":"s3://npm-registry-packages-npm-production"}},"0.2.2":{"name":"@mermaid-js/layout-tidy-tree","version":"0.2.2","description":"Tidy-tree layout engine for mermaid","module":"dist/mermaid-layout-tidy-tree.core.mjs","types":"dist/layouts.d.ts","type":"module","exports":{".":{"import":"./dist/mermaid-layout-tidy-tree.core.mjs","types":"./dist/layouts.d.ts"},"./":"./"},"keywords":["diagram","markdown","tidy-tree","mermaid","layout"],"repository":{"type":"git","url":"git+https://github.com/mermaid-js/mermaid.git"},"contributors":[{"name":"Knut Sveidqvist"},{"name":"Sidharth Vinod"}],"license":"MIT","dependencies":{"d3":"^7.9.0"},"devDependencies":{"@types/d3":"^7.4.3","non-layered-tidy-tree-layout":"^2.0.2","mermaid":"^11.15.0"},"peerDependencies":{"mermaid":"^11.0.2"},"scripts":{"clean":"rimraf dist"},"_id":"@mermaid-js/layout-tidy-tree@0.2.2","bugs":{"url":"https://github.com/mermaid-js/mermaid/issues"},"homepage":"https://github.com/mermaid-js/mermaid#readme","_integrity":"sha512-8RmjDXjKJBxqTS1mICStm8zWRM45fSzs0SOrkp28+KsOGS2YEMFMVTwwRU8CsC6M1L+pDYZVjf1m9AC1c9Wndg==","_resolved":"/tmp/77c1801c6ecaeeeec3248eb1b31da2f9/mermaid-js-layout-tidy-tree-0.2.2.tgz","_from":"file:mermaid-js-layout-tidy-tree-0.2.2.tgz","_nodeVersion":"22.14.0","_npmVersion":"11.14.1","dist":{"integrity":"sha512-8RmjDXjKJBxqTS1mICStm8zWRM45fSzs0SOrkp28+KsOGS2YEMFMVTwwRU8CsC6M1L+pDYZVjf1m9AC1c9Wndg==","shasum":"cc3c60e3a5e8435c20a6a65994f6f681683b0f42","tarball":"https://registry.npmjs.org/@mermaid-js/layout-tidy-tree/-/layout-tidy-tree-0.2.2.tgz","fileCount":27,"unpackedSize":247602,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@mermaid-js%2flayout-tidy-tree@0.2.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDlWgz5OzbwpzX4xRjQbm17ihPYJSvgAdSBTramAEjf9gIgIYC8sykXqkGcVcDBoRCEt026MtymHUmXPqei8HgUq3Q="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:c650c708-dc2e-45d6-876a-8cb25abe82d0"}},"directories":{},"maintainers":[{"name":"knsv","email":"knsv@sveido.com"},{"name":"ugnikalnis","email":"mindaugas.laganeckas@gmail.com"},{"name":"ashishjain0512","email":"ashishjain0512@gmail.com"},{"name":"sidv","email":"npmjs@sidharth.dev"},{"name":"aloisklink","email":"alois@aloisklink.com"},{"name":"p_brolin47","email":"per@mermaidchart.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/layout-tidy-tree_0.2.2_1778496727886_0.5258584474641588"},"_hasShrinkwrap":false}},"time":{"created":"2025-09-04T15:08:05.891Z","modified":"2026-05-11T10:52:09.738Z","0.2.0":"2025-09-04T15:08:06.270Z","0.2.1":"2026-01-29T08:49:37.122Z","0.2.2":"2026-05-11T10:52:08.038Z"},"bugs":{"url":"https://github.com/mermaid-js/mermaid/issues"},"license":"MIT","homepage":"https://github.com/mermaid-js/mermaid#readme","keywords":["diagram","markdown","tidy-tree","mermaid","layout"],"repository":{"type":"git","url":"git+https://github.com/mermaid-js/mermaid.git"},"description":"Tidy-tree layout engine for mermaid","contributors":[{"name":"Knut Sveidqvist"},{"name":"Sidharth Vinod"}],"maintainers":[{"name":"knsv","email":"knsv@sveido.com"},{"name":"ugnikalnis","email":"mindaugas.laganeckas@gmail.com"},{"name":"ashishjain0512","email":"ashishjain0512@gmail.com"},{"name":"sidv","email":"npmjs@sidharth.dev"},{"name":"aloisklink","email":"alois@aloisklink.com"},{"name":"p_brolin47","email":"per@mermaidchart.com"}],"readme":"# @mermaid-js/layout-tidy-tree\n\nThis package provides a bidirectional tidy tree layout engine for Mermaid based on the non-layered-tidy-tree-layout algorithm.\n\n> [!NOTE]\n> The Tidy Tree Layout engine will not be available in all providers that support mermaid by default.\n> The websites will have to install the @mermaid-js/layout-tidy-tree package to use the Tidy Tree layout engine.\n\n## Usage\n\n```\n---\nconfig:\n  layout: tidy-tree\n---\nmindmap\nroot((mindmap))\n  A\n  B\n```\n\n### With bundlers\n\n```sh\nnpm install @mermaid-js/layout-tidy-tree\n```\n\n```ts\nimport mermaid from 'mermaid';\nimport tidyTreeLayouts from '@mermaid-js/layout-tidy-tree';\n\nmermaid.registerLayoutLoaders(tidyTreeLayouts);\n```\n\n### With CDN\n\n```html\n<script type=\"module\">\n  import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.esm.min.mjs';\n  import tidyTreeLayouts from 'https://cdn.jsdelivr.net/npm/@mermaid-js/layout-tidy-tree@0/dist/mermaid-layout-tidy-tree.esm.min.mjs';\n\n  mermaid.registerLayoutLoaders(tidyTreeLayouts);\n</script>\n```\n\n## Tidy Tree Layout Overview\n\ntidy-tree: The bidirectional tidy tree layout\n\nThe bidirectional tidy tree layout algorithm creates two separate trees that grow horizontally in opposite directions from a central root node:\nLeft tree: grows horizontally to the left (children alternate: 1st, 3rd, 5th...)\nRight tree: grows horizontally to the right (children alternate: 2nd, 4th, 6th...)\n\nThis creates a balanced, symmetric layout that is ideal for mindmaps, organizational charts, and other tree-based diagrams.\n\nLayout Structure:\n[Child 3] ← [Child 1] ← [Root] → [Child 2] → [Child 4]\n↓ ↓ ↓ ↓\n[GrandChild] [GrandChild] [GrandChild] [GrandChild]\n","readmeFilename":"README.md"}