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

@katana-video/carrot

v0.1.0

Published

Carrot 🥕 — media pipelines for the browser, on WebCodecs and Mediabunny. A declarative job IR compiled to streaming spans over hardware codecs, with WebGPU/WebGL2 compositing. The layer above Mediabunny.

Readme

@katana-video/carrot

The Carrot 🥕 engine: a JSON op-graph IR (schema, normalize, plan()/preflight()) compiled to span-based Streams pipelines over Mediabunny edges, with dual-backend (WebGPU/WebGL2) compositing, a caption renderer, a GIF encoder and an ffprobe-equivalent probe — all worker-side, browser-native, no server. Full design: docs/design.md; the IR: docs/ir-spec.md.

IR document  ──plan()──▶  CompiledPipeline (spans)  ──executor──▶  output file(s)

Install and use

npm i @katana-video/carrot mediabunny

See the repo README for the worker + client pattern. Subpath exports: . (IR, planner, executor, createWorkerHost), ./client (EngineWorkerClient), ./worker (a ready-made tier-0 worker), ./facts, ./place, ./captions, ./caption-fonts, ./codec-tables, ./qr.

Layout

| Path | What | | --- | --- | | src/schema.ts | The contract: JobGraph IR, op registry (four lowering families), CompositeSpec, CompiledPlan, glossary + decision log | | src/example.ts | Worked example: a JobGraph AND the CompiledPlan it must lower to (future planner golden test) | | src/nodes/ | Node library: source/sink adapters, gate/rebase/progress/tee, N-ary aligned merge (framesync semantics), audio conform + planar helpers | | src/render/ | CompositeRenderer seam: WebGPU + WebGL2 interpreters of the same spec (premultiplied alpha; cross-backend SSIM is a standing test oracle) | | src/executor/ | The executor: CompiledPlan + assets → spans → lanes → slot streams → output blob. The only place streams/GPU/Mediabunny instances exist | | src/ir/ | The IR (docs/ir-spec.md) + planner: zod document schema, normalize, lower (chains/sweep/ramps), plan()/preflight(), symbolic scalars, MediaFacts | | src/probe.ts | ffprobe-equivalent static-facts layer over Mediabunny | | harness/ | Test harness: cases.ts (hand-authored plans), doc-cases.ts + docs-check.mjs (IR documents end-to-end), page + Node drivers with ffprobe/ffmpeg oracles |

Status: everything above is landed and green — pnpm test (197 unit tests: planner goldens, executor, codec tables, captions), harness/run.mjs (20 render cases × 2 GPU backends) and harness/docs-check.mjs (IR documents end-to-end, including the public tier-1 cases).

Running the harness

pnpm dev:harness                          # harness host on :4176 (this package's vite.config.ts)
node engine/harness/run.mjs               # all cases, both backends
node engine/harness/run.mjs crop-left crossfade   # subset
node engine/harness/docs-check.mjs        # IR documents end-to-end (tier-1 cases use @katana-video/carrot-backends)

Requires ffmpeg/ffprobe and system Chrome. Runs headed (WebGPU canvases render black in headless Chrome). Fixtures are generated deterministically into harness/fixtures/ (gitignored); docs-check.mjs additionally copies the backends package's noisy-speech fixture and fetches web-bg-removal's demo portrait.

Current suite: 20 cases × 2 GPU backends where video is involved — transcode, convert (mkv/webm), compress, resize, crop, flip, rotate, trim, concat, loop, watermark (premultiplied alpha), hstack-from-one-asset, crossfade (3 spans, A/V ramps), extract-audio (wav), mute, volume, swap-audio, fused crop+resize+flip, trim+mkv combo. Oracles: ffprobe postconditions, SSIM vs ffmpeg references (≥0.85–0.9 observed), volumedetect levels, cross-backend SSIM agreement (≥0.95; typically 1.0).

Conventions

  • Typecheck: pnpm typecheck (tsc, strict, no emit); build: pnpm build (tsup + tsc declarations)
  • No DOM dependencies in src/ (worker-compatible is a hard requirement).
  • Runtime currency is Mediabunny VideoSample/AudioSample (seconds).
  • Never ReadableStream.tee() on media samples; use tee() from nodes/streams.ts (clone-per-branch).
  • Every new op: registry def + harness case(s), nothing else.