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

@domternal/extension-block-controls

v0.12.1

Published

Notion-style block controls for the Domternal editor: BlockHandle (hover gutter + drag), SlashCommand, FloatingMenu, ContextMenu, keyboard reorder, and SmartPaste

Readme

@domternal/extension-block-controls

Version MIT License

Notion-style block controls for the Domternal editor. Ships six coordinated extensions: BlockHandle, BlockContextMenu, SlashCommand, SmartPaste, KeyboardReorder, and FloatingMenu (each described under Extensions below). They cooperate through DOM events, so opening one overlay closes the others.

Links

Website    •    Documentation    •    Live examples

Install

pnpm add @domternal/extension-block-controls

@domternal/core and @domternal/pm are peer dependencies and are pulled in by any Domternal editor setup.

Usage

Add the extensions you want to your editor's extension list. Most apps use the full set together for the Notion experience:

import { Editor, StarterKit } from '@domternal/core';
import {
  BlockHandle,
  BlockContextMenu,
  SlashCommand,
  SmartPaste,
  KeyboardReorder,
  FloatingMenu,
} from '@domternal/extension-block-controls';
import '@domternal/theme';

const editor = new Editor({
  element: document.getElementById('editor')!,
  extensions: [
    StarterKit,
    BlockHandle.configure({ nested: true }),
    BlockContextMenu,
    SlashCommand,
    SmartPaste,
    KeyboardReorder,
    FloatingMenu.configure({
      element: document.getElementById('floating-menu')!,
      requireExplicitTrigger: true,
    }),
  ],
});

The SlashCommand and FloatingMenu popups draw their items from editor.floatingMenuItems (collected from every extension's addFloatingMenuItems() hook), so installed extensions register their own insert actions automatically.

Extensions

  • BlockHandle - hover gutter with a + insert button and a drag handle. The + button inserts an empty paragraph and opens the FloatingMenu; the drag handle opens the context menu on click and reorders with a nesting-aware drop indicator on drag.
  • BlockContextMenu - Delete / Duplicate / Turn into actions, opened from the drag handle. Also shows a "Copy link" item when the block has an id (and UniqueID is loaded), and a "Colors" section when the BlockColor extension is loaded; each is toggleable via turnIntoEnabled / copyLinkEnabled / blockColorEnabled.
  • SlashCommand - typing / opens a filtered, ranked popup of insertable blocks; selecting one replaces the /query range and runs the item's command.
  • SmartPaste - keeps block-level formatting intact when pasting at an inline cursor.
  • KeyboardReorder - Mod-Shift-ArrowUp / Mod-Shift-ArrowDown move the current top-level block.
  • FloatingMenu - the empty-line insert menu; requireExplicitTrigger gates it behind the + button for Notion mode.