@tscircuit/props 0.0.298 → 0.0.300
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 +13 -7
- package/dist/index.d.ts +6 -2
- package/dist/index.js +8 -1
- package/dist/index.js.map +1 -1
- package/lib/common/footprintProp.ts +2 -0
- package/lib/generated/kicad-autocomplete.ts +13809 -0
- package/lib/index.ts +1 -0
- package/lib/platformConfig.ts +17 -3
- package/package.json +1 -1
package/lib/index.ts
CHANGED
|
@@ -5,6 +5,7 @@ export * from "./common/point3"
|
|
|
5
5
|
export * from "./common/portHints"
|
|
6
6
|
export * from "./common/footprintProp"
|
|
7
7
|
export * from "./common/autocomplete"
|
|
8
|
+
export * from "./generated/kicad-autocomplete"
|
|
8
9
|
export * from "./common/schematicOrientation"
|
|
9
10
|
export * from "./common/schematicPinDefinitions"
|
|
10
11
|
export * from "./common/schematicPinStyle"
|
package/lib/platformConfig.ts
CHANGED
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
} from "./components/group"
|
|
7
7
|
import { expectTypesMatch } from "./typecheck"
|
|
8
8
|
import { z } from "zod"
|
|
9
|
+
import { type CadModelProp, cadModelProp } from "./common/cadModel"
|
|
9
10
|
|
|
10
11
|
export interface PlatformConfig {
|
|
11
12
|
partsEngine?: PartsEngine
|
|
@@ -30,10 +31,16 @@ export interface PlatformConfig {
|
|
|
30
31
|
|
|
31
32
|
footprintLibraryMap?: Record<
|
|
32
33
|
string,
|
|
33
|
-
| ((
|
|
34
|
+
| ((
|
|
35
|
+
path: string,
|
|
36
|
+
) => Promise<{ footprintCircuitJson: any[]; cadModel?: CadModelProp }>)
|
|
34
37
|
| Record<
|
|
35
38
|
string,
|
|
36
|
-
|
|
39
|
+
| any[]
|
|
40
|
+
| ((path: string) => Promise<{
|
|
41
|
+
footprintCircuitJson: any[]
|
|
42
|
+
cadModel?: CadModelProp
|
|
43
|
+
}>)
|
|
37
44
|
>
|
|
38
45
|
>
|
|
39
46
|
}
|
|
@@ -42,7 +49,14 @@ const unvalidatedCircuitJson = z.array(z.any()).describe("Circuit JSON")
|
|
|
42
49
|
const pathToCircuitJsonFn = z
|
|
43
50
|
.function()
|
|
44
51
|
.args(z.string())
|
|
45
|
-
.returns(
|
|
52
|
+
.returns(
|
|
53
|
+
z.promise(
|
|
54
|
+
z.object({
|
|
55
|
+
footprintCircuitJson: z.array(z.any()),
|
|
56
|
+
cadModel: cadModelProp.optional(),
|
|
57
|
+
}),
|
|
58
|
+
),
|
|
59
|
+
)
|
|
46
60
|
.describe("A function that takes a path and returns Circuit JSON")
|
|
47
61
|
|
|
48
62
|
export const platformConfig = z.object({
|