@tscircuit/props 0.0.406 → 0.0.407

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.
@@ -8,6 +8,7 @@ export interface CircleHoleProps extends PcbLayoutProps {
8
8
  shape?: "circle"
9
9
  diameter?: Distance
10
10
  radius?: Distance
11
+ solderMaskMargin?: Distance
11
12
  }
12
13
 
13
14
  export interface PillHoleProps extends PcbLayoutProps {
@@ -15,6 +16,7 @@ export interface PillHoleProps extends PcbLayoutProps {
15
16
  shape: "pill"
16
17
  width: Distance
17
18
  height: Distance
19
+ solderMaskMargin?: Distance
18
20
  }
19
21
 
20
22
  export interface RectHoleProps extends PcbLayoutProps {
@@ -22,6 +24,7 @@ export interface RectHoleProps extends PcbLayoutProps {
22
24
  shape: "rect"
23
25
  width: Distance
24
26
  height: Distance
27
+ solderMaskMargin?: Distance
25
28
  }
26
29
 
27
30
  export type HoleProps = CircleHoleProps | PillHoleProps | RectHoleProps
@@ -32,6 +35,7 @@ const circleHoleProps = pcbLayoutProps
32
35
  shape: z.literal("circle").optional(),
33
36
  diameter: distance.optional(),
34
37
  radius: distance.optional(),
38
+ solderMaskMargin: distance.optional(),
35
39
  })
36
40
  .transform((d) => ({
37
41
  ...d,
@@ -44,6 +48,7 @@ const pillHoleProps = pcbLayoutProps.extend({
44
48
  shape: z.literal("pill"),
45
49
  width: distance,
46
50
  height: distance,
51
+ solderMaskMargin: distance.optional(),
47
52
  })
48
53
 
49
54
  const rectHoleProps = pcbLayoutProps.extend({
@@ -51,6 +56,7 @@ const rectHoleProps = pcbLayoutProps.extend({
51
56
  shape: z.literal("rect"),
52
57
  width: distance,
53
58
  height: distance,
59
+ solderMaskMargin: distance.optional(),
54
60
  })
55
61
 
56
62
  export const holeProps = z.union([
@@ -5,6 +5,7 @@ import { type PortHints, portHints } from "lib/common/portHints"
5
5
  import { point, type Point } from "lib/common/point"
6
6
  import { expectTypesMatch } from "lib/typecheck"
7
7
  import { z } from "zod"
8
+ import type { Distance } from "lib/common/distance"
8
9
 
9
10
  export interface CirclePlatedHoleProps
10
11
  extends Omit<PcbLayoutProps, "pcbRotation" | "layer"> {
@@ -14,6 +15,7 @@ export interface CirclePlatedHoleProps
14
15
  holeDiameter: number | string
15
16
  outerDiameter: number | string
16
17
  portHints?: PortHints
18
+ solderMaskMargin?: Distance
17
19
  }
18
20
 
19
21
  export interface OvalPlatedHoleProps extends Omit<PcbLayoutProps, "layer"> {
@@ -25,6 +27,7 @@ export interface OvalPlatedHoleProps extends Omit<PcbLayoutProps, "layer"> {
25
27
  holeWidth: number | string
26
28
  holeHeight: number | string
27
29
  portHints?: PortHints
30
+ solderMaskMargin?: Distance
28
31
 
29
32
  /** @deprecated use holeWidth */
30
33
  innerWidth?: number | string
@@ -50,6 +53,7 @@ export interface PillPlatedHoleProps extends Omit<PcbLayoutProps, "layer"> {
50
53
  innerHeight?: number | string
51
54
 
52
55
  portHints?: PortHints
56
+ solderMaskMargin?: Distance
53
57
  }
54
58
 
55
59
  export interface CircularHoleWithRectPlatedProps
@@ -66,6 +70,7 @@ export interface CircularHoleWithRectPlatedProps
66
70
  portHints?: PortHints
67
71
  holeOffsetX?: number | string
68
72
  holeOffsetY?: number | string
73
+ solderMaskMargin?: Distance
69
74
  }
70
75
 
71
76
  export interface PillWithRectPadPlatedHoleProps
@@ -82,6 +87,7 @@ export interface PillWithRectPadPlatedHoleProps
82
87
  portHints?: PortHints
83
88
  holeOffsetX?: number | string
84
89
  holeOffsetY?: number | string
90
+ solderMaskMargin?: Distance
85
91
  }
86
92
 
87
93
  export interface HoleWithPolygonPadPlatedHoleProps
@@ -97,6 +103,7 @@ export interface HoleWithPolygonPadPlatedHoleProps
97
103
  holeOffsetX: number | string
98
104
  holeOffsetY: number | string
99
105
  portHints?: PortHints
106
+ solderMaskMargin?: Distance
100
107
  }
101
108
 
102
109
  export type PlatedHoleProps =
@@ -123,6 +130,7 @@ export const platedHoleProps = z
123
130
  holeDiameter: distance,
124
131
  outerDiameter: distance,
125
132
  portHints: portHints.optional(),
133
+ solderMaskMargin: distance.optional(),
126
134
  }),
127
135
  pcbLayoutProps.omit({ layer: true }).extend({
128
136
  name: z.string().optional(),
@@ -135,6 +143,7 @@ export const platedHoleProps = z
135
143
  innerWidth: distance.optional().describe("DEPRECATED use holeWidth"),
136
144
  innerHeight: distance.optional().describe("DEPRECATED use holeHeight"),
137
145
  portHints: portHints.optional(),
146
+ solderMaskMargin: distance.optional(),
138
147
  }),
139
148
  pcbLayoutProps.omit({ layer: true }).extend({
140
149
  name: z.string().optional(),
@@ -150,6 +159,7 @@ export const platedHoleProps = z
150
159
  portHints: portHints.optional(),
151
160
  holeOffsetX: distance.optional(),
152
161
  holeOffsetY: distance.optional(),
162
+ solderMaskMargin: distance.optional(),
153
163
  }),
154
164
  pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({
155
165
  name: z.string().optional(),
@@ -164,6 +174,7 @@ export const platedHoleProps = z
164
174
  portHints: portHints.optional(),
165
175
  holeOffsetX: distance.optional(),
166
176
  holeOffsetY: distance.optional(),
177
+ solderMaskMargin: distance.optional(),
167
178
  }),
168
179
  pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({
169
180
  name: z.string().optional(),
@@ -178,6 +189,7 @@ export const platedHoleProps = z
178
189
  portHints: portHints.optional(),
179
190
  holeOffsetX: distance.optional(),
180
191
  holeOffsetY: distance.optional(),
192
+ solderMaskMargin: distance.optional(),
181
193
  }),
182
194
  pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({
183
195
  name: z.string().optional(),
@@ -191,6 +203,7 @@ export const platedHoleProps = z
191
203
  holeOffsetX: distance,
192
204
  holeOffsetY: distance,
193
205
  portHints: portHints.optional(),
206
+ solderMaskMargin: distance.optional(),
194
207
  }),
195
208
  ])
196
209
  .refine((a) => {
@@ -18,6 +18,7 @@ export interface RectSmtPadProps extends Omit<PcbLayoutProps, "pcbRotation"> {
18
18
  cornerRadius?: Distance
19
19
  portHints?: PortHints
20
20
  coveredWithSolderMask?: boolean
21
+ solderMaskMargin?: Distance
21
22
  }
22
23
 
23
24
  export interface RotatedRectSmtPadProps
@@ -30,6 +31,7 @@ export interface RotatedRectSmtPadProps
30
31
  ccwRotation: number
31
32
  portHints?: PortHints
32
33
  coveredWithSolderMask?: boolean
34
+ solderMaskMargin?: Distance
33
35
  }
34
36
 
35
37
  export interface CircleSmtPadProps extends Omit<PcbLayoutProps, "pcbRotation"> {
@@ -38,6 +40,7 @@ export interface CircleSmtPadProps extends Omit<PcbLayoutProps, "pcbRotation"> {
38
40
  radius: Distance
39
41
  portHints?: PortHints
40
42
  coveredWithSolderMask?: boolean
43
+ solderMaskMargin?: Distance
41
44
  }
42
45
 
43
46
  export interface PillSmtPadProps extends Omit<PcbLayoutProps, "pcbRotation"> {
@@ -48,6 +51,7 @@ export interface PillSmtPadProps extends Omit<PcbLayoutProps, "pcbRotation"> {
48
51
  radius: Distance
49
52
  portHints?: PortHints
50
53
  coveredWithSolderMask?: boolean
54
+ solderMaskMargin?: Distance
51
55
  }
52
56
 
53
57
  export interface PolygonSmtPadProps
@@ -57,6 +61,7 @@ export interface PolygonSmtPadProps
57
61
  points: Point[]
58
62
  portHints?: PortHints
59
63
  coveredWithSolderMask?: boolean
64
+ solderMaskMargin?: Distance
60
65
  }
61
66
 
62
67
  export type SmtPadProps =
@@ -81,6 +86,7 @@ export const rectSmtPadProps = pcbLayoutProps
81
86
  cornerRadius: distance.optional(),
82
87
  portHints: portHints.optional(),
83
88
  coveredWithSolderMask: z.boolean().optional(),
89
+ solderMaskMargin: distance.optional(),
84
90
  })
85
91
  type InferredRectSmtPadProps = z.input<typeof rectSmtPadProps>
86
92
  expectTypesMatch<InferredRectSmtPadProps, RectSmtPadProps>(true)
@@ -96,6 +102,7 @@ export const rotatedRectSmtPadProps = pcbLayoutProps
96
102
  cornerRadius: distance.optional(),
97
103
  portHints: portHints.optional(),
98
104
  coveredWithSolderMask: z.boolean().optional(),
105
+ solderMaskMargin: distance.optional(),
99
106
  })
100
107
  type InferredRotatedRectSmtPadProps = z.input<typeof rotatedRectSmtPadProps>
101
108
  expectTypesMatch<InferredRotatedRectSmtPadProps, RotatedRectSmtPadProps>(true)
@@ -108,6 +115,7 @@ export const circleSmtPadProps = pcbLayoutProps
108
115
  radius: distance,
109
116
  portHints: portHints.optional(),
110
117
  coveredWithSolderMask: z.boolean().optional(),
118
+ solderMaskMargin: distance.optional(),
111
119
  })
112
120
  type InferredCircleSmtPadProps = z.input<typeof circleSmtPadProps>
113
121
  expectTypesMatch<InferredCircleSmtPadProps, CircleSmtPadProps>(true)
@@ -122,6 +130,7 @@ export const pillSmtPadProps = pcbLayoutProps
122
130
  radius: distance,
123
131
  portHints: portHints.optional(),
124
132
  coveredWithSolderMask: z.boolean().optional(),
133
+ solderMaskMargin: distance.optional(),
125
134
  })
126
135
  type InferredPillSmtPadProps = z.input<typeof pillSmtPadProps>
127
136
  expectTypesMatch<InferredPillSmtPadProps, PillSmtPadProps>(true)
@@ -134,6 +143,7 @@ export const polygonSmtPadProps = pcbLayoutProps
134
143
  points: z.array(point),
135
144
  portHints: portHints.optional(),
136
145
  coveredWithSolderMask: z.boolean().optional(),
146
+ solderMaskMargin: distance.optional(),
137
147
  })
138
148
  type InferredPolygonSmtPadProps = z.input<typeof polygonSmtPadProps>
139
149
  expectTypesMatch<InferredPolygonSmtPadProps, PolygonSmtPadProps>(true)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tscircuit/props",
3
- "version": "0.0.406",
3
+ "version": "0.0.407",
4
4
  "description": "Props for tscircuit builtin component types",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",