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

docstar-editor

v0.4.4

Published

A minimal block/markdown editor for React with optional real-time collaboration.

Readme

docstar-editor

A minimal, block-based Markdown editor for React, built on BlockNote. Works standalone with zero setup, and opts into real-time collaboration + server-side sync when you connect it to a Hocuspocus-compatible server.

Install

npm i docstar-editor

Import the base styles once in your app:

import "docstar-editor/styles.css";

Note for bundled apps: @blocknote/core resolves a prosemirror-view version that's missing an export it needs. Add this to your own package.json to pin a working version for this package's dependency subtree:

"overrides": {
  "docstar-editor": {
    "prosemirror-view": "1.33.9"
  }
}

(npm workspaces/pnpm/yarn have their own equivalent — overrides/resolutions — under the same idea: scope the pin to docstar-editor's own dependency tree, not your whole app.)

Standalone usage

No login, no server required:

import { DocstarEditor } from "docstar-editor";

export function Page() {
  return (
    <DocstarEditor
      defaultMarkdown="# Hello\n\nStart writing..."
      onChange={(markdown) => console.log(markdown)}
    />
  );
}

Real-time collaboration

Connect the editor to your own Hocuspocus-compatible server (see doc-rtc for a reference implementation) for live multi-user sync with persistence:

import { DocstarEditor } from "docstar-editor";

export function Page() {
  const collab = {
    wsUrl: "wss://your-server.example.com",
    token: authToken,
    workspaceId: "workspace-abc",
    documentId: "doc-123",
    user: { name: "Swayam", color: "#5b8def" },
  };

  return <DocstarEditor collab={collab} />;
}

When collab is provided, the editor connects over WebSocket, syncs edits live via Yjs, and shows collaborator cursors/presence automatically. Omit workspaceId/token to connect to a server that identifies documents directly by documentId instead (see wsParams in CollabConfig).

Local development / demo site

See website/ — a small standalone demo app (landing page + Playground/Import) that imports the editor directly from source, no build/pack step needed. It's local-only/single-user by design; it doesn't demonstrate the collab prop.

cd website
npm install
npm run dev

The site auto-deploys to GitHub Pages on every push to main that touches website/ or src/ (see .github/workflows/deploy-website.yml). One-time setup: in the repo's Settings → Pages, set Source to GitHub Actions.

Publishing to npm

# 1. Build and sanity-check what will be published
npm run build
npm pack --dry-run

# 2. Log in (one-time per machine; opens a browser to authenticate)
npm login

# 3. Bump the version (pick one)
npm version patch   # 0.1.0 -> 0.1.1, bug fixes
npm version minor   # 0.1.0 -> 0.2.0, new features
npm version major   # 0.1.0 -> 1.0.0, breaking changes

# 4. Publish
npm publish

# 5. Push the version bump commit + tag that `npm version` created
git push && git push --tags

npm version refuses to run with uncommitted changes — commit your work first. npm publish is public and irreversible (a given version can never be re-published, only deprecated), so double-check npm pack --dry-run's file list before running it.

License

MIT