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

@hirokisakabe/pom-editor

v0.3.1

Published

Visual AST editor component for pom — drag-and-drop slide structure editing.

Readme


Features

  • Drag-and-Drop Structure Editing — Reorder siblings, move nodes between VStack / HStack / Layer containers, pull container children up to the root, or nest a container inside another — all by dragging in the AST tree.
  • Distinct "between" vs "inside" Drop Targets — Dropping on the gap before/after a row inserts as a sibling; dropping on a container body itself nests the node inside.
  • XML In / XML Out — Accepts a pom XML string via xml and returns the updated XML via onChange after each edit, so it drops into any editor / preview layout.
  • AST-Aware Tree View — Renders the parsed pom AST as a labeled tree so the structure of slides and nested containers is visible at a glance.
  • Powered by @dnd-kit/core — Built on @dnd-kit/core's PointerSensor for pointer-driven drag interactions.

Installation

Requires React 18+

npm install @hirokisakabe/pom-editor react

@hirokisakabe/pom is pulled in automatically as a regular dependency — no separate install needed.

Quick Start

import { PomAstEditor } from "@hirokisakabe/pom-editor";
import { useState } from "react";

const initialXml = `
<Slide>
  <VStack gap="16" padding="24">
    <Text fontSize="32" bold="true">Title</Text>
    <Text>Body text</Text>
  </VStack>
</Slide>
`;

function App() {
  const [xml, setXml] = useState(initialXml);

  return (
    <div style={{ display: "flex", height: "100vh" }}>
      <div style={{ width: 300, borderRight: "1px solid #e5e7eb" }}>
        <PomAstEditor xml={xml} onChange={setXml} />
      </div>
      <div style={{ flex: 1, padding: 24 }}>
        <pre>{xml}</pre>
      </div>
    </div>
  );
}

API

<PomAstEditor xml onChange />

| Prop | Type | Description | | ---------- | ----------------------- | -------------------------------------------------------- | | xml | string | pom XML string (one or more <Slide> elements) | | onChange | (xml: string) => void | Called with updated XML after each drag-and-drop reorder |

Renders a tree of nodes from the parsed XML. Each row supports two drop targets:

  • A thin gap between rows — drop here to insert as a sibling at that position (works across parents, so a node can be moved to any container or pulled up to the root).
  • The container row body itself — drop here to nest the dragged node as the last child of that container (VStack / HStack / Layer only). Drops on non-container bodies are ignored.

Top-level slides can be reordered via the root-level gaps. Cycle-forming drops (e.g. moving a container into its own descendant) are silently rejected.

License

MIT