@tscircuit/props 0.0.683 → 0.0.684
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 +41 -4
- package/dist/index.d.ts +623 -17
- package/dist/index.js +854 -640
- package/dist/index.js.map +1 -1
- package/lib/common/impedanceTarget.ts +125 -0
- package/lib/common/routeLength.ts +102 -0
- package/lib/common/traceSpacing.ts +18 -0
- package/lib/components/bus.ts +85 -19
- package/lib/components/differentialpair.ts +79 -14
- package/lib/index.ts +11 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -565,14 +565,34 @@ export interface BreakoutPointProps extends Omit<
|
|
|
565
565
|
```ts
|
|
566
566
|
export interface BusProps {
|
|
567
567
|
name?: string;
|
|
568
|
+
/** Match these trace/port/bus/pair selectors as well as this element's members.
|
|
569
|
+
* maxLengthSkew applies to the combined members; no tolerance is inferred. */
|
|
570
|
+
lengthMatchTo?: string | string[];
|
|
571
|
+
/** Minimum/maximum pad-to-pad planar length for each member. Raw numbers are mm. */
|
|
572
|
+
minLength?: RouteLength;
|
|
573
|
+
maxLength?: RouteLength;
|
|
574
|
+
/** Nominal member length, absolute or relative to selected endpoints.
|
|
575
|
+
* Requires an explicit lengthTolerance, including zero for exact matching. */
|
|
576
|
+
targetLength?: RouteLength;
|
|
577
|
+
/** Allowed deviation above/below targetLength, in mm. */
|
|
578
|
+
lengthTolerance?: number | string;
|
|
579
|
+
/** Minimum centreline spacing between bus members, excluding declared pair partners.
|
|
580
|
+
* Raw numbers are mm; "3w" means three times the larger local trace width. */
|
|
581
|
+
pcbTraceSpacing?: TraceSpacing;
|
|
582
|
+
/** Minimum centreline spacing to traces outside this bus/pair (mm or e.g. "4w"). */
|
|
583
|
+
pcbSpacingToOtherSignals?: TraceSpacing;
|
|
584
|
+
|
|
568
585
|
/** One or more trace names or port selectors for the connections in the bus. */
|
|
569
586
|
connections: string[];
|
|
570
587
|
/** If set, every trace in this bus is assigned to this autorouting phase. */
|
|
571
588
|
routingPhaseIndex?: number | null;
|
|
572
589
|
/** Maximum routed-length difference between bus members. Raw numbers are millimeters. */
|
|
573
590
|
maxLengthSkew?: number | string;
|
|
574
|
-
/** Intended single-ended
|
|
575
|
-
targetImpedance?:
|
|
591
|
+
/** Intended single-ended impedance, e.g. "50±25ohm". Raw numbers are ohms. */
|
|
592
|
+
targetImpedance?: ImpedanceTarget;
|
|
593
|
+
/** Inclusive minimum/maximum acceptable impedance, in ohms. May be used without a nominal target. */
|
|
594
|
+
targetImpedanceMin?: number | string;
|
|
595
|
+
targetImpedanceMax?: number | string;
|
|
576
596
|
/** Explicit PCB trace width for every bus member. Raw numbers are millimeters. */
|
|
577
597
|
pcbTraceWidth?: number | string;
|
|
578
598
|
/** PCB layers on which the bus may be routed. */
|
|
@@ -885,14 +905,31 @@ export interface RectCutoutProps extends Omit<
|
|
|
885
905
|
```ts
|
|
886
906
|
export interface DifferentialPairProps {
|
|
887
907
|
name?: string;
|
|
908
|
+
/** Match these trace/port/bus/pair selectors as well as this element's members.
|
|
909
|
+
* maxLengthSkew applies to the combined members; no tolerance is inferred. */
|
|
910
|
+
lengthMatchTo?: string | string[];
|
|
911
|
+
/** Minimum/maximum pad-to-pad planar length for each member. Raw numbers are mm. */
|
|
912
|
+
minLength?: RouteLength;
|
|
913
|
+
maxLength?: RouteLength;
|
|
914
|
+
/** Nominal member length, absolute or relative to selected endpoints.
|
|
915
|
+
* Requires an explicit lengthTolerance, including zero for exact matching. */
|
|
916
|
+
targetLength?: RouteLength;
|
|
917
|
+
/** Allowed deviation above/below targetLength, in mm. */
|
|
918
|
+
lengthTolerance?: number | string;
|
|
919
|
+
/** Minimum centreline spacing to traces outside this bus/pair (mm or e.g. "4w"). */
|
|
920
|
+
pcbSpacingToOtherSignals?: TraceSpacing;
|
|
921
|
+
|
|
888
922
|
/** Name of the trace or pin carrying the positive signal. */
|
|
889
923
|
positiveConnection: string;
|
|
890
924
|
/** Name of the trace or pin carrying the negative signal. */
|
|
891
925
|
negativeConnection: string;
|
|
892
926
|
/** Maximum permitted routed-length skew. Raw numbers are millimeters. */
|
|
893
927
|
maxLengthSkew?: number | string;
|
|
894
|
-
/** Intended differential
|
|
895
|
-
targetDifferentialImpedance?:
|
|
928
|
+
/** Intended differential impedance, e.g. "100±10ohm". Raw numbers are ohms. */
|
|
929
|
+
targetDifferentialImpedance?: ImpedanceTarget;
|
|
930
|
+
/** Inclusive minimum/maximum acceptable impedance, in ohms. May be used without a nominal target. */
|
|
931
|
+
targetDifferentialImpedanceMin?: number | string;
|
|
932
|
+
targetDifferentialImpedanceMax?: number | string;
|
|
896
933
|
/** Edge-to-edge PCB copper gap between the pair. Raw numbers are millimeters. */
|
|
897
934
|
pcbTraceGap?: number | string;
|
|
898
935
|
/** Maximum length over which the pair may be routed without coupling. Raw numbers are millimeters. */
|