@tscircuit/props 0.0.576 → 0.0.578

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,7 +3,6 @@ import { createConnectionsProp } from "lib/common/connectionsProp"
3
3
  import {
4
4
  type CommonComponentProps,
5
5
  commonComponentProps,
6
- lrPins,
7
6
  } from "lib/common/layout"
8
7
  import {
9
8
  type SchematicOrientation,
@@ -15,7 +14,14 @@ import { z } from "zod"
15
14
 
16
15
  export type PinVariant = "two_pin" | "four_pin"
17
16
 
18
- export const crystalPins = lrPins
17
+ export const crystalPins = [
18
+ "pin1",
19
+ "left",
20
+ "pin2",
21
+ "right",
22
+ "pin3",
23
+ "pin4",
24
+ ] as const
19
25
  export type CrystalPinLabels = (typeof crystalPins)[number]
20
26
 
21
27
  export interface CrystalProps<PinLabel extends string = string>
@@ -13,23 +13,15 @@ export interface NetLabelProps {
13
13
  anchorSide?: "left" | "top" | "right" | "bottom"
14
14
  }
15
15
 
16
- export const netLabelProps = z
17
- .object({
18
- net: z.string().optional(),
19
- connection: z.string().optional(),
20
- connectsTo: z.string().or(z.array(z.string())).optional(),
21
- schX: distance.optional(),
22
- schY: distance.optional(),
23
- schRotation: rotation.optional(),
24
- anchorSide: z.enum(["left", "top", "right", "bottom"]).optional(),
25
- })
26
- .refine(
27
- (props) => props.net === undefined || props.connection === undefined,
28
- {
29
- message: "net and connection cannot be provided together",
30
- path: ["connection"],
31
- },
32
- )
16
+ export const netLabelProps = z.object({
17
+ net: z.string().optional(),
18
+ connection: z.string().optional(),
19
+ connectsTo: z.string().or(z.array(z.string())).optional(),
20
+ schX: distance.optional(),
21
+ schY: distance.optional(),
22
+ schRotation: rotation.optional(),
23
+ anchorSide: z.enum(["left", "top", "right", "bottom"]).optional(),
24
+ })
33
25
 
34
26
  type InferredNetLabelProps = z.input<typeof netLabelProps>
35
27
  expectTypesMatch<NetLabelProps, InferredNetLabelProps>(true)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tscircuit/props",
3
- "version": "0.0.576",
3
+ "version": "0.0.578",
4
4
  "description": "Props for tscircuit builtin component types",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",