@tscircuit/capacity-autorouter 0.0.576 → 0.0.577

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
@@ -5494,7 +5494,6 @@ declare class RectBoundsComponentDetectionStage extends BaseSolver$1 {
5494
5494
  private groupedComponentObstacles;
5495
5495
  private groupedComponentKinds;
5496
5496
  private unprocessedComponentIds;
5497
- private passThroughObstacles;
5498
5497
  private detectedComponents;
5499
5498
  private currentComponentId;
5500
5499
  private currentMemberObstacles;
@@ -5513,7 +5512,6 @@ declare class RectBoundsComponentDetectionStage extends BaseSolver$1 {
5513
5512
  private groupObstaclesByComponentId;
5514
5513
  private createDetectedComponent;
5515
5514
  private getVisualizationTitle;
5516
- private createReplacementObstacle;
5517
5515
  }
5518
5516
 
5519
5517
  interface ComponentDetectionSolverParams {
@@ -5522,18 +5520,11 @@ interface ComponentDetectionSolverParams {
5522
5520
  interface DetectedComponent {
5523
5521
  componentId: string;
5524
5522
  componentKind: ComponentKind;
5525
- memberObstacleIds: string[];
5526
- memberObstacles: Obstacle[];
5527
- replacementObstacle: Obstacle;
5528
- }
5529
- interface ComponentDetectionSolverOutput {
5530
- /**
5531
- * Simple Route JSON where components are replaced with obstacles
5532
- * and component connection points are omitted.
5533
- */
5534
- componentsAsObstaclesSrj: SimpleRouteJson;
5535
- components: DetectedComponent[];
5523
+ bounds: {
5524
+ __type: "rect";
5525
+ } & SimpleRouteJson["bounds"];
5536
5526
  }
5527
+ type ComponentDetectionSolverOutput = DetectedComponent[];
5537
5528
  /**
5538
5529
  * Pipeline wrapper for component detection stages. The current pipeline only
5539
5530
  * runs the rectangular bounds stage, but later shape-specific stages can be
@@ -5547,102 +5538,24 @@ declare class ComponentDetectionSolver extends BasePipelineSolver<ComponentDetec
5547
5538
  initialVisualize(): GraphicsObject | null;
5548
5539
  }
5549
5540
 
5550
- /** Shared output collected from each component-specific topology generator. */
5551
- interface TopologyGeneratorSolverOutput {
5552
- obstacles: Obstacle[];
5553
- routingRegions: CapacityMeshNode[];
5554
- }
5555
- type TopologyGeneratorSolver = BaseSolver$1 & {
5556
- getOutput(): TopologyGeneratorSolverOutput;
5557
- };
5558
-
5559
- interface ComponentTopologyBatchSolverParams {
5560
- componentSrjs: SimpleRouteJson[];
5561
- componentIds: string[];
5562
- componentKinds: Array<ComponentKind | undefined>;
5563
- replacementObstacleIds: Array<string | undefined>;
5564
- viaDiameter?: number;
5565
- obstacleMargin?: number;
5566
- }
5567
- interface ComponentTopologyBatchSolverOutput {
5568
- componentMeshNodes: CapacityMeshNode[][];
5569
- }
5570
- /** Runs one component-local topology solve per component SRJ and collects the routing regions. */
5571
- declare class ComponentTopologyBatchSolver extends BaseSolver$1 {
5572
- readonly inputProblem: ComponentTopologyBatchSolverParams;
5573
- activeSubSolver?: TopologyGeneratorSolver | null;
5574
- currentIndex: number;
5575
- componentMeshNodes: CapacityMeshNode[][];
5576
- constructor(inputProblem: ComponentTopologyBatchSolverParams);
5577
- getConstructorParams(): readonly [ComponentTopologyBatchSolverParams];
5578
- /** Steps through component solves sequentially to keep solver state simple and explicit. */
5579
- _step(): void;
5580
- getOutput(): ComponentTopologyBatchSolverOutput;
5581
- }
5582
-
5583
- interface SerializedTopologyComponentInput {
5584
- componentId: string;
5585
- componentKind?: ComponentKind;
5586
- memberObstacleIds: string[];
5587
- memberObstacles: Obstacle[];
5588
- replacementObstacle: Obstacle;
5589
- }
5590
- interface MultiGraphTopologyPlannerSolverParams {
5541
+ interface ComponentTopologyGeneratorSolverParams {
5542
+ detectedComponents: DetectedComponent[];
5591
5543
  inputSrj: SimpleRouteJson;
5592
- globalNoConnectionSrj?: SimpleRouteJson;
5593
- components?: SerializedTopologyComponentInput[];
5594
- componentDetectionOutput?: ComponentDetectionSolverOutput;
5595
- viaDiameter?: number;
5596
- obstacleMargin?: number;
5597
- brokenSrj?: {
5598
- componentsAsObstaclesSrj: SimpleRouteJson;
5599
- components: SerializedTopologyComponentInput[];
5600
- };
5601
- }
5602
- interface MultiGraphTopologyPlannerSolverOutput {
5603
- globalNoConnectionSrj: SimpleRouteJson;
5604
- componentNoConnectionSrjs: SimpleRouteJson[];
5605
- globalMeshNodes: CapacityMeshNode[];
5606
- componentMeshNodes: CapacityMeshNode[][];
5607
- mergedMeshNodes: CapacityMeshNode[];
5608
5544
  }
5609
- /**
5610
- * Produces a merged routing topology where component replacement regions from
5611
- * the global solve are substituted with component-local routing regions.
5612
- */
5613
- declare class MultiGraphTopologyPlannerSolver extends BasePipelineSolver<MultiGraphTopologyPlannerSolverParams> {
5614
- globalTopologySolver?: RectDiffPipeline;
5615
- componentTopologyBatchSolver?: ComponentTopologyBatchSolver;
5616
- private normalizedInput;
5617
- pipelineDef: PipelineStep$a<BaseSolver$1>[];
5618
- constructor(params: MultiGraphTopologyPlannerSolverParams);
5619
- getConstructorParams(): readonly [MultiGraphTopologyPlannerSolverParams];
5620
- /**
5621
- * Returns the global solve, the per-component solves, and the merged routing
5622
- * regions used by downstream stages.
5623
- */
5624
- getOutput(): MultiGraphTopologyPlannerSolverOutput;
5625
- finalVisualize(): GraphicsObject | null;
5545
+ type ComponentTopologyGeneratorSolverOutput = CapacityMeshNode[];
5546
+ declare class ComponentTopologyGeneratorSolver extends BaseSolver {
5547
+ readonly inputProblem: ComponentTopologyGeneratorSolverParams;
5548
+ private output;
5549
+ private componentMeshNodes;
5550
+ private currentComponentIndex;
5551
+ private activeTopologyGenerator;
5552
+ constructor(inputProblem: ComponentTopologyGeneratorSolverParams);
5553
+ getConstructorParams(): readonly [ComponentTopologyGeneratorSolverParams];
5554
+ _step(): void;
5555
+ private finalizeComponentTopology;
5556
+ createComponentObstacleSrj(inputSrj?: SimpleRouteJson): SimpleRouteJson;
5626
5557
  visualize(): GraphicsObject;
5627
- preview(): GraphicsObject;
5628
- /** Rebuilds each component-local SRJ from its original member obstacles. */
5629
- private getComponentNoConnectionSrjs;
5630
- /** Adapts the global no-connection SRJ into the RectDiffPipeline input shape. */
5631
- private getGlobalTopologySolverInput;
5632
- /**
5633
- * Removes raw RectDiff node rects that are superseded by component-local
5634
- * topology regions.
5635
- *
5636
- * @param params.visualization - Graphics output produced by the base
5637
- * pipeline visualizer, including nested stage visualizations.
5638
- * @returns A visualization with RectDiff node rectangles inside component
5639
- * areas removed. Non-RectDiff rectangles and all lines, points, circles,
5640
- * and text entries are returned unchanged.
5641
- *
5642
- * @note This keeps intermediate RectDiff visualization consistent with the
5643
- * merged topology output, which already removes those nodes from solver data.
5644
- */
5645
- private filterGlobalRectDiffNodesFromVisualization;
5558
+ getOutput(): ComponentTopologyGeneratorSolverOutput;
5646
5559
  }
5647
5560
 
5648
5561
  interface CapacityMeshSolverOptions$2 {
@@ -5666,7 +5579,8 @@ declare class AutoroutingPipelineSolver7_MultiGraph extends BaseSolver {
5666
5579
  preprocessSimpleRouteJsonSolver?: PreprocessSimpleRouteJsonSolver$1;
5667
5580
  escapeViaLocationSolver?: EscapeViaLocationSolver;
5668
5581
  netToPointPairsSolver?: NetToPointPairsSolver;
5669
- topologyPlanningSolver?: MultiGraphTopologyPlannerSolver;
5582
+ componentTopologyGeneratorSolver?: ComponentTopologyGeneratorSolver;
5583
+ globalTopologyGeneratorSolver?: RectDiffPipeline;
5670
5584
  nodeDimensionSubdivisionSolver?: NodeDimensionSubdivisionSolver;
5671
5585
  nodeTargetMerger?: CapacityNodeTargetMerger;
5672
5586
  edgeSolver?: CapacityMeshEdgeSolver;
@@ -5708,7 +5622,7 @@ declare class AutoroutingPipelineSolver7_MultiGraph extends BaseSolver {
5708
5622
  sharedEdgeSegmentsWithNecessaryCrampedPortPoints?: SharedEdgeSegment[];
5709
5623
  highDensityNodePortPoints?: NodeWithPortPoints[];
5710
5624
  cacheProvider: CacheProvider | null;
5711
- pipelineDef: (PipelineStep$2<typeof PreprocessSimpleRouteJsonSolver$1> | PipelineStep$2<typeof ComponentDetectionSolver> | PipelineStep$2<typeof EscapeViaLocationSolver> | PipelineStep$2<typeof NetToPointPairsSolver2_OffBoardConnection> | PipelineStep$2<typeof MultiGraphTopologyPlannerSolver> | PipelineStep$2<typeof NodeDimensionSubdivisionSolver> | PipelineStep$2<typeof CapacityMeshEdgeSolver2_NodeTreeOptimization> | PipelineStep$2<typeof AvailableSegmentPointSolver> | PipelineStep$2<typeof MultiTargetNecessaryCrampedPortPointSolver> | PipelineStep$2<typeof TinyHypergraphPortPointPathingSolver> | PipelineStep$2<typeof UniformPortDistributionSolver> | PipelineStep$2<typeof HighDensitySolver> | PipelineStep$2<typeof HighDensityForceImproveSolver> | PipelineStep$2<typeof Pipeline4HighDensityRepairSolver> | PipelineStep$2<typeof MultipleHighDensityRouteStitchSolver3> | PipelineStep$2<typeof TraceSimplificationSolver> | PipelineStep$2<typeof TraceWidthSolver> | PipelineStep$2<typeof GlobalDrcForceImproveSolver>)[];
5625
+ pipelineDef: (PipelineStep$2<typeof PreprocessSimpleRouteJsonSolver$1> | PipelineStep$2<typeof ComponentDetectionSolver> | PipelineStep$2<typeof ComponentTopologyGeneratorSolver> | PipelineStep$2<typeof EscapeViaLocationSolver> | PipelineStep$2<typeof NetToPointPairsSolver2_OffBoardConnection> | PipelineStep$2<typeof RectDiffPipeline> | PipelineStep$2<typeof NodeDimensionSubdivisionSolver> | PipelineStep$2<typeof CapacityMeshEdgeSolver2_NodeTreeOptimization> | PipelineStep$2<typeof AvailableSegmentPointSolver> | PipelineStep$2<typeof MultiTargetNecessaryCrampedPortPointSolver> | PipelineStep$2<typeof TinyHypergraphPortPointPathingSolver> | PipelineStep$2<typeof UniformPortDistributionSolver> | PipelineStep$2<typeof HighDensitySolver> | PipelineStep$2<typeof HighDensityForceImproveSolver> | PipelineStep$2<typeof Pipeline4HighDensityRepairSolver> | PipelineStep$2<typeof MultipleHighDensityRouteStitchSolver3> | PipelineStep$2<typeof TraceSimplificationSolver> | PipelineStep$2<typeof TraceWidthSolver> | PipelineStep$2<typeof GlobalDrcForceImproveSolver>)[];
5712
5626
  constructor(srj: SimpleRouteJson, opts?: CapacityMeshSolverOptions$2);
5713
5627
  private setSimpleRouteJson;
5714
5628
  getConstructorParams(): readonly [SimpleRouteJson, CapacityMeshSolverOptions$2];