@tscircuit/props 0.0.652 → 0.0.654

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.
@@ -1,6 +1,10 @@
1
1
  import { expectTypesMatch } from "lib/typecheck"
2
2
  import { z } from "zod"
3
3
  import { type FanoutProps, fanoutProps } from "../common/fanoutProps"
4
+ import {
5
+ type FanoutTracePath,
6
+ fanoutTracePath,
7
+ } from "../common/fanoutTracePath"
4
8
  import {
5
9
  type AutorouterProp,
6
10
  type RoutingTolerances,
@@ -21,6 +25,13 @@ export interface AutoroutingPhaseProps extends RoutingTolerances, FanoutProps {
21
25
  name?: string
22
26
  autorouter?: AutorouterProp
23
27
  phaseIndex?: number
28
+ /**
29
+ * Saved PCB wire/via routes using the same format as fanout pcbTracePaths.
30
+ * Numeric distances are mm; unit strings are normalized to mm. Omitted by
31
+ * default; an empty array is accepted. No aliases or prop conflicts are
32
+ * introduced, and existing phases require no migration.
33
+ */
34
+ pcbTracePaths?: FanoutTracePath[]
24
35
  region?: {
25
36
  shape?: "rect"
26
37
  minX: number
@@ -41,6 +52,7 @@ export const autoroutingPhaseProps = z
41
52
  name: z.string().optional(),
42
53
  autorouter: autorouterProp.optional(),
43
54
  phaseIndex: z.number().optional(),
55
+ pcbTracePaths: z.array(fanoutTracePath).optional(),
44
56
  ...routingTolerances.shape,
45
57
  region: z
46
58
  .object({
@@ -78,6 +78,12 @@ export const boardOutlinePoint = z
78
78
  export interface BoardProps
79
79
  extends Omit<SubcircuitGroupProps, "subcircuit" | "connections" | "outline"> {
80
80
  title?: string
81
+ /** Fabricator preset, preserved as supplied. Omitted leaves the preset unset. */
82
+ fabricatorPreset?:
83
+ | "jlcpcb_economy"
84
+ | "jlcpcb_standard"
85
+ | "jlcpcb_economy_20260912"
86
+ | "jlcpcb_standard_20260912"
81
87
  material?: "fr4" | "fr1" | "flex"
82
88
  /** Number of layers for the PCB */
83
89
  layers?: 1 | 2 | 4 | 6 | 8 | 10
@@ -135,6 +141,17 @@ export interface BoardProps
135
141
  export const boardProps = subcircuitGroupProps
136
142
  .omit({ connections: true })
137
143
  .extend({
144
+ fabricatorPreset: z
145
+ .enum([
146
+ "jlcpcb_economy",
147
+ "jlcpcb_standard",
148
+ "jlcpcb_economy_20260912",
149
+ "jlcpcb_standard_20260912",
150
+ ])
151
+ .optional()
152
+ .describe(
153
+ "Fabricator preset, preserved as supplied. Omitted leaves the preset unset.",
154
+ ),
138
155
  material: z.enum(["fr4", "fr1", "flex"]).default("fr4"),
139
156
  layers: z
140
157
  .union([
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tscircuit/props",
3
- "version": "0.0.652",
3
+ "version": "0.0.654",
4
4
  "description": "Props for tscircuit builtin component types",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",