From 57eadbf6afcb445e8c88319c17625adbbeff2a30 Mon Sep 17 00:00:00 2001 From: darshanr0107 Date: Wed, 13 Aug 2025 19:31:10 +0530 Subject: [PATCH] docs: update mindmaps docs and move instructions under configuration and deployment on-behalf-of: @Mermaid-Chart --- docs/config/tidy-tree.md | 63 ++++++++ docs/syntax/mindmap.md | 2 + instructions.md | 146 +----------------- .../mermaid/src/docs/.vitepress/config.ts | 1 + packages/mermaid/src/docs/config/tidy-tree.md | 57 +++++++ packages/mermaid/src/docs/syntax/mindmap.md | 2 + 6 files changed, 126 insertions(+), 145 deletions(-) create mode 100644 docs/config/tidy-tree.md create mode 100644 packages/mermaid/src/docs/config/tidy-tree.md diff --git a/docs/config/tidy-tree.md b/docs/config/tidy-tree.md new file mode 100644 index 000000000..b5863ec9e --- /dev/null +++ b/docs/config/tidy-tree.md @@ -0,0 +1,63 @@ +> **Warning** +> +> ## THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. +> +> ## Please edit the corresponding file in [/packages/mermaid/src/docs/config/tidy-tree.md](../../packages/mermaid/src/docs/config/tidy-tree.md). + +# Tidy-tree Layout Instructions + +Instructions to use the Tidy-tree layout algorithm. + +## Getting Started + +### Installation + +```bash +npm install non-layered-tidy-tree-layout +# or +yarn add non-layered-tidy-tree-layout + +``` + +There's also a built version: `dist/non-layered-tidy-tree-layout.js` for use with browser ` +``` diff --git a/docs/syntax/mindmap.md b/docs/syntax/mindmap.md index b632d3ab5..844b3293c 100644 --- a/docs/syntax/mindmap.md +++ b/docs/syntax/mindmap.md @@ -331,3 +331,5 @@ root((mindmap is a long thing)) C D ``` + +Instructions to add and register tidy-tree layout are present in [Tidy Tree Configuration](/config/tidy-tree) diff --git a/instructions.md b/instructions.md index 065c4b92e..b4336bba9 100644 --- a/instructions.md +++ b/instructions.md @@ -1,145 +1 @@ -Please help me to implement the tidy-tree algorithm. - -- I have added a placeholder with the correct signature in `packages/mermaid/src/rendering-util/layout-algorithms/tidy-tree/`. - -Replace the cytoscape layout with one using tidy-tree. - -This is the API for tidy-tree: - -``` -# non-layered-tidy-tree-layout - -Draw non-layered tidy trees in linear time. - -> This a JavaScript port from the project [cwi-swat/non-layered-tidy-trees](https://github.com/cwi-swat/non-layered-tidy-trees), which is written in Java. The algorithm used in that project is from the paper by _A.J. van der Ploeg_, [Drawing Non-layered Tidy Trees in Linear Time](http://oai.cwi.nl/oai/asset/21856/21856B.pdf). There is another JavaScript port from that project [d3-flextree](https://github.com/Klortho/d3-flextree), which depends on _d3-hierarchy_. This project is dependency free. - -## Getting started - -### Installation - -``` - -npm install non-layered-tidy-tree-layout - -``` - -Or - -``` - -yarn add non-layered-tidy-tree-layout - -```` - -There's also a built verison: `dist/non-layered-tidy-tree-layout.js` for use with browser ` +``` diff --git a/packages/mermaid/src/docs/syntax/mindmap.md b/packages/mermaid/src/docs/syntax/mindmap.md index 7c7822b64..41d736798 100644 --- a/packages/mermaid/src/docs/syntax/mindmap.md +++ b/packages/mermaid/src/docs/syntax/mindmap.md @@ -226,3 +226,5 @@ root((mindmap is a long thing)) C D ``` + +Instructions to add and register tidy-tree layout are present in [Tidy Tree Configuration](/config/tidy-tree)