@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.
- package/dist/index.d.ts +523 -18
- package/dist/index.js +21 -5
- package/dist/index.js.map +1 -1
- package/lib/common/schematicPinDefinitions.ts +11 -0
- package/lib/components/chip.ts +9 -6
- package/lib/components/push-button.ts +15 -3
- package/lib/components/smtpad.ts +22 -0
- package/package.json +1 -1
package/lib/components/smtpad.ts
CHANGED
|
@@ -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>
|