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

@spendgraph/docs

v0.15.0

Published

The documentation pages for every @spendgraph package, and the figures they draw with.

Readme

@spendgraph/docs

Every page the other packages used to carry, and the figures those pages draw with.

Why it is one package

Pages used to live in the package they described, packages/stage/docs, and shipped inside it. That read well and cost more than it looked:

  • docs was 6 to 22 percent of a package, worst at stage, downloaded by every install including the ones that only ever run the code
  • a figure needs React, and none of those packages wanted a React dependency
  • a figure shared between two pages had nowhere to live

So the pages moved here and the ten packages dropped docs from files. The version still moves with the rest, because a page describes a specific release.

Layout

figures/fig.tsx      the frame, LABEL, MONO, Arrow
figures/stage.tsx    the figures the stage pages draw with
stage/overview.mdx   the pages, one folder per package

A page imports what it draws:

import { PromptSources } from "../figures/prompt";

<PromptSources />

That is the rule this package exists to keep. A page never names a component it did not import and hope the renderer has one, which is what the old layout did: the tag was in the package and the component was in the docs host, so the page was only correct on that one site.

Rendering it

The pages are MDX with an export const meta carrying title and description. They are plain files, served through exports, so a renderer imports one by path:

import Page, { meta } from "@spendgraph/docs/stage/overview.mdx";

Two things a host has to provide:

  • Callout, the one component the pages do not bring. Give it tone and title props
  • the theme tokens from @spendgraph/config/css/theme.css. The figures use fill-ghost, text-s1, stroke-line and friends rather than pinning their own colours, so they follow the host's theme and its dark mode

docs.locusgraph.com renders these today, and tests/repo/package-docs.test.ts holds both rules.