@tscircuit/props 0.0.359 → 0.0.360
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 +193 -75
- package/dist/index.d.ts +588 -5
- package/dist/index.js +343 -249
- package/dist/index.js.map +1 -1
- package/lib/components/fabrication-note-dimension.ts +41 -0
- package/lib/components/fabrication-note-text.ts +24 -2
- package/lib/components/pcb-note-dimension.ts +38 -0
- package/lib/components/pcb-note-line.ts +31 -0
- package/lib/components/pcb-note-path.ts +27 -0
- package/lib/components/pcb-note-rect.ts +30 -0
- package/lib/components/pcb-note-text.ts +31 -0
- package/lib/index.ts +6 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -20,80 +20,86 @@ resistorProps.parse({ resistance: "10k" } as ResistorPropsInput);
|
|
|
20
20
|
|
|
21
21
|
## Available Components
|
|
22
22
|
|
|
23
|
-
| Component
|
|
24
|
-
|
|
|
25
|
-
| `<analogsimulation />`
|
|
26
|
-
| `<battery />`
|
|
27
|
-
| `<board />`
|
|
28
|
-
| `<breakout />`
|
|
29
|
-
| `<breakoutpoint />`
|
|
30
|
-
| `<cadassembly />`
|
|
31
|
-
| `<cadmodel />`
|
|
32
|
-
| `<capacitor />`
|
|
33
|
-
| `<chip />`
|
|
34
|
-
| `<connector />`
|
|
35
|
-
| `<constrainedlayout />`
|
|
36
|
-
| `<constraint />`
|
|
37
|
-
| `<copperpour />`
|
|
38
|
-
| `<courtyardoutline />`
|
|
39
|
-
| `<courtyardrect />`
|
|
40
|
-
| `<crystal />`
|
|
41
|
-
| `<cutout />`
|
|
42
|
-
| `<diode />`
|
|
43
|
-
| `<
|
|
44
|
-
| `<
|
|
45
|
-
| `<
|
|
46
|
-
| `<
|
|
47
|
-
| `<
|
|
48
|
-
| `<
|
|
49
|
-
| `<
|
|
50
|
-
| `<
|
|
51
|
-
| `<
|
|
52
|
-
| `<
|
|
53
|
-
| `<
|
|
54
|
-
| `<
|
|
55
|
-
| `<
|
|
56
|
-
| `<
|
|
57
|
-
| `<
|
|
58
|
-
| `<
|
|
59
|
-
| `<
|
|
60
|
-
| `<
|
|
61
|
-
| `<
|
|
62
|
-
| `<
|
|
63
|
-
| `<
|
|
64
|
-
| `<
|
|
65
|
-
| `<
|
|
66
|
-
| `<
|
|
67
|
-
| `<
|
|
68
|
-
| `<
|
|
69
|
-
| `<
|
|
70
|
-
| `<
|
|
71
|
-
| `<
|
|
72
|
-
| `<
|
|
73
|
-
| `<
|
|
74
|
-
| `<
|
|
75
|
-
| `<
|
|
76
|
-
| `<
|
|
77
|
-
| `<
|
|
78
|
-
| `<
|
|
79
|
-
| `<
|
|
80
|
-
| `<
|
|
81
|
-
| `<
|
|
82
|
-
| `<
|
|
83
|
-
| `<
|
|
84
|
-
| `<
|
|
85
|
-
| `<
|
|
86
|
-
| `<
|
|
87
|
-
| `<
|
|
88
|
-
| `<
|
|
89
|
-
| `<
|
|
90
|
-
| `<
|
|
91
|
-
| `<
|
|
92
|
-
| `<
|
|
93
|
-
| `<
|
|
94
|
-
| `<
|
|
95
|
-
| `<
|
|
96
|
-
| `<
|
|
23
|
+
| Component | Props Interface |
|
|
24
|
+
| ------------------------------ | ------------------------------------------------------------------------------------------ |
|
|
25
|
+
| `<analogsimulation />` | [`AnalogSimulationProps`](#analogsimulationprops-analogsimulation) |
|
|
26
|
+
| `<battery />` | [`BatteryProps`](#batteryprops-battery) |
|
|
27
|
+
| `<board />` | [`BoardProps`](#boardprops-board) |
|
|
28
|
+
| `<breakout />` | [`BreakoutProps`](#breakoutprops-breakout) |
|
|
29
|
+
| `<breakoutpoint />` | [`BreakoutPointProps`](#breakoutpointprops-breakoutpoint) |
|
|
30
|
+
| `<cadassembly />` | [`CadAssemblyProps`](#cadassemblyprops-cadassembly) |
|
|
31
|
+
| `<cadmodel />` | [`CadModelProps`](#cadmodelprops-cadmodel) |
|
|
32
|
+
| `<capacitor />` | [`CapacitorProps`](#capacitorprops-capacitor) |
|
|
33
|
+
| `<chip />` | [`ChipProps`](#chipprops-chip) |
|
|
34
|
+
| `<connector />` | [`ConnectorProps`](#connectorprops-connector) |
|
|
35
|
+
| `<constrainedlayout />` | [`ConstrainedLayoutProps`](#constrainedlayoutprops-constrainedlayout) |
|
|
36
|
+
| `<constraint />` | [`ConstraintProps`](#constraintprops-constraint) |
|
|
37
|
+
| `<copperpour />` | [`CopperPourProps`](#copperpourprops-copperpour) |
|
|
38
|
+
| `<courtyardoutline />` | [`CourtyardOutlineProps`](#courtyardoutlineprops-courtyardoutline) |
|
|
39
|
+
| `<courtyardrect />` | [`CourtyardRectProps`](#courtyardrectprops-courtyardrect) |
|
|
40
|
+
| `<crystal />` | [`CrystalProps`](#crystalprops-crystal) |
|
|
41
|
+
| `<cutout />` | [`RectCutoutProps`](#rectcutoutprops-cutout) |
|
|
42
|
+
| `<diode />` | [`DiodeProps`](#diodeprops-diode) |
|
|
43
|
+
| `<fabricationnotedimension />` | [`FabricationNoteDimensionProps`](#fabricationnotedimensionprops-fabricationnotedimension) |
|
|
44
|
+
| `<fabricationnotepath />` | [`FabricationNotePathProps`](#fabricationnotepathprops-fabricationnotepath) |
|
|
45
|
+
| `<fabricationnoterect />` | [`FabricationNoteRectProps`](#fabricationnoterectprops-fabricationnoterect) |
|
|
46
|
+
| `<fabricationnotetext />` | [`FabricationNoteTextProps`](#fabricationnotetextprops-fabricationnotetext) |
|
|
47
|
+
| `<footprint />` | [`FootprintProps`](#footprintprops-footprint) |
|
|
48
|
+
| `<fuse />` | [`FuseProps`](#fuseprops-fuse) |
|
|
49
|
+
| `<group />` | [`BaseGroupProps`](#basegroupprops-group) |
|
|
50
|
+
| `<hole />` | [`CircleHoleProps`](#circleholeprops-hole) |
|
|
51
|
+
| `<inductor />` | [`InductorProps`](#inductorprops-inductor) |
|
|
52
|
+
| `<jumper />` | [`JumperProps`](#jumperprops-jumper) |
|
|
53
|
+
| `<led />` | [`LedProps`](#ledprops-led) |
|
|
54
|
+
| `<mosfet />` | [`MosfetProps`](#mosfetprops-mosfet) |
|
|
55
|
+
| `<net />` | [`NetProps`](#netprops-net) |
|
|
56
|
+
| `<netalias />` | [`NetAliasProps`](#netaliasprops-netalias) |
|
|
57
|
+
| `<netlabel />` | [`NetLabelProps`](#netlabelprops-netlabel) |
|
|
58
|
+
| `<pcbkeepout />` | [`PcbKeepoutProps`](#pcbkeepoutprops-pcbkeepout) |
|
|
59
|
+
| `<pcbnotedimension />` | [`PcbNoteDimensionProps`](#pcbnotedimensionprops-pcbnotedimension) |
|
|
60
|
+
| `<pcbnoteline />` | [`PcbNoteLineProps`](#pcbnotelineprops-pcbnoteline) |
|
|
61
|
+
| `<pcbnotepath />` | [`PcbNotePathProps`](#pcbnotepathprops-pcbnotepath) |
|
|
62
|
+
| `<pcbnoterect />` | [`PcbNoteRectProps`](#pcbnoterectprops-pcbnoterect) |
|
|
63
|
+
| `<pcbnotetext />` | [`PcbNoteTextProps`](#pcbnotetextprops-pcbnotetext) |
|
|
64
|
+
| `<pcbtrace />` | [`PcbTraceProps`](#pcbtraceprops-pcbtrace) |
|
|
65
|
+
| `<pinheader />` | [`PinHeaderProps`](#pinheaderprops-pinheader) |
|
|
66
|
+
| `<pinout />` | [`PinoutProps`](#pinoutprops-pinout) |
|
|
67
|
+
| `<platedhole />` | [`CirclePlatedHoleProps`](#circleplatedholeprops-platedhole) |
|
|
68
|
+
| `<port />` | [`PortProps`](#portprops-port) |
|
|
69
|
+
| `<potentiometer />` | [`PotentiometerProps`](#potentiometerprops-potentiometer) |
|
|
70
|
+
| `<powersource />` | [`PowerSourceProps`](#powersourceprops-powersource) |
|
|
71
|
+
| `<pushbutton />` | [`PushButtonProps`](#pushbuttonprops-pushbutton) |
|
|
72
|
+
| `<resistor />` | [`ResistorProps`](#resistorprops-resistor) |
|
|
73
|
+
| `<resonator />` | [`ResonatorProps`](#resonatorprops-resonator) |
|
|
74
|
+
| `<schematicarc />` | [`SchematicArcProps`](#schematicarcprops-schematicarc) |
|
|
75
|
+
| `<schematicbox />` | [`SchematicBoxProps`](#schematicboxprops-schematicbox) |
|
|
76
|
+
| `<schematiccell />` | [`SchematicCellProps`](#schematiccellprops-schematiccell) |
|
|
77
|
+
| `<schematiccircle />` | [`SchematicCircleProps`](#schematiccircleprops-schematiccircle) |
|
|
78
|
+
| `<schematicline />` | [`SchematicLineProps`](#schematiclineprops-schematicline) |
|
|
79
|
+
| `<schematicpath />` | [`SchematicPathProps`](#schematicpathprops-schematicpath) |
|
|
80
|
+
| `<schematicrect />` | [`SchematicRectProps`](#schematicrectprops-schematicrect) |
|
|
81
|
+
| `<schematicrow />` | [`SchematicRowProps`](#schematicrowprops-schematicrow) |
|
|
82
|
+
| `<schematictable />` | [`SchematicTableProps`](#schematictableprops-schematictable) |
|
|
83
|
+
| `<schematictext />` | [`SchematicTextProps`](#schematictextprops-schematictext) |
|
|
84
|
+
| `<silkscreencircle />` | [`SilkscreenCircleProps`](#silkscreencircleprops-silkscreencircle) |
|
|
85
|
+
| `<silkscreenline />` | [`SilkscreenLineProps`](#silkscreenlineprops-silkscreenline) |
|
|
86
|
+
| `<silkscreenpath />` | [`SilkscreenPathProps`](#silkscreenpathprops-silkscreenpath) |
|
|
87
|
+
| `<silkscreenrect />` | [`SilkscreenRectProps`](#silkscreenrectprops-silkscreenrect) |
|
|
88
|
+
| `<silkscreentext />` | [`SilkscreenTextProps`](#silkscreentextprops-silkscreentext) |
|
|
89
|
+
| `<smtpad />` | [`RectSmtPadProps`](#rectsmtpadprops-smtpad) |
|
|
90
|
+
| `<solderjumper />` | [`SolderJumperProps`](#solderjumperprops-solderjumper) |
|
|
91
|
+
| `<solderpaste />` | [`RectSolderPasteProps`](#rectsolderpasteprops-solderpaste) |
|
|
92
|
+
| `<stampboard />` | [`StampboardProps`](#stampboardprops-stampboard) |
|
|
93
|
+
| `<subcircuit />` | [`SubcircuitProps`](#subcircuitprops-subcircuit) |
|
|
94
|
+
| `<switch />` | [`SwitchProps`](#switchprops-switch) |
|
|
95
|
+
| `<symbol />` | [`SymbolProps`](#symbolprops-symbol) |
|
|
96
|
+
| `<testpoint />` | [`TestpointProps`](#testpointprops-testpoint) |
|
|
97
|
+
| `<trace />` | [`TraceProps`](#traceprops-trace) |
|
|
98
|
+
| `<tracehint />` | [`TraceHintProps`](#tracehintprops-tracehint) |
|
|
99
|
+
| `<transistor />` | [`TransistorProps`](#transistorprops-transistor) |
|
|
100
|
+
| `<via />` | [`ViaProps`](#viaprops-via) |
|
|
101
|
+
| `<voltageprobe />` | [`VoltageProbeProps`](#voltageprobeprops-voltageprobe) |
|
|
102
|
+
| `<voltagesource />` | [`VoltageSourceProps`](#voltagesourceprops-voltagesource) |
|
|
97
103
|
|
|
98
104
|
<!-- COMPONENT_TABLE_END -->
|
|
99
105
|
|
|
@@ -490,6 +496,24 @@ export interface DiodeProps<PinLabel extends string = string>
|
|
|
490
496
|
|
|
491
497
|
[Source](https://github.com/tscircuit/props/blob/main/lib/components/diode.ts)
|
|
492
498
|
|
|
499
|
+
### FabricationNoteDimensionProps `<fabricationnotedimension />`
|
|
500
|
+
|
|
501
|
+
```ts
|
|
502
|
+
export interface FabricationNoteDimensionProps
|
|
503
|
+
extends Omit<PcbLayoutProps, "pcbX" | "pcbY" | "pcbRotation"> {
|
|
504
|
+
from: string | Point;
|
|
505
|
+
to: string | Point;
|
|
506
|
+
text?: string;
|
|
507
|
+
offset?: string | number;
|
|
508
|
+
font?: "tscircuit2024";
|
|
509
|
+
fontSize?: string | number;
|
|
510
|
+
color?: string;
|
|
511
|
+
arrowSize?: string | number;
|
|
512
|
+
}
|
|
513
|
+
```
|
|
514
|
+
|
|
515
|
+
[Source](https://github.com/tscircuit/props/blob/main/lib/components/fabrication-note-dimension.ts)
|
|
516
|
+
|
|
493
517
|
### FabricationNotePathProps `<fabricationnotepath />`
|
|
494
518
|
|
|
495
519
|
```ts
|
|
@@ -509,7 +533,18 @@ export type FabricationNoteRectProps = z.input<typeof fabricationNoteRectProps>;
|
|
|
509
533
|
### FabricationNoteTextProps `<fabricationnotetext />`
|
|
510
534
|
|
|
511
535
|
```ts
|
|
512
|
-
export
|
|
536
|
+
export interface FabricationNoteTextProps extends PcbLayoutProps {
|
|
537
|
+
text: string;
|
|
538
|
+
anchorAlignment?:
|
|
539
|
+
| "center"
|
|
540
|
+
| "top_left"
|
|
541
|
+
| "top_right"
|
|
542
|
+
| "bottom_left"
|
|
543
|
+
| "bottom_right";
|
|
544
|
+
font?: "tscircuit2024";
|
|
545
|
+
fontSize?: string | number;
|
|
546
|
+
color?: string;
|
|
547
|
+
}
|
|
513
548
|
```
|
|
514
549
|
|
|
515
550
|
[Source](https://github.com/tscircuit/props/blob/main/lib/components/fabrication-note-text.ts)
|
|
@@ -832,6 +867,89 @@ export type PcbKeepoutProps = z.input<typeof pcbKeepoutProps>;
|
|
|
832
867
|
|
|
833
868
|
[Source](https://github.com/tscircuit/props/blob/main/lib/components/pcb-keepout.ts)
|
|
834
869
|
|
|
870
|
+
### PcbNoteDimensionProps `<pcbnotedimension />`
|
|
871
|
+
|
|
872
|
+
```ts
|
|
873
|
+
export interface PcbNoteDimensionProps
|
|
874
|
+
extends Omit<PcbLayoutProps, "pcbX" | "pcbY" | "pcbRotation"> {
|
|
875
|
+
from: string | Point;
|
|
876
|
+
to: string | Point;
|
|
877
|
+
text?: string;
|
|
878
|
+
offset?: string | number;
|
|
879
|
+
font?: "tscircuit2024";
|
|
880
|
+
fontSize?: string | number;
|
|
881
|
+
color?: string;
|
|
882
|
+
arrowSize?: string | number;
|
|
883
|
+
}
|
|
884
|
+
```
|
|
885
|
+
|
|
886
|
+
[Source](https://github.com/tscircuit/props/blob/main/lib/components/pcb-note-dimension.ts)
|
|
887
|
+
|
|
888
|
+
### PcbNoteLineProps `<pcbnoteline />`
|
|
889
|
+
|
|
890
|
+
```ts
|
|
891
|
+
export interface PcbNoteLineProps
|
|
892
|
+
extends Omit<PcbLayoutProps, "pcbX" | "pcbY" | "pcbRotation"> {
|
|
893
|
+
x1: string | number;
|
|
894
|
+
y1: string | number;
|
|
895
|
+
x2: string | number;
|
|
896
|
+
y2: string | number;
|
|
897
|
+
strokeWidth?: string | number;
|
|
898
|
+
color?: string;
|
|
899
|
+
isDashed?: boolean;
|
|
900
|
+
}
|
|
901
|
+
```
|
|
902
|
+
|
|
903
|
+
[Source](https://github.com/tscircuit/props/blob/main/lib/components/pcb-note-line.ts)
|
|
904
|
+
|
|
905
|
+
### PcbNotePathProps `<pcbnotepath />`
|
|
906
|
+
|
|
907
|
+
```ts
|
|
908
|
+
export interface PcbNotePathProps
|
|
909
|
+
extends Omit<PcbLayoutProps, "pcbX" | "pcbY" | "pcbRotation"> {
|
|
910
|
+
route: RouteHintPointInput[];
|
|
911
|
+
strokeWidth?: string | number;
|
|
912
|
+
color?: string;
|
|
913
|
+
}
|
|
914
|
+
```
|
|
915
|
+
|
|
916
|
+
[Source](https://github.com/tscircuit/props/blob/main/lib/components/pcb-note-path.ts)
|
|
917
|
+
|
|
918
|
+
### PcbNoteRectProps `<pcbnoterect />`
|
|
919
|
+
|
|
920
|
+
```ts
|
|
921
|
+
export interface PcbNoteRectProps extends Omit<PcbLayoutProps, "pcbRotation"> {
|
|
922
|
+
width: string | number;
|
|
923
|
+
height: string | number;
|
|
924
|
+
strokeWidth?: string | number;
|
|
925
|
+
isFilled?: boolean;
|
|
926
|
+
hasStroke?: boolean;
|
|
927
|
+
isStrokeDashed?: boolean;
|
|
928
|
+
color?: string;
|
|
929
|
+
}
|
|
930
|
+
```
|
|
931
|
+
|
|
932
|
+
[Source](https://github.com/tscircuit/props/blob/main/lib/components/pcb-note-rect.ts)
|
|
933
|
+
|
|
934
|
+
### PcbNoteTextProps `<pcbnotetext />`
|
|
935
|
+
|
|
936
|
+
```ts
|
|
937
|
+
export interface PcbNoteTextProps extends PcbLayoutProps {
|
|
938
|
+
text: string;
|
|
939
|
+
anchorAlignment?:
|
|
940
|
+
| "center"
|
|
941
|
+
| "top_left"
|
|
942
|
+
| "top_right"
|
|
943
|
+
| "bottom_left"
|
|
944
|
+
| "bottom_right";
|
|
945
|
+
font?: "tscircuit2024";
|
|
946
|
+
fontSize?: string | number;
|
|
947
|
+
color?: string;
|
|
948
|
+
}
|
|
949
|
+
```
|
|
950
|
+
|
|
951
|
+
[Source](https://github.com/tscircuit/props/blob/main/lib/components/pcb-note-text.ts)
|
|
952
|
+
|
|
835
953
|
### PcbTraceProps `<pcbtrace />`
|
|
836
954
|
|
|
837
955
|
```ts
|