@tscircuit/props 0.0.186 → 0.0.188

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.
@@ -3,6 +3,7 @@ import { z } from "zod"
3
3
 
4
4
  export const ledProps = commonComponentProps.extend({
5
5
  color: z.string().optional(),
6
+ wavelength: z.string().optional(),
6
7
  })
7
8
  export const ledPins = lrPolarPins
8
9
  export type LedProps = z.input<typeof ledProps>
@@ -59,11 +59,25 @@ export interface CircularHoleWithRectPlatedProps
59
59
  portHints?: PortHints
60
60
  }
61
61
 
62
+ export interface PillWithRectPadPlatedHoleProps
63
+ extends Omit<PcbLayoutProps, "pcbRotation" | "layer"> {
64
+ name?: string
65
+ shape: "pill_hole_with_rect_pad"
66
+ holeShape: "pill"
67
+ padShape: "rect"
68
+ holeWidth: number | string
69
+ holeHeight: number | string
70
+ rectPadWidth: number | string
71
+ rectPadHeight: number | string
72
+ portHints?: PortHints
73
+ }
74
+
62
75
  export type PlatedHoleProps =
63
76
  | CirclePlatedHoleProps
64
77
  | OvalPlatedHoleProps
65
78
  | PillPlatedHoleProps
66
79
  | CircularHoleWithRectPlatedProps
80
+ | PillWithRectPadPlatedHoleProps
67
81
 
68
82
  const distanceHiddenUndefined = z
69
83
  .custom<z.input<typeof distance>>()
@@ -125,6 +139,17 @@ export const platedHoleProps = z
125
139
  message: "Missing required fields for circular_hole_with_rect_pad",
126
140
  },
127
141
  ),
142
+ pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({
143
+ name: z.string().optional(),
144
+ shape: z.literal("pill_hole_with_rect_pad"),
145
+ holeShape: z.literal("pill"),
146
+ padShape: z.literal("rect"),
147
+ holeWidth: distance,
148
+ holeHeight: distance,
149
+ rectPadWidth: distance,
150
+ rectPadHeight: distance,
151
+ portHints: portHints.optional(),
152
+ }),
128
153
  ])
129
154
  .refine((a) => {
130
155
  if ("innerWidth" in a && a.innerWidth !== undefined) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tscircuit/props",
3
- "version": "0.0.186",
3
+ "version": "0.0.188",
4
4
  "description": "Props for tscircuit builtin component types",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -31,7 +31,7 @@
31
31
  "@types/node": "^20.12.11",
32
32
  "@types/react": "^18.3.2",
33
33
  "ava": "^6.1.3",
34
- "circuit-json": "^0.0.106",
34
+ "circuit-json": "^0.0.186",
35
35
  "expect-type": "^0.20.0",
36
36
  "glob": "^11.0.0",
37
37
  "madge": "^8.0.0",