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

on-codemerge

v2.8.0

Published

A WYSIWYG editor for on-codemerge is a user-friendly interface that allows users to edit and view their code in real time, exactly as it will appear in the final product

Readme

npm version npm downloads npm license npm type definitions GitHub issues GitHub stars Docs Donate

on-codemerge

Four editors on one kernel + SDK. JSON doc is the source of truth. Toolbar, popups, and menus live in a core-owned SDK — plugins register into it, they do not own chrome.

| Product | Import | Document | UI | | ------------ | ----------------------- | ---------------------------- | ------------------------------------- | | WYSIWYG | on-codemerge | Prose JSON (marks, atoms, …) | ContentEditable + widgets | | JSON | on-codemerge/json | JSON tree | Shell — Tree / Raw | | Markdown | on-codemerge/markdown | Prose JSON (MD block subset) | Shell — dual-pane source + preview | | Code | on-codemerge/code | Plain text (code_source) | Shell — gutter + structural highlight |

Documentation · Editors · Plugins · Integrate · npm

Low-level packages (optional — most apps only need on-codemerge): @codemerge/kernel, @codemerge/sdk, @codemerge/hunspell, @codemerge/collaboration-server. See Publishing packages. This repo is pnpm-only (install, scripts, release). Do not mix standalone @codemerge/sdk with on-codemerge in one app bundle.


Features

  • Four editor surfaces — WYSIWYG, JSON workspace, Markdown dual-pane, Code source (same package)
  • JSON document model — getJSON / setJSON as SoT; HTML and Markdown are import/export boundaries
  • Core-owned UI — editor.toolbar, editor.ui.popup, context menu, notify; plugins only register
  • Plugin packs — createDefaultPlugins() or lean createCorePlugins()
  • Published pages — getPublishedHTML / getPublishedDocument + dist/public.js runtimes (WYSIWYG / Markdown)
  • Source contour — shared gutter + structural highlight for JSON Raw, Markdown source, and Code
  • i18n — lazy locale packs (en bundled; ru, de, fr, … on demand)
  • Chrome modes — sticky toolbar (bar) or page-embed float (page)
  • TypeScript-first — typed Editor + @codemerge/sdk / kernel packages

Installation

npm install on-codemerge
# or
pnpm add on-codemerge
# or
yarn add on-codemerge

Quick start

WYSIWYG (on-codemerge)

import 'on-codemerge/index.css';
import 'on-codemerge/public.css';
import { Editor, createDefaultPlugins, insertText } from 'on-codemerge';

const host = document.getElementById('editor')!;
const editor = new Editor(host, {
  plugins: createDefaultPlugins(),
});

editor.run(insertText('Hello'));
console.log(editor.getJSON());

Lean essentials only:

import { Editor, createCorePlugins } from 'on-codemerge';

const editor = new Editor(host, {
  plugins: createCorePlugins(),
});

Published preview:

const html = editor.getPublishedHTML();
// pair with on-codemerge/public.css + dist/public.js when runtimes are needed

JSON (on-codemerge/json)

Tree + Raw for configuration / API payloads. Interchange via getText / setText.

import 'on-codemerge/index.css';
import { Editor, createDefaultPlugins } from 'on-codemerge/json';

const editor = new Editor(document.getElementById('json')!, {
  chrome: 'bar',
  plugins: createDefaultPlugins(),
});

editor.setText('{"hello":true}');

Markdown (on-codemerge/markdown)

Dual-pane source + HTML preview (callouts, mermaid, …).

import 'on-codemerge/index.css';
import 'on-codemerge/public.css';
import { Editor, createDefaultPlugins } from 'on-codemerge/markdown';

const editor = new Editor(document.getElementById('md')!, {
  chrome: 'bar',
  plugins: createDefaultPlugins(),
});

editor.setText('# Hello\n');

Code (on-codemerge/code)

Plain-text source with line gutter and structural highlight (comments, strings, numbers, …).

import 'on-codemerge/index.css';
import { Editor, createDefaultPlugins } from 'on-codemerge/code';

const editor = new Editor(document.getElementById('code')!, {
  chrome: 'bar',
  plugins: createDefaultPlugins(),
});

editor.setText('const x = 1;\n');

Full comparison: Editors guide.

Docs & demos

| | | | ------------------- | --------------------------------------------------------------------------------------------------------------------------- | | Docs site | https://s00d.github.io/on-codemerge/ | | Editors | guide/editors | | Editor API | guide/editor | | SDK | guide/sdk | | Migrate v1 → v2 | guide/migration | | demo stand | demo/ — WYSIWYG / JSON / Markdown / Code / Forms / Charts / Calendar / Tables — cd demo && pnpm i && pnpm dev |

Plugins use core.* and editor.toolbar / ctx.popup — do not deep-import the kernel from app code.

Package surface

| Import | Role | | ------------------------- | ---------------------------------------------------- | | on-codemerge | WYSIWYG Editor, plugin factories, IO helpers | | on-codemerge/json | JSON workspace Editor + createDefaultPlugins | | on-codemerge/markdown | Markdown dual-pane Editor + createDefaultPlugins | | on-codemerge/code | Code source Editor + createDefaultPlugins | | on-codemerge/sdk | definePlugin, h / mount, toolbar/popup types | | on-codemerge/index.css | Editor chrome | | on-codemerge/public.css | Published page styles | | on-codemerge/public.js | Published page runtimes |

License

MIT