@tscircuit/core 0.0.2125 → 0.0.2126

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 +17 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -109373,7 +109373,22 @@ var getSimpleRouteJsonFromCircuitJson = ({
109373
109373
  relevantSubcircuitIds.add(id);
109374
109374
  }
109375
109375
  }
109376
- const subcircuitElements = (circuitJson ?? db2.toArray()).filter(
109376
+ const allElements = circuitJson ?? db2.toArray();
109377
+ const sourceTraceById = new Map(
109378
+ allElements.flatMap(
109379
+ (element) => element.type === "source_trace" ? [[element.source_trace_id, element]] : []
109380
+ )
109381
+ );
109382
+ const scopedElements = allElements.map((element) => {
109383
+ if (ignoreExistingTopLevelPcbRouteState || element.type !== "pcb_trace" || element.subcircuit_id || !element.source_trace_id) {
109384
+ return element;
109385
+ }
109386
+ const inheritedSubcircuitId = sourceTraceById.get(
109387
+ element.source_trace_id
109388
+ )?.subcircuit_id;
109389
+ return inheritedSubcircuitId ? { ...element, subcircuit_id: inheritedSubcircuitId } : element;
109390
+ });
109391
+ const subcircuitElements = scopedElements.filter(
109377
109392
  (e2) => !subcircuit_id || "subcircuit_id" in e2 && relevantSubcircuitIds.has(e2.subcircuit_id)
109378
109393
  );
109379
109394
  let board = null;
@@ -118359,7 +118374,7 @@ function Group_getRoutingPhasePlans(group) {
118359
118374
  var package_default = {
118360
118375
  name: "@tscircuit/core",
118361
118376
  type: "module",
118362
- version: "0.0.2124",
118377
+ version: "0.0.2125",
118363
118378
  types: "dist/index.d.ts",
118364
118379
  main: "dist/index.js",
118365
118380
  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.2125",
4
+ "version": "0.0.2126",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",