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

@hypit/provider-html-local

v0.2.0

Published

Trusted local implementation of:

Readme

@hypit/provider-html-local

Trusted local implementation of:

  • @hypit/html-program@1#rasterize-visual → TimelineVisual;
  • @hypit/html-program@1#rasterize-frames → ordered PNG BlobRefs.

The Provider consumes the typed HtmlProgram directly. It serves the staged program to independent Puppeteer/Chrome processes, applies absolute integer frames through window.__hypitFrameProgram, decodes compiler-declared source video frames with FFmpeg, captures PNG pixels through Chrome DevTools Protocol, and streams ordered frames into one H.264 encoder. It has no external HTML video engine or producer dependency.

Filesystem staging is private to this local Provider. @hypit/html-program retains only the portable program and its pure materialization function; it does not expose a Node project/staging subpath for hypothetical executors. Inspection of staged Compositable Surface files and probing the selected media tools are private here for the same reason: they validate inputs used by this executor and do not establish a shared media-execution ABI.

Runtime boundary

The Endpoint facet is rasterize. Runtime configuration owns deployment policy:

  • workers: fixed browser count or auto;
  • maxWorkers: automatic ceiling;
  • defaultConcurrency: whole requests admitted in this Endpoint pool;
  • browserCapacity: Chrome slots reserved across admitted requests;
  • chromePath, or exact browserVersion plus browserCacheDirectory;
  • ffmpegPath and ffprobePath;
  • optional process/stage deadlines and byte budgets.

The package recommendation is stored as hypit.htmlBrowser.version. Managed Chrome defaults to ~/.cache/hypit/html-rasterizer/chrome; its ManagedProgram state is stored below .hypit-html-browser-program. Browser installation occurs only through explicit Runtime preparation:

hypit programs prepare --runtime ./hypit.runtime.json --endpoint html.local

Inspection and execution never search environment variables or silently choose a different system browser. chromePath selects a user-managed executable; browserVersion selects one exact managed Chrome for Testing version. The two selection modes are mutually exclusive.

Frame selection and parallelism

A continuous request retains original absolute frame identities. A sparse request accepts strictly increasing, non-contiguous frames. Workers are independent browser processes and may start at any requested frame; they do not wait for an earlier worker to traverse the program.

The compiler's typed frameSources plan determines exact source-video samples, including reverse, hold, loop and rational-rate mappings. The Provider probes needed sources, decodes bounded windows lazily, shares decoded frames only within the current execution, and leases them under maxDecodedSourceBytes. Chrome does not independently decode those same videos. Arbitrary author HTML is not parsed to infer source-time semantics.

Completed PNGs enter a bounded ordered sink. FFmpeg is the necessary local serialization point for one MP4 stream, not a scheduler or shared metadata service. Capture of later frames can continue while earlier frames are encoded. Sparse frame output writes only requested PNGs and is bounded by maxRenderedBytes.

Lifecycle and failure

Each request owns its temporary directory, localhost server, Chrome processes, decoded-frame store and encoder. Nothing is shared across requests. Cancellation or failure closes page sessions, source leases, processes and resource I/O. Process-tree cleanup is best effort after abnormal exits; hard OS termination requires containment supplied by the deployment.

The executor waits for page frame listeners, declared fonts, dynamic image decodes and compositor settlement before accepting a screenshot. Readiness is scoped to compiler-published capture roots when available; real global stylesheet edits intentionally fall back to whole-document inspection.

Direct use

import { rasterizeHtmlProgram } from "@hypit/provider-html-local";

const visual = await rasterizeHtmlProgram(
  { program, range: { startFrame: 240, endFrameExclusive: 360 } },
  { resources, workers: 4 },
);

Omit range for the complete program. Audio is not part of this result; @hypit/media-local and the author assembly prepare audio and mux the final artifact.