@tscircuit/props 0.0.508 → 0.0.510

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,6 +3,33 @@ import { expectTypesMatch } from "lib/typecheck"
3
3
  import { z } from "zod"
4
4
  import { type FootprintProp, footprintProp } from "../common/footprintProp"
5
5
 
6
+ export type FootprintInsertionDirection =
7
+ | "from_above"
8
+ | "from_left"
9
+ | "from_right"
10
+ | "from_front"
11
+ | "from_back"
12
+ | "x+"
13
+ | "x-"
14
+ | "y+"
15
+ | "y-"
16
+
17
+ export const footprintInsertionDirection = z.enum([
18
+ "from_above",
19
+ "from_left",
20
+ "from_right",
21
+ "from_front",
22
+ "from_back",
23
+ "x+",
24
+ "x-",
25
+ "y+",
26
+ "y-",
27
+ ])
28
+ expectTypesMatch<
29
+ FootprintInsertionDirection,
30
+ z.infer<typeof footprintInsertionDirection>
31
+ >(true)
32
+
6
33
  export interface FootprintProps {
7
34
  children?: any
8
35
  /**
@@ -24,6 +51,11 @@ export interface FootprintProps {
24
51
  * Can be a footprint or kicad string
25
52
  */
26
53
  src?: FootprintProp
54
+ /**
55
+ * Direction a cable or mating part is inserted into this footprint in its
56
+ * unrotated orientation.
57
+ */
58
+ insertionDirection?: FootprintInsertionDirection
27
59
  }
28
60
 
29
61
  export const footprintProps = z.object({
@@ -31,6 +63,11 @@ export const footprintProps = z.object({
31
63
  originalLayer: layer_ref.default("top").optional(),
32
64
  circuitJson: z.array(z.any()).optional(),
33
65
  src: footprintProp.describe("Can be a footprint or kicad string").optional(),
66
+ insertionDirection: footprintInsertionDirection
67
+ .optional()
68
+ .describe(
69
+ "Direction a cable or mating part is inserted into this footprint in its unrotated orientation.",
70
+ ),
34
71
  })
35
72
 
36
73
  export type FootprintPropsInput = z.input<typeof footprintProps>
@@ -433,9 +433,10 @@ export interface SubcircuitGroupProps extends BaseGroupProps {
433
433
  defaultTraceWidth?: Distance
434
434
 
435
435
  minTraceWidth?: Distance
436
- minViaToViaSpacing?: Distance
437
- minTraceToPadSpacing?: Distance
438
- minPadToPadSpacing?: Distance
436
+ minViaToViaClearance?: Distance
437
+ minTraceToPadClearance?: Distance
438
+ minPadToPadClearance?: Distance
439
+ minBoardEdgeClearance?: Distance
439
440
  minViaHoleDiameter?: Distance
440
441
  minViaPadDiameter?: Distance
441
442
 
@@ -601,9 +602,10 @@ export const subcircuitGroupProps = baseGroupProps.extend({
601
602
  bomDisabled: z.boolean().optional(),
602
603
  defaultTraceWidth: length.optional(),
603
604
  minTraceWidth: length.optional(),
604
- minViaToViaSpacing: length.optional(),
605
- minTraceToPadSpacing: length.optional(),
606
- minPadToPadSpacing: length.optional(),
605
+ minViaToViaClearance: length.optional(),
606
+ minTraceToPadClearance: length.optional(),
607
+ minPadToPadClearance: length.optional(),
608
+ minBoardEdgeClearance: length.optional(),
607
609
  minViaHoleDiameter: length.optional(),
608
610
  minViaPadDiameter: length.optional(),
609
611
  nominalTraceWidth: length.optional(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tscircuit/props",
3
- "version": "0.0.508",
3
+ "version": "0.0.510",
4
4
  "description": "Props for tscircuit builtin component types",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",