There’s also PlantUML, which is much more featureful than Mermaid but can’t use JS to render text to a diagram in-browser. There is a server that you could use JS to load images from.
I haven’t used prompts to generate diagrams, but Cursors autocomplete seems to recognize the syntax at least.