@tscircuit/props 0.0.506 → 0.0.508

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.
@@ -12,7 +12,7 @@ import {
12
12
  type SupplierPartNumbers,
13
13
  } from "lib/common/layout"
14
14
  import type { PcbStyle } from "lib/common/pcbStyle"
15
- import { ninePointAnchor } from "lib/common/ninePointAnchor"
15
+ import type { ninePointAnchor } from "lib/common/ninePointAnchor"
16
16
  import { type Point, point } from "lib/common/point"
17
17
  import { expectTypesMatch } from "lib/typecheck"
18
18
  import { z } from "zod"
@@ -431,7 +431,14 @@ export interface SubcircuitGroupProps extends BaseGroupProps {
431
431
  routingDisabled?: boolean
432
432
  bomDisabled?: boolean
433
433
  defaultTraceWidth?: Distance
434
+
434
435
  minTraceWidth?: Distance
436
+ minViaToViaSpacing?: Distance
437
+ minTraceToPadSpacing?: Distance
438
+ minPadToPadSpacing?: Distance
439
+ minViaHoleDiameter?: Distance
440
+ minViaPadDiameter?: Distance
441
+
435
442
  nominalTraceWidth?: Distance
436
443
  pcbRouteCache?: PcbRouteCache
437
444
 
@@ -594,6 +601,11 @@ export const subcircuitGroupProps = baseGroupProps.extend({
594
601
  bomDisabled: z.boolean().optional(),
595
602
  defaultTraceWidth: length.optional(),
596
603
  minTraceWidth: length.optional(),
604
+ minViaToViaSpacing: length.optional(),
605
+ minTraceToPadSpacing: length.optional(),
606
+ minPadToPadSpacing: length.optional(),
607
+ minViaHoleDiameter: length.optional(),
608
+ minViaPadDiameter: length.optional(),
597
609
  nominalTraceWidth: length.optional(),
598
610
  partsEngine: partsEngine.optional(),
599
611
  _subcircuitCachingEnabled: z.boolean().optional(),
@@ -4,8 +4,12 @@ import { point } from "../common/point"
4
4
 
5
5
  export const portRef = z.union([
6
6
  z.string(),
7
- z.custom<{ getPortSelector: () => string }>((v) =>
8
- Boolean(v.getPortSelector),
7
+ z.custom<{ getPortSelector: () => string }>(
8
+ (v) =>
9
+ typeof v === "object" &&
10
+ v !== null &&
11
+ "getPortSelector" in v &&
12
+ typeof v.getPortSelector === "function",
9
13
  ),
10
14
  ])
11
15
 
@@ -64,6 +68,10 @@ export const traceProps = z.union([
64
68
  from: portRef,
65
69
  to: portRef,
66
70
  }),
71
+ baseTraceProps.extend({
72
+ start: portRef,
73
+ end: portRef,
74
+ }),
67
75
  ])
68
76
 
69
77
  export type TraceProps = z.input<typeof traceProps>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tscircuit/props",
3
- "version": "0.0.506",
3
+ "version": "0.0.508",
4
4
  "description": "Props for tscircuit builtin component types",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",