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

@aionbuilders/nabu

v0.1.9

Published

Modular, local-first block editor engine for Svelte 5, built on a single contenteditable architecture and Loro-CRDT.

Readme

Nabu

Nabu is a modular, local-first block editor for Svelte 5. It combines the cross-block selection of document editors (Google Docs, ProseMirror) with the structural flexibility of block editors (Notion), on a single contenteditable and a CRDT core (Loro). You pick the blocks and behaviors you need from a list of extensions, from a <textarea> replacement to a full document editor, and save to the browser with one call.

Website, documentation and live demos: nabu.aion.builders

Community: join the Discord

Status: public beta (0.1.0). The editing core is complete and tested, but the API may still change before 1.0. Breaking changes are listed in the changelog (CHANGELOG.md). Known gaps (mobile keyboards, Firefox and Safari, tables, real-time collaboration between machines) are listed honestly on the limits page.

Versioning (0.x)

  • A 0. version means the API can still change. 1.0.0 will mark the stability commitment.
  • Breaking changes arrive only in a minor version (0.2.0, 0.3.0, ...), each with a migration note in the changelog.
  • Patch versions (0.1.x) are fixes only: they keep the public API and the stable @aionbuilders/nabu/extend contract.
  • nabu.internals is unstable and may change in any version.

Install

npm install @aionbuilders/nabu
# or
bun add @aionbuilders/nabu

Requirements

  • Svelte 5.20 or newer.
  • A Vite setup (SvelteKit, or Svelte + Vite) that can load WebAssembly. Loro ships as a WebAssembly module loaded with top-level await, so the build needs vite-plugin-wasm and build.target: 'esnext' (and, for server rendering, loro-crdt kept out of the SSR bundle). The bundled helper does all three:
// vite.config.js
import { defineConfig } from 'vite';
import { sveltekit } from '@sveltejs/kit/vite'; // or svelte()
import { nabu } from '@aionbuilders/nabu/vite';

export default defineConfig({
  plugins: [sveltekit(), nabu()]
});

Without this setup, Nabu fails to load. Why esnext, the manual equivalent and common errors: Installation.

Minimal example

<script>
  import { NabuEditor, createDocumentEditor } from '@aionbuilders/nabu';

  const engine = createDocumentEditor();
</script>

<NabuEditor {engine} />

Then read and write the content from the engine:

import { createDocumentEditor } from '@aionbuilders/nabu';

const engine = createDocumentEditor();
await engine.importMarkdown('# Hello\n\nSome **bold** text.');

expect(engine.serialize('markdown')).toBe('# Hello\n\nSome **bold** text.');
expect(engine.serialize('json').blocks).toHaveLength(2);

Add the optional UI from @aionbuilders/nabu/ui, and import a theme once:

<script>
  import '@aionbuilders/nabu/nabu-theme.css';
  import { NabuEditor, createDocumentEditor } from '@aionbuilders/nabu';
  import { FloatingToolbar, SlashMenu, DragHandle } from '@aionbuilders/nabu/ui';

  const engine = createDocumentEditor();
</script>

<FloatingToolbar {engine} />
<SlashMenu {engine} />
<DragHandle {engine} />
<NabuEditor {engine} label="Notes" />

Save to the browser (IndexedDB) with one call, and show a document as a viewer with readonly:

<script>
  import { NabuEditor, createPersistedEditor } from '@aionbuilders/nabu';

  let engine = $state(null);
  createPersistedEditor({ docId: 'my-notes' }).then((created) => (engine = created));
</script>

{#if engine}
  <NabuEditor {engine} label="Notes" />
  <!-- or, as a read-only viewer: <NabuEditor {engine} readonly /> -->
{/if}

Entry points

The public API is these entry points; everything else is internal and may change without notice.

| Import | What it is for | |---|---| | @aionbuilders/nabu | Using the editor: NabuEditor, the factories and presets, the built-in extensions, createPersistedEditor, Files, Regions, Todos, deltaToMarkdown... | | @aionbuilders/nabu/ui | The optional UI: FloatingToolbar, SlashMenu, DragHandle, CommandInvite, CommandChooser | | @aionbuilders/nabu/extend | Writing your own blocks and extensions: extension, Block, TextBlock, MegaBlock, TextBehavior, RichText, key-chord helpers | | @aionbuilders/nabu/format | Reading a document without the editor (no WebAssembly, works in Node and Bun): jsonToText, deltaToHtml, deltaToMarkdown, sanitizeUrl | | @aionbuilders/nabu/vite | The Vite helper nabu() shown above |

Presets

A preset is an array of extensions, and each has a factory.

| Preset | Factory | Contains | Tab | |---|---|---|---| | MinimalPreset | createMinimalEditor() | Paragraphs; plain text, HTML and Nabu paste; BlockExtension | leaves the editor | | TextPreset | createTextEditor() | Minimal + rich text marks, typography, inline markdown shortcuts, markdown paste | leaves the editor | | DocumentPreset | createDocumentEditor() | Text + headings, blockquote, divider, code, callout, toggle, image, video, file. No lists | stays in the editor | | FullPreset | createFullEditor() | Document + lists (bullet, numbered, to-do), dialogue, regions | stays in the editor |

createEditor({ preset, extensions }) is the generic factory: any preset, plus your own extensions. Details, the exact extension lists and how to add or remove extensions: Presets.

Documentation

Everything is on the website: nabu.aion.builders/docs.

In the repository: architecture decisions, design notes, tests.

Contributing

Bug reports, fixes, docs and tests are welcome: see CONTRIBUTING.md. Questions go to #help on the Discord.

License

MIT, as declared in package.json.