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

slotboard

v0.1.2

Published

Runtime for board layouts: JSON-in-git geometry for slots, images, shapes, paths and text, rendered as CSS container units.

Readme

slotboard

Runtime for board layouts: a JSON file in your repo holds the desktop and mobile geometry of a section — where each real component ("slot") sits, plus free-form images, shapes, lines and text — and this package renders it as CSS container units so the same layout holds at every width.

Edit the JSON visually with the board CLI (board serve <repo>), never by hand-writing coordinates.

// vanilla
import { mountBoard } from 'slotboard'
import doc from './design/hero.board.json'
mountBoard(document.getElementById('hero'), doc, { assetBase: '/board/' })
// React (SSR-safe)
import { Board } from 'slotboard/react'
import { asBoardDoc } from 'slotboard'
import json from '@/design/hero.board.json'
const doc = asBoardDoc(json)   // JSON imports widen literal types; this narrows + validates
<Board doc={doc} assetBase="/board/">
  <img data-board-slot="photo" … />
  <div data-board-slot="card">…</div>
</Board>

Rules of the road

  • A slot is one of the root's descendants carrying data-board-slot="<id>". The board sets its left, top, width (and z-index); its height comes from its own content unless the layer has an explicit h.
  • data-board-anchor="<name>" on an element inside a slot exposes a named anchor point (its centre) that path layers can attach to as "<slot>.<name>". Every slot also has center, top, bottom, left, right, tl, tr, bl, br.
  • Own layers (images, shapes, text, paths without a target) are appended as the root's last children. Style slot siblings with :last-of-type / :nth-of-type, not :last-child.
  • Outside an active artboard (below desktop.minWidth with no mobile artboard) the runtime emits no rule that touches a slot — the site's own layout applies unchanged — and hides its own layers.
  • Image src values are bare filenames. Resolve them with assetBase (files served from public/) or assets (a basename -> url map, e.g. from import.meta.glob('./images/board/*', { eager: true, query: '?url', import: 'default' }) when the site uses relative asset paths).
  • The editor bridge only activates on localhost / 127.0.0.1, inside an iframe, after a handshake from a localhost origin. Nothing editor-related ships to production beyond a ~40-line listener.

Page tweaks (editor feature, no runtime needed)

Anything on the page that is not a board slot can still be picked, nudged, resized and restyled in board serve. Those edits are written to src/design/tweaks.json and rendered to src/design/tweaks.css — a plain stylesheet of selector-keyed !important overrides, split into desktop / mobile media blocks. Import that file once (after the main stylesheet) and it applies in production with zero JS. Treat a tweak as a note to the developer: once the design settles, move it into the real component and delete it.

Pages without a board

The editor can still tweak any element on a page that loads the runtime. On a page with no board, call armBridge() from slotboard once in that page's script so the editor can connect; it is inert outside localhost.