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

@pajama-studio/prefab-core

v0.3.4

Published

General-purpose prefab game runtime: prefab schema, deterministic step() over pluggable system packs, extensible trigger/action dispatch. Domain packs plug in on top.

Readme

@pajama-studio/prefab-core

A general-purpose prefab game runtime in pure TypeScript:

  • Prefab schema — package files, entities as component recipes, linked templates with instances/overrides/params/actions, and pluggable package-aware stores.
  • Deterministic enginecreateEngine(def) + step(state, dtMs, inputs, systems); no DOM, no Three.js; runs in Node and the browser alike.
  • Pluggable system packs — the core ships domain-agnostic systems (timers, state machines, trigger→action dispatch, win/lose); domains plug their own packs in through the systems parameter and registerActionHandler.
  • Agent Catalog — machine-readable block semantics (catalog(), generated AGENTS.md), exhaustive by construction.

Pajama Studio's kitchen gameplay (cooking, washing, pouring, real-fluid sinks) is one such domain pack, built on this runtime.

The visual runtime and the prefab editor UI live in @pajama-studio/prefab-studio.

Store contract

PrefabPackage is the durable unit: the first prefab is the root and later entries are nested dependencies. PrefabStore reads and writes full packages through loadPackage/savePackage, while load/save remain single-root compatibility helpers for simple editors. Asset binaries are not embedded; packages keep references and a derived assets manifest.

Prefab packages are self-contained declarations: they include prefab graphs, components, params, actions, triggers, overrides, asset references, and requirements.packs for the runtime/domain packs needed to interpret them. They do not embed arbitrary JavaScript functions, compiled systems, or GLB/image binary payloads.

Stored-data compatibility policy

Prefabs in the wild are a CONTRACT:

  1. Component fields are additive-only — never rename or remove a field without registering a migration.
  2. The package format is version-gated and migrated on read (PACKAGE_MIGRATIONS in schema/serialize): bumping PACKAGE_VERSION to N requires a step lifting N-1 packages. Loading never rewrites storage; re-saving persists the current format naturally.
  3. Domain packs own their data's evolution via DomainPack.migrate.
  4. Hosts should keep golden fixtures — real stored prefabs captured from production — parsing and RUNNING in CI. If a fixture fails, fix the code or add a migration; never edit the fixture.