@tscircuit/core 0.0.88 → 0.0.90

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
@@ -664,6 +664,20 @@ declare class NormalComponent<ZodProps extends ZodType = any, PortNames extends
664
664
  *
665
665
  */
666
666
  doInitialPortDiscovery(): void;
667
+ _getPcbCircuitJsonBounds(): {
668
+ center: {
669
+ x: number;
670
+ y: number;
671
+ };
672
+ bounds: {
673
+ left: number;
674
+ top: number;
675
+ right: number;
676
+ bottom: number;
677
+ };
678
+ width: number;
679
+ height: number;
680
+ };
667
681
  doInitialCadModelRender(): void;
668
682
  }
669
683
 
@@ -3118,20 +3132,6 @@ declare class Chip<PinLabels extends string = never> extends NormalComponent<typ
3118
3132
  doInitialSourceRender(): void;
3119
3133
  doInitialSchematicComponentRender(): void;
3120
3134
  doInitialPcbComponentRender(): void;
3121
- _getPcbCircuitJsonBounds(): {
3122
- center: {
3123
- x: number;
3124
- y: number;
3125
- };
3126
- bounds: {
3127
- left: number;
3128
- top: number;
3129
- right: number;
3130
- bottom: number;
3131
- };
3132
- width: number;
3133
- height: number;
3134
- };
3135
3135
  }
3136
3136
 
3137
3137
  declare class Jumper<PinLabels extends string = never> extends NormalComponent<typeof jumperProps, PinLabels> {
package/dist/index.js CHANGED
@@ -2039,6 +2039,22 @@ var NormalComponent = class extends PrimitiveComponent {
2039
2039
  this.add(newPort);
2040
2040
  }
2041
2041
  }
2042
+ _getPcbCircuitJsonBounds() {
2043
+ const { db } = this.root;
2044
+ if (!this.pcb_component_id) return super._getPcbCircuitJsonBounds();
2045
+ const pcb_component = db.pcb_component.get(this.pcb_component_id);
2046
+ return {
2047
+ center: { x: pcb_component.center.x, y: pcb_component.center.y },
2048
+ bounds: {
2049
+ left: pcb_component.center.x - pcb_component.width / 2,
2050
+ top: pcb_component.center.y - pcb_component.height / 2,
2051
+ right: pcb_component.center.x + pcb_component.width / 2,
2052
+ bottom: pcb_component.center.y + pcb_component.height / 2
2053
+ },
2054
+ width: pcb_component.width,
2055
+ height: pcb_component.height
2056
+ };
2057
+ }
2042
2058
  doInitialCadModelRender() {
2043
2059
  const { db } = this.root;
2044
2060
  const { boardThickness = 0 } = this.root?._getBoard() ?? {};
@@ -2197,6 +2213,8 @@ var Board = class extends Group {
2197
2213
  }
2198
2214
  const pcb_board = db.pcb_board.insert({
2199
2215
  center: { x: props.pcbX, y: props.pcbY },
2216
+ thickness: this.boardThickness,
2217
+ num_layers: this.allLayers.length,
2200
2218
  width: props.width,
2201
2219
  height: props.height,
2202
2220
  outline: props.outline
@@ -3342,22 +3360,6 @@ var Chip = class extends NormalComponent {
3342
3360
  });
3343
3361
  this.pcb_component_id = pcb_component.pcb_component_id;
3344
3362
  }
3345
- _getPcbCircuitJsonBounds() {
3346
- const { db } = this.root;
3347
- if (!this.pcb_component_id) return super._getPcbCircuitJsonBounds();
3348
- const pcb_component = db.pcb_component.get(this.pcb_component_id);
3349
- return {
3350
- center: { x: pcb_component.center.x, y: pcb_component.center.y },
3351
- bounds: {
3352
- left: pcb_component.center.x - pcb_component.width / 2,
3353
- top: pcb_component.center.y - pcb_component.height / 2,
3354
- right: pcb_component.center.x + pcb_component.width / 2,
3355
- bottom: pcb_component.center.y + pcb_component.height / 2
3356
- },
3357
- width: pcb_component.width,
3358
- height: pcb_component.height
3359
- };
3360
- }
3361
3363
  };
3362
3364
 
3363
3365
  // lib/components/normal-components/Jumper.ts
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tscircuit/core",
3
3
  "type": "module",
4
- "version": "0.0.88",
4
+ "version": "0.0.90",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
@@ -35,8 +35,8 @@
35
35
  "@tscircuit/infgrid-ijump-astar": "^0.0.21",
36
36
  "@tscircuit/math-utils": "^0.0.4",
37
37
  "@tscircuit/props": "^0.0.65",
38
- "circuit-json": "^0.0.78",
39
38
  "@tscircuit/soup-util": "^0.0.31",
39
+ "circuit-json": "^0.0.82",
40
40
  "circuit-json-to-connectivity-map": "^0.0.17",
41
41
  "footprinter": "^0.0.44",
42
42
  "nanoid": "^5.0.7",