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

@tumblerjs/slides

v0.1.0-alpha.26

Published

Headless PresentationML reading, rendering models, preservation, and editing for Tumbler.

Readme

@tumblerjs/slides

Read and edit PowerPoint .pptx files without a UI framework.

bun add @tumblerjs/slides

Open a presentation

import { openPresentationArtifact } from "@tumblerjs/slides";

const bytes = new Uint8Array(await file.arrayBuffer());
const artifact = openPresentationArtifact(bytes);
const { slides, width, height } = artifact.document;

Slides are in presentation order. Each slide exposes its objects, notes, and diagnostics. Check object capabilities before enabling an editing control. Geometry uses CSS pixels at 96 DPI; saved transforms use native OOXML units.

Apply edits with undo and redo

import { openPresentationEditingSession } from "@tumblerjs/slides";

const session = openPresentationEditingSession(bytes);
const slide = session.artifact.document.slides[0];
const object = slide?.objects.find(object => object.movable);
if (slide && object) {
  session.updateObject({
    slideId: slide.id,
    objectKey: object.key,
    x: object.transform.x + 16,
    y: object.transform.y,
    width: object.transform.width,
    height: object.transform.height,
  });
  session.undo();
  session.redo();
}
const output = session.artifact.bytes();

updateObject changes position, dimensions, or rotation in clockwise degrees. Use editText for text ranges, formatText for text formatting, and styleShape for solid fill and outline changes. Table text commands accept a zero-based cell: { row, column } address. Edit merged cells through their anchor cell.

A session records each command as an undoable revision. Read session.artifact after a command and pass its document back to your renderer. canUndo, canRedo, and dirty expose history state.

Use the Svelte editor

Import PresentationSlideView, PresentationSlideRail, and PresentationFormattingToolbar from @tumblerjs/svelte/slides. The view emits edit callbacks; your application applies them to the session. The rail provides thumbnail navigation through a bindable index.

See the PowerPoint guide for complete viewer, navigation, editing, and download examples.

Save

Call session.artifact.bytes() when downloading or saving. Accessing artifact.document.package also materializes the ZIP, so avoid doing either after every keystroke or drag. Edits reparse the changed slide and reuse unchanged scenes, images, and decoded fonts. Undo history shares unchanged package data.

No-op export returns the original bytes. Changed slides retain unrelated XML and package parts, including supported Office extension metadata.

Compatibility

Slide-local objects can remain editable with inherited geometry or inside transformed groups. Shared master/layout objects, fields, signed packages, SmartArt cached drawings, and unknown alternate representations remain restricted. Table row/column operations and full Office layout and animation fidelity are not supported.

Use the compatibility guide for feature coverage, and the implementation notes for preservation rules and validation commands.

See THIRD-PARTY-NOTICES.md for font and image decoder notices.