@tscircuit/props 0.0.366 → 0.0.368
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/README.md +17 -0
- package/dist/index.d.ts +977 -1
- package/dist/index.js +475 -458
- package/dist/index.js.map +1 -1
- package/lib/components/panel.ts +30 -0
- package/lib/components/smtpad.ts +4 -0
- package/lib/index.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { distance, type Distance } from "lib/common/distance"
|
|
2
|
+
import { expectTypesMatch } from "lib/typecheck"
|
|
3
|
+
import { z } from "zod"
|
|
4
|
+
import { baseGroupProps, type BaseGroupProps } from "./group"
|
|
5
|
+
|
|
6
|
+
export interface PanelProps extends BaseGroupProps {
|
|
7
|
+
width: Distance
|
|
8
|
+
height: Distance
|
|
9
|
+
children?: BaseGroupProps["children"]
|
|
10
|
+
/**
|
|
11
|
+
* If true, prevent a solder mask from being applied to this panel.
|
|
12
|
+
*/
|
|
13
|
+
noSolderMask?: boolean
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export const panelProps = baseGroupProps
|
|
17
|
+
.omit({
|
|
18
|
+
width: true,
|
|
19
|
+
height: true,
|
|
20
|
+
children: true,
|
|
21
|
+
})
|
|
22
|
+
.extend({
|
|
23
|
+
width: distance,
|
|
24
|
+
height: distance,
|
|
25
|
+
children: z.any().optional(),
|
|
26
|
+
noSolderMask: z.boolean().optional(),
|
|
27
|
+
})
|
|
28
|
+
|
|
29
|
+
type InferredPanelProps = z.input<typeof panelProps>
|
|
30
|
+
expectTypesMatch<PanelProps, InferredPanelProps>(true)
|
package/lib/components/smtpad.ts
CHANGED
|
@@ -15,6 +15,7 @@ export interface RectSmtPadProps extends Omit<PcbLayoutProps, "pcbRotation"> {
|
|
|
15
15
|
width: Distance
|
|
16
16
|
height: Distance
|
|
17
17
|
rectBorderRadius?: Distance
|
|
18
|
+
cornerRadius?: Distance
|
|
18
19
|
portHints?: PortHints
|
|
19
20
|
coveredWithSolderMask?: boolean
|
|
20
21
|
}
|
|
@@ -25,6 +26,7 @@ export interface RotatedRectSmtPadProps
|
|
|
25
26
|
shape: "rotated_rect"
|
|
26
27
|
width: Distance
|
|
27
28
|
height: Distance
|
|
29
|
+
cornerRadius?: Distance
|
|
28
30
|
ccwRotation: number
|
|
29
31
|
portHints?: PortHints
|
|
30
32
|
coveredWithSolderMask?: boolean
|
|
@@ -76,6 +78,7 @@ export const rectSmtPadProps = pcbLayoutProps
|
|
|
76
78
|
width: distance,
|
|
77
79
|
height: distance,
|
|
78
80
|
rectBorderRadius: distance.optional(),
|
|
81
|
+
cornerRadius: distance.optional(),
|
|
79
82
|
portHints: portHints.optional(),
|
|
80
83
|
coveredWithSolderMask: z.boolean().optional(),
|
|
81
84
|
})
|
|
@@ -90,6 +93,7 @@ export const rotatedRectSmtPadProps = pcbLayoutProps
|
|
|
90
93
|
width: distance,
|
|
91
94
|
height: distance,
|
|
92
95
|
ccwRotation: z.number(),
|
|
96
|
+
cornerRadius: distance.optional(),
|
|
93
97
|
portHints: portHints.optional(),
|
|
94
98
|
coveredWithSolderMask: z.boolean().optional(),
|
|
95
99
|
})
|
package/lib/index.ts
CHANGED
|
@@ -14,6 +14,7 @@ export * from "./common/cadModel"
|
|
|
14
14
|
export * from "./common/schematicPinLabel"
|
|
15
15
|
|
|
16
16
|
export * from "./components/board"
|
|
17
|
+
export * from "./components/panel"
|
|
17
18
|
export * from "./components/breakout"
|
|
18
19
|
export * from "./components/chip"
|
|
19
20
|
export * from "./components/pinout"
|