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

@bendyline/squisq-formats

v1.2.1

Published

Document format converters — DOCX, PDF, OOXML import/export

Readme

@bendyline/squisq-formats

Document format converters for Squisq. Import and export between Squisq's Markdown-based document model and common file formats — DOCX, PPTX, PDF, and HTML. All converters run entirely in the browser with no server or native binaries required.

Part of the Squisq monorepo.

npm MIT License

Install

npm install @bendyline/squisq-formats @bendyline/squisq

Supported Formats

| Format | Import | Export | Theme | Subpath | | --------------------- | ------- | ------- | ----- | -------------------------------- | | DOCX (Word) | ✅ | ✅ | ✅ | @bendyline/squisq-formats/docx | | PDF | ✅ | ✅ | ✅ | @bendyline/squisq-formats/pdf | | HTML | — | ✅ | ✅ | @bendyline/squisq-formats/html | | EPUB (e-book) | — | ✅ | ✅ | @bendyline/squisq-formats/epub | | PPTX (PowerPoint) | planned | ✅ | ✅ | @bendyline/squisq-formats/pptx | | XLSX (Excel) | planned | planned | — | @bendyline/squisq-formats/xlsx |

All export formats accept an optional themeId to apply Squisq theme colors and typography.

Quick Examples

DOCX

import { markdownDocToDocx, docxToMarkdownDoc } from '@bendyline/squisq-formats/docx';

// Export: MarkdownDocument → DOCX (Uint8Array)
const docxBytes = await markdownDocToDocx(markdownDoc);

// Import: DOCX (ArrayBuffer) → MarkdownDocument
const markdownDoc = await docxToMarkdownDoc(docxBuffer);

PDF

import {
  markdownDocToPdf,
  pdfToMarkdownDoc,
  configurePdfWorker,
} from '@bendyline/squisq-formats/pdf';

// Configure the PDF.js worker (required for import)
configurePdfWorker('/pdf.worker.min.mjs');

// Export: MarkdownDocument → PDF (Uint8Array)
const pdfBytes = await markdownDocToPdf(markdownDoc);

// Import: PDF (ArrayBuffer) → MarkdownDocument
const markdownDoc = await pdfToMarkdownDoc(pdfBuffer);

HTML

import { docToHtml, docToHtmlZip } from '@bendyline/squisq-formats/html';

// Export: Doc → standalone HTML string
const html = docToHtml(doc);

// Export: Doc → ZIP with HTML + images
const zipBytes = await docToHtmlZip(doc);

EPUB

import { markdownDocToEpub } from '@bendyline/squisq-formats/epub';

// Export: MarkdownDocument → EPUB (ArrayBuffer)
const epubBytes = await markdownDocToEpub(markdownDoc, {
  title: 'My Book',
  author: 'Jane Doe',
});

PPTX

import { markdownDocToPptx } from '@bendyline/squisq-formats/pptx';

// Export: MarkdownDocument → PPTX (ArrayBuffer)
// Each H1/H2 heading starts a new slide
const pptxBytes = await markdownDocToPptx(markdownDoc);

Doc-level Convenience Functions

Each format also exports Doc-level wrappers that handle the Markdown↔Doc conversion internally:

import { docToDocx, docxToDoc } from '@bendyline/squisq-formats/docx';
import { docToPdf, pdfToDoc } from '@bendyline/squisq-formats/pdf';
import { docToPptx } from '@bendyline/squisq-formats/pptx';

Subpath Exports

| Subpath | Contents | | --------------------------------- | -------------------------------------------------------------- | | @bendyline/squisq-formats/docx | DOCX import/export | | @bendyline/squisq-formats/pdf | PDF import/export + worker config | | @bendyline/squisq-formats/html | HTML export | | @bendyline/squisq-formats/epub | EPUB 3 e-book export | | @bendyline/squisq-formats/ooxml | Shared OOXML infrastructure (ZIP reader/writer, XML utilities) | | @bendyline/squisq-formats/pptx | PPTX export (import planned) | | @bendyline/squisq-formats/xlsx | XLSX stubs (not yet implemented) |

Architecture

All converters use Squisq's MarkdownDocument AST as the pivot format. Importing a file parses it into a MarkdownDocument; exporting serializes from one. The OOXML subpath provides shared infrastructure for reading and writing Office Open XML packages (used by DOCX and PPTX, and eventually XLSX).

Related Packages

| Package | Description | | ---------------------------------------------------------------------------------------------- | -------------------------------------------------------------- | | @bendyline/squisq | Headless core — schemas, templates, spatial, markdown, storage | | @bendyline/squisq-react | React components for rendering docs | | @bendyline/squisq-editor-react | React editor with raw/WYSIWYG/preview modes |

License

MIT