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

@promakeai/inspector

v1.4.8

Published

Visual element inspector React component with AI prompt support

Readme

@promakeai/inspector

Visual element inspector React component with AI prompt support.

Features

  • 🎯 Visual element selection
  • ✏️ Text editing
  • 🖼️ Image URL editing
  • 🎨 Style editing (colors, spacing, typography, display, borders)
  • 🔍 Element stack navigation (select overlapping elements)
  • 🌐 i18n support via labels
  • 🎨 Customizable theme
  • 📱 Responsive design
  • React version independent - Works with React 18, 19, and any future versions
  • 🎨 No external UI dependencies - All components built in-house for maximum compatibility

Installation

npm install @promakeai/inspector
# or
yarn add @promakeai/inspector
# or
pnpm add @promakeai/inspector
# or
bun add @promakeai/inspector

Peer Dependencies

Only React is required:

{
  "react": ">=18.0.0"
}

That's it! No need for:

  • ❌ React version matching
  • ❌ Dependency deduplication
  • ❌ Version resolution conflicts
  • ❌ Additional UI library installations

Usage

1. Add Vite Plugin (Optional - for component tracking)

// vite.config.ts
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import { inspectorDebugger } from "@promakeai/inspector/plugin";

export default defineConfig({
  plugins: [
    inspectorDebugger({ enabled: true }), // Must be BEFORE react() plugin
    react(),
  ],
});

⚠️ Important: inspectorDebugger must be placed before the react() plugin to properly track components.

Note: The Vite plugin is optional but recommended for better component tracking.

2. Use Inspector Component

import { Inspector } from "@promakeai/inspector";
import "@promakeai/inspector/style.css";

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

The Inspector will inspect the current page and allow you to edit elements visually.

Customization (Optional):

You can customize labels and theme via the inspector store or by listening to inspector events. See the Hook API section below for programmatic control.

3. Programmatic Control (Advanced)

Access the inspector store for programmatic control:

import { Inspector } from "@promakeai/inspector";
import { useInspectorStore } from "@promakeai/inspector";

function App() {
  const { setTheme, setLabels } = useInspectorStore();

  useEffect(() => {
    // Customize theme
    setTheme({
      primaryColor: "rgb(58, 18, 189)",
      backgroundColor: "#ffffff",
      textColor: "#000000",
    });

    // Customize labels
    setLabels({
      editText: "Edit Text",
      editImage: "Edit Image",
      editStyle: "Edit Style",
    });
  }, []);

  return (
    <>
      <YourApp />
      <Inspector />
    </>
  );
}

Configuration

Inspector Store

The Inspector component uses Zustand for state management. All configuration is done through the store:

import { useInspectorStore } from "@promakeai/inspector";

const { theme, labels, setTheme, setLabels } = useInspectorStore();

Note: The <Inspector /> component accepts no props. All customization is done via the store.

Theme Options

interface InspectorTheme {
  primaryColor?: string;
  backgroundColor?: string;
  textColor?: string;
  borderColor?: string;
  buttonColor?: string;
  buttonTextColor?: string;
  inputBackgroundColor?: string;
  // ... and more
}

Label Options

All UI text can be customized via the labels prop. See TypeScript types for complete list.

Browser Support

  • Chrome/Edge 90+
  • Firefox 88+
  • Safari 14+

Troubleshooting

Styles not working?

Make sure to import the CSS:

import "@promakeai/inspector/style.css";

Inspector not appearing?

  1. Check that the inspector root element is rendered
  2. Open browser console for any errors
  3. Clear Vite cache: rm -rf node_modules/.vite

Elements not selectable?

  1. Make sure elements don't have pointer-events: none
  2. Check z-index conflicts with your app (inspector uses z-index 2147483640+)
  3. Verify elements are not inside shadow DOM

React Version Compatibility

This package is built with zero external UI dependencies, making it compatible with:

  • ✅ React 18.x
  • ✅ React 19.x
  • ✅ React 19 Canary
  • ✅ Future React versions

No version conflicts, ever! All UI components are custom-built pure React components.

Migration from v1.0.6

If you're upgrading from v1.0.6 or earlier:

  1. Remove old Vite config workarounds:

    - resolve: {
    -   dedupe: ["react", "react-dom"],
    - },
    - optimizeDeps: {
    -   exclude: ["@promakeai/inspector"],
    -   needsInterop: [],
    - },
  2. That's it! The package now works out of the box with any React version.

Changelog

v1.1.0

  • ✨ Removed all Radix UI dependencies
  • ✨ Built custom Select and ColorPicker components
  • ✨ React version independent (18+)
  • ✨ Fixed dropdown positioning issues
  • ✨ Improved Select label display
  • ✨ Smaller bundle size
  • 🐛 Fixed ControlBox overflow issues
  • 🐛 Fixed color picker positioning

v1.0.7

  • Previous version with Radix UI dependencies