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

@genome-spy/inspector

v0.80.0

Published

GenomeSpy developer inspector plugin.

Readme

@genome-spy/inspector

The inspector is a DevTools-like side panel for looking at GenomeSpy runtime state while developing or debugging visualizations. It shows the view hierarchy, encodings, scale/axis/legend resolutions, dataflow, params, and unit mark state. The goal is to make the live runtime easier to understand without adding debug UI or heavy inspection code to the default Core or App bundles.

The initial implementation was largely vibe-coded with Codex. The tool is usable for development work, but the package API may still change as the integration points are refined.

Package Integrations

App

GenomeSpy App uses the inspector through the App plugin surface:

import { appInspector } from "@genome-spy/inspector";

await embed(element, spec, {
  plugins: [appInspector()],
});

In the App development single-page entry, the inspector is installed automatically so it is available from the three-dot menu in the App toolbar during local development.

The plugin uses App UI hooks to register a menu item and a side panel.

Playground

GenomeSpy Playground depends on this package directly. The Playground toolbar has an Inspector button that replaces the editor/file pane with the inspector, so the plot and inspector are visible side by side.

Playground uses the embeddable panel API:

import { createInspectorPanel } from "@genome-spy/inspector";

const inspector = await createInspectorPanel(embedResult.debug);

inspectorContainer.append(inspector.panel);
await inspector.session.refresh();

The inspector is refreshed after Playground rebuilds the Core embed from the current editor contents.

Core Embeds

Core does not load the inspector by itself. Applications that embed Core can install this package and attach the inspector only in development builds or behind their own debug UI.

The Core embed result exposes a small debug object:

const api = await embed(element, spec);

api.debug.getViewRoot();

That object gives the inspector access to the live root view and the matching Core debug helpers without adding a plugin system or loading debug UI into Core.

For quick integration, use the floating overlay helper:

import { embed } from "@genome-spy/core";
import { attachInspectorOverlay } from "@genome-spy/inspector";

const api = await embed(element, spec);

await attachInspectorOverlay(api.debug);

For applications with their own panels or split layouts, use createInspectorPanel(...) instead and place the returned panel element in the application UI.

See the embed example: Inspector overlay (source).

Architecture

The inspector is centered around InspectorSession, which reads the live runtime through a small host object:

interface InspectorHost {
  getViewRoot(): object | undefined;
  getModules(): Promise<InspectorDebugModules>;
}

The session loads Core debug snapshot helpers when it refreshes. App provides this object as app.debug, and Core embeds expose the same shape as api.debug. This keeps the inspector on the same Core runtime that owns the live views.

GsInspectorPanel is a LitElement component that renders a session snapshot. createInspectorPanel(...) wires a session to the panel. App, Playground, and Core embed examples all use the same session and panel components, with only small host adapters around them.