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-react

v0.0.4

Published

PowerPoint-faithful React PPTX editor and viewer — full OOXML fidelity, real-time human + AI agent collaboration.

Readme

@betteroffice/pptx-react

React chrome for the BetterOffice PPTX editor — wraps @betteroffice/pptx in a slide canvas, slide strip, formatting toolbar, and keyboard editing surface. Parsing, layout, and text shaping run in the core's Rust/WebAssembly engine; slides are painted onto canvas.

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-react @betteroffice/pptx react react-dom

react and react-dom (18 or 19) are peer dependencies.

Render a presentation

import { PptxEditor } from '@betteroffice/pptx-react';

export function Presentation({ file, fontBytes }: {
  file: Uint8Array;
  fontBytes: Uint8Array;
}) {
  return (
    <div style={{ height: 720 }}>
      <PptxEditor file={file} fonts={[{ family: 'My Sans', bytes: fontBytes }]} />
    </div>
  );
}

Font bytes are supplied by the host and registered with the Rust shaper; pair with @betteroffice/fonts for metric-compatible open faces.

Edit

Click text to place the Rust-computed caret, type to edit the yrs story and trigger Rust reflow, drag or resize shapes on the canvas, or use the toolbar for bold, italic, size, color, slides, and text boxes.

Props: file, fonts, collaboration, i18n, className, fileName, onReady (exposes the core PresentationHandle, a refresh callback for host-driven edits, and save), onChange (deck snapshots), onError, and onSave (receives the saved bytes; without it, saving downloads the file).

What works today

  • Slide rendering with Rust layout and text shaping, painted onto canvas
  • Canvas interactions: shape selection, drag, and resize
  • Text editing with caret and selection computed by the engine
  • Slide management (add, delete), text boxes, undo/redo
  • Saving the deck back to .pptx — toolbar button, Ctrl/Cmd+S, or api.save()
  • Localized UI via the i18n prop (@betteroffice/pptx-i18n)
  • Real-time collaboration with people or agents; the deck is a CRDT
  • Live collaborator shape selections and presence chips, shown in each peer's color

Collaboration

Pass a collaboration prop to co-edit a deck live. onReplica hands you the session; drive it with a CollaborationProvider over any transport. Every peer must boot from the same initialUpdate seed.

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

<PptxEditor
  file={file}
  fonts={fonts}
  collaboration={{
    clientId,
    initialUpdate: sharedSeed,
    onReplica: (replica) => {
      if (!replica) return;
      const provider = new CollaborationProvider(replica, transport, {
        user: { name: "Ada" }, // shown on this peer's presence chip
      });
      provider.connect();
    },
  }}
/>;

Framework notes

The editor is browser-only (canvas, wasm); under Next.js load it with next/dynamic and ssr: false.

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