@tscircuit/props 0.0.681 → 0.0.682

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
@@ -758,10 +758,14 @@ export interface CopperPourProps {
758
758
  layer: LayerRefInput;
759
759
  connectsTo: string;
760
760
  /**
761
- * Fill with a 45-degree crosshatch (0.25mm copper width, 1mm pitch).
761
+ * Fill with a 45-degree crosshatch (defaults: 0.25mm copper width, 1mm pitch).
762
762
  * Preserves solid copper around boundaries and connections. Defaults to false.
763
763
  */
764
764
  crosshatch?: boolean;
765
+ /** Repeat spacing perpendicular to the hatch strips. Defaults to 1mm when crosshatch is enabled. */
766
+ crosshatchPitch?: Distance;
767
+ /** Copper strip width, also used for the solid rim. Defaults to 0.25mm; must be less than the pitch when crosshatch is enabled. */
768
+ crosshatchWidth?: Distance;
765
769
  /**
766
770
  * Reserves the pour region during autorouting so unrelated traces do not
767
771
  * split it. Vias may still cross the region using antipads.
package/dist/index.d.ts CHANGED
@@ -211830,10 +211830,14 @@ interface CopperPourProps {
211830
211830
  layer: LayerRefInput;
211831
211831
  connectsTo: string;
211832
211832
  /**
211833
- * Fill with a 45-degree crosshatch (0.25mm copper width, 1mm pitch).
211833
+ * Fill with a 45-degree crosshatch (defaults: 0.25mm copper width, 1mm pitch).
211834
211834
  * Preserves solid copper around boundaries and connections. Defaults to false.
211835
211835
  */
211836
211836
  crosshatch?: boolean;
211837
+ /** Repeat spacing perpendicular to the hatch strips. Defaults to 1mm when crosshatch is enabled. */
211838
+ crosshatchPitch?: Distance;
211839
+ /** Copper strip width, also used for the solid rim. Defaults to 0.25mm; must be less than the pitch when crosshatch is enabled. */
211840
+ crosshatchWidth?: Distance;
211837
211841
  /**
211838
211842
  * Reserves the pour region during autorouting so unrelated traces do not
211839
211843
  * split it. Vias may still cross the region using antipads.
@@ -211848,7 +211852,7 @@ interface CopperPourProps {
211848
211852
  outline?: Point[];
211849
211853
  coveredWithSolderMask?: boolean;
211850
211854
  }
211851
- declare const copperPourProps: z.ZodObject<{
211855
+ declare const copperPourProps: z.ZodEffects<z.ZodObject<{
211852
211856
  name: z.ZodOptional<z.ZodString>;
211853
211857
  layer: z.ZodEffects<z.ZodUnion<[z.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6", "inner7", "inner8"]>, z.ZodObject<{
211854
211858
  name: z.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6", "inner7", "inner8"]>;
@@ -211861,6 +211865,8 @@ declare const copperPourProps: z.ZodObject<{
211861
211865
  }>;
211862
211866
  connectsTo: z.ZodString;
211863
211867
  crosshatch: z.ZodOptional<z.ZodBoolean>;
211868
+ crosshatchPitch: z.ZodOptional<z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>, z.ZodNumber>>;
211869
+ crosshatchWidth: z.ZodOptional<z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>, z.ZodNumber>>;
211864
211870
  unbroken: z.ZodOptional<z.ZodBoolean>;
211865
211871
  padMargin: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
211866
211872
  traceMargin: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
@@ -211889,6 +211895,8 @@ declare const copperPourProps: z.ZodObject<{
211889
211895
  y: number;
211890
211896
  }[] | undefined;
211891
211897
  crosshatch?: boolean | undefined;
211898
+ crosshatchPitch?: number | undefined;
211899
+ crosshatchWidth?: number | undefined;
211892
211900
  unbroken?: boolean | undefined;
211893
211901
  padMargin?: number | undefined;
211894
211902
  traceMargin?: number | undefined;
@@ -211908,6 +211916,48 @@ declare const copperPourProps: z.ZodObject<{
211908
211916
  }[] | undefined;
211909
211917
  coveredWithSolderMask?: boolean | undefined;
211910
211918
  crosshatch?: boolean | undefined;
211919
+ crosshatchPitch?: string | number | undefined;
211920
+ crosshatchWidth?: string | number | undefined;
211921
+ unbroken?: boolean | undefined;
211922
+ padMargin?: string | number | undefined;
211923
+ traceMargin?: string | number | undefined;
211924
+ clearance?: string | number | undefined;
211925
+ boardEdgeMargin?: string | number | undefined;
211926
+ cutoutMargin?: string | number | undefined;
211927
+ useThermalReliefs?: boolean | undefined;
211928
+ }>, {
211929
+ connectsTo: string;
211930
+ layer: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | "inner7" | "inner8";
211931
+ coveredWithSolderMask: boolean;
211932
+ name?: string | undefined;
211933
+ outline?: {
211934
+ x: number;
211935
+ y: number;
211936
+ }[] | undefined;
211937
+ crosshatch?: boolean | undefined;
211938
+ crosshatchPitch?: number | undefined;
211939
+ crosshatchWidth?: number | undefined;
211940
+ unbroken?: boolean | undefined;
211941
+ padMargin?: number | undefined;
211942
+ traceMargin?: number | undefined;
211943
+ clearance?: number | undefined;
211944
+ boardEdgeMargin?: number | undefined;
211945
+ cutoutMargin?: number | undefined;
211946
+ useThermalReliefs?: boolean | undefined;
211947
+ }, {
211948
+ connectsTo: string;
211949
+ layer: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | "inner7" | "inner8" | {
211950
+ name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | "inner7" | "inner8";
211951
+ };
211952
+ name?: string | undefined;
211953
+ outline?: {
211954
+ x: string | number;
211955
+ y: string | number;
211956
+ }[] | undefined;
211957
+ coveredWithSolderMask?: boolean | undefined;
211958
+ crosshatch?: boolean | undefined;
211959
+ crosshatchPitch?: string | number | undefined;
211960
+ crosshatchWidth?: string | number | undefined;
211911
211961
  unbroken?: boolean | undefined;
211912
211962
  padMargin?: string | number | undefined;
211913
211963
  traceMargin?: string | number | undefined;
package/dist/index.js CHANGED
@@ -18897,6 +18897,8 @@ var copperPourProps = z120.object({
18897
18897
  layer: layer_ref11,
18898
18898
  connectsTo: z120.string(),
18899
18899
  crosshatch: z120.boolean().optional(),
18900
+ crosshatchPitch: distance.pipe(z120.number().finite().positive()).optional(),
18901
+ crosshatchWidth: distance.pipe(z120.number().finite().positive()).optional(),
18900
18902
  unbroken: z120.boolean().optional().describe(
18901
18903
  "Reserves the pour region during autorouting so unrelated traces do not split it. Vias may still cross the region using antipads."
18902
18904
  ),
@@ -18908,6 +18910,14 @@ var copperPourProps = z120.object({
18908
18910
  useThermalReliefs: z120.boolean().optional(),
18909
18911
  outline: z120.array(point).optional(),
18910
18912
  coveredWithSolderMask: z120.boolean().optional().default(true)
18913
+ }).superRefine((props, ctx) => {
18914
+ if (props.crosshatch && (props.crosshatchWidth ?? 0.25) >= (props.crosshatchPitch ?? 1)) {
18915
+ ctx.addIssue({
18916
+ code: z120.ZodIssueCode.custom,
18917
+ path: ["crosshatchWidth"],
18918
+ message: "crosshatchWidth must be less than crosshatchPitch"
18919
+ });
18920
+ }
18911
18921
  });
18912
18922
  expectTypesMatch(true);
18913
18923