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

@cardcarp/deckbox

v0.1.0

Published

The deckbox's state and logic: filters and facets, deck editing, import, odds and print layout. No UI — an app brings its own.

Readme

@cardcarp/deckbox 🎴

The card half of the toolkit: an archive you can search and filter, a deck you can edit beside it, and export to print, PDF or file.

npm install @cardcarp/deckbox @cardcarp/core

Like the simulator, it ships no UI. The package is the deckbox's state and logic — filters, pages, the deck being built, import, draw odds, print layout — and each project draws its own screens on top of it.

That is what lets two projects look nothing alike. A fantasy archive and a pokédex want different type, colour and furniture, and a component with a theme baked in would give both the same one. apps/template/src/deckbox in the repo is a complete deckbox to copy and restyle.

Usage

useState is the deckbox — the archive, the filters, the pages and the deck being edited, as one reactive surface your screens read.

import { useState } from '@cardcarp/deckbox/state.js'

const deckbox = useState()

Then route your own screens at whatever path suits the app:

import Deckbox from './deckbox/index.vue'   // this app's own screens

{ path: '/deckbox', name: 'deckbox', component: Deckbox }

What's inside

| Module | Holds | | --- | --- | | state.js | useState — the archive, filters, facets, pages and the deck being edited | | deck-import.js | Parsing decklists from text and file | | probability.js | Draw odds for the deck as built | | print-sheet.js | Proxy sheet layout | | print-image.js | Card image composition for print | | composable/card-art.js | Card art resolution over core's storage | | composable/set-list.js | The game's set list | | composable/download.js | Export to file |

The root export carries hasDeckbox(config), the predicate an app uses to decide whether a game has an archive at all.

What it is not

It holds no games. Every label, filter, facet and card field comes from the game config the host hands to @cardcarp/core, which is what lets the same state drive a Pokémon archive and a Warcraft one without knowing either exists.

Where it sits

Two packages, one core. @cardcarp/core owns the game store, the config shape and the manifest; the deckbox and the simulator are peers that both read it. Installing both gives you one config and one manifest between them.

In an app that has both, the UI they share — the scroll area, the card preview, a filter pill — lives in the app's src/core, beside src/deckbox and src/simulator.

Peer dependencies

@cardcarp/core and Vue 3.5 or newer.

Links

License

MIT No Attribution.