@tscircuit/props 0.0.573 → 0.0.574
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 +6 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/lib/components/mosfet.ts +9 -0
- package/package.json +1 -1
package/lib/components/mosfet.ts
CHANGED
|
@@ -21,12 +21,21 @@ export interface MosfetProps<PinLabel extends string = string>
|
|
|
21
21
|
extends CommonComponentProps<PinLabel> {
|
|
22
22
|
channelType: "n" | "p"
|
|
23
23
|
mosfetMode: "enhancement" | "depletion"
|
|
24
|
+
/** The side of the schematic symbol where the drain port is placed. */
|
|
25
|
+
symbolDrainSide?: "left" | "right" | "top" | "bottom"
|
|
26
|
+
/** The side of the schematic symbol where the source port is placed. */
|
|
27
|
+
symbolSourceSide?: "left" | "right" | "top" | "bottom"
|
|
28
|
+
/** The side of the schematic symbol where the gate port is placed. */
|
|
29
|
+
symbolGateSide?: "left" | "right" | "top" | "bottom"
|
|
24
30
|
connections?: Connections<MosfetPinLabels>
|
|
25
31
|
}
|
|
26
32
|
|
|
27
33
|
export const mosfetProps = commonComponentProps.extend({
|
|
28
34
|
channelType: z.enum(["n", "p"]),
|
|
29
35
|
mosfetMode: z.enum(["enhancement", "depletion"]),
|
|
36
|
+
symbolDrainSide: z.enum(["left", "right", "top", "bottom"]).optional(),
|
|
37
|
+
symbolSourceSide: z.enum(["left", "right", "top", "bottom"]).optional(),
|
|
38
|
+
symbolGateSide: z.enum(["left", "right", "top", "bottom"]).optional(),
|
|
30
39
|
connections: createConnectionsProp(mosfetPins).optional(),
|
|
31
40
|
})
|
|
32
41
|
|