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

@trevixal/extension-track-changes

v1.0.5

Published

Track changes / suggestion mode for the Trevixal editor: attributed insertion and deletion marks with accept and reject.

Readme

@trevixal/extension-track-changes

CI npm types license

Documentation · Live editor · Changelog · Issues

The Trevixal editor

Features

  • Attributed insertion and deletion marks
  • Accept and reject, one change or all of them
  • 3.1 kB minified and gzipped, with TypeScript types in the package

Suggestion mode: edits become attributed, timestamped marks to accept or reject, instead of changes to the document.

npm install @trevixal/extension-track-changes

Usage

import { TrackChanges, trackChangesMarks, createTrackChangesBar } from '@trevixal/extension-track-changes'

// Schema: marks: { ...defaultMarks(), ...trackChangesMarks() }
const track = new TrackChanges(editor, { author: 'ada' })
track.enable()

// Typing  → <ins data-trevixal-author="ada" data-trevixal-timestamp="…">
// Deleting → the text stays, wrapped in <del …>

track.suggestions()   // [{ path, from, to, kind, author, timestamp }]
track.acceptAll()
track.rejectAll()
track.acceptAt(position)
track.disable()

createTrackChangesBar(editor, track, { container: reviewHost, author: 'You' })

Switching modes changes no document, so it raises no transaction, and anything watching the editor alone never hears about it. track.onEnabledChange(fn) does. The review bar subscribes to it, so a toggle anywhere (a View menu, a shortcut, a button of your own) is reflected at once:

const off = track.onEnabledChange((enabled) => setIndicator(enabled))

Without it a bar reads "off" while every keystroke is in fact being recorded as a suggestion. The worst way for this feature to be wrong, because the writer believes their edits are going in directly.

How it works, and why that matters

Suggestion mode is a dispatch transform: it rewrites each transaction before it applies, turning a deletion into a strike and an insertion into an attributed run. Every other command in the editor keeps working unchanged. Nothing had to learn about suggestions, because nothing sees them.

It also means history metadata set by the source transaction survives the rewrite, so an input rule that fires in suggestion mode still undoes as one step.

Suggestions carry a time

Each mark records an author and a timestamp, so a reviewer can order them and a document can show who suggested what, when. The attributes round-trip through parseHTML, so a suggestion survives copy and paste.

Known limit

Structural edits: pressing Enter, joining blocks, are not tracked while suggesting. The text of a suggestion is, but a new paragraph is applied directly. Splitting a block is not expressible as an ins/del pair over inline content, and pretending otherwise would produce a document that accept-all could not reconstruct.

License

Apache-2.0