@tscircuit/core 0.0.1463 → 0.0.1464
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 +36 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -16907,8 +16907,42 @@ var getSimpleRouteJsonFromCircuitJson = ({
|
|
|
16907
16907
|
const connectionsFromNets = [];
|
|
16908
16908
|
const connectionFromNetId = /* @__PURE__ */ new Map();
|
|
16909
16909
|
const handledNetConnectivityKeys = /* @__PURE__ */ new Set();
|
|
16910
|
+
const sourceNetIds = new Set(source_nets.map((net) => net.source_net_id));
|
|
16911
|
+
const currentSubcircuitSourceTraces = db.source_trace.list().filter((trace) => !subcircuit_id || trace.subcircuit_id === subcircuit_id);
|
|
16912
|
+
const exposedBridgeSourceTraceIds = new Set(
|
|
16913
|
+
(subcircuitComponent?.selectAll("trace") ?? []).flatMap((trace) => {
|
|
16914
|
+
const candidate = trace;
|
|
16915
|
+
return candidate._exposesSubcircuitConnection && candidate.source_trace_id ? [candidate.source_trace_id] : [];
|
|
16916
|
+
})
|
|
16917
|
+
);
|
|
16918
|
+
const exposedDescendantSourceNetIds = /* @__PURE__ */ new Set();
|
|
16919
|
+
for (const trace of currentSubcircuitSourceTraces) {
|
|
16920
|
+
if (!exposedBridgeSourceTraceIds.has(trace.source_trace_id)) {
|
|
16921
|
+
continue;
|
|
16922
|
+
}
|
|
16923
|
+
for (const sourceNetId of trace.connected_source_net_ids ?? []) {
|
|
16924
|
+
if (!sourceNetIds.has(sourceNetId)) {
|
|
16925
|
+
exposedDescendantSourceNetIds.add(sourceNetId);
|
|
16926
|
+
}
|
|
16927
|
+
}
|
|
16928
|
+
}
|
|
16929
|
+
const routedDescendantSourceTraceIds = new Set(
|
|
16930
|
+
subcircuit_id ? db.pcb_trace.list().filter(
|
|
16931
|
+
(trace) => trace.subcircuit_id && trace.subcircuit_id !== subcircuit_id && relevantSubcircuitIds?.has(trace.subcircuit_id)
|
|
16932
|
+
).map((trace) => trace.source_trace_id).filter((id) => Boolean(id)) : []
|
|
16933
|
+
);
|
|
16910
16934
|
const sourceTracesEligibleForNetConnections = db.source_trace.list().filter(
|
|
16911
|
-
(
|
|
16935
|
+
(trace) => (
|
|
16936
|
+
// Existing copper must still contribute endpoint connectivity when it
|
|
16937
|
+
// belongs to the scope currently being routed. Descendant copper is
|
|
16938
|
+
// preserved as static geometry only, preventing it from being routed
|
|
16939
|
+
// a second time by its parent.
|
|
16940
|
+
!sourceTraceIdsAlreadyPreservedAsSrjTraces.has(trace.source_trace_id) || subcircuit_id != null && trace.subcircuit_id === subcircuit_id
|
|
16941
|
+
)
|
|
16942
|
+
).filter(
|
|
16943
|
+
(trace) => !subcircuit_id || trace.subcircuit_id === subcircuit_id || (trace.connected_source_net_ids?.some((id) => sourceNetIds.has(id)) ?? false) || (trace.connected_source_net_ids?.some(
|
|
16944
|
+
(id) => exposedDescendantSourceNetIds.has(id)
|
|
16945
|
+
) ?? false) && !routedDescendantSourceTraceIds.has(trace.source_trace_id)
|
|
16912
16946
|
);
|
|
16913
16947
|
const getSourceConnectivityKey = (id) => id ? sharedConnMap.getNetConnectedToId(id) ?? id : null;
|
|
16914
16948
|
for (const net of source_nets) {
|
|
@@ -22865,7 +22899,7 @@ function Group_getRoutingPhasePlans(group) {
|
|
|
22865
22899
|
var package_default = {
|
|
22866
22900
|
name: "@tscircuit/core",
|
|
22867
22901
|
type: "module",
|
|
22868
|
-
version: "0.0.
|
|
22902
|
+
version: "0.0.1463",
|
|
22869
22903
|
types: "dist/index.d.ts",
|
|
22870
22904
|
main: "dist/index.js",
|
|
22871
22905
|
module: "dist/index.js",
|