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

@arena.ai/faster-latex-dom

v0.2.1

Published

Framework-neutral DOM controller for faster-latex: WASM loading, worker lifecycle, incremental block patching, deduplicated styles, and server-side render-to-string.

Readme

@arena.ai/faster-latex-dom

Framework-neutral DOM controller for @arena.ai/faster-latex. It owns everything a live LaTeX preview needs so a framework adapter (see @arena.ai/faster-latex-react) can be a thin shell:

  • WASM loading + worker lifecycle, with an automatic main-thread fallback.
  • Incremental block patching — applies the engine's per-keystroke splice to the host's children instead of reassigning innerHTML, so the browser relays out one block, not the whole document.
  • Resynchronisation — if a patch cannot be applied (the host DOM diverged), it forces a full repaint rather than corrupting the tree.
  • Deduplicated styles and observable render state.
import { createRenderer } from "@arena.ai/faster-latex-dom";

const renderer = createRenderer(document.getElementById("preview"), {
  execution: "auto", // "auto" (worker, falling back to main) | "worker" | "main"
  options: { packages: shimMap },
});

renderer.subscribe((state) => {
  // state: { status, version, warnings, packages, total, error, execution }
});

textarea.addEventListener("input", () => renderer.update(textarea.value));
// on teardown:
renderer.dispose();

The controller owns the host's children — never render into the host yourself.

API

createRenderer(host, config?) → Renderer

  • config.execution"auto" (default), "worker", or "main".
  • config.options — faster-latex RenderOptions, set once (not per keystroke).
  • config.styles"auto" (default, installs the deduplicated article stylesheet) or "none".
  • config.styleTarget — where "auto" styles go (default: the host's root node, so shadow-DOM hosts are styled correctly).
  • config.onPatch(nodes, { full }) — post-paint hook (e.g. dark-mode colour adaptation) called with the freshly inserted top-level elements.
  • config.loadWorkerSession / config.loadEngine — override the default @arena.ai/faster-latex/worker / @arena.ai/faster-latex/web loaders (pinned build, CDN, mock).

Renderer: update(source), reset(), subscribe(fn) → off, getState(), dispose().

CSP / SSR: static stylesheet

For applications that install CSS out of band (a strict Content-Security-Policy, or server-side rendering), the article stylesheet is exported as a static string — no engine initialisation required:

import { articleStylesheet } from "@arena.ai/faster-latex-dom/styles";

License

Apache-2.0