@tscircuit/props 0.0.255 → 0.0.256
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 +345 -300
- package/dist/index.d.ts +34 -4
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/lib/components/chip.ts +5 -0
- package/lib/components/jumper.ts +5 -0
- package/lib/components/pin-header.ts +6 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -8094,6 +8094,10 @@ interface ChipPropsSU<PinLabel extends string = string> extends CommonComponentP
|
|
|
8094
8094
|
* Whether to show pin aliases in the schematic
|
|
8095
8095
|
*/
|
|
8096
8096
|
showPinAliases?: boolean;
|
|
8097
|
+
/**
|
|
8098
|
+
* Labels for PCB pins
|
|
8099
|
+
*/
|
|
8100
|
+
pcbPinLabels?: Record<string, string>;
|
|
8097
8101
|
schPinArrangement?: SchematicPortArrangement;
|
|
8098
8102
|
/** @deprecated Use schPinArrangement instead. */
|
|
8099
8103
|
schPortArrangement?: SchematicPortArrangement;
|
|
@@ -8410,6 +8414,7 @@ declare const chipProps: z.ZodObject<{
|
|
|
8410
8414
|
manufacturerPartNumber: z.ZodOptional<z.ZodString>;
|
|
8411
8415
|
pinLabels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodReadonly<z.ZodArray<z.ZodString, "many">>]>, z.ZodArray<z.ZodString, "many">]>>>;
|
|
8412
8416
|
showPinAliases: z.ZodOptional<z.ZodBoolean>;
|
|
8417
|
+
pcbPinLabels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
8413
8418
|
internallyConnectedPins: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodString, "many">, "many">>;
|
|
8414
8419
|
externallyConnectedPins: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodString, "many">, "many">>;
|
|
8415
8420
|
schPinArrangement: z.ZodOptional<z.ZodObject<{
|
|
@@ -8729,6 +8734,7 @@ declare const chipProps: z.ZodObject<{
|
|
|
8729
8734
|
manufacturerPartNumber?: string | undefined;
|
|
8730
8735
|
pinLabels?: Record<string, string | readonly string[] | string[]> | undefined;
|
|
8731
8736
|
showPinAliases?: boolean | undefined;
|
|
8737
|
+
pcbPinLabels?: Record<string, string> | undefined;
|
|
8732
8738
|
internallyConnectedPins?: string[][] | undefined;
|
|
8733
8739
|
externallyConnectedPins?: string[][] | undefined;
|
|
8734
8740
|
schPinArrangement?: {
|
|
@@ -8876,6 +8882,7 @@ declare const chipProps: z.ZodObject<{
|
|
|
8876
8882
|
manufacturerPartNumber?: string | undefined;
|
|
8877
8883
|
pinLabels?: Record<string, string | readonly string[] | string[]> | undefined;
|
|
8878
8884
|
showPinAliases?: boolean | undefined;
|
|
8885
|
+
pcbPinLabels?: Record<string, string> | undefined;
|
|
8879
8886
|
internallyConnectedPins?: string[][] | undefined;
|
|
8880
8887
|
externallyConnectedPins?: string[][] | undefined;
|
|
8881
8888
|
schPinArrangement?: {
|
|
@@ -9213,6 +9220,7 @@ declare const bugProps: z.ZodObject<{
|
|
|
9213
9220
|
manufacturerPartNumber: z.ZodOptional<z.ZodString>;
|
|
9214
9221
|
pinLabels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodReadonly<z.ZodArray<z.ZodString, "many">>]>, z.ZodArray<z.ZodString, "many">]>>>;
|
|
9215
9222
|
showPinAliases: z.ZodOptional<z.ZodBoolean>;
|
|
9223
|
+
pcbPinLabels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
9216
9224
|
internallyConnectedPins: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodString, "many">, "many">>;
|
|
9217
9225
|
externallyConnectedPins: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodString, "many">, "many">>;
|
|
9218
9226
|
schPinArrangement: z.ZodOptional<z.ZodObject<{
|
|
@@ -9532,6 +9540,7 @@ declare const bugProps: z.ZodObject<{
|
|
|
9532
9540
|
manufacturerPartNumber?: string | undefined;
|
|
9533
9541
|
pinLabels?: Record<string, string | readonly string[] | string[]> | undefined;
|
|
9534
9542
|
showPinAliases?: boolean | undefined;
|
|
9543
|
+
pcbPinLabels?: Record<string, string> | undefined;
|
|
9535
9544
|
internallyConnectedPins?: string[][] | undefined;
|
|
9536
9545
|
externallyConnectedPins?: string[][] | undefined;
|
|
9537
9546
|
schPinArrangement?: {
|
|
@@ -9679,6 +9688,7 @@ declare const bugProps: z.ZodObject<{
|
|
|
9679
9688
|
manufacturerPartNumber?: string | undefined;
|
|
9680
9689
|
pinLabels?: Record<string, string | readonly string[] | string[]> | undefined;
|
|
9681
9690
|
showPinAliases?: boolean | undefined;
|
|
9691
|
+
pcbPinLabels?: Record<string, string> | undefined;
|
|
9682
9692
|
internallyConnectedPins?: string[][] | undefined;
|
|
9683
9693
|
externallyConnectedPins?: string[][] | undefined;
|
|
9684
9694
|
schPinArrangement?: {
|
|
@@ -9762,6 +9772,10 @@ interface JumperProps extends CommonComponentProps {
|
|
|
9762
9772
|
schHeight?: number | string;
|
|
9763
9773
|
schDirection?: "left" | "right";
|
|
9764
9774
|
schPortArrangement?: SchematicPortArrangement;
|
|
9775
|
+
/**
|
|
9776
|
+
* Labels for PCB pins
|
|
9777
|
+
*/
|
|
9778
|
+
pcbPinLabels?: Record<string, string>;
|
|
9765
9779
|
/**
|
|
9766
9780
|
* Number of pins on the jumper (2 or 3)
|
|
9767
9781
|
*/
|
|
@@ -10169,6 +10183,7 @@ declare const jumperProps: z.ZodObject<{
|
|
|
10169
10183
|
topPinCount?: number | undefined;
|
|
10170
10184
|
bottomPinCount?: number | undefined;
|
|
10171
10185
|
}>>;
|
|
10186
|
+
pcbPinLabels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
10172
10187
|
pinCount: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<2>, z.ZodLiteral<3>]>>;
|
|
10173
10188
|
internallyConnectedPins: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodString, "many">, "many">>;
|
|
10174
10189
|
connections: z.ZodOptional<z.ZodPipeline<z.ZodType<Partial<Record<string, string | string[] | readonly string[]>>, z.ZodTypeDef, Partial<Record<string, string | string[] | readonly string[]>>>, z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodReadonly<z.ZodArray<z.ZodString, "many">>]>, z.ZodArray<z.ZodString, "many">]>>>>;
|
|
@@ -10245,6 +10260,7 @@ declare const jumperProps: z.ZodObject<{
|
|
|
10245
10260
|
schHeight?: number | undefined;
|
|
10246
10261
|
manufacturerPartNumber?: string | undefined;
|
|
10247
10262
|
pinLabels?: Record<string | number, string | string[]> | undefined;
|
|
10263
|
+
pcbPinLabels?: Record<string, string> | undefined;
|
|
10248
10264
|
internallyConnectedPins?: string[][] | undefined;
|
|
10249
10265
|
schPortArrangement?: {
|
|
10250
10266
|
leftSize?: number | undefined;
|
|
@@ -10361,6 +10377,7 @@ declare const jumperProps: z.ZodObject<{
|
|
|
10361
10377
|
schHeight?: string | number | undefined;
|
|
10362
10378
|
manufacturerPartNumber?: string | undefined;
|
|
10363
10379
|
pinLabels?: Record<string | number, string | string[]> | undefined;
|
|
10380
|
+
pcbPinLabels?: Record<string, string> | undefined;
|
|
10364
10381
|
internallyConnectedPins?: string[][] | undefined;
|
|
10365
10382
|
schPortArrangement?: {
|
|
10366
10383
|
leftSize?: number | undefined;
|
|
@@ -10807,6 +10824,7 @@ declare const solderjumperProps: z.ZodObject<{
|
|
|
10807
10824
|
topPinCount?: number | undefined;
|
|
10808
10825
|
bottomPinCount?: number | undefined;
|
|
10809
10826
|
}>>;
|
|
10827
|
+
pcbPinLabels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
10810
10828
|
pinCount: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<2>, z.ZodLiteral<3>]>>;
|
|
10811
10829
|
internallyConnectedPins: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodString, "many">, "many">>;
|
|
10812
10830
|
connections: z.ZodOptional<z.ZodPipeline<z.ZodType<Partial<Record<string, string | string[] | readonly string[]>>, z.ZodTypeDef, Partial<Record<string, string | string[] | readonly string[]>>>, z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodReadonly<z.ZodArray<z.ZodString, "many">>]>, z.ZodArray<z.ZodString, "many">]>>>>;
|
|
@@ -10886,6 +10904,7 @@ declare const solderjumperProps: z.ZodObject<{
|
|
|
10886
10904
|
schHeight?: number | undefined;
|
|
10887
10905
|
manufacturerPartNumber?: string | undefined;
|
|
10888
10906
|
pinLabels?: Record<string | number, string | string[]> | undefined;
|
|
10907
|
+
pcbPinLabels?: Record<string, string> | undefined;
|
|
10889
10908
|
internallyConnectedPins?: string[][] | undefined;
|
|
10890
10909
|
schPortArrangement?: {
|
|
10891
10910
|
leftSize?: number | undefined;
|
|
@@ -11004,6 +11023,7 @@ declare const solderjumperProps: z.ZodObject<{
|
|
|
11004
11023
|
schHeight?: string | number | undefined;
|
|
11005
11024
|
manufacturerPartNumber?: string | undefined;
|
|
11006
11025
|
pinLabels?: Record<string | number, string | string[]> | undefined;
|
|
11026
|
+
pcbPinLabels?: Record<string, string> | undefined;
|
|
11007
11027
|
internallyConnectedPins?: string[][] | undefined;
|
|
11008
11028
|
schPortArrangement?: {
|
|
11009
11029
|
leftSize?: number | undefined;
|
|
@@ -16740,6 +16760,7 @@ declare const traceProps: z.ZodUnion<[z.ZodObject<{
|
|
|
16740
16760
|
getPortSelector: () => string;
|
|
16741
16761
|
})[];
|
|
16742
16762
|
key?: string | undefined;
|
|
16763
|
+
maxLength?: number | undefined;
|
|
16743
16764
|
thickness?: number | undefined;
|
|
16744
16765
|
schematicRouteHints?: {
|
|
16745
16766
|
x: number;
|
|
@@ -16753,12 +16774,12 @@ declare const traceProps: z.ZodUnion<[z.ZodObject<{
|
|
|
16753
16774
|
trace_width?: number | undefined;
|
|
16754
16775
|
}[] | undefined;
|
|
16755
16776
|
schDisplayLabel?: string | undefined;
|
|
16756
|
-
maxLength?: number | undefined;
|
|
16757
16777
|
}, {
|
|
16758
16778
|
path: (string | {
|
|
16759
16779
|
getPortSelector: () => string;
|
|
16760
16780
|
})[];
|
|
16761
16781
|
key?: string | undefined;
|
|
16782
|
+
maxLength?: string | number | undefined;
|
|
16762
16783
|
thickness?: string | number | undefined;
|
|
16763
16784
|
schematicRouteHints?: {
|
|
16764
16785
|
x: string | number;
|
|
@@ -16774,7 +16795,6 @@ declare const traceProps: z.ZodUnion<[z.ZodObject<{
|
|
|
16774
16795
|
trace_width?: string | number | undefined;
|
|
16775
16796
|
}[] | undefined;
|
|
16776
16797
|
schDisplayLabel?: string | undefined;
|
|
16777
|
-
maxLength?: string | number | undefined;
|
|
16778
16798
|
}>, z.ZodObject<{
|
|
16779
16799
|
key: z.ZodOptional<z.ZodString>;
|
|
16780
16800
|
thickness: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
@@ -16838,6 +16858,7 @@ declare const traceProps: z.ZodUnion<[z.ZodObject<{
|
|
|
16838
16858
|
getPortSelector: () => string;
|
|
16839
16859
|
};
|
|
16840
16860
|
key?: string | undefined;
|
|
16861
|
+
maxLength?: number | undefined;
|
|
16841
16862
|
thickness?: number | undefined;
|
|
16842
16863
|
schematicRouteHints?: {
|
|
16843
16864
|
x: number;
|
|
@@ -16851,7 +16872,6 @@ declare const traceProps: z.ZodUnion<[z.ZodObject<{
|
|
|
16851
16872
|
trace_width?: number | undefined;
|
|
16852
16873
|
}[] | undefined;
|
|
16853
16874
|
schDisplayLabel?: string | undefined;
|
|
16854
|
-
maxLength?: number | undefined;
|
|
16855
16875
|
}, {
|
|
16856
16876
|
from: string | {
|
|
16857
16877
|
getPortSelector: () => string;
|
|
@@ -16860,6 +16880,7 @@ declare const traceProps: z.ZodUnion<[z.ZodObject<{
|
|
|
16860
16880
|
getPortSelector: () => string;
|
|
16861
16881
|
};
|
|
16862
16882
|
key?: string | undefined;
|
|
16883
|
+
maxLength?: string | number | undefined;
|
|
16863
16884
|
thickness?: string | number | undefined;
|
|
16864
16885
|
schematicRouteHints?: {
|
|
16865
16886
|
x: string | number;
|
|
@@ -16875,7 +16896,6 @@ declare const traceProps: z.ZodUnion<[z.ZodObject<{
|
|
|
16875
16896
|
trace_width?: string | number | undefined;
|
|
16876
16897
|
}[] | undefined;
|
|
16877
16898
|
schDisplayLabel?: string | undefined;
|
|
16878
|
-
maxLength?: string | number | undefined;
|
|
16879
16899
|
}>]>;
|
|
16880
16900
|
type TraceProps = z.input<typeof traceProps>;
|
|
16881
16901
|
|
|
@@ -17345,6 +17365,10 @@ interface PinHeaderProps extends CommonComponentProps {
|
|
|
17345
17365
|
* Whether to show pin labels in silkscreen
|
|
17346
17366
|
*/
|
|
17347
17367
|
showSilkscreenPinLabels?: boolean;
|
|
17368
|
+
/**
|
|
17369
|
+
* Labels for PCB pins
|
|
17370
|
+
*/
|
|
17371
|
+
pcbPinLabels?: Record<string, string>;
|
|
17348
17372
|
/**
|
|
17349
17373
|
* Whether the header has two rows of pins
|
|
17350
17374
|
*/
|
|
@@ -17654,6 +17678,7 @@ declare const pinHeaderProps: z.ZodObject<{
|
|
|
17654
17678
|
schFacingDirection: z.ZodOptional<z.ZodEnum<["up", "down", "left", "right"]>>;
|
|
17655
17679
|
gender: z.ZodDefault<z.ZodOptional<z.ZodEnum<["male", "female"]>>>;
|
|
17656
17680
|
showSilkscreenPinLabels: z.ZodOptional<z.ZodBoolean>;
|
|
17681
|
+
pcbPinLabels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
17657
17682
|
doubleRow: z.ZodOptional<z.ZodBoolean>;
|
|
17658
17683
|
holeDiameter: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
17659
17684
|
platedDiameter: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
@@ -17865,6 +17890,7 @@ declare const pinHeaderProps: z.ZodObject<{
|
|
|
17865
17890
|
schWidth?: number | undefined;
|
|
17866
17891
|
schHeight?: number | undefined;
|
|
17867
17892
|
pinLabels?: string[] | undefined;
|
|
17893
|
+
pcbPinLabels?: Record<string, string> | undefined;
|
|
17868
17894
|
schPinArrangement?: {
|
|
17869
17895
|
leftSize?: number | undefined;
|
|
17870
17896
|
topSize?: number | undefined;
|
|
@@ -17986,6 +18012,7 @@ declare const pinHeaderProps: z.ZodObject<{
|
|
|
17986
18012
|
schHeight?: string | number | undefined;
|
|
17987
18013
|
gender?: "male" | "female" | undefined;
|
|
17988
18014
|
pinLabels?: string[] | undefined;
|
|
18015
|
+
pcbPinLabels?: Record<string, string> | undefined;
|
|
17989
18016
|
schPinArrangement?: {
|
|
17990
18017
|
leftSize?: number | undefined;
|
|
17991
18018
|
topSize?: number | undefined;
|
|
@@ -18366,6 +18393,7 @@ declare const pushButtonProps: z.ZodObject<{
|
|
|
18366
18393
|
manufacturerPartNumber: z.ZodOptional<z.ZodString>;
|
|
18367
18394
|
pinLabels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodReadonly<z.ZodArray<z.ZodString, "many">>]>, z.ZodArray<z.ZodString, "many">]>>>;
|
|
18368
18395
|
showPinAliases: z.ZodOptional<z.ZodBoolean>;
|
|
18396
|
+
pcbPinLabels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
18369
18397
|
internallyConnectedPins: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodString, "many">, "many">>;
|
|
18370
18398
|
externallyConnectedPins: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodString, "many">, "many">>;
|
|
18371
18399
|
schPinArrangement: z.ZodOptional<z.ZodObject<{
|
|
@@ -18685,6 +18713,7 @@ declare const pushButtonProps: z.ZodObject<{
|
|
|
18685
18713
|
manufacturerPartNumber?: string | undefined;
|
|
18686
18714
|
pinLabels?: Record<string, string | readonly string[] | string[]> | undefined;
|
|
18687
18715
|
showPinAliases?: boolean | undefined;
|
|
18716
|
+
pcbPinLabels?: Record<string, string> | undefined;
|
|
18688
18717
|
internallyConnectedPins?: string[][] | undefined;
|
|
18689
18718
|
externallyConnectedPins?: string[][] | undefined;
|
|
18690
18719
|
schPinArrangement?: {
|
|
@@ -18832,6 +18861,7 @@ declare const pushButtonProps: z.ZodObject<{
|
|
|
18832
18861
|
manufacturerPartNumber?: string | undefined;
|
|
18833
18862
|
pinLabels?: Record<string, string | readonly string[] | string[]> | undefined;
|
|
18834
18863
|
showPinAliases?: boolean | undefined;
|
|
18864
|
+
pcbPinLabels?: Record<string, string> | undefined;
|
|
18835
18865
|
internallyConnectedPins?: string[][] | undefined;
|
|
18836
18866
|
externallyConnectedPins?: string[][] | undefined;
|
|
18837
18867
|
schPinArrangement?: {
|
package/dist/index.js
CHANGED
|
@@ -476,6 +476,7 @@ var chipProps = commonComponentProps.extend({
|
|
|
476
476
|
manufacturerPartNumber: z25.string().optional(),
|
|
477
477
|
pinLabels: pinLabelsProp.optional(),
|
|
478
478
|
showPinAliases: z25.boolean().optional(),
|
|
479
|
+
pcbPinLabels: z25.record(z25.string(), z25.string()).optional(),
|
|
479
480
|
internallyConnectedPins: z25.array(z25.array(z25.string())).optional(),
|
|
480
481
|
externallyConnectedPins: z25.array(z25.array(z25.string())).optional(),
|
|
481
482
|
schPinArrangement: schematicPortArrangement.optional(),
|
|
@@ -512,6 +513,7 @@ var jumperProps = commonComponentProps.extend({
|
|
|
512
513
|
schHeight: distance8.optional(),
|
|
513
514
|
schDirection: z27.enum(["left", "right"]).optional(),
|
|
514
515
|
schPortArrangement: schematicPortArrangement.optional(),
|
|
516
|
+
pcbPinLabels: z27.record(z27.string(), z27.string()).optional(),
|
|
515
517
|
pinCount: z27.union([z27.literal(2), z27.literal(3)]).optional(),
|
|
516
518
|
internallyConnectedPins: z27.array(z27.array(z27.string())).optional(),
|
|
517
519
|
connections: z27.custom().pipe(z27.record(z27.string(), connectionTarget2)).optional()
|
|
@@ -978,6 +980,7 @@ var pinHeaderProps = commonComponentProps.extend({
|
|
|
978
980
|
schFacingDirection: z49.enum(["up", "down", "left", "right"]).optional(),
|
|
979
981
|
gender: z49.enum(["male", "female"]).optional().default("male"),
|
|
980
982
|
showSilkscreenPinLabels: z49.boolean().optional(),
|
|
983
|
+
pcbPinLabels: z49.record(z49.string(), z49.string()).optional(),
|
|
981
984
|
doubleRow: z49.boolean().optional(),
|
|
982
985
|
holeDiameter: distance14.optional(),
|
|
983
986
|
platedDiameter: distance14.optional(),
|