@tscircuit/core 0.0.1441 → 0.0.1443
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 +31 -2
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -21628,7 +21628,36 @@ var insertNetLabelsForPortsMissingTrace = ({
|
|
|
21628
21628
|
}
|
|
21629
21629
|
const implicitPortLabelText = connectedSourcePortIdsForKey.map((sourcePortId) => getSourcePortNetLabelText(db, sourcePortId)).filter((label) => Boolean(label)).join("/");
|
|
21630
21630
|
const directCrossSubcircuitConnectionLabelText = getDirectCrossSubcircuitConnectionLabelText(db, srcPortId);
|
|
21631
|
+
const isConnectivityKeyFallback = !sourceNet?.name && !sourceNet?.source_net_id && !assignedPortNetLabelText && !directCrossSubcircuitConnectionLabelText && !implicitPortLabelText;
|
|
21631
21632
|
const text = sourceNet?.name || sourceNet?.source_net_id || assignedPortNetLabelText || directCrossSubcircuitConnectionLabelText || implicitPortLabelText || connKey;
|
|
21633
|
+
if (isConnectivityKeyFallback) {
|
|
21634
|
+
const sourcePortComponent = connectedPortsForKey.find(
|
|
21635
|
+
(port) => port.source_port_id === srcPortId
|
|
21636
|
+
);
|
|
21637
|
+
const collapsedGroup = sourcePortComponent?.parent;
|
|
21638
|
+
if (sourcePortComponent?.isGroupPort() && collapsedGroup?._parsedProps?.showAsSchematicBox) {
|
|
21639
|
+
const sourceTracesConnectedToPort = db.source_trace.list().filter(
|
|
21640
|
+
(trace) => trace.connected_source_port_ids?.includes(srcPortId)
|
|
21641
|
+
);
|
|
21642
|
+
const isPortInsideCollapsedGroup = (port) => {
|
|
21643
|
+
let parent = port.parent;
|
|
21644
|
+
while (parent) {
|
|
21645
|
+
if (parent === collapsedGroup) return true;
|
|
21646
|
+
parent = parent.parent;
|
|
21647
|
+
}
|
|
21648
|
+
return false;
|
|
21649
|
+
};
|
|
21650
|
+
const allConnectionsAreInternal = sourceTracesConnectedToPort.length > 0 && sourceTracesConnectedToPort.every(
|
|
21651
|
+
(trace) => (trace.connected_source_net_ids?.length ?? 0) === 0 && trace.connected_source_port_ids.filter((sourcePortId) => sourcePortId !== srcPortId).every((sourcePortId) => {
|
|
21652
|
+
const connectedPort = connectedPortsForKey.find(
|
|
21653
|
+
(port) => port.source_port_id === sourcePortId
|
|
21654
|
+
);
|
|
21655
|
+
return connectedPort ? isPortInsideCollapsedGroup(connectedPort) : false;
|
|
21656
|
+
})
|
|
21657
|
+
);
|
|
21658
|
+
if (allConnectionsAreInternal) continue;
|
|
21659
|
+
}
|
|
21660
|
+
}
|
|
21632
21661
|
const connectedPortCountForKey = Array.from(
|
|
21633
21662
|
allSourceAndSchematicPortIdsInScope
|
|
21634
21663
|
).filter((portId) => {
|
|
@@ -22564,7 +22593,7 @@ function Group_getRoutingPhasePlans(group) {
|
|
|
22564
22593
|
var package_default = {
|
|
22565
22594
|
name: "@tscircuit/core",
|
|
22566
22595
|
type: "module",
|
|
22567
|
-
version: "0.0.
|
|
22596
|
+
version: "0.0.1442",
|
|
22568
22597
|
types: "dist/index.d.ts",
|
|
22569
22598
|
main: "dist/index.js",
|
|
22570
22599
|
module: "dist/index.js",
|
|
@@ -22632,7 +22661,7 @@ var package_default = {
|
|
|
22632
22661
|
"circuit-json-to-connectivity-map": "^0.0.23",
|
|
22633
22662
|
"circuit-json-to-gltf": "^0.0.105",
|
|
22634
22663
|
"circuit-json-to-spice": "^0.0.43",
|
|
22635
|
-
"circuit-to-svg": "^0.0.
|
|
22664
|
+
"circuit-to-svg": "^0.0.387",
|
|
22636
22665
|
concurrently: "^9.1.2",
|
|
22637
22666
|
"connectivity-map": "^1.0.0",
|
|
22638
22667
|
debug: "^4.3.6",
|
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.1443",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"circuit-json-to-connectivity-map": "^0.0.23",
|
|
70
70
|
"circuit-json-to-gltf": "^0.0.105",
|
|
71
71
|
"circuit-json-to-spice": "^0.0.43",
|
|
72
|
-
"circuit-to-svg": "^0.0.
|
|
72
|
+
"circuit-to-svg": "^0.0.387",
|
|
73
73
|
"concurrently": "^9.1.2",
|
|
74
74
|
"connectivity-map": "^1.0.0",
|
|
75
75
|
"debug": "^4.3.6",
|