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

@betteroffice/pptx

v0.0.4

Published

PowerPoint-faithful PPTX editor and viewer core — full OOXML fidelity, real-time human + AI agent collaboration. Framework-free (Rust/Wasm).

Readme

@betteroffice/pptx

Framework-free core for the BetterOffice PPTX editor — the Rust parser, yrs deck model, slide layout, and display-list engine compiled to WebAssembly, plus the Canvas2D replay host.

Early (0.0.x). The core surfaces — opening/saving documents, the editor components, collaboration — are settling and unlikely to change shape. Smaller APIs may still move between releases; breaking changes are always listed in the changelog.

bun add @betteroffice/pptx

Most apps want the turnkey React component in @betteroffice/pptx-react. Use this package directly to build custom presentation chrome.

Open and render a slide

import {
  initWasm,
  openPresentation,
  paintSlide,
  sizeCanvasForSlide,
} from '@betteroffice/pptx';

await initWasm();
const bytes = new Uint8Array(await file.arrayBuffer());
const deck = openPresentation(bytes, {
  fonts: [{ family: 'My Sans', bytes: fontBytes }],
});

const frame = deck.layoutSlide(0);
sizeCanvasForSlide(canvas, frame, devicePixelRatio);
await paintSlide(canvas.getContext('2d')!, frame, devicePixelRatio);

All parsing, edits, collaboration state, text shaping, layout, hit-testing, and display-list emission stay in Rust. The package decodes the typed boundary and replays the resulting primitives on canvas. Font bytes are supplied by the host and registered with the Rust shaper through openPresentation.

Beyond rendering, PresentationHandle covers editing: text (insertText / deleteText / formatText), slides (insertSlide / deleteSlide / moveSlide), shapes (addTextBox / moveShape / resizeShape), hitTest, undo/redo, and save(), which serializes the deck back to .pptx bytes with edits applied — untouched slides keep their exact source part bytes.

Collaboration

PresentationHandle is a collaboration replica. Pair it with CollaborationProvider and a transport implementing the small CollaborationTransport interface. The provider speaks the standard Yjs sync-v1 wire protocol, performs state-vector handshakes, forwards only local updates, and bounds frames and pending backpressure bytes.

import { CollaborationProvider } from '@betteroffice/pptx';

const provider = new CollaborationProvider(deck, transport, {
  user: { name: "Ada" }, // identity for this peer's presence chip
});
deck.onUpdate((_update, origin) => {
  if (origin === 'remote') repaint();
});
provider.connect();

Development

The generated .wasm binary is intentionally not committed. From the repository root, install wasm-pack 0.15.0 and binaryen, then run bun scripts/build-pptx-wasm.ts. Package builds copy the binary into dist/generated.

Docs: https://betteroffice.dev · Apache-2.0.