@tscircuit/props 0.0.221 → 0.0.223
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 +2 -0
- package/dist/index.d.ts +445 -11
- package/dist/index.js +9 -1
- package/dist/index.js.map +1 -1
- package/lib/components/group.ts +16 -0
- package/package.json +1 -1
package/lib/components/group.ts
CHANGED
|
@@ -71,6 +71,18 @@ export interface LayoutConfig {
|
|
|
71
71
|
|
|
72
72
|
expectTypesMatch<LayoutConfig, z.input<typeof layoutConfig>>(true)
|
|
73
73
|
|
|
74
|
+
export interface Border {
|
|
75
|
+
strokeWidth?: Distance
|
|
76
|
+
dashed?: boolean
|
|
77
|
+
solid?: boolean
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export const border = z.object({
|
|
81
|
+
strokeWidth: length.optional(),
|
|
82
|
+
dashed: z.boolean().optional(),
|
|
83
|
+
solid: z.boolean().optional(),
|
|
84
|
+
})
|
|
85
|
+
|
|
74
86
|
export interface BaseGroupProps extends CommonLayoutProps, LayoutConfig {
|
|
75
87
|
name?: string
|
|
76
88
|
key?: any
|
|
@@ -83,6 +95,8 @@ export interface BaseGroupProps extends CommonLayoutProps, LayoutConfig {
|
|
|
83
95
|
|
|
84
96
|
pcbLayout?: LayoutConfig
|
|
85
97
|
schLayout?: LayoutConfig
|
|
98
|
+
cellBorder?: Border
|
|
99
|
+
border?: Border
|
|
86
100
|
}
|
|
87
101
|
|
|
88
102
|
export type PartsEngine = {
|
|
@@ -187,6 +201,8 @@ export const baseGroupProps = commonLayoutProps.extend({
|
|
|
187
201
|
schHeight: length.optional(),
|
|
188
202
|
pcbLayout: layoutConfig.optional(),
|
|
189
203
|
schLayout: layoutConfig.optional(),
|
|
204
|
+
cellBorder: border.optional(),
|
|
205
|
+
border: border.optional(),
|
|
190
206
|
})
|
|
191
207
|
|
|
192
208
|
export const partsEngine = z.custom<PartsEngine>((v) => "findPart" in v)
|