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

@twreporter/lexical-editor

v0.2.0-beta.14

Published

Reusable Lexical editor package for the monorepo.

Readme

@twreporter/lexical-editor

Reusable Lexical editor package for the monorepo.

Background

This package extracts the Lexical editor implementation from the Keystone 6 CMS project into a shared monorepo package.

Current goals:

  • share editor logic between cms and frontend
  • keep editor core independent from any single styling solution
  • support multiple theme implementations
  • make future editor-related features easier to maintain

Scope

This package is intended to provide:

  • editor core logic
  • Lexical nodes / commands / serialization helpers
  • React integration layer
  • theme adapters for different consumers

This package is not intended to own:

  • CMS global design system
  • Keystone-specific page layout
  • frontend app-specific business logic

Proposed Structure

src/
  core/
  react/
  themes/
    emotion/
    tailwind/

Layer Responsibilities

core/ Contains editor domain logic that should not be tied to a styling system.

Examples:

  • nodes
  • commands
  • transforms
  • serialization
  • theme type definitions

react/ Contains React / Lexical React integration.

Examples:

  • editor shell
  • plugins
  • hooks
  • context
  • React composition logic

themes/ Contains theme implementations for different consumers.

Examples:

  • themes/emotion for CMS
  • themes/tailwind for frontend

Installation

This package is intended to be consumed from the monorepo workspace.

Example:

yarn workspace cms add @twreporter/lexical-editor

or via workspace dependency in package.json.

Usage

To use the LexicalEditor component, you should import component itself, theme config, and css file.

// import component
import { LexicalEditor } from '@twreporter/lexical-editor'
// import css
import '@twreporter/lexical-editor/style'
// import theme config (use emotion version for example)
import { createEmotionEditorTheme } from '@twreporter/lexical-editor/theme-emotion'
import { cmsEditorNodes, type EditorConfig } from '@twreporter/lexical-editor/core'

const createCmsEditorConfig = (): EditorConfig => ({
  theme: createEmotionEditorTheme(),
  nodes: cmsEditorNodes,
  ui: { toolbar: true }
})

// use component
const config = createLexicalEditorConfig()
<LexicalEditor value={valueJSON} onChange={onChange} config={config} />

Build

yarn workspace @twreporter/lexical-editor build

Dev

yarn workspace @twreporter/lexical-editor dev

Design Principles

  • editor core should not depend on Emotion or Tailwind
  • React integration should not hard-code a single theme implementation
  • consumer-specific composition should stay outside core
  • theme layer should be replaceable

Notes

  • This package currently targets React-based consumers only.
  • Styling strategy is adapter-based rather than package-wide lock-in.
  • CMS-specific or frontend-specific business behavior should be injected from the consumer when possible.