@tscircuit/props 0.0.374 → 0.0.376
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
|
@@ -518,6 +518,7 @@ export interface FabricationNoteDimensionProps
|
|
|
518
518
|
fontSize?: string | number;
|
|
519
519
|
color?: string;
|
|
520
520
|
arrowSize?: string | number;
|
|
521
|
+
units?: "in" | "mm";
|
|
521
522
|
}
|
|
522
523
|
```
|
|
523
524
|
|
|
@@ -908,6 +909,7 @@ export interface PcbNoteDimensionProps
|
|
|
908
909
|
fontSize?: string | number;
|
|
909
910
|
color?: string;
|
|
910
911
|
arrowSize?: string | number;
|
|
912
|
+
units?: "in" | "mm";
|
|
911
913
|
}
|
|
912
914
|
```
|
|
913
915
|
|
package/dist/index.d.ts
CHANGED
|
@@ -33499,9 +33499,10 @@ declare const portRef: z.ZodUnion<[z.ZodString, z.ZodType<{
|
|
|
33499
33499
|
}, z.ZodTypeDef, {
|
|
33500
33500
|
getPortSelector: () => string;
|
|
33501
33501
|
}>]>;
|
|
33502
|
-
declare const traceProps: z.ZodUnion<[z.ZodObject<{
|
|
33502
|
+
declare const traceProps: z.ZodEffects<z.ZodUnion<[z.ZodObject<{
|
|
33503
33503
|
key: z.ZodOptional<z.ZodString>;
|
|
33504
33504
|
thickness: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
33505
|
+
width: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
33505
33506
|
schematicRouteHints: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
33506
33507
|
x: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
33507
33508
|
y: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
@@ -33568,6 +33569,7 @@ declare const traceProps: z.ZodUnion<[z.ZodObject<{
|
|
|
33568
33569
|
})[];
|
|
33569
33570
|
key?: string | undefined;
|
|
33570
33571
|
highlightColor?: string | undefined;
|
|
33572
|
+
width?: number | undefined;
|
|
33571
33573
|
thickness?: number | undefined;
|
|
33572
33574
|
maxLength?: number | undefined;
|
|
33573
33575
|
schematicRouteHints?: {
|
|
@@ -33594,6 +33596,7 @@ declare const traceProps: z.ZodUnion<[z.ZodObject<{
|
|
|
33594
33596
|
})[];
|
|
33595
33597
|
key?: string | undefined;
|
|
33596
33598
|
highlightColor?: string | undefined;
|
|
33599
|
+
width?: string | number | undefined;
|
|
33597
33600
|
thickness?: string | number | undefined;
|
|
33598
33601
|
maxLength?: string | number | undefined;
|
|
33599
33602
|
schematicRouteHints?: {
|
|
@@ -33619,6 +33622,7 @@ declare const traceProps: z.ZodUnion<[z.ZodObject<{
|
|
|
33619
33622
|
}>, z.ZodObject<{
|
|
33620
33623
|
key: z.ZodOptional<z.ZodString>;
|
|
33621
33624
|
thickness: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
33625
|
+
width: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
33622
33626
|
schematicRouteHints: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
33623
33627
|
x: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
33624
33628
|
y: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
@@ -33693,6 +33697,7 @@ declare const traceProps: z.ZodUnion<[z.ZodObject<{
|
|
|
33693
33697
|
};
|
|
33694
33698
|
key?: string | undefined;
|
|
33695
33699
|
highlightColor?: string | undefined;
|
|
33700
|
+
width?: number | undefined;
|
|
33696
33701
|
thickness?: number | undefined;
|
|
33697
33702
|
maxLength?: number | undefined;
|
|
33698
33703
|
schematicRouteHints?: {
|
|
@@ -33722,6 +33727,7 @@ declare const traceProps: z.ZodUnion<[z.ZodObject<{
|
|
|
33722
33727
|
};
|
|
33723
33728
|
key?: string | undefined;
|
|
33724
33729
|
highlightColor?: string | undefined;
|
|
33730
|
+
width?: string | number | undefined;
|
|
33725
33731
|
thickness?: string | number | undefined;
|
|
33726
33732
|
maxLength?: string | number | undefined;
|
|
33727
33733
|
schematicRouteHints?: {
|
|
@@ -33744,7 +33750,125 @@ declare const traceProps: z.ZodUnion<[z.ZodObject<{
|
|
|
33744
33750
|
})[] | undefined;
|
|
33745
33751
|
schDisplayLabel?: string | undefined;
|
|
33746
33752
|
schStroke?: string | undefined;
|
|
33747
|
-
}>]
|
|
33753
|
+
}>]>, {
|
|
33754
|
+
thickness: number | undefined;
|
|
33755
|
+
path: (string | {
|
|
33756
|
+
getPortSelector: () => string;
|
|
33757
|
+
})[];
|
|
33758
|
+
key?: string | undefined;
|
|
33759
|
+
highlightColor?: string | undefined;
|
|
33760
|
+
width?: number | undefined;
|
|
33761
|
+
maxLength?: number | undefined;
|
|
33762
|
+
schematicRouteHints?: {
|
|
33763
|
+
x: number;
|
|
33764
|
+
y: number;
|
|
33765
|
+
}[] | undefined;
|
|
33766
|
+
pcbRouteHints?: {
|
|
33767
|
+
x: number;
|
|
33768
|
+
y: number;
|
|
33769
|
+
via?: boolean | undefined;
|
|
33770
|
+
to_layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | undefined;
|
|
33771
|
+
trace_width?: number | undefined;
|
|
33772
|
+
}[] | undefined;
|
|
33773
|
+
pcbPathRelativeTo?: string | undefined;
|
|
33774
|
+
pcbPath?: (string | {
|
|
33775
|
+
x: number;
|
|
33776
|
+
y: number;
|
|
33777
|
+
})[] | undefined;
|
|
33778
|
+
schDisplayLabel?: string | undefined;
|
|
33779
|
+
schStroke?: string | undefined;
|
|
33780
|
+
} | {
|
|
33781
|
+
thickness: number | undefined;
|
|
33782
|
+
from: string | {
|
|
33783
|
+
getPortSelector: () => string;
|
|
33784
|
+
};
|
|
33785
|
+
to: string | {
|
|
33786
|
+
getPortSelector: () => string;
|
|
33787
|
+
};
|
|
33788
|
+
key?: string | undefined;
|
|
33789
|
+
highlightColor?: string | undefined;
|
|
33790
|
+
width?: number | undefined;
|
|
33791
|
+
maxLength?: number | undefined;
|
|
33792
|
+
schematicRouteHints?: {
|
|
33793
|
+
x: number;
|
|
33794
|
+
y: number;
|
|
33795
|
+
}[] | undefined;
|
|
33796
|
+
pcbRouteHints?: {
|
|
33797
|
+
x: number;
|
|
33798
|
+
y: number;
|
|
33799
|
+
via?: boolean | undefined;
|
|
33800
|
+
to_layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | undefined;
|
|
33801
|
+
trace_width?: number | undefined;
|
|
33802
|
+
}[] | undefined;
|
|
33803
|
+
pcbPathRelativeTo?: string | undefined;
|
|
33804
|
+
pcbPath?: (string | {
|
|
33805
|
+
x: number;
|
|
33806
|
+
y: number;
|
|
33807
|
+
})[] | undefined;
|
|
33808
|
+
schDisplayLabel?: string | undefined;
|
|
33809
|
+
schStroke?: string | undefined;
|
|
33810
|
+
}, {
|
|
33811
|
+
path: (string | {
|
|
33812
|
+
getPortSelector: () => string;
|
|
33813
|
+
})[];
|
|
33814
|
+
key?: string | undefined;
|
|
33815
|
+
highlightColor?: string | undefined;
|
|
33816
|
+
width?: string | number | undefined;
|
|
33817
|
+
thickness?: string | number | undefined;
|
|
33818
|
+
maxLength?: string | number | undefined;
|
|
33819
|
+
schematicRouteHints?: {
|
|
33820
|
+
x: string | number;
|
|
33821
|
+
y: string | number;
|
|
33822
|
+
}[] | undefined;
|
|
33823
|
+
pcbRouteHints?: {
|
|
33824
|
+
x: string | number;
|
|
33825
|
+
y: string | number;
|
|
33826
|
+
via?: boolean | undefined;
|
|
33827
|
+
to_layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
|
|
33828
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
33829
|
+
} | undefined;
|
|
33830
|
+
trace_width?: string | number | undefined;
|
|
33831
|
+
}[] | undefined;
|
|
33832
|
+
pcbPathRelativeTo?: string | undefined;
|
|
33833
|
+
pcbPath?: (string | {
|
|
33834
|
+
x: string | number;
|
|
33835
|
+
y: string | number;
|
|
33836
|
+
})[] | undefined;
|
|
33837
|
+
schDisplayLabel?: string | undefined;
|
|
33838
|
+
schStroke?: string | undefined;
|
|
33839
|
+
} | {
|
|
33840
|
+
from: string | {
|
|
33841
|
+
getPortSelector: () => string;
|
|
33842
|
+
};
|
|
33843
|
+
to: string | {
|
|
33844
|
+
getPortSelector: () => string;
|
|
33845
|
+
};
|
|
33846
|
+
key?: string | undefined;
|
|
33847
|
+
highlightColor?: string | undefined;
|
|
33848
|
+
width?: string | number | undefined;
|
|
33849
|
+
thickness?: string | number | undefined;
|
|
33850
|
+
maxLength?: string | number | undefined;
|
|
33851
|
+
schematicRouteHints?: {
|
|
33852
|
+
x: string | number;
|
|
33853
|
+
y: string | number;
|
|
33854
|
+
}[] | undefined;
|
|
33855
|
+
pcbRouteHints?: {
|
|
33856
|
+
x: string | number;
|
|
33857
|
+
y: string | number;
|
|
33858
|
+
via?: boolean | undefined;
|
|
33859
|
+
to_layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
|
|
33860
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
33861
|
+
} | undefined;
|
|
33862
|
+
trace_width?: string | number | undefined;
|
|
33863
|
+
}[] | undefined;
|
|
33864
|
+
pcbPathRelativeTo?: string | undefined;
|
|
33865
|
+
pcbPath?: (string | {
|
|
33866
|
+
x: string | number;
|
|
33867
|
+
y: string | number;
|
|
33868
|
+
})[] | undefined;
|
|
33869
|
+
schDisplayLabel?: string | undefined;
|
|
33870
|
+
schStroke?: string | undefined;
|
|
33871
|
+
}>;
|
|
33748
33872
|
type TraceProps = z.input<typeof traceProps>;
|
|
33749
33873
|
|
|
33750
33874
|
interface FootprintProps {
|
|
@@ -46520,6 +46644,7 @@ interface FabricationNoteDimensionProps extends Omit<PcbLayoutProps, "pcbX" | "p
|
|
|
46520
46644
|
fontSize?: string | number;
|
|
46521
46645
|
color?: string;
|
|
46522
46646
|
arrowSize?: string | number;
|
|
46647
|
+
units?: "in" | "mm";
|
|
46523
46648
|
}
|
|
46524
46649
|
declare const fabricationNoteDimensionProps: z.ZodObject<Omit<{
|
|
46525
46650
|
pcbX: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
@@ -46573,6 +46698,7 @@ declare const fabricationNoteDimensionProps: z.ZodObject<Omit<{
|
|
|
46573
46698
|
fontSize: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
46574
46699
|
color: z.ZodOptional<z.ZodString>;
|
|
46575
46700
|
arrowSize: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
46701
|
+
units: z.ZodOptional<z.ZodEnum<["in", "mm"]>>;
|
|
46576
46702
|
}, "strip", z.ZodTypeAny, {
|
|
46577
46703
|
from: string | {
|
|
46578
46704
|
x: number;
|
|
@@ -46599,6 +46725,7 @@ declare const fabricationNoteDimensionProps: z.ZodObject<Omit<{
|
|
|
46599
46725
|
fontSize?: number | undefined;
|
|
46600
46726
|
offset?: number | undefined;
|
|
46601
46727
|
arrowSize?: number | undefined;
|
|
46728
|
+
units?: "in" | "mm" | undefined;
|
|
46602
46729
|
}, {
|
|
46603
46730
|
from: string | {
|
|
46604
46731
|
x: string | number;
|
|
@@ -46627,6 +46754,7 @@ declare const fabricationNoteDimensionProps: z.ZodObject<Omit<{
|
|
|
46627
46754
|
fontSize?: string | number | undefined;
|
|
46628
46755
|
offset?: string | number | undefined;
|
|
46629
46756
|
arrowSize?: string | number | undefined;
|
|
46757
|
+
units?: "in" | "mm" | undefined;
|
|
46630
46758
|
}>;
|
|
46631
46759
|
type FabricationNoteDimensionPropsInput = z.input<typeof fabricationNoteDimensionProps>;
|
|
46632
46760
|
|
|
@@ -53550,6 +53678,7 @@ interface PcbNoteDimensionProps extends Omit<PcbLayoutProps, "pcbX" | "pcbY" | "
|
|
|
53550
53678
|
fontSize?: string | number;
|
|
53551
53679
|
color?: string;
|
|
53552
53680
|
arrowSize?: string | number;
|
|
53681
|
+
units?: "in" | "mm";
|
|
53553
53682
|
}
|
|
53554
53683
|
declare const pcbNoteDimensionProps: z.ZodObject<Omit<{
|
|
53555
53684
|
pcbX: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
@@ -53603,6 +53732,7 @@ declare const pcbNoteDimensionProps: z.ZodObject<Omit<{
|
|
|
53603
53732
|
fontSize: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
53604
53733
|
color: z.ZodOptional<z.ZodString>;
|
|
53605
53734
|
arrowSize: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
53735
|
+
units: z.ZodOptional<z.ZodEnum<["in", "mm"]>>;
|
|
53606
53736
|
}, "strip", z.ZodTypeAny, {
|
|
53607
53737
|
from: string | {
|
|
53608
53738
|
x: number;
|
|
@@ -53629,6 +53759,7 @@ declare const pcbNoteDimensionProps: z.ZodObject<Omit<{
|
|
|
53629
53759
|
fontSize?: number | undefined;
|
|
53630
53760
|
offset?: number | undefined;
|
|
53631
53761
|
arrowSize?: number | undefined;
|
|
53762
|
+
units?: "in" | "mm" | undefined;
|
|
53632
53763
|
}, {
|
|
53633
53764
|
from: string | {
|
|
53634
53765
|
x: string | number;
|
|
@@ -53657,6 +53788,7 @@ declare const pcbNoteDimensionProps: z.ZodObject<Omit<{
|
|
|
53657
53788
|
fontSize?: string | number | undefined;
|
|
53658
53789
|
offset?: string | number | undefined;
|
|
53659
53790
|
arrowSize?: string | number | undefined;
|
|
53791
|
+
units?: "in" | "mm" | undefined;
|
|
53660
53792
|
}>;
|
|
53661
53793
|
type PcbNoteDimensionPropsInput = z.input<typeof pcbNoteDimensionProps>;
|
|
53662
53794
|
|
package/dist/index.js
CHANGED
|
@@ -1194,6 +1194,7 @@ var portRef = z50.union([
|
|
|
1194
1194
|
var baseTraceProps = z50.object({
|
|
1195
1195
|
key: z50.string().optional(),
|
|
1196
1196
|
thickness: distance13.optional(),
|
|
1197
|
+
width: distance13.optional(),
|
|
1197
1198
|
schematicRouteHints: z50.array(point).optional(),
|
|
1198
1199
|
pcbRouteHints: z50.array(route_hint_point2).optional(),
|
|
1199
1200
|
pcbPathRelativeTo: z50.string().optional(),
|
|
@@ -1211,7 +1212,10 @@ var traceProps = z50.union([
|
|
|
1211
1212
|
from: portRef,
|
|
1212
1213
|
to: portRef
|
|
1213
1214
|
})
|
|
1214
|
-
])
|
|
1215
|
+
]).transform((trace) => ({
|
|
1216
|
+
...trace,
|
|
1217
|
+
thickness: trace.thickness ?? trace.width
|
|
1218
|
+
}));
|
|
1215
1219
|
|
|
1216
1220
|
// lib/components/footprint.ts
|
|
1217
1221
|
import { layer_ref as layer_ref4 } from "circuit-json";
|
|
@@ -1599,7 +1603,8 @@ var fabricationNoteDimensionProps = pcbLayoutProps.omit({
|
|
|
1599
1603
|
font: z69.enum(["tscircuit2024"]).optional(),
|
|
1600
1604
|
fontSize: length5.optional(),
|
|
1601
1605
|
color: z69.string().optional(),
|
|
1602
|
-
arrowSize: distance16.optional()
|
|
1606
|
+
arrowSize: distance16.optional(),
|
|
1607
|
+
units: z69.enum(["in", "mm"]).optional()
|
|
1603
1608
|
});
|
|
1604
1609
|
expectTypesMatch(true);
|
|
1605
1610
|
|
|
@@ -2120,7 +2125,8 @@ var pcbNoteDimensionProps = pcbLayoutProps.omit({
|
|
|
2120
2125
|
font: z103.enum(["tscircuit2024"]).optional(),
|
|
2121
2126
|
fontSize: length11.optional(),
|
|
2122
2127
|
color: z103.string().optional(),
|
|
2123
|
-
arrowSize: distance37.optional()
|
|
2128
|
+
arrowSize: distance37.optional(),
|
|
2129
|
+
units: z103.enum(["in", "mm"]).optional()
|
|
2124
2130
|
});
|
|
2125
2131
|
expectTypesMatch(
|
|
2126
2132
|
true
|