@tscircuit/core 0.0.671 → 0.0.672

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.
Files changed (2) hide show
  1. package/dist/index.js +20 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -9655,6 +9655,22 @@ function createSchematicTraceSolverInputProblem(group) {
9655
9655
  for (const cg of childGroups) {
9656
9656
  if (cg.subcircuit_id) allowedSubcircuitIds.add(cg.subcircuit_id);
9657
9657
  }
9658
+ const tracesInScope = db.source_trace.list().filter((st) => {
9659
+ if (st.subcircuit_id === group.subcircuit_id) return true;
9660
+ for (const source_port_id of st.connected_source_port_ids) {
9661
+ if (sourcePortIdToSchPortId.has(source_port_id)) return true;
9662
+ }
9663
+ return false;
9664
+ });
9665
+ const externalNetIds = tracesInScope.flatMap(
9666
+ (st) => st.connected_source_net_ids
9667
+ );
9668
+ for (const netId of externalNetIds) {
9669
+ const net = db.source_net.get(netId);
9670
+ if (net?.subcircuit_id) {
9671
+ allowedSubcircuitIds.add(net.subcircuit_id);
9672
+ }
9673
+ }
9658
9674
  const directConnections = [];
9659
9675
  const pairKeyToSourceTraceId = /* @__PURE__ */ new Map();
9660
9676
  for (const st of db.source_trace.list()) {
@@ -9683,7 +9699,9 @@ function createSchematicTraceSolverInputProblem(group) {
9683
9699
  }
9684
9700
  }
9685
9701
  const netConnections = [];
9686
- for (const net of db.source_net.list().filter((n) => allowedSubcircuitIds.has(n.subcircuit_id))) {
9702
+ for (const net of db.source_net.list().filter(
9703
+ (n) => !n.subcircuit_id || allowedSubcircuitIds.has(n.subcircuit_id)
9704
+ )) {
9687
9705
  if (net.subcircuit_connectivity_map_key) {
9688
9706
  allScks.add(net.subcircuit_connectivity_map_key);
9689
9707
  sckToSourceNet.set(net.subcircuit_connectivity_map_key, net);
@@ -13862,7 +13880,7 @@ import { identity as identity5 } from "transformation-matrix";
13862
13880
  var package_default = {
13863
13881
  name: "@tscircuit/core",
13864
13882
  type: "module",
13865
- version: "0.0.670",
13883
+ version: "0.0.671",
13866
13884
  types: "dist/index.d.ts",
13867
13885
  main: "dist/index.js",
13868
13886
  module: "dist/index.js",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tscircuit/core",
3
3
  "type": "module",
4
- "version": "0.0.671",
4
+ "version": "0.0.672",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",