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

velo-circuit

v1.3.0

Published

Framework-agnostic SVG circuit editor based on the Boukamp DSL

Readme

velo-circuit

Framework-agnostic SVG circuit editor for Boukamp DSL circuits used in electrochemical impedance spectroscopy (EIS).

Documentation: jigonzalez930209.github.io/velo-circuit

Why velo-circuit

  • Unified circuit model from DSL parsing to rendered SVG output
  • Pure TypeScript core with no runtime UI framework dependency
  • Official adapters for React, Vue, Svelte, Angular, Astro and Vanilla
  • Built-in editor interactions: zoom, pan, drag, diagnostics, undo/redo
  • Static SVG preview for docs and thumbnails — no editor chrome required
  • Parameterized DSL: R0{50}-Q1{5e-5,0.8} with strict validation mode
  • SVG-first canvas with world-space infinite grid
  • createCircuitGrid() catalog view (DSL + SVG columns) and editor grid mode
  • Full parity with velo-spectroz circuit elements (11 types including CC, HN)
  • Designed to integrate with scientific tooling such as velo-spectroz
  • Sidebar export (extended preset): SVG with/without parameters, full DSL download, optional dark export theme; transparent SVG background by default

Element types (11)

Circuit symbols use the outline symbol design system: outline-only glyphs, 2.0 px base stroke, and per-kind stroke colors. Parameter counts and DSL syntax are documented in Element Types.

| Code | Element | Params | |------|---------|--------| | R | Resistor | 1 | | C | Capacitor | 1 | | L | Inductor | 1 | | Q | CPE | 2 | | W | Warburg Infinite | 1 | | Ws | Warburg Short | 2 | | Wo | Warburg Open | 2 | | G | Gerischer | 2 | | Pdw | Parallel Diffusion Warburg | 4 | | CC | Cole-Cole | 3 | | HN | Havriliak-Negami | 4 |

Install

pnpm add velo-circuit

or:

npm install velo-circuit

Quick Usage (Vanilla)

import { createEditor } from 'velo-circuit';

const editor = createEditor();

editor.mount(document.getElementById('canvas'), {
  initialDsl: 'R0-p(R1,C1)-Wo2',
  width: 900,
  height: 560,
});

editor.on('ast-changed', () => {
  console.log(editor.getValue());
});

Circuit grid catalog

import { createCircuitGrid } from 'velo-circuit';

const grid = createCircuitGrid({
  height: 480,
  rowHeight: 120,
  strict: true,
  columns: [
    { id: 'dsl', label: 'Linear DSL', type: 'dsl', width: 320 },
    { id: 'svg', label: 'Circuit', type: 'svg', width: 220 },
    { id: 'params', label: 'Parameters', type: 'params', width: 200 },
  ],
  initialRows: [
    { id: 'r1', dsl: 'R0{50}-p(R1{100},C1{1e-5})' },
    { id: 'r2', dsl: 'R0{10}-CC1{50,1e-3,0.8}' },
  ],
});

grid.mount(document.getElementById('grid')!);
grid.on('row-double-click', (row) => console.log(row));

Static SVG preview

Render read-only circuit diagrams without mounting the editor:

import { renderDslPreviewSvg } from 'velo-circuit';

const svg = renderDslPreviewSvg('R0-p(R1,C1)-Wo2', {
  themeMode: 'dark',
  colorMode: 'multicolor',
  connectionStyle: 'curved',
});
// → standalone <svg class="circuit-preview">…</svg> with embedded CSS

See the Static SVG Rendering guide for export patterns and theme options.

Local Development

pnpm install
pnpm typecheck
pnpm test
pnpm build
pnpm docs:dev

Release Workflow

CI runs in GitHub Actions on Node 22 and 24. npm publish is triggered by pushing a tag like v1.0.0.

You can prepare and dispatch a release with:

pnpm release:prepare -- 1.0.0

What it does:

  • runs typecheck, test, and build
  • bumps package.json (and lockfile) to the provided version, or skips if already set
  • creates commit chore(release): vX.Y.Z
  • creates tag vX.Y.Z
  • pushes branch and tag to GitHub

Required GitHub secret for publish workflow: NPM_TOKEN.

License

MIT