@tscircuit/core 0.0.356 → 0.0.358

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.
package/dist/index.d.ts CHANGED
@@ -12,7 +12,7 @@ import * as _tscircuit_layout from '@tscircuit/layout';
12
12
  import { ConnectivityMap } from 'circuit-json-to-connectivity-map';
13
13
  import { GraphicsObject } from 'graphics-debug';
14
14
 
15
- declare const orderedRenderPhases: readonly ["ReactSubtreesRender", "InitializePortsFromChildren", "CreateNetsFromProps", "CreateTracesFromProps", "CreateTraceHintsFromProps", "SourceRender", "SourceParentAttachment", "PortMatching", "SourceTraceRender", "SourceAddConnectivityMapKey", "SchematicComponentRender", "SchematicPortRender", "SchematicLayout", "SchematicTraceRender", "PcbComponentRender", "PcbPrimitiveRender", "PcbFootprintLayout", "PcbPortRender", "PcbPortAttachment", "PcbLayout", "PcbComponentSizeCalculation", "PcbBoardAutoSize", "PcbTraceRender", "PcbTraceHintRender", "PcbRouteNetIslands", "CadModelRender", "PartsEngineRender"];
15
+ declare const orderedRenderPhases: readonly ["ReactSubtreesRender", "InitializePortsFromChildren", "CreateNetsFromProps", "CreateTracesFromProps", "CreateTraceHintsFromProps", "SourceRender", "SourceParentAttachment", "PortMatching", "SourceTraceRender", "SourceAddConnectivityMapKey", "SchematicComponentRender", "SchematicPortRender", "SchematicLayout", "SchematicTraceRender", "PcbComponentRender", "PcbPrimitiveRender", "PcbFootprintLayout", "PcbPortRender", "PcbPortAttachment", "PcbLayout", "PcbComponentSizeCalculation", "PcbBoardAutoSize", "PcbTraceRender", "PcbTraceHintRender", "PcbRouteNetIslands", "PcbDesignRuleChecks", "CadModelRender", "PartsEngineRender"];
16
16
  type RenderPhase = (typeof orderedRenderPhases)[number];
17
17
  type RenderPhaseFn<K extends RenderPhase = RenderPhase> = `doInitial${K}` | `update${K}` | `remove${K}`;
18
18
  type RenderPhaseStates = Record<RenderPhase, {
@@ -1665,6 +1665,7 @@ declare class Board extends Group<typeof boardProps> {
1665
1665
  doInitialPcbComponentRender(): void;
1666
1666
  removePcbComponentRender(): void;
1667
1667
  _computePcbGlobalTransformBeforeLayout(): Matrix;
1668
+ doInitialPcbDesignRuleChecks(): void;
1668
1669
  }
1669
1670
 
1670
1671
  declare class Capacitor extends NormalComponent<typeof capacitorProps, PassivePorts> {
package/dist/index.js CHANGED
@@ -91,6 +91,7 @@ var orderedRenderPhases = [
91
91
  "PcbTraceRender",
92
92
  "PcbTraceHintRender",
93
93
  "PcbRouteNetIslands",
94
+ "PcbDesignRuleChecks",
94
95
  "CadModelRender",
95
96
  "PartsEngineRender"
96
97
  ];
@@ -6132,6 +6133,7 @@ var Group = class extends NormalComponent {
6132
6133
  };
6133
6134
 
6134
6135
  // lib/components/normal-components/Board.ts
6136
+ import { checkEachPcbTraceNonOverlapping } from "@tscircuit/checks";
6135
6137
  var Board = class extends Group {
6136
6138
  pcb_board_id = null;
6137
6139
  get isSubcircuit() {
@@ -6228,6 +6230,15 @@ var Board = class extends Group {
6228
6230
  _computePcbGlobalTransformBeforeLayout() {
6229
6231
  return identity3();
6230
6232
  }
6233
+ doInitialPcbDesignRuleChecks() {
6234
+ if (this.root?.pcbDisabled) return;
6235
+ if (this.getInheritedProperty("routingDisabled")) return;
6236
+ const { db } = this.root;
6237
+ const errors = checkEachPcbTraceNonOverlapping(db.toArray());
6238
+ for (const error of errors) {
6239
+ db.pcb_trace_error.insert(error);
6240
+ }
6241
+ }
6231
6242
  };
6232
6243
 
6233
6244
  // lib/components/normal-components/Capacitor.ts
@@ -7321,7 +7332,7 @@ import { identity as identity4 } from "transformation-matrix";
7321
7332
  var package_default = {
7322
7333
  name: "@tscircuit/core",
7323
7334
  type: "module",
7324
- version: "0.0.355",
7335
+ version: "0.0.357",
7325
7336
  types: "dist/index.d.ts",
7326
7337
  main: "dist/index.js",
7327
7338
  module: "dist/index.js",
@@ -7373,9 +7384,11 @@ var package_default = {
7373
7384
  },
7374
7385
  dependencies: {
7375
7386
  "@lume/kiwi": "^0.4.3",
7376
- "@tscircuit/capacity-autorouter": "^0.0.36",
7387
+ "@tscircuit/capacity-autorouter": "^0.0.42",
7388
+ "@tscircuit/checks": "^0.0.30",
7389
+ "@tscircuit/circuit-json-util": "^0.0.45",
7377
7390
  "@tscircuit/infgrid-ijump-astar": "^0.0.33",
7378
- "@tscircuit/math-utils": "^0.0.9",
7391
+ "@tscircuit/math-utils": "^0.0.12",
7379
7392
  "@tscircuit/props": "^0.0.163",
7380
7393
  "@tscircuit/schematic-autolayout": "^0.0.6",
7381
7394
  "@tscircuit/soup-util": "^0.0.41",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tscircuit/core",
3
3
  "type": "module",
4
- "version": "0.0.356",
4
+ "version": "0.0.358",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
@@ -53,9 +53,11 @@
53
53
  },
54
54
  "dependencies": {
55
55
  "@lume/kiwi": "^0.4.3",
56
- "@tscircuit/capacity-autorouter": "^0.0.36",
56
+ "@tscircuit/capacity-autorouter": "^0.0.42",
57
+ "@tscircuit/checks": "^0.0.30",
58
+ "@tscircuit/circuit-json-util": "^0.0.45",
57
59
  "@tscircuit/infgrid-ijump-astar": "^0.0.33",
58
- "@tscircuit/math-utils": "^0.0.9",
60
+ "@tscircuit/math-utils": "^0.0.12",
59
61
  "@tscircuit/props": "^0.0.163",
60
62
  "@tscircuit/schematic-autolayout": "^0.0.6",
61
63
  "@tscircuit/soup-util": "^0.0.41",