@tscircuit/props 0.0.713 → 0.0.715
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 +168 -2
- package/dist/index.js +55 -2
- package/dist/index.js.map +1 -1
- package/lib/assembly/cable.ts +45 -7
- 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
|
@@ -14973,25 +14973,89 @@ interface AssemblyCableProps {
|
|
|
14973
14973
|
standard?: AssemblyCableStandard;
|
|
14974
14974
|
/** Explicit cable model specification. Omit to infer the cable from its endpoints. */
|
|
14975
14975
|
model?: string;
|
|
14976
|
+
waypoints?: {
|
|
14977
|
+
x: number;
|
|
14978
|
+
y: number;
|
|
14979
|
+
z: number;
|
|
14980
|
+
}[];
|
|
14981
|
+
/** Reference endpoint for waypoint offsets. Required when waypoints is defined. */
|
|
14982
|
+
waypointAnchor?: "start" | "end";
|
|
14983
|
+
/** Board orientation for waypoint axes. Required when waypoints is defined. */
|
|
14984
|
+
waypointAxisOrientation?: "board_at_start" | "board_at_end";
|
|
14976
14985
|
}
|
|
14977
|
-
declare const assemblyCableProps: z.ZodObject<{
|
|
14986
|
+
declare const assemblyCableProps: z.ZodEffects<z.ZodObject<{
|
|
14978
14987
|
name: z.ZodString;
|
|
14979
14988
|
from: z.ZodString;
|
|
14980
14989
|
to: z.ZodString;
|
|
14981
14990
|
standard: z.ZodOptional<z.ZodLiteral<"usb_c">>;
|
|
14982
14991
|
model: z.ZodOptional<z.ZodString>;
|
|
14992
|
+
waypoints: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
14993
|
+
x: z.ZodNumber;
|
|
14994
|
+
y: z.ZodNumber;
|
|
14995
|
+
z: z.ZodNumber;
|
|
14996
|
+
}, "strip", z.ZodTypeAny, {
|
|
14997
|
+
x: number;
|
|
14998
|
+
y: number;
|
|
14999
|
+
z: number;
|
|
15000
|
+
}, {
|
|
15001
|
+
x: number;
|
|
15002
|
+
y: number;
|
|
15003
|
+
z: number;
|
|
15004
|
+
}>, "many">>;
|
|
15005
|
+
waypointAnchor: z.ZodOptional<z.ZodEnum<["start", "end"]>>;
|
|
15006
|
+
waypointAxisOrientation: z.ZodOptional<z.ZodEnum<["board_at_start", "board_at_end"]>>;
|
|
14983
15007
|
}, "strip", z.ZodTypeAny, {
|
|
14984
15008
|
name: string;
|
|
14985
15009
|
from: string;
|
|
14986
15010
|
to: string;
|
|
14987
15011
|
model?: string | undefined;
|
|
14988
15012
|
standard?: "usb_c" | undefined;
|
|
15013
|
+
waypoints?: {
|
|
15014
|
+
x: number;
|
|
15015
|
+
y: number;
|
|
15016
|
+
z: number;
|
|
15017
|
+
}[] | undefined;
|
|
15018
|
+
waypointAnchor?: "start" | "end" | undefined;
|
|
15019
|
+
waypointAxisOrientation?: "board_at_start" | "board_at_end" | undefined;
|
|
14989
15020
|
}, {
|
|
14990
15021
|
name: string;
|
|
14991
15022
|
from: string;
|
|
14992
15023
|
to: string;
|
|
14993
15024
|
model?: string | undefined;
|
|
14994
15025
|
standard?: "usb_c" | undefined;
|
|
15026
|
+
waypoints?: {
|
|
15027
|
+
x: number;
|
|
15028
|
+
y: number;
|
|
15029
|
+
z: number;
|
|
15030
|
+
}[] | undefined;
|
|
15031
|
+
waypointAnchor?: "start" | "end" | undefined;
|
|
15032
|
+
waypointAxisOrientation?: "board_at_start" | "board_at_end" | undefined;
|
|
15033
|
+
}>, {
|
|
15034
|
+
name: string;
|
|
15035
|
+
from: string;
|
|
15036
|
+
to: string;
|
|
15037
|
+
model?: string | undefined;
|
|
15038
|
+
standard?: "usb_c" | undefined;
|
|
15039
|
+
waypoints?: {
|
|
15040
|
+
x: number;
|
|
15041
|
+
y: number;
|
|
15042
|
+
z: number;
|
|
15043
|
+
}[] | undefined;
|
|
15044
|
+
waypointAnchor?: "start" | "end" | undefined;
|
|
15045
|
+
waypointAxisOrientation?: "board_at_start" | "board_at_end" | undefined;
|
|
15046
|
+
}, {
|
|
15047
|
+
name: string;
|
|
15048
|
+
from: string;
|
|
15049
|
+
to: string;
|
|
15050
|
+
model?: string | undefined;
|
|
15051
|
+
standard?: "usb_c" | undefined;
|
|
15052
|
+
waypoints?: {
|
|
15053
|
+
x: number;
|
|
15054
|
+
y: number;
|
|
15055
|
+
z: number;
|
|
15056
|
+
}[] | undefined;
|
|
15057
|
+
waypointAnchor?: "start" | "end" | undefined;
|
|
15058
|
+
waypointAxisOrientation?: "board_at_start" | "board_at_end" | undefined;
|
|
14995
15059
|
}>;
|
|
14996
15060
|
type AssemblyCablePropsInput = z.input<typeof assemblyCableProps>;
|
|
14997
15061
|
|
|
@@ -33150,24 +33214,79 @@ declare const assemblyProps: {
|
|
|
33150
33214
|
mountFace?: string | undefined;
|
|
33151
33215
|
mountGap?: string | number | undefined;
|
|
33152
33216
|
}>;
|
|
33153
|
-
readonly cable: zod.ZodObject<{
|
|
33217
|
+
readonly cable: zod.ZodEffects<zod.ZodObject<{
|
|
33154
33218
|
name: zod.ZodString;
|
|
33155
33219
|
from: zod.ZodString;
|
|
33156
33220
|
to: zod.ZodString;
|
|
33157
33221
|
standard: zod.ZodOptional<zod.ZodLiteral<"usb_c">>;
|
|
33158
33222
|
model: zod.ZodOptional<zod.ZodString>;
|
|
33223
|
+
waypoints: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
|
|
33224
|
+
x: zod.ZodNumber;
|
|
33225
|
+
y: zod.ZodNumber;
|
|
33226
|
+
z: zod.ZodNumber;
|
|
33227
|
+
}, "strip", zod.ZodTypeAny, {
|
|
33228
|
+
x: number;
|
|
33229
|
+
y: number;
|
|
33230
|
+
z: number;
|
|
33231
|
+
}, {
|
|
33232
|
+
x: number;
|
|
33233
|
+
y: number;
|
|
33234
|
+
z: number;
|
|
33235
|
+
}>, "many">>;
|
|
33236
|
+
waypointAnchor: zod.ZodOptional<zod.ZodEnum<["start", "end"]>>;
|
|
33237
|
+
waypointAxisOrientation: zod.ZodOptional<zod.ZodEnum<["board_at_start", "board_at_end"]>>;
|
|
33159
33238
|
}, "strip", zod.ZodTypeAny, {
|
|
33160
33239
|
name: string;
|
|
33161
33240
|
from: string;
|
|
33162
33241
|
to: string;
|
|
33163
33242
|
model?: string | undefined;
|
|
33164
33243
|
standard?: "usb_c" | undefined;
|
|
33244
|
+
waypoints?: {
|
|
33245
|
+
x: number;
|
|
33246
|
+
y: number;
|
|
33247
|
+
z: number;
|
|
33248
|
+
}[] | undefined;
|
|
33249
|
+
waypointAnchor?: "start" | "end" | undefined;
|
|
33250
|
+
waypointAxisOrientation?: "board_at_start" | "board_at_end" | undefined;
|
|
33165
33251
|
}, {
|
|
33166
33252
|
name: string;
|
|
33167
33253
|
from: string;
|
|
33168
33254
|
to: string;
|
|
33169
33255
|
model?: string | undefined;
|
|
33170
33256
|
standard?: "usb_c" | undefined;
|
|
33257
|
+
waypoints?: {
|
|
33258
|
+
x: number;
|
|
33259
|
+
y: number;
|
|
33260
|
+
z: number;
|
|
33261
|
+
}[] | undefined;
|
|
33262
|
+
waypointAnchor?: "start" | "end" | undefined;
|
|
33263
|
+
waypointAxisOrientation?: "board_at_start" | "board_at_end" | undefined;
|
|
33264
|
+
}>, {
|
|
33265
|
+
name: string;
|
|
33266
|
+
from: string;
|
|
33267
|
+
to: string;
|
|
33268
|
+
model?: string | undefined;
|
|
33269
|
+
standard?: "usb_c" | undefined;
|
|
33270
|
+
waypoints?: {
|
|
33271
|
+
x: number;
|
|
33272
|
+
y: number;
|
|
33273
|
+
z: number;
|
|
33274
|
+
}[] | undefined;
|
|
33275
|
+
waypointAnchor?: "start" | "end" | undefined;
|
|
33276
|
+
waypointAxisOrientation?: "board_at_start" | "board_at_end" | undefined;
|
|
33277
|
+
}, {
|
|
33278
|
+
name: string;
|
|
33279
|
+
from: string;
|
|
33280
|
+
to: string;
|
|
33281
|
+
model?: string | undefined;
|
|
33282
|
+
standard?: "usb_c" | undefined;
|
|
33283
|
+
waypoints?: {
|
|
33284
|
+
x: number;
|
|
33285
|
+
y: number;
|
|
33286
|
+
z: number;
|
|
33287
|
+
}[] | undefined;
|
|
33288
|
+
waypointAnchor?: "start" | "end" | undefined;
|
|
33289
|
+
waypointAxisOrientation?: "board_at_start" | "board_at_end" | undefined;
|
|
33171
33290
|
}>;
|
|
33172
33291
|
readonly device: zod.ZodEffects<zod.ZodObject<{
|
|
33173
33292
|
name: zod.ZodOptional<zod.ZodString>;
|
|
@@ -193152,6 +193271,23 @@ interface AutoroutingPhaseProps extends RoutingTolerances, FanoutProps {
|
|
|
193152
193271
|
connection?: string;
|
|
193153
193272
|
connections?: string[];
|
|
193154
193273
|
reroute?: boolean;
|
|
193274
|
+
/**
|
|
193275
|
+
* Select the test-point autorouter. Requires reroute=true; omitted/false leaves
|
|
193276
|
+
* existing routing unchanged. Optional connection(s) select traces, otherwise
|
|
193277
|
+
* all routed traces are selected. Conflicts with region, pcbTracePaths,
|
|
193278
|
+
* autorouter and algorithmFn. No alias for the unreleased pcbTestPoints object.
|
|
193279
|
+
*/
|
|
193280
|
+
addTestPoints?: boolean;
|
|
193281
|
+
/** Test-point layer; defaults to bottom when addTestPoints is enabled. */
|
|
193282
|
+
testPointLayer?: "top" | "bottom";
|
|
193283
|
+
/** Probe pad diameter, mm or unit string; defaults to 1 mm. Must be positive. */
|
|
193284
|
+
testPointDiameter?: Distance;
|
|
193285
|
+
/** Copper edge clearance, mm or unit string; defaults to 0.2 mm. */
|
|
193286
|
+
testPointClearance?: Distance;
|
|
193287
|
+
/** Minimum probe center spacing, mm or unit string; defaults to 2.54 mm. */
|
|
193288
|
+
testPointMinProbeSpacing?: Distance;
|
|
193289
|
+
/** Maximum local trace detour, mm or unit string; defaults to 1 mm. */
|
|
193290
|
+
testPointMaxDetour?: Distance;
|
|
193155
193291
|
}
|
|
193156
193292
|
declare const autoroutingPhaseProps: z.ZodEffects<z.ZodObject<{
|
|
193157
193293
|
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 +193353,12 @@ declare const autoroutingPhaseProps: z.ZodEffects<z.ZodObject<{
|
|
|
193217
193353
|
connection: z.ZodOptional<z.ZodString>;
|
|
193218
193354
|
connections: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
193219
193355
|
reroute: z.ZodOptional<z.ZodBoolean>;
|
|
193356
|
+
addTestPoints: z.ZodOptional<z.ZodBoolean>;
|
|
193357
|
+
testPointLayer: z.ZodOptional<z.ZodEnum<["top", "bottom"]>>;
|
|
193358
|
+
testPointDiameter: z.ZodOptional<z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>, z.ZodNumber>>;
|
|
193359
|
+
testPointClearance: z.ZodOptional<z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>, z.ZodNumber>>;
|
|
193360
|
+
testPointMinProbeSpacing: z.ZodOptional<z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>, z.ZodNumber>>;
|
|
193361
|
+
testPointMaxDetour: z.ZodOptional<z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>, z.ZodNumber>>;
|
|
193220
193362
|
minTraceWidth: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
193221
193363
|
minViaHoleEdgeToViaHoleEdgeClearance: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
193222
193364
|
minViaEdgeToPadEdgeClearance: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
@@ -193447,6 +193589,12 @@ declare const autoroutingPhaseProps: z.ZodEffects<z.ZodObject<{
|
|
|
193447
193589
|
shape?: "rect" | undefined;
|
|
193448
193590
|
} | undefined;
|
|
193449
193591
|
reroute?: boolean | undefined;
|
|
193592
|
+
addTestPoints?: boolean | undefined;
|
|
193593
|
+
testPointLayer?: "top" | "bottom" | undefined;
|
|
193594
|
+
testPointDiameter?: number | undefined;
|
|
193595
|
+
testPointClearance?: number | undefined;
|
|
193596
|
+
testPointMinProbeSpacing?: number | undefined;
|
|
193597
|
+
testPointMaxDetour?: number | undefined;
|
|
193450
193598
|
}, {
|
|
193451
193599
|
name?: string | undefined;
|
|
193452
193600
|
key?: any;
|
|
@@ -193514,6 +193662,12 @@ declare const autoroutingPhaseProps: z.ZodEffects<z.ZodObject<{
|
|
|
193514
193662
|
shape?: "rect" | undefined;
|
|
193515
193663
|
} | undefined;
|
|
193516
193664
|
reroute?: boolean | undefined;
|
|
193665
|
+
addTestPoints?: boolean | undefined;
|
|
193666
|
+
testPointLayer?: "top" | "bottom" | undefined;
|
|
193667
|
+
testPointDiameter?: string | number | undefined;
|
|
193668
|
+
testPointClearance?: string | number | undefined;
|
|
193669
|
+
testPointMinProbeSpacing?: string | number | undefined;
|
|
193670
|
+
testPointMaxDetour?: string | number | undefined;
|
|
193517
193671
|
}>, {
|
|
193518
193672
|
name?: string | undefined;
|
|
193519
193673
|
key?: any;
|
|
@@ -193571,6 +193725,12 @@ declare const autoroutingPhaseProps: z.ZodEffects<z.ZodObject<{
|
|
|
193571
193725
|
shape?: "rect" | undefined;
|
|
193572
193726
|
} | undefined;
|
|
193573
193727
|
reroute?: boolean | undefined;
|
|
193728
|
+
addTestPoints?: boolean | undefined;
|
|
193729
|
+
testPointLayer?: "top" | "bottom" | undefined;
|
|
193730
|
+
testPointDiameter?: number | undefined;
|
|
193731
|
+
testPointClearance?: number | undefined;
|
|
193732
|
+
testPointMinProbeSpacing?: number | undefined;
|
|
193733
|
+
testPointMaxDetour?: number | undefined;
|
|
193574
193734
|
}, {
|
|
193575
193735
|
name?: string | undefined;
|
|
193576
193736
|
key?: any;
|
|
@@ -193638,6 +193798,12 @@ declare const autoroutingPhaseProps: z.ZodEffects<z.ZodObject<{
|
|
|
193638
193798
|
shape?: "rect" | undefined;
|
|
193639
193799
|
} | undefined;
|
|
193640
193800
|
reroute?: boolean | undefined;
|
|
193801
|
+
addTestPoints?: boolean | undefined;
|
|
193802
|
+
testPointLayer?: "top" | "bottom" | undefined;
|
|
193803
|
+
testPointDiameter?: string | number | undefined;
|
|
193804
|
+
testPointClearance?: string | number | undefined;
|
|
193805
|
+
testPointMinProbeSpacing?: string | number | undefined;
|
|
193806
|
+
testPointMaxDetour?: string | number | undefined;
|
|
193641
193807
|
}>;
|
|
193642
193808
|
|
|
193643
193809
|
declare const transistorPinsLabels: readonly ["pin1", "pin2", "pin3", "emitter", "collector", "base", "gate", "source", "drain"];
|
package/dist/index.js
CHANGED
|
@@ -355,7 +355,32 @@ var assemblyCableProps = z13.object({
|
|
|
355
355
|
from: z13.string().trim().min(1),
|
|
356
356
|
to: z13.string().trim().min(1),
|
|
357
357
|
standard: z13.literal("usb_c").optional(),
|
|
358
|
-
model: z13.string().trim().min(1).optional()
|
|
358
|
+
model: z13.string().trim().min(1).optional(),
|
|
359
|
+
waypoints: z13.array(
|
|
360
|
+
z13.object({
|
|
361
|
+
x: z13.number().finite(),
|
|
362
|
+
y: z13.number().finite(),
|
|
363
|
+
z: z13.number().finite()
|
|
364
|
+
})
|
|
365
|
+
).optional(),
|
|
366
|
+
waypointAnchor: z13.enum(["start", "end"]).optional(),
|
|
367
|
+
waypointAxisOrientation: z13.enum(["board_at_start", "board_at_end"]).optional()
|
|
368
|
+
}).superRefine((cable, context) => {
|
|
369
|
+
if (cable.waypoints === void 0) return;
|
|
370
|
+
if (cable.waypointAnchor === void 0) {
|
|
371
|
+
context.addIssue({
|
|
372
|
+
code: z13.ZodIssueCode.custom,
|
|
373
|
+
path: ["waypointAnchor"],
|
|
374
|
+
message: "waypointAnchor is required when waypoints is defined"
|
|
375
|
+
});
|
|
376
|
+
}
|
|
377
|
+
if (cable.waypointAxisOrientation === void 0) {
|
|
378
|
+
context.addIssue({
|
|
379
|
+
code: z13.ZodIssueCode.custom,
|
|
380
|
+
path: ["waypointAxisOrientation"],
|
|
381
|
+
message: "waypointAxisOrientation is required when waypoints is defined"
|
|
382
|
+
});
|
|
383
|
+
}
|
|
359
384
|
});
|
|
360
385
|
expectTypesMatch(true);
|
|
361
386
|
|
|
@@ -19377,15 +19402,43 @@ var autoroutingPhaseProps = z120.object({
|
|
|
19377
19402
|
connection: z120.string().optional(),
|
|
19378
19403
|
connections: z120.array(z120.string()).optional(),
|
|
19379
19404
|
reroute: z120.boolean().optional(),
|
|
19405
|
+
addTestPoints: z120.boolean().optional(),
|
|
19406
|
+
testPointLayer: z120.enum(["top", "bottom"]).optional(),
|
|
19407
|
+
testPointDiameter: distance.pipe(z120.number().finite().positive()).optional(),
|
|
19408
|
+
testPointClearance: distance.pipe(z120.number().finite().nonnegative()).optional(),
|
|
19409
|
+
testPointMinProbeSpacing: distance.pipe(z120.number().finite().nonnegative()).optional(),
|
|
19410
|
+
testPointMaxDetour: distance.pipe(z120.number().finite().nonnegative()).optional(),
|
|
19380
19411
|
...fanoutProps.shape
|
|
19381
19412
|
}).superRefine((value, ctx) => {
|
|
19413
|
+
if (value.addTestPoints && (value.reroute !== true || value.region || value.pcbTracePaths || value.autorouter || value.algorithmFn)) {
|
|
19414
|
+
ctx.addIssue({
|
|
19415
|
+
code: z120.ZodIssueCode.custom,
|
|
19416
|
+
path: ["addTestPoints"],
|
|
19417
|
+
message: "addTestPoints requires reroute=true and cannot combine with region, pcbTracePaths, autorouter, or algorithmFn"
|
|
19418
|
+
});
|
|
19419
|
+
}
|
|
19420
|
+
for (const option of [
|
|
19421
|
+
"testPointLayer",
|
|
19422
|
+
"testPointDiameter",
|
|
19423
|
+
"testPointClearance",
|
|
19424
|
+
"testPointMinProbeSpacing",
|
|
19425
|
+
"testPointMaxDetour"
|
|
19426
|
+
]) {
|
|
19427
|
+
if (value[option] !== void 0 && !value.addTestPoints) {
|
|
19428
|
+
ctx.addIssue({
|
|
19429
|
+
code: z120.ZodIssueCode.custom,
|
|
19430
|
+
path: [option],
|
|
19431
|
+
message: `${option} requires addTestPoints=true`
|
|
19432
|
+
});
|
|
19433
|
+
}
|
|
19434
|
+
}
|
|
19382
19435
|
const isSimplifyAutorouter = value.autorouter === "simplify" || typeof value.autorouter === "object" && value.autorouter?.preset === "simplify";
|
|
19383
19436
|
if (isSimplifyAutorouter && value.reroute !== true) {
|
|
19384
19437
|
console.warn(
|
|
19385
19438
|
'The "simplify" autorouter preset should only be used with reroute=true'
|
|
19386
19439
|
);
|
|
19387
19440
|
}
|
|
19388
|
-
if (value.reroute !== void 0 && !(isSimplifyAutorouter && value.reroute === true) && value.region === void 0 && value.connection === void 0 && value.connections === void 0) {
|
|
19441
|
+
if (value.reroute !== void 0 && !((isSimplifyAutorouter || value.addTestPoints) && value.reroute === true) && value.region === void 0 && value.connection === void 0 && value.connections === void 0) {
|
|
19389
19442
|
ctx.addIssue({
|
|
19390
19443
|
code: z120.ZodIssueCode.custom,
|
|
19391
19444
|
message: "region, connection, or connections is required when reroute is provided",
|