@tscircuit/props 0.0.375 → 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/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 {
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";