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

@sketchmark/plugin-circuit

v0.1.1

Published

Primitive circuit diagrams for Sketchmark. Compiles lightweight ckt.* commands into standard Sketchmark groups and nodes.

Readme

@sketchmark/plugin-circuit

Primitive circuit diagrams for Sketchmark.

This first release stays draw-focused. It compiles ckt.* commands into ordinary Sketchmark groups, path nodes, circle nodes, and text nodes, so the core renderer does not need circuit-specific logic.

Install

npm install sketchmark @sketchmark/plugin-circuit

Usage

import { render } from "sketchmark";
import { circuit } from "@sketchmark/plugin-circuit";

render({
  container: document.getElementById("diagram")!,
  dsl: `
diagram
ckt.port vin x=80 y=140 label="Vin"
ckt.comp r1 kind=resistor x=220 y=140 label="R1" value="10k"
ckt.comp c1 kind=capacitor x=380 y=140 orient=v label="C1" value="100n"
ckt.comp gnd kind=ground x=380 y=260
ckt.port vout x=520 y=140 label="Vout"

ckt.wire w1 from=vin to=r1.left
ckt.wire w2 from=r1.right to=vout
ckt.wire w3 from=r1.right to=c1.top
ckt.wire w4 from=c1.bottom to=gnd.top
end
`.trim(),
  plugins: [circuit()],
});

Supported Commands

  • ckt.comp <id> kind=<resistor|capacitor|inductor|diode|source|ground|switch> x=<n> y=<n> [label="..."] [label-dx=<n>] [label-dy=<n>]
  • ckt.port <id> x=<n> y=<n> [label="..."] [label-dx=<n>] [label-dy=<n>]
  • ckt.junction <id> x=<n> y=<n> [label="..."] [label-dx=<n>] [label-dy=<n>]
  • ckt.wire <id> from=<ref> to=<ref> [mode=straight|hv|vh|auto] [label="..."] [label-dx=<n>] [label-dy=<n>]

Notes

  • ckt.comp, ckt.port, and ckt.junction use x / y as their center point in circuit space.
  • The plugin auto-inserts layout=absolute on the diagram line if the root diagram does not declare a layout yet.
  • If a diagram already declares a layout, it must be layout=absolute.
  • Wire refs can target ports and junctions directly, or component pins like r1.left, r1.right, c1.top, c1.bottom, or d1.anode.
  • This version does not do validation, simulation, or automatic circuit solving.