@tscircuit/core 0.0.596 → 0.0.598
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.js +14 -7
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -8180,6 +8180,7 @@ var Group_doInitialPcbLayoutPack = (group) => {
|
|
|
8180
8180
|
);
|
|
8181
8181
|
const subtree = buildSubtree2(db.toArray(), { source_group_id: componentId });
|
|
8182
8182
|
transformPCBElements2(subtree, transformMatrix);
|
|
8183
|
+
db.pcb_group.update(pcbGroup.pcb_group_id, { center });
|
|
8183
8184
|
}
|
|
8184
8185
|
};
|
|
8185
8186
|
|
|
@@ -8195,7 +8196,7 @@ var Group_doInitialPcbLayoutFlex = (group) => {
|
|
|
8195
8196
|
const justify = props.pcbJustifyContent ?? props.justifyContent;
|
|
8196
8197
|
const align = props.pcbAlignItems ?? props.alignItems;
|
|
8197
8198
|
const modifiedCircuitJson = layoutCircuitJsonWithFlex(circuitJson, {
|
|
8198
|
-
justifyContent: justify === "start" ? "flex-start" : justify === "end" ? "flex-end" : justify === "stretch" ? "space-between" : justify,
|
|
8199
|
+
justifyContent: justify === "start" ? "flex-start" : justify === "end" ? "flex-end" : justify === "stretch" ? "space-between" : justify ?? "space-between",
|
|
8199
8200
|
alignItems: align === "start" ? "flex-start" : align === "end" ? "flex-end" : align ?? "center"
|
|
8200
8201
|
});
|
|
8201
8202
|
const pcbSmtPads = db.pcb_smtpad.list();
|
|
@@ -8982,15 +8983,21 @@ var Board = class extends Group {
|
|
|
8982
8983
|
let maxX = -Infinity;
|
|
8983
8984
|
let maxY = -Infinity;
|
|
8984
8985
|
const allPcbComponents = db.pcb_component.list();
|
|
8986
|
+
const allPcbGroups = db.pcb_group.list();
|
|
8985
8987
|
let hasComponents = false;
|
|
8986
|
-
|
|
8987
|
-
|
|
8988
|
-
if (width === 0 || height === 0) continue;
|
|
8988
|
+
const updateBounds = (center2, width, height) => {
|
|
8989
|
+
if (width === 0 || height === 0) return;
|
|
8989
8990
|
hasComponents = true;
|
|
8990
8991
|
minX = Math.min(minX, center2.x - width / 2);
|
|
8991
8992
|
minY = Math.min(minY, center2.y - height / 2);
|
|
8992
8993
|
maxX = Math.max(maxX, center2.x + width / 2);
|
|
8993
8994
|
maxY = Math.max(maxY, center2.y + height / 2);
|
|
8995
|
+
};
|
|
8996
|
+
for (const pcbComponent of allPcbComponents) {
|
|
8997
|
+
updateBounds(pcbComponent.center, pcbComponent.width, pcbComponent.height);
|
|
8998
|
+
}
|
|
8999
|
+
for (const pcbGroup of allPcbGroups) {
|
|
9000
|
+
updateBounds(pcbGroup.center, pcbGroup.width, pcbGroup.height);
|
|
8994
9001
|
}
|
|
8995
9002
|
const padding = 2;
|
|
8996
9003
|
const computedWidth = hasComponents ? maxX - minX + padding * 2 : 0;
|
|
@@ -11257,7 +11264,7 @@ import { identity as identity5 } from "transformation-matrix";
|
|
|
11257
11264
|
var package_default = {
|
|
11258
11265
|
name: "@tscircuit/core",
|
|
11259
11266
|
type: "module",
|
|
11260
|
-
version: "0.0.
|
|
11267
|
+
version: "0.0.597",
|
|
11261
11268
|
types: "dist/index.d.ts",
|
|
11262
11269
|
main: "dist/index.js",
|
|
11263
11270
|
module: "dist/index.js",
|
|
@@ -11282,8 +11289,8 @@ var package_default = {
|
|
|
11282
11289
|
"@biomejs/biome": "^1.8.3",
|
|
11283
11290
|
"@tscircuit/capacity-autorouter": "^0.0.100",
|
|
11284
11291
|
"@tscircuit/checks": "^0.0.56",
|
|
11285
|
-
"@tscircuit/circuit-json-flex": "^0.0.
|
|
11286
|
-
"@tscircuit/circuit-json-util": "^0.0.
|
|
11292
|
+
"@tscircuit/circuit-json-flex": "^0.0.2",
|
|
11293
|
+
"@tscircuit/circuit-json-util": "^0.0.61",
|
|
11287
11294
|
"@tscircuit/footprinter": "^0.0.204",
|
|
11288
11295
|
"@tscircuit/import-snippet": "^0.0.4",
|
|
11289
11296
|
"@tscircuit/infgrid-ijump-astar": "^0.0.33",
|
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.598",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"@biomejs/biome": "^1.8.3",
|
|
27
27
|
"@tscircuit/capacity-autorouter": "^0.0.100",
|
|
28
28
|
"@tscircuit/checks": "^0.0.56",
|
|
29
|
-
"@tscircuit/circuit-json-flex": "^0.0.
|
|
30
|
-
"@tscircuit/circuit-json-util": "^0.0.
|
|
29
|
+
"@tscircuit/circuit-json-flex": "^0.0.2",
|
|
30
|
+
"@tscircuit/circuit-json-util": "^0.0.61",
|
|
31
31
|
"@tscircuit/footprinter": "^0.0.204",
|
|
32
32
|
"@tscircuit/import-snippet": "^0.0.4",
|
|
33
33
|
"@tscircuit/infgrid-ijump-astar": "^0.0.33",
|