@tscircuit/props 0.0.713 → 0.0.714
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/README.md +17 -0
- package/dist/index.d.ts +47 -0
- package/dist/index.js +29 -1
- package/dist/index.js.map +1 -1
- package/lib/components/autoroutingphase.ts +64 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -442,6 +442,23 @@ export interface AutoroutingPhaseProps extends RoutingTolerances, FanoutProps {
|
|
|
442
442
|
// Reroutes traces selected by region or connection. The simplify autorouter
|
|
443
443
|
// may omit a selector to simplify every existing trace in the phase.
|
|
444
444
|
reroute?: boolean;
|
|
445
|
+
/**
|
|
446
|
+
* Select the test-point autorouter. Requires reroute=true; omitted/false leaves
|
|
447
|
+
* existing routing unchanged. Optional connection(s) select traces, otherwise
|
|
448
|
+
* all routed traces are selected. Conflicts with region, pcbTracePaths,
|
|
449
|
+
* autorouter and algorithmFn. No alias for the unreleased pcbTestPoints object.
|
|
450
|
+
*/
|
|
451
|
+
addTestPoints?: boolean;
|
|
452
|
+
/** Test-point layer; defaults to bottom when addTestPoints is enabled. */
|
|
453
|
+
testPointLayer?: "top" | "bottom";
|
|
454
|
+
/** Probe pad diameter, mm or unit string; defaults to 1 mm. Must be positive. */
|
|
455
|
+
testPointDiameter?: Distance;
|
|
456
|
+
/** Copper edge clearance, mm or unit string; defaults to 0.2 mm. */
|
|
457
|
+
testPointClearance?: Distance;
|
|
458
|
+
/** Minimum probe center spacing, mm or unit string; defaults to 2.54 mm. */
|
|
459
|
+
testPointMinProbeSpacing?: Distance;
|
|
460
|
+
/** Maximum local trace detour, mm or unit string; defaults to 1 mm. */
|
|
461
|
+
testPointMaxDetour?: Distance;
|
|
445
462
|
}
|
|
446
463
|
```
|
|
447
464
|
|
package/dist/index.d.ts
CHANGED
|
@@ -193152,6 +193152,23 @@ interface AutoroutingPhaseProps extends RoutingTolerances, FanoutProps {
|
|
|
193152
193152
|
connection?: string;
|
|
193153
193153
|
connections?: string[];
|
|
193154
193154
|
reroute?: boolean;
|
|
193155
|
+
/**
|
|
193156
|
+
* Select the test-point autorouter. Requires reroute=true; omitted/false leaves
|
|
193157
|
+
* existing routing unchanged. Optional connection(s) select traces, otherwise
|
|
193158
|
+
* all routed traces are selected. Conflicts with region, pcbTracePaths,
|
|
193159
|
+
* autorouter and algorithmFn. No alias for the unreleased pcbTestPoints object.
|
|
193160
|
+
*/
|
|
193161
|
+
addTestPoints?: boolean;
|
|
193162
|
+
/** Test-point layer; defaults to bottom when addTestPoints is enabled. */
|
|
193163
|
+
testPointLayer?: "top" | "bottom";
|
|
193164
|
+
/** Probe pad diameter, mm or unit string; defaults to 1 mm. Must be positive. */
|
|
193165
|
+
testPointDiameter?: Distance;
|
|
193166
|
+
/** Copper edge clearance, mm or unit string; defaults to 0.2 mm. */
|
|
193167
|
+
testPointClearance?: Distance;
|
|
193168
|
+
/** Minimum probe center spacing, mm or unit string; defaults to 2.54 mm. */
|
|
193169
|
+
testPointMinProbeSpacing?: Distance;
|
|
193170
|
+
/** Maximum local trace detour, mm or unit string; defaults to 1 mm. */
|
|
193171
|
+
testPointMaxDetour?: Distance;
|
|
193155
193172
|
}
|
|
193156
193173
|
declare const autoroutingPhaseProps: z.ZodEffects<z.ZodObject<{
|
|
193157
193174
|
busFanoutDirections: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodEnum<["top_left", "top_center", "top_right", "center_left", "center", "center_right", "bottom_left", "bottom_center", "bottom_right"]>, z.ZodEnum<["topside_left", "topside_center", "topside_right", "rightside_top", "rightside_center", "rightside_bottom", "bottomside_right", "bottomside_center", "bottomside_left", "leftside_bottom", "leftside_center", "leftside_top", "center"]>, z.ZodObject<{
|
|
@@ -193217,6 +193234,12 @@ declare const autoroutingPhaseProps: z.ZodEffects<z.ZodObject<{
|
|
|
193217
193234
|
connection: z.ZodOptional<z.ZodString>;
|
|
193218
193235
|
connections: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
193219
193236
|
reroute: z.ZodOptional<z.ZodBoolean>;
|
|
193237
|
+
addTestPoints: z.ZodOptional<z.ZodBoolean>;
|
|
193238
|
+
testPointLayer: z.ZodOptional<z.ZodEnum<["top", "bottom"]>>;
|
|
193239
|
+
testPointDiameter: z.ZodOptional<z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>, z.ZodNumber>>;
|
|
193240
|
+
testPointClearance: z.ZodOptional<z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>, z.ZodNumber>>;
|
|
193241
|
+
testPointMinProbeSpacing: z.ZodOptional<z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>, z.ZodNumber>>;
|
|
193242
|
+
testPointMaxDetour: z.ZodOptional<z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>, z.ZodNumber>>;
|
|
193220
193243
|
minTraceWidth: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
193221
193244
|
minViaHoleEdgeToViaHoleEdgeClearance: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
193222
193245
|
minViaEdgeToPadEdgeClearance: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
@@ -193447,6 +193470,12 @@ declare const autoroutingPhaseProps: z.ZodEffects<z.ZodObject<{
|
|
|
193447
193470
|
shape?: "rect" | undefined;
|
|
193448
193471
|
} | undefined;
|
|
193449
193472
|
reroute?: boolean | undefined;
|
|
193473
|
+
addTestPoints?: boolean | undefined;
|
|
193474
|
+
testPointLayer?: "top" | "bottom" | undefined;
|
|
193475
|
+
testPointDiameter?: number | undefined;
|
|
193476
|
+
testPointClearance?: number | undefined;
|
|
193477
|
+
testPointMinProbeSpacing?: number | undefined;
|
|
193478
|
+
testPointMaxDetour?: number | undefined;
|
|
193450
193479
|
}, {
|
|
193451
193480
|
name?: string | undefined;
|
|
193452
193481
|
key?: any;
|
|
@@ -193514,6 +193543,12 @@ declare const autoroutingPhaseProps: z.ZodEffects<z.ZodObject<{
|
|
|
193514
193543
|
shape?: "rect" | undefined;
|
|
193515
193544
|
} | undefined;
|
|
193516
193545
|
reroute?: boolean | undefined;
|
|
193546
|
+
addTestPoints?: boolean | undefined;
|
|
193547
|
+
testPointLayer?: "top" | "bottom" | undefined;
|
|
193548
|
+
testPointDiameter?: string | number | undefined;
|
|
193549
|
+
testPointClearance?: string | number | undefined;
|
|
193550
|
+
testPointMinProbeSpacing?: string | number | undefined;
|
|
193551
|
+
testPointMaxDetour?: string | number | undefined;
|
|
193517
193552
|
}>, {
|
|
193518
193553
|
name?: string | undefined;
|
|
193519
193554
|
key?: any;
|
|
@@ -193571,6 +193606,12 @@ declare const autoroutingPhaseProps: z.ZodEffects<z.ZodObject<{
|
|
|
193571
193606
|
shape?: "rect" | undefined;
|
|
193572
193607
|
} | undefined;
|
|
193573
193608
|
reroute?: boolean | undefined;
|
|
193609
|
+
addTestPoints?: boolean | undefined;
|
|
193610
|
+
testPointLayer?: "top" | "bottom" | undefined;
|
|
193611
|
+
testPointDiameter?: number | undefined;
|
|
193612
|
+
testPointClearance?: number | undefined;
|
|
193613
|
+
testPointMinProbeSpacing?: number | undefined;
|
|
193614
|
+
testPointMaxDetour?: number | undefined;
|
|
193574
193615
|
}, {
|
|
193575
193616
|
name?: string | undefined;
|
|
193576
193617
|
key?: any;
|
|
@@ -193638,6 +193679,12 @@ declare const autoroutingPhaseProps: z.ZodEffects<z.ZodObject<{
|
|
|
193638
193679
|
shape?: "rect" | undefined;
|
|
193639
193680
|
} | undefined;
|
|
193640
193681
|
reroute?: boolean | undefined;
|
|
193682
|
+
addTestPoints?: boolean | undefined;
|
|
193683
|
+
testPointLayer?: "top" | "bottom" | undefined;
|
|
193684
|
+
testPointDiameter?: string | number | undefined;
|
|
193685
|
+
testPointClearance?: string | number | undefined;
|
|
193686
|
+
testPointMinProbeSpacing?: string | number | undefined;
|
|
193687
|
+
testPointMaxDetour?: string | number | undefined;
|
|
193641
193688
|
}>;
|
|
193642
193689
|
|
|
193643
193690
|
declare const transistorPinsLabels: readonly ["pin1", "pin2", "pin3", "emitter", "collector", "base", "gate", "source", "drain"];
|
package/dist/index.js
CHANGED
|
@@ -19377,15 +19377,43 @@ var autoroutingPhaseProps = z120.object({
|
|
|
19377
19377
|
connection: z120.string().optional(),
|
|
19378
19378
|
connections: z120.array(z120.string()).optional(),
|
|
19379
19379
|
reroute: z120.boolean().optional(),
|
|
19380
|
+
addTestPoints: z120.boolean().optional(),
|
|
19381
|
+
testPointLayer: z120.enum(["top", "bottom"]).optional(),
|
|
19382
|
+
testPointDiameter: distance.pipe(z120.number().finite().positive()).optional(),
|
|
19383
|
+
testPointClearance: distance.pipe(z120.number().finite().nonnegative()).optional(),
|
|
19384
|
+
testPointMinProbeSpacing: distance.pipe(z120.number().finite().nonnegative()).optional(),
|
|
19385
|
+
testPointMaxDetour: distance.pipe(z120.number().finite().nonnegative()).optional(),
|
|
19380
19386
|
...fanoutProps.shape
|
|
19381
19387
|
}).superRefine((value, ctx) => {
|
|
19388
|
+
if (value.addTestPoints && (value.reroute !== true || value.region || value.pcbTracePaths || value.autorouter || value.algorithmFn)) {
|
|
19389
|
+
ctx.addIssue({
|
|
19390
|
+
code: z120.ZodIssueCode.custom,
|
|
19391
|
+
path: ["addTestPoints"],
|
|
19392
|
+
message: "addTestPoints requires reroute=true and cannot combine with region, pcbTracePaths, autorouter, or algorithmFn"
|
|
19393
|
+
});
|
|
19394
|
+
}
|
|
19395
|
+
for (const option of [
|
|
19396
|
+
"testPointLayer",
|
|
19397
|
+
"testPointDiameter",
|
|
19398
|
+
"testPointClearance",
|
|
19399
|
+
"testPointMinProbeSpacing",
|
|
19400
|
+
"testPointMaxDetour"
|
|
19401
|
+
]) {
|
|
19402
|
+
if (value[option] !== void 0 && !value.addTestPoints) {
|
|
19403
|
+
ctx.addIssue({
|
|
19404
|
+
code: z120.ZodIssueCode.custom,
|
|
19405
|
+
path: [option],
|
|
19406
|
+
message: `${option} requires addTestPoints=true`
|
|
19407
|
+
});
|
|
19408
|
+
}
|
|
19409
|
+
}
|
|
19382
19410
|
const isSimplifyAutorouter = value.autorouter === "simplify" || typeof value.autorouter === "object" && value.autorouter?.preset === "simplify";
|
|
19383
19411
|
if (isSimplifyAutorouter && value.reroute !== true) {
|
|
19384
19412
|
console.warn(
|
|
19385
19413
|
'The "simplify" autorouter preset should only be used with reroute=true'
|
|
19386
19414
|
);
|
|
19387
19415
|
}
|
|
19388
|
-
if (value.reroute !== void 0 && !(isSimplifyAutorouter && value.reroute === true) && value.region === void 0 && value.connection === void 0 && value.connections === void 0) {
|
|
19416
|
+
if (value.reroute !== void 0 && !((isSimplifyAutorouter || value.addTestPoints) && value.reroute === true) && value.region === void 0 && value.connection === void 0 && value.connections === void 0) {
|
|
19389
19417
|
ctx.addIssue({
|
|
19390
19418
|
code: z120.ZodIssueCode.custom,
|
|
19391
19419
|
message: "region, connection, or connections is required when reroute is provided",
|