This script is designed to be used with Axure RP prototypes. It creates a toolbar with options for generating a Mermaid flowchart from your sitemap with various options for output.
I have a pre-generated minified bookmarklet, just click the bookmarklet to activate the [toolbar](#features].
Note
⚠ Currently broken, trying to figure out why.
Because the bookmarklet is an IIFE, you can trigger it inside of a prototype with the Open Link action
- Copy the full script to your clipboard
- Create a new Interaction on a shape, like Click or Load
- Add an Open Link action
- Set Link to: Link to external URL and for the value paste in the bookmarklet script
- Open the page, when you trigger the interaction, the toolbar appears
- Sitemap
- Full: generates a markdown text of a flowchart of the entire sitemap tree
- Current: generates a markdown flowchart using the currently selected page as the root node (Note: there currently is no way to use this button on a folder, that's Future Brent's problem)
- Code
- Copy - copies the mermaid text to your clipboard
- Download
- URL
Warning
Features that use Mermaid.Ink will send your chart content to a third-party server. If you want to keep things entirely private only use the Copy or TXT buttons and generate the chart yourself using Mermaid.Live, Mermaid CLI or the Mermaid JS library.
All dependency scripts are injected from CDN sources to keep bookmarklet at a reasonable size.
- @samuei's subgraph technique
- I've added styles to make the subgraphs have no visual component beyond structure
- Mermaid.Ink service allows for the generation of mermaid chart images and PDFs with just a URL
- Make it work with the Mermaid JS library instead of Mermaid.Ink. I have mermaid chart genereation working in a plugin for myself, I wanted to try to make it work with Mermaid.Ink this time.
- Convert Axure Flowcharts to mermaid (this actually looks pretty easy)
- Label the Mermaid.Ink buttons better or include a warning modal the first time you click one
Brent Morris
Bluesky: @closetgeekshow.ca | Mastodon: @[email protected] | Email: [email protected]
Project Link: https://github.com/closetgeekshow/axure-to-mermaid