@tscircuit/props 0.0.620 → 0.0.622

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>
@@ -14,6 +14,7 @@ export interface CopperPourProps {
14
14
  clearance?: Distance
15
15
  boardEdgeMargin?: Distance
16
16
  cutoutMargin?: Distance
17
+ useThermalReliefs?: boolean
17
18
  outline?: Point[]
18
19
  coveredWithSolderMask?: boolean
19
20
  }
@@ -28,6 +29,7 @@ export const copperPourProps = z.object({
28
29
  clearance: distance.optional(),
29
30
  boardEdgeMargin: distance.optional(),
30
31
  cutoutMargin: distance.optional(),
32
+ useThermalReliefs: z.boolean().optional(),
31
33
  outline: z.array(point).optional(),
32
34
  coveredWithSolderMask: z.boolean().optional().default(true),
33
35
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tscircuit/props",
3
- "version": "0.0.620",
3
+ "version": "0.0.622",
4
4
  "description": "Props for tscircuit builtin component types",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",