@tscircuit/hypergraph 0.0.6 → 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -126,7 +126,7 @@ type JumperGraph = {
126
126
  }>;
127
127
  };
128
128
 
129
- declare const generateJumperX4Grid: ({ cols, rows, marginX, marginY, innerColChannelPointCount, innerRowChannelPointCount, regionsBetweenPads, outerPaddingX: outerPaddingXParam, outerPaddingY: outerPaddingYParam, outerChannelXPointCount, outerChannelYPointCount, orientation, center, bounds, }: {
129
+ declare const generateJumperX4Grid: ({ cols, rows, marginX, marginY, innerColChannelPointCount, innerRowChannelPointCount, regionsBetweenPads, outerPaddingX: outerPaddingXParam, outerPaddingY: outerPaddingYParam, outerChannelXPointCount, outerChannelYPointCount, orientation, center, bounds, parallelTracesUnderJumperCount, }: {
130
130
  cols: number;
131
131
  rows: number;
132
132
  marginX: number;
@@ -149,6 +149,8 @@ declare const generateJumperX4Grid: ({ cols, rows, marginX, marginY, innerColCha
149
149
  minY: number;
150
150
  maxY: number;
151
151
  };
152
+ /** Number of trace points that can pass through the jumper body from top to bottom without using jumpers */
153
+ parallelTracesUnderJumperCount?: number;
152
154
  }) => JumperGraph;
153
155
 
154
156
  declare const generateJumperGrid: ({ cols, rows, marginX, marginY, innerColChannelPointCount, innerRowChannelPointCount, outerPaddingX, outerPaddingY, outerChannelXPoints, outerChannelYPoints, }: {
@@ -384,4 +386,4 @@ declare const applyTransformToGraph: (graph: JumperGraph, matrix: Matrix) => Jum
384
386
  */
385
387
  declare const rotateGraph90Degrees: (graph: JumperGraph) => JumperGraph;
386
388
 
387
- export { type Candidate, type Connection, type ConnectionId, type GScore, type GraphEdgeId, type HyperGraph, HyperGraphSolver, JumperGraphSolver, type JumperGraphWithConnections, type NetworkId, type PortAssignment, type PortId, type Region, type RegionId, type RegionPort, type RegionPortAssignment, type SerializedConnection, type SerializedGraphPort, type SerializedGraphRegion, type SerializedHyperGraph, type SerializedRegionPortAssignment, type SolvedRoute, type XYConnection, applyTransformToGraph, createGraphWithConnectionsFromBaseGraph, generateJumperGrid, generateJumperX4Grid, rotateGraph90Degrees };
389
+ export { type Candidate, type Connection, type ConnectionId, type GScore, type GraphEdgeId, type HyperGraph, HyperGraphSolver, type JPort, type JRegion, type JumperGraph, JumperGraphSolver, type JumperGraphWithConnections, type NetworkId, type PortAssignment, type PortId, type Region, type RegionId, type RegionPort, type RegionPortAssignment, type SerializedConnection, type SerializedGraphPort, type SerializedGraphRegion, type SerializedHyperGraph, type SerializedRegionPortAssignment, type SolvedRoute, type XYConnection, applyTransformToGraph, createGraphWithConnectionsFromBaseGraph, generateJumperGrid, generateJumperX4Grid, rotateGraph90Degrees };
package/dist/index.js CHANGED
@@ -225,7 +225,8 @@ var generateJumperX4Grid = ({
225
225
  outerChannelYPointCount,
226
226
  orientation: orientation2 = "vertical",
227
227
  center,
228
- bounds
228
+ bounds,
229
+ parallelTracesUnderJumperCount = 4
229
230
  }) => {
230
231
  const regions = [];
231
232
  const ports = [];
@@ -661,8 +662,8 @@ var generateJumperX4Grid = ({
661
662
  if (regionsBetweenPads) {
662
663
  const ujBounds = underjumper.d.bounds;
663
664
  const ujWidth = ujBounds.maxX - ujBounds.minX;
664
- const portSpacing = ujWidth / 5;
665
- for (let i = 1; i <= 4; i++) {
665
+ const portSpacing = ujWidth / (parallelTracesUnderJumperCount + 1);
666
+ for (let i = 1; i <= parallelTracesUnderJumperCount; i++) {
666
667
  const portX = ujBounds.minX + portSpacing * i;
667
668
  const topUJPort = {
668
669
  portId: `${idPrefix}:T-UJ${i}`,
@@ -702,8 +703,8 @@ var generateJumperX4Grid = ({
702
703
  if (regionsBetweenPads) {
703
704
  const ujBounds = underjumper.d.bounds;
704
705
  const ujWidth = ujBounds.maxX - ujBounds.minX;
705
- const portSpacing = ujWidth / 5;
706
- for (let i = 1; i <= 4; i++) {
706
+ const portSpacing = ujWidth / (parallelTracesUnderJumperCount + 1);
707
+ for (let i = 1; i <= parallelTracesUnderJumperCount; i++) {
707
708
  const portX = ujBounds.minX + portSpacing * i;
708
709
  const bottomUJPort = {
709
710
  portId: `${idPrefix}:B-UJ${i}`,
@@ -913,8 +914,8 @@ var generateJumperX4Grid = ({
913
914
  if (regionsBetweenPads) {
914
915
  const ujBounds = underjumper.d.bounds;
915
916
  const ujWidth = ujBounds.maxX - ujBounds.minX;
916
- const portSpacing = ujWidth / 5;
917
- for (let i = 1; i <= 4; i++) {
917
+ const portSpacing = ujWidth / (parallelTracesUnderJumperCount + 1);
918
+ for (let i = 1; i <= parallelTracesUnderJumperCount; i++) {
918
919
  const portX = ujBounds.minX + portSpacing * i;
919
920
  const aboveUJPort = {
920
921
  portId: `cell_${row - 1}_${col}->cell_${row}_${col}:B-UJ${i}`,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tscircuit/hypergraph",
3
3
  "main": "dist/index.js",
4
- "version": "0.0.6",
4
+ "version": "0.0.8",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "start": "cosmos",