npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@voithos-labs/aragonite-mermaid

v0.11.5

Published

mermaid diagrams for aragonite, the cute markdown editor lib

Readme

@voithos-labs/aragonite-mermaid

Mermaid diagrams for aragonite. A ```mermaid code fence draws as the diagram it describes, and an Edit button opens the source when you want to change it. What's aragonite? The readme answers that at length, and aragonite.dev answers it by example.

What it reads

```mermaid
flowchart LR
    A[idea] --> B[prototype] --> C[works on my machine]
```

Any code fence whose language is mermaid counts, backticks or tildes. It's an ordinary fence in the file. Without the plugin the same lines are a code block, and GitHub draws them as a diagram too.

Install

npm install @voithos-labs/aragonite @voithos-labs/aragonite-mermaid mermaid

The plugin moves in lockstep with the editor and asks for its exact version, so bump them together. mermaid (11.16 and up, or 12) is optional and only there for the renderer below; leave out both and each diagram just shows its source.

Use it

import { mermaidPlugin } from '@voithos-labs/aragonite-mermaid';
import { mermaidRenderer } from '@voithos-labs/aragonite-mermaid/renderer';

const plugins = [mermaidPlugin({ renderer: mermaidRenderer })];

Pass plugins to the editor, building the array once for the whole app. The renderer only loads mermaid when the first diagram draws, so mermaid stays out of your main bundle. Once it's running:

  • React, Vue or no framework at all? The diagram's styles are in @voithos-labs/aragonite-mermaid/style.css; import it with the editor's style.css.
  • Double-click a diagram (or click Edit) to open its source. Ctrl+Enter (Cmd+Enter on a Mac) or clicking away saves it as one undo step, and Escape drops the change. An empty diagram opens straight into its source.
  • With the diagram focused, drag to pan and Ctrl+scroll (Cmd on a Mac) to zoom, and Reset puts it back. Ctrl+M or the Focus button opens a bigger view where plain scrolling zooms; Escape closes it.
  • A diagram mermaid can't parse shows mermaid's error message where the picture would be.
  • It draws for the editor's theme: dark gets mermaid's dark theme, a theme named after one of mermaid's (forest, neutral) gets that one, and anything else gets mermaid's default.
  • Rather draw with something else? renderer is any function from (code, id, { theme }) to a promise of SVG markup.

More

The consumer guide covers the rest of the bundled plugins, and the plugin guide's page on picture-like blocks uses this one as its worked example.

License

Free software, released under MPL-2.0 like the editor itself: use it, study it, fork it, embed it in whatever you're building, closed source included. The one string attached: if you change this plugin's own files, you share those changes under the same license.