@tscircuit/props 0.0.358 → 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 CHANGED
@@ -20,80 +20,86 @@ resistorProps.parse({ resistance: "10k" } as ResistorPropsInput);
20
20
 
21
21
  ## Available Components
22
22
 
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
- | `<fabricationnotepath />` | [`FabricationNotePathProps`](#fabricationnotepathprops-fabricationnotepath) |
44
- | `<fabricationnoterect />` | [`FabricationNoteRectProps`](#fabricationnoterectprops-fabricationnoterect) |
45
- | `<fabricationnotetext />` | [`FabricationNoteTextProps`](#fabricationnotetextprops-fabricationnotetext) |
46
- | `<footprint />` | [`FootprintProps`](#footprintprops-footprint) |
47
- | `<fuse />` | [`FuseProps`](#fuseprops-fuse) |
48
- | `<group />` | [`BaseGroupProps`](#basegroupprops-group) |
49
- | `<hole />` | [`CircleHoleProps`](#circleholeprops-hole) |
50
- | `<inductor />` | [`InductorProps`](#inductorprops-inductor) |
51
- | `<jumper />` | [`JumperProps`](#jumperprops-jumper) |
52
- | `<led />` | [`LedProps`](#ledprops-led) |
53
- | `<mosfet />` | [`MosfetProps`](#mosfetprops-mosfet) |
54
- | `<net />` | [`NetProps`](#netprops-net) |
55
- | `<netalias />` | [`NetAliasProps`](#netaliasprops-netalias) |
56
- | `<netlabel />` | [`NetLabelProps`](#netlabelprops-netlabel) |
57
- | `<pcbkeepout />` | [`PcbKeepoutProps`](#pcbkeepoutprops-pcbkeepout) |
58
- | `<pcbtrace />` | [`PcbTraceProps`](#pcbtraceprops-pcbtrace) |
59
- | `<pinheader />` | [`PinHeaderProps`](#pinheaderprops-pinheader) |
60
- | `<pinout />` | [`PinoutProps`](#pinoutprops-pinout) |
61
- | `<platedhole />` | [`CirclePlatedHoleProps`](#circleplatedholeprops-platedhole) |
62
- | `<port />` | [`PortProps`](#portprops-port) |
63
- | `<potentiometer />` | [`PotentiometerProps`](#potentiometerprops-potentiometer) |
64
- | `<powersource />` | [`PowerSourceProps`](#powersourceprops-powersource) |
65
- | `<pushbutton />` | [`PushButtonProps`](#pushbuttonprops-pushbutton) |
66
- | `<resistor />` | [`ResistorProps`](#resistorprops-resistor) |
67
- | `<resonator />` | [`ResonatorProps`](#resonatorprops-resonator) |
68
- | `<schematicarc />` | [`SchematicArcProps`](#schematicarcprops-schematicarc) |
69
- | `<schematicbox />` | [`SchematicBoxProps`](#schematicboxprops-schematicbox) |
70
- | `<schematiccell />` | [`SchematicCellProps`](#schematiccellprops-schematiccell) |
71
- | `<schematiccircle />` | [`SchematicCircleProps`](#schematiccircleprops-schematiccircle) |
72
- | `<schematicline />` | [`SchematicLineProps`](#schematiclineprops-schematicline) |
73
- | `<schematicpath />` | [`SchematicPathProps`](#schematicpathprops-schematicpath) |
74
- | `<schematicrect />` | [`SchematicRectProps`](#schematicrectprops-schematicrect) |
75
- | `<schematicrow />` | [`SchematicRowProps`](#schematicrowprops-schematicrow) |
76
- | `<schematictable />` | [`SchematicTableProps`](#schematictableprops-schematictable) |
77
- | `<schematictext />` | [`SchematicTextProps`](#schematictextprops-schematictext) |
78
- | `<silkscreencircle />` | [`SilkscreenCircleProps`](#silkscreencircleprops-silkscreencircle) |
79
- | `<silkscreenline />` | [`SilkscreenLineProps`](#silkscreenlineprops-silkscreenline) |
80
- | `<silkscreenpath />` | [`SilkscreenPathProps`](#silkscreenpathprops-silkscreenpath) |
81
- | `<silkscreenrect />` | [`SilkscreenRectProps`](#silkscreenrectprops-silkscreenrect) |
82
- | `<silkscreentext />` | [`SilkscreenTextProps`](#silkscreentextprops-silkscreentext) |
83
- | `<smtpad />` | [`RectSmtPadProps`](#rectsmtpadprops-smtpad) |
84
- | `<solderjumper />` | [`SolderJumperProps`](#solderjumperprops-solderjumper) |
85
- | `<solderpaste />` | [`RectSolderPasteProps`](#rectsolderpasteprops-solderpaste) |
86
- | `<stampboard />` | [`StampboardProps`](#stampboardprops-stampboard) |
87
- | `<subcircuit />` | [`SubcircuitProps`](#subcircuitprops-subcircuit) |
88
- | `<switch />` | [`SwitchProps`](#switchprops-switch) |
89
- | `<symbol />` | [`SymbolProps`](#symbolprops-symbol) |
90
- | `<testpoint />` | [`TestpointProps`](#testpointprops-testpoint) |
91
- | `<trace />` | [`TraceProps`](#traceprops-trace) |
92
- | `<tracehint />` | [`TraceHintProps`](#tracehintprops-tracehint) |
93
- | `<transistor />` | [`TransistorProps`](#transistorprops-transistor) |
94
- | `<via />` | [`ViaProps`](#viaprops-via) |
95
- | `<voltageprobe />` | [`VoltageProbeProps`](#voltageprobeprops-voltageprobe) |
96
- | `<voltagesource />` | [`VoltageSourceProps`](#voltagesourceprops-voltagesource) |
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 type FabricationNoteTextProps = z.input<typeof fabricationNoteTextProps>;
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)
@@ -623,6 +658,10 @@ export interface BaseGroupProps extends CommonLayoutProps, LayoutConfig {
623
658
  pcbPaddingRight?: Distance;
624
659
  pcbPaddingTop?: Distance;
625
660
  pcbPaddingBottom?: Distance;
661
+ /**
662
+ * Anchor to use when interpreting pcbX/pcbY relative to pcbPosition
663
+ */
664
+ pcbPositionAnchor?: AutocompleteString<z.infer<typeof ninePointAnchor>>;
626
665
 
627
666
  /** @deprecated Use `pcbGrid` */
628
667
  grid?: boolean;
@@ -828,6 +867,89 @@ export type PcbKeepoutProps = z.input<typeof pcbKeepoutProps>;
828
867
 
829
868
  [Source](https://github.com/tscircuit/props/blob/main/lib/components/pcb-keepout.ts)
830
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
+
831
953
  ### PcbTraceProps `<pcbtrace />`
832
954
 
833
955
  ```ts