@tscircuit/props 0.0.619 → 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>
@@ -41,6 +41,8 @@ export interface EnclosureFdmBoxProps {
41
41
  lidLipDepth?: Distance
42
42
  /** Disable placement of apertures explicitly declared by enclosed components. */
43
43
  disableCutouts?: boolean
44
+ /** Show edges hidden behind the enclosure surface in compatible 3D viewers. */
45
+ showHiddenEdges?: boolean
44
46
  }
45
47
 
46
48
  export const enclosureFdmBoxProps = z.object({
@@ -57,6 +59,7 @@ export const enclosureFdmBoxProps = z.object({
57
59
  topHeadroom: distance.optional(),
58
60
  lidLipDepth: distance.optional(),
59
61
  disableCutouts: z.boolean().optional(),
62
+ showHiddenEdges: z.boolean().optional(),
60
63
  })
61
64
 
62
65
  export type EnclosureFdmBoxPropsInput = z.input<typeof enclosureFdmBoxProps>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tscircuit/props",
3
- "version": "0.0.619",
3
+ "version": "0.0.621",
4
4
  "description": "Props for tscircuit builtin component types",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",