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

@algoplot/remark

v0.4.0

Published

Remark plugin that turns ```algoplot fences into playable, precomputed players — executed at build time, no eval in the reader's browser.

Readme

@algoplot/remark

The remark plugin that makes ```algoplot fences executable at build time: it runs the code, captures the recording, and replaces the fence with a player. Your readers get a scrubbable animation; they never receive your code, never execute anything, and the whole thing is plain precomputed JSON.

npm install @algoplot/remark @algoplot/core

Fence syntax

```algoplot [js|ts|python] [{"input":…, "seed":n, "maxSteps":n, "maxMs":n}]
<your algorithm code>
```
  • The first word after algoplot is the language (js default; aliases accepted: javascript, typescript, python, py). Unknown language → build error.
  • The rest of the info string is a JSON object. Allowed keys — and only these, because a silently ignored typo would run the wrong program: input, seed, maxSteps, maxMs.
  • Your run exceeds a budget or throws → the build fails, with the fence's position and the error's line. A broken algorithm should not reach production as an empty box.

Two modes

// astro.config.mjs / mdx options / unified pipeline
import remarkAlgoplot from '@algoplot/remark';

remarkPlugins: [[remarkAlgoplot, { mode: 'html' }]]   // default for plain markdown

mode: 'jsx' (default) — emits an MDX node:

<AlgoPlayer data={{ ok: true, steps: [/* … */], /* … */ }} />

The recording is embedded as an expression, so it arrives as an object with no parse step. Your MDX pipeline must have AlgoPlayer in scope:

import { AlgoPlayer } from '@algoplot/react';

mode: 'html' — emits markup a browser needs no build tooling to understand:

<algoplot-player data-payload="{&quot;ok&quot;:true,&quot;steps&quot;:[…]}"></algoplot-player>

Paired with @algoplot/web (one <script type="module">), that works in any markdown pipeline — no MDX, no React on the page.

Options

remarkAlgoplot({
  mode: 'jsx' | 'html',  // default 'jsx'
  maxSteps?: number,     // defaults; a fence's own options win
  maxMs?: number,
  seed?: number,
})

Execution shares one set of registered language runners and runs fences serially — relevant for Python, where one Pyodide instance serves the whole build.

Python fences

npm install -D @algoplot/python pyodide

That's the whole setup: importing @algoplot/python registers the py runner, and at build time Pyodide loads from the pyodide npm package (no CDN fetch on your build machine). Without it, a python fence fails the build with an install hint. See the Python guide.

Error examples

docs/intro.md:14:1-22:4: ```algoplot js fence failed (line 3): boom
docs/graphs.md:3:1: ```algoplot fence: unknown option 'imput' (allowed: input, seed, maxSteps, maxMs)

file.fail with the fence node — your markdown tooling shows the position, your CI shows the message.

License

MIT — Copyright (c) 2026 Gerald Lee <[email protected]>.