@tscircuit/props 0.0.535 → 0.0.537
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 +2 -0
- package/dist/index.d.ts +13 -1
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/lib/components/autoroutingphase.ts +12 -2
- package/lib/generated/jlcpcb-autocomplete.ts +2 -3
- package/package.json +1 -1
|
@@ -18,6 +18,8 @@ export interface AutoroutingPhaseProps extends RoutingTolerances {
|
|
|
18
18
|
minY: number
|
|
19
19
|
maxY: number
|
|
20
20
|
}
|
|
21
|
+
connection?: string
|
|
22
|
+
connections?: string[]
|
|
21
23
|
reroute?: boolean
|
|
22
24
|
}
|
|
23
25
|
|
|
@@ -36,13 +38,21 @@ export const autoroutingPhaseProps = z
|
|
|
36
38
|
maxY: z.number(),
|
|
37
39
|
})
|
|
38
40
|
.optional(),
|
|
41
|
+
connection: z.string().optional(),
|
|
42
|
+
connections: z.array(z.string()).optional(),
|
|
39
43
|
reroute: z.boolean().optional(),
|
|
40
44
|
})
|
|
41
45
|
.superRefine((value, ctx) => {
|
|
42
|
-
if (
|
|
46
|
+
if (
|
|
47
|
+
value.reroute !== undefined &&
|
|
48
|
+
value.region === undefined &&
|
|
49
|
+
value.connection === undefined &&
|
|
50
|
+
value.connections === undefined
|
|
51
|
+
) {
|
|
43
52
|
ctx.addIssue({
|
|
44
53
|
code: z.ZodIssueCode.custom,
|
|
45
|
-
message:
|
|
54
|
+
message:
|
|
55
|
+
"region, connection, or connections is required when reroute is provided",
|
|
46
56
|
path: ["region"],
|
|
47
57
|
})
|
|
48
58
|
}
|
|
@@ -2488,6 +2488,5 @@ export type JlcpcbKnownPartNumber =
|
|
|
2488
2488
|
| "C783588"
|
|
2489
2489
|
| "C3265019"
|
|
2490
2490
|
|
|
2491
|
-
export type JlcpcbAutocompleteStringPath =
|
|
2492
|
-
|
|
2493
|
-
>
|
|
2491
|
+
export type JlcpcbAutocompleteStringPath =
|
|
2492
|
+
AutocompleteString<`jlcpcb:${JlcpcbKnownPartNumber}`>
|