Main issue is being able to render in-browser. Which mermaid can. Wish plantuml can be ported to js.
Wouldn't it?
Graphviz can be ported to JS, I found an example although I didn't try it.
GraphViz in the browser was made possible by `emscripten`, which is essentially a JavaScript compiler target. In that sense, there's not a implementation in a language besides C++ that's gotten much traction.
It seems to me, to be a really bad idea to generate "almost code" in order to be able to generate diagrams for "actual code" that you have to write.