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

@domscribe/runtime

v0.5.0

Published

Browser-side runtime context capture for Domscribe

Downloads

1,864

Readme

@domscribe/runtime

Browser-side context capture engine for Domscribe.

@domscribe/runtime runs in the browser during development and captures component props, state, and DOM context when a developer clicks an element. It is framework-agnostic at its core — framework-specific behavior is provided by adapters.

Install

npm install @domscribe/runtime

Framework Support

| Framework | Adapter | Capture Strategy | | ------------- | ------------------ | ------------------------------------------------ | | React 18-19 | @domscribe/react | Fiber walking, DevTools hook, BestEffort | | Vue 3 | @domscribe/vue | VNode inspection, Composition + Options API | | Next.js 15-16 | @domscribe/next | React adapter + withDomscribe() config wrapper | | Nuxt 3+ | @domscribe/nuxt | Vue adapter + auto-configured Nuxt module |

For most projects you will install a framework adapter rather than @domscribe/runtime directly. The adapter declares @domscribe/runtime as a peer dependency and handles initialization.

RuntimeManager

RuntimeManager is a singleton that manages the active adapter and provides the capture API to the overlay and other internal consumers.

import { RuntimeManager } from '@domscribe/runtime';

const runtime = RuntimeManager.getInstance();
await runtime.initialize({
  adapter: myAdapter,
  phase: 1,
  debug: false,
  redactPII: true,
  blockSelectors: [],
});

Options

| Option | Type | Default | Description | | ---------------- | ------------------ | ------------- | ----------------------------------------------------------------------------------------------------------- | | adapter | FrameworkAdapter | NoopAdapter | Framework adapter for context capture | | phase | 1 \| 2 | 1 | Feature phase gate. Phase 1: props and state capture. Phase 2: event flow and performance metrics (future). | | debug | boolean | false | Enable debug logging | | redactPII | boolean | true | Redact sensitive values (emails, tokens) in captured data | | blockSelectors | string[] | [] | CSS selectors for elements to skip during capture |

initialize() is safe to call multiple times — subsequent calls with the same configuration are no-ops.

FrameworkAdapter Interface

Adapters implement the FrameworkAdapter interface to bridge the runtime to a specific framework's internal component model.

interface FrameworkAdapter {
  readonly name: string;
  readonly version?: string;
  getComponentInstance(element: HTMLElement): Nullable<unknown>;
  captureProps(component: unknown): Nullable<Record<string, unknown>>;
  captureState(component: unknown): Nullable<Record<string, unknown>>;
  getComponentName?(component: unknown): Nullable<string>;
  getComponentTree?(component: unknown): Nullable<ComponentTreeNode>;
}

See the Custom Adapters Guide for the full interface, a worked example, and integration instructions.

Links

Part of Domscribe.

License

MIT