@tscircuit/props 0.0.682 → 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 +49 -13
- package/dist/index.d.ts +1138 -497
- package/dist/index.js +1625 -1365
- package/dist/index.js.map +1 -1
- package/lib/assembly/board-mounting.ts +56 -0
- package/lib/assembly/index.ts +1 -0
- package/lib/assembly/motor.ts +11 -0
- package/lib/common/impedanceTarget.ts +125 -0
- package/lib/common/routeLength.ts +102 -0
- package/lib/common/traceSpacing.ts +18 -0
- package/lib/components/board.ts +26 -15
- 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
|
@@ -420,17 +420,16 @@ export interface BoardProps extends Omit<
|
|
|
420
420
|
"subcircuit" | "connections" | "outline"
|
|
421
421
|
> {
|
|
422
422
|
title?: string;
|
|
423
|
-
/**
|
|
424
|
-
* Assembly mounting target, such as "NEMA17.backface". Trimmed; omitted
|
|
425
|
-
* leaves the board unattached. The target face is resolved by the consumer.
|
|
426
|
-
*/
|
|
423
|
+
/** e.g. "NEMA17.backface". */
|
|
427
424
|
mountedTo?: string;
|
|
428
|
-
/**
|
|
429
|
-
* Nonnegative finite clearance between the target mounting face and the
|
|
430
|
-
* nearest PCB surface, in millimeters or a unit string. Parsed to mm.
|
|
431
|
-
* Omitted leaves the gap unset; only meaningful when mountedTo is supplied.
|
|
432
|
-
*/
|
|
425
|
+
/** Clearance from the mounting face, e.g. "6mm". */
|
|
433
426
|
mountGap?: Distance;
|
|
427
|
+
/** e.g. "J_USB" or "rightedge". */
|
|
428
|
+
mountRotationAnchor?: BoardMountRotationAnchor;
|
|
429
|
+
/** e.g. "calc(NEMA17.wireside-90degcw)". */
|
|
430
|
+
mountRotation?: string;
|
|
431
|
+
/** e.g. "top_layer_toward_mount_face". */
|
|
432
|
+
mountOrientation?: BoardMountOrientation;
|
|
434
433
|
/** Fabricator preset, preserved as supplied. Omitted leaves the preset unset. */
|
|
435
434
|
fabricatorPreset?:
|
|
436
435
|
| "jlcpcb_economy"
|
|
@@ -566,14 +565,34 @@ export interface BreakoutPointProps extends Omit<
|
|
|
566
565
|
```ts
|
|
567
566
|
export interface BusProps {
|
|
568
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
|
+
|
|
569
585
|
/** One or more trace names or port selectors for the connections in the bus. */
|
|
570
586
|
connections: string[];
|
|
571
587
|
/** If set, every trace in this bus is assigned to this autorouting phase. */
|
|
572
588
|
routingPhaseIndex?: number | null;
|
|
573
589
|
/** Maximum routed-length difference between bus members. Raw numbers are millimeters. */
|
|
574
590
|
maxLengthSkew?: number | string;
|
|
575
|
-
/** Intended single-ended
|
|
576
|
-
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;
|
|
577
596
|
/** Explicit PCB trace width for every bus member. Raw numbers are millimeters. */
|
|
578
597
|
pcbTraceWidth?: number | string;
|
|
579
598
|
/** PCB layers on which the bus may be routed. */
|
|
@@ -886,14 +905,31 @@ export interface RectCutoutProps extends Omit<
|
|
|
886
905
|
```ts
|
|
887
906
|
export interface DifferentialPairProps {
|
|
888
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
|
+
|
|
889
922
|
/** Name of the trace or pin carrying the positive signal. */
|
|
890
923
|
positiveConnection: string;
|
|
891
924
|
/** Name of the trace or pin carrying the negative signal. */
|
|
892
925
|
negativeConnection: string;
|
|
893
926
|
/** Maximum permitted routed-length skew. Raw numbers are millimeters. */
|
|
894
927
|
maxLengthSkew?: number | string;
|
|
895
|
-
/** Intended differential
|
|
896
|
-
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;
|
|
897
933
|
/** Edge-to-edge PCB copper gap between the pair. Raw numbers are millimeters. */
|
|
898
934
|
pcbTraceGap?: number | string;
|
|
899
935
|
/** Maximum length over which the pair may be routed without coupling. Raw numbers are millimeters. */
|