@tscircuit/props 0.0.535 → 0.0.536

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.
@@ -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 (value.reroute !== undefined && value.region === undefined) {
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: "region is required when reroute is provided",
54
+ message:
55
+ "region, connection, or connections is required when reroute is provided",
46
56
  path: ["region"],
47
57
  })
48
58
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tscircuit/props",
3
- "version": "0.0.535",
3
+ "version": "0.0.536",
4
4
  "description": "Props for tscircuit builtin component types",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",