@tscircuit/props 0.0.631 → 0.0.633
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.
- package/README.md +7 -0
- package/dist/index.d.ts +98 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/lib/components/breakout.ts +10 -0
- package/lib/components/schematic-box.ts +7 -0
- package/package.json +1 -1
|
@@ -22,8 +22,17 @@ export interface BreakoutProps
|
|
|
22
22
|
paddingRight?: Distance
|
|
23
23
|
paddingTop?: Distance
|
|
24
24
|
paddingBottom?: Distance
|
|
25
|
+
/**
|
|
26
|
+
* Minimum clearance between this fanout boundary and another fanout
|
|
27
|
+
* boundary. Fanout boundaries may never overlap, even when this is omitted.
|
|
28
|
+
*/
|
|
29
|
+
fanoutMargin?: Distance
|
|
25
30
|
}
|
|
26
31
|
|
|
32
|
+
const nonnegativeFanoutMargin = distance.refine((value) => value >= 0, {
|
|
33
|
+
message: "Fanout margin cannot be negative",
|
|
34
|
+
})
|
|
35
|
+
|
|
27
36
|
export const breakoutProps = subcircuitGroupProps.extend({
|
|
28
37
|
autorouter: autorouterProp.default("fanout"),
|
|
29
38
|
padding: distance.optional(),
|
|
@@ -31,6 +40,7 @@ export const breakoutProps = subcircuitGroupProps.extend({
|
|
|
31
40
|
paddingRight: distance.optional(),
|
|
32
41
|
paddingTop: distance.optional(),
|
|
33
42
|
paddingBottom: distance.optional(),
|
|
43
|
+
fanoutMargin: nonnegativeFanoutMargin.optional(),
|
|
34
44
|
...fanoutProps.shape,
|
|
35
45
|
})
|
|
36
46
|
|
|
@@ -4,6 +4,10 @@ import {
|
|
|
4
4
|
type SchematicPinArrangement,
|
|
5
5
|
schematicPinArrangement,
|
|
6
6
|
} from "lib/common/schematicPinDefinitions"
|
|
7
|
+
import {
|
|
8
|
+
type SchematicPinStyle,
|
|
9
|
+
schematicPinStyle,
|
|
10
|
+
} from "lib/common/schematicPinStyle"
|
|
7
11
|
import { type PinLabelsProp, pinLabelsProp } from "lib/components/chip"
|
|
8
12
|
import { expectTypesMatch } from "lib/typecheck"
|
|
9
13
|
import type { Distance } from "lib/common/distance"
|
|
@@ -15,6 +19,7 @@ export const schematicBoxProps = z
|
|
|
15
19
|
chipRef: z.string().optional(),
|
|
16
20
|
pinLabels: pinLabelsProp.optional(),
|
|
17
21
|
schPinArrangement: schematicPinArrangement.optional(),
|
|
22
|
+
schPinStyle: schematicPinStyle.optional(),
|
|
18
23
|
|
|
19
24
|
schX: distance.optional(),
|
|
20
25
|
schY: distance.optional(),
|
|
@@ -65,6 +70,8 @@ export interface SchematicBoxProps {
|
|
|
65
70
|
chipRef?: string
|
|
66
71
|
pinLabels?: PinLabelsProp
|
|
67
72
|
schPinArrangement?: SchematicPinArrangement
|
|
73
|
+
/** Per-pin schematic margin overrides keyed by pin number or label. */
|
|
74
|
+
schPinStyle?: SchematicPinStyle
|
|
68
75
|
schX?: Distance
|
|
69
76
|
schY?: Distance
|
|
70
77
|
schSectionName?: string
|