@tscircuit/core 0.0.978 → 0.0.980

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 +40 -37
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -16507,7 +16507,7 @@ var Board = class extends Group6 {
16507
16507
  );
16508
16508
  }
16509
16509
  let outlineTranslation = { x: 0, y: 0 };
16510
- if (outline && outline.length > 0 && this._panelPositionOffset) {
16510
+ if (outline && outline.length > 0 && this.parent?.lowercaseComponentName === "panel") {
16511
16511
  const outlineBounds = getBoundsFromPoints4(outline);
16512
16512
  if (outlineBounds) {
16513
16513
  const outlineCenterX = (outlineBounds.minX + outlineBounds.maxX) / 2;
@@ -16551,41 +16551,44 @@ var Board = class extends Group6 {
16551
16551
  const { db } = this.root;
16552
16552
  if (!this._areChildSubcircuitsRouted()) return;
16553
16553
  if (this._drcChecksComplete) return;
16554
+ const runDrcChecks = (circuitJson) => {
16555
+ const pcbTraceOverlappingErrors = checkEachPcbTraceNonOverlapping(circuitJson);
16556
+ for (const error of pcbTraceOverlappingErrors) {
16557
+ db.pcb_trace_error.insert(error);
16558
+ }
16559
+ const pcbPortNotConnectedErrors = checkEachPcbPortConnectedToPcbTraces(circuitJson);
16560
+ for (const error of pcbPortNotConnectedErrors) {
16561
+ db.pcb_port_not_connected_error.insert(error);
16562
+ }
16563
+ const pcbComponentOutsideErrors = checkPcbComponentsOutOfBoard(circuitJson);
16564
+ for (const error of pcbComponentOutsideErrors) {
16565
+ db.pcb_component_outside_board_error.insert(error);
16566
+ }
16567
+ const pcbTracesOutOfBoardErrors = checkPcbTracesOutOfBoard(circuitJson);
16568
+ for (const error of pcbTracesOutOfBoardErrors) {
16569
+ db.pcb_trace_error.insert(error);
16570
+ }
16571
+ const differentNetViaErrors = checkDifferentNetViaSpacing(circuitJson);
16572
+ for (const error of differentNetViaErrors) {
16573
+ db.pcb_via_clearance_error.insert(error);
16574
+ }
16575
+ const sameNetViaErrors = checkSameNetViaSpacing(circuitJson);
16576
+ for (const error of sameNetViaErrors) {
16577
+ db.pcb_via_clearance_error.insert(error);
16578
+ }
16579
+ const pcbComponentOverlapErrors = checkPcbComponentOverlap(circuitJson);
16580
+ for (const error of pcbComponentOverlapErrors) {
16581
+ db.pcb_footprint_overlap_error.insert(error);
16582
+ }
16583
+ const sourcePinMustBeConnectedErrors = checkPinMustBeConnected(circuitJson);
16584
+ for (const error of sourcePinMustBeConnectedErrors) {
16585
+ db.source_pin_must_be_connected_error.insert(error);
16586
+ }
16587
+ };
16588
+ const subcircuit = db.subtree({ subcircuit_id: this.subcircuit_id });
16589
+ const subcircuitCircuitJson = subcircuit.toArray();
16590
+ runDrcChecks(subcircuitCircuitJson);
16554
16591
  this._drcChecksComplete = true;
16555
- const errors = checkEachPcbTraceNonOverlapping(db.toArray());
16556
- for (const error of errors) {
16557
- db.pcb_trace_error.insert(error);
16558
- }
16559
- const pcbPortNotConnectedErrors = checkEachPcbPortConnectedToPcbTraces(
16560
- db.toArray()
16561
- );
16562
- for (const error of pcbPortNotConnectedErrors) {
16563
- db.pcb_port_not_connected_error.insert(error);
16564
- }
16565
- const pcbComponentOutsideErrors = checkPcbComponentsOutOfBoard(db.toArray());
16566
- for (const error of pcbComponentOutsideErrors) {
16567
- db.pcb_component_outside_board_error.insert(error);
16568
- }
16569
- const pcbTracesOutOfBoardErrors = checkPcbTracesOutOfBoard(db.toArray());
16570
- for (const error of pcbTracesOutOfBoardErrors) {
16571
- db.pcb_trace_error.insert(error);
16572
- }
16573
- const differentNetViaErrors = checkDifferentNetViaSpacing(db.toArray());
16574
- for (const error of differentNetViaErrors) {
16575
- db.pcb_via_clearance_error.insert(error);
16576
- }
16577
- const sameNetViaErrors = checkSameNetViaSpacing(db.toArray());
16578
- for (const error of sameNetViaErrors) {
16579
- db.pcb_via_clearance_error.insert(error);
16580
- }
16581
- const pcbComponentOverlapErrors = checkPcbComponentOverlap(db.toArray());
16582
- for (const error of pcbComponentOverlapErrors) {
16583
- db.pcb_footprint_overlap_error.insert(error);
16584
- }
16585
- const sourcePinMustBeConnectedErrors = checkPinMustBeConnected(db.toArray());
16586
- for (const error of sourcePinMustBeConnectedErrors) {
16587
- db.source_pin_must_be_connected_error.insert(error);
16588
- }
16589
16592
  }
16590
16593
  _emitRenderLifecycleEvent(phase, startOrEnd) {
16591
16594
  super._emitRenderLifecycleEvent(phase, startOrEnd);
@@ -20953,7 +20956,7 @@ import { identity as identity5 } from "transformation-matrix";
20953
20956
  var package_default = {
20954
20957
  name: "@tscircuit/core",
20955
20958
  type: "module",
20956
- version: "0.0.977",
20959
+ version: "0.0.979",
20957
20960
  types: "dist/index.d.ts",
20958
20961
  main: "dist/index.js",
20959
20962
  module: "dist/index.js",
@@ -20986,7 +20989,7 @@ var package_default = {
20986
20989
  "@resvg/resvg-js": "^2.6.2",
20987
20990
  "@tscircuit/capacity-autorouter": "^0.0.264",
20988
20991
  "@tscircuit/checks": "^0.0.87",
20989
- "@tscircuit/circuit-json-util": "^0.0.75",
20992
+ "@tscircuit/circuit-json-util": "^0.0.77",
20990
20993
  "@tscircuit/common": "^0.0.20",
20991
20994
  "@tscircuit/copper-pour-solver": "^0.0.14",
20992
20995
  "@tscircuit/footprinter": "^0.0.288",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tscircuit/core",
3
3
  "type": "module",
4
- "version": "0.0.978",
4
+ "version": "0.0.980",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
@@ -34,7 +34,7 @@
34
34
  "@resvg/resvg-js": "^2.6.2",
35
35
  "@tscircuit/capacity-autorouter": "^0.0.264",
36
36
  "@tscircuit/checks": "^0.0.87",
37
- "@tscircuit/circuit-json-util": "^0.0.75",
37
+ "@tscircuit/circuit-json-util": "^0.0.77",
38
38
  "@tscircuit/common": "^0.0.20",
39
39
  "@tscircuit/copper-pour-solver": "^0.0.14",
40
40
  "@tscircuit/footprinter": "^0.0.288",