@tscircuit/props 0.0.367 → 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.
@@ -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/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"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tscircuit/props",
3
- "version": "0.0.367",
3
+ "version": "0.0.368",
4
4
  "description": "Props for tscircuit builtin component types",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",