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

mroffice-core

v0.2.0

Published

The shared layer of the MR Office editors (the host adapter, ribbon, fonts and text measurement, themes, charts, SmartArt, equations); every editor package uses it.

Readme

mroffice-core

The shared layer of the MR Office editors, which every editor package depends on: the host adapter through which a page embeds an editor, the Office-style ribbon, fonts and text measurement, themes, charts, SmartArt and equations, and the interface text.

| Package | Editor | |---|---| | mroffice-docs | document editor | | mroffice-sheets | spreadsheet editor | | mroffice-slides | presentation editor | | mroffice-pdf | PDF editor | | mroffice-code | code editor |

npm i mroffice-core mroffice-docs

The host adapter

import { EditorHostProvider, type EditorHost } from "mroffice-core";

const host: EditorHost = {
  saveFile({ name, data }) { /* a file the editor hands out (an export, a download) */ },
  notify({ title, description }) { /* a toast */ },
};

<EditorHostProvider host={host} locale="en" fallback={<p>Loading…</p>}>
  {/* an editor: <docs.Component file={...} registerSave={...} onSaveRequest={...} /> */}
</EditorHostProvider>
  • EditorHostProvider: the host (saveFile, notify; by default files are downloaded) and the interface language (EDITOR_LOCALES).
  • Every editor package's default export is an EditorDefinition: extensions it opens, newFile(), and Component taking { file, registerSave, onSaveRequest, onDirty? } (EditorProps).
  • configureEditors({ assetsBaseUrl, sandboxOrigin }): where the assets are fetched from (below) and the origin of the Python sandbox page.
  • import "mroffice-core/style.css": the editors' stylesheet (each editor package carries the same file as <editor>/style.css). It includes a CSS reset of the page (Tailwind's preflight), as the editors expect; load it on the pages that show an editor.

The workspace, accounts, collaboration and AI of MR Office are not part of the open-source editors: where an editor would reach them it reaches the host, and a feature the host does not provide is absent.

Word, Excel and PowerPoint files

These packages are the open-source editors: they open and save their own formats (and HTML, Markdown, CSV, PDF). To open and save .docx, .xlsx and .pptx with full fidelity in your site, use the hosted MR Office editor: mroffice.ai/developers and the npm package mroffice-embed. The free desktop app opens them on a computer.

Next.js, webpack, Vite

The packages are ES modules with their types and a prebuilt stylesheet: no Tailwind, PostCSS or bundler settings needed. React 19 is a peer dependency.

In Next.js (App Router) the editors run in the browser only: load the component above without server rendering.

// app/editor/page.tsx
"use client";
import dynamic from "next/dynamic";
const Editor = dynamic(() => import("./Editor"), { ssr: false });
export default function Page() { return <Editor />; }

With webpack, the stylesheet import needs a CSS loader (css-loader + style-loader or mini-css-extract-plugin). Import mroffice-core/style.css once; every editor package's style.css is the same stylesheet.

Assets (fonts, PDF worker, dictionaries)

The installed packages hold the code and the stylesheet. The heavy files the editors fetch as they need them (the fonts that stand in for Office's, the PDF worker and its data, spelling dictionaries, the code runners' WebAssembly, the interface text in languages other than English) are the package mroffice-assets, fetched by default from jsDelivr: https://cdn.jsdelivr.net/npm/[email protected]/. Nothing to configure.

To serve them from your own site instead:

npm i -D [email protected]
cp -R node_modules/mroffice-assets public/mroffice-assets
// in a module imported before the editors
import { configureEditors } from "mroffice-core";
configureEditors({ assetsBaseUrl: "/mroffice-assets/" });

and import style.self-hosted.css in place of style.css (it leaves out the font declarations, which then come from /mroffice-assets/fonts.css; put <link rel="stylesheet" href="/mroffice-assets/fonts.css"> in the page's <head> to have them from the first paint).

License

AGPL-3.0-only with the additional terms in NOTICE.md: a copy or modified version that shows a user interface keeps a reasonable attribution to the original work (the text "MR Office" linking to https://mroffice.ai), and the names "MR Office" and "MR Note" are not licensed as trademarks. The bundled third-party code and its licenses are listed in THIRD_PARTY_NOTICES.md. A commercial license is available: [email protected].

The source is https://github.com/XinaTian/MROffice (packages/, built with npm run pack:npm).