@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.
@@ -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
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tscircuit/props",
3
- "version": "0.0.65",
3
+ "version": "0.0.67",
4
4
  "description": "Props for tscircuit builtin component types",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {