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

@gameguild/emception-react

v3.3.0

Published

React 19 components for emception: <EmceptionRun>, <EmceptionTerminal>, <EmceptionCanvas>, useEmception().

Readme

@emception/react

React 19 components for emception.

Install

npm install @emception/react @emception/webcomponent @emception/browser

<EmceptionRun>

Declarative wrapper around the <emception-run> custom element.

'use client';

import { useCallback } from 'react';
import { EmceptionRun, useEmception } from '@emception/react';
import { createEmception } from '@emception/browser';

// Register the custom element on the client (NOT in the server bundle).
import '@emception/webcomponent';

export function Demo() {
  const create = useCallback((signal: AbortSignal) => {
    return createEmception({ tty: 'none', signal });
  }, []);
  const { api, status, error } = useEmception({ create });

  if (status === 'error') return <pre>{String(error)}</pre>;

  return (
    <EmceptionRun
      api={api}
      preset="cpp"
      autorun
      source="int main(){ return 0; }"
      onStdout={(p) => console.log(p.chunk)}
      onExit={(p) => console.log('exit', p.code)}
    />
  );
}

Props

  • All ViewConfigInput fields as camelCase props (e.g. manifestUrl, seedUrl, buildUrl, autorun, canvas, showHidden, …).
  • Typed event-handler props derived from EmceptionEventMap: onReady, onStdout, onStderr, onExit, onTestReport, onTestCase, …
  • api?: EmceptionAPI | null — attaches a pre-built API to the host element via its setter.
  • className, style, children — forwarded.

Non-primitive props (e.g. a fully-shaped workspace object) are not projected as attributes; pass them through useEmception's create factory and attach the resulting api instead.

Imperative ref

const ref = useRef<EmceptionRunHandle>(null);
// ref.current.element  → HTMLElement | null
// ref.current.api      → EmceptionAPI | null

useEmception(opts)

const { api, status, error } = useEmception({
  create: (signal) => createEmception({ signal }),
  skip: false,
});
  • create(signal) — your factory. Wrap in useCallback to avoid rebuilding the API on every render.
  • skip — short-circuit (e.g. for SSR).
  • Returns { api, status: 'idle' | 'loading' | 'ready' | 'error', error }.
  • Aborts in-flight builds on unmount and disposes the api.

SSR

@emception/react itself does not import @emception/webcomponent — that package self-registers the custom element on import, which would fail on the server. Register the element from a client-only entry (e.g. inside a 'use client' component or useEffect).