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

@remcostoeten/dev-widget

v0.0.1

Published

Minimal, portable dev menu widget for React applications

Readme

@remcostoeten/dev-widget

npm version CI License: MIT

Minimal, type-safe dev widget for React apps.

Installation

bun add @remcostoeten/dev-widget

React usage

import { DevWidget } from '@remcostoeten/dev-widget/react'

export function App(): React.ReactElement {
	return (
		<>
			<main>App</main>
			<DevWidget
				mode='development-only'
				theme={{ mode: 'system', accent: '#3bb273' }}
				features={{
					performance: { enabled: true, fpsThreshold: 50 },
					auth: { enabled: true, provider: 'better-auth' }
				}}
			/>
		</>
	)
}

Features

  • Auth domain
  • Routes domain
  • Links domain
  • Performance domain
  • System domain
  • Monitor domain

Feature checklist

  • [x] React widget shell with tab categories
  • [x] Domain lifecycle (setup/start/stop) via runtime registry
  • [x] Plugin API with typed event subscription
  • [x] Event bus for cross-domain communication
  • [x] Next.js log ingestion route handler
  • [x] In-memory storage adapter
  • [x] Tauri storage adapter export
  • [x] Route discovery adapter for Next.js and React projects
  • [x] Right rail with diagnostics render panel
  • [x] Keyboard shortcuts (toggle + Escape)
  • [x] Accessibility: focus-visible, reduced-motion handling, live region announcements
  • [x] Internal subpath export (@remcostoeten/dev-widget/internal)
  • [x] Source maps and declaration output in package build
  • [x] CI publish artifact validation step
  • [x] Demo app build pipeline

Needs additional work

  • AI providers: openai and local modes are declared but not implemented yet; only rules and custom are active (src/domains/performance/aiProviderFactory.ts).
  • Runtime prop updates: DevWidget memoizes runtime by shouldRender only, so runtime does not re-bootstrap when non-visibility props change after mount (src/devWidget.tsx).
  • Storage wiring: providers.storage is part of public config but not wired into runtime/domain persistence flow yet (src/types/public.ts and src/core/bootstrap.ts).
  • Endpoint validation: Next log handler accepts event payloads without schema validation; malformed event shapes can be persisted (src/adapters/next/routeHandler.ts).
  • CI parity: local checks pass, but final release confidence still depends on a pushed branch and green remote GitHub Actions run.

Plugin API

import { createRuntime } from '@remcostoeten/dev-widget'

const runtime = createRuntime({ mode: 'always' })

await runtime.registerPlugin({
	id: 'my-plugin',
	version: '1.0.0',
	register(ctx) {
		ctx.onEvent('performance/drop-detected', function onDrop(payload) {
			console.log('FPS drop:', payload.fps)
		})
	}
})

Subpath exports

import { DevWidget } from '@remcostoeten/dev-widget/react'
import { createLogHandler } from '@remcostoeten/dev-widget/next'
import { createTauriStorage } from '@remcostoeten/dev-widget/tauri'
import type { WidgetDomain } from '@remcostoeten/dev-widget/internal'

Accessibility

The widget includes keyboard shortcuts, focus-visible styling, live announcements, and reduced-motion support. See specs/10-dev-widget-accessibility-keyboard-spec.md for the detailed behavior contract.

Core options

  • enabled?: boolean
  • mode?: 'development-only' | 'always'
  • theme?: { mode?: 'system' | 'light' | 'dark'; accent?: string; density?: 'compact' | 'comfortable'; radius?: 'none' | 'sm' | 'md' | 'lg' }
  • features?: { auth?: boolean | AuthOptions; routes?: boolean | RoutesOptions; performance?: boolean | PerfOptions; system?: boolean | SystemOptions; links?: boolean | LinksOptions }
  • disable?: FeatureId[]
  • providers?: { auth?: AuthConfig; ai?: AiConfig; storage?: StorageConfig }
  • keyboard?: { toggleKey?: string; enableShortcuts?: boolean }
  • accessibility?: { reducedMotion?: 'system' | 'always' | 'never'; announceUpdates?: boolean }
  • rightRail?: { enabled?: boolean; defaultPanel?: string | null; collapsible?: boolean; panels?: PanelConfig[] }

Changelog

Contributing

bun run lint
bun run format:check
bun run type-check
bun test
bun run build

License

MIT