@tscircuit/core 0.0.654 → 0.0.655
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 +16 -8
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -9568,7 +9568,6 @@ function createSchematicTraceSolverInputProblem(group) {
|
|
|
9568
9568
|
const directConnections = [];
|
|
9569
9569
|
const pairKeyToSourceTraceId = /* @__PURE__ */ new Map();
|
|
9570
9570
|
for (const st of db.source_trace.list()) {
|
|
9571
|
-
if (displayLabelSourceTraceIds.has(st.source_trace_id)) continue;
|
|
9572
9571
|
if (st.subcircuit_id && !allowedSubcircuitIds.has(st.subcircuit_id)) {
|
|
9573
9572
|
continue;
|
|
9574
9573
|
}
|
|
@@ -9633,7 +9632,7 @@ function createSchematicTraceSolverInputProblem(group) {
|
|
|
9633
9632
|
)) {
|
|
9634
9633
|
if (!net.name) continue;
|
|
9635
9634
|
if (!presentNetIds.has(net.name)) continue;
|
|
9636
|
-
if (net.
|
|
9635
|
+
if (net.is_ground || net.name.startsWith("GND")) {
|
|
9637
9636
|
netToAllowedOrientations[net.name] = ["y-"];
|
|
9638
9637
|
} else if (/^V/.test(net.name)) {
|
|
9639
9638
|
netToAllowedOrientations[net.name] = ["y+"];
|
|
@@ -10056,8 +10055,17 @@ var oppositeSide = (input) => {
|
|
|
10056
10055
|
|
|
10057
10056
|
// lib/components/primitive-components/Group/Group_doInitialSchematicTraceRender/getNetNameFromPorts.ts
|
|
10058
10057
|
var getNetNameFromPorts = (ports) => {
|
|
10058
|
+
for (const port of ports) {
|
|
10059
|
+
const traces = port._getDirectlyConnectedTraces();
|
|
10060
|
+
for (const trace of traces) {
|
|
10061
|
+
const displayLabel = trace._parsedProps.schDisplayLabel;
|
|
10062
|
+
if (displayLabel) {
|
|
10063
|
+
return { name: displayLabel, wasAssignedDisplayLabel: true };
|
|
10064
|
+
}
|
|
10065
|
+
}
|
|
10066
|
+
}
|
|
10059
10067
|
const netName = ports.map((p) => p._getNetLabelText()).join("/");
|
|
10060
|
-
return netName;
|
|
10068
|
+
return { name: netName, wasAssignedDisplayLabel: false };
|
|
10061
10069
|
};
|
|
10062
10070
|
|
|
10063
10071
|
// lib/components/primitive-components/Group/Group_doInitialSchematicTraceRender/applyNetLabelPlacements.ts
|
|
@@ -10114,16 +10122,16 @@ function applyNetLabelPlacements(args) {
|
|
|
10114
10122
|
});
|
|
10115
10123
|
continue;
|
|
10116
10124
|
}
|
|
10117
|
-
|
|
10125
|
+
const ports = group.selectAll("port").filter((p) => p._getSubcircuitConnectivityKey() === placementSck);
|
|
10126
|
+
const { name: text, wasAssignedDisplayLabel } = getNetNameFromPorts(ports);
|
|
10127
|
+
if (!wasAssignedDisplayLabel && schPortIds.some(
|
|
10118
10128
|
(schPortId) => schematicPortIdsWithRoutedTraces.has(schPortId)
|
|
10119
10129
|
)) {
|
|
10120
10130
|
debug7(
|
|
10121
|
-
`skipping net label placement for "${placement.netId}" REASON:schematic port has routed traces`
|
|
10131
|
+
`skipping net label placement for "${placement.netId}" REASON:schematic port has routed traces and no display label`
|
|
10122
10132
|
);
|
|
10123
10133
|
continue;
|
|
10124
10134
|
}
|
|
10125
|
-
const ports = group.selectAll("port").filter((p) => p._getSubcircuitConnectivityKey() === placementSck);
|
|
10126
|
-
const text = getNetNameFromPorts(ports);
|
|
10127
10135
|
const center = computeSchematicNetLabelCenter({
|
|
10128
10136
|
anchor_position,
|
|
10129
10137
|
anchor_side,
|
|
@@ -13721,7 +13729,7 @@ import { identity as identity5 } from "transformation-matrix";
|
|
|
13721
13729
|
var package_default = {
|
|
13722
13730
|
name: "@tscircuit/core",
|
|
13723
13731
|
type: "module",
|
|
13724
|
-
version: "0.0.
|
|
13732
|
+
version: "0.0.654",
|
|
13725
13733
|
types: "dist/index.d.ts",
|
|
13726
13734
|
main: "dist/index.js",
|
|
13727
13735
|
module: "dist/index.js",
|