@tscircuit/core 0.0.940 → 0.0.942
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 +2 -2
- package/dist/index.js +32 -22
- package/package.json +6 -8
package/dist/index.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ import { symbols, SchSymbol, BaseSymbolName } from 'schematic-symbols';
|
|
|
11
11
|
import { Matrix } from 'transformation-matrix';
|
|
12
12
|
import { CircuitJsonUtilObjects } from '@tscircuit/circuit-json-util';
|
|
13
13
|
import { PackSolver2 } from 'calculate-packing';
|
|
14
|
-
import { AutoroutingPipelineSolver,
|
|
14
|
+
import { AutoroutingPipelineSolver, AssignableAutoroutingPipeline2 } from '@tscircuit/capacity-autorouter';
|
|
15
15
|
import { CopperPourPipelineSolver } from '@tscircuit/copper-pour-solver';
|
|
16
16
|
import { ConnectivityMap } from 'circuit-json-to-connectivity-map';
|
|
17
17
|
import { GraphicsObject } from 'graphics-debug';
|
|
@@ -127,7 +127,7 @@ interface BoardI {
|
|
|
127
127
|
declare const SOLVERS: {
|
|
128
128
|
PackSolver2: typeof PackSolver2;
|
|
129
129
|
AutoroutingPipelineSolver: typeof AutoroutingPipelineSolver;
|
|
130
|
-
|
|
130
|
+
AssignableAutoroutingPipeline2: typeof AssignableAutoroutingPipeline2;
|
|
131
131
|
CopperPourPipelineSolver: typeof CopperPourPipelineSolver;
|
|
132
132
|
};
|
|
133
133
|
type SolverName = keyof typeof SOLVERS;
|
package/dist/index.js
CHANGED
|
@@ -5589,7 +5589,7 @@ var getObstaclesFromRoute = (route, source_trace_id, { viaDiameter = 0.5 } = {})
|
|
|
5589
5589
|
};
|
|
5590
5590
|
|
|
5591
5591
|
// lib/utils/obstacles/generateApproximatingRects.ts
|
|
5592
|
-
function generateApproximatingRects(rotatedRect, numRects =
|
|
5592
|
+
function generateApproximatingRects(rotatedRect, numRects = 2) {
|
|
5593
5593
|
const { center, width, height, rotation: rotation4 } = rotatedRect;
|
|
5594
5594
|
const rects = [];
|
|
5595
5595
|
const angleRad = rotation4 * Math.PI / 180;
|
|
@@ -9614,24 +9614,24 @@ import {
|
|
|
9614
9614
|
} from "@tscircuit/props";
|
|
9615
9615
|
|
|
9616
9616
|
// lib/utils/autorouting/CapacityMeshAutorouter.ts
|
|
9617
|
-
import
|
|
9617
|
+
import "@tscircuit/capacity-autorouter";
|
|
9618
9618
|
|
|
9619
9619
|
// lib/solvers.ts
|
|
9620
9620
|
import { PackSolver2 } from "calculate-packing";
|
|
9621
9621
|
import {
|
|
9622
9622
|
AutoroutingPipelineSolver,
|
|
9623
|
-
|
|
9623
|
+
AssignableAutoroutingPipeline2
|
|
9624
9624
|
} from "@tscircuit/capacity-autorouter";
|
|
9625
9625
|
import { CopperPourPipelineSolver } from "@tscircuit/copper-pour-solver";
|
|
9626
9626
|
var SOLVERS = {
|
|
9627
9627
|
PackSolver2,
|
|
9628
9628
|
AutoroutingPipelineSolver,
|
|
9629
|
-
|
|
9629
|
+
AssignableAutoroutingPipeline2,
|
|
9630
9630
|
CopperPourPipelineSolver
|
|
9631
9631
|
};
|
|
9632
9632
|
|
|
9633
9633
|
// lib/utils/autorouting/CapacityMeshAutorouter.ts
|
|
9634
|
-
var
|
|
9634
|
+
var TscircuitAutorouter = class {
|
|
9635
9635
|
input;
|
|
9636
9636
|
isRouting = false;
|
|
9637
9637
|
solver;
|
|
@@ -9649,14 +9649,10 @@ var CapacityMeshAutorouter = class {
|
|
|
9649
9649
|
capacityDepth,
|
|
9650
9650
|
targetMinCapacity,
|
|
9651
9651
|
stepDelay = 0,
|
|
9652
|
-
|
|
9652
|
+
useAssignableSolver = false,
|
|
9653
9653
|
onSolverStarted
|
|
9654
9654
|
} = options;
|
|
9655
|
-
const
|
|
9656
|
-
AutoroutingPipelineSolver: AutoroutingPipelineSolver2,
|
|
9657
|
-
AssignableViaAutoroutingPipelineSolver: AssignableViaAutoroutingPipelineSolver2
|
|
9658
|
-
} = CapacityAutorouter;
|
|
9659
|
-
const solverName = useAssignableViaSolver ? "AssignableViaAutoroutingPipelineSolver" : "AutoroutingPipelineSolver";
|
|
9655
|
+
const solverName = useAssignableSolver ? "AssignableAutoroutingPipeline2" : "AutoroutingPipelineSolver";
|
|
9660
9656
|
const SolverClass = SOLVERS[solverName];
|
|
9661
9657
|
this.solver = new SolverClass(input, {
|
|
9662
9658
|
capacityDepth,
|
|
@@ -14160,11 +14156,11 @@ var Group6 = class extends NormalComponent3 {
|
|
|
14160
14156
|
if (autorouterConfig.algorithmFn) {
|
|
14161
14157
|
autorouter = await autorouterConfig.algorithmFn(simpleRouteJson);
|
|
14162
14158
|
} else {
|
|
14163
|
-
autorouter = new
|
|
14159
|
+
autorouter = new TscircuitAutorouter(simpleRouteJson, {
|
|
14164
14160
|
// Optional configuration parameters
|
|
14165
14161
|
capacityDepth: this.props.autorouter?.capacityDepth,
|
|
14166
14162
|
targetMinCapacity: this.props.autorouter?.targetMinCapacity,
|
|
14167
|
-
|
|
14163
|
+
useAssignableSolver: isLaserPrefabPreset || isSingleLayerBoard,
|
|
14168
14164
|
onSolverStarted: ({ solverName, solverParams }) => this.root?.emit("solver:started", {
|
|
14169
14165
|
type: "solver:started",
|
|
14170
14166
|
solverName,
|
|
@@ -16354,7 +16350,10 @@ var Panel = class extends Group6 {
|
|
|
16354
16350
|
const absoluteY = panelGlobalPos.y + pos.y;
|
|
16355
16351
|
board._repositionOnPcb({ x: absoluteX, y: absoluteY });
|
|
16356
16352
|
db.pcb_board.update(board.pcb_board_id, {
|
|
16357
|
-
center: { x: absoluteX, y: absoluteY }
|
|
16353
|
+
center: { x: absoluteX, y: absoluteY },
|
|
16354
|
+
position_mode: "relative_to_panel_anchor",
|
|
16355
|
+
display_offset_x: `${pos.x}mm`,
|
|
16356
|
+
display_offset_y: `${pos.y}mm`
|
|
16358
16357
|
});
|
|
16359
16358
|
}
|
|
16360
16359
|
const hasExplicitWidth = this._parsedProps.width !== void 0;
|
|
@@ -16388,6 +16387,19 @@ var Panel = class extends Group6 {
|
|
|
16388
16387
|
height: hasExplicitHeight ? distance10.parse(this._parsedProps.height) : gridHeight + edgePaddingTop + edgePaddingBottom
|
|
16389
16388
|
});
|
|
16390
16389
|
}
|
|
16390
|
+
} else {
|
|
16391
|
+
const panelGlobalPos = this._getGlobalPcbPositionBeforeLayout();
|
|
16392
|
+
for (const board of childBoardInstances) {
|
|
16393
|
+
const boardDb = db.pcb_board.get(board.pcb_board_id);
|
|
16394
|
+
if (!boardDb) continue;
|
|
16395
|
+
const relativeX = boardDb.center.x - panelGlobalPos.x;
|
|
16396
|
+
const relativeY = boardDb.center.y - panelGlobalPos.y;
|
|
16397
|
+
db.pcb_board.update(board.pcb_board_id, {
|
|
16398
|
+
position_mode: "relative_to_panel_anchor",
|
|
16399
|
+
display_offset_x: `${relativeX}mm`,
|
|
16400
|
+
display_offset_y: `${relativeY}mm`
|
|
16401
|
+
});
|
|
16402
|
+
}
|
|
16391
16403
|
}
|
|
16392
16404
|
if (this._tabsAndMouseBitesGenerated) return;
|
|
16393
16405
|
const props = this._parsedProps;
|
|
@@ -19773,7 +19785,7 @@ import { identity as identity5 } from "transformation-matrix";
|
|
|
19773
19785
|
var package_default = {
|
|
19774
19786
|
name: "@tscircuit/core",
|
|
19775
19787
|
type: "module",
|
|
19776
|
-
version: "0.0.
|
|
19788
|
+
version: "0.0.941",
|
|
19777
19789
|
types: "dist/index.d.ts",
|
|
19778
19790
|
main: "dist/index.js",
|
|
19779
19791
|
module: "dist/index.js",
|
|
@@ -19804,21 +19816,19 @@ var package_default = {
|
|
|
19804
19816
|
devDependencies: {
|
|
19805
19817
|
"@biomejs/biome": "^1.8.3",
|
|
19806
19818
|
"@resvg/resvg-js": "^2.6.2",
|
|
19807
|
-
"@tscircuit/capacity-autorouter": "^0.0.
|
|
19819
|
+
"@tscircuit/capacity-autorouter": "^0.0.194",
|
|
19808
19820
|
"@tscircuit/checks": "^0.0.87",
|
|
19809
19821
|
"@tscircuit/circuit-json-util": "^0.0.73",
|
|
19810
19822
|
"@tscircuit/common": "^0.0.20",
|
|
19811
19823
|
"@tscircuit/copper-pour-solver": "^0.0.14",
|
|
19812
19824
|
"@tscircuit/footprinter": "^0.0.236",
|
|
19813
|
-
"@tscircuit/
|
|
19814
|
-
"@tscircuit/infgrid-ijump-astar": "^0.0.33",
|
|
19825
|
+
"@tscircuit/infgrid-ijump-astar": "^0.0.35",
|
|
19815
19826
|
"@tscircuit/log-soup": "^1.0.2",
|
|
19816
19827
|
"@tscircuit/matchpack": "^0.0.16",
|
|
19817
19828
|
"@tscircuit/math-utils": "^0.0.29",
|
|
19818
19829
|
"@tscircuit/miniflex": "^0.0.4",
|
|
19819
19830
|
"@tscircuit/ngspice-spice-engine": "^0.0.8",
|
|
19820
19831
|
"@tscircuit/props": "^0.0.435",
|
|
19821
|
-
"@tscircuit/schematic-autolayout": "^0.0.6",
|
|
19822
19832
|
"@tscircuit/schematic-match-adapt": "^0.0.16",
|
|
19823
19833
|
"@tscircuit/schematic-trace-solver": "^v0.0.45",
|
|
19824
19834
|
"@tscircuit/solver-utils": "^0.0.3",
|
|
@@ -19831,7 +19841,7 @@ var package_default = {
|
|
|
19831
19841
|
"bun-match-svg": "0.0.12",
|
|
19832
19842
|
"calculate-elbow": "^0.0.12",
|
|
19833
19843
|
"chokidar-cli": "^3.0.0",
|
|
19834
|
-
"circuit-json": "^0.0.
|
|
19844
|
+
"circuit-json": "^0.0.342",
|
|
19835
19845
|
"circuit-json-to-bpc": "^0.0.13",
|
|
19836
19846
|
"circuit-json-to-connectivity-map": "^0.0.23",
|
|
19837
19847
|
"circuit-json-to-gltf": "^0.0.31",
|
|
@@ -19855,7 +19865,8 @@ var package_default = {
|
|
|
19855
19865
|
"schematic-symbols": "^0.0.202",
|
|
19856
19866
|
spicey: "^0.0.14",
|
|
19857
19867
|
"ts-expect": "^1.3.0",
|
|
19858
|
-
tsup: "^8.2.4"
|
|
19868
|
+
tsup: "^8.2.4",
|
|
19869
|
+
"@tscircuit/soup-util": "^0.0.41"
|
|
19859
19870
|
},
|
|
19860
19871
|
peerDependencies: {
|
|
19861
19872
|
"@tscircuit/capacity-autorouter": "*",
|
|
@@ -19865,7 +19876,6 @@ var package_default = {
|
|
|
19865
19876
|
"@tscircuit/infgrid-ijump-astar": "*",
|
|
19866
19877
|
"@tscircuit/math-utils": "*",
|
|
19867
19878
|
"@tscircuit/props": "*",
|
|
19868
|
-
"@tscircuit/schematic-autolayout": "*",
|
|
19869
19879
|
"@tscircuit/schematic-match-adapt": "*",
|
|
19870
19880
|
"circuit-json-to-bpc": "*",
|
|
19871
19881
|
"bpc-graph": "*",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tscircuit/core",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.942",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -32,21 +32,19 @@
|
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@biomejs/biome": "^1.8.3",
|
|
34
34
|
"@resvg/resvg-js": "^2.6.2",
|
|
35
|
-
"@tscircuit/capacity-autorouter": "^0.0.
|
|
35
|
+
"@tscircuit/capacity-autorouter": "^0.0.194",
|
|
36
36
|
"@tscircuit/checks": "^0.0.87",
|
|
37
37
|
"@tscircuit/circuit-json-util": "^0.0.73",
|
|
38
38
|
"@tscircuit/common": "^0.0.20",
|
|
39
39
|
"@tscircuit/copper-pour-solver": "^0.0.14",
|
|
40
40
|
"@tscircuit/footprinter": "^0.0.236",
|
|
41
|
-
"@tscircuit/
|
|
42
|
-
"@tscircuit/infgrid-ijump-astar": "^0.0.33",
|
|
41
|
+
"@tscircuit/infgrid-ijump-astar": "^0.0.35",
|
|
43
42
|
"@tscircuit/log-soup": "^1.0.2",
|
|
44
43
|
"@tscircuit/matchpack": "^0.0.16",
|
|
45
44
|
"@tscircuit/math-utils": "^0.0.29",
|
|
46
45
|
"@tscircuit/miniflex": "^0.0.4",
|
|
47
46
|
"@tscircuit/ngspice-spice-engine": "^0.0.8",
|
|
48
47
|
"@tscircuit/props": "^0.0.435",
|
|
49
|
-
"@tscircuit/schematic-autolayout": "^0.0.6",
|
|
50
48
|
"@tscircuit/schematic-match-adapt": "^0.0.16",
|
|
51
49
|
"@tscircuit/schematic-trace-solver": "^v0.0.45",
|
|
52
50
|
"@tscircuit/solver-utils": "^0.0.3",
|
|
@@ -59,7 +57,7 @@
|
|
|
59
57
|
"bun-match-svg": "0.0.12",
|
|
60
58
|
"calculate-elbow": "^0.0.12",
|
|
61
59
|
"chokidar-cli": "^3.0.0",
|
|
62
|
-
"circuit-json": "^0.0.
|
|
60
|
+
"circuit-json": "^0.0.342",
|
|
63
61
|
"circuit-json-to-bpc": "^0.0.13",
|
|
64
62
|
"circuit-json-to-connectivity-map": "^0.0.23",
|
|
65
63
|
"circuit-json-to-gltf": "^0.0.31",
|
|
@@ -83,7 +81,8 @@
|
|
|
83
81
|
"schematic-symbols": "^0.0.202",
|
|
84
82
|
"spicey": "^0.0.14",
|
|
85
83
|
"ts-expect": "^1.3.0",
|
|
86
|
-
"tsup": "^8.2.4"
|
|
84
|
+
"tsup": "^8.2.4",
|
|
85
|
+
"@tscircuit/soup-util": "^0.0.41"
|
|
87
86
|
},
|
|
88
87
|
"peerDependencies": {
|
|
89
88
|
"@tscircuit/capacity-autorouter": "*",
|
|
@@ -93,7 +92,6 @@
|
|
|
93
92
|
"@tscircuit/infgrid-ijump-astar": "*",
|
|
94
93
|
"@tscircuit/math-utils": "*",
|
|
95
94
|
"@tscircuit/props": "*",
|
|
96
|
-
"@tscircuit/schematic-autolayout": "*",
|
|
97
95
|
"@tscircuit/schematic-match-adapt": "*",
|
|
98
96
|
"circuit-json-to-bpc": "*",
|
|
99
97
|
"bpc-graph": "*",
|