@tscircuit/props 0.0.152 → 0.0.153
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/lib/components/stampboard.ts +33 -0
- package/package.json +1 -1
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { distance } from "circuit-json"
|
|
2
|
+
import { z } from "zod"
|
|
3
|
+
import { expectTypesMatch } from "lib/typecheck"
|
|
4
|
+
import { boardProps, type BoardProps } from "lib/components/board"
|
|
5
|
+
|
|
6
|
+
export interface StampboardProps extends BoardProps {
|
|
7
|
+
leftPinCount?: number
|
|
8
|
+
rightPinCount?: number
|
|
9
|
+
topPinCount?: number
|
|
10
|
+
bottomPinCount?: number
|
|
11
|
+
leftPins?: string[]
|
|
12
|
+
rightPins?: string[]
|
|
13
|
+
topPins?: string[]
|
|
14
|
+
bottomPins?: string[]
|
|
15
|
+
pinPitch?: number | string
|
|
16
|
+
innerHoles?: boolean
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export const stampboardProps = boardProps.extend({
|
|
20
|
+
leftPinCount: z.number().optional(),
|
|
21
|
+
rightPinCount: z.number().optional(),
|
|
22
|
+
topPinCount: z.number().optional(),
|
|
23
|
+
bottomPinCount: z.number().optional(),
|
|
24
|
+
leftPins: z.array(z.string()).optional(),
|
|
25
|
+
rightPins: z.array(z.string()).optional(),
|
|
26
|
+
topPins: z.array(z.string()).optional(),
|
|
27
|
+
bottomPins: z.array(z.string()).optional(),
|
|
28
|
+
pinPitch: distance.optional(),
|
|
29
|
+
innerHoles: z.boolean().optional(),
|
|
30
|
+
})
|
|
31
|
+
|
|
32
|
+
type InferredStampboardProps = z.input<typeof stampboardProps>
|
|
33
|
+
expectTypesMatch<StampboardProps, InferredStampboardProps>(true)
|