@tscircuit/core 0.0.1376 → 0.0.1378
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 +11 -34
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -16044,24 +16044,8 @@ var getSimpleRouteJsonFromCircuitJson = ({
|
|
|
16044
16044
|
}).filter((c) => c !== null);
|
|
16045
16045
|
const source_nets = db.source_net.list().filter((e) => !subcircuit_id || e.subcircuit_id === subcircuit_id);
|
|
16046
16046
|
const connectionsFromNets = [];
|
|
16047
|
-
const connectionFromNetId = /* @__PURE__ */ new Map();
|
|
16048
|
-
const handledNetConnectivityKeys = /* @__PURE__ */ new Set();
|
|
16049
|
-
const sourceTraces = db.source_trace.list();
|
|
16050
|
-
const getSourceConnectivityKey = (id) => id ? connMap.getNetConnectedToId(id) ?? id : null;
|
|
16051
16047
|
for (const net of source_nets) {
|
|
16052
|
-
const
|
|
16053
|
-
if (!netConnectivityKey || handledNetConnectivityKeys.has(netConnectivityKey)) {
|
|
16054
|
-
continue;
|
|
16055
|
-
}
|
|
16056
|
-
handledNetConnectivityKeys.add(netConnectivityKey);
|
|
16057
|
-
const connectedSourceNetIds = source_nets.filter(
|
|
16058
|
-
(sourceNet) => getSourceConnectivityKey(sourceNet.source_net_id) === netConnectivityKey
|
|
16059
|
-
).map((sourceNet) => sourceNet.source_net_id);
|
|
16060
|
-
const connectedSourceTraces = sourceTraces.filter(
|
|
16061
|
-
(st) => [st.source_trace_id, ...st.connected_source_net_ids ?? []].some(
|
|
16062
|
-
(id) => getSourceConnectivityKey(id) === netConnectivityKey
|
|
16063
|
-
)
|
|
16064
|
-
);
|
|
16048
|
+
const connectedSourceTraces = db.source_trace.list().filter((st) => st.connected_source_net_ids?.includes(net.source_net_id));
|
|
16065
16049
|
let nominalTraceWidthFromConnectedTraces;
|
|
16066
16050
|
for (const sourceTrace of connectedSourceTraces) {
|
|
16067
16051
|
if (sourceTrace.min_trace_thickness === void 0) continue;
|
|
@@ -16086,16 +16070,12 @@ var getSimpleRouteJsonFromCircuitJson = ({
|
|
|
16086
16070
|
});
|
|
16087
16071
|
}
|
|
16088
16072
|
}
|
|
16089
|
-
|
|
16073
|
+
connectionsFromNets.push({
|
|
16090
16074
|
name: net.source_net_id ?? connMap.getNetConnectedToId(net.source_net_id),
|
|
16091
16075
|
nominalTraceWidth: nominalTraceWidthFromConnectedTraces,
|
|
16092
16076
|
width: nominalTraceWidthFromConnectedTraces,
|
|
16093
16077
|
pointsToConnect
|
|
16094
|
-
};
|
|
16095
|
-
connectionsFromNets.push(connection);
|
|
16096
|
-
for (const sourceNetId of connectedSourceNetIds) {
|
|
16097
|
-
connectionFromNetId.set(sourceNetId, connection);
|
|
16098
|
-
}
|
|
16078
|
+
});
|
|
16099
16079
|
}
|
|
16100
16080
|
const connectionsFromBreakoutPoints = [];
|
|
16101
16081
|
for (const bp of breakoutPoints) {
|
|
@@ -16130,7 +16110,7 @@ var getSimpleRouteJsonFromCircuitJson = ({
|
|
|
16130
16110
|
continue;
|
|
16131
16111
|
}
|
|
16132
16112
|
if (bp.source_net_id) {
|
|
16133
|
-
const conn =
|
|
16113
|
+
const conn = connectionsFromNets.find((c) => c.name === bp.source_net_id);
|
|
16134
16114
|
if (conn) {
|
|
16135
16115
|
conn.pointsToConnect.push(pt);
|
|
16136
16116
|
} else {
|
|
@@ -23610,7 +23590,6 @@ var Group5 = class extends NormalComponent3 {
|
|
|
23610
23590
|
const subcircuitComponentsByName = /* @__PURE__ */ new Map();
|
|
23611
23591
|
for (const child of this.children) {
|
|
23612
23592
|
if (child.isSubcircuit) continue;
|
|
23613
|
-
if (child instanceof Trace3) continue;
|
|
23614
23593
|
if (child._parsedProps.name) {
|
|
23615
23594
|
const components = subcircuitComponentsByName.get(child._parsedProps.name) || [];
|
|
23616
23595
|
components.push(child);
|
|
@@ -24743,7 +24722,7 @@ import { identity as identity5 } from "transformation-matrix";
|
|
|
24743
24722
|
var package_default = {
|
|
24744
24723
|
name: "@tscircuit/core",
|
|
24745
24724
|
type: "module",
|
|
24746
|
-
version: "0.0.
|
|
24725
|
+
version: "0.0.1377",
|
|
24747
24726
|
types: "dist/index.d.ts",
|
|
24748
24727
|
main: "dist/index.js",
|
|
24749
24728
|
module: "dist/index.js",
|
|
@@ -24794,7 +24773,7 @@ var package_default = {
|
|
|
24794
24773
|
"@tscircuit/ngspice-spice-engine": "^0.0.18",
|
|
24795
24774
|
"@tscircuit/props": "^0.0.565",
|
|
24796
24775
|
"@tscircuit/schematic-match-adapt": "^0.0.18",
|
|
24797
|
-
"@tscircuit/schematic-trace-solver": "^0.0.
|
|
24776
|
+
"@tscircuit/schematic-trace-solver": "^0.0.75",
|
|
24798
24777
|
"@tscircuit/solver-utils": "^0.0.16",
|
|
24799
24778
|
"@tscircuit/soup-util": "^0.0.41",
|
|
24800
24779
|
"@types/bun": "^1.2.16",
|
|
@@ -25850,17 +25829,15 @@ var Subcircuit = class extends Group5 {
|
|
|
25850
25829
|
const parentNetSelector = `> net.${netName}`;
|
|
25851
25830
|
const childNetSelector = `.${this.name} > net.${netName}`;
|
|
25852
25831
|
const traceName = `exposed_net.${netName}`;
|
|
25853
|
-
const
|
|
25832
|
+
const parentHasDirectNet = parentSubcircuit.children.some(
|
|
25854
25833
|
(child) => child instanceof Net && child._parsedProps.name === netName
|
|
25855
25834
|
);
|
|
25856
|
-
if (!
|
|
25835
|
+
if (!parentHasDirectNet) {
|
|
25857
25836
|
parentSubcircuit.add(new Net({ name: netName }));
|
|
25858
25837
|
}
|
|
25859
|
-
const existingTrace = parentSubcircuit.children.find(
|
|
25860
|
-
|
|
25861
|
-
|
|
25862
|
-
return childProps.name === traceName && childProps.from === childNetSelector && childProps.to === parentNetSelector;
|
|
25863
|
-
});
|
|
25838
|
+
const existingTrace = parentSubcircuit.children.find(
|
|
25839
|
+
(child) => child instanceof Trace3 && child._parsedProps.name === traceName
|
|
25840
|
+
);
|
|
25864
25841
|
if (existingTrace) continue;
|
|
25865
25842
|
parentSubcircuit.add(
|
|
25866
25843
|
new Trace3({
|
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.1378",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"@tscircuit/ngspice-spice-engine": "^0.0.18",
|
|
53
53
|
"@tscircuit/props": "^0.0.565",
|
|
54
54
|
"@tscircuit/schematic-match-adapt": "^0.0.18",
|
|
55
|
-
"@tscircuit/schematic-trace-solver": "^0.0.
|
|
55
|
+
"@tscircuit/schematic-trace-solver": "^0.0.75",
|
|
56
56
|
"@tscircuit/solver-utils": "^0.0.16",
|
|
57
57
|
"@tscircuit/soup-util": "^0.0.41",
|
|
58
58
|
"@types/bun": "^1.2.16",
|