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

@washy-washy/pdf

v2.5.2

Published

The React/@react-pdf/renderer components that draw a chart into a PDF, shared by the CLI and the web app.

Downloads

5,070

Readme

check Codecov release npm docs licence: GPL v3+

@washy-washy/pdf

The @react-pdf/renderer components that draw a laundry chart into a PDF — the phone sheet, the print sheet, and the per-pile reference cards — plus the layout-fitting logic that measures each one until it lands on exactly one page. This is the rendering half of washy-washy-cli, split out so it can be depended on without the CLI's Bun-specific tooling. The data half — chart parsing, mixing rules, machine validation — is its sibling package, @washy-washy/core.

| The phone sheet, from the top | A card from the printable set | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | |

That's a small example chart, not anyone's real laundry — five piles, chosen to show a load that shares a drum, a jumper that never sees the iron, and a thermostat ring with its steam band marked. Every picture below is a link to the PDF it came out of, so you can read the whole sheet rather than a picture of the top of it.

Phone, top of each sheet:

Printable, the reference sheet each one opens with:

bun run examples redraws all six from scripts/example-chart.ts; bun run screenshots re-shoots the PNGs from them. test/screenshots.test.ts fails if the two ever fall out of step.

Requirements

  • Bun or Node, with React 19 available.
  • A Machine describing the washer and iron the chart is drawn for — this package draws nothing without one.

Installation

bun add @washy-washy/pdf @washy-washy/core react

This package pins @react-pdf/renderer to 4.7.0 and overrides its transitive @react-pdf/font dependency to 4.0.11, to keep raw pdfkit (which breaks under a flattened single-executable build such as bun build --compile) out of the resolved tree — see #108 and #109. That override only binds this package's own install: @react-pdf/[email protected] depends on @react-pdf/font via a caret range (^4.0.11), and npm's and Bun's overrides fields declared in a dependency's package.json don't propagate to a consumer's install. A consumer building a flattened executable needs the same "@react-pdf/font": "4.0.11" override in its own package.json, or a fresh install can still resolve @react-pdf/font to 4.1.0+ and pull raw pdfkit back in. Confirmed live on washy-washy-cli: alrayyes/washy-washy-cli#234.

Usage

import { renderCard, renderPhone, renderPrint } from "@washy-washy/pdf";
import { resolve } from "@washy-washy/core";

const items = resolve(instructions); // Instruction[] -> ResolvedInstruction[]

const phone = await renderPhone(items, machine); // { pdf, height, attempts, dropped }
const print = await renderPrint(items, machine); // { pdf, dropped }
const card = await renderCard(items.slice(0, 1), machine); // one pile's group -> { pdf, height, attempts, dropped }

renderPhone and renderCard render repeatedly and bisect the page height, and renderPrint bisects the table density, until the sheet fits on exactly one page — see CONTRIBUTING.md for why, and how far each one can stretch before it gives up.

dropped lists the distinct characters the chart carried that this package's Helvetica font can't render — usually empty. What has a WinAnsi equivalent (curly quotes, ≈, ✓, an ellipsis) is transliterated automatically; anything else is stripped and named here instead of just vanishing from the PDF.

Every drawing function takes a variant — "full", "wash", or "iron" — for the split sheets: the same chart with the iron's half or the machine's half left out, for whichever room you're standing in.

PhoneDocument, PrintDocument, ReferenceDocument, and CardDocument are also exported directly, for rendering with your own @react-pdf/renderer pipeline instead of the bisecting helpers above.

The full API reference — every export, its signature, and a runnable example — is generated with TypeDoc and published at alrayyes.github.io/washy-washy-pdf. @washy-washy/core's own reference lives at alrayyes.github.io/washy-washy-core.

Contributing

Everything about working on this — the commands, the linters, the tests, the git hooks and how a release is cut — is in CONTRIBUTING.md. Short version: bun run check before you push, commit under Conventional Commits.

Licence

GPL-3.0-or-later. Use it, change it, pass it on — but anything you distribute that is built on it comes with the same freedom attached, source included.