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

@notesnook-importer/onenote

v1.1.1

Published

A fully tested type-safe Microsoft OneNote .one/.onetoc2/.onepkg parser used in Notesnook Importer.

Readme

@notesnook-importer/onenote

Microsoft OneNote .one / .onetoc2 / .onepkg parser and HTML converter. Reads OneNote files directly — no OneNote installation or export step required. Implemented as a from-scratch parser for the OneNote desktop file format ([MS-ONESTORE] / [MS-ONE]) with an HTML converter modeled after one2html.

Part of the Notesnook Importer monorepo.

Install

npm install @notesnook-importer/onenote

Requires @notesnook-importer/core (peer dependency for HTML element types).

Supported file formats

| Format | Notes | | --- | --- | | .one | OneNote sections (OneNote 2016 / 2019 / LTSC desktop format). | | .onetoc2 | Notebook tables of contents. Used to build the notebook hierarchy. | | .onepkg | OneNote package (CAB archive containing a notebook). Supports uncompressed, MSZIP and LZX/LZXD compression. |

Not supported: files in the FSSHTTPB packaging format (OneDrive web UI downloads), the legacy OneNote 2007 format, and encrypted sections without a password.

Getting OneNote files

| Source | How to get the files | | --- | --- | | OneNote desktop (2016, 2019, LTSC) | Export as a .onepkg package via File → Export → Notebook → OneNote Package, or select files/folders directly. | | OneDrive | Download the notebook folder from OneDrive (contains .onetoc2 + .one section files). | | OneNote for Windows 10/11 | Export each section as a .one file via Settings → Export. |

Zip archives containing any of the above are unpacked automatically.

Keep the folder structure. A .onetoc2 file only imports the .one files in the same directory (and subdirectories for section groups).

What it does

  • Parses .onetoc2 notebooks to resolve section ordering and section groups
  • Section groups become nested folders; each page becomes a note
  • Converts page content to Notesnook HTML, preserving visual layout (positioning, indentation, sizes)

Notebook structure

  • Notebooks (.onetoc2) and their section ordering
  • Section groups, including nested groups, imported as nested notebooks
  • Standalone sections (.one files without a notebook)

Pages

  • Page titles (including title formatting and HYPERLINK marker cleanup)
  • Created & last modified dates, author, and page level (sub-pages)
  • Pages with no title fall back to Untitled Page N; empty pages are skipped

Text & formatting

  • Rich text paragraphs with per-character text runs
  • Bold, italic, underline, strikethrough, superscript, subscript
  • Font family, font size, font color, text highlight color
  • Paragraph alignment (left/center/right) and spacing
  • Hyperlinks — both the hidden \uFDDF HYPERLINK marker format and plain http(s):// text

Lists & note tags

  • Numbered lists (decimal, upper/lower roman, upper/lower latin) and bulleted lists
  • List restart values, bullet fonts/colors, Wingdings bullet fixes
  • Note tags & to-do checkboxes: 30+ checkable shapes render as checkbox icons
  • Other tag icons (star, question mark, priority, contact, light bulb, etc.)
  • Note tag label highlight/text colors applied to content

Tables

  • Tables with row/column counts, column widths, locked columns, visible borders
  • Cell background colors and cell contents (including nested lists and note tags)

Images & attachments

  • Embedded images extracted and imported as attachments (with OCR alt text and width/height constraints)
  • Embedded files (documents, audio, video) imported as attachments with original file names

Ink (handwriting)

  • Handwritten ink rendered as inline SVG strokes, preserving stroke color, width, pen tip style, and page position
  • Ink embedded inside text paragraphs (inline handwriting, spaces, line breaks)

Encrypted sections

Password-protected sections are fully supported via [MS-OFFCRYPTO] Agile Encryption (AES-256-CBC with SHA-512 key derivation).

Providing a password — Provider API:

settings.options = {
  onenote: {
    getPassword: async (filename) => {
      return passwords[filename];
    }
  }
};

Providing a password — Direct API:

const section = await parseOneNoteSection(bytes, "My Section", "s3cret");
const notebook = await parseOneNoteNotebook(tocBytes, resolveFile, "s3cret");

Not supported

  • FSSHTTPB/OneDrive packaging format — files downloaded via the OneDrive web UI in "package" format
  • OneNote 2007 (or earlier) legacy format and alternative packaging
  • Encrypted sections without a password — skipped with a warning; provide a password to decrypt
  • Math/equation formatting — imported as plain text
  • Ink handwriting recognition (OCR) text — recognized text is parsed but not added to the note
  • Audio/video recordings — imported as attachment only when embedded; external onefiles references are skipped
  • Version history & conflict pages — only the current revision is imported
  • Section/notebook colors — read but not applied to notes yet

Usage

import {
  parseOneNoteSection,
  parseOneNoteNotebook,
  parseOneNoteNotebookToc,
  extractOnepkg,
  isOnepkg,
  renderPage,
  sniffOneNoteFileType,
  OneNoteEncryptedError
} from "@notesnook-importer/onenote";

License

GPL-3.0-or-later