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

legend-state-dev-tools-monorepo

v0.0.5

Published

> **Early-stage project** -- I discovered Legend State recently and chose it for a project I was working on. It had everything I needed from a state manager, but I couldn't live without dev tools, so I built this. It appears to work, but it hasn't been th

Downloads

3

Readme

legend-state-dev-tools

Early-stage project -- I discovered Legend State recently and chose it for a project I was working on. It had everything I needed from a state manager, but I couldn't live without dev tools, so I built this. It appears to work, but it hasn't been thoroughly tested yet -- consider it a proof of concept for now.

npm version license

Visual dev tools for Legend State v3 -- inspect and edit observable state in real time.

Features

  • Real-time state tree view powered by json-edit-react
  • Inline editing of observable values
  • Multiple color themes (dark and light variants)
  • Draggable toolbar
  • Configurable panel positioning (left or right)
  • Read-only mode
  • Clean teardown via destroy()

Installation

npm install legend-state-dev-tools
pnpm add legend-state-dev-tools
yarn add legend-state-dev-tools

Peer dependencies

| Package | Version | |---------|---------| | @legendapp/state | >= 3.0.0-beta.0 | | react | >= 18.0.0 | | react-dom | >= 18.0.0 |

Quick Start

import { observable } from '@legendapp/state';
import { init } from 'legend-state-dev-tools';
import 'legend-state-dev-tools/dist/styles.css';

const state$ = observable({ count: 0, user: { name: 'Alice' } });

const devtools = init(state$);

// Later, to clean up:
// devtools.destroy();

API Reference

init(observable$, options?)

Mounts the dev tools UI and returns a handle for cleanup.

Parameters

| Parameter | Type | Description | |-----------|------|-------------| | observable$ | ObservableParam<any> | The Legend State observable to inspect | | options | DevToolsOptions | Optional configuration (see below) |

Options

| Option | Type | Default | Description | |--------|------|---------|-------------| | enabled | boolean | true | Enable or disable the dev tools | | readOnly | boolean | false | Prevent editing of state values | | theme | string | 'githubDark' | Color theme for the JSON editor | | rootName | string | 'state$' | Label shown as the root node name | | position | 'left' \| 'right' | 'right' | Side of the screen for the panel |

Returns

{ destroy: () => void }

Call destroy() to unmount the toolbar, panel, and state subscription.

Themes

The following themes are available (provided by json-edit-react):

| Theme key | Description | |-----------|-------------| | githubDark | GitHub dark (default) | | githubLight | GitHub light | | monoDark | Monochrome dark | | monoLight | Monochrome light |

Example

A working example is included in examples/basic/. To run it:

npm install
npm run dev

This builds the core package and starts the Vite dev server for the example app.

Development

git clone <repo-url>
cd legend-state-dev-tools
npm install
npm run build   # build the core package
npm run dev     # build + start example dev server

Architecture

The project is a monorepo with the main package in packages/core/ and examples in examples/.

| Module | Path | Role | |--------|------|------| | index | packages/core/src/index.ts | Public API (init, options, lifecycle) | | state-bridge | packages/core/src/state-bridge.ts | Subscribes to observables, produces snapshots, writes back edits | | json-editor-mount | packages/core/src/ui/json-editor-mount.tsx | Mounts the json-edit-react editor with theme resolution | | panel | packages/core/src/ui/panel.ts | Slide-out panel DOM management | | toolbar | packages/core/src/ui/toolbar.ts | Draggable floating toolbar | | template-engine | packages/core/src/ui/template-engine.ts | Lightweight HTML templating (Eta) | | styles | packages/core/src/styles.css | Panel and toolbar CSS |

Acknowledgments

A huge thank you to Carlos for creating json-edit-react -- the excellent React component that powers the state tree viewer and editor in this project. Without it, these dev tools simply wouldn't exist.

License

MIT