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

@stll/folio-core

v0.12.0

Published

Headless, framework-neutral core of folio: the OOXML (.docx) parser, document model, ProseMirror integration, and page-layout engine. No React.

Readme

@stll/folio-core

The headless, framework-neutral core of folio: the OOXML (.docx) parser, the document model, the ProseMirror integration, and the page-layout engine. It opens a real .docx, models it, paginates it, and writes a real .docx back — preserving tables, headers and footers, tracked changes, and footnotes.

There is no React in the import graph, so the core runs on a server or under any framework. The React editor lives in @stll/folio-react, and the Vue editor lives in @stll/folio-vue.

Part of stella, an open-source legal workspace.

Install

bun add @stll/folio-core

Exports

| Import | What it is | | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | @stll/folio-core | the headless public API — createEmptyDocument, createDocx, the document model, AI-suggestion primitives, ProseMirror plugins | | @stll/folio-core/markdown | DOCX ↔ Markdown conversion | | @stll/folio-core/server | DOM-free helpers for server-side use (block-id derivation, document creation, re-zip) | | @stll/folio-core/* | the source-mirrored module tree (e.g. @stll/folio-core/types/document, @stll/folio-core/prosemirror/schema) for adapters that need lower-level building blocks |

New documents and reusable style sets

Create a legal-shaped blank document with the built-in preset:

import { createDocx, createEmptyDocument, createStellaStyleDocumentPreset } from "@stll/folio-core";

const document = createEmptyDocument({
  preset: createStellaStyleDocumentPreset(),
});
const docx = await createDocx(document);

Style sets are content-free JSON values. Inspect a source file before presenting styles for selection, extract the selected dependency closure, persist the result, and load it into any later document:

import {
  createEmptyDocument,
  extractDocumentStyleSetFromDocx,
  inspectDocumentStylesFromDocx,
} from "@stll/folio-core";

const catalog = await inspectDocumentStylesFromDocx(sourceDocx);
const styleSet = await extractDocumentStyleSetFromDocx(sourceDocx, {
  name: "Firm contract styles",
  styleIds: catalog.styles
    .filter(({ role }) => role === "default" || role === "quick")
    .map(({ styleId }) => styleId),
});

const document = createEmptyDocument({ styleSet });

Extraction excludes document content, metadata, relationships, media, comments, and revision data. It keeps only the selected styles and the numbering, theme, font-table, and settings data required to reproduce their formatting.

License

Apache-2.0

folio began as a private fork of Eigenpal's docx-editor; the original license and copyright are preserved in NOTICE.md.