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

@matrajs/collab

v0.15.0

Published

Collaborative editing for Matra — step exchange, rebasing and presence. No CRDT dependency.

Readme

@matrajs/collab

Collaborative editing for Matra. No CRDT, no dependency — the engine can already rebase a step over someone else's edit, so this is a version counter and a transport on top of that.

npm i @matrajs/core @matrajs/collab
import { collab, sendableSteps, getVersion } from '@matrajs/collab'

const editor = createEditor({
  extensions: [...starterKit, collab({ clientId })],
  content,
})

// Send what we have; the authority accepts only if we are current.
const sendable = sendableSteps(editor)
if (sendable) {
  const accepted = await post(sendable)
  if (accepted) editor.commands.confirmCollabSteps(sendable.steps.length)
}

// Pull what we missed. Local work is rewound, remote steps applied, then local
// work replayed on top — so unsent edits survive someone else's.
editor.commands.receiveCollabSteps(await since(getVersion(editor)))

Authority is the server half, deliberately transport-free so the same object works over WebSocket, HTTP polling, or an in-memory channel in a test.

remoteCursors() draws everyone else's caret and selection, as decorations rather than as document content — so nothing about presence travels with a copy, an export, or an undo.

import { collab, remoteCursors, remoteCursorCSS } from '@matrajs/collab'

const editor = createEditor({
  extensions: [...starterKit, collab({ clientId }), remoteCursors()],
})

// Whatever your transport delivers.
socket.on('presence', (p) => editor.commands.setPresence(p))
socket.on('left', (id) => editor.commands.removePresence(id))

A caret arrives as a position in the sender's document, and is wrong the moment anything is typed locally. Each one is mapped through the same steps the local document went through, which is the only thing that keeps a caret on the word it was actually next to — clamping it to the document size, the obvious shortcut, silently points every cursor at the wrong place.

Colours come from colorFor(clientId), derived rather than assigned, so two clients that never speak still agree on what colour a third person is. Drop in remoteCursorCSS for enough styling to see a caret, or write your own against .matra-remote-cursor, .matra-remote-cursor-label and .matra-remote-selection.

  • Source: https://github.com/amrelaco/matra

Licence

Source-available under the Matra Commercial License, not MIT — unlike @matrajs/core, which is MIT and stays that way.

Free for evaluation, development, testing, personal projects, education, and internal tools at organisations with fewer than three developers on the codebase. Paid, one seat per developer, for production use beyond that. No licence key and no phone-home: the licence is the agreement, not a mechanism.

Versions up to and including 0.5.0 were published under MIT, and that grant cannot be withdrawn — if you are already on 0.5.0 you may keep using it under MIT indefinitely. The commercial licence applies from 0.6.0 onward.

[email protected]