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

@bancada/electronics

v0.1.2

Published

Electronics plugin for bancada: ESP32 pin rules and a circuit drawing from diagram.json

Readme

@bancada/electronics

Electronics plugin for bancada: ESP32 pin rules, and a circuit drawing rendered from the lesson's diagram.json.

The rules

Every rule here describes a failure that is silent. That is the bar for one existing: a mistake the compiler catches does not need a linter.

| rule | what actually happens | |---|---| | GPIO 6–11 | internal flash — the board hangs, with no message | | GPIO 34–39 as an output | drives nothing, and compiles fine | | analog on ADC2 | works until Wi-Fi comes up, then returns garbage | | the same GPIO twice | one of the two silently wins |

The ADC2 one is the cruellest: the project works through all of development and breaks the day it gains Wi-Fi, with nothing near the reading having changed.

The drawing

Built from the same diagram.json Wokwi uses, with Wokwi's own web components. Layout and wire routing come from ELK, which is built for exactly this: nodes with measured sizes, ports at fixed positions — the pins — and crossing minimisation.

Static on purpose. This is for seeing the wiring, not for simulating it.

  • wires are drawn above the parts; underneath a board they disappear, and a wire you cannot follow documents nothing
  • hovering lights one wire, dims the rest, and names both ends
  • pan by transform rather than scroll, so dragging works at any zoom
  • pinch scales with the delta: a fixed step per event explodes on a trackpad, which fires dozens of them per gesture

Two parts the open element package does not have — board-ssd1306 and wokwi-relay-module — are drawn as a labelled box with the pins that diagram uses, so the wires still land where they should.

It needs the inventory, and works without it

The pin rules have to know whether a part is an output and whether it is analog. That lives in @bancada/inventory, which this plugin never imports: it reads what the inventory attached to the lesson, so declare inventory first in the config.

With no inventory installed, the rules that depend only on the pin number still run. Dropping them because a sibling plugin is missing would be worse.

Requirements

bun 1.3 or newer, and bancada as its host. The package ships TypeScript with no build step and reads files through Bun.file.

Install

bun add @bancada/electronics
{
  "plugins": [
    { "name": "inventory", "script": "@bancada/inventory", "config": {} },
    {
      "name": "electronics",
      "script": "@bancada/electronics",
      "config": { "diagram": "diagram.json", "sketchDir": "sketch" }
    }
  ]
}

| setting | default | what it is | |---|---|---| | diagram | diagram.json | the circuit file, inside the lesson folder | | sketchDir | sketch | folder holding the .ino | | labels | English | every string the cards put on screen |

Labels

Overriding one key leaves the rest in English.

| key | default | where it shows | |---|---|---| | pins | Pins | title of the pins card | | circuit | Circuit | title of the circuit card | | simulate | see below | the line under the drawing | | zoomIn | Zoom in | zoom controls — icon-only buttons, so the | | zoomOut | Zoom out | aria-label is the ONLY name a screen reader | | zoomFit | Fit to width | has for them | | zoomFull | Open full screen | | | zoomLevel | Zoom level, percent | the editable percentage field | | close | Close | the modal's close button |

The data-zoom values (in, out, fit, full) are stable ids the script dispatches on — they are not display text and do not change with the language.

License

MIT.