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

@inspectr/ui

v1.9.1

Published

React UI components for Inspectr

Readme

Inspectr UI

React UI components for Inspectr.

Introduction

Inspectr UI is a collection of React UI components built for the Inspectr project. It leverages modern tools like Vite and TailwindCSS to provide a fast, customizable, and modular UI library for your React applications.

Installation

npm npm

Install the package via npm:

npm install @inspectr/ui

Usage

Import the components and accompanying CSS into your React project:

import React from 'react';
import { InspectrApp } from '@inspectr/ui';
import '@inspectr/ui/style.css';

const App = () => (
  <div>
    <InspectrApp />
  </div>
);

export default App;

Embeddable Core (Phase A)

The embeddable foundation keeps standalone behavior as the default while exposing namespaced runtime primitives for embedded consumers.

  • Storage adapters:
    • createDefaultStorageAdapter()
    • createNamespacedStorageAdapter(namespace, baseAdapter?)
  • Event DB factory:
    • createEventDB({ dbName, namespace })
    • getNamespacedEventDBName(namespace)
  • Hooks:
    • useStorageAdapter(key, defaultValue, adapter)
    • useInspectrStorage(key, defaultValue) (provider-scoped adapter usage)

Phase A verification commands:

npm test
npm run build

Embedded Usage (Phase B API Surface)

Use InspectrProvider in embedded mode and mount InspectrEmbeddedApp when consuming from host apps (for example Bins):

  • Embedded mode applies sessionBootstrap values as the source of truth and skips hosted app/auth/bootstrap auto-fetch.
  • Theme precedence contract: when InspectrEmbeddedApp receives a themeConfig prop, it takes precedence over provider themeConfig (no deep merge).
import React from 'react';
import { InspectrProvider, InspectrEmbeddedApp } from '@inspectr/ui';
import '@inspectr/ui/style.css';

export default function EmbeddedInspectrMount() {
  return (
    <InspectrProvider
      mode="embedded"
      namespace="workspace-123/bin-7"
      sessionBootstrap={{
        apiEndpoint: 'api',
        channelCode: 'demo',
        channel: 'bins',
        token: 'token',
        sseEndpoint: 'https://example.com/sse'
      }}
      featureConfig={{
        modules: { history: true, detail: true, trace: false, statistics: false, rules: false, settings: false },
        actions: { allowReplay: false, allowDelete: false, allowTagEdit: false, allowExport: false }
      }}
      themeConfig={{
        tokens: {
          surfaceBackground: '#f8fafc',
          accentPrimary: '#0f766e',
          accentPrimaryContrast: '#ffffff'
        }
      }}
    >
      <InspectrEmbeddedApp defaultModule="history" />
    </InspectrProvider>
  );
}

Theme token contract (initial):

  • surfaceBackground -> --inspectr-surface-background
  • surfaceMuted -> --inspectr-surface-muted
  • borderSubtle -> --inspectr-border-subtle
  • textPrimary -> --inspectr-text-primary
  • textSecondary -> --inspectr-text-secondary
  • accentPrimary -> --inspectr-accent-primary
  • accentPrimaryContrast -> --inspectr-accent-primary-contrast

Bins migration checklist:

  • supply a stable namespace per embedded runtime (for storage + Dexie isolation),
  • inject sessionBootstrap from Bins runtime credentials (do not rely on global browser state),
  • pass featureConfig for enabled modules/actions,
  • pass optional themeConfig tokens from Bins design system.

Storybook

Explore and test components in isolation with Storybook.

  • Start Storybook locally:
npm run storybook
  • Build a static Storybook site:
npm run build-storybook

Contributing

Contributions are welcome! If you have ideas, improvements, or bug fixes, please open an issue or submit a pull request via the GitHub repository.

Bugs & Issues

Found a bug or have a feature request? Please report it via the issue tracker.