@tscircuit/core 0.0.77 → 0.0.78

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
@@ -3096,6 +3096,20 @@ declare class Chip<PinLabels extends string = never> extends NormalComponent<typ
3096
3096
  doInitialSourceRender(): void;
3097
3097
  doInitialSchematicComponentRender(): void;
3098
3098
  doInitialPcbComponentRender(): void;
3099
+ _getPcbCircuitJsonBounds(): {
3100
+ center: {
3101
+ x: number;
3102
+ y: number;
3103
+ };
3104
+ bounds: {
3105
+ left: number;
3106
+ top: number;
3107
+ right: number;
3108
+ bottom: number;
3109
+ };
3110
+ width: number;
3111
+ height: number;
3112
+ };
3099
3113
  }
3100
3114
 
3101
3115
  declare class Jumper<PinLabels extends string = never> extends NormalComponent<typeof jumperProps, PinLabels> {
package/dist/index.js CHANGED
@@ -3228,6 +3228,22 @@ var Chip = class extends NormalComponent {
3228
3228
  });
3229
3229
  this.pcb_component_id = pcb_component.pcb_component_id;
3230
3230
  }
3231
+ _getPcbCircuitJsonBounds() {
3232
+ const { db } = this.root;
3233
+ if (!this.pcb_component_id) return super._getPcbCircuitJsonBounds();
3234
+ const pcb_component = db.pcb_component.get(this.pcb_component_id);
3235
+ return {
3236
+ center: { x: pcb_component.center.x, y: pcb_component.center.y },
3237
+ bounds: {
3238
+ left: pcb_component.center.x - pcb_component.width / 2,
3239
+ top: pcb_component.center.y - pcb_component.height / 2,
3240
+ right: pcb_component.center.x + pcb_component.width / 2,
3241
+ bottom: pcb_component.center.y + pcb_component.height / 2
3242
+ },
3243
+ width: pcb_component.width,
3244
+ height: pcb_component.height
3245
+ };
3246
+ }
3231
3247
  };
3232
3248
 
3233
3249
  // 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.77",
4
+ "version": "0.0.78",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",