@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.
- package/README.md +1 -0
- package/dist/index.d.ts +9 -1
- package/dist/index.js +7 -1
- package/dist/index.js.map +1 -1
- package/lib/components/copper-pour.ts +2 -0
- package/lib/platformConfig.ts +19 -2
- package/package.json +1 -1
|
@@ -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
|
|
package/lib/platformConfig.ts
CHANGED
|
@@ -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
|
-
| ((
|
|
79
|
+
| ((
|
|
80
|
+
path: string,
|
|
81
|
+
options?: { resolvedPcbStyle?: PcbStyle },
|
|
82
|
+
) => Promise<FootprintLibraryResult>)
|
|
79
83
|
| Record<
|
|
80
84
|
string,
|
|
81
|
-
any[]
|
|
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({
|