@tscircuit/props 0.0.544 → 0.0.545
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 +162 -2
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -1
- package/lib/components/hole.ts +24 -1
- package/package.json +1 -1
package/lib/components/hole.ts
CHANGED
|
@@ -21,6 +21,15 @@ export interface PillHoleProps extends PcbLayoutProps {
|
|
|
21
21
|
coveredWithSolderMask?: boolean
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
+
export interface OvalHoleProps extends PcbLayoutProps {
|
|
25
|
+
name?: string
|
|
26
|
+
shape: "oval"
|
|
27
|
+
width: Distance
|
|
28
|
+
height: Distance
|
|
29
|
+
solderMaskMargin?: Distance
|
|
30
|
+
coveredWithSolderMask?: boolean
|
|
31
|
+
}
|
|
32
|
+
|
|
24
33
|
export interface RectHoleProps extends PcbLayoutProps {
|
|
25
34
|
name?: string
|
|
26
35
|
shape: "rect"
|
|
@@ -30,7 +39,11 @@ export interface RectHoleProps extends PcbLayoutProps {
|
|
|
30
39
|
coveredWithSolderMask?: boolean
|
|
31
40
|
}
|
|
32
41
|
|
|
33
|
-
export type HoleProps =
|
|
42
|
+
export type HoleProps =
|
|
43
|
+
| CircleHoleProps
|
|
44
|
+
| PillHoleProps
|
|
45
|
+
| OvalHoleProps
|
|
46
|
+
| RectHoleProps
|
|
34
47
|
|
|
35
48
|
const circleHoleProps = pcbLayoutProps
|
|
36
49
|
.extend({
|
|
@@ -56,6 +69,15 @@ const pillHoleProps = pcbLayoutProps.extend({
|
|
|
56
69
|
coveredWithSolderMask: z.boolean().optional(),
|
|
57
70
|
})
|
|
58
71
|
|
|
72
|
+
const ovalHoleProps = pcbLayoutProps.extend({
|
|
73
|
+
name: z.string().optional(),
|
|
74
|
+
shape: z.literal("oval"),
|
|
75
|
+
width: distance,
|
|
76
|
+
height: distance,
|
|
77
|
+
solderMaskMargin: distance.optional(),
|
|
78
|
+
coveredWithSolderMask: z.boolean().optional(),
|
|
79
|
+
})
|
|
80
|
+
|
|
59
81
|
const rectHoleProps = pcbLayoutProps.extend({
|
|
60
82
|
name: z.string().optional(),
|
|
61
83
|
shape: z.literal("rect"),
|
|
@@ -68,6 +90,7 @@ const rectHoleProps = pcbLayoutProps.extend({
|
|
|
68
90
|
export const holeProps = z.union([
|
|
69
91
|
circleHoleProps,
|
|
70
92
|
pillHoleProps,
|
|
93
|
+
ovalHoleProps,
|
|
71
94
|
rectHoleProps,
|
|
72
95
|
])
|
|
73
96
|
|