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

@stakeplate/core

v0.3.0

Published

Batteries-included Stake Engine game core — RGS transport, boot, round FSM, HUD binding, audio, i18n and a compliant rules builder. Bring a scene, a Present phase and a pure interpretBook; the core does the rest.

Readme

@stakeplate/core

The batteries-included Stake Engine game core. Import it, and the RGS handshake, boot flow, round lifecycle, HUD wiring, audio, i18n and compliant rules all just work — "plug a battery into a slot." A game supplies only its scene(s), its Present phase, its sounds, and a pure interpretBook.

Built on @open-slot-ui (HUD + compliance), @schmooky/zvuk (audio), pixi-reels (boards) and Pixi v8.

Status: usable, pre-1.0. In: the @stakeplate/core/rgs transport + runtime (real Stake wire — authenticate {sessionID, language}, play {mode, currency, amount}, end-round, replay — plus an authoritative, scriptable mock RGS), the createStakeGame(...) façade, the engine/phases + stores, /audio (zvuk buses + HUD binding), /rules (buildRules + social dict), turbo/autoplay, buy-features and /testing. Still landing: /scene helpers and /i18n.

The idea

import { createStakeGame } from '@stakeplate/core';

const game = createStakeGame({
  config,                                   // title, currency, modes (+buy/boost), rules
  interpretBook: raw => parseRound(raw),    // pure: RGS book → your model
  mountView: (host, ctx) => new MyScene(host, ctx), // your pixi + presenters + stores
  audio: manifest,
  phases: [new PresentPhase()],             // Idle/Spin/Settle are provided
});
await game.start(); // auth+language, resume, replay, errors, jurisdiction, HUD, audio…

Buy-features & rules

A mode flagged buy or boost makes the bonus button open the feature-list modal (shipped by @open-slot-ui/pixi) — one card per feature, with the jurisdiction confirm gate:

config.modes = {
  base: 1,
  bonus: { cost: 100, buy: true,   name: 'Free Spins', image: art }, // Buy card — spins once
  lucky: { cost: 2,   boost: true, name: 'Lucky Bet',  image: art }, // Activate card — 2× ante
};

buy cards spend cost × bet and spin that mode once; boost cards toggle a persistent ante (every spin plays at cost×, the readout shows the boosted stake). Build the compliant info menu — how-to-play, per-button guide, stats, and the exact Stake disclaimer — with buildRules:

import { buildRules } from '@stakeplate/core/rules';
const built = buildRules({ about, howToPlay, features, paytable, stats });
config.rules = built.menu;                      // → the white HTML menu
config.socialMessages = { en: built.socialEn }; // auto-derived social wording

Subpaths

  • @stakeplate/core — the one-call API + engine (turbo, autoplay, buy-features).
  • @stakeplate/core/rgs — wire protocol, launch-param runtime, NetworkManager + Stake/mock adapters, createNetwork.
  • @stakeplate/core/audio — zvuk bus graph (music/effects groups) + HUD slider/mute binding. Loaded one-shots are RMS-normalized by default (consistent levels, no per-file gains) and each effects bus is voice-capped so stacked cues don't machine-gun. play(name, { volume, pitch }) takes jitter ({ base, jitter }) so repeated cues vary. bindInputSounds(audio, hud, map) (or an AudioSpec.inputSounds map) plays a cue on spin/bet/autoplay/turbo/skip. Encode raw clips to shippable web assets (webm/opus + mp3 codec ladder, all metadata stripped) with scripts/encode-audio.sh OUTDIR raw/*.wav, then load the pair with { url: ['clip.webm', 'clip.mp3'] }.
  • @stakeplate/core/rulesbuildRules compliant menu + toSocial/findRestricted + dict.
  • Boot loader — pass loader: { title, backgroundImage, logo, accent, features, … } to createStakeGame for a loader → features → idle flow: a loading screen (pulsing logo/spinner + progress bar) that, with features: [{ image, text }], glides the logo up and fades in a feature splash (tap to continue), then reveals the game. manual: true + ctx.loader.done() holds it until your scene's art is in. createLoader() is standalone.
  • @stakeplate/core/vitestakeplateBoot({ background }) Vite plugin that inlines a blurred placeholder of the loader backdrop into index.html at build time, so the FIRST paint shows the backdrop — no black flash before the JS loads. (Add sharp as a devDependency for the blurred image; without it the solid colour is inlined — still never black.)
  • @stakeplate/core/stores — the MobX stores (balance, ui) for composing game state.
  • @stakeplate/core/testing — the mock RGS, scriptable network, instant ticker.
  • (soon) /scene, /i18n.

License

MIT © schmooky and the stakeplate contributors.