@tscircuit/core 0.0.764 → 0.0.765

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
@@ -1,5 +1,5 @@
1
1
  import * as circuit_json from 'circuit-json';
2
- import { PcbTraceError, PcbPlacementError, PcbManualEditConflictWarning, LayerRef, AnyCircuitElement, Size, AnySourceComponent, PcbTraceRoutePoint, PcbTrace as PcbTrace$1, PcbVia, SchematicPort, SchematicComponent, RouteHintPoint, CircuitJson } from 'circuit-json';
2
+ import { PcbTraceError, PcbPlacementError, PcbManualEditConflictWarning, PcbViaClearanceError, LayerRef, AnyCircuitElement, Size, AnySourceComponent, PcbTraceRoutePoint, PcbTrace as PcbTrace$1, PcbVia, SchematicPort, SchematicComponent, RouteHintPoint, CircuitJson } from 'circuit-json';
3
3
  import * as _tscircuit_props from '@tscircuit/props';
4
4
  import { PlatformConfig, subcircuitGroupProps, AutorouterConfig, traceProps, SupplierPartNumbers, CadModelProp, SchematicPortArrangement, groupProps, boardProps, capacitorProps, chipProps, pinoutProps, diodeProps, fuseProps, jumperProps, solderjumperProps, ledProps, powerSourceProps, CommonComponentProps, resistorProps, constraintProps, fabricationNotePathProps, fabricationNoteTextProps, footprintProps, subcircuitProps, breakoutProps, breakoutPointProps, holeProps, pcbKeepoutProps, netLabelProps, cadmodelProps, cadassemblyProps, platedHoleProps, silkscreenCircleProps, silkscreenPathProps, silkscreenRectProps, silkscreenTextProps, silkscreenLineProps, smtPadProps, traceHintProps, viaProps, copperPourProps, cutoutProps, batteryProps, pinHeaderProps, resonatorProps, inductorProps, potentiometerProps, pushButtonProps, crystalProps, transistorProps, mosfetProps, switchProps, SwitchProps, testpointProps, schematicTextProps, schematicLineProps, schematicRectProps, schematicArcProps, schematicCircleProps, schematicBoxProps, schematicTableProps, schematicRowProps, schematicCellProps, symbolProps, analogSimulationProps, CapacitorProps, ChipProps, DiodeProps, ResistorProps, ManualEditEvent, ManualEditsFile, ChipConnections, manual_edits_file } from '@tscircuit/props';
5
5
  import * as react from 'react';
@@ -68,7 +68,7 @@ declare abstract class Renderable implements IRenderable {
68
68
  */
69
69
  runRenderPhase(phase: RenderPhase): void;
70
70
  runRenderPhaseForChildren(phase: RenderPhase): void;
71
- renderError(message: string | Omit<PcbTraceError, "pcb_error_id"> | Omit<PcbPlacementError, "pcb_error_id"> | Omit<PcbManualEditConflictWarning, "pcb_error_id">): void;
71
+ renderError(message: string | Omit<PcbTraceError, "pcb_error_id"> | Omit<PcbPlacementError, "pcb_error_id"> | Omit<PcbManualEditConflictWarning, "pcb_error_id"> | Omit<PcbViaClearanceError, "pcb_error_id">): void;
72
72
  }
73
73
 
74
74
  /**
package/dist/index.js CHANGED
@@ -1250,7 +1250,22 @@ var PrimitiveComponent2 = class extends Renderable {
1250
1250
  if (typeof message === "string") {
1251
1251
  return super.renderError(message);
1252
1252
  }
1253
- this.root?.db.pcb_placement_error.insert(message);
1253
+ switch (message.type) {
1254
+ case "pcb_placement_error":
1255
+ this.root?.db.pcb_placement_error.insert(message);
1256
+ break;
1257
+ case "pcb_via_clearance_error":
1258
+ this.root?.db.pcb_via_clearance_error.insert(message);
1259
+ break;
1260
+ case "pcb_trace_error":
1261
+ this.root?.db.pcb_trace_error.insert(message);
1262
+ break;
1263
+ case "pcb_manual_edit_conflict_warning":
1264
+ this.root?.db.pcb_manual_edit_conflict_warning.insert(message);
1265
+ break;
1266
+ default:
1267
+ this.root?.db.pcb_placement_error.insert(message);
1268
+ }
1254
1269
  }
1255
1270
  getString() {
1256
1271
  const { lowercaseComponentName: cname, _parsedProps: props, parent } = this;
@@ -12732,7 +12747,9 @@ import {
12732
12747
  checkEachPcbPortConnectedToPcbTraces,
12733
12748
  checkEachPcbTraceNonOverlapping,
12734
12749
  checkPcbComponentsOutOfBoard,
12735
- checkPcbTracesOutOfBoard
12750
+ checkPcbTracesOutOfBoard,
12751
+ checkDifferentNetViaSpacing,
12752
+ checkSameNetViaSpacing
12736
12753
  } from "@tscircuit/checks";
12737
12754
  var getRoundedRectOutline = (width, height, radius) => {
12738
12755
  const r = Math.min(radius, width / 2, height / 2);
@@ -12994,6 +13011,14 @@ var Board = class extends Group6 {
12994
13011
  for (const error of pcbTracesOutOfBoardErrors) {
12995
13012
  db.pcb_trace_error.insert(error);
12996
13013
  }
13014
+ const differentNetViaErrors = checkDifferentNetViaSpacing(db.toArray());
13015
+ for (const error of differentNetViaErrors) {
13016
+ db.pcb_via_clearance_error.insert(error);
13017
+ }
13018
+ const sameNetViaErrors = checkSameNetViaSpacing(db.toArray());
13019
+ for (const error of sameNetViaErrors) {
13020
+ db.pcb_via_clearance_error.insert(error);
13021
+ }
12997
13022
  }
12998
13023
  _emitRenderLifecycleEvent(phase, startOrEnd) {
12999
13024
  super._emitRenderLifecycleEvent(phase, startOrEnd);
@@ -15970,7 +15995,7 @@ import { identity as identity6 } from "transformation-matrix";
15970
15995
  var package_default = {
15971
15996
  name: "@tscircuit/core",
15972
15997
  type: "module",
15973
- version: "0.0.763",
15998
+ version: "0.0.764",
15974
15999
  types: "dist/index.d.ts",
15975
16000
  main: "dist/index.js",
15976
16001
  module: "dist/index.js",
@@ -16000,7 +16025,7 @@ var package_default = {
16000
16025
  devDependencies: {
16001
16026
  "@biomejs/biome": "^1.8.3",
16002
16027
  "@tscircuit/capacity-autorouter": "^0.0.129",
16003
- "@tscircuit/checks": "^0.0.79",
16028
+ "@tscircuit/checks": "^0.0.84",
16004
16029
  "@tscircuit/circuit-json-util": "^0.0.67",
16005
16030
  "@tscircuit/footprinter": "^0.0.236",
16006
16031
  "@tscircuit/import-snippet": "^0.0.4",
@@ -16022,7 +16047,7 @@ var package_default = {
16022
16047
  "bun-match-svg": "0.0.12",
16023
16048
  "calculate-elbow": "^0.0.12",
16024
16049
  "chokidar-cli": "^3.0.0",
16025
- "circuit-json": "^0.0.268",
16050
+ "circuit-json": "^0.0.272",
16026
16051
  "circuit-json-to-bpc": "^0.0.13",
16027
16052
  "circuit-json-to-connectivity-map": "^0.0.22",
16028
16053
  "circuit-json-to-gltf": "^0.0.7",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tscircuit/core",
3
3
  "type": "module",
4
- "version": "0.0.764",
4
+ "version": "0.0.765",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
@@ -31,7 +31,7 @@
31
31
  "devDependencies": {
32
32
  "@biomejs/biome": "^1.8.3",
33
33
  "@tscircuit/capacity-autorouter": "^0.0.129",
34
- "@tscircuit/checks": "^0.0.79",
34
+ "@tscircuit/checks": "^0.0.84",
35
35
  "@tscircuit/circuit-json-util": "^0.0.67",
36
36
  "@tscircuit/footprinter": "^0.0.236",
37
37
  "@tscircuit/import-snippet": "^0.0.4",
@@ -53,7 +53,7 @@
53
53
  "bun-match-svg": "0.0.12",
54
54
  "calculate-elbow": "^0.0.12",
55
55
  "chokidar-cli": "^3.0.0",
56
- "circuit-json": "^0.0.268",
56
+ "circuit-json": "^0.0.272",
57
57
  "circuit-json-to-bpc": "^0.0.13",
58
58
  "circuit-json-to-connectivity-map": "^0.0.22",
59
59
  "circuit-json-to-gltf": "^0.0.7",