Add mermaid support

I wonder whether we can add mermaid support to the docs.

https://www.npmjs.com/package/mermaid

It would be really useful to get some more dynamic visuals into the docs which auto update (which we have to do when generating gif/jpg/png files)

Edited by Dan Duke