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

@tscircuit/jumper-topology-generator

v0.0.4

Published

Generate 0603 jumper placement/topology as a HyperGraph, including:

Readme

@tscircuit/jumper-topology-generator

Generate 0603 jumper placement/topology as a HyperGraph, including:

  • top-layer conductive regions
  • jumper pad regions
  • connectivity ports between touching regions
  • via locations and overall bounds

Preview

Jumper topology preview

Install

bun add @tscircuit/jumper-topology-generator

Quick Start

import { generate0603JumperHyperGraph } from "@tscircuit/jumper-topology-generator"

const graph = generate0603JumperHyperGraph({
  cols: 3,
  rows: 2,
  orientation: "horizontal",
})

console.log(graph.regions.length)
console.log(graph.ports.length)
console.log(graph.bounds)

API

generate0603JumperHyperGraph(options)

Creates a JumperHyperGraph from a 0603 jumper matrix.

Required options:

  • cols: number - number of jumper columns (> 0)
  • rows: number - number of jumper rows (> 0)

Optional options:

  • pattern: "grid" | "staggered" (default: "grid")
  • orientation: "horizontal" | "vertical" (default: "horizontal")
  • pitchX: number or colSpacing: number (default: 2.2)
  • pitchY: number or rowSpacing: number (default: 1.8)
  • staggerAxis: "x" | "y" (default: "x")
  • staggerOffset: number (or alias staggerOffsetX)
  • padWidth: number (default: 0.9)
  • padHeight: number (default: 1.0)
  • padGap: number (default: 0.35)
  • viaDiameter: number (default: 0.3)
  • clearance: number (default: 0.2)
  • concavityTolerance: number (default: 0.3)
  • boundsPadding: number (default: 1.2)
  • portSpacing: number (default: 0.25, must be > 0)
  • maxNeckRatio: number (default: 0, disabled when 0; unitless neck-width ratio vs sqrt(regionArea))
  • minSplitBalanceRatio: number (default: 0.2, must be in [0, 0.5])

Behavior notes:

  • colSpacing overrides pitchX; rowSpacing overrides pitchY.
  • Pitch values are clamped to avoid overlap:
    • pitchX >= jumperBodyWidth + clearance
    • pitchY >= jumperBodyHeight + clearance
  • For pattern: "staggered", if staggerOffset is omitted, it defaults to half the jumper size along the stagger axis.
  • Smaller portSpacing creates denser top-layer edge ports.
  • When maxNeckRatio > 0, top-layer polygons are recursively split along narrow triangulation separators to eliminate chokepoints before ports are generated.

Return Shape

generate0603JumperHyperGraph returns a JumperHyperGraph with:

  • regions: all regions (topLayerRegions + jumperRegions)
  • ports: all region-to-region connectivity ports
  • jumperLocations: jumper-centric mapping used by @tscircuit/hypergraph
  • topLayerRegions: convex top copper regions
  • jumperRegions: one region per jumper body
  • jumpers: raw jumper placements and pad centers
  • vias: one via per pad center
  • bounds: overall bounding box

Visualization Helper

Use visualizeJumperHyperGraph to generate a graphics-debug object:

import {
  generate0603JumperHyperGraph,
  visualizeJumperHyperGraph,
} from "@tscircuit/jumper-topology-generator"

const graph = generate0603JumperHyperGraph({ cols: 2, rows: 2 })
const debugGraphics = visualizeJumperHyperGraph(graph)

Examples

Staggered pattern along X:

import { generate0603JumperHyperGraph } from "@tscircuit/jumper-topology-generator"

const graph = generate0603JumperHyperGraph({
  cols: 4,
  rows: 3,
  pattern: "staggered",
  staggerAxis: "x",
  orientation: "horizontal",
})

Vertical jumpers with coarser edge ports:

import { generate0603JumperHyperGraph } from "@tscircuit/jumper-topology-generator"

const graph = generate0603JumperHyperGraph({
  cols: 2,
  rows: 2,
  orientation: "vertical",
  portSpacing: 0.75,
})

Output Previews

Horizontal grid (cols: 3, rows: 2, orientation: "horizontal"):

Horizontal 3x2 output

Vertical grid (cols: 2, rows: 2, orientation: "vertical"):

Vertical 2x2 output

Staggered X (cols: 4, rows: 3, pattern: "staggered", staggerAxis: "x"):

Staggered X 4x3 output

Staggered Y (cols: 3, rows: 3, pattern: "staggered", staggerAxis: "y"):

Staggered Y 3x3 output

SVG export fixture (cols: 2, rows: 1):

SVG export 2x1 output

Local Development

Install dependencies:

bun install

Build:

bun run build

Explore fixtures in React Cosmos:

bun run start