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

@termaxjs/editor

v0.2.1

Published

Next-generation lightweight code editor for React — a modern alternative to CodeMirror and Monaco

Readme

@termaxjs/editor

Next-generation, high-performance code editor for React and Web: a lightweight modern alternative to CodeMirror 6 and Monaco Editor.

pnpm add @termaxjs/editor
# or npm install @termaxjs/editor

Modular Subpath Exports

@termaxjs/editor provides modular subpath imports so you only import what you need:

// 1. Ready-to-use React Editor Component
import { TermaxEditor } from "@termaxjs/editor";

// 2. Headless React Hooks & Context
import { useEditor, useBufferRange, useCursors } from "@termaxjs/editor/react";

// 3. Canvas & GPU WebGL Viewport Renderer
import { CanvasViewportRenderer, WebGLGlyphAtlas } from "@termaxjs/editor/canvas";

// 4. Core Headless State & Math Data Structures
import { PieceTable, EditorState, DecorationSet } from "@termaxjs/editor/core";

// 5. Host Runtime Adapters
import { InMemoryEditorAdapter, WasmEditorAdapter } from "@termaxjs/editor/adapter";

Quickstart

import React, { useState } from "react";
import { TermaxEditor } from "@termaxjs/editor";

export function CodeEditor() {
  const [code, setCode] = useState("const greeting = 'Hello from Termax!';");

  return (
    <div style={{ height: "500px", width: "100%" }}>
      <TermaxEditor
        defaultValue={code}
        language="typescript"
        rendererMode="canvas" // "canvas" (default) or "dom"
        minimap={{ enabled: true, side: "right", width: 80 }}
        lineNumbers={true}
        onChange={(val) => setCode(val)}
      />
    </div>
  );
}

Props Reference

  • adapter — Any IEditorHostAdapter (WASM worker, Tauri IPC, or in-memory). Omit for pure in-memory editing.
  • filePath — Automatically detects language and keys the adapter buffer.
  • rendererMode — "canvas" (GPU accelerated immediate mode) or "dom" (virtualized DOM).
  • readOnly — Disables all mutations (useful for large files or preview mode).
  • onSnapshot — Fires when the adapter buffer snapshot opens.
  • diagnostics, languageAdapter — LSP-backed diagnostics and completions from the host.

Accessibility Contract

  • The offscreen textarea is the keyboard and screen-reader interface (labeled with the current line position); the visual line surface is aria-hidden.
  • Completions follow the listbox pattern driven from the textarea (arrows cycle, Enter/Tab accepts, Escape dismisses) with aria-activedescendant.
  • Find/replace is a labeled dialog with a live-region match counter; fold gutter entries and the minimap scrubber are keyboard-operable.

Performance & Rendering

  • Sub-millisecond Typing Latency: 206 µs per edit with in-place chunk coalescing.
  • Virtualized Viewport: Only visible lines (+ overscan) are rendered.
  • Canvas / WebGL Engine: Zero DOM layout thrashing and zero contenteditable browser bugs.