@tscircuit/core 0.0.335 → 0.0.337
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 +317 -10
- package/dist/index.js +24 -11
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -981,7 +981,7 @@ declare class Group<Props extends z.ZodType<any, any, any> = typeof groupProps>
|
|
|
981
981
|
/**
|
|
982
982
|
* Run local autorouting using the CapacityMeshAutorouter
|
|
983
983
|
*/
|
|
984
|
-
|
|
984
|
+
_runLocalAutorouting(): Promise<void>;
|
|
985
985
|
_startAsyncAutorouting(): void;
|
|
986
986
|
doInitialPcbTraceRender(): void;
|
|
987
987
|
updatePcbTraceRender(): void;
|
|
@@ -1023,6 +1023,130 @@ declare class Board extends Group<typeof boardProps> {
|
|
|
1023
1023
|
}>>;
|
|
1024
1024
|
footprint: zod.ZodOptional<zod.ZodType<_tscircuit_props.Footprint, zod.ZodTypeDef, _tscircuit_props.Footprint>>;
|
|
1025
1025
|
}, {
|
|
1026
|
+
pcbWidth: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
1027
|
+
pcbHeight: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
1028
|
+
schWidth: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
1029
|
+
schHeight: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
1030
|
+
pcbLayout: zod.ZodOptional<zod.ZodObject<{
|
|
1031
|
+
layoutMode: zod.ZodOptional<zod.ZodEnum<["grid", "flex", "none"]>>;
|
|
1032
|
+
position: zod.ZodOptional<zod.ZodEnum<["absolute", "relative"]>>;
|
|
1033
|
+
grid: zod.ZodOptional<zod.ZodBoolean>;
|
|
1034
|
+
gridCols: zod.ZodOptional<zod.ZodUnion<[zod.ZodNumber, zod.ZodString]>>;
|
|
1035
|
+
gridRows: zod.ZodOptional<zod.ZodUnion<[zod.ZodNumber, zod.ZodString]>>;
|
|
1036
|
+
gridTemplateRows: zod.ZodOptional<zod.ZodString>;
|
|
1037
|
+
gridTemplateColumns: zod.ZodOptional<zod.ZodString>;
|
|
1038
|
+
gridTemplate: zod.ZodOptional<zod.ZodString>;
|
|
1039
|
+
gridGap: zod.ZodOptional<zod.ZodUnion<[zod.ZodNumber, zod.ZodString]>>;
|
|
1040
|
+
flex: zod.ZodOptional<zod.ZodUnion<[zod.ZodBoolean, zod.ZodString]>>;
|
|
1041
|
+
flexDirection: zod.ZodOptional<zod.ZodEnum<["row", "column"]>>;
|
|
1042
|
+
alignItems: zod.ZodOptional<zod.ZodEnum<["start", "center", "end", "stretch"]>>;
|
|
1043
|
+
justifyContent: zod.ZodOptional<zod.ZodEnum<["start", "center", "end", "stretch"]>>;
|
|
1044
|
+
flexRow: zod.ZodOptional<zod.ZodBoolean>;
|
|
1045
|
+
flexColumn: zod.ZodOptional<zod.ZodBoolean>;
|
|
1046
|
+
gap: zod.ZodOptional<zod.ZodUnion<[zod.ZodNumber, zod.ZodString]>>;
|
|
1047
|
+
}, "strip", zod.ZodTypeAny, {
|
|
1048
|
+
grid?: boolean | undefined;
|
|
1049
|
+
flex?: string | boolean | undefined;
|
|
1050
|
+
layoutMode?: "grid" | "flex" | "none" | undefined;
|
|
1051
|
+
position?: "absolute" | "relative" | undefined;
|
|
1052
|
+
gridCols?: string | number | undefined;
|
|
1053
|
+
gridRows?: string | number | undefined;
|
|
1054
|
+
gridTemplateRows?: string | undefined;
|
|
1055
|
+
gridTemplateColumns?: string | undefined;
|
|
1056
|
+
gridTemplate?: string | undefined;
|
|
1057
|
+
gridGap?: string | number | undefined;
|
|
1058
|
+
flexDirection?: "row" | "column" | undefined;
|
|
1059
|
+
alignItems?: "center" | "start" | "end" | "stretch" | undefined;
|
|
1060
|
+
justifyContent?: "center" | "start" | "end" | "stretch" | undefined;
|
|
1061
|
+
flexRow?: boolean | undefined;
|
|
1062
|
+
flexColumn?: boolean | undefined;
|
|
1063
|
+
gap?: string | number | undefined;
|
|
1064
|
+
}, {
|
|
1065
|
+
grid?: boolean | undefined;
|
|
1066
|
+
flex?: string | boolean | undefined;
|
|
1067
|
+
layoutMode?: "grid" | "flex" | "none" | undefined;
|
|
1068
|
+
position?: "absolute" | "relative" | undefined;
|
|
1069
|
+
gridCols?: string | number | undefined;
|
|
1070
|
+
gridRows?: string | number | undefined;
|
|
1071
|
+
gridTemplateRows?: string | undefined;
|
|
1072
|
+
gridTemplateColumns?: string | undefined;
|
|
1073
|
+
gridTemplate?: string | undefined;
|
|
1074
|
+
gridGap?: string | number | undefined;
|
|
1075
|
+
flexDirection?: "row" | "column" | undefined;
|
|
1076
|
+
alignItems?: "center" | "start" | "end" | "stretch" | undefined;
|
|
1077
|
+
justifyContent?: "center" | "start" | "end" | "stretch" | undefined;
|
|
1078
|
+
flexRow?: boolean | undefined;
|
|
1079
|
+
flexColumn?: boolean | undefined;
|
|
1080
|
+
gap?: string | number | undefined;
|
|
1081
|
+
}>>;
|
|
1082
|
+
schLayout: zod.ZodOptional<zod.ZodObject<{
|
|
1083
|
+
layoutMode: zod.ZodOptional<zod.ZodEnum<["grid", "flex", "none"]>>;
|
|
1084
|
+
position: zod.ZodOptional<zod.ZodEnum<["absolute", "relative"]>>;
|
|
1085
|
+
grid: zod.ZodOptional<zod.ZodBoolean>;
|
|
1086
|
+
gridCols: zod.ZodOptional<zod.ZodUnion<[zod.ZodNumber, zod.ZodString]>>;
|
|
1087
|
+
gridRows: zod.ZodOptional<zod.ZodUnion<[zod.ZodNumber, zod.ZodString]>>;
|
|
1088
|
+
gridTemplateRows: zod.ZodOptional<zod.ZodString>;
|
|
1089
|
+
gridTemplateColumns: zod.ZodOptional<zod.ZodString>;
|
|
1090
|
+
gridTemplate: zod.ZodOptional<zod.ZodString>;
|
|
1091
|
+
gridGap: zod.ZodOptional<zod.ZodUnion<[zod.ZodNumber, zod.ZodString]>>;
|
|
1092
|
+
flex: zod.ZodOptional<zod.ZodUnion<[zod.ZodBoolean, zod.ZodString]>>;
|
|
1093
|
+
flexDirection: zod.ZodOptional<zod.ZodEnum<["row", "column"]>>;
|
|
1094
|
+
alignItems: zod.ZodOptional<zod.ZodEnum<["start", "center", "end", "stretch"]>>;
|
|
1095
|
+
justifyContent: zod.ZodOptional<zod.ZodEnum<["start", "center", "end", "stretch"]>>;
|
|
1096
|
+
flexRow: zod.ZodOptional<zod.ZodBoolean>;
|
|
1097
|
+
flexColumn: zod.ZodOptional<zod.ZodBoolean>;
|
|
1098
|
+
gap: zod.ZodOptional<zod.ZodUnion<[zod.ZodNumber, zod.ZodString]>>;
|
|
1099
|
+
}, "strip", zod.ZodTypeAny, {
|
|
1100
|
+
grid?: boolean | undefined;
|
|
1101
|
+
flex?: string | boolean | undefined;
|
|
1102
|
+
layoutMode?: "grid" | "flex" | "none" | undefined;
|
|
1103
|
+
position?: "absolute" | "relative" | undefined;
|
|
1104
|
+
gridCols?: string | number | undefined;
|
|
1105
|
+
gridRows?: string | number | undefined;
|
|
1106
|
+
gridTemplateRows?: string | undefined;
|
|
1107
|
+
gridTemplateColumns?: string | undefined;
|
|
1108
|
+
gridTemplate?: string | undefined;
|
|
1109
|
+
gridGap?: string | number | undefined;
|
|
1110
|
+
flexDirection?: "row" | "column" | undefined;
|
|
1111
|
+
alignItems?: "center" | "start" | "end" | "stretch" | undefined;
|
|
1112
|
+
justifyContent?: "center" | "start" | "end" | "stretch" | undefined;
|
|
1113
|
+
flexRow?: boolean | undefined;
|
|
1114
|
+
flexColumn?: boolean | undefined;
|
|
1115
|
+
gap?: string | number | undefined;
|
|
1116
|
+
}, {
|
|
1117
|
+
grid?: boolean | undefined;
|
|
1118
|
+
flex?: string | boolean | undefined;
|
|
1119
|
+
layoutMode?: "grid" | "flex" | "none" | undefined;
|
|
1120
|
+
position?: "absolute" | "relative" | undefined;
|
|
1121
|
+
gridCols?: string | number | undefined;
|
|
1122
|
+
gridRows?: string | number | undefined;
|
|
1123
|
+
gridTemplateRows?: string | undefined;
|
|
1124
|
+
gridTemplateColumns?: string | undefined;
|
|
1125
|
+
gridTemplate?: string | undefined;
|
|
1126
|
+
gridGap?: string | number | undefined;
|
|
1127
|
+
flexDirection?: "row" | "column" | undefined;
|
|
1128
|
+
alignItems?: "center" | "start" | "end" | "stretch" | undefined;
|
|
1129
|
+
justifyContent?: "center" | "start" | "end" | "stretch" | undefined;
|
|
1130
|
+
flexRow?: boolean | undefined;
|
|
1131
|
+
flexColumn?: boolean | undefined;
|
|
1132
|
+
gap?: string | number | undefined;
|
|
1133
|
+
}>>;
|
|
1134
|
+
layoutMode: zod.ZodOptional<zod.ZodEnum<["grid", "flex", "none"]>>;
|
|
1135
|
+
position: zod.ZodOptional<zod.ZodEnum<["absolute", "relative"]>>;
|
|
1136
|
+
grid: zod.ZodOptional<zod.ZodBoolean>;
|
|
1137
|
+
gridCols: zod.ZodOptional<zod.ZodUnion<[zod.ZodNumber, zod.ZodString]>>;
|
|
1138
|
+
gridRows: zod.ZodOptional<zod.ZodUnion<[zod.ZodNumber, zod.ZodString]>>;
|
|
1139
|
+
gridTemplateRows: zod.ZodOptional<zod.ZodString>;
|
|
1140
|
+
gridTemplateColumns: zod.ZodOptional<zod.ZodString>;
|
|
1141
|
+
gridTemplate: zod.ZodOptional<zod.ZodString>;
|
|
1142
|
+
gridGap: zod.ZodOptional<zod.ZodUnion<[zod.ZodNumber, zod.ZodString]>>;
|
|
1143
|
+
flex: zod.ZodOptional<zod.ZodUnion<[zod.ZodBoolean, zod.ZodString]>>;
|
|
1144
|
+
flexDirection: zod.ZodOptional<zod.ZodEnum<["row", "column"]>>;
|
|
1145
|
+
alignItems: zod.ZodOptional<zod.ZodEnum<["start", "center", "end", "stretch"]>>;
|
|
1146
|
+
justifyContent: zod.ZodOptional<zod.ZodEnum<["start", "center", "end", "stretch"]>>;
|
|
1147
|
+
flexRow: zod.ZodOptional<zod.ZodBoolean>;
|
|
1148
|
+
flexColumn: zod.ZodOptional<zod.ZodBoolean>;
|
|
1149
|
+
gap: zod.ZodOptional<zod.ZodUnion<[zod.ZodNumber, zod.ZodString]>>;
|
|
1026
1150
|
name: zod.ZodOptional<zod.ZodString>;
|
|
1027
1151
|
children: zod.ZodOptional<zod.ZodAny>;
|
|
1028
1152
|
key: zod.ZodOptional<zod.ZodAny>;
|
|
@@ -1208,6 +1332,7 @@ declare class Board extends Group<typeof boardProps> {
|
|
|
1208
1332
|
serverCacheEnabled: zod.ZodOptional<zod.ZodBoolean>;
|
|
1209
1333
|
cache: zod.ZodOptional<zod.ZodType<_tscircuit_props.PcbRouteCache, zod.ZodTypeDef, _tscircuit_props.PcbRouteCache>>;
|
|
1210
1334
|
groupMode: zod.ZodOptional<zod.ZodEnum<["sequential-trace", "subcircuit"]>>;
|
|
1335
|
+
algorithmFn: zod.ZodOptional<zod.ZodType<(simpleRouteJson: any) => Promise<any>, zod.ZodTypeDef, (simpleRouteJson: any) => Promise<any>>>;
|
|
1211
1336
|
local: zod.ZodOptional<zod.ZodBoolean>;
|
|
1212
1337
|
}, "strip", zod.ZodTypeAny, {
|
|
1213
1338
|
serverUrl?: string | undefined;
|
|
@@ -1216,6 +1341,7 @@ declare class Board extends Group<typeof boardProps> {
|
|
|
1216
1341
|
serverCacheEnabled?: boolean | undefined;
|
|
1217
1342
|
cache?: _tscircuit_props.PcbRouteCache | undefined;
|
|
1218
1343
|
groupMode?: "sequential-trace" | "subcircuit" | undefined;
|
|
1344
|
+
algorithmFn?: ((simpleRouteJson: any) => Promise<any>) | undefined;
|
|
1219
1345
|
local?: boolean | undefined;
|
|
1220
1346
|
}, {
|
|
1221
1347
|
serverUrl?: string | undefined;
|
|
@@ -1224,6 +1350,7 @@ declare class Board extends Group<typeof boardProps> {
|
|
|
1224
1350
|
serverCacheEnabled?: boolean | undefined;
|
|
1225
1351
|
cache?: _tscircuit_props.PcbRouteCache | undefined;
|
|
1226
1352
|
groupMode?: "sequential-trace" | "subcircuit" | undefined;
|
|
1353
|
+
algorithmFn?: ((simpleRouteJson: any) => Promise<any>) | undefined;
|
|
1227
1354
|
local?: boolean | undefined;
|
|
1228
1355
|
}>, zod.ZodLiteral<"sequential-trace">, zod.ZodLiteral<"subcircuit">, zod.ZodLiteral<"auto">, zod.ZodLiteral<"auto-local">, zod.ZodLiteral<"auto-cloud">]>>;
|
|
1229
1356
|
}>, {
|
|
@@ -1253,6 +1380,62 @@ declare class Board extends Group<typeof boardProps> {
|
|
|
1253
1380
|
key?: any;
|
|
1254
1381
|
name?: string | undefined;
|
|
1255
1382
|
children?: any;
|
|
1383
|
+
grid?: boolean | undefined;
|
|
1384
|
+
flex?: string | boolean | undefined;
|
|
1385
|
+
layoutMode?: "grid" | "flex" | "none" | undefined;
|
|
1386
|
+
position?: "absolute" | "relative" | undefined;
|
|
1387
|
+
gridCols?: string | number | undefined;
|
|
1388
|
+
gridRows?: string | number | undefined;
|
|
1389
|
+
gridTemplateRows?: string | undefined;
|
|
1390
|
+
gridTemplateColumns?: string | undefined;
|
|
1391
|
+
gridTemplate?: string | undefined;
|
|
1392
|
+
gridGap?: string | number | undefined;
|
|
1393
|
+
flexDirection?: "row" | "column" | undefined;
|
|
1394
|
+
alignItems?: "center" | "start" | "end" | "stretch" | undefined;
|
|
1395
|
+
justifyContent?: "center" | "start" | "end" | "stretch" | undefined;
|
|
1396
|
+
flexRow?: boolean | undefined;
|
|
1397
|
+
flexColumn?: boolean | undefined;
|
|
1398
|
+
gap?: string | number | undefined;
|
|
1399
|
+
pcbWidth?: number | undefined;
|
|
1400
|
+
pcbHeight?: number | undefined;
|
|
1401
|
+
schWidth?: number | undefined;
|
|
1402
|
+
schHeight?: number | undefined;
|
|
1403
|
+
pcbLayout?: {
|
|
1404
|
+
grid?: boolean | undefined;
|
|
1405
|
+
flex?: string | boolean | undefined;
|
|
1406
|
+
layoutMode?: "grid" | "flex" | "none" | undefined;
|
|
1407
|
+
position?: "absolute" | "relative" | undefined;
|
|
1408
|
+
gridCols?: string | number | undefined;
|
|
1409
|
+
gridRows?: string | number | undefined;
|
|
1410
|
+
gridTemplateRows?: string | undefined;
|
|
1411
|
+
gridTemplateColumns?: string | undefined;
|
|
1412
|
+
gridTemplate?: string | undefined;
|
|
1413
|
+
gridGap?: string | number | undefined;
|
|
1414
|
+
flexDirection?: "row" | "column" | undefined;
|
|
1415
|
+
alignItems?: "center" | "start" | "end" | "stretch" | undefined;
|
|
1416
|
+
justifyContent?: "center" | "start" | "end" | "stretch" | undefined;
|
|
1417
|
+
flexRow?: boolean | undefined;
|
|
1418
|
+
flexColumn?: boolean | undefined;
|
|
1419
|
+
gap?: string | number | undefined;
|
|
1420
|
+
} | undefined;
|
|
1421
|
+
schLayout?: {
|
|
1422
|
+
grid?: boolean | undefined;
|
|
1423
|
+
flex?: string | boolean | undefined;
|
|
1424
|
+
layoutMode?: "grid" | "flex" | "none" | undefined;
|
|
1425
|
+
position?: "absolute" | "relative" | undefined;
|
|
1426
|
+
gridCols?: string | number | undefined;
|
|
1427
|
+
gridRows?: string | number | undefined;
|
|
1428
|
+
gridTemplateRows?: string | undefined;
|
|
1429
|
+
gridTemplateColumns?: string | undefined;
|
|
1430
|
+
gridTemplate?: string | undefined;
|
|
1431
|
+
gridGap?: string | number | undefined;
|
|
1432
|
+
flexDirection?: "row" | "column" | undefined;
|
|
1433
|
+
alignItems?: "center" | "start" | "end" | "stretch" | undefined;
|
|
1434
|
+
justifyContent?: "center" | "start" | "end" | "stretch" | undefined;
|
|
1435
|
+
flexRow?: boolean | undefined;
|
|
1436
|
+
flexColumn?: boolean | undefined;
|
|
1437
|
+
gap?: string | number | undefined;
|
|
1438
|
+
} | undefined;
|
|
1256
1439
|
layout?: _tscircuit_layout.LayoutBuilder | undefined;
|
|
1257
1440
|
manualEdits?: {
|
|
1258
1441
|
pcb_placements?: {
|
|
@@ -1293,6 +1476,7 @@ declare class Board extends Group<typeof boardProps> {
|
|
|
1293
1476
|
serverCacheEnabled?: boolean | undefined;
|
|
1294
1477
|
cache?: _tscircuit_props.PcbRouteCache | undefined;
|
|
1295
1478
|
groupMode?: "sequential-trace" | "subcircuit" | undefined;
|
|
1479
|
+
algorithmFn?: ((simpleRouteJson: any) => Promise<any>) | undefined;
|
|
1296
1480
|
local?: boolean | undefined;
|
|
1297
1481
|
} | undefined;
|
|
1298
1482
|
schAutoLayoutEnabled?: boolean | undefined;
|
|
@@ -1320,6 +1504,62 @@ declare class Board extends Group<typeof boardProps> {
|
|
|
1320
1504
|
key?: any;
|
|
1321
1505
|
name?: string | undefined;
|
|
1322
1506
|
children?: any;
|
|
1507
|
+
grid?: boolean | undefined;
|
|
1508
|
+
flex?: string | boolean | undefined;
|
|
1509
|
+
layoutMode?: "grid" | "flex" | "none" | undefined;
|
|
1510
|
+
position?: "absolute" | "relative" | undefined;
|
|
1511
|
+
gridCols?: string | number | undefined;
|
|
1512
|
+
gridRows?: string | number | undefined;
|
|
1513
|
+
gridTemplateRows?: string | undefined;
|
|
1514
|
+
gridTemplateColumns?: string | undefined;
|
|
1515
|
+
gridTemplate?: string | undefined;
|
|
1516
|
+
gridGap?: string | number | undefined;
|
|
1517
|
+
flexDirection?: "row" | "column" | undefined;
|
|
1518
|
+
alignItems?: "center" | "start" | "end" | "stretch" | undefined;
|
|
1519
|
+
justifyContent?: "center" | "start" | "end" | "stretch" | undefined;
|
|
1520
|
+
flexRow?: boolean | undefined;
|
|
1521
|
+
flexColumn?: boolean | undefined;
|
|
1522
|
+
gap?: string | number | undefined;
|
|
1523
|
+
pcbWidth?: string | number | undefined;
|
|
1524
|
+
pcbHeight?: string | number | undefined;
|
|
1525
|
+
schWidth?: string | number | undefined;
|
|
1526
|
+
schHeight?: string | number | undefined;
|
|
1527
|
+
pcbLayout?: {
|
|
1528
|
+
grid?: boolean | undefined;
|
|
1529
|
+
flex?: string | boolean | undefined;
|
|
1530
|
+
layoutMode?: "grid" | "flex" | "none" | undefined;
|
|
1531
|
+
position?: "absolute" | "relative" | undefined;
|
|
1532
|
+
gridCols?: string | number | undefined;
|
|
1533
|
+
gridRows?: string | number | undefined;
|
|
1534
|
+
gridTemplateRows?: string | undefined;
|
|
1535
|
+
gridTemplateColumns?: string | undefined;
|
|
1536
|
+
gridTemplate?: string | undefined;
|
|
1537
|
+
gridGap?: string | number | undefined;
|
|
1538
|
+
flexDirection?: "row" | "column" | undefined;
|
|
1539
|
+
alignItems?: "center" | "start" | "end" | "stretch" | undefined;
|
|
1540
|
+
justifyContent?: "center" | "start" | "end" | "stretch" | undefined;
|
|
1541
|
+
flexRow?: boolean | undefined;
|
|
1542
|
+
flexColumn?: boolean | undefined;
|
|
1543
|
+
gap?: string | number | undefined;
|
|
1544
|
+
} | undefined;
|
|
1545
|
+
schLayout?: {
|
|
1546
|
+
grid?: boolean | undefined;
|
|
1547
|
+
flex?: string | boolean | undefined;
|
|
1548
|
+
layoutMode?: "grid" | "flex" | "none" | undefined;
|
|
1549
|
+
position?: "absolute" | "relative" | undefined;
|
|
1550
|
+
gridCols?: string | number | undefined;
|
|
1551
|
+
gridRows?: string | number | undefined;
|
|
1552
|
+
gridTemplateRows?: string | undefined;
|
|
1553
|
+
gridTemplateColumns?: string | undefined;
|
|
1554
|
+
gridTemplate?: string | undefined;
|
|
1555
|
+
gridGap?: string | number | undefined;
|
|
1556
|
+
flexDirection?: "row" | "column" | undefined;
|
|
1557
|
+
alignItems?: "center" | "start" | "end" | "stretch" | undefined;
|
|
1558
|
+
justifyContent?: "center" | "start" | "end" | "stretch" | undefined;
|
|
1559
|
+
flexRow?: boolean | undefined;
|
|
1560
|
+
flexColumn?: boolean | undefined;
|
|
1561
|
+
gap?: string | number | undefined;
|
|
1562
|
+
} | undefined;
|
|
1323
1563
|
layout?: _tscircuit_layout.LayoutBuilder | undefined;
|
|
1324
1564
|
manualEdits?: {
|
|
1325
1565
|
pcb_placements?: {
|
|
@@ -1362,6 +1602,7 @@ declare class Board extends Group<typeof boardProps> {
|
|
|
1362
1602
|
serverCacheEnabled?: boolean | undefined;
|
|
1363
1603
|
cache?: _tscircuit_props.PcbRouteCache | undefined;
|
|
1364
1604
|
groupMode?: "sequential-trace" | "subcircuit" | undefined;
|
|
1605
|
+
algorithmFn?: ((simpleRouteJson: any) => Promise<any>) | undefined;
|
|
1365
1606
|
local?: boolean | undefined;
|
|
1366
1607
|
} | undefined;
|
|
1367
1608
|
schAutoLayoutEnabled?: boolean | undefined;
|
|
@@ -2393,6 +2634,8 @@ declare class Chip<PinLabels extends string = never> extends NormalComponent<typ
|
|
|
2393
2634
|
} | undefined;
|
|
2394
2635
|
children?: any;
|
|
2395
2636
|
symbolName?: string | undefined;
|
|
2637
|
+
schWidth?: number | undefined;
|
|
2638
|
+
schHeight?: number | undefined;
|
|
2396
2639
|
manufacturerPartNumber?: string | undefined;
|
|
2397
2640
|
pinLabels?: Record<string | number, string | readonly string[]> | undefined;
|
|
2398
2641
|
internallyConnectedPins?: string[][] | undefined;
|
|
@@ -2460,8 +2703,6 @@ declare class Chip<PinLabels extends string = never> extends NormalComponent<typ
|
|
|
2460
2703
|
bottomMargin?: number | undefined;
|
|
2461
2704
|
}> | undefined;
|
|
2462
2705
|
schPinSpacing?: number | undefined;
|
|
2463
|
-
schWidth?: number | undefined;
|
|
2464
|
-
schHeight?: number | undefined;
|
|
2465
2706
|
noSchematicRepresentation?: boolean | undefined;
|
|
2466
2707
|
connections?: Record<string | number, string | readonly string[] | string[]> | undefined;
|
|
2467
2708
|
}, {
|
|
@@ -2533,6 +2774,8 @@ declare class Chip<PinLabels extends string = never> extends NormalComponent<typ
|
|
|
2533
2774
|
} | undefined;
|
|
2534
2775
|
children?: any;
|
|
2535
2776
|
symbolName?: string | undefined;
|
|
2777
|
+
schWidth?: string | number | undefined;
|
|
2778
|
+
schHeight?: string | number | undefined;
|
|
2536
2779
|
manufacturerPartNumber?: string | undefined;
|
|
2537
2780
|
pinLabels?: Record<string | number, string | readonly string[]> | undefined;
|
|
2538
2781
|
internallyConnectedPins?: string[][] | undefined;
|
|
@@ -2600,8 +2843,6 @@ declare class Chip<PinLabels extends string = never> extends NormalComponent<typ
|
|
|
2600
2843
|
bottomMargin?: string | number | undefined;
|
|
2601
2844
|
}> | undefined;
|
|
2602
2845
|
schPinSpacing?: string | number | undefined;
|
|
2603
|
-
schWidth?: string | number | undefined;
|
|
2604
|
-
schHeight?: string | number | undefined;
|
|
2605
2846
|
noSchematicRepresentation?: boolean | undefined;
|
|
2606
2847
|
connections?: Record<string | number, string | readonly string[] | string[]> | undefined;
|
|
2607
2848
|
}>;
|
|
@@ -3481,6 +3722,8 @@ declare class Jumper<PinLabels extends string = never> extends NormalComponent<t
|
|
|
3481
3722
|
} | undefined;
|
|
3482
3723
|
children?: any;
|
|
3483
3724
|
symbolName?: string | undefined;
|
|
3725
|
+
schWidth?: number | undefined;
|
|
3726
|
+
schHeight?: number | undefined;
|
|
3484
3727
|
manufacturerPartNumber?: string | undefined;
|
|
3485
3728
|
pinLabels?: Record<string | number, string | string[]> | undefined;
|
|
3486
3729
|
schPortArrangement?: {
|
|
@@ -3520,8 +3763,6 @@ declare class Jumper<PinLabels extends string = never> extends NormalComponent<t
|
|
|
3520
3763
|
bottomMargin?: number | undefined;
|
|
3521
3764
|
}> | undefined;
|
|
3522
3765
|
schPinSpacing?: number | undefined;
|
|
3523
|
-
schWidth?: number | undefined;
|
|
3524
|
-
schHeight?: number | undefined;
|
|
3525
3766
|
schDirection?: "left" | "right" | undefined;
|
|
3526
3767
|
}, {
|
|
3527
3768
|
name: string;
|
|
@@ -3592,6 +3833,8 @@ declare class Jumper<PinLabels extends string = never> extends NormalComponent<t
|
|
|
3592
3833
|
} | undefined;
|
|
3593
3834
|
children?: any;
|
|
3594
3835
|
symbolName?: string | undefined;
|
|
3836
|
+
schWidth?: string | number | undefined;
|
|
3837
|
+
schHeight?: string | number | undefined;
|
|
3595
3838
|
manufacturerPartNumber?: string | undefined;
|
|
3596
3839
|
pinLabels?: Record<string | number, string | string[]> | undefined;
|
|
3597
3840
|
schPortArrangement?: {
|
|
@@ -3631,8 +3874,6 @@ declare class Jumper<PinLabels extends string = never> extends NormalComponent<t
|
|
|
3631
3874
|
bottomMargin?: string | number | undefined;
|
|
3632
3875
|
}> | undefined;
|
|
3633
3876
|
schPinSpacing?: string | number | undefined;
|
|
3634
|
-
schWidth?: string | number | undefined;
|
|
3635
|
-
schHeight?: string | number | undefined;
|
|
3636
3877
|
schDirection?: "left" | "right" | undefined;
|
|
3637
3878
|
}>;
|
|
3638
3879
|
shouldRenderAsSchematicBox: boolean;
|
|
@@ -5317,7 +5558,7 @@ declare class PlatedHole extends PrimitiveComponent<typeof platedHoleProps> {
|
|
|
5317
5558
|
isPcbPrimitive: boolean;
|
|
5318
5559
|
get config(): {
|
|
5319
5560
|
componentName: string;
|
|
5320
|
-
zodProps: zod.
|
|
5561
|
+
zodProps: zod.ZodUnion<[zod.ZodObject<zod.objectUtil.extendShape<Omit<{
|
|
5321
5562
|
pcbX: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
5322
5563
|
pcbY: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
5323
5564
|
pcbRotation: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
@@ -5434,6 +5675,72 @@ declare class PlatedHole extends PrimitiveComponent<typeof platedHoleProps> {
|
|
|
5434
5675
|
pcbY?: string | number | undefined;
|
|
5435
5676
|
name?: string | undefined;
|
|
5436
5677
|
portHints?: (string | number)[] | undefined;
|
|
5678
|
+
}>, zod.ZodEffects<zod.ZodObject<zod.objectUtil.extendShape<Omit<{
|
|
5679
|
+
pcbX: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
5680
|
+
pcbY: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
5681
|
+
pcbRotation: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
5682
|
+
layer: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>, zod.ZodObject<{
|
|
5683
|
+
name: zod.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>;
|
|
5684
|
+
}, "strip", zod.ZodTypeAny, {
|
|
5685
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
5686
|
+
}, {
|
|
5687
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
5688
|
+
}>]>, "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6", "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
|
|
5689
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
5690
|
+
}>>;
|
|
5691
|
+
}, "pcbRotation" | "layer">, {
|
|
5692
|
+
name: zod.ZodOptional<zod.ZodString>;
|
|
5693
|
+
holeDiameter: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
|
|
5694
|
+
rectPadWidth: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
|
|
5695
|
+
rectPadHeight: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
|
|
5696
|
+
holeShape: zod.ZodOptional<zod.ZodLiteral<"circle">>;
|
|
5697
|
+
padShape: zod.ZodOptional<zod.ZodLiteral<"rect">>;
|
|
5698
|
+
shape: zod.ZodOptional<zod.ZodLiteral<"circularHoleWithRectPad">>;
|
|
5699
|
+
portHints: zod.ZodOptional<zod.ZodArray<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, "many">>;
|
|
5700
|
+
}>, "strip", zod.ZodTypeAny, {
|
|
5701
|
+
holeDiameter: number;
|
|
5702
|
+
rectPadWidth: number;
|
|
5703
|
+
rectPadHeight: number;
|
|
5704
|
+
pcbX?: number | undefined;
|
|
5705
|
+
pcbY?: number | undefined;
|
|
5706
|
+
name?: string | undefined;
|
|
5707
|
+
shape?: "circularHoleWithRectPad" | undefined;
|
|
5708
|
+
portHints?: (string | number)[] | undefined;
|
|
5709
|
+
holeShape?: "circle" | undefined;
|
|
5710
|
+
padShape?: "rect" | undefined;
|
|
5711
|
+
}, {
|
|
5712
|
+
holeDiameter: string | number;
|
|
5713
|
+
rectPadWidth: string | number;
|
|
5714
|
+
rectPadHeight: string | number;
|
|
5715
|
+
pcbX?: string | number | undefined;
|
|
5716
|
+
pcbY?: string | number | undefined;
|
|
5717
|
+
name?: string | undefined;
|
|
5718
|
+
shape?: "circularHoleWithRectPad" | undefined;
|
|
5719
|
+
portHints?: (string | number)[] | undefined;
|
|
5720
|
+
holeShape?: "circle" | undefined;
|
|
5721
|
+
padShape?: "rect" | undefined;
|
|
5722
|
+
}>, {
|
|
5723
|
+
holeDiameter: number;
|
|
5724
|
+
rectPadWidth: number;
|
|
5725
|
+
rectPadHeight: number;
|
|
5726
|
+
pcbX?: number | undefined;
|
|
5727
|
+
pcbY?: number | undefined;
|
|
5728
|
+
name?: string | undefined;
|
|
5729
|
+
shape?: "circularHoleWithRectPad" | undefined;
|
|
5730
|
+
portHints?: (string | number)[] | undefined;
|
|
5731
|
+
holeShape?: "circle" | undefined;
|
|
5732
|
+
padShape?: "rect" | undefined;
|
|
5733
|
+
}, {
|
|
5734
|
+
holeDiameter: string | number;
|
|
5735
|
+
rectPadWidth: string | number;
|
|
5736
|
+
rectPadHeight: string | number;
|
|
5737
|
+
pcbX?: string | number | undefined;
|
|
5738
|
+
pcbY?: string | number | undefined;
|
|
5739
|
+
name?: string | undefined;
|
|
5740
|
+
shape?: "circularHoleWithRectPad" | undefined;
|
|
5741
|
+
portHints?: (string | number)[] | undefined;
|
|
5742
|
+
holeShape?: "circle" | undefined;
|
|
5743
|
+
padShape?: "rect" | undefined;
|
|
5437
5744
|
}>]>;
|
|
5438
5745
|
};
|
|
5439
5746
|
getAvailablePcbLayers(): string[];
|
package/dist/index.js
CHANGED
|
@@ -5469,6 +5469,12 @@ var getSimpleRouteJsonFromCircuitJson = ({
|
|
|
5469
5469
|
),
|
|
5470
5470
|
connMap
|
|
5471
5471
|
);
|
|
5472
|
+
for (const obstacle of obstacles) {
|
|
5473
|
+
const additionalIds = obstacle.connectedTo.flatMap(
|
|
5474
|
+
(id) => connMap.getIdsConnectedToNet(id)
|
|
5475
|
+
);
|
|
5476
|
+
obstacle.connectedTo.push(...additionalIds);
|
|
5477
|
+
}
|
|
5472
5478
|
const allPoints = obstacles.flatMap((o) => [
|
|
5473
5479
|
{
|
|
5474
5480
|
x: o.center.x - o.width / 2,
|
|
@@ -5506,7 +5512,7 @@ var getSimpleRouteJsonFromCircuitJson = ({
|
|
|
5506
5512
|
});
|
|
5507
5513
|
if (connectedPorts.length < 2) return null;
|
|
5508
5514
|
return {
|
|
5509
|
-
name:
|
|
5515
|
+
name: trace.source_trace_id ?? connMap.getNetConnectedToId(trace.source_trace_id) ?? "",
|
|
5510
5516
|
source_trace_id: trace.source_trace_id,
|
|
5511
5517
|
pointsToConnect: connectedPorts.map((port) => {
|
|
5512
5518
|
return {
|
|
@@ -5524,7 +5530,7 @@ var getSimpleRouteJsonFromCircuitJson = ({
|
|
|
5524
5530
|
for (const net of source_nets) {
|
|
5525
5531
|
const connectedSourceTraces = db.source_trace.list().filter((st) => st.connected_source_net_ids?.includes(net.source_net_id));
|
|
5526
5532
|
connectionsFromNets.push({
|
|
5527
|
-
name:
|
|
5533
|
+
name: net.source_net_id ?? connMap.getNetConnectedToId(net.source_net_id),
|
|
5528
5534
|
pointsToConnect: connectedSourceTraces.flatMap((st) => {
|
|
5529
5535
|
const pcb_ports = db.pcb_port.list().filter(
|
|
5530
5536
|
(p) => st.connected_source_port_ids.includes(p.source_port_id)
|
|
@@ -5803,10 +5809,12 @@ var Group = class extends NormalComponent {
|
|
|
5803
5809
|
/**
|
|
5804
5810
|
* Run local autorouting using the CapacityMeshAutorouter
|
|
5805
5811
|
*/
|
|
5806
|
-
async
|
|
5812
|
+
async _runLocalAutorouting() {
|
|
5807
5813
|
const { db } = this.root;
|
|
5808
|
-
const
|
|
5809
|
-
debug4
|
|
5814
|
+
const props = this._parsedProps;
|
|
5815
|
+
const debug4 = Debug5("tscircuit:core:_runLocalAutorouting");
|
|
5816
|
+
debug4(`[${this.getString()}] starting local autorouting`);
|
|
5817
|
+
const autorouterConfig = this._getAutorouterConfig();
|
|
5810
5818
|
const { simpleRouteJson, connMap } = getSimpleRouteJsonFromCircuitJson({
|
|
5811
5819
|
db,
|
|
5812
5820
|
minTraceWidth: this.props.autorouter?.minTraceWidth ?? 0.15,
|
|
@@ -5817,11 +5825,16 @@ var Group = class extends NormalComponent {
|
|
|
5817
5825
|
componentDisplayName: this.getString(),
|
|
5818
5826
|
simpleRouteJson
|
|
5819
5827
|
});
|
|
5820
|
-
|
|
5821
|
-
|
|
5822
|
-
|
|
5823
|
-
|
|
5824
|
-
|
|
5828
|
+
let autorouter;
|
|
5829
|
+
if (autorouterConfig.algorithmFn) {
|
|
5830
|
+
autorouter = await autorouterConfig.algorithmFn(simpleRouteJson);
|
|
5831
|
+
} else {
|
|
5832
|
+
autorouter = new CapacityMeshAutorouter(simpleRouteJson, {
|
|
5833
|
+
// Optional configuration parameters
|
|
5834
|
+
capacityDepth: this.props.autorouter?.capacityDepth,
|
|
5835
|
+
targetMinCapacity: this.props.autorouter?.targetMinCapacity
|
|
5836
|
+
});
|
|
5837
|
+
}
|
|
5825
5838
|
const routingPromise = new Promise(
|
|
5826
5839
|
(resolve, reject) => {
|
|
5827
5840
|
autorouter.on("complete", (event) => {
|
|
@@ -5866,7 +5879,7 @@ var Group = class extends NormalComponent {
|
|
|
5866
5879
|
if (this._getAutorouterConfig().local) {
|
|
5867
5880
|
this._queueAsyncEffect(
|
|
5868
5881
|
"capacity-mesh-autorouting",
|
|
5869
|
-
async () => this.
|
|
5882
|
+
async () => this._runLocalAutorouting()
|
|
5870
5883
|
);
|
|
5871
5884
|
} else {
|
|
5872
5885
|
this._queueAsyncEffect(
|
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.337",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"@tscircuit/capacity-autorouter": "^0.0.12",
|
|
57
57
|
"@tscircuit/infgrid-ijump-astar": "^0.0.33",
|
|
58
58
|
"@tscircuit/math-utils": "^0.0.9",
|
|
59
|
-
"@tscircuit/props": "^0.0.
|
|
59
|
+
"@tscircuit/props": "^0.0.159",
|
|
60
60
|
"@tscircuit/schematic-autolayout": "^0.0.6",
|
|
61
61
|
"@tscircuit/soup-util": "^0.0.41",
|
|
62
62
|
"circuit-json": "^0.0.144",
|