@tscircuit/rectdiff 0.0.26 → 0.0.27

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.
Files changed (35) hide show
  1. package/dist/index.d.ts +21 -0
  2. package/dist/index.js +487 -160
  3. package/lib/RectDiffPipeline.ts +23 -0
  4. package/lib/solvers/AdjacentLayerContainmentMergeSolver/AdjacentLayerContainmentMergeSolver.ts +456 -0
  5. package/package.json +1 -1
  6. package/pages/bugreports/bugreport50-multi-support-layer-merge.page.tsx +19 -0
  7. package/tests/__snapshots__/board-outline.snap.svg +2 -2
  8. package/tests/solver/__snapshots__/rectDiffGridSolverPipeline.snap.svg +1 -1
  9. package/tests/solver/both-points-equivalent/__snapshots__/both-points-equivalent.snap.svg +1 -1
  10. package/tests/solver/bugreport01-be84eb/__snapshots__/bugreport01-be84eb.snap.svg +1 -1
  11. package/tests/solver/bugreport02-bc4361/__snapshots__/bugreport02-bc4361.snap.svg +1 -1
  12. package/tests/solver/bugreport03-fe4a17/__snapshots__/bugreport03-fe4a17.snap.svg +1 -1
  13. package/tests/solver/bugreport07-d3f3be/__snapshots__/bugreport07-d3f3be.snap.svg +1 -1
  14. package/tests/solver/bugreport08-e3ec95/__snapshots__/bugreport08-e3ec95.snap.svg +1 -1
  15. package/tests/solver/bugreport09-618e09/__snapshots__/bugreport09-618e09.snap.svg +1 -1
  16. package/tests/solver/bugreport10-71239a/__snapshots__/bugreport10-71239a.snap.svg +1 -1
  17. package/tests/solver/bugreport11-b2de3c/__snapshots__/bugreport11-b2de3c.snap.svg +1 -1
  18. package/tests/solver/bugreport12-35ce1c/__snapshots__/bugreport12-35ce1c.snap.svg +1 -1
  19. package/tests/solver/bugreport13-b9a758/__snapshots__/bugreport13-b9a758.snap.svg +1 -1
  20. package/tests/solver/bugreport16-d95f38/__snapshots__/bugreport16-d95f38.snap.svg +1 -1
  21. package/tests/solver/bugreport19/__snapshots__/bugreport19.snap.svg +1 -1
  22. package/tests/solver/bugreport20-obstacle-clipping/__snapshots__/bugreport20-obstacle-clipping.snap.svg +1 -1
  23. package/tests/solver/bugreport21-board-outline/__snapshots__/bugreport21-board-outline.snap.svg +2 -2
  24. package/tests/solver/bugreport22-2a75ce/__snapshots__/bugreport22-2a75ce.snap.svg +1 -1
  25. package/tests/solver/bugreport23-LGA15x4/__snapshots__/bugreport23-LGA15x4.snap.svg +1 -1
  26. package/tests/solver/bugreport24-05597c/__snapshots__/bugreport24-05597c.snap.svg +1 -1
  27. package/tests/solver/bugreport25-4b1d55/__snapshots__/bugreport25-4b1d55.snap.svg +1 -1
  28. package/tests/solver/bugreport36-bf8303/__snapshots__/bugreport36-bf8303.snap.svg +1 -1
  29. package/tests/solver/bugreport50-multi-support-layer-merge/__snapshots__/bugreport50-multi-support-layer-merge.snap.svg +44 -0
  30. package/tests/solver/bugreport50-multi-support-layer-merge/bugreport50-multi-support-layer-merge.json +972 -0
  31. package/tests/solver/bugreport50-multi-support-layer-merge/bugreport50-multi-support-layer-merge.test.ts +125 -0
  32. package/tests/solver/interaction/__snapshots__/interaction.snap.svg +1 -1
  33. package/tests/solver/multi-point/__snapshots__/multi-point.snap.svg +1 -1
  34. package/tests/solver/no-better-path/__snapshots__/no-better-path.snap.svg +1 -1
  35. package/tests/solver/transitivity/__snapshots__/transitivity.snap.svg +2 -2
package/dist/index.d.ts CHANGED
@@ -117,6 +117,26 @@ type RTreeRect = XYRect & {
117
117
  zLayers: number[];
118
118
  };
119
119
 
120
+ type AdjacentLayerContainmentMergeSolverInput = {
121
+ meshNodes: CapacityMeshNode[];
122
+ simpleRouteJson: SimpleRouteJson;
123
+ minFragmentArea?: number;
124
+ };
125
+ declare class AdjacentLayerContainmentMergeSolver extends BaseSolver {
126
+ private input;
127
+ private outputNodes;
128
+ private promotedNodeIds;
129
+ private residualNodeIds;
130
+ constructor(input: AdjacentLayerContainmentMergeSolverInput);
131
+ _setup(): void;
132
+ _step(): void;
133
+ private processAdjacentLayerContainmentMerges;
134
+ getOutput(): {
135
+ outputNodes: CapacityMeshNode[];
136
+ };
137
+ visualize(): GraphicsObject;
138
+ }
139
+
120
140
  interface SegmentWithAdjacentEmptySpace {
121
141
  parent: CapacityMeshNode;
122
142
  start: {
@@ -390,6 +410,7 @@ declare class RectDiffPipeline extends BasePipelineSolver<RectDiffPipelineInput>
390
410
  rectDiffGridSolverPipeline?: RectDiffGridSolverPipeline;
391
411
  gapFillSolver?: GapFillSolverPipeline;
392
412
  outerLayerContainmentMergeSolver?: OuterLayerContainmentMergeSolver;
413
+ adjacentLayerContainmentMergeSolver?: AdjacentLayerContainmentMergeSolver;
393
414
  boardVoidRects: XYRect[] | undefined;
394
415
  zIndexByName?: Map<string, number>;
395
416
  layerNames?: string[];