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

@openleaf-editor/react

v0.1.0-beta.9

Published

React wrapper for the OpenLeaf custom element. The editor itself stays framework-free.

Downloads

66

Readme

@openleaf-editor/react

React wrapper for the OpenLeaf custom element.

Editor output is untrusted input. Whatever the editor produces — and whatever a user pasted into it — must be sanitized on your server before it is stored or rendered as HTML. Client-side sanitization is a user-experience feature, not a security control: anything the editor strips can be put back with developer tools, because the editor runs under the user's control.

@openleaf-editor/sanitize ships the canonical allowlist as data and generates configuration for DOMPurify, Python bleach and PHP HTMLPurifier from it, so client and server enforce the same rules. Read SECURITY.md before you ship.

Install

npm install @openleaf-editor/react@beta

Keep every @openleaf-editor/* package on the same version. They pin each other exactly, so mixing versions installs two copies of the schema and the toolbar registry -- and a node built by one is not a node type the other accepts.

Use it

import { OpenLeafEditor } from '@openleaf-editor/react'

<OpenLeafEditor
  value={html}
  onOpenLeafChange={setHtml}
  toolbar="bold italic | link"
/>

It is a wrapper, not a port

The editor is the <openleaf-editor> custom element. This forwards attributes, keeps a controlled value in sync, and re-emits openleaf:change. Nothing about editing lives here.

That is deliberate: three framework ports would be three copies of the schema and three sets of bugs, and a node built by one is not a node type another accepts. If you are not using React, skip this package -- the element works on its own and that is the supported path, not a fallback.

Importing this module does not touch the DOM, so it is safe in a server render. The element upgrades on the client.

License

Apache-2.0.

Full CMS editors can set canvas="iframe" before mount together with preserve-styles for independent viewport units and typography. The option is forwarded to the custom element. See isolated module viewport.