@tscircuit/props 0.0.678 → 0.0.679

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,7 @@ import { distance, type Distance } from "lib/common/distance"
3
3
  import { expectTypesMatch } from "lib/typecheck"
4
4
  import { z } from "zod"
5
5
 
6
- /** A bend on a flat flex PCB. Does not change fabrication coordinates. */
6
+ /** A bend on a flat flex PCB, with optional tear-relief cutouts. */
7
7
  export interface PcbBendProps {
8
8
  name?: string
9
9
  /** Start/end of the bend-zone centerline in the parent PCB coordinate system. */
@@ -15,6 +15,14 @@ export interface PcbBendProps {
15
15
  bendAngle: number | string
16
16
  /** Positive neutral-surface radius, in mm or a distance string. */
17
17
  bendRadius: Distance
18
+ /**
19
+ * Radius of circular tear-relief cutouts centered at both bend endpoints in
20
+ * the flat PCB. Removes material to round the edge where each cutout meets
21
+ * the board outline. Finite and positive, in mm or a distance string;
22
+ * parsed to mm. Omit to leave the outline unchanged (no tear reliefs).
23
+ * Independent of bendRadius and bendSide; no aliases or conflicting props.
24
+ */
25
+ tearReliefRadius?: Distance
18
26
  /** Moving side, looking from (x1, y1) toward (x2, y2) in the flat layout. */
19
27
  bendSide: "left" | "right"
20
28
  }
@@ -30,6 +38,7 @@ export const pcbBendProps = z
30
38
  y2: finiteDistance,
31
39
  bendAngle: rotation.pipe(z.number().finite()),
32
40
  bendRadius: distance.pipe(z.number().finite().positive()),
41
+ tearReliefRadius: distance.pipe(z.number().finite().positive()).optional(),
33
42
  bendSide: z.enum(["left", "right"]),
34
43
  })
35
44
  .refine(({ x1, y1, x2, y2 }) => x1 !== x2 || y1 !== y2, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tscircuit/props",
3
- "version": "0.0.678",
3
+ "version": "0.0.679",
4
4
  "description": "Props for tscircuit builtin component types",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",