@tscircuit/core 0.0.931 → 0.0.932
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 +11 -11
- package/dist/index.js +21 -18
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -10,10 +10,10 @@ import { z, ZodType } from 'zod';
|
|
|
10
10
|
import { symbols, SchSymbol, BaseSymbolName } from 'schematic-symbols';
|
|
11
11
|
import { Matrix } from 'transformation-matrix';
|
|
12
12
|
import { CircuitJsonUtilObjects } from '@tscircuit/circuit-json-util';
|
|
13
|
-
import { ConnectivityMap } from 'circuit-json-to-connectivity-map';
|
|
14
|
-
import { GraphicsObject } from 'graphics-debug';
|
|
15
13
|
import { PackSolver2 } from 'calculate-packing';
|
|
16
14
|
import { AutoroutingPipelineSolver, AssignableViaAutoroutingPipelineSolver } from '@tscircuit/capacity-autorouter';
|
|
15
|
+
import { ConnectivityMap } from 'circuit-json-to-connectivity-map';
|
|
16
|
+
import { GraphicsObject } from 'graphics-debug';
|
|
17
17
|
|
|
18
18
|
declare const orderedRenderPhases: readonly ["ReactSubtreesRender", "InflateSubcircuitCircuitJson", "SourceNameDuplicateComponentRemoval", "PcbFootprintStringRender", "InitializePortsFromChildren", "CreateNetsFromProps", "AssignFallbackProps", "CreateTracesFromProps", "CreateTracesFromNetLabels", "CreateTraceHintsFromProps", "SourceGroupRender", "AssignNameToUnnamedComponents", "SourceRender", "SourceParentAttachment", "PortMatching", "OptimizeSelectorCache", "SourceTraceRender", "SourceAddConnectivityMapKey", "SourceDesignRuleChecks", "SimulationRender", "SchematicComponentRender", "SchematicPortRender", "SchematicPrimitiveRender", "SchematicComponentSizeCalculation", "SchematicLayout", "SchematicTraceRender", "SchematicReplaceNetLabelsWithSymbols", "PcbComponentRender", "PcbPrimitiveRender", "PcbFootprintLayout", "PcbPortRender", "PcbPortAttachment", "PcbComponentSizeCalculation", "PcbComponentAnchorAlignment", "PcbLayout", "PcbBoardAutoSize", "PanelLayout", "PcbTraceHintRender", "PcbManualTraceRender", "PcbTraceRender", "PcbRouteNetIslands", "PcbCopperPourRender", "PcbDesignRuleChecks", "SilkscreenOverlapAdjustment", "CadModelRender", "PartsEngineRender", "SimulationSpiceEngineRender"];
|
|
19
19
|
type RenderPhase = (typeof orderedRenderPhases)[number];
|
|
@@ -123,6 +123,13 @@ interface BoardI {
|
|
|
123
123
|
pcb_board_id?: string | null;
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
+
declare const SOLVERS: {
|
|
127
|
+
PackSolver2: typeof PackSolver2;
|
|
128
|
+
AutoroutingPipelineSolver: typeof AutoroutingPipelineSolver;
|
|
129
|
+
AssignableViaAutoroutingPipelineSolver: typeof AssignableViaAutoroutingPipelineSolver;
|
|
130
|
+
};
|
|
131
|
+
type SolverName = keyof typeof SOLVERS;
|
|
132
|
+
|
|
126
133
|
type SimplifiedPcbTrace = {
|
|
127
134
|
type: "pcb_trace";
|
|
128
135
|
pcb_trace_id: string;
|
|
@@ -234,8 +241,8 @@ interface PackingErrorEvent {
|
|
|
234
241
|
}
|
|
235
242
|
interface SolverStartedEvent {
|
|
236
243
|
type: "solver:started";
|
|
237
|
-
solverName:
|
|
238
|
-
solverParams:
|
|
244
|
+
solverName: keyof typeof SOLVERS;
|
|
245
|
+
solverParams: any;
|
|
239
246
|
componentName: string;
|
|
240
247
|
}
|
|
241
248
|
interface DebugLogOutputEvent {
|
|
@@ -44548,13 +44555,6 @@ declare const applySchematicEditEventsToManualEditsFile: ({ circuitJson, editEve
|
|
|
44548
44555
|
manualEditsFile: z.infer<typeof manual_edits_file>;
|
|
44549
44556
|
}) => z.infer<typeof manual_edits_file>;
|
|
44550
44557
|
|
|
44551
|
-
declare const SOLVERS: {
|
|
44552
|
-
PackSolver2: typeof PackSolver2;
|
|
44553
|
-
AutoroutingPipelineSolver: typeof AutoroutingPipelineSolver;
|
|
44554
|
-
AssignableViaAutoroutingPipelineSolver: typeof AssignableViaAutoroutingPipelineSolver;
|
|
44555
|
-
};
|
|
44556
|
-
type SolverName = keyof typeof SOLVERS;
|
|
44557
|
-
|
|
44558
44558
|
interface TscircuitElements {
|
|
44559
44559
|
resistor: _tscircuit_props.ResistorProps;
|
|
44560
44560
|
capacitor: _tscircuit_props.CapacitorProps;
|
package/dist/index.js
CHANGED
|
@@ -9556,6 +9556,20 @@ import {
|
|
|
9556
9556
|
|
|
9557
9557
|
// lib/utils/autorouting/CapacityMeshAutorouter.ts
|
|
9558
9558
|
import * as CapacityAutorouter from "@tscircuit/capacity-autorouter";
|
|
9559
|
+
|
|
9560
|
+
// lib/solvers.ts
|
|
9561
|
+
import { PackSolver2 } from "calculate-packing";
|
|
9562
|
+
import {
|
|
9563
|
+
AutoroutingPipelineSolver,
|
|
9564
|
+
AssignableViaAutoroutingPipelineSolver
|
|
9565
|
+
} from "@tscircuit/capacity-autorouter";
|
|
9566
|
+
var SOLVERS = {
|
|
9567
|
+
PackSolver2,
|
|
9568
|
+
AutoroutingPipelineSolver,
|
|
9569
|
+
AssignableViaAutoroutingPipelineSolver
|
|
9570
|
+
};
|
|
9571
|
+
|
|
9572
|
+
// lib/utils/autorouting/CapacityMeshAutorouter.ts
|
|
9559
9573
|
var CapacityMeshAutorouter = class {
|
|
9560
9574
|
input;
|
|
9561
9575
|
isRouting = false;
|
|
@@ -9581,14 +9595,15 @@ var CapacityMeshAutorouter = class {
|
|
|
9581
9595
|
AutoroutingPipelineSolver: AutoroutingPipelineSolver2,
|
|
9582
9596
|
AssignableViaAutoroutingPipelineSolver: AssignableViaAutoroutingPipelineSolver2
|
|
9583
9597
|
} = CapacityAutorouter;
|
|
9584
|
-
const
|
|
9598
|
+
const solverName = useAssignableViaSolver ? "AssignableViaAutoroutingPipelineSolver" : "AutoroutingPipelineSolver";
|
|
9599
|
+
const SolverClass = SOLVERS[solverName];
|
|
9585
9600
|
this.solver = new SolverClass(input, {
|
|
9586
9601
|
capacityDepth,
|
|
9587
9602
|
targetMinCapacity,
|
|
9588
9603
|
cacheProvider: null
|
|
9589
9604
|
});
|
|
9590
9605
|
onSolverStarted?.({
|
|
9591
|
-
solverName
|
|
9606
|
+
solverName,
|
|
9592
9607
|
solverParams: {
|
|
9593
9608
|
input,
|
|
9594
9609
|
options: {
|
|
@@ -11920,7 +11935,7 @@ function getPresetAutoroutingConfig(autorouterConfig) {
|
|
|
11920
11935
|
|
|
11921
11936
|
// lib/components/primitive-components/Group/Group_doInitialPcbLayoutPack/Group_doInitialPcbLayoutPack.ts
|
|
11922
11937
|
import {
|
|
11923
|
-
PackSolver2,
|
|
11938
|
+
PackSolver2 as PackSolver22,
|
|
11924
11939
|
convertCircuitJsonToPackOutput,
|
|
11925
11940
|
convertPackOutputToPackInput,
|
|
11926
11941
|
getGraphicsFromPackOutput
|
|
@@ -12426,10 +12441,10 @@ var Group_doInitialPcbLayoutPack = (group) => {
|
|
|
12426
12441
|
}
|
|
12427
12442
|
let packOutput;
|
|
12428
12443
|
try {
|
|
12429
|
-
const solver = new
|
|
12444
|
+
const solver = new PackSolver22(packInput);
|
|
12430
12445
|
group.root?.emit("solver:started", {
|
|
12431
12446
|
type: "solver:started",
|
|
12432
|
-
solverName:
|
|
12447
|
+
solverName: "PackSolver2",
|
|
12433
12448
|
solverParams: solver.getConstructorParams(),
|
|
12434
12449
|
componentName: group.getString()
|
|
12435
12450
|
});
|
|
@@ -19645,7 +19660,7 @@ import { identity as identity5 } from "transformation-matrix";
|
|
|
19645
19660
|
var package_default = {
|
|
19646
19661
|
name: "@tscircuit/core",
|
|
19647
19662
|
type: "module",
|
|
19648
|
-
version: "0.0.
|
|
19663
|
+
version: "0.0.931",
|
|
19649
19664
|
types: "dist/index.d.ts",
|
|
19650
19665
|
main: "dist/index.js",
|
|
19651
19666
|
module: "dist/index.js",
|
|
@@ -20175,18 +20190,6 @@ var sel = new Proxy(
|
|
|
20175
20190
|
}
|
|
20176
20191
|
);
|
|
20177
20192
|
|
|
20178
|
-
// lib/solvers.ts
|
|
20179
|
-
import { PackSolver2 as PackSolver22 } from "calculate-packing";
|
|
20180
|
-
import {
|
|
20181
|
-
AutoroutingPipelineSolver,
|
|
20182
|
-
AssignableViaAutoroutingPipelineSolver
|
|
20183
|
-
} from "@tscircuit/capacity-autorouter";
|
|
20184
|
-
var SOLVERS = {
|
|
20185
|
-
PackSolver2: PackSolver22,
|
|
20186
|
-
AutoroutingPipelineSolver,
|
|
20187
|
-
AssignableViaAutoroutingPipelineSolver
|
|
20188
|
-
};
|
|
20189
|
-
|
|
20190
20193
|
// lib/index.ts
|
|
20191
20194
|
import { createElement } from "react";
|
|
20192
20195
|
|