@tscircuit/props 0.0.396 → 0.0.397

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.
@@ -17,7 +17,14 @@ export interface PillHoleProps extends PcbLayoutProps {
17
17
  height: Distance
18
18
  }
19
19
 
20
- export type HoleProps = CircleHoleProps | PillHoleProps
20
+ export interface RectHoleProps extends PcbLayoutProps {
21
+ name?: string
22
+ shape: "rect"
23
+ width: Distance
24
+ height: Distance
25
+ }
26
+
27
+ export type HoleProps = CircleHoleProps | PillHoleProps | RectHoleProps
21
28
 
22
29
  const circleHoleProps = pcbLayoutProps
23
30
  .extend({
@@ -39,7 +46,18 @@ const pillHoleProps = pcbLayoutProps.extend({
39
46
  height: distance,
40
47
  })
41
48
 
42
- export const holeProps = z.union([circleHoleProps, pillHoleProps])
49
+ const rectHoleProps = pcbLayoutProps.extend({
50
+ name: z.string().optional(),
51
+ shape: z.literal("rect"),
52
+ width: distance,
53
+ height: distance,
54
+ })
55
+
56
+ export const holeProps = z.union([
57
+ circleHoleProps,
58
+ pillHoleProps,
59
+ rectHoleProps,
60
+ ])
43
61
 
44
62
  export type InferredHoleProps = z.input<typeof holeProps>
45
63
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tscircuit/props",
3
- "version": "0.0.396",
3
+ "version": "0.0.397",
4
4
  "description": "Props for tscircuit builtin component types",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",