@tscircuit/props 0.0.598 → 0.0.600

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.
@@ -1,5 +1,6 @@
1
1
  import { expectTypesMatch } from "lib/typecheck"
2
2
  import { z } from "zod"
3
+ import { layer_ref, type LayerRef, type LayerRefInput } from "circuit-json"
3
4
  import {
4
5
  type FanoutBoundaryPadding,
5
6
  fanoutBoundaryPadding,
@@ -22,6 +23,10 @@ export type BusFanoutDirection =
22
23
  direction: NinePointAnchor
23
24
  }
24
25
 
26
+ export type FanoutPourNetMap = Partial<
27
+ Record<Extract<LayerRef, string>, string | string[]>
28
+ >
29
+
25
30
  export interface AutoroutingPhaseProps extends RoutingTolerances {
26
31
  key?: any
27
32
  name?: string
@@ -47,6 +52,20 @@ export interface AutoroutingPhaseProps extends RoutingTolerances {
47
52
  * boundary where fanout traces terminate.
48
53
  */
49
54
  fanoutBoundaryPadding?: FanoutBoundaryPadding
55
+ /**
56
+ * Copper layers available to boundary-terminated fanout buses. Source-only
57
+ * traces whose nets are mapped by `fanoutPourNetMap` terminate on their
58
+ * mapped plane layer.
59
+ */
60
+ fanoutRoutingLayers?: LayerRefInput[]
61
+ /**
62
+ * Maps copper layers to the net or nets poured on them. During fanout,
63
+ * source-only traces on those nets drop to the mapped layer instead of
64
+ * routing to the breakout boundary.
65
+ *
66
+ * This is inferred from `<copperpour>` components when omitted.
67
+ */
68
+ fanoutPourNetMap?: FanoutPourNetMap
50
69
  }
51
70
 
52
71
  const busFanoutDirection = z.union([
@@ -75,6 +94,10 @@ export const autoroutingPhaseProps = z
75
94
  reroute: z.boolean().optional(),
76
95
  busFanoutDirections: z.record(busFanoutDirection).optional(),
77
96
  fanoutBoundaryPadding: fanoutBoundaryPadding.optional(),
97
+ fanoutRoutingLayers: z.array(layer_ref).min(1).optional(),
98
+ fanoutPourNetMap: z
99
+ .record(layer_ref, z.union([z.string(), z.array(z.string()).min(1)]))
100
+ .optional(),
78
101
  })
79
102
  .superRefine((value, ctx) => {
80
103
  if (
@@ -23,6 +23,7 @@ export interface RectSmtPadProps extends Omit<PcbLayoutProps, "pcbRotation"> {
23
23
  solderMaskMarginRight?: Distance
24
24
  solderMaskMarginTop?: Distance
25
25
  solderMaskMarginBottom?: Distance
26
+ solderPasteMargin?: Distance
26
27
  }
27
28
 
28
29
  export interface RotatedRectSmtPadProps
@@ -40,6 +41,7 @@ export interface RotatedRectSmtPadProps
40
41
  solderMaskMarginRight?: Distance
41
42
  solderMaskMarginTop?: Distance
42
43
  solderMaskMarginBottom?: Distance
44
+ solderPasteMargin?: Distance
43
45
  }
44
46
 
45
47
  export interface CircleSmtPadProps extends Omit<PcbLayoutProps, "pcbRotation"> {
@@ -49,6 +51,7 @@ export interface CircleSmtPadProps extends Omit<PcbLayoutProps, "pcbRotation"> {
49
51
  portHints?: PortHints
50
52
  coveredWithSolderMask?: boolean
51
53
  solderMaskMargin?: Distance
54
+ solderPasteMargin?: Distance
52
55
  }
53
56
 
54
57
  export interface PillSmtPadProps extends Omit<PcbLayoutProps, "pcbRotation"> {
@@ -60,6 +63,7 @@ export interface PillSmtPadProps extends Omit<PcbLayoutProps, "pcbRotation"> {
60
63
  portHints?: PortHints
61
64
  coveredWithSolderMask?: boolean
62
65
  solderMaskMargin?: Distance
66
+ solderPasteMargin?: Distance
63
67
  }
64
68
 
65
69
  export interface PolygonSmtPadProps
@@ -70,6 +74,7 @@ export interface PolygonSmtPadProps
70
74
  portHints?: PortHints
71
75
  coveredWithSolderMask?: boolean
72
76
  solderMaskMargin?: Distance
77
+ solderPasteMargin?: Distance
73
78
  }
74
79
 
75
80
  export type SmtPadProps =
@@ -99,6 +104,7 @@ export const rectSmtPadProps = pcbLayoutProps
99
104
  solderMaskMarginRight: distance.optional(),
100
105
  solderMaskMarginTop: distance.optional(),
101
106
  solderMaskMarginBottom: distance.optional(),
107
+ solderPasteMargin: distance.optional(),
102
108
  })
103
109
  type InferredRectSmtPadProps = z.input<typeof rectSmtPadProps>
104
110
  expectTypesMatch<InferredRectSmtPadProps, RectSmtPadProps>(true)
@@ -119,6 +125,7 @@ export const rotatedRectSmtPadProps = pcbLayoutProps
119
125
  solderMaskMarginRight: distance.optional(),
120
126
  solderMaskMarginTop: distance.optional(),
121
127
  solderMaskMarginBottom: distance.optional(),
128
+ solderPasteMargin: distance.optional(),
122
129
  })
123
130
  type InferredRotatedRectSmtPadProps = z.input<typeof rotatedRectSmtPadProps>
124
131
  expectTypesMatch<InferredRotatedRectSmtPadProps, RotatedRectSmtPadProps>(true)
@@ -132,6 +139,7 @@ export const circleSmtPadProps = pcbLayoutProps
132
139
  portHints: portHints.optional(),
133
140
  coveredWithSolderMask: z.boolean().optional(),
134
141
  solderMaskMargin: distance.optional(),
142
+ solderPasteMargin: distance.optional(),
135
143
  })
136
144
  type InferredCircleSmtPadProps = z.input<typeof circleSmtPadProps>
137
145
  expectTypesMatch<InferredCircleSmtPadProps, CircleSmtPadProps>(true)
@@ -147,6 +155,7 @@ export const pillSmtPadProps = pcbLayoutProps
147
155
  portHints: portHints.optional(),
148
156
  coveredWithSolderMask: z.boolean().optional(),
149
157
  solderMaskMargin: distance.optional(),
158
+ solderPasteMargin: distance.optional(),
150
159
  })
151
160
  type InferredPillSmtPadProps = z.input<typeof pillSmtPadProps>
152
161
  expectTypesMatch<InferredPillSmtPadProps, PillSmtPadProps>(true)
@@ -160,6 +169,7 @@ export const polygonSmtPadProps = pcbLayoutProps
160
169
  portHints: portHints.optional(),
161
170
  coveredWithSolderMask: z.boolean().optional(),
162
171
  solderMaskMargin: distance.optional(),
172
+ solderPasteMargin: distance.optional(),
163
173
  })
164
174
  type InferredPolygonSmtPadProps = z.input<typeof polygonSmtPadProps>
165
175
  expectTypesMatch<InferredPolygonSmtPadProps, PolygonSmtPadProps>(true)
@@ -33,11 +33,11 @@ export const transistorProps = commonComponentProps.extend({
33
33
 
34
34
  export const transistorPins = [
35
35
  "pin1",
36
- "emitter",
37
- "pin2",
38
36
  "collector",
39
- "pin3",
37
+ "pin2",
40
38
  "base",
39
+ "pin3",
40
+ "emitter",
41
41
  ] as const
42
42
  export type TransistorPinLabels = (typeof transistorPins)[number]
43
43
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tscircuit/props",
3
- "version": "0.0.598",
3
+ "version": "0.0.600",
4
4
  "description": "Props for tscircuit builtin component types",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",