@tscircuit/props 0.0.65 → 0.0.67
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/dist/index.d.ts +159 -164
- package/dist/index.js +119 -118
- package/dist/index.js.map +1 -1
- package/lib/common/schematicPinDefinitions.ts +18 -30
- package/lib/components/footprint.ts +25 -0
- package/lib/index.ts +1 -3
- package/package.json +1 -1
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { layer_ref, type LayerRef } from "@tscircuit/soup"
|
|
2
|
+
import { expectTypesMatch } from "lib/typecheck"
|
|
3
|
+
import { z } from "zod"
|
|
4
|
+
|
|
5
|
+
export interface FootprintProps {
|
|
6
|
+
/**
|
|
7
|
+
* The layer that the footprint is designed for. If you set this to "top"
|
|
8
|
+
* then it means the children were intended to represent the top layer. If
|
|
9
|
+
* the <chip /> with this footprint is moved to the bottom layer, then the
|
|
10
|
+
* components will be mirrored.
|
|
11
|
+
*
|
|
12
|
+
* Generally, you shouldn't set this except where it can help prevent
|
|
13
|
+
* confusion because you have a complex multi-layer footprint. Default is
|
|
14
|
+
* "top" and this is most intuitive.
|
|
15
|
+
*/
|
|
16
|
+
originalLayer?: LayerRef
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export const footprintProps = z.object({
|
|
20
|
+
originalLayer: layer_ref.default("top").optional(),
|
|
21
|
+
})
|
|
22
|
+
|
|
23
|
+
export type FootprintPropsInput = z.input<typeof footprintProps>
|
|
24
|
+
type InferredFootprintProps = z.infer<typeof footprintProps>
|
|
25
|
+
expectTypesMatch<InferredFootprintProps, FootprintProps>(true)
|
package/lib/index.ts
CHANGED
|
@@ -59,6 +59,7 @@ export * from "./components/constraint"
|
|
|
59
59
|
export * from "./components/smtpad"
|
|
60
60
|
export * from "./components/hole"
|
|
61
61
|
export * from "./components/trace"
|
|
62
|
+
export * from "./components/footprint"
|
|
62
63
|
|
|
63
64
|
export const inductorProps = commonComponentProps.extend({
|
|
64
65
|
inductance,
|
|
@@ -161,9 +162,6 @@ export const schematicPathProps = z.object({
|
|
|
161
162
|
})
|
|
162
163
|
export type SchematicPathProps = z.input<typeof schematicPathProps>
|
|
163
164
|
|
|
164
|
-
export const footprintProps = z.object({})
|
|
165
|
-
export type FootprintProps = z.input<typeof footprintProps>
|
|
166
|
-
|
|
167
165
|
export const componentProps = commonComponentProps
|
|
168
166
|
export type ComponentProps = z.input<typeof componentProps>
|
|
169
167
|
|