@tscircuit/props 0.0.680 → 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 +9 -0
- package/dist/index.d.ts +59 -1
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -1
- package/lib/components/copper-pour.ts +44 -19
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -757,6 +757,15 @@ export interface CopperPourProps {
|
|
|
757
757
|
name?: string;
|
|
758
758
|
layer: LayerRefInput;
|
|
759
759
|
connectsTo: string;
|
|
760
|
+
/**
|
|
761
|
+
* Fill with a 45-degree crosshatch (defaults: 0.25mm copper width, 1mm pitch).
|
|
762
|
+
* Preserves solid copper around boundaries and connections. Defaults to false.
|
|
763
|
+
*/
|
|
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;
|
|
760
769
|
/**
|
|
761
770
|
* Reserves the pour region during autorouting so unrelated traces do not
|
|
762
771
|
* split it. Vias may still cross the region using antipads.
|
package/dist/index.d.ts
CHANGED
|
@@ -211829,6 +211829,15 @@ interface CopperPourProps {
|
|
|
211829
211829
|
name?: string;
|
|
211830
211830
|
layer: LayerRefInput;
|
|
211831
211831
|
connectsTo: string;
|
|
211832
|
+
/**
|
|
211833
|
+
* Fill with a 45-degree crosshatch (defaults: 0.25mm copper width, 1mm pitch).
|
|
211834
|
+
* Preserves solid copper around boundaries and connections. Defaults to false.
|
|
211835
|
+
*/
|
|
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;
|
|
211832
211841
|
/**
|
|
211833
211842
|
* Reserves the pour region during autorouting so unrelated traces do not
|
|
211834
211843
|
* split it. Vias may still cross the region using antipads.
|
|
@@ -211843,7 +211852,7 @@ interface CopperPourProps {
|
|
|
211843
211852
|
outline?: Point[];
|
|
211844
211853
|
coveredWithSolderMask?: boolean;
|
|
211845
211854
|
}
|
|
211846
|
-
declare const copperPourProps: z.ZodObject<{
|
|
211855
|
+
declare const copperPourProps: z.ZodEffects<z.ZodObject<{
|
|
211847
211856
|
name: z.ZodOptional<z.ZodString>;
|
|
211848
211857
|
layer: z.ZodEffects<z.ZodUnion<[z.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6", "inner7", "inner8"]>, z.ZodObject<{
|
|
211849
211858
|
name: z.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6", "inner7", "inner8"]>;
|
|
@@ -211855,6 +211864,9 @@ declare const copperPourProps: z.ZodObject<{
|
|
|
211855
211864
|
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | "inner7" | "inner8";
|
|
211856
211865
|
}>;
|
|
211857
211866
|
connectsTo: z.ZodString;
|
|
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>>;
|
|
211858
211870
|
unbroken: z.ZodOptional<z.ZodBoolean>;
|
|
211859
211871
|
padMargin: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
211860
211872
|
traceMargin: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
@@ -211882,6 +211894,49 @@ declare const copperPourProps: z.ZodObject<{
|
|
|
211882
211894
|
x: number;
|
|
211883
211895
|
y: number;
|
|
211884
211896
|
}[] | undefined;
|
|
211897
|
+
crosshatch?: boolean | undefined;
|
|
211898
|
+
crosshatchPitch?: number | undefined;
|
|
211899
|
+
crosshatchWidth?: number | undefined;
|
|
211900
|
+
unbroken?: boolean | undefined;
|
|
211901
|
+
padMargin?: number | undefined;
|
|
211902
|
+
traceMargin?: number | undefined;
|
|
211903
|
+
clearance?: number | undefined;
|
|
211904
|
+
boardEdgeMargin?: number | undefined;
|
|
211905
|
+
cutoutMargin?: number | undefined;
|
|
211906
|
+
useThermalReliefs?: boolean | undefined;
|
|
211907
|
+
}, {
|
|
211908
|
+
connectsTo: string;
|
|
211909
|
+
layer: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | "inner7" | "inner8" | {
|
|
211910
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | "inner7" | "inner8";
|
|
211911
|
+
};
|
|
211912
|
+
name?: string | undefined;
|
|
211913
|
+
outline?: {
|
|
211914
|
+
x: string | number;
|
|
211915
|
+
y: string | number;
|
|
211916
|
+
}[] | undefined;
|
|
211917
|
+
coveredWithSolderMask?: boolean | undefined;
|
|
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;
|
|
211885
211940
|
unbroken?: boolean | undefined;
|
|
211886
211941
|
padMargin?: number | undefined;
|
|
211887
211942
|
traceMargin?: number | undefined;
|
|
@@ -211900,6 +211955,9 @@ declare const copperPourProps: z.ZodObject<{
|
|
|
211900
211955
|
y: string | number;
|
|
211901
211956
|
}[] | undefined;
|
|
211902
211957
|
coveredWithSolderMask?: boolean | undefined;
|
|
211958
|
+
crosshatch?: boolean | undefined;
|
|
211959
|
+
crosshatchPitch?: string | number | undefined;
|
|
211960
|
+
crosshatchWidth?: string | number | undefined;
|
|
211903
211961
|
unbroken?: boolean | undefined;
|
|
211904
211962
|
padMargin?: string | number | undefined;
|
|
211905
211963
|
traceMargin?: string | number | undefined;
|
package/dist/index.js
CHANGED
|
@@ -18896,6 +18896,9 @@ var copperPourProps = z120.object({
|
|
|
18896
18896
|
name: z120.string().optional(),
|
|
18897
18897
|
layer: layer_ref11,
|
|
18898
18898
|
connectsTo: z120.string(),
|
|
18899
|
+
crosshatch: z120.boolean().optional(),
|
|
18900
|
+
crosshatchPitch: distance.pipe(z120.number().finite().positive()).optional(),
|
|
18901
|
+
crosshatchWidth: distance.pipe(z120.number().finite().positive()).optional(),
|
|
18899
18902
|
unbroken: z120.boolean().optional().describe(
|
|
18900
18903
|
"Reserves the pour region during autorouting so unrelated traces do not split it. Vias may still cross the region using antipads."
|
|
18901
18904
|
),
|
|
@@ -18907,6 +18910,14 @@ var copperPourProps = z120.object({
|
|
|
18907
18910
|
useThermalReliefs: z120.boolean().optional(),
|
|
18908
18911
|
outline: z120.array(point).optional(),
|
|
18909
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
|
+
}
|
|
18910
18921
|
});
|
|
18911
18922
|
expectTypesMatch(true);
|
|
18912
18923
|
|