@tscircuit/core 0.0.1291 → 0.0.1293

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 +96 -68
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -13689,7 +13689,7 @@ import {
13689
13689
  import {
13690
13690
  distance as distance10
13691
13691
  } from "circuit-json";
13692
- import Debug13 from "debug";
13692
+ import Debug14 from "debug";
13693
13693
 
13694
13694
  // lib/utils/autorouting/CapacityMeshAutorouter.ts
13695
13695
  import "@tscircuit/capacity-autorouter";
@@ -16868,19 +16868,21 @@ function convertTreeToMatchPackInputProblem(tree, db, group) {
16868
16868
  decouplingCapsGap: 0.4,
16869
16869
  partitionGap: 1.2
16870
16870
  };
16871
+ const groupOffset = group._getGlobalSchematicPositionBeforeLayout();
16871
16872
  debug6(
16872
16873
  `[${group.name}] Processing ${tree.childNodes.length} child nodes for input problem`
16873
16874
  );
16874
16875
  tree.childNodes.forEach((child, index) => {
16875
- if (isTreeChildExplicitlyPositioned(child, group)) {
16876
+ const explicitlyPositioned = isTreeChildExplicitlyPositioned(child, group);
16877
+ if (explicitlyPositioned) {
16876
16878
  debug6(
16877
- `[${group.name}] Skipping explicitly positioned child ${index} from matchpack`
16879
+ `[${group.name}] Child ${index} explicitly positioned, including as fixed chip`
16880
+ );
16881
+ } else {
16882
+ debug6(
16883
+ `[${group.name}] Processing child ${index}: nodeType=${child.nodeType}`
16878
16884
  );
16879
- return;
16880
16885
  }
16881
- debug6(
16882
- `[${group.name}] Processing child ${index}: nodeType=${child.nodeType}`
16883
- );
16884
16886
  if (child.nodeType === "component") {
16885
16887
  debug6(`[${group.name}] - Component: ${child.sourceComponent?.name}`);
16886
16888
  } else if (child.nodeType === "group") {
@@ -16928,7 +16930,13 @@ function convertTreeToMatchPackInputProblem(tree, db, group) {
16928
16930
  x: (schematicComponent.size?.width || 1) + marginLeft + marginRight,
16929
16931
  y: (schematicComponent.size?.height || 1) + marginTop + marginBottom
16930
16932
  },
16931
- availableRotations
16933
+ availableRotations,
16934
+ ...explicitlyPositioned && {
16935
+ fixedPosition: {
16936
+ x: schematicComponent.center.x - groupOffset.x,
16937
+ y: schematicComponent.center.y - groupOffset.y
16938
+ }
16939
+ }
16932
16940
  };
16933
16941
  const ports = db.schematic_port.list({
16934
16942
  schematic_component_id: schematicComponent.schematic_component_id
@@ -17276,6 +17284,13 @@ function applySchematicMatchPackLayoutToTree(group, tree) {
17276
17284
  y: placement.y + groupOffset.y
17277
17285
  };
17278
17286
  if (treeNode.nodeType === "component" && treeNode.sourceComponent) {
17287
+ const groupChild = group.children.find(
17288
+ (c) => c.source_component_id === treeNode.sourceComponent?.source_component_id
17289
+ );
17290
+ if (groupChild?._parsedProps?.schX !== void 0 || groupChild?._parsedProps?.schY !== void 0) {
17291
+ debug6(`Skipping position update for fixed chip ${chipId}`);
17292
+ continue;
17293
+ }
17279
17294
  const schematicComponent = db.schematic_component.getWhere({
17280
17295
  source_component_id: treeNode.sourceComponent.source_component_id
17281
17296
  });
@@ -17434,6 +17449,7 @@ function Group_doInitialSchematicLayoutMatchPack(group) {
17434
17449
 
17435
17450
  // lib/components/primitive-components/Group/Group_doInitialSchematicLayoutSections.ts
17436
17451
  import { getCircuitJsonTree as getCircuitJsonTree3 } from "@tscircuit/circuit-json-util";
17452
+ import Debug9 from "debug";
17437
17453
 
17438
17454
  // lib/components/primitive-components/Group/computeSchematicSectionLayoutUsingRows.ts
17439
17455
  var SECTION_GAP = 1;
@@ -17489,6 +17505,7 @@ function computeSchematicSectionLayoutUsingRows({
17489
17505
  }
17490
17506
 
17491
17507
  // lib/components/primitive-components/Group/Group_doInitialSchematicLayoutSections.ts
17508
+ var debug7 = Debug9("Group_doInitialSchematicLayoutSections");
17492
17509
  function Group_doInitialSchematicLayoutSections(group) {
17493
17510
  const { db } = group.root;
17494
17511
  const sectionNamesUsedByChildren = /* @__PURE__ */ new Set();
@@ -17555,6 +17572,14 @@ function Group_doInitialSchematicLayoutSections(group) {
17555
17572
  });
17556
17573
  }
17557
17574
  if (sectionNameToBoundsWithChildren.size <= 1) return;
17575
+ const anchoredSections = /* @__PURE__ */ new Set();
17576
+ for (const child of group.children) {
17577
+ if (!child.source_component_id) continue;
17578
+ const props = child._parsedProps;
17579
+ if (props?.schX !== void 0 || props?.schY !== void 0) {
17580
+ anchoredSections.add(child.getSchematicSectionName());
17581
+ }
17582
+ }
17558
17583
  const groupSchPositionBeforeLayout = group._getGlobalSchematicPositionBeforeLayout();
17559
17584
  const sectionPlacements = computeSchematicSectionLayoutUsingRows({
17560
17585
  sectionBlocks: Array.from(sectionNameToBoundsWithChildren.values()).map(
@@ -17568,6 +17593,12 @@ function Group_doInitialSchematicLayoutSections(group) {
17568
17593
  for (const [sectionName, placement] of sectionPlacements) {
17569
17594
  const boundsWithChildren = sectionNameToBoundsWithChildren.get(sectionName);
17570
17595
  if (!boundsWithChildren) continue;
17596
+ if (anchoredSections.has(sectionName)) {
17597
+ debug7(
17598
+ `[${group.name}] Section "${sectionName}" anchored by manual position, skipping shift`
17599
+ );
17600
+ continue;
17601
+ }
17571
17602
  const delta = {
17572
17603
  x: placement.x - boundsWithChildren.center.x,
17573
17604
  y: placement.y - boundsWithChildren.center.y
@@ -17719,7 +17750,7 @@ var Group_doInitialSchematicBoxComponentRender = (group) => {
17719
17750
 
17720
17751
  // lib/components/primitive-components/Group/Group_doInitialSchematicTraceRender/Group_doInitialSchematicTraceRender.ts
17721
17752
  import { SchematicTracePipelineSolver as SchematicTracePipelineSolver3 } from "@tscircuit/schematic-trace-solver";
17722
- import Debug11 from "debug";
17753
+ import Debug12 from "debug";
17723
17754
 
17724
17755
  // lib/components/primitive-components/Group/Group_doInitialSchematicTraceRender/createSchematicTraceSolverInputProblem.ts
17725
17756
  import "@tscircuit/schematic-trace-solver";
@@ -18269,8 +18300,8 @@ function computeJunctions(traces, opts = {}) {
18269
18300
  }
18270
18301
 
18271
18302
  // lib/components/primitive-components/Group/Group_doInitialSchematicTraceRender/applyTracesFromSolverOutput.ts
18272
- import Debug9 from "debug";
18273
- var debug7 = Debug9("Group_doInitialSchematicTraceRender");
18303
+ import Debug10 from "debug";
18304
+ var debug8 = Debug10("Group_doInitialSchematicTraceRender");
18274
18305
  function applyTracesFromSolverOutput(args) {
18275
18306
  const {
18276
18307
  group,
@@ -18282,7 +18313,7 @@ function applyTracesFromSolverOutput(args) {
18282
18313
  const { db } = group.root;
18283
18314
  const traces = solver.netLabelTraceCollisionSolver?.getOutput().traces ?? solver.traceCleanupSolver?.getOutput().traces ?? solver.traceLabelOverlapAvoidanceSolver?.getOutput().traces ?? solver.schematicTraceLinesSolver?.solvedTracePaths;
18284
18315
  const pendingTraces = [];
18285
- debug7(`Traces inside SchematicTraceSolver output: ${(traces ?? []).length}`);
18316
+ debug8(`Traces inside SchematicTraceSolver output: ${(traces ?? []).length}`);
18286
18317
  for (const solvedTracePath of traces ?? []) {
18287
18318
  const uniquePinIds = Array.from(new Set(solvedTracePath.pinIds ?? []));
18288
18319
  const solvedTraceSchematicPortIds = uniquePinIds.map((pinId) => pinIdToSchematicPortId.get(pinId)).filter((id) => Boolean(id));
@@ -18290,14 +18321,14 @@ function applyTracesFromSolverOutput(args) {
18290
18321
  (id) => schematicPortIdsWithPreExistingNetLabels.has(id)
18291
18322
  );
18292
18323
  if (isNetLabelStubTrace) {
18293
- debug7(
18324
+ debug8(
18294
18325
  `Skipping solver netlabel stub trace ${solvedTracePath?.mspPairId} because schematic port already has a netlabel`
18295
18326
  );
18296
18327
  continue;
18297
18328
  }
18298
18329
  const points = solvedTracePath?.tracePath;
18299
18330
  if (!Array.isArray(points) || points.length < 2) {
18300
- debug7(
18331
+ debug8(
18301
18332
  `Skipping trace ${solvedTracePath?.pinIds.join(",")} because it has less than 2 points`
18302
18333
  );
18303
18334
  continue;
@@ -18335,7 +18366,7 @@ function applyTracesFromSolverOutput(args) {
18335
18366
  subcircuit_connectivity_map_key
18336
18367
  });
18337
18368
  }
18338
- debug7(
18369
+ debug8(
18339
18370
  `Applying ${pendingTraces.length} traces from SchematicTraceSolver output`
18340
18371
  );
18341
18372
  const withCrossings = computeCrossings(
@@ -18398,8 +18429,8 @@ var getNetNameFromPorts = (ports) => {
18398
18429
  };
18399
18430
 
18400
18431
  // lib/components/primitive-components/Group/Group_doInitialSchematicTraceRender/applyNetLabelPlacements.ts
18401
- import Debug10 from "debug";
18402
- var debug8 = Debug10("Group_doInitialSchematicTraceRender");
18432
+ import Debug11 from "debug";
18433
+ var debug9 = Debug11("Group_doInitialSchematicTraceRender");
18403
18434
  function applyNetLabelPlacements(args) {
18404
18435
  const {
18405
18436
  group,
@@ -18422,7 +18453,7 @@ function applyNetLabelPlacements(args) {
18422
18453
  }
18423
18454
  const globalConnMap = solver.mspConnectionPairSolver.globalConnMap;
18424
18455
  for (const placement of netLabelPlacements) {
18425
- debug8(`processing placement: ${placement.netId}`);
18456
+ debug9(`processing placement: ${placement.netId}`);
18426
18457
  const placementUserNetId = globalConnMap.getIdsConnectedToNet(placement.globalConnNetId).find((id) => userNetIdToConnKey.get(id));
18427
18458
  const placementConnKey = userNetIdToConnKey.get(placementUserNetId);
18428
18459
  const anchor_position = placement.anchorPoint;
@@ -18438,7 +18469,7 @@ function applyNetLabelPlacements(args) {
18438
18469
  if (schPortIds.some(
18439
18470
  (schPortId) => schematicPortIdsWithPreExistingNetLabels.has(schPortId)
18440
18471
  )) {
18441
- debug8(
18472
+ debug9(
18442
18473
  `skipping net label placement for "${placement.netId}" REASON:schematic port has pre-existing net label`
18443
18474
  );
18444
18475
  continue;
@@ -18454,7 +18485,7 @@ function applyNetLabelPlacements(args) {
18454
18485
  const hasSingleLabelPlacement = (netLabelPlacementCountByGlobalNetId.get(placement.globalConnNetId) ?? 0) <= 1;
18455
18486
  const shouldSkipImplicitSignalNetLabel = !hasExplicitPortNetTrace && !isPowerOrGroundNet && hasRoutedTraceForPlacementPort && hasSingleLabelPlacement;
18456
18487
  if (shouldSkipImplicitSignalNetLabel) {
18457
- debug8(
18488
+ debug9(
18458
18489
  `skipping net label placement for "${placement.netId}" REASON:schematic port has routed trace`
18459
18490
  );
18460
18491
  continue;
@@ -18480,7 +18511,7 @@ function applyNetLabelPlacements(args) {
18480
18511
  if (!wasAssignedDisplayLabel && (netLabelPlacementCountByGlobalNetId.get(placement.globalConnNetId) ?? 0) <= 1 && schPortIds.some(
18481
18512
  (schPortId) => schematicPortIdsWithRoutedTraces.has(schPortId)
18482
18513
  )) {
18483
- debug8(
18514
+ debug9(
18484
18515
  `skipping net label placement for "${placement.netId}" REASON:schematic port has routed traces and no display label`
18485
18516
  );
18486
18517
  continue;
@@ -18640,7 +18671,7 @@ var getSchematicPortIdsWithRoutedTraces = ({
18640
18671
  };
18641
18672
 
18642
18673
  // lib/components/primitive-components/Group/Group_doInitialSchematicTraceRender/Group_doInitialSchematicTraceRender.ts
18643
- var debug9 = Debug11("Group_doInitialSchematicTraceRender");
18674
+ var debug10 = Debug12("Group_doInitialSchematicTraceRender");
18644
18675
  var Group_doInitialSchematicTraceRender = (group) => {
18645
18676
  if (!group.root?._featureMspSchematicTraceRouting) return;
18646
18677
  if (!group.isSubcircuit) return;
@@ -18666,7 +18697,7 @@ var Group_doInitialSchematicTraceRender = (group) => {
18666
18697
  });
18667
18698
  return;
18668
18699
  }
18669
- if (debug9.enabled) {
18700
+ if (debug10.enabled) {
18670
18701
  group.root?.emit("debug:logOutput", {
18671
18702
  type: "debug:logOutput",
18672
18703
  name: "group-trace-render-input-problem",
@@ -18706,7 +18737,7 @@ var Group_doInitialSchematicTraceRender = (group) => {
18706
18737
 
18707
18738
  // lib/components/primitive-components/Group/Group_doInitialSimulationSpiceEngineRender.ts
18708
18739
  import { circuitJsonToSpice } from "circuit-json-to-spice";
18709
- import Debug12 from "debug";
18740
+ import Debug13 from "debug";
18710
18741
 
18711
18742
  // lib/spice/get-spicey-engine.ts
18712
18743
  import { simulate, spiceyTranToVGraphs } from "spicey";
@@ -18779,7 +18810,7 @@ function getTransientVoltageGraphNamesFromSpiceNetlist(spiceNetlist) {
18779
18810
  }
18780
18811
 
18781
18812
  // lib/components/primitive-components/Group/Group_doInitialSimulationSpiceEngineRender.ts
18782
- var debug10 = Debug12("tscircuit:core:Group_doInitialSimulationSpiceEngineRender");
18813
+ var debug11 = Debug13("tscircuit:core:Group_doInitialSimulationSpiceEngineRender");
18783
18814
  function Group_doInitialSimulationSpiceEngineRender(group) {
18784
18815
  if (!group.isSubcircuit) return;
18785
18816
  const { root } = group;
@@ -18798,10 +18829,10 @@ function Group_doInitialSimulationSpiceEngineRender(group) {
18798
18829
  try {
18799
18830
  spiceNetlist = circuitJsonToSpice(circuitJson);
18800
18831
  spiceString = spiceNetlist.toSpiceString();
18801
- debug10(`Generated SPICE string:
18832
+ debug11(`Generated SPICE string:
18802
18833
  ${spiceString}`);
18803
18834
  } catch (error) {
18804
- debug10(`Failed to convert circuit JSON to SPICE: ${error}`);
18835
+ debug11(`Failed to convert circuit JSON to SPICE: ${error}`);
18805
18836
  return;
18806
18837
  }
18807
18838
  const graphNameToProbe = /* @__PURE__ */ new Map();
@@ -18826,7 +18857,7 @@ ${spiceString}`);
18826
18857
  }
18827
18858
  }
18828
18859
  } else {
18829
- debug10(
18860
+ debug11(
18830
18861
  `Skipping probe-to-graph order mapping because counts differ: probes=${orderedSimulationProbes.length} graphNames=${graphNamesFromNetlist.length}`
18831
18862
  );
18832
18863
  }
@@ -18841,19 +18872,19 @@ ${spiceString}`);
18841
18872
  );
18842
18873
  }
18843
18874
  const effectId = `spice-simulation-${engineName}-${analogSim.source_component_id}`;
18844
- debug10(
18875
+ debug11(
18845
18876
  `Queueing simulation for spice engine: ${engineName} (id: ${effectId})`
18846
18877
  );
18847
18878
  group._queueAsyncEffect(effectId, async () => {
18848
18879
  try {
18849
- debug10(`Running simulation with engine: ${engineName}`);
18880
+ debug11(`Running simulation with engine: ${engineName}`);
18850
18881
  const result = await spiceEngine.simulate(spiceString);
18851
- debug10(
18882
+ debug11(
18852
18883
  `Simulation completed, received ${result.simulationResultCircuitJson.length} elements`
18853
18884
  );
18854
18885
  const simulationExperiment = root.db.simulation_experiment.list()[0];
18855
18886
  if (!simulationExperiment) {
18856
- debug10("No simulation experiment found, skipping result insertion");
18887
+ debug11("No simulation experiment found, skipping result insertion");
18857
18888
  return;
18858
18889
  }
18859
18890
  for (const element of result.simulationResultCircuitJson) {
@@ -18866,9 +18897,9 @@ ${spiceString}`);
18866
18897
  if (elementType && root.db[elementType]) {
18867
18898
  ;
18868
18899
  root.db[elementType].insert(element);
18869
- debug10(`Inserted ${elementType} into database`);
18900
+ debug11(`Inserted ${elementType} into database`);
18870
18901
  } else {
18871
- debug10(
18902
+ debug11(
18872
18903
  `Warning: Unknown element type ${elementType}, adding to raw db`
18873
18904
  );
18874
18905
  root.db._addElement(element);
@@ -18876,7 +18907,7 @@ ${spiceString}`);
18876
18907
  }
18877
18908
  group._markDirty("SimulationSpiceEngineRender");
18878
18909
  } catch (error) {
18879
- debug10(`Simulation failed for engine ${engineName}: ${error}`);
18910
+ debug11(`Simulation failed for engine ${engineName}: ${error}`);
18880
18911
  const simulationExperiment = root.db.simulation_experiment.list()[0];
18881
18912
  root.db.simulation_unknown_experiment_error.insert({
18882
18913
  simulation_experiment_id: simulationExperiment?.simulation_experiment_id,
@@ -20343,7 +20374,7 @@ var Group5 = class extends NormalComponent3 {
20343
20374
  return Group_getRoutingPhasePlans(this);
20344
20375
  }
20345
20376
  _hasTracesToRoute() {
20346
- const debug11 = Debug13("tscircuit:core:_hasTracesToRoute");
20377
+ const debug12 = Debug14("tscircuit:core:_hasTracesToRoute");
20347
20378
  const routingPhasePlans = this._getRoutingPhasePlans();
20348
20379
  let traceCount = 0;
20349
20380
  let hasReroutePhaseWithRegion = false;
@@ -20353,11 +20384,11 @@ var Group5 = class extends NormalComponent3 {
20353
20384
  routingPhasePlan.reroute && routingPhasePlan.region
20354
20385
  );
20355
20386
  }
20356
- debug11(`[${this.getString()}] has ${traceCount} traces to route`);
20387
+ debug12(`[${this.getString()}] has ${traceCount} traces to route`);
20357
20388
  if (traceCount > 0) return true;
20358
20389
  if (hasReroutePhaseWithRegion) {
20359
20390
  const existingTraceCount = getExistingPcbTracesForReroute(this).length;
20360
- debug11(
20391
+ debug12(
20361
20392
  `[${this.getString()}] has ${existingTraceCount} existing pcb traces available for reroute`
20362
20393
  );
20363
20394
  return existingTraceCount > 0;
@@ -20366,13 +20397,13 @@ var Group5 = class extends NormalComponent3 {
20366
20397
  }
20367
20398
  async _runEffectMakeHttpAutoroutingRequest() {
20368
20399
  const { db } = this.root;
20369
- const debug11 = Debug13("tscircuit:core:_runEffectMakeHttpAutoroutingRequest");
20400
+ const debug12 = Debug14("tscircuit:core:_runEffectMakeHttpAutoroutingRequest");
20370
20401
  const props = this._parsedProps;
20371
20402
  const autorouterConfig = this._getAutorouterConfig();
20372
20403
  const serverUrl = autorouterConfig.serverUrl;
20373
20404
  const serverMode = autorouterConfig.serverMode;
20374
20405
  const fetchWithDebug = (url, options) => {
20375
- debug11("fetching", url);
20406
+ debug12("fetching", url);
20376
20407
  if (options.headers) {
20377
20408
  options.headers["Tscircuit-Core-Version"] = this.root?.getCoreVersion();
20378
20409
  }
@@ -20490,8 +20521,8 @@ var Group5 = class extends NormalComponent3 {
20490
20521
  async _runLocalAutorouting() {
20491
20522
  const { db } = this.root;
20492
20523
  const props = this._parsedProps;
20493
- const debug11 = Debug13("tscircuit:core:_runLocalAutorouting");
20494
- debug11(`[${this.getString()}] starting local autorouting`);
20524
+ const debug12 = Debug14("tscircuit:core:_runLocalAutorouting");
20525
+ debug12(`[${this.getString()}] starting local autorouting`);
20495
20526
  const autorouterConfig = this._getAutorouterConfig();
20496
20527
  const isLaserPrefabPreset = this._isLaserPrefabAutorouter(autorouterConfig);
20497
20528
  const isAutoJumperPreset = this._isAutoJumperAutorouter(autorouterConfig);
@@ -20591,14 +20622,14 @@ var Group5 = class extends NormalComponent3 {
20591
20622
  simpleRouteJson.availableJumperTypes = phaseAutorouterConfig.availableJumperTypes;
20592
20623
  }
20593
20624
  }
20594
- if (debug11.enabled) {
20625
+ if (debug12.enabled) {
20595
20626
  ;
20596
20627
  global.debugOutputArray?.push({
20597
20628
  name: `simpleroutejson-${this.props.name}.json`,
20598
20629
  obj: simpleRouteJson
20599
20630
  });
20600
20631
  }
20601
- if (debug11.enabled) {
20632
+ if (debug12.enabled) {
20602
20633
  const graphicsObject = convertSrjToGraphicsObject(
20603
20634
  simpleRouteJson
20604
20635
  );
@@ -20637,11 +20668,11 @@ var Group5 = class extends NormalComponent3 {
20637
20668
  const routingPromise = new Promise(
20638
20669
  (resolve, reject) => {
20639
20670
  autorouter.on("complete", (event) => {
20640
- debug11(`[${this.getString()}] local autorouting complete`);
20671
+ debug12(`[${this.getString()}] local autorouting complete`);
20641
20672
  resolve(event.traces);
20642
20673
  });
20643
20674
  autorouter.on("error", (event) => {
20644
- debug11(
20675
+ debug12(
20645
20676
  `[${this.getString()}] local autorouting error: ${event.error.message}`
20646
20677
  );
20647
20678
  reject(event.error);
@@ -20755,7 +20786,7 @@ var Group5 = class extends NormalComponent3 {
20755
20786
  }
20756
20787
  }
20757
20788
  doInitialPcbTraceRender() {
20758
- const debug11 = Debug13("tscircuit:core:doInitialPcbTraceRender");
20789
+ const debug12 = Debug14("tscircuit:core:doInitialPcbTraceRender");
20759
20790
  if (!this.isSubcircuit) return;
20760
20791
  if (this.root?.pcbDisabled) return;
20761
20792
  if (this.root?.pcbRoutingDisabled || this.getInheritedProperty("routingDisabled"))
@@ -20763,12 +20794,12 @@ var Group5 = class extends NormalComponent3 {
20763
20794
  if (this._isInflatedFromCircuitJson) return;
20764
20795
  if (this._shouldUseTraceByTraceRouting()) return;
20765
20796
  if (!this._areChildSubcircuitsRouted()) {
20766
- debug11(
20797
+ debug12(
20767
20798
  `[${this.getString()}] child subcircuits are not routed, skipping async autorouting until subcircuits routed`
20768
20799
  );
20769
20800
  return;
20770
20801
  }
20771
- debug11(
20802
+ debug12(
20772
20803
  `[${this.getString()}] no child subcircuits to wait for, initiating async routing`
20773
20804
  );
20774
20805
  if (!this._hasTracesToRoute()) return;
@@ -20779,13 +20810,13 @@ var Group5 = class extends NormalComponent3 {
20779
20810
  Group_doInitialSchematicTraceRender(this);
20780
20811
  }
20781
20812
  updatePcbTraceRender() {
20782
- const debug11 = Debug13("tscircuit:core:updatePcbTraceRender");
20783
- debug11(`[${this.getString()}] updating...`);
20813
+ const debug12 = Debug14("tscircuit:core:updatePcbTraceRender");
20814
+ debug12(`[${this.getString()}] updating...`);
20784
20815
  if (!this.isSubcircuit) return;
20785
20816
  if (this._isInflatedFromCircuitJson) return;
20786
20817
  if (this._shouldRouteAsync() && this._hasTracesToRoute() && !this._hasStartedAsyncAutorouting) {
20787
20818
  if (this._areChildSubcircuitsRouted()) {
20788
- debug11(
20819
+ debug12(
20789
20820
  `[${this.getString()}] child subcircuits are now routed, starting async autorouting`
20790
20821
  );
20791
20822
  this._startAsyncAutorouting();
@@ -20796,14 +20827,14 @@ var Group5 = class extends NormalComponent3 {
20796
20827
  if (this._shouldUseTraceByTraceRouting()) return;
20797
20828
  const { db } = this.root;
20798
20829
  if (this._asyncAutoroutingResult.output_simple_route_json) {
20799
- debug11(
20830
+ debug12(
20800
20831
  `[${this.getString()}] updating PCB traces from simple route json (${this._asyncAutoroutingResult.output_simple_route_json.traces?.length} traces)`
20801
20832
  );
20802
20833
  this._updatePcbTraceRenderFromSimpleRouteJson();
20803
20834
  return;
20804
20835
  }
20805
20836
  if (this._asyncAutoroutingResult.output_pcb_traces) {
20806
- debug11(
20837
+ debug12(
20807
20838
  `[${this.getString()}] updating PCB traces from ${this._asyncAutoroutingResult.output_pcb_traces.length} traces`
20808
20839
  );
20809
20840
  this._updatePcbTraceRenderFromPcbTraces();
@@ -20984,10 +21015,7 @@ var Group5 = class extends NormalComponent3 {
20984
21015
  const hasAnySectionName = this.children.some(
20985
21016
  (c) => c.source_component_id !== null && c._parsedProps?.schSectionName !== void 0
20986
21017
  );
20987
- const hasAnyExplicitPosition = this.children.some(
20988
- (c) => c.source_component_id !== null && (c._parsedProps?.schX !== void 0 || c._parsedProps?.schY !== void 0)
20989
- );
20990
- const hasSections = hasAnySectionName && !hasAnyExplicitPosition;
21018
+ const hasSections = hasAnySectionName;
20991
21019
  if (hasSections) {
20992
21020
  this._doInitialSchematicLayoutSections();
20993
21021
  this._insertSchematicBorder();
@@ -22229,7 +22257,7 @@ var DrcCheck = class extends PrimitiveComponent2 {
22229
22257
 
22230
22258
  // lib/IsolatedCircuit.ts
22231
22259
  import { su as su5 } from "@tscircuit/circuit-json-util";
22232
- import Debug14 from "debug";
22260
+ import Debug15 from "debug";
22233
22261
  import { isValidElement as isValidElement2 } from "react";
22234
22262
  import { identity as identity5 } from "transformation-matrix";
22235
22263
 
@@ -22237,7 +22265,7 @@ import { identity as identity5 } from "transformation-matrix";
22237
22265
  var package_default = {
22238
22266
  name: "@tscircuit/core",
22239
22267
  type: "module",
22240
- version: "0.0.1290",
22268
+ version: "0.0.1292",
22241
22269
  types: "dist/index.d.ts",
22242
22270
  main: "dist/index.js",
22243
22271
  module: "dist/index.js",
@@ -22271,7 +22299,7 @@ var package_default = {
22271
22299
  "@tscircuit/alphabet": "0.0.25",
22272
22300
  "@tscircuit/breakout-point-solver": "github:tscircuit/breakout-point-solver#bac9629",
22273
22301
  "@tscircuit/capacity-autorouter": "^0.0.529",
22274
- "@tscircuit/checks": "0.0.136",
22302
+ "@tscircuit/checks": "0.0.137",
22275
22303
  "@tscircuit/circuit-json-util": "^0.0.95",
22276
22304
  "@tscircuit/common": "^0.0.20",
22277
22305
  "@tscircuit/copper-pour-solver": "^0.0.29",
@@ -22281,12 +22309,12 @@ var package_default = {
22281
22309
  "@tscircuit/jlcpcb-manufacturing-specs": "git+https://github.com/tscircuit/jlcpcb-manufacturing-specs#e08af159db01a37db007e33f0a7268d0e4a279a5",
22282
22310
  "@tscircuit/krt-wasm": "^0.1.1",
22283
22311
  "@tscircuit/log-soup": "^1.0.2",
22284
- "@tscircuit/matchpack": "^0.0.16",
22312
+ "@tscircuit/matchpack": "",
22285
22313
  "@tscircuit/math-utils": "^0.0.36",
22286
22314
  "@tscircuit/miniflex": "^0.0.4",
22287
22315
  "@tscircuit/ngspice-spice-engine": "^0.0.8",
22288
22316
  "@tscircuit/props": "^0.0.542",
22289
- "@tscircuit/schematic-match-adapt": "^0.0.16",
22317
+ "@tscircuit/schematic-match-adapt": "^0.0.18",
22290
22318
  "@tscircuit/schematic-trace-solver": "^0.0.60",
22291
22319
  "@tscircuit/solver-utils": "^0.0.3",
22292
22320
  "@tscircuit/soup-util": "^0.0.41",
@@ -22597,11 +22625,11 @@ var IsolatedCircuit = class {
22597
22625
  (l) => l !== listener
22598
22626
  );
22599
22627
  }
22600
- enableDebug(debug11) {
22601
- if (typeof debug11 === "string") {
22602
- Debug14.enable(debug11);
22603
- } else if (debug11 === null || debug11 === false) {
22604
- Debug14.disable();
22628
+ enableDebug(debug12) {
22629
+ if (typeof debug12 === "string") {
22630
+ Debug15.enable(debug12);
22631
+ } else if (debug12 === null || debug12 === false) {
22632
+ Debug15.disable();
22605
22633
  }
22606
22634
  }
22607
22635
  getClientOrigin() {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tscircuit/core",
3
3
  "type": "module",
4
- "version": "0.0.1291",
4
+ "version": "0.0.1293",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
@@ -35,7 +35,7 @@
35
35
  "@tscircuit/alphabet": "0.0.25",
36
36
  "@tscircuit/breakout-point-solver": "github:tscircuit/breakout-point-solver#bac9629",
37
37
  "@tscircuit/capacity-autorouter": "^0.0.529",
38
- "@tscircuit/checks": "0.0.136",
38
+ "@tscircuit/checks": "0.0.137",
39
39
  "@tscircuit/circuit-json-util": "^0.0.95",
40
40
  "@tscircuit/common": "^0.0.20",
41
41
  "@tscircuit/copper-pour-solver": "^0.0.29",
@@ -45,12 +45,12 @@
45
45
  "@tscircuit/jlcpcb-manufacturing-specs": "git+https://github.com/tscircuit/jlcpcb-manufacturing-specs#e08af159db01a37db007e33f0a7268d0e4a279a5",
46
46
  "@tscircuit/krt-wasm": "^0.1.1",
47
47
  "@tscircuit/log-soup": "^1.0.2",
48
- "@tscircuit/matchpack": "^0.0.16",
48
+ "@tscircuit/matchpack": "",
49
49
  "@tscircuit/math-utils": "^0.0.36",
50
50
  "@tscircuit/miniflex": "^0.0.4",
51
51
  "@tscircuit/ngspice-spice-engine": "^0.0.8",
52
52
  "@tscircuit/props": "^0.0.542",
53
- "@tscircuit/schematic-match-adapt": "^0.0.16",
53
+ "@tscircuit/schematic-match-adapt": "^0.0.18",
54
54
  "@tscircuit/schematic-trace-solver": "^0.0.60",
55
55
  "@tscircuit/solver-utils": "^0.0.3",
56
56
  "@tscircuit/soup-util": "^0.0.41",