@tscircuit/core 0.0.1379 → 0.0.1380
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 +7 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -20671,6 +20671,8 @@ var insertNetLabelsForPortsMissingTrace = ({
|
|
|
20671
20671
|
const connKey = sourcePort?.subcircuit_connectivity_map_key;
|
|
20672
20672
|
if (!connKey) continue;
|
|
20673
20673
|
const sourceNet = connKeyToSourceNet.get(connKey);
|
|
20674
|
+
const schComponent = schPort.schematic_component_id ? db.schematic_component.get(schPort.schematic_component_id) : void 0;
|
|
20675
|
+
const portSchematicSheetId = schComponent?.schematic_sheet_id ?? group._resolveSchematicSheetId();
|
|
20674
20676
|
const connectedSourcePortIdsForKey = Array.from(
|
|
20675
20677
|
allSourceAndSchematicPortIdsInScope
|
|
20676
20678
|
).map((portId) => schPortIdToSourcePortId.get(portId)).filter((sourcePortId) => {
|
|
@@ -20711,6 +20713,7 @@ var insertNetLabelsForPortsMissingTrace = ({
|
|
|
20711
20713
|
text
|
|
20712
20714
|
});
|
|
20713
20715
|
const existingNetLabelForCurrentSourceConnection = db.schematic_net_label.list().find((nl) => {
|
|
20716
|
+
if (nl.schematic_sheet_id !== portSchematicSheetId) return false;
|
|
20714
20717
|
return doesSchematicNetLabelRepresentCurrentSourceConnection({
|
|
20715
20718
|
nl,
|
|
20716
20719
|
connKey,
|
|
@@ -20764,6 +20767,7 @@ var insertNetLabelsForPortsMissingTrace = ({
|
|
|
20764
20767
|
continue;
|
|
20765
20768
|
}
|
|
20766
20769
|
const existingAtPort = db.schematic_net_label.list().some((nl) => {
|
|
20770
|
+
if (nl.schematic_sheet_id !== portSchematicSheetId) return false;
|
|
20767
20771
|
const dx2 = nl.anchor_position.x - schPort.center.x;
|
|
20768
20772
|
const dy2 = nl.anchor_position.y - schPort.center.y;
|
|
20769
20773
|
if (dx2 * dx2 + dy2 * dy2 >= SAME_ANCHOR_POSITION_DISTANCE * SAME_ANCHOR_POSITION_DISTANCE) {
|
|
@@ -20781,6 +20785,7 @@ var insertNetLabelsForPortsMissingTrace = ({
|
|
|
20781
20785
|
if (!sourceNet) {
|
|
20782
20786
|
for (const nl of db.schematic_net_label.list()) {
|
|
20783
20787
|
if (nl.source_net_id !== connKey) continue;
|
|
20788
|
+
if (nl.schematic_sheet_id !== portSchematicSheetId) continue;
|
|
20784
20789
|
const isAttachedToConnectedPort = connectedSourcePortIdsForKey.some(
|
|
20785
20790
|
(sourcePortId) => {
|
|
20786
20791
|
const schPortId = Array.from(
|
|
@@ -20807,7 +20812,7 @@ var insertNetLabelsForPortsMissingTrace = ({
|
|
|
20807
20812
|
anchor_position: schPort.center,
|
|
20808
20813
|
center,
|
|
20809
20814
|
anchor_side: side,
|
|
20810
|
-
schematic_sheet_id:
|
|
20815
|
+
schematic_sheet_id: portSchematicSheetId
|
|
20811
20816
|
};
|
|
20812
20817
|
db.schematic_net_label.insert(netLabel);
|
|
20813
20818
|
}
|
|
@@ -24849,7 +24854,7 @@ import { identity as identity5 } from "transformation-matrix";
|
|
|
24849
24854
|
var package_default = {
|
|
24850
24855
|
name: "@tscircuit/core",
|
|
24851
24856
|
type: "module",
|
|
24852
|
-
version: "0.0.
|
|
24857
|
+
version: "0.0.1379",
|
|
24853
24858
|
types: "dist/index.d.ts",
|
|
24854
24859
|
main: "dist/index.js",
|
|
24855
24860
|
module: "dist/index.js",
|