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

@tegg/markdown

v0.2.0-preview.2

Published

Source-first Markdown reader and editor with required attribution.

Readme

Tegg Markdown

Read, edit and preserve Markdown generated by people and agents. A source-first browser SDK with Reader, Live Edit and Source modes.

Source available · free commercial use with required attribution. The custom Tegg Markdown Attribution License 1.0 requires Powered by Tegg Markdown in the relevant interface. A separate written commercial agreement can permit white-label use. This project is not offered under Apache-2.0 and does not claim OSI approval.

Status

Registry release candidate 0.2.0-preview.2, prepared for the public npm preview dist-tag. Registry publication is pending; the existing immutable Git preview v0.2.0-preview.1 remains available. Source, tests, types, styles and mandatory license materials are included. See release status.

The default integration requires no Tegg account, cloud, activation or telemetry. The Host owns document identity, persistence, resources, permissions and conflicts. Capabilities and limits describe the supported boundaries.

Install the Git preview

npm install 'git+https://github.com/tegg-studio/tegg-markdown.git#v0.2.0-preview.1'

The versioned Git tag identifies the reviewed preview. This does not publish or reserve an npm registry scope. For reproducible deployments, retain the resolved commit in your lockfile. Start with the integration guide and choose optional engines explicitly.

Run the example

Requires Node.js 22.12+ and npm.

npm ci
npm run check
npm run dev

Open the printed localhost address. Use the formatting toolbar, outline, reading settings, Markdown file import/export, three modes, local save and reopen. The example's localStorage is demonstration persistence, not a production storage or multi-user concurrency implementation. Reopen asks before discarding an unsaved draft. Cross-tab overwrite detection is a convenience check, not atomic multi-writer storage.

Install a packed build into your project

In this repository run npm pack. In a separate project run:

npm install /path/to/tegg-markdown-0.2.0-preview.1.tgz

Use a browser bundler supporting ES modules, CSS and web workers (the example uses Vite):

import {TeggMarkdownEditor} from "@tegg/markdown/editor";
import "@tegg/markdown/editor.css";

const editor = new TeggMarkdownEditor(container, {
  documentId: "notes/hello.md",
  revision: "1",
  source: "# Hello"
}, {
  onChange(change) { /* display unsaved state; your Host saves */ },
  onConflict(incoming, local) { /* offer explicit resolution */ },
  openLink(href) { /* apply your Host's navigation policy */ }
}, "live");

// When saving, capture the exact snapshot before starting I/O.
const saved = editor.snapshot();
// Host must atomically compare baseRevision and return its new revision.
const revision = await hostStorage.save(saved);
if (!editor.acknowledgeSaved(saved, revision)) {
  // Stale completion: reconcile with Host storage. Do not mark a new document saved.
}
editor.setMode("reader");
editor.destroy();

container is your HTMLElement and hostStorage is your implementation. Host contract explains save ordering and conflict handling. Source, Reader and Live Edit share the same document and undo session. Use TeggMarkdownReader when editing is unnecessary.

Attribution and commercial use

Normal reading, editing, undo and saving are complete under the free license. The default frame displays attribution outside document scrolling. You may adapt its presentation within these rules. The attribution: "host" option transfers display responsibility to your Host; it does not grant a white-label exemption.

See third-party notices, contribution terms, security reporting, and release process.

No application shell, customer content, cloud credentials or private repository history is included. This repository becomes the canonical SDK source; product applications migrate by consuming tested package versions.

See Mac alignment for shared-core integration and the remaining native/visual acceptance boundaries.

The browser example supports selecting a local folder for relative images and Markdown navigation, with a document selector and a narrow-window outline/settings panel. Browser saves and exports are explicit; selected files are never overwritten. See the file access boundaries.

Integration guides

Start with getting started, then React, engines and renderers, appearance and language, security and CSP, migration and support policy. Syntax compatibility uses public standards and generic fixtures; partner-specific documents are not an acceptance prerequisite.