@tscircuit/core 0.0.604 → 0.0.605
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 +3 -0
- package/dist/index.js +31 -4
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1160,6 +1160,7 @@ declare class Board extends Group<typeof boardProps> {
|
|
|
1160
1160
|
pcbFlexRow: zod.ZodOptional<zod.ZodBoolean>;
|
|
1161
1161
|
pcbFlexColumn: zod.ZodOptional<zod.ZodBoolean>;
|
|
1162
1162
|
pcbGap: zod.ZodOptional<zod.ZodUnion<[zod.ZodNumber, zod.ZodString]>>;
|
|
1163
|
+
pcbPack: zod.ZodOptional<zod.ZodBoolean>;
|
|
1163
1164
|
pcbWidth: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
1164
1165
|
pcbHeight: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
1165
1166
|
schWidth: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
@@ -1808,6 +1809,7 @@ declare class Board extends Group<typeof boardProps> {
|
|
|
1808
1809
|
pcbFlexRow?: boolean | undefined;
|
|
1809
1810
|
pcbFlexColumn?: boolean | undefined;
|
|
1810
1811
|
pcbGap?: string | number | undefined;
|
|
1812
|
+
pcbPack?: boolean | undefined;
|
|
1811
1813
|
manualEdits?: {
|
|
1812
1814
|
pcb_placements?: {
|
|
1813
1815
|
selector: string;
|
|
@@ -2017,6 +2019,7 @@ declare class Board extends Group<typeof boardProps> {
|
|
|
2017
2019
|
pcbFlexRow?: boolean | undefined;
|
|
2018
2020
|
pcbFlexColumn?: boolean | undefined;
|
|
2019
2021
|
pcbGap?: string | number | undefined;
|
|
2022
|
+
pcbPack?: boolean | undefined;
|
|
2020
2023
|
manualEdits?: {
|
|
2021
2024
|
pcb_placements?: {
|
|
2022
2025
|
selector: string;
|
package/dist/index.js
CHANGED
|
@@ -7921,10 +7921,14 @@ function Group_doInitialSchematicLayoutGrid(group) {
|
|
|
7921
7921
|
let gridColsOption = props.gridCols;
|
|
7922
7922
|
let gridRowsOption = void 0;
|
|
7923
7923
|
let gridGapOption = props.gridGap;
|
|
7924
|
+
let gridRowGapOption = props.gridRowGap;
|
|
7925
|
+
let gridColumnGapOption = props.gridColumnGap;
|
|
7924
7926
|
if (props.schLayout?.grid) {
|
|
7925
7927
|
gridColsOption = props.schLayout.grid.cols ?? gridColsOption;
|
|
7926
7928
|
gridRowsOption = props.schLayout.grid.rows;
|
|
7927
7929
|
gridGapOption = props.schLayout.gridGap ?? gridGapOption;
|
|
7930
|
+
gridRowGapOption = props.schLayout.gridRowGap ?? gridRowGapOption;
|
|
7931
|
+
gridColumnGapOption = props.schLayout.gridColumnGap ?? gridColumnGapOption;
|
|
7928
7932
|
}
|
|
7929
7933
|
let numCols;
|
|
7930
7934
|
let numRows;
|
|
@@ -7946,7 +7950,16 @@ function Group_doInitialSchematicLayoutGrid(group) {
|
|
|
7946
7950
|
numRows = schematicChildren.length;
|
|
7947
7951
|
let gridGapX;
|
|
7948
7952
|
let gridGapY;
|
|
7949
|
-
|
|
7953
|
+
const parseGap = (val) => {
|
|
7954
|
+
if (val === void 0) return void 0;
|
|
7955
|
+
return typeof val === "number" ? val : length.parse(val);
|
|
7956
|
+
};
|
|
7957
|
+
if (gridRowGapOption !== void 0 || gridColumnGapOption !== void 0) {
|
|
7958
|
+
const fallbackX = typeof gridGapOption === "object" && gridGapOption !== null ? gridGapOption.x : gridGapOption;
|
|
7959
|
+
const fallbackY = typeof gridGapOption === "object" && gridGapOption !== null ? gridGapOption.y : gridGapOption;
|
|
7960
|
+
gridGapX = parseGap(gridColumnGapOption ?? fallbackX) ?? 1;
|
|
7961
|
+
gridGapY = parseGap(gridRowGapOption ?? fallbackY) ?? 1;
|
|
7962
|
+
} else if (typeof gridGapOption === "number") {
|
|
7950
7963
|
gridGapX = gridGapOption;
|
|
7951
7964
|
gridGapY = gridGapOption;
|
|
7952
7965
|
} else if (typeof gridGapOption === "string") {
|
|
@@ -8052,10 +8065,14 @@ function Group_doInitialPcbLayoutGrid(group) {
|
|
|
8052
8065
|
let gridColsOption = props.pcbGridCols ?? props.gridCols;
|
|
8053
8066
|
let gridRowsOption = props.pcbGridRows;
|
|
8054
8067
|
let gridGapOption = props.pcbGridGap ?? props.gridGap;
|
|
8068
|
+
let gridRowGapOption = props.pcbGridRowGap ?? props.gridRowGap;
|
|
8069
|
+
let gridColumnGapOption = props.pcbGridColumnGap ?? props.gridColumnGap;
|
|
8055
8070
|
if (props.pcbLayout?.grid) {
|
|
8056
8071
|
gridColsOption = props.pcbLayout.grid.cols ?? gridColsOption;
|
|
8057
8072
|
gridRowsOption = props.pcbLayout.grid.rows;
|
|
8058
8073
|
gridGapOption = props.pcbLayout.gridGap ?? gridGapOption;
|
|
8074
|
+
gridRowGapOption = props.pcbLayout.gridRowGap ?? gridRowGapOption;
|
|
8075
|
+
gridColumnGapOption = props.pcbLayout.gridColumnGap ?? gridColumnGapOption;
|
|
8059
8076
|
}
|
|
8060
8077
|
let numCols;
|
|
8061
8078
|
let numRows;
|
|
@@ -8076,7 +8093,16 @@ function Group_doInitialPcbLayoutGrid(group) {
|
|
|
8076
8093
|
if (numRows === 0 && pcbChildren.length > 0) numRows = pcbChildren.length;
|
|
8077
8094
|
let gridGapX;
|
|
8078
8095
|
let gridGapY;
|
|
8079
|
-
|
|
8096
|
+
const parseGap = (val) => {
|
|
8097
|
+
if (val === void 0) return void 0;
|
|
8098
|
+
return typeof val === "number" ? val : length2.parse(val);
|
|
8099
|
+
};
|
|
8100
|
+
if (gridRowGapOption !== void 0 || gridColumnGapOption !== void 0) {
|
|
8101
|
+
const fallbackX = typeof gridGapOption === "object" && gridGapOption !== null ? gridGapOption.x : gridGapOption;
|
|
8102
|
+
const fallbackY = typeof gridGapOption === "object" && gridGapOption !== null ? gridGapOption.y : gridGapOption;
|
|
8103
|
+
gridGapX = parseGap(gridColumnGapOption ?? fallbackX) ?? 1;
|
|
8104
|
+
gridGapY = parseGap(gridRowGapOption ?? fallbackY) ?? 1;
|
|
8105
|
+
} else if (typeof gridGapOption === "number") {
|
|
8080
8106
|
gridGapX = gridGapOption;
|
|
8081
8107
|
gridGapY = gridGapOption;
|
|
8082
8108
|
} else if (typeof gridGapOption === "string") {
|
|
@@ -8848,6 +8874,7 @@ var Group = class extends NormalComponent {
|
|
|
8848
8874
|
if (props.pcbLayout?.pack) return "pack";
|
|
8849
8875
|
if (props.pcbFlex) return "flex";
|
|
8850
8876
|
if (props.pcbGrid) return "grid";
|
|
8877
|
+
if (props.pcbPack) return "pack";
|
|
8851
8878
|
if (props.pack) return "pack";
|
|
8852
8879
|
if (props.matchAdapt) return "match-adapt";
|
|
8853
8880
|
if (props.flex) return "flex";
|
|
@@ -11343,7 +11370,7 @@ import { identity as identity5 } from "transformation-matrix";
|
|
|
11343
11370
|
var package_default = {
|
|
11344
11371
|
name: "@tscircuit/core",
|
|
11345
11372
|
type: "module",
|
|
11346
|
-
version: "0.0.
|
|
11373
|
+
version: "0.0.604",
|
|
11347
11374
|
types: "dist/index.d.ts",
|
|
11348
11375
|
main: "dist/index.js",
|
|
11349
11376
|
module: "dist/index.js",
|
|
@@ -11374,7 +11401,7 @@ var package_default = {
|
|
|
11374
11401
|
"@tscircuit/infgrid-ijump-astar": "^0.0.33",
|
|
11375
11402
|
"@tscircuit/log-soup": "^1.0.2",
|
|
11376
11403
|
"@tscircuit/math-utils": "^0.0.18",
|
|
11377
|
-
"@tscircuit/props": "^0.0.
|
|
11404
|
+
"@tscircuit/props": "^0.0.275",
|
|
11378
11405
|
"@tscircuit/schematic-autolayout": "^0.0.6",
|
|
11379
11406
|
"@tscircuit/schematic-corpus": "^0.0.110",
|
|
11380
11407
|
"@tscircuit/schematic-match-adapt": "^0.0.16",
|
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.605",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"@tscircuit/infgrid-ijump-astar": "^0.0.33",
|
|
33
33
|
"@tscircuit/log-soup": "^1.0.2",
|
|
34
34
|
"@tscircuit/math-utils": "^0.0.18",
|
|
35
|
-
"@tscircuit/props": "^0.0.
|
|
35
|
+
"@tscircuit/props": "^0.0.275",
|
|
36
36
|
"@tscircuit/schematic-autolayout": "^0.0.6",
|
|
37
37
|
"@tscircuit/schematic-corpus": "^0.0.110",
|
|
38
38
|
"@tscircuit/schematic-match-adapt": "^0.0.16",
|