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

@coconutstudio/blocknote-word-exporter-mit

v1.0.1

Published

MIT Word (.docx) exporter for BlockNote JSON. Independent rewrite — not a fork or copy of @blocknote/xl-docx-exporter. Used in production by coconutStudio.

Readme

@coconutstudio/blocknote-word-exporter-mit

npm License: MIT

MIT Word (.docx) exporter for BlockNote document JSON.

Walk a block tree (type / props / content / children) and return a .docx Blob using the MIT docx library.

Used in production by coconutStudio for shareable document Word export.

Not the official BlockNote exporter

This package is independent. It is not a fork, port, wrapper, or copy of @blocknote/xl-docx-exporter (licensed GPL-3.0 OR PROPRIETARY).

| | This package | @blocknote/xl-docx-exporter | | --- | --- | --- | | License | MIT | GPL-3.0 or paid proprietary | | Input | Public BlockNote document JSON | BlockNote editor schema + mappings | | Runtime | No @blocknote/* | BlockNote exporter classes | | Fonts / proxies | None | BlockNote-hosted fonts and file proxy |

We implemented Word output from the public JSON document format + docx APIs (native Heading 1–6, our own list numbering). We did not copy BlockNote exporter source.

Not affiliated with TypeCell / BlockNote.

Install

npm install @coconutstudio/blocknote-word-exporter-mit

API

import { blocksToDocx, prependDocumentTitle } from '@coconutstudio/blocknote-word-exporter-mit';

const blob = await blocksToDocx(editor.document, {
  documentTitle: 'Pricing',
  images: {
    [blockId]: { data: uint8, widthPx: 720, heightPx: 400, alt: 'Chart' },
  },
  fetchFile: async (url) => {
    const res = await fetch(url);
    if (!res.ok) throw new Error(String(res.status));
    return res.arrayBuffer();
  },
});
  • Headings become Word Heading 1–6 in black (H1 largest).
  • Tables span the page content width.
  • Lists use package numbering (cbn-bullet, cbn-number).
  • coconutVisual blocks render as images when images[block.id] is set; otherwise a [Chart: title] caption.
  • Unknown block types become a short fallback paragraph instead of throwing.

Chart rasterization (HTML/SVG → PNG) stays in the host app; pass the bytes in images.

License

MIT © coconutStudio