@tscircuit/props 0.0.623 → 0.0.626
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 +4 -0
- package/dist/index.d.ts +30 -0
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/lib/components/bus.ts +6 -0
- package/package.json +1 -1
package/lib/components/bus.ts
CHANGED
|
@@ -27,6 +27,10 @@ export interface BusProps {
|
|
|
27
27
|
pcbTraceWidth?: number | string
|
|
28
28
|
/** PCB layers on which the bus may be routed. */
|
|
29
29
|
pcbAllowedLayers?: LayerRefInput[]
|
|
30
|
+
/** Preferred PCB layer for routing the bus. */
|
|
31
|
+
preferredLayer?: LayerRefInput
|
|
32
|
+
/** Preferred PCB layers for routing the bus, in priority order. */
|
|
33
|
+
preferredLayers?: LayerRefInput[]
|
|
30
34
|
}
|
|
31
35
|
|
|
32
36
|
export const busProps = z.object({
|
|
@@ -37,6 +41,8 @@ export const busProps = z.object({
|
|
|
37
41
|
targetImpedance: resistance.pipe(z.number().positive().finite()).optional(),
|
|
38
42
|
pcbTraceWidth: distance.pipe(z.number().positive().finite()).optional(),
|
|
39
43
|
pcbAllowedLayers: z.array(layer_ref).min(1).optional(),
|
|
44
|
+
preferredLayer: layer_ref.optional(),
|
|
45
|
+
preferredLayers: z.array(layer_ref).min(1).optional(),
|
|
40
46
|
})
|
|
41
47
|
|
|
42
48
|
type InferredBusProps = z.input<typeof busProps>
|