@tscircuit/props 0.0.331 → 0.0.333

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.
@@ -1,5 +1,6 @@
1
1
  import { distance, type Distance } from "lib/common/distance"
2
2
  import { ninePointAnchor } from "lib/common/ninePointAnchor"
3
+ import { type Point, point } from "lib/common/point"
3
4
  import { expectTypesMatch } from "lib/typecheck"
4
5
  import { z } from "zod"
5
6
  import { subcircuitGroupProps, type SubcircuitGroupProps } from "./group"
@@ -9,14 +10,16 @@ export interface BoardProps extends Omit<SubcircuitGroupProps, "subcircuit"> {
9
10
  /** Number of layers for the PCB */
10
11
  layers?: 2 | 4
11
12
  borderRadius?: Distance
12
- boardOrigin?: z.infer<typeof ninePointAnchor>
13
+ boardAnchorPosition?: Point
14
+ boardAnchorAlignment?: z.infer<typeof ninePointAnchor>
13
15
  }
14
16
 
15
17
  export const boardProps = subcircuitGroupProps.extend({
16
18
  material: z.enum(["fr4", "fr1"]).default("fr4"),
17
19
  layers: z.union([z.literal(2), z.literal(4)]).default(2),
18
20
  borderRadius: distance.optional(),
19
- boardOrigin: ninePointAnchor.optional(),
21
+ boardAnchorPosition: point.optional(),
22
+ boardAnchorAlignment: ninePointAnchor.optional(),
20
23
  })
21
24
 
22
25
  type InferredBoardProps = z.input<typeof boardProps>
@@ -40,6 +40,8 @@ export interface PillPlatedHoleProps extends Omit<PcbLayoutProps, "layer"> {
40
40
  outerHeight: number | string
41
41
  holeWidth: number | string
42
42
  holeHeight: number | string
43
+ holeOffsetX?: number | string
44
+ holeOffsetY?: number | string
43
45
 
44
46
  /** @deprecated use holeWidth */
45
47
  innerWidth?: number | string
@@ -129,6 +131,8 @@ export const platedHoleProps = z
129
131
  innerWidth: distance.optional().describe("DEPRECATED use holeWidth"),
130
132
  innerHeight: distance.optional().describe("DEPRECATED use holeHeight"),
131
133
  portHints: portHints.optional(),
134
+ holeOffsetX: distance.optional(),
135
+ holeOffsetY: distance.optional(),
132
136
  }),
133
137
  pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({
134
138
  name: z.string().optional(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tscircuit/props",
3
- "version": "0.0.331",
3
+ "version": "0.0.333",
4
4
  "description": "Props for tscircuit builtin component types",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",