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

@habemus-papadum/aiui-ink

v0.3.0

Published

Reusable canvas ink surface: local pointer inking or a remote stroke feed, with per-stroke color and thickness.

Downloads

314

Readme

@habemus-papadum/aiui-ink

A reusable, framework-free canvas ink surface. It turns local pointer drags into strokes and accepts strokes fed in from elsewhere (a remote pen), each with its own color and width, with optional fade and screenshot compositing. The pure geometry (bounds, smoothing, fade, pressure) is split into ./strokes so it can be unit-tested and reused off the DOM.

Graduated from the aiui dev-overlay's internal ink layer, and used by @habemus-papadum/aiui-paint to land an iPad's pen on a desktop browser.

Install

npm install @habemus-papadum/aiui-ink

Usage

import { InkSurface } from "@habemus-papadum/aiui-ink";

const surface = new InkSurface({
  color: () => "#4cc9f0",   // brush for LOCAL strokes
  width: () => 6,
  fadeSec: () => 0,          // 0 persists; > 0 makes strokes evaporate
  onStrokeEnd: (s) => console.log("drew", s.points.length, "points"),
});
surface.setActive(true);     // receive pointer events

// Feed a stroke from anywhere (points in the surface's CSS pixels):
surface.remoteBegin("s1", { style: { color: "#f00", width: 4 }, point: { x: 20, y: 20 } });
surface.remotePoint("s1", { x: 80, y: 60 });
surface.remoteEnd("s1", { x: 140, y: 20 });

// Composite current ink into another 2D context (e.g. a screenshot):
surface.compositeInto(ctx, offsetX, offsetY, scale);

Coordinates are the surface's own CSS pixels; it is deliberately unaware of any wire protocol's normalized space. A caller streaming strokes between two surfaces maps norm ↔ px at the boundary using surface.size().

See the iPad Paint Stream guide for the streaming use case.