@tscircuit/props 0.0.391 → 0.0.392

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.
@@ -9,6 +9,7 @@ export interface CopperPourProps {
9
9
  connectsTo: string
10
10
  padMargin?: Distance
11
11
  traceMargin?: Distance
12
+ clearance?: Distance
12
13
  coveredWithSolderMask?: boolean
13
14
  }
14
15
 
@@ -18,6 +19,7 @@ export const copperPourProps = z.object({
18
19
  connectsTo: z.string(),
19
20
  padMargin: distance.optional(),
20
21
  traceMargin: distance.optional(),
22
+ clearance: distance.optional(),
21
23
  coveredWithSolderMask: z.boolean().optional().default(true),
22
24
  })
23
25
 
@@ -8,6 +8,7 @@ import type { AutocompleteString } from "./common/autocomplete"
8
8
  import { expectTypesMatch } from "./typecheck"
9
9
  import { z } from "zod"
10
10
  import { type CadModelProp, cadModelProp } from "./common/cadModel"
11
+ import { type PcbStyle, pcbStyle } from "./common/pcbStyle"
11
12
 
12
13
  export interface FootprintLibraryResult {
13
14
  footprintCircuitJson: any[]
@@ -75,10 +76,17 @@ export interface PlatformConfig {
75
76
 
76
77
  footprintLibraryMap?: Record<
77
78
  string,
78
- | ((path: string) => Promise<FootprintLibraryResult>)
79
+ | ((
80
+ path: string,
81
+ options?: { resolvedPcbStyle?: PcbStyle },
82
+ ) => Promise<FootprintLibraryResult>)
79
83
  | Record<
80
84
  string,
81
- any[] | ((path: string) => Promise<FootprintLibraryResult>)
85
+ | any[]
86
+ | ((
87
+ path: string,
88
+ options?: { resolvedPcbStyle?: PcbStyle },
89
+ ) => Promise<FootprintLibraryResult>)
82
90
  >
83
91
  >
84
92
 
@@ -96,6 +104,15 @@ const pathToCircuitJsonFn = z
96
104
  .function()
97
105
  .args(z.string())
98
106
  .returns(z.promise(footprintLibraryResult))
107
+ .or(
108
+ z
109
+ .function()
110
+ .args(
111
+ z.string(),
112
+ z.object({ resolvedPcbStyle: pcbStyle.optional() }).optional(),
113
+ )
114
+ .returns(z.promise(footprintLibraryResult)),
115
+ )
99
116
  .describe("A function that takes a path and returns Circuit JSON")
100
117
 
101
118
  const footprintFileParserEntry = z.object({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tscircuit/props",
3
- "version": "0.0.391",
3
+ "version": "0.0.392",
4
4
  "description": "Props for tscircuit builtin component types",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",