@tscircuit/core 0.0.1228 → 0.0.1230
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.js +18 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -409,6 +409,10 @@ var asyncPhaseDependencies = {
|
|
|
409
409
|
"FetchPartFootprint",
|
|
410
410
|
"PartsEngineRender"
|
|
411
411
|
],
|
|
412
|
+
SourceAddConnectivityMapKey: [
|
|
413
|
+
"PcbFootprintStringRender",
|
|
414
|
+
"FetchPartFootprint"
|
|
415
|
+
],
|
|
412
416
|
PcbComponentAnchorAlignment: [
|
|
413
417
|
"PcbFootprintStringRender",
|
|
414
418
|
"FetchPartFootprint"
|
|
@@ -17712,6 +17716,13 @@ function applyNetLabelPlacements(args) {
|
|
|
17712
17716
|
} = args;
|
|
17713
17717
|
const { db } = group.root;
|
|
17714
17718
|
const netLabelPlacements = solver.netLabelPlacementSolver?.netLabelPlacements ?? solver.traceLabelOverlapAvoidanceSolver?.getOutput().netLabelPlacements ?? [];
|
|
17719
|
+
const netLabelPlacementCountByGlobalNetId = /* @__PURE__ */ new Map();
|
|
17720
|
+
for (const placement of netLabelPlacements) {
|
|
17721
|
+
netLabelPlacementCountByGlobalNetId.set(
|
|
17722
|
+
placement.globalConnNetId,
|
|
17723
|
+
(netLabelPlacementCountByGlobalNetId.get(placement.globalConnNetId) ?? 0) + 1
|
|
17724
|
+
);
|
|
17725
|
+
}
|
|
17715
17726
|
const globalConnMap = solver.mspConnectionPairSolver.globalConnMap;
|
|
17716
17727
|
for (const placement of netLabelPlacements) {
|
|
17717
17728
|
debug8(`processing placement: ${placement.netId}`);
|
|
@@ -17750,7 +17761,7 @@ function applyNetLabelPlacements(args) {
|
|
|
17750
17761
|
}
|
|
17751
17762
|
const ports = group.selectAll("port").filter((p) => p._getSubcircuitConnectivityKey() === placementSck);
|
|
17752
17763
|
const { name: text, wasAssignedDisplayLabel } = getNetNameFromPorts(ports);
|
|
17753
|
-
if (!wasAssignedDisplayLabel && schPortIds.some(
|
|
17764
|
+
if (!wasAssignedDisplayLabel && (netLabelPlacementCountByGlobalNetId.get(placement.globalConnNetId) ?? 0) <= 1 && schPortIds.some(
|
|
17754
17765
|
(schPortId) => schematicPortIdsWithRoutedTraces.has(schPortId)
|
|
17755
17766
|
)) {
|
|
17756
17767
|
debug8(
|
|
@@ -17847,10 +17858,13 @@ var getSchematicPortIdsWithRoutedTraces = ({
|
|
|
17847
17858
|
solver,
|
|
17848
17859
|
pinIdToSchematicPortId
|
|
17849
17860
|
}) => {
|
|
17850
|
-
const solvedTraces = solver.schematicTraceLinesSolver
|
|
17861
|
+
const solvedTraces = solver.traceCleanupSolver?.getOutput().traces ?? solver.traceLabelOverlapAvoidanceSolver?.getOutput().traces ?? solver.schematicTraceLinesSolver?.solvedTracePaths ?? [];
|
|
17851
17862
|
const schematicPortIdsWithRoutedTraces = /* @__PURE__ */ new Set();
|
|
17852
17863
|
for (const solvedTrace of solvedTraces) {
|
|
17853
|
-
|
|
17864
|
+
const points = solvedTrace?.tracePath;
|
|
17865
|
+
if (!Array.isArray(points) || points.length < 2) continue;
|
|
17866
|
+
const pinIds = Array.isArray(solvedTrace.pins) ? solvedTrace.pins.map((pin) => pin.pinId) : solvedTrace.pinIds;
|
|
17867
|
+
for (const pinId of pinIds) {
|
|
17854
17868
|
const schPortId = pinIdToSchematicPortId.get(pinId);
|
|
17855
17869
|
if (schPortId) {
|
|
17856
17870
|
schematicPortIdsWithRoutedTraces.add(schPortId);
|
|
@@ -20610,7 +20624,7 @@ import { identity as identity5 } from "transformation-matrix";
|
|
|
20610
20624
|
var package_default = {
|
|
20611
20625
|
name: "@tscircuit/core",
|
|
20612
20626
|
type: "module",
|
|
20613
|
-
version: "0.0.
|
|
20627
|
+
version: "0.0.1229",
|
|
20614
20628
|
types: "dist/index.d.ts",
|
|
20615
20629
|
main: "dist/index.js",
|
|
20616
20630
|
module: "dist/index.js",
|