calculate-packing 0.0.34 → 0.0.35

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 (2) hide show
  1. package/dist/index.d.ts +11 -1
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -43,9 +43,19 @@ interface PackedComponent extends InputComponent {
43
43
  ccwRotationDegrees?: number;
44
44
  pads: OutputPad[];
45
45
  }
46
+ interface InputObstacle {
47
+ obstacleId: string;
48
+ absoluteCenter: {
49
+ x: number;
50
+ y: number;
51
+ };
52
+ width: number;
53
+ height: number;
54
+ }
46
55
  type PackPlacementStrategy = "shortest_connection_along_outline" | "minimum_sum_distance_to_network" | "minimum_sum_squared_distance_to_network" | "minimum_closest_sum_squared_distance";
47
56
  interface PackInput {
48
57
  components: InputComponent[];
58
+ obstacles?: InputObstacle[];
49
59
  minGap: number;
50
60
  packOrderStrategy: "largest_to_smallest";
51
61
  packPlacementStrategy: PackPlacementStrategy;
@@ -527,4 +537,4 @@ declare class PackSolver2 extends BaseSolver {
527
537
  visualize(): GraphicsObject;
528
538
  }
529
539
 
530
- export { type ComponentId, type GlobalBounds, type InputComponent, type InputPad, LargestRectOutsideOutlineFromPointSolver, type NetworkId, type OutputPad, type PackInput, type PackOutput, type PackPlacementStrategy, PackSolver2, type PackedComponent, type PadId, PhasedPackSolver, type Point$1 as Point, type Rect, convertCircuitJsonToPackOutput, convertPackOutputToPackInput, getGraphicsFromPackOutput, pack };
540
+ export { type ComponentId, type GlobalBounds, type InputComponent, type InputObstacle, type InputPad, LargestRectOutsideOutlineFromPointSolver, type NetworkId, type OutputPad, type PackInput, type PackOutput, type PackPlacementStrategy, PackSolver2, type PackedComponent, type PadId, PhasedPackSolver, type Point$1 as Point, type Rect, convertCircuitJsonToPackOutput, convertPackOutputToPackInput, getGraphicsFromPackOutput, pack };
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "calculate-packing",
3
3
  "main": "dist/index.js",
4
4
  "type": "module",
5
- "version": "0.0.34",
5
+ "version": "0.0.35",
6
6
  "description": "Calculate a packing layout with support for different strategy configurations",
7
7
  "scripts": {
8
8
  "start": "cosmos",