@tscircuit/core 0.0.253 → 0.0.254
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 +6 -0
- package/dist/index.js +8 -2
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1151,6 +1151,8 @@ declare class Board extends Group<typeof boardProps> {
|
|
|
1151
1151
|
x: string | number;
|
|
1152
1152
|
y: string | number;
|
|
1153
1153
|
}>, "many">>;
|
|
1154
|
+
outlineOffsetX: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
1155
|
+
outlineOffsetY: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
1154
1156
|
}>, "strip", z.ZodTypeAny, {
|
|
1155
1157
|
pcbX?: number | undefined;
|
|
1156
1158
|
pcbY?: number | undefined;
|
|
@@ -1209,6 +1211,8 @@ declare class Board extends Group<typeof boardProps> {
|
|
|
1209
1211
|
x: number;
|
|
1210
1212
|
y: number;
|
|
1211
1213
|
}[] | undefined;
|
|
1214
|
+
outlineOffsetX?: number | undefined;
|
|
1215
|
+
outlineOffsetY?: number | undefined;
|
|
1212
1216
|
}, {
|
|
1213
1217
|
pcbX?: string | number | undefined;
|
|
1214
1218
|
pcbY?: string | number | undefined;
|
|
@@ -1271,6 +1275,8 @@ declare class Board extends Group<typeof boardProps> {
|
|
|
1271
1275
|
x: string | number;
|
|
1272
1276
|
y: string | number;
|
|
1273
1277
|
}[] | undefined;
|
|
1278
|
+
outlineOffsetX?: string | number | undefined;
|
|
1279
|
+
outlineOffsetY?: string | number | undefined;
|
|
1274
1280
|
}>;
|
|
1275
1281
|
};
|
|
1276
1282
|
get boardThickness(): number;
|
package/dist/index.js
CHANGED
|
@@ -3789,12 +3789,18 @@ var Board = class extends Group {
|
|
|
3789
3789
|
throw new Error("Board width and height or an outline are required");
|
|
3790
3790
|
}
|
|
3791
3791
|
const pcb_board = db.pcb_board.insert({
|
|
3792
|
-
center: {
|
|
3792
|
+
center: {
|
|
3793
|
+
x: (props.pcbX ?? 0) + (props.outlineOffsetX ?? 0),
|
|
3794
|
+
y: (props.pcbY ?? 0) + (props.outlineOffsetY ?? 0)
|
|
3795
|
+
},
|
|
3793
3796
|
thickness: this.boardThickness,
|
|
3794
3797
|
num_layers: this.allLayers.length,
|
|
3795
3798
|
width: props.width,
|
|
3796
3799
|
height: props.height,
|
|
3797
|
-
outline: props.outline
|
|
3800
|
+
outline: props.outline?.map((point) => ({
|
|
3801
|
+
x: point.x + (props.outlineOffsetX ?? 0),
|
|
3802
|
+
y: point.y + (props.outlineOffsetY ?? 0)
|
|
3803
|
+
}))
|
|
3798
3804
|
});
|
|
3799
3805
|
this.pcb_board_id = pcb_board.pcb_board_id;
|
|
3800
3806
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tscircuit/core",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.254",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"@tscircuit/footprinter": "^0.0.97",
|
|
44
44
|
"@tscircuit/infgrid-ijump-astar": "^0.0.26",
|
|
45
45
|
"@tscircuit/math-utils": "^0.0.5",
|
|
46
|
-
"@tscircuit/props": "^0.0.
|
|
46
|
+
"@tscircuit/props": "^0.0.128",
|
|
47
47
|
"@tscircuit/schematic-autolayout": "^0.0.6",
|
|
48
48
|
"@tscircuit/soup-util": "^0.0.41",
|
|
49
49
|
"circuit-json": "^0.0.128",
|