@tscircuit/core 0.0.664 → 0.0.665
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 +18 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -10949,6 +10949,23 @@ var Group6 = class extends NormalComponent {
|
|
|
10949
10949
|
if (props.matchAdapt) return "match-adapt";
|
|
10950
10950
|
if (props.flex) return "flex";
|
|
10951
10951
|
if (props.grid) return "grid";
|
|
10952
|
+
const groupHasCoords = props.pcbX !== void 0 || props.pcbY !== void 0;
|
|
10953
|
+
const hasManualEdits = (props.manualEdits?.pcb_placements?.length ?? 0) > 0;
|
|
10954
|
+
const anyDirectChildHasPcbCoords = this.children.some((child) => {
|
|
10955
|
+
const childProps = child._parsedProps;
|
|
10956
|
+
return childProps?.pcbX !== void 0 || childProps?.pcbY !== void 0;
|
|
10957
|
+
});
|
|
10958
|
+
if (anyDirectChildHasPcbCoords) return "none";
|
|
10959
|
+
const unpositionedDirectChildrenCount = this.children.reduce(
|
|
10960
|
+
(count, child) => {
|
|
10961
|
+
const childProps = child._parsedProps;
|
|
10962
|
+
const hasCoords = childProps?.pcbX !== void 0 || childProps?.pcbY !== void 0;
|
|
10963
|
+
return count + (hasCoords ? 0 : 1);
|
|
10964
|
+
},
|
|
10965
|
+
0
|
|
10966
|
+
);
|
|
10967
|
+
if (!groupHasCoords && !hasManualEdits && unpositionedDirectChildrenCount > 1)
|
|
10968
|
+
return "pack";
|
|
10952
10969
|
return "none";
|
|
10953
10970
|
}
|
|
10954
10971
|
doInitialPcbLayout() {
|
|
@@ -13830,7 +13847,7 @@ import { identity as identity5 } from "transformation-matrix";
|
|
|
13830
13847
|
var package_default = {
|
|
13831
13848
|
name: "@tscircuit/core",
|
|
13832
13849
|
type: "module",
|
|
13833
|
-
version: "0.0.
|
|
13850
|
+
version: "0.0.664",
|
|
13834
13851
|
types: "dist/index.d.ts",
|
|
13835
13852
|
main: "dist/index.js",
|
|
13836
13853
|
module: "dist/index.js",
|