@tscircuit/props 0.0.592 → 0.0.593

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,20 @@
1
+ import { expectTypesMatch } from "lib/typecheck"
2
+ import { z } from "zod"
3
+
4
+ /**
5
+ * Declares a group of connections that an autorouter should keep together.
6
+ * Each connection may be a trace name or a port selector.
7
+ */
8
+ export interface BusProps {
9
+ name?: string
10
+ /** Trace names or port selectors for the connections in the bus. */
11
+ connections: string[]
12
+ }
13
+
14
+ export const busProps = z.object({
15
+ name: z.string().optional(),
16
+ connections: z.array(z.string()).min(2),
17
+ })
18
+
19
+ type InferredBusProps = z.input<typeof busProps>
20
+ expectTypesMatch<BusProps, InferredBusProps>(true)
package/lib/index.ts CHANGED
@@ -58,6 +58,7 @@ export * from "./components/smtpad"
58
58
  export * from "./components/solderpaste"
59
59
  export * from "./components/hole"
60
60
  export * from "./components/trace"
61
+ export * from "./components/bus"
61
62
  export * from "./components/differentialpair"
62
63
  export * from "./components/footprint"
63
64
  export * from "./components/symbol"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tscircuit/props",
3
- "version": "0.0.592",
3
+ "version": "0.0.593",
4
4
  "description": "Props for tscircuit builtin component types",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",