@tscircuit/props 0.0.352 → 0.0.354
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 +2 -0
- package/dist/index.d.ts +24 -10
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/lib/components/board.ts +4 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -177,10 +177,12 @@ export interface BatteryProps<PinLabel extends string = string>
|
|
|
177
177
|
|
|
178
178
|
```ts
|
|
179
179
|
export interface BoardProps extends Omit<SubcircuitGroupProps, "subcircuit"> {
|
|
180
|
+
title?: string;
|
|
180
181
|
material?: "fr4" | "fr1";
|
|
181
182
|
/** Number of layers for the PCB */
|
|
182
183
|
layers?: 2 | 4;
|
|
183
184
|
borderRadius?: Distance;
|
|
185
|
+
thickness?: Distance;
|
|
184
186
|
boardAnchorPosition?: Point;
|
|
185
187
|
boardAnchorAlignment?: z.infer<typeof ninePointAnchor>;
|
|
186
188
|
/** Color applied to both top and bottom solder masks */
|
package/dist/index.d.ts
CHANGED
|
@@ -10746,10 +10746,12 @@ declare const boardColorPresets: readonly ["not_specified", "green", "red", "blu
|
|
|
10746
10746
|
type BoardColorPreset = (typeof boardColorPresets)[number];
|
|
10747
10747
|
type BoardColor = AutocompleteString<BoardColorPreset>;
|
|
10748
10748
|
interface BoardProps extends Omit<SubcircuitGroupProps, "subcircuit"> {
|
|
10749
|
+
title?: string;
|
|
10749
10750
|
material?: "fr4" | "fr1";
|
|
10750
10751
|
/** Number of layers for the PCB */
|
|
10751
10752
|
layers?: 2 | 4;
|
|
10752
10753
|
borderRadius?: Distance;
|
|
10754
|
+
thickness?: Distance;
|
|
10753
10755
|
boardAnchorPosition?: Point;
|
|
10754
10756
|
boardAnchorAlignment?: z.infer<typeof ninePointAnchor>;
|
|
10755
10757
|
/** Color applied to both top and bottom solder masks */
|
|
@@ -11439,6 +11441,7 @@ declare const boardProps: z.ZodObject<{
|
|
|
11439
11441
|
material: z.ZodDefault<z.ZodEnum<["fr4", "fr1"]>>;
|
|
11440
11442
|
layers: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<2>, z.ZodLiteral<4>]>>;
|
|
11441
11443
|
borderRadius: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
11444
|
+
thickness: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
11442
11445
|
boardAnchorPosition: z.ZodOptional<z.ZodObject<{
|
|
11443
11446
|
x: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
11444
11447
|
y: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
@@ -11450,6 +11453,7 @@ declare const boardProps: z.ZodObject<{
|
|
|
11450
11453
|
y: string | number;
|
|
11451
11454
|
}>>;
|
|
11452
11455
|
boardAnchorAlignment: z.ZodOptional<z.ZodEnum<["top_left", "top_center", "top_right", "center_left", "center", "center_right", "bottom_left", "bottom_center", "bottom_right"]>>;
|
|
11456
|
+
title: z.ZodOptional<z.ZodString>;
|
|
11453
11457
|
solderMaskColor: z.ZodOptional<z.ZodType<BoardColor, z.ZodTypeDef, BoardColor>>;
|
|
11454
11458
|
topSolderMaskColor: z.ZodOptional<z.ZodType<BoardColor, z.ZodTypeDef, BoardColor>>;
|
|
11455
11459
|
bottomSolderMaskColor: z.ZodOptional<z.ZodType<BoardColor, z.ZodTypeDef, BoardColor>>;
|
|
@@ -11735,7 +11739,9 @@ declare const boardProps: z.ZodObject<{
|
|
|
11735
11739
|
}[] | undefined;
|
|
11736
11740
|
outlineOffsetX?: number | undefined;
|
|
11737
11741
|
outlineOffsetY?: number | undefined;
|
|
11742
|
+
title?: string | undefined;
|
|
11738
11743
|
borderRadius?: number | undefined;
|
|
11744
|
+
thickness?: number | undefined;
|
|
11739
11745
|
boardAnchorPosition?: {
|
|
11740
11746
|
x: number;
|
|
11741
11747
|
y: number;
|
|
@@ -12028,9 +12034,11 @@ declare const boardProps: z.ZodObject<{
|
|
|
12028
12034
|
}[] | undefined;
|
|
12029
12035
|
outlineOffsetX?: string | number | undefined;
|
|
12030
12036
|
outlineOffsetY?: string | number | undefined;
|
|
12037
|
+
title?: string | undefined;
|
|
12031
12038
|
material?: "fr4" | "fr1" | undefined;
|
|
12032
12039
|
layers?: 2 | 4 | undefined;
|
|
12033
12040
|
borderRadius?: string | number | undefined;
|
|
12041
|
+
thickness?: string | number | undefined;
|
|
12034
12042
|
boardAnchorPosition?: {
|
|
12035
12043
|
x: string | number;
|
|
12036
12044
|
y: string | number;
|
|
@@ -27920,6 +27928,7 @@ declare const stampboardProps: z.ZodObject<{
|
|
|
27920
27928
|
material: z.ZodDefault<z.ZodEnum<["fr4", "fr1"]>>;
|
|
27921
27929
|
layers: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<2>, z.ZodLiteral<4>]>>;
|
|
27922
27930
|
borderRadius: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
27931
|
+
thickness: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
27923
27932
|
boardAnchorPosition: z.ZodOptional<z.ZodObject<{
|
|
27924
27933
|
x: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
27925
27934
|
y: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
@@ -27931,6 +27940,7 @@ declare const stampboardProps: z.ZodObject<{
|
|
|
27931
27940
|
y: string | number;
|
|
27932
27941
|
}>>;
|
|
27933
27942
|
boardAnchorAlignment: z.ZodOptional<z.ZodEnum<["top_left", "top_center", "top_right", "center_left", "center", "center_right", "bottom_left", "bottom_center", "bottom_right"]>>;
|
|
27943
|
+
title: z.ZodOptional<z.ZodString>;
|
|
27934
27944
|
solderMaskColor: z.ZodOptional<z.ZodType<BoardColor, z.ZodTypeDef, BoardColor>>;
|
|
27935
27945
|
topSolderMaskColor: z.ZodOptional<z.ZodType<BoardColor, z.ZodTypeDef, BoardColor>>;
|
|
27936
27946
|
bottomSolderMaskColor: z.ZodOptional<z.ZodType<BoardColor, z.ZodTypeDef, BoardColor>>;
|
|
@@ -28231,7 +28241,9 @@ declare const stampboardProps: z.ZodObject<{
|
|
|
28231
28241
|
}[] | undefined;
|
|
28232
28242
|
outlineOffsetX?: number | undefined;
|
|
28233
28243
|
outlineOffsetY?: number | undefined;
|
|
28244
|
+
title?: string | undefined;
|
|
28234
28245
|
borderRadius?: number | undefined;
|
|
28246
|
+
thickness?: number | undefined;
|
|
28235
28247
|
boardAnchorPosition?: {
|
|
28236
28248
|
x: number;
|
|
28237
28249
|
y: number;
|
|
@@ -28534,9 +28546,11 @@ declare const stampboardProps: z.ZodObject<{
|
|
|
28534
28546
|
}[] | undefined;
|
|
28535
28547
|
outlineOffsetX?: string | number | undefined;
|
|
28536
28548
|
outlineOffsetY?: string | number | undefined;
|
|
28549
|
+
title?: string | undefined;
|
|
28537
28550
|
material?: "fr4" | "fr1" | undefined;
|
|
28538
28551
|
layers?: 2 | 4 | undefined;
|
|
28539
28552
|
borderRadius?: string | number | undefined;
|
|
28553
|
+
thickness?: string | number | undefined;
|
|
28540
28554
|
boardAnchorPosition?: {
|
|
28541
28555
|
x: string | number;
|
|
28542
28556
|
y: string | number;
|
|
@@ -31499,8 +31513,8 @@ declare const traceProps: z.ZodUnion<[z.ZodObject<{
|
|
|
31499
31513
|
})[];
|
|
31500
31514
|
key?: string | undefined;
|
|
31501
31515
|
highlightColor?: string | undefined;
|
|
31502
|
-
maxLength?: number | undefined;
|
|
31503
31516
|
thickness?: number | undefined;
|
|
31517
|
+
maxLength?: number | undefined;
|
|
31504
31518
|
schematicRouteHints?: {
|
|
31505
31519
|
x: number;
|
|
31506
31520
|
y: number;
|
|
@@ -31525,8 +31539,8 @@ declare const traceProps: z.ZodUnion<[z.ZodObject<{
|
|
|
31525
31539
|
})[];
|
|
31526
31540
|
key?: string | undefined;
|
|
31527
31541
|
highlightColor?: string | undefined;
|
|
31528
|
-
maxLength?: string | number | undefined;
|
|
31529
31542
|
thickness?: string | number | undefined;
|
|
31543
|
+
maxLength?: string | number | undefined;
|
|
31530
31544
|
schematicRouteHints?: {
|
|
31531
31545
|
x: string | number;
|
|
31532
31546
|
y: string | number;
|
|
@@ -31624,8 +31638,8 @@ declare const traceProps: z.ZodUnion<[z.ZodObject<{
|
|
|
31624
31638
|
};
|
|
31625
31639
|
key?: string | undefined;
|
|
31626
31640
|
highlightColor?: string | undefined;
|
|
31627
|
-
maxLength?: number | undefined;
|
|
31628
31641
|
thickness?: number | undefined;
|
|
31642
|
+
maxLength?: number | undefined;
|
|
31629
31643
|
schematicRouteHints?: {
|
|
31630
31644
|
x: number;
|
|
31631
31645
|
y: number;
|
|
@@ -31653,8 +31667,8 @@ declare const traceProps: z.ZodUnion<[z.ZodObject<{
|
|
|
31653
31667
|
};
|
|
31654
31668
|
key?: string | undefined;
|
|
31655
31669
|
highlightColor?: string | undefined;
|
|
31656
|
-
maxLength?: string | number | undefined;
|
|
31657
31670
|
thickness?: string | number | undefined;
|
|
31671
|
+
maxLength?: string | number | undefined;
|
|
31658
31672
|
schematicRouteHints?: {
|
|
31659
31673
|
x: string | number;
|
|
31660
31674
|
y: string | number;
|
|
@@ -48838,8 +48852,8 @@ declare const schematicBoxProps: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
|
48838
48852
|
paddingBottom?: number | undefined;
|
|
48839
48853
|
width?: number | undefined;
|
|
48840
48854
|
height?: number | undefined;
|
|
48841
|
-
overlay?: string[] | undefined;
|
|
48842
48855
|
title?: string | undefined;
|
|
48856
|
+
overlay?: string[] | undefined;
|
|
48843
48857
|
titleColor?: string | undefined;
|
|
48844
48858
|
titleFontSize?: number | undefined;
|
|
48845
48859
|
}, {
|
|
@@ -48852,8 +48866,8 @@ declare const schematicBoxProps: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
|
48852
48866
|
paddingBottom?: string | number | undefined;
|
|
48853
48867
|
width?: string | number | undefined;
|
|
48854
48868
|
height?: string | number | undefined;
|
|
48855
|
-
overlay?: string[] | undefined;
|
|
48856
48869
|
title?: string | undefined;
|
|
48870
|
+
overlay?: string[] | undefined;
|
|
48857
48871
|
titleAlignment?: "top_left" | "top_center" | "top_right" | "center_left" | "center" | "center_right" | "bottom_left" | "bottom_center" | "bottom_right" | undefined;
|
|
48858
48872
|
titleColor?: string | undefined;
|
|
48859
48873
|
titleFontSize?: string | number | undefined;
|
|
@@ -48872,8 +48886,8 @@ declare const schematicBoxProps: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
|
48872
48886
|
paddingBottom?: number | undefined;
|
|
48873
48887
|
width?: number | undefined;
|
|
48874
48888
|
height?: number | undefined;
|
|
48875
|
-
overlay?: string[] | undefined;
|
|
48876
48889
|
title?: string | undefined;
|
|
48890
|
+
overlay?: string[] | undefined;
|
|
48877
48891
|
titleColor?: string | undefined;
|
|
48878
48892
|
titleFontSize?: number | undefined;
|
|
48879
48893
|
}, {
|
|
@@ -48886,8 +48900,8 @@ declare const schematicBoxProps: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
|
48886
48900
|
paddingBottom?: string | number | undefined;
|
|
48887
48901
|
width?: string | number | undefined;
|
|
48888
48902
|
height?: string | number | undefined;
|
|
48889
|
-
overlay?: string[] | undefined;
|
|
48890
48903
|
title?: string | undefined;
|
|
48904
|
+
overlay?: string[] | undefined;
|
|
48891
48905
|
titleAlignment?: "top_left" | "top_center" | "top_right" | "center_left" | "center" | "center_right" | "bottom_left" | "bottom_center" | "bottom_right" | undefined;
|
|
48892
48906
|
titleColor?: string | undefined;
|
|
48893
48907
|
titleFontSize?: string | number | undefined;
|
|
@@ -48906,8 +48920,8 @@ declare const schematicBoxProps: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
|
48906
48920
|
paddingBottom?: number | undefined;
|
|
48907
48921
|
width?: number | undefined;
|
|
48908
48922
|
height?: number | undefined;
|
|
48909
|
-
overlay?: string[] | undefined;
|
|
48910
48923
|
title?: string | undefined;
|
|
48924
|
+
overlay?: string[] | undefined;
|
|
48911
48925
|
titleColor?: string | undefined;
|
|
48912
48926
|
titleFontSize?: number | undefined;
|
|
48913
48927
|
}, {
|
|
@@ -48920,8 +48934,8 @@ declare const schematicBoxProps: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
|
48920
48934
|
paddingBottom?: string | number | undefined;
|
|
48921
48935
|
width?: string | number | undefined;
|
|
48922
48936
|
height?: string | number | undefined;
|
|
48923
|
-
overlay?: string[] | undefined;
|
|
48924
48937
|
title?: string | undefined;
|
|
48938
|
+
overlay?: string[] | undefined;
|
|
48925
48939
|
titleAlignment?: "top_left" | "top_center" | "top_right" | "center_left" | "center" | "center_right" | "bottom_left" | "bottom_center" | "bottom_right" | undefined;
|
|
48926
48940
|
titleColor?: string | undefined;
|
|
48927
48941
|
titleFontSize?: string | number | undefined;
|
package/dist/index.js
CHANGED
|
@@ -638,8 +638,10 @@ var boardProps = subcircuitGroupProps.extend({
|
|
|
638
638
|
material: z28.enum(["fr4", "fr1"]).default("fr4"),
|
|
639
639
|
layers: z28.union([z28.literal(2), z28.literal(4)]).default(2),
|
|
640
640
|
borderRadius: distance.optional(),
|
|
641
|
+
thickness: distance.optional(),
|
|
641
642
|
boardAnchorPosition: point.optional(),
|
|
642
643
|
boardAnchorAlignment: ninePointAnchor.optional(),
|
|
644
|
+
title: z28.string().optional(),
|
|
643
645
|
solderMaskColor: boardColor.optional(),
|
|
644
646
|
topSolderMaskColor: boardColor.optional(),
|
|
645
647
|
bottomSolderMaskColor: boardColor.optional(),
|