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

@barocss/math-editor-codemirror6

v0.2.3

Published

LaTeX source editing codemirror6 integration for Barocss math editor.

Readme

@barocss/math-editor-codemirror6

Edit LaTeX at the caret in a small math-editor popup. This adapter owns its source and version independently.

npm install @barocss/math-editor @barocss/math-editor-text @barocss/math-editor-codemirror6 @codemirror/state @codemirror/view @codemirror/commands
import '@barocss/math-editor/style.css';
import '@barocss/math-editor-text/style.css';
import { mathEditor } from '@barocss/math-editor-codemirror6';
// Include this extension in your EditorState configuration.
const extension = mathEditor({
  locale: 'en',
  syntax: 'markdown',
  onError: message => { statusElement.textContent = message; },
});

Place the caret inside $x+1$ and press Alt+Enter (Option+Enter on macOS), or click Edit formula. Select bare LaTeX to edit an expression without delimiters. Apply replaces its source and adds one undo step. Cancel preserves the original. An unchanged Apply does not normalize source. Any source change while the popup is open invalidates the draft; reopen it instead of overwriting a newer document.

Install the host's undo/history support. Read-only hosts do not apply edits. Monaco applications must configure their normal editor worker; this adapter does not replace the host's worker setup. VS Code uses a separate extension, not this Monaco adapter.

Options include locale, messages, syntax, resolveRange, toolbar, and onError. The @barocss/math-editor-text README documents the complete editing contract. A custom resolveRange can use the host syntax tree instead of the conservative built-in scanner.

Workspace imports resolve src. Published exports resolve dist. Build artifacts contain JavaScript and type declarations; host runtimes remain external. Initial version: 0.1.0. Publication is a separate release step.

MIT, copyright barocss.com. See LICENSE.

Optional direct LaTeX input

Pass sourceEditing: {} in the adapter options for command completion in the source editor. Add renderPreview(latex, element, displayMode) inside that object for a preview above the caret. KaTeX is not bundled; install it separately if used by your renderer. Use Up/Down and Enter to select, Tab/Shift+Tab to navigate inserted arguments, Ctrl+Space to open the catalog, and Alt+Enter for visual editing.

The source caret stays in the host. Completion changes only the command range and uses the host's Undo history. See the full setup and behavior guide.