{"_id":"@coconutstudio/blocknote-word-exporter-mit","_rev":"2-9b8e10b36b14b1b2b2066907cd177f52","name":"@coconutstudio/blocknote-word-exporter-mit","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@coconutstudio/blocknote-word-exporter-mit","version":"1.0.0","keywords":["blocknote","docx","word","exporter","mit","microsoft-word","docx-exporter","blocknote-exporter","blocknotejs","export-to-word","word-export","json-to-docx","mit-license","coconutstudio","open-source"],"author":{"url":"https://coconutstudio.io","name":"coconutStudio"},"license":"MIT","_id":"@coconutstudio/blocknote-word-exporter-mit@1.0.0","maintainers":[{"name":"mahdiharzallah","email":"mahdiharzallah21@gmail.com"}],"homepage":"https://coconutstudio.io","dist":{"shasum":"1a1080a53664819e85f17090f1886ee2c48c3688","tarball":"https://registry.npmjs.org/@coconutstudio/blocknote-word-exporter-mit/-/blocknote-word-exporter-mit-1.0.0.tgz","fileCount":10,"integrity":"sha512-3ymjggMlCBM3RVCn9rPGcN+yv/XOIaH8iyS9kxSgpvLNhsVwtQ+U/kHvu6Tme2+sHOE8d//MoR9Wp5XKGyggaA==","signatures":[{"sig":"MEQCIE4b5wMZuKyrbQeRWpI+5oXsvPwSb7UzZ4mmx1iuDoxsAiB0NNi1I9jXaLM+4AbK5xuj6G6ilIWjLtEZ0bNYiX077g==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":20048},"main":"./src/index.js","type":"module","module":"./src/index.js","engines":{"node":">=20"},"exports":{".":{"import":"./src/index.js","default":"./src/index.js"}},"scripts":{"test":"vitest run","prepublishOnly":"vitest run"},"_npmUser":{"name":"mahdiharzallah","email":"mahdiharzallah21@gmail.com"},"_npmVersion":"11.16.0","description":"MIT Word (.docx) exporter for BlockNote JSON. Independent rewrite — not a fork or copy of @blocknote/xl-docx-exporter. Used in production by coconutStudio.","directories":{},"sideEffects":false,"_nodeVersion":"24.18.0","dependencies":{"docx":"^9.7.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jszip":"^3.10.1","vitest":"^3.2.6"},"_npmOperationalInternal":{"tmp":"tmp/blocknote-word-exporter-mit_1.0.0_1787593907592_0.11139718576841062","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@coconutstudio/blocknote-word-exporter-mit","version":"1.0.1","description":"MIT Word (.docx) exporter for BlockNote JSON. Independent rewrite — not a fork or copy of @blocknote/xl-docx-exporter. Used in production by coconutStudio.","license":"MIT","author":{"name":"coconutStudio","url":"https://coconutstudio.io"},"homepage":"https://github.com/coconutstudio-io/blocknote-word-exporter-mit#readme","repository":{"type":"git","url":"git+https://github.com/coconutstudio-io/blocknote-word-exporter-mit.git"},"bugs":{"url":"https://github.com/coconutstudio-io/blocknote-word-exporter-mit/issues"},"type":"module","main":"./src/index.js","module":"./src/index.js","exports":{".":{"import":"./src/index.js","default":"./src/index.js"}},"keywords":["blocknote","docx","word","exporter","mit","microsoft-word","docx-exporter","blocknote-exporter","blocknotejs","export-to-word","word-export","json-to-docx","mit-license","coconutstudio","open-source"],"scripts":{"test":"vitest run","prepublishOnly":"vitest run"},"dependencies":{"docx":"^9.7.1"},"devDependencies":{"jszip":"^3.10.1","vitest":"^3.2.6"},"engines":{"node":">=20"},"sideEffects":false,"publishConfig":{"access":"public"},"gitHead":"77c43807eb926a6417efffead94706b2711cc687","_id":"@coconutstudio/blocknote-word-exporter-mit@1.0.1","_nodeVersion":"24.18.0","_npmVersion":"11.16.0","dist":{"integrity":"sha512-GOdiho76TyFjsLU8lQJ6TpD54M4FfY831NcNR386fauIMARz0DV+5iQnhYqbLqkoDPA/Xx1/RNOhBhv3/uuTcg==","shasum":"310eab92b7a08f8ca1a87e181e644bce939e7a16","tarball":"https://registry.npmjs.org/@coconutstudio/blocknote-word-exporter-mit/-/blocknote-word-exporter-mit-1.0.1.tgz","fileCount":10,"unpackedSize":20565,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCHlhKxPj/TnfMhCHyY+c1g0Y4HhIRAO7jzg9mbRzUkBAIhALAFBNYf7zsgYXOYiAz7Rfz0hI6B8+nxM4OsEoLU2k6l"}]},"_npmUser":{"name":"mahdiharzallah","email":"mahdiharzallah21@gmail.com"},"directories":{},"maintainers":[{"name":"mahdiharzallah","email":"mahdiharzallah21@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/blocknote-word-exporter-mit_1.0.1_1787594186703_0.6447106013858488"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-24T17:51:47.428Z","modified":"2026-08-24T17:56:27.045Z","1.0.0":"2026-08-24T17:51:47.747Z","1.0.1":"2026-08-24T17:56:26.868Z"},"author":{"name":"coconutStudio","url":"https://coconutstudio.io"},"license":"MIT","homepage":"https://github.com/coconutstudio-io/blocknote-word-exporter-mit#readme","keywords":["blocknote","docx","word","exporter","mit","microsoft-word","docx-exporter","blocknote-exporter","blocknotejs","export-to-word","word-export","json-to-docx","mit-license","coconutstudio","open-source"],"description":"MIT Word (.docx) exporter for BlockNote JSON. Independent rewrite — not a fork or copy of @blocknote/xl-docx-exporter. Used in production by coconutStudio.","maintainers":[{"name":"mahdiharzallah","email":"mahdiharzallah21@gmail.com"}],"readme":"# @coconutstudio/blocknote-word-exporter-mit\n\n[![npm](https://img.shields.io/npm/v/@coconutstudio/blocknote-word-exporter-mit.svg)](https://www.npmjs.com/package/@coconutstudio/blocknote-word-exporter-mit)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](./LICENSE)\n\nMIT **Word (.docx)** exporter for [BlockNote](https://www.blocknotejs.org/) document JSON.\n\nWalk a block tree (`type` / `props` / `content` / `children`) and return a `.docx` `Blob` using the MIT [`docx`](https://www.npmjs.com/package/docx) library.\n\n**Used in production by [coconutStudio](https://coconutstudio.io)** for shareable document Word export.\n\n## Not the official BlockNote exporter\n\nThis package is **independent**. It is **not** a fork, port, wrapper, or copy of [`@blocknote/xl-docx-exporter`](https://www.npmjs.com/package/@blocknote/xl-docx-exporter) (licensed **GPL-3.0 OR PROPRIETARY**).\n\n| | This package | `@blocknote/xl-docx-exporter` |\n| --- | --- | --- |\n| License | **MIT** | GPL-3.0 or paid proprietary |\n| Input | Public BlockNote document JSON | BlockNote editor schema + mappings |\n| Runtime | No `@blocknote/*` | BlockNote exporter classes |\n| Fonts / proxies | None | BlockNote-hosted fonts and file proxy |\n\nWe 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.\n\nNot affiliated with TypeCell / BlockNote.\n\n## Install\n\n```sh\nnpm install @coconutstudio/blocknote-word-exporter-mit\n```\n\n## API\n\n```js\nimport { blocksToDocx, prependDocumentTitle } from '@coconutstudio/blocknote-word-exporter-mit';\n\nconst blob = await blocksToDocx(editor.document, {\n  documentTitle: 'Pricing',\n  images: {\n    [blockId]: { data: uint8, widthPx: 720, heightPx: 400, alt: 'Chart' },\n  },\n  fetchFile: async (url) => {\n    const res = await fetch(url);\n    if (!res.ok) throw new Error(String(res.status));\n    return res.arrayBuffer();\n  },\n});\n```\n\n- Headings become Word Heading 1–6 in black (H1 largest).\n- Tables span the page content width.\n- Lists use package numbering (`cbn-bullet`, `cbn-number`).\n- `coconutVisual` blocks render as images when `images[block.id]` is set; otherwise a `[Chart: title]` caption.\n- Unknown block types become a short fallback paragraph instead of throwing.\n\nChart rasterization (HTML/SVG → PNG) stays in the host app; pass the bytes in `images`.\n\n## License\n\n[MIT](./LICENSE) © coconutStudio\n","readmeFilename":"README.md","repository":{"type":"git","url":"git+https://github.com/coconutstudio-io/blocknote-word-exporter-mit.git"},"bugs":{"url":"https://github.com/coconutstudio-io/blocknote-word-exporter-mit/issues"}}