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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@quantajs/devtools

v2.0.0-beta.9

Published

DevTools for QuantaJS

Downloads

398

Readme

@quantajs/devtools

Logo

Developer tools for QuantaJS - A visual debugging interface for inspecting stores, monitoring state changes, and replaying actions in real-time.

🚀 Features

Real-time Store Inspector – View live state, getters, and actions
Action Log – Track all state mutations with timestamps and payloads
Auto-Detection – Automatically detects development environment
Framework Agnostic – Works with vanilla JS, React, or any framework
Modern UI – Built with Preact and Tailwind CSS v4
Lightweight – Minimal bundle size with tree-shaking support

📦 Installation

npm install @quantajs/devtools @quantajs/core
# or
yarn add @quantajs/devtools @quantajs/core
# or
pnpm add @quantajs/devtools @quantajs/core

⚡ Quick Start

Automatic Mounting (Recommended)

The DevTools automatically detect your development environment and mount themselves:

import { createStore } from '@quantajs/core';
import { mountDevTools } from '@quantajs/devtools';

// Create your stores
const counterStore = createStore('counter', {
    state: { count: 0 },
    actions: {
        increment() {
            this.count++;
        },
    },
});

// Mount DevTools (auto-detects dev environment)
mountDevTools();

Manual Mounting with Options

import { mountDevTools } from '@quantajs/devtools';

// Force show DevTools
mountDevTools({ visible: true });

// Mount to custom element
mountDevTools({
    visible: true,
    target: document.getElementById('devtools-container'),
});

React Integration

import React from 'react';
import { QuantaDevTools } from '@quantajs/react';

function App() {
    return (
        <div>
            <YourApp />
            <QuantaDevTools />
        </div>
    );
}

🎨 Features Overview

Store Inspector

  • Live State Viewing – See your store state update in real-time
  • Nested Objects – Expandable tree view for complex state
  • Getters – View computed values alongside state
  • Actions – List of all available actions

Action Log

  • Action History – Complete log of all dispatched actions
  • Timestamps – Track when actions were called
  • Payloads – View arguments passed to actions
  • Store Context – See which store each action belongs to

🔧 API

mountDevTools(options?)

Mounts the DevTools to your application.

Options:

interface DevToolsOptions {
    /**
     * Whether to show the DevTools.
     * If not provided, auto-detects development environment.
     */
    visible?: boolean;

    /**
     * Target element to mount into.
     * Defaults to 'body'.
     */
    target?: HTMLElement | string;
}

Returns: Cleanup function to unmount DevTools

Example:

const cleanup = mountDevTools({ visible: true });

// Later, unmount DevTools
cleanup();

DevTools Component

Preact component that can be manually integrated:

import { render } from 'preact';
import { DevTools } from '@quantajs/devtools';

render(<DevTools />, document.body);

🎯 Usage Tips

Development Only

Ensure DevTools are only included in development builds:

if (process.env.NODE_ENV === 'development') {
    import('@quantajs/devtools').then(({ mountDevTools }) => {
        mountDevTools();
    });
}

With Vite

if (import.meta.env.DEV) {
    import('@quantajs/devtools').then(({ mountDevTools }) => {
        mountDevTools();
    });
}

Tree-Shaking

The DevTools automatically detect the environment and won't mount in production, but you can exclude them entirely using your bundler's conditional imports.

📜 License

This project is licensed under the MIT License - see the LICENSE file for details.

💬 Contributing

We welcome contributions! Feel free to open issues, submit PRs, or suggest improvements.

⭐ Support

If you find this library useful, consider giving it a ⭐ star on GitHub!