@tscircuit/core 0.0.89 → 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 +14 -14
- package/dist/index.js +16 -16
- package/package.json +1 -1
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() ?? {};
|
|
@@ -3344,22 +3360,6 @@ var Chip = class extends NormalComponent {
|
|
|
3344
3360
|
});
|
|
3345
3361
|
this.pcb_component_id = pcb_component.pcb_component_id;
|
|
3346
3362
|
}
|
|
3347
|
-
_getPcbCircuitJsonBounds() {
|
|
3348
|
-
const { db } = this.root;
|
|
3349
|
-
if (!this.pcb_component_id) return super._getPcbCircuitJsonBounds();
|
|
3350
|
-
const pcb_component = db.pcb_component.get(this.pcb_component_id);
|
|
3351
|
-
return {
|
|
3352
|
-
center: { x: pcb_component.center.x, y: pcb_component.center.y },
|
|
3353
|
-
bounds: {
|
|
3354
|
-
left: pcb_component.center.x - pcb_component.width / 2,
|
|
3355
|
-
top: pcb_component.center.y - pcb_component.height / 2,
|
|
3356
|
-
right: pcb_component.center.x + pcb_component.width / 2,
|
|
3357
|
-
bottom: pcb_component.center.y + pcb_component.height / 2
|
|
3358
|
-
},
|
|
3359
|
-
width: pcb_component.width,
|
|
3360
|
-
height: pcb_component.height
|
|
3361
|
-
};
|
|
3362
|
-
}
|
|
3363
3363
|
};
|
|
3364
3364
|
|
|
3365
3365
|
// lib/components/normal-components/Jumper.ts
|