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

@floatboat/nexus-core

v0.0.14

Published

Framework-agnostic Markdown editor engine powering Nexus-Editor — CodeMirror 6 + Lezer with Obsidian-style live preview. See the [repository README](../../README.md) for the full feature tour; this file documents core-specific public APIs.

Readme

@floatboat/nexus-core

Framework-agnostic Markdown editor engine powering Nexus-Editor — CodeMirror 6 + Lezer with Obsidian-style live preview. See the repository README for the full feature tour; this file documents core-specific public APIs.

Install

pnpm add @floatboat/nexus-core
import { createEditor } from "@floatboat/nexus-core";

const editor = createEditor({
  container: document.querySelector("#editor")!,
  initialValue: "# Hello",
  livePreview: true,
});

Multi-cursor / multi-selection

Opt-in via multiCursor: true (off by default — it swaps the native caret/selection rendering for CodeMirror-drawn layers):

const editor = createEditor({
  container,
  initialValue: "# Hello",
  multiCursor: true,
});

When enabled:

| Interaction | Effect | |---|---| | Alt+Click | Add a cursor at the clicked position | | Mod-d | Select word under cursor, then next occurrence of the selection (VS Code style, wraps around) | | Mod-Alt-ArrowUp / Mod-Alt-ArrowDown | Add a cursor on the previous / next line, column preserved | | Escape | Collapse to the main selection (falls through to other Escape handlers when already single) |

Mod is Cmd on macOS and Ctrl elsewhere. Markdown niceties are multi-range aware: Enter continues lists/blockquotes at every cursor, and the ` / ** / ~~ auto-pairing wraps every selection. Live preview reveals raw syntax at every cursor position.

The commands are exported standalone for hosts that want custom bindings, plus the bundled keymap and extension:

import {
  selectNextOccurrence,
  addCursorAbove,
  addCursorBelow,
  collapseToMainSelection,
  multiCursorKeymap,
  multiCursorExtension,
} from "@floatboat/nexus-core";

Selections API

editor.getSelection();   // main range: { anchor, head }
editor.getSelections();  // all ranges: { ranges: [{ anchor, head }, ...], mainIndex }

editor.setSelection(5);                                  // single cursor
editor.setSelections([{ anchor: 2 }, { anchor: 9, head: 14 }]);  // multiple ranges
editor.setSelections([{ anchor: 2 }, { anchor: 9 }], 0);         // explicit main range

editor.on("selectionChange", ({ anchor, head, ranges, mainIndex }) => {
  // anchor/head describe the main range; ranges carries all of them
});

Multiple ranges in setSelections require multiCursor: true — without the flag CodeMirror collapses the selection to its main range.

Other config highlights

See the EditorConfig type for the full surface: livePreview, plugins, theme / setTheme, locale, readOnly, tabSize, direction, indentGuides, parseDelayMs, slashMenuLimit, onChange / onFocus / onBlur / onAssetUpload.