@tscircuit/core 0.0.671 → 0.0.673

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 +24 -5
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -8711,9 +8711,10 @@ import { length } from "circuit-json";
8711
8711
  function Group_doInitialSchematicLayoutGrid(group) {
8712
8712
  const { db } = group.root;
8713
8713
  const props = group._parsedProps;
8714
- const schematicChildren = group.children.filter(
8715
- (child) => child.schematic_component_id
8716
- );
8714
+ const schematicChildren = group.children.filter((child) => {
8715
+ const isExplicitlyPositioned = child._parsedProps?.schX !== void 0 || child._parsedProps?.schY !== void 0;
8716
+ return child.schematic_component_id && !isExplicitlyPositioned;
8717
+ });
8717
8718
  if (schematicChildren.length === 0) return;
8718
8719
  let maxCellWidth = 0;
8719
8720
  let maxCellHeight = 0;
@@ -9655,6 +9656,22 @@ function createSchematicTraceSolverInputProblem(group) {
9655
9656
  for (const cg of childGroups) {
9656
9657
  if (cg.subcircuit_id) allowedSubcircuitIds.add(cg.subcircuit_id);
9657
9658
  }
9659
+ const tracesInScope = db.source_trace.list().filter((st) => {
9660
+ if (st.subcircuit_id === group.subcircuit_id) return true;
9661
+ for (const source_port_id of st.connected_source_port_ids) {
9662
+ if (sourcePortIdToSchPortId.has(source_port_id)) return true;
9663
+ }
9664
+ return false;
9665
+ });
9666
+ const externalNetIds = tracesInScope.flatMap(
9667
+ (st) => st.connected_source_net_ids
9668
+ );
9669
+ for (const netId of externalNetIds) {
9670
+ const net = db.source_net.get(netId);
9671
+ if (net?.subcircuit_id) {
9672
+ allowedSubcircuitIds.add(net.subcircuit_id);
9673
+ }
9674
+ }
9658
9675
  const directConnections = [];
9659
9676
  const pairKeyToSourceTraceId = /* @__PURE__ */ new Map();
9660
9677
  for (const st of db.source_trace.list()) {
@@ -9683,7 +9700,9 @@ function createSchematicTraceSolverInputProblem(group) {
9683
9700
  }
9684
9701
  }
9685
9702
  const netConnections = [];
9686
- for (const net of db.source_net.list().filter((n) => allowedSubcircuitIds.has(n.subcircuit_id))) {
9703
+ for (const net of db.source_net.list().filter(
9704
+ (n) => !n.subcircuit_id || allowedSubcircuitIds.has(n.subcircuit_id)
9705
+ )) {
9687
9706
  if (net.subcircuit_connectivity_map_key) {
9688
9707
  allScks.add(net.subcircuit_connectivity_map_key);
9689
9708
  sckToSourceNet.set(net.subcircuit_connectivity_map_key, net);
@@ -13862,7 +13881,7 @@ import { identity as identity5 } from "transformation-matrix";
13862
13881
  var package_default = {
13863
13882
  name: "@tscircuit/core",
13864
13883
  type: "module",
13865
- version: "0.0.670",
13884
+ version: "0.0.672",
13866
13885
  types: "dist/index.d.ts",
13867
13886
  main: "dist/index.js",
13868
13887
  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.673",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",