@tscircuit/props 0.0.594 → 0.0.596

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.
@@ -113,10 +113,18 @@ export const cadModelJscad = cadModelBase.extend({
113
113
  jscad: z.record(z.any()),
114
114
  })
115
115
 
116
+ /**
117
+ * A Footprinter string used to procedurally generate the component's CAD model,
118
+ * independently of the component's PCB footprint.
119
+ *
120
+ * @example "soic8"
121
+ */
122
+ export type CadModelFootprinterString = string
123
+
116
124
  export type CadModelProp =
117
125
  | null
118
- | string
119
126
  | ReactElement
127
+ | CadModelFootprinterString
120
128
  | CadModelStl
121
129
  | CadModelObj
122
130
  | CadModelGltf
@@ -127,7 +135,7 @@ export type CadModelProp =
127
135
 
128
136
  export const cadModelProp = z.union([
129
137
  z.null(),
130
- url,
138
+ z.string().min(1),
131
139
  z.custom<ReactElement>((v) => {
132
140
  return v && typeof v === "object" && "type" in v && "props" in v
133
141
  }),
@@ -2,10 +2,20 @@ import { distance } from "circuit-json"
2
2
  import type { Distance } from "lib/common/distance"
3
3
  import { expectTypesMatch } from "lib/typecheck"
4
4
  import { z } from "zod"
5
- import { subcircuitGroupProps, type SubcircuitGroupProps } from "./group"
5
+ import {
6
+ autorouterProp,
7
+ subcircuitGroupProps,
8
+ type AutorouterProp,
9
+ type SubcircuitGroupProps,
10
+ } from "./group"
6
11
 
7
12
  export interface BreakoutProps
8
13
  extends Omit<SubcircuitGroupProps, "subcircuit"> {
14
+ /**
15
+ * Autorouter used to escape the components inside the breakout boundary.
16
+ * Defaults to the multilayer fanout autorouter.
17
+ */
18
+ autorouter?: AutorouterProp
9
19
  padding?: Distance
10
20
  paddingLeft?: Distance
11
21
  paddingRight?: Distance
@@ -14,6 +24,7 @@ export interface BreakoutProps
14
24
  }
15
25
 
16
26
  export const breakoutProps = subcircuitGroupProps.extend({
27
+ autorouter: autorouterProp.default("fanout"),
17
28
  padding: distance.optional(),
18
29
  paddingLeft: distance.optional(),
19
30
  paddingRight: distance.optional(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tscircuit/props",
3
- "version": "0.0.594",
3
+ "version": "0.0.596",
4
4
  "description": "Props for tscircuit builtin component types",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",