@tscircuit/props 0.0.134 → 0.0.136

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.
@@ -30,10 +30,19 @@ export interface CircleSmtPadProps extends Omit<PcbLayoutProps, "pcbRotation"> {
30
30
  portHints?: PortHints
31
31
  }
32
32
 
33
+ export interface PillSmtPadProps extends Omit<PcbLayoutProps, "pcbRotation"> {
34
+ shape: "pill"
35
+ width: Distance
36
+ height: Distance
37
+ radius: Distance
38
+ portHints?: PortHints
39
+ }
40
+
33
41
  export type SmtPadProps =
34
42
  | RectSmtPadProps
35
43
  | CircleSmtPadProps
36
44
  | RotatedRectSmtPadProps
45
+ | PillSmtPadProps
37
46
 
38
47
  // ----------------------------------------------------------------------------
39
48
  // Zod
@@ -72,10 +81,23 @@ export const circleSmtPadProps = pcbLayoutProps
72
81
  type InferredCircleSmtPadProps = z.input<typeof circleSmtPadProps>
73
82
  expectTypesMatch<InferredCircleSmtPadProps, CircleSmtPadProps>(true)
74
83
 
84
+ export const pillSmtPadProps = pcbLayoutProps
85
+ .omit({ pcbRotation: true })
86
+ .extend({
87
+ shape: z.literal("pill"),
88
+ width: distance,
89
+ height: distance,
90
+ radius: distance,
91
+ portHints: portHints.optional(),
92
+ })
93
+ type InferredPillSmtPadProps = z.input<typeof pillSmtPadProps>
94
+ expectTypesMatch<InferredPillSmtPadProps, PillSmtPadProps>(true)
95
+
75
96
  export const smtPadProps = z.union([
76
97
  circleSmtPadProps,
77
98
  rectSmtPadProps,
78
99
  rotatedRectSmtPadProps,
100
+ pillSmtPadProps,
79
101
  ])
80
102
 
81
103
  export type InferredSmtPadProps = z.input<typeof smtPadProps>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tscircuit/props",
3
- "version": "0.0.134",
3
+ "version": "0.0.136",
4
4
  "description": "Props for tscircuit builtin component types",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",