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

@bayonai/rich-text-editor

v1.0.1

Published

Reusable rich text editing, rendering, and unsaved-change session controls.

Readme

@bayonai/rich-text-editor

Reusable rich-text document utilities, native React editing components, and unsaved-change session controls.

Exports

  • @bayonai/rich-text-editor provides document types, sanitization, serialization, comparison, statistics, and session controllers.
  • @bayonai/rich-text-editor/react provides the editor, renderer, EditorSessionProvider, session hooks, and the Save/Discard/Stay dialog.

The package has no Next.js, Firebase, or application-domain dependencies. Hosts provide controlled document values, optional metadata, persistence callbacks, and navigation adapters.

Maintainer Notes

Internal structure and behavior contracts are documented in BEHAVIOR.md. Read that file before changing tree-row, toggle, cursor, clipboard, or persistence behavior.

Editor Capabilities

  • Native rich-text body editing with headings, quotes, code, dividers, bullets, ordered bullets, checkboxes, toggles, image placeholders, and Markdown-compatible text storage.
  • Empty, undesignated blocks expose the special block insertion tool.
  • Non-empty top-level blocks expose a compact gutter handle for block actions.
  • Dragging a block handle reorders blocks with a visible drop indicator.
  • Clicking a block handle opens icon actions for copy, cut, delete, and close.
  • Copy and cut write readable plain text to the clipboard; cut removes the block only after the clipboard write succeeds.
  • Deleting the last block preserves one empty paragraph so the editor remains writable.
  • Checkbox rows can be created with the [] shortcut, reordered individually, copied, cut, and deleted. Pressing Enter from a checkbox creates the next checkbox, and Backspace at the start of a checkbox row converts that row back to a paragraph.
  • Bullet rows can be created with the * shortcut, and ordered rows can be created with the 1. shortcut. Empty list-like rows show placeholders instead of selecting placeholder text.
  • Bullet, ordered, checkbox, and toggle rows can hold nested children. Pressing Tab indents a nestable row under the previous compatible row, and Shift+Tab promotes it one level. Paragraph, heading, quote, code, divider, and image blocks remain flat. Editable and read-only nested rows render as recursive ul/ol plus li trees so list-like content keeps semantic list structure.
  • Toggle rows render as collapsible sections in read-only output and preserve their collapsed state in the stored block. Editable toggles can also be collapsed and expanded without dropping child content.
  • Browser-native transcription can be enabled by hosts with the editor's transcriptionEnabled option. It defaults to enabled, uses the browser SpeechRecognition or webkitSpeechRecognition API when available, inserts final transcript text into the current editor body, and never uploads or stores audio. Mobile Safari is treated as unavailable because its prefixed recognition sessions can get stuck and leave the editor unusable.