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

@agora-build/chisel-dev

v0.3.7

Published

Framework-agnostic dev style panel for live CSS variable editing, custom CSS injection, and content editing

Readme

@agora-build/chisel-dev

Framework-agnostic dev style panel for live CSS variable editing, custom CSS injection, and content editing. Works with React, Vue, Svelte, or vanilla HTML.

Features

  • Theme editor — auto-detects CSS custom properties from your stylesheets, with color pickers and text inputs
  • CSS editor — inject arbitrary CSS, applied instantly
  • Content editor — pick any text element on the page, edit it, apply the change
  • Save to file — writes changes back to your source files (CSS variables and text content)
  • Save & commit — saves and creates a git commit in one click
  • Persistent — overrides survive page refresh via localStorage
  • Zero runtime deps — vanilla JS core, optional React wrapper

Install

npm install @agora-build/chisel-dev

Quick Start

Vanilla JS

import { mountPanel } from "@agora-build/chisel-dev";

mountPanel(); // toggle with Ctrl+Shift+D

React

import { ChiselPanel } from "@agora-build/chisel-dev/react";

function App() {
  return (
    <>
      {/* your app */}
      {import.meta.env.DEV && <ChiselPanel />}
    </>
  );
}

Express Middleware (for save-to-file)

import express from "express";
import { chiselMiddleware } from "@agora-build/chisel-dev/middleware";

const app = express();
app.use(express.json());

if (process.env.NODE_ENV !== "production") {
  chiselMiddleware(app, {
    cssFile: "src/index.css",
    srcDirs: ["src"],
  });
}

API

mountPanel(options?): DevPanel

Mount the panel to the DOM. Returns a DevPanel instance with mount() and unmount() methods.

new DevPanel(options?)

Create a panel instance without mounting. Call panel.mount(target?) to attach.

ChiselPanel (React)

React component wrapper. Mounts on render, unmounts on cleanup. Accepts all PanelOptions as props.

chiselMiddleware(app, options?)

Register save routes on an Express app or router. Adds two POST endpoints:

  • POST {apiPrefix}/save-styles — update CSS variables in source file
  • POST {apiPrefix}/save-content — find-and-replace text in source files

Both accept ?commit=true query param to auto-commit.

Options

PanelOptions

| Option | Type | Default | Description | |--------|------|---------|-------------| | apiPrefix | string | "/api/dev" | API route prefix for save endpoints | | storageKey | string | "chisel-dev-panel" | localStorage key for persisting overrides | | shortcut | object | { ctrl: true, shift: true, key: "D" } | Keyboard shortcut to toggle panel | | variables | VarGroup[] | auto-detected | Explicit variable groups (skips auto-detection) | | position | "left" \| "right" | "right" | Panel position | | width | number | 380 | Panel width in pixels |

MiddlewareOptions

| Option | Type | Default | Description | |--------|------|---------|-------------| | cssFile | string | "src/index.css" | Path to the CSS file to edit | | srcDirs | string[] | ["src"] | Directories to search for content replacements | | extensions | string[] | [".tsx", ".ts", ".jsx", ".js", ".vue", ".svelte"] | File extensions to search | | commitMessage | string | "style: update theme variables via chisel" | Git commit message | | apiPrefix | string | "/api/dev" | API route prefix |

How It Works

Theme tab: On mount, scans all document.styleSheets for CSS custom properties (--*). Groups them by prefix (--sidebar-* -> "Sidebar", --chart-* -> "Chart"). Detects color values (HSL, hex, rgb) and shows color pickers for those.

CSS tab: Creates a <style> element and updates its textContent on every keystroke.

Content tab: Uses document.addEventListener("click", ..., true) in capture phase to intercept clicks during pick mode. Stores original/replacement pairs and sends them to the middleware for find-and-replace in source files.

Save: The middleware receives variable overrides and does regex replacement in the CSS file (--name: oldvalue; -> --name: newvalue;). Content changes are string-replaced across all files in the configured source directories.

Entry Points

| Import | Description | |--------|-------------| | @agora-build/chisel-dev | Client: mountPanel(), DevPanel, utilities | | @agora-build/chisel-dev/middleware | Server: chiselMiddleware() | | @agora-build/chisel-dev/react | React: <ChiselPanel /> |

License

MIT