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

@u-devtools/core

v0.2.3

Published

Core types and interfaces for Universal DevTools

Downloads

233

Readme

@u-devtools/core

npm version npm downloads License Donate

Core types and interfaces for Universal DevTools Kit. This package provides the foundational TypeScript types, interfaces, and utilities used throughout the DevTools ecosystem.

Installation

npm install @u-devtools/core
# or
pnpm add @u-devtools/core
# or
yarn add @u-devtools/core

What's Included

Type Definitions

  • RPC Interfaces - Types for client-server communication
  • Plugin Interfaces - Types for creating DevTools plugins
  • API Interfaces - Types for ClientApi, StorageApi, SettingsApi, etc.
  • Utility Types - Common types used across the ecosystem

Core Classes

  • AppBridge - Typed communication bridge between App context and Client context
  • SyncedState - Universal state synchronization class with React useSyncExternalStore support
  • Control - DevTools control utilities

Vite Configuration

  • vite.config.base - Base Vite configuration for building DevTools packages

Usage

Importing Types

import type {
  DevToolsPlugin,
  PluginClientInstance,
  ClientApi,
  RpcServerInterface,
  ServerContext,
} from '@u-devtools/core';

Using AppBridge with Typed Protocol

import { AppBridge } from '@u-devtools/core';

// Define your protocol
interface MyPluginProtocol {
  'element-selected': (data: { id: string }) => void;
  'toggle-inspector': (data: { state: boolean }) => void;
}

// Create typed bridge
const bridge = new AppBridge<MyPluginProtocol>('my-plugin');

// ✅ Full type safety
bridge.send('element-selected', { id: 'el-1' });
bridge.on('toggle-inspector', ({ state }) => {
  // state is automatically typed as { state: boolean }
});

Using SyncedState

import { AppBridge, SyncedState } from '@u-devtools/core';

const bridge = new AppBridge('my-plugin');

// Create synced state
const isOpen = bridge.state('isOpen', false);

// Read value
console.log(isOpen.value);

// Update value (automatically syncs)
isOpen.value = true;

// Subscribe to changes
const unsub = isOpen.subscribe((val) => {
  console.log('Changed:', val);
});

// Use with React useSyncExternalStore
import { useSyncExternalStore } from 'react';
const enabled = useSyncExternalStore(
  isOpen.subscribe,
  isOpen.getSnapshot
);

Using Vite Config Base

import { createViteConfig } from '@u-devtools/core/vite.config.base';

export default createViteConfig({
  name: 'MyPackage',
  entry: 'src/index.ts',
  dir: __dirname,
  // ... other options
});

License

MIT