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

@fogrexon/glyph-arena

v0.6.0

Published

The Glyph Arena 2D game runtime as one package: the workspace modules bundled into a single ESM build with self-contained type declarations

Readme

@fogrexon/glyph-arena

The whole Glyph Arena 2D game runtime in one package: one import, no runtime dependencies, and a screen you can draw without loading a single image.

Rectangles and text, with nothing to fetch

import { createDraw, createLoop } from "@fogrexon/glyph-arena";

const canvas = document.querySelector<HTMLCanvasElement>("#game")!;
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;

const draw = createDraw({ context: canvas.getContext("2d")! });

createLoop({
  onFrame: ({ elapsed }) => {
    draw.clear("#0d1626");
    draw.rect({ x: 40 + Math.sin(elapsed) * 60, y: 120, w: 60, h: 60, fill: "#f7b32b" });
    draw.text({ text: `t ${elapsed.toFixed(1)}s`, x: 16, y: 16, size: 16, fill: "#e8eaed" });
  },
}).start();

That is the whole loop: no images, no sprite sheet, no asset loader in the way. When the rectangle should walk and jump instead of sliding, add a tile map (createTileMap), a body (createBody / stepBody) and a camera (createCamera) — the modules are re-exported flat, so they come from the same import.

Install

npm install @fogrexon/glyph-arena

What is inside

Every workspace module is bundled into this package and its value exports are re-exported flat, so a game writes one import instead of one per module: actions, assets, audio, body, camera, chase, collide, draw, ecs, gamepad, input, loop, reset, scene, tilemap, timer, touch, transform, tween. The docs site lists each one's exports, and the umbrella's export table is generated from the sources when the docs are built — it is not a table typed here that goes stale the day a module is added.

Matrix2D is declared by both camera and transform with the same shape; the umbrella re-exports the transform declaration explicitly, because two star exports of one name are ambiguous for the type declaration build.

Which entry points exist

  • import resolves to dist/index.js (ESM)
  • types resolve to dist/index.d.ts

ESM only: a CommonJS build would need a separate dist/index.d.cts, and one types field shared by import and require is the masquerading trap for NodeNext consumers.

sideEffects is false: nothing in the runtime runs at import time, every module is a factory, so unused modules are dropped by the consumer's bundler.

Building (repo contributors)

pnpm --filter @fogrexon/glyph-arena build

The build runs vite's library mode (ESM), then tsc -p tsconfig.build.json for the declaration tree, then scripts/write-entry-dts.mjs writes the dist/index.d.ts entry that re-exports it. prepack runs the build too, so pnpm pack from a fresh checkout ships a dist/ instead of an empty tarball.

License

MIT.