@tscircuit/props 0.0.620 → 0.0.621

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.
@@ -2,15 +2,34 @@ import { chipProps, type ChipPropsSU } from "./chip"
2
2
  import { expectTypesMatch } from "lib/typecheck"
3
3
  import { z } from "zod"
4
4
 
5
+ export const connectorStandard = z.enum([
6
+ "usb_c",
7
+ "m2",
8
+ "jst_sh",
9
+ "jst_gh",
10
+ "jst_zh",
11
+ "jst_ph",
12
+ "jst_xh",
13
+ "jst_vh",
14
+ ])
15
+
16
+ export type ConnectorStandard = z.infer<typeof connectorStandard>
17
+
5
18
  export interface ConnectorProps extends ChipPropsSU {
6
19
  /**
7
- * Connector standard, e.g. usb_c, m2
20
+ * Connector interface or product family, e.g. usb_c, m2, jst_ph
21
+ */
22
+ standard?: ConnectorStandard
23
+
24
+ /**
25
+ * Number of electrical circuits in the connector
8
26
  */
9
- standard?: "usb_c" | "m2"
27
+ pinCount?: number
10
28
  }
11
29
 
12
30
  export const connectorProps = chipProps.extend({
13
- standard: z.enum(["usb_c", "m2"]).optional(),
31
+ standard: connectorStandard.optional(),
32
+ pinCount: z.number().int().positive().optional(),
14
33
  })
15
34
 
16
35
  type InferredConnectorProps = z.input<typeof connectorProps>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tscircuit/props",
3
- "version": "0.0.620",
3
+ "version": "0.0.621",
4
4
  "description": "Props for tscircuit builtin component types",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",