@tscircuit/props 0.0.327 → 0.0.329
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 +31 -3
- package/dist/index.d.ts +115 -17
- package/dist/index.js +21 -5
- package/dist/index.js.map +1 -1
- package/lib/components/hole.ts +22 -3
- package/lib/components/platedhole.ts +8 -4
- package/lib/platformConfig.ts +19 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -37,7 +37,7 @@ resistorProps.parse({ resistance: "10k" } as ResistorPropsInput);
|
|
|
37
37
|
| `<footprint />` | [`FootprintProps`](#footprintprops-footprint) |
|
|
38
38
|
| `<fuse />` | [`FuseProps`](#fuseprops-fuse) |
|
|
39
39
|
| `<group />` | [`BaseGroupProps`](#basegroupprops-group) |
|
|
40
|
-
| `<hole />` | [`
|
|
40
|
+
| `<hole />` | [`CircleHoleProps`](#circleholeprops-hole) |
|
|
41
41
|
| `<inductor />` | [`InductorProps`](#inductorprops-inductor) |
|
|
42
42
|
| `<jumper />` | [`JumperProps`](#jumperprops-jumper) |
|
|
43
43
|
| `<mosfet />` | [`MosfetProps`](#mosfetprops-mosfet) |
|
|
@@ -461,6 +461,21 @@ export interface BaseGroupProps extends CommonLayoutProps, LayoutConfig {
|
|
|
461
461
|
*/
|
|
462
462
|
schTitle?: string;
|
|
463
463
|
|
|
464
|
+
/**
|
|
465
|
+
* If true, render this group as a single schematic box
|
|
466
|
+
*/
|
|
467
|
+
showAsSchematicBox?: boolean;
|
|
468
|
+
|
|
469
|
+
/**
|
|
470
|
+
* Mapping of external pin names to internal connection targets
|
|
471
|
+
*/
|
|
472
|
+
connections?: Connections;
|
|
473
|
+
|
|
474
|
+
/**
|
|
475
|
+
* Arrangement for pins when rendered as a schematic box
|
|
476
|
+
*/
|
|
477
|
+
schPinArrangement?: SchematicPinArrangement;
|
|
478
|
+
|
|
464
479
|
pcbWidth?: Distance;
|
|
465
480
|
pcbHeight?: Distance;
|
|
466
481
|
schWidth?: Distance;
|
|
@@ -547,11 +562,12 @@ export interface BaseGroupProps extends CommonLayoutProps, LayoutConfig {
|
|
|
547
562
|
|
|
548
563
|
[Source](https://github.com/tscircuit/props/blob/main/lib/components/group.ts)
|
|
549
564
|
|
|
550
|
-
###
|
|
565
|
+
### CircleHoleProps `<hole />`
|
|
551
566
|
|
|
552
567
|
```ts
|
|
553
|
-
export interface
|
|
568
|
+
export interface CircleHoleProps extends PcbLayoutProps {
|
|
554
569
|
name?: string;
|
|
570
|
+
shape?: "circle";
|
|
555
571
|
diameter?: Distance;
|
|
556
572
|
radius?: Distance;
|
|
557
573
|
}
|
|
@@ -879,6 +895,7 @@ export interface RectSmtPadProps extends Omit<PcbLayoutProps, "pcbRotation"> {
|
|
|
879
895
|
shape: "rect";
|
|
880
896
|
width: Distance;
|
|
881
897
|
height: Distance;
|
|
898
|
+
rectBorderRadius?: Distance;
|
|
882
899
|
portHints?: PortHints;
|
|
883
900
|
coveredWithSolderMask?: boolean;
|
|
884
901
|
}
|
|
@@ -1052,6 +1069,15 @@ export interface VoltageSourceProps<PinLabel extends string = string>
|
|
|
1052
1069
|
### PlatformConfig
|
|
1053
1070
|
|
|
1054
1071
|
```ts
|
|
1072
|
+
export interface FootprintLibraryResult {
|
|
1073
|
+
footprintCircuitJson: any[];
|
|
1074
|
+
cadModel?: CadModelProp;
|
|
1075
|
+
}
|
|
1076
|
+
|
|
1077
|
+
export interface FootprintFileParserEntry {
|
|
1078
|
+
loadFromUrl: (url: string) => Promise<FootprintLibraryResult>;
|
|
1079
|
+
}
|
|
1080
|
+
|
|
1055
1081
|
export interface PlatformConfig {
|
|
1056
1082
|
partsEngine?: PartsEngine;
|
|
1057
1083
|
|
|
@@ -1082,6 +1108,8 @@ export interface PlatformConfig {
|
|
|
1082
1108
|
any[] | ((path: string) => Promise<FootprintLibraryResult>)
|
|
1083
1109
|
>
|
|
1084
1110
|
>;
|
|
1111
|
+
|
|
1112
|
+
footprintFileParserMap?: Record<string, FootprintFileParserEntry>;
|
|
1085
1113
|
}
|
|
1086
1114
|
```
|
|
1087
1115
|
|
package/dist/index.d.ts
CHANGED
|
@@ -22373,8 +22373,8 @@ interface CircularHoleWithRectPlatedProps extends Omit<PcbLayoutProps, "pcbRotat
|
|
|
22373
22373
|
holeShape?: "circle";
|
|
22374
22374
|
padShape?: "rect";
|
|
22375
22375
|
portHints?: PortHints;
|
|
22376
|
-
|
|
22377
|
-
|
|
22376
|
+
holeOffsetX?: number | string;
|
|
22377
|
+
holeOffsetY?: number | string;
|
|
22378
22378
|
}
|
|
22379
22379
|
interface PillWithRectPadPlatedHoleProps extends Omit<PcbLayoutProps, "pcbRotation" | "layer"> {
|
|
22380
22380
|
name?: string;
|
|
@@ -22387,6 +22387,8 @@ interface PillWithRectPadPlatedHoleProps extends Omit<PcbLayoutProps, "pcbRotati
|
|
|
22387
22387
|
rectPadWidth: number | string;
|
|
22388
22388
|
rectPadHeight: number | string;
|
|
22389
22389
|
portHints?: PortHints;
|
|
22390
|
+
holeOffsetX?: number | string;
|
|
22391
|
+
holeOffsetY?: number | string;
|
|
22390
22392
|
}
|
|
22391
22393
|
type PlatedHoleProps = CirclePlatedHoleProps | OvalPlatedHoleProps | PillPlatedHoleProps | CircularHoleWithRectPlatedProps | PillWithRectPadPlatedHoleProps;
|
|
22392
22394
|
declare const platedHoleProps: z.ZodEffects<z.ZodDiscriminatedUnion<"shape", [z.ZodObject<Omit<{
|
|
@@ -22648,8 +22650,8 @@ declare const platedHoleProps: z.ZodEffects<z.ZodDiscriminatedUnion<"shape", [z.
|
|
|
22648
22650
|
holeShape: z.ZodOptional<z.ZodLiteral<"circle">>;
|
|
22649
22651
|
padShape: z.ZodOptional<z.ZodLiteral<"rect">>;
|
|
22650
22652
|
portHints: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">>;
|
|
22651
|
-
|
|
22652
|
-
|
|
22653
|
+
holeOffsetX: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
22654
|
+
holeOffsetY: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
22653
22655
|
}, "strip", z.ZodTypeAny, {
|
|
22654
22656
|
shape: "circular_hole_with_rect_pad";
|
|
22655
22657
|
holeDiameter: number;
|
|
@@ -22672,8 +22674,8 @@ declare const platedHoleProps: z.ZodEffects<z.ZodDiscriminatedUnion<"shape", [z.
|
|
|
22672
22674
|
rectBorderRadius?: number | undefined;
|
|
22673
22675
|
holeShape?: "circle" | undefined;
|
|
22674
22676
|
padShape?: "rect" | undefined;
|
|
22675
|
-
|
|
22676
|
-
|
|
22677
|
+
holeOffsetX?: number | undefined;
|
|
22678
|
+
holeOffsetY?: number | undefined;
|
|
22677
22679
|
}, {
|
|
22678
22680
|
shape: "circular_hole_with_rect_pad";
|
|
22679
22681
|
holeDiameter: string | number;
|
|
@@ -22696,8 +22698,8 @@ declare const platedHoleProps: z.ZodEffects<z.ZodDiscriminatedUnion<"shape", [z.
|
|
|
22696
22698
|
rectBorderRadius?: string | number | undefined;
|
|
22697
22699
|
holeShape?: "circle" | undefined;
|
|
22698
22700
|
padShape?: "rect" | undefined;
|
|
22699
|
-
|
|
22700
|
-
|
|
22701
|
+
holeOffsetX?: string | number | undefined;
|
|
22702
|
+
holeOffsetY?: string | number | undefined;
|
|
22701
22703
|
}>, z.ZodObject<Omit<{
|
|
22702
22704
|
pcbX: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
22703
22705
|
pcbY: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
@@ -22731,6 +22733,8 @@ declare const platedHoleProps: z.ZodEffects<z.ZodDiscriminatedUnion<"shape", [z.
|
|
|
22731
22733
|
rectPadWidth: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
22732
22734
|
rectPadHeight: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
22733
22735
|
portHints: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">>;
|
|
22736
|
+
holeOffsetX: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
22737
|
+
holeOffsetY: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
22734
22738
|
}, "strip", z.ZodTypeAny, {
|
|
22735
22739
|
shape: "pill_hole_with_rect_pad";
|
|
22736
22740
|
holeWidth: number;
|
|
@@ -22753,6 +22757,8 @@ declare const platedHoleProps: z.ZodEffects<z.ZodDiscriminatedUnion<"shape", [z.
|
|
|
22753
22757
|
name?: string | undefined;
|
|
22754
22758
|
connectsTo?: string | string[] | undefined;
|
|
22755
22759
|
portHints?: (string | number)[] | undefined;
|
|
22760
|
+
holeOffsetX?: number | undefined;
|
|
22761
|
+
holeOffsetY?: number | undefined;
|
|
22756
22762
|
}, {
|
|
22757
22763
|
shape: "pill_hole_with_rect_pad";
|
|
22758
22764
|
holeWidth: string | number;
|
|
@@ -22775,6 +22781,8 @@ declare const platedHoleProps: z.ZodEffects<z.ZodDiscriminatedUnion<"shape", [z.
|
|
|
22775
22781
|
name?: string | undefined;
|
|
22776
22782
|
connectsTo?: string | string[] | undefined;
|
|
22777
22783
|
portHints?: (string | number)[] | undefined;
|
|
22784
|
+
holeOffsetX?: string | number | undefined;
|
|
22785
|
+
holeOffsetY?: string | number | undefined;
|
|
22778
22786
|
}>]>, {
|
|
22779
22787
|
shape: "circle";
|
|
22780
22788
|
holeDiameter: number;
|
|
@@ -22862,8 +22870,8 @@ declare const platedHoleProps: z.ZodEffects<z.ZodDiscriminatedUnion<"shape", [z.
|
|
|
22862
22870
|
rectBorderRadius?: number | undefined;
|
|
22863
22871
|
holeShape?: "circle" | undefined;
|
|
22864
22872
|
padShape?: "rect" | undefined;
|
|
22865
|
-
|
|
22866
|
-
|
|
22873
|
+
holeOffsetX?: number | undefined;
|
|
22874
|
+
holeOffsetY?: number | undefined;
|
|
22867
22875
|
} | {
|
|
22868
22876
|
shape: "pill_hole_with_rect_pad";
|
|
22869
22877
|
holeWidth: number;
|
|
@@ -22886,6 +22894,8 @@ declare const platedHoleProps: z.ZodEffects<z.ZodDiscriminatedUnion<"shape", [z.
|
|
|
22886
22894
|
name?: string | undefined;
|
|
22887
22895
|
connectsTo?: string | string[] | undefined;
|
|
22888
22896
|
portHints?: (string | number)[] | undefined;
|
|
22897
|
+
holeOffsetX?: number | undefined;
|
|
22898
|
+
holeOffsetY?: number | undefined;
|
|
22889
22899
|
}, {
|
|
22890
22900
|
shape: "circle";
|
|
22891
22901
|
holeDiameter: string | number;
|
|
@@ -22973,8 +22983,8 @@ declare const platedHoleProps: z.ZodEffects<z.ZodDiscriminatedUnion<"shape", [z.
|
|
|
22973
22983
|
rectBorderRadius?: string | number | undefined;
|
|
22974
22984
|
holeShape?: "circle" | undefined;
|
|
22975
22985
|
padShape?: "rect" | undefined;
|
|
22976
|
-
|
|
22977
|
-
|
|
22986
|
+
holeOffsetX?: string | number | undefined;
|
|
22987
|
+
holeOffsetY?: string | number | undefined;
|
|
22978
22988
|
} | {
|
|
22979
22989
|
shape: "pill_hole_with_rect_pad";
|
|
22980
22990
|
holeWidth: string | number;
|
|
@@ -22997,6 +23007,8 @@ declare const platedHoleProps: z.ZodEffects<z.ZodDiscriminatedUnion<"shape", [z.
|
|
|
22997
23007
|
name?: string | undefined;
|
|
22998
23008
|
connectsTo?: string | string[] | undefined;
|
|
22999
23009
|
portHints?: (string | number)[] | undefined;
|
|
23010
|
+
holeOffsetX?: string | number | undefined;
|
|
23011
|
+
holeOffsetY?: string | number | undefined;
|
|
23000
23012
|
}>;
|
|
23001
23013
|
|
|
23002
23014
|
declare const resistorPinLabels: readonly ["pin1", "pin2", "pos", "neg"];
|
|
@@ -30939,12 +30951,20 @@ declare const solderPasteProps: z.ZodUnion<[z.ZodObject<Omit<{
|
|
|
30939
30951
|
}>]>;
|
|
30940
30952
|
type InferredSolderPasteProps = z.input<typeof solderPasteProps>;
|
|
30941
30953
|
|
|
30942
|
-
interface
|
|
30954
|
+
interface CircleHoleProps extends PcbLayoutProps {
|
|
30943
30955
|
name?: string;
|
|
30956
|
+
shape?: "circle";
|
|
30944
30957
|
diameter?: Distance;
|
|
30945
30958
|
radius?: Distance;
|
|
30946
30959
|
}
|
|
30947
|
-
|
|
30960
|
+
interface PillHoleProps extends PcbLayoutProps {
|
|
30961
|
+
name?: string;
|
|
30962
|
+
shape: "pill";
|
|
30963
|
+
width: Distance;
|
|
30964
|
+
height: Distance;
|
|
30965
|
+
}
|
|
30966
|
+
type HoleProps = CircleHoleProps | PillHoleProps;
|
|
30967
|
+
declare const holeProps: z.ZodUnion<[z.ZodEffects<z.ZodObject<{
|
|
30948
30968
|
pcbX: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
30949
30969
|
pcbY: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
30950
30970
|
pcbRotation: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
@@ -30966,13 +30986,15 @@ declare const holeProps: z.ZodEffects<z.ZodObject<Omit<{
|
|
|
30966
30986
|
pcbMarginY: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
30967
30987
|
pcbRelative: z.ZodOptional<z.ZodBoolean>;
|
|
30968
30988
|
relative: z.ZodOptional<z.ZodBoolean>;
|
|
30969
|
-
}
|
|
30989
|
+
} & {
|
|
30970
30990
|
name: z.ZodOptional<z.ZodString>;
|
|
30991
|
+
shape: z.ZodOptional<z.ZodLiteral<"circle">>;
|
|
30971
30992
|
diameter: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
30972
30993
|
radius: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
30973
30994
|
}, "strip", z.ZodTypeAny, {
|
|
30974
30995
|
pcbX?: number | undefined;
|
|
30975
30996
|
pcbY?: number | undefined;
|
|
30997
|
+
pcbRotation?: number | undefined;
|
|
30976
30998
|
pcbPositionAnchor?: string | undefined;
|
|
30977
30999
|
layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | undefined;
|
|
30978
31000
|
pcbMarginTop?: number | undefined;
|
|
@@ -30984,11 +31006,13 @@ declare const holeProps: z.ZodEffects<z.ZodObject<Omit<{
|
|
|
30984
31006
|
pcbRelative?: boolean | undefined;
|
|
30985
31007
|
relative?: boolean | undefined;
|
|
30986
31008
|
name?: string | undefined;
|
|
31009
|
+
shape?: "circle" | undefined;
|
|
30987
31010
|
radius?: number | undefined;
|
|
30988
31011
|
diameter?: number | undefined;
|
|
30989
31012
|
}, {
|
|
30990
31013
|
pcbX?: string | number | undefined;
|
|
30991
31014
|
pcbY?: string | number | undefined;
|
|
31015
|
+
pcbRotation?: string | number | undefined;
|
|
30992
31016
|
pcbPositionAnchor?: string | undefined;
|
|
30993
31017
|
layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
|
|
30994
31018
|
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
@@ -31002,6 +31026,7 @@ declare const holeProps: z.ZodEffects<z.ZodObject<Omit<{
|
|
|
31002
31026
|
pcbRelative?: boolean | undefined;
|
|
31003
31027
|
relative?: boolean | undefined;
|
|
31004
31028
|
name?: string | undefined;
|
|
31029
|
+
shape?: "circle" | undefined;
|
|
31005
31030
|
radius?: string | number | undefined;
|
|
31006
31031
|
diameter?: string | number | undefined;
|
|
31007
31032
|
}>, {
|
|
@@ -31009,6 +31034,7 @@ declare const holeProps: z.ZodEffects<z.ZodObject<Omit<{
|
|
|
31009
31034
|
radius: number;
|
|
31010
31035
|
pcbX?: number | undefined;
|
|
31011
31036
|
pcbY?: number | undefined;
|
|
31037
|
+
pcbRotation?: number | undefined;
|
|
31012
31038
|
pcbPositionAnchor?: string | undefined;
|
|
31013
31039
|
layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | undefined;
|
|
31014
31040
|
pcbMarginTop?: number | undefined;
|
|
@@ -31020,9 +31046,11 @@ declare const holeProps: z.ZodEffects<z.ZodObject<Omit<{
|
|
|
31020
31046
|
pcbRelative?: boolean | undefined;
|
|
31021
31047
|
relative?: boolean | undefined;
|
|
31022
31048
|
name?: string | undefined;
|
|
31049
|
+
shape?: "circle" | undefined;
|
|
31023
31050
|
}, {
|
|
31024
31051
|
pcbX?: string | number | undefined;
|
|
31025
31052
|
pcbY?: string | number | undefined;
|
|
31053
|
+
pcbRotation?: string | number | undefined;
|
|
31026
31054
|
pcbPositionAnchor?: string | undefined;
|
|
31027
31055
|
layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
|
|
31028
31056
|
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
@@ -31036,9 +31064,75 @@ declare const holeProps: z.ZodEffects<z.ZodObject<Omit<{
|
|
|
31036
31064
|
pcbRelative?: boolean | undefined;
|
|
31037
31065
|
relative?: boolean | undefined;
|
|
31038
31066
|
name?: string | undefined;
|
|
31067
|
+
shape?: "circle" | undefined;
|
|
31039
31068
|
radius?: string | number | undefined;
|
|
31040
31069
|
diameter?: string | number | undefined;
|
|
31041
|
-
}
|
|
31070
|
+
}>, z.ZodObject<{
|
|
31071
|
+
pcbX: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
31072
|
+
pcbY: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
31073
|
+
pcbRotation: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
31074
|
+
pcbPositionAnchor: z.ZodOptional<z.ZodString>;
|
|
31075
|
+
layer: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>, z.ZodObject<{
|
|
31076
|
+
name: z.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>;
|
|
31077
|
+
}, "strip", z.ZodTypeAny, {
|
|
31078
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
31079
|
+
}, {
|
|
31080
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
31081
|
+
}>]>, "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6", "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
|
|
31082
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
31083
|
+
}>>;
|
|
31084
|
+
pcbMarginTop: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
31085
|
+
pcbMarginRight: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
31086
|
+
pcbMarginBottom: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
31087
|
+
pcbMarginLeft: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
31088
|
+
pcbMarginX: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
31089
|
+
pcbMarginY: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
31090
|
+
pcbRelative: z.ZodOptional<z.ZodBoolean>;
|
|
31091
|
+
relative: z.ZodOptional<z.ZodBoolean>;
|
|
31092
|
+
} & {
|
|
31093
|
+
name: z.ZodOptional<z.ZodString>;
|
|
31094
|
+
shape: z.ZodLiteral<"pill">;
|
|
31095
|
+
width: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
31096
|
+
height: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
31097
|
+
}, "strip", z.ZodTypeAny, {
|
|
31098
|
+
shape: "pill";
|
|
31099
|
+
width: number;
|
|
31100
|
+
height: number;
|
|
31101
|
+
pcbX?: number | undefined;
|
|
31102
|
+
pcbY?: number | undefined;
|
|
31103
|
+
pcbRotation?: number | undefined;
|
|
31104
|
+
pcbPositionAnchor?: string | undefined;
|
|
31105
|
+
layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | undefined;
|
|
31106
|
+
pcbMarginTop?: number | undefined;
|
|
31107
|
+
pcbMarginRight?: number | undefined;
|
|
31108
|
+
pcbMarginBottom?: number | undefined;
|
|
31109
|
+
pcbMarginLeft?: number | undefined;
|
|
31110
|
+
pcbMarginX?: number | undefined;
|
|
31111
|
+
pcbMarginY?: number | undefined;
|
|
31112
|
+
pcbRelative?: boolean | undefined;
|
|
31113
|
+
relative?: boolean | undefined;
|
|
31114
|
+
name?: string | undefined;
|
|
31115
|
+
}, {
|
|
31116
|
+
shape: "pill";
|
|
31117
|
+
width: string | number;
|
|
31118
|
+
height: string | number;
|
|
31119
|
+
pcbX?: string | number | undefined;
|
|
31120
|
+
pcbY?: string | number | undefined;
|
|
31121
|
+
pcbRotation?: string | number | undefined;
|
|
31122
|
+
pcbPositionAnchor?: string | undefined;
|
|
31123
|
+
layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
|
|
31124
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
31125
|
+
} | undefined;
|
|
31126
|
+
pcbMarginTop?: string | number | undefined;
|
|
31127
|
+
pcbMarginRight?: string | number | undefined;
|
|
31128
|
+
pcbMarginBottom?: string | number | undefined;
|
|
31129
|
+
pcbMarginLeft?: string | number | undefined;
|
|
31130
|
+
pcbMarginX?: string | number | undefined;
|
|
31131
|
+
pcbMarginY?: string | number | undefined;
|
|
31132
|
+
pcbRelative?: boolean | undefined;
|
|
31133
|
+
relative?: boolean | undefined;
|
|
31134
|
+
name?: string | undefined;
|
|
31135
|
+
}>]>;
|
|
31042
31136
|
type InferredHoleProps = z.input<typeof holeProps>;
|
|
31043
31137
|
|
|
31044
31138
|
declare const portRef: z.ZodUnion<[z.ZodString, z.ZodType<{
|
|
@@ -48256,6 +48350,9 @@ interface FootprintLibraryResult {
|
|
|
48256
48350
|
footprintCircuitJson: any[];
|
|
48257
48351
|
cadModel?: CadModelProp;
|
|
48258
48352
|
}
|
|
48353
|
+
interface FootprintFileParserEntry {
|
|
48354
|
+
loadFromUrl: (url: string) => Promise<FootprintLibraryResult>;
|
|
48355
|
+
}
|
|
48259
48356
|
interface PlatformConfig {
|
|
48260
48357
|
partsEngine?: PartsEngine;
|
|
48261
48358
|
autorouter?: AutorouterProp;
|
|
@@ -48271,6 +48368,7 @@ interface PlatformConfig {
|
|
|
48271
48368
|
schematicDisabled?: boolean;
|
|
48272
48369
|
partsEngineDisabled?: boolean;
|
|
48273
48370
|
footprintLibraryMap?: Record<string, ((path: string) => Promise<FootprintLibraryResult>) | Record<string, any[] | ((path: string) => Promise<FootprintLibraryResult>)>>;
|
|
48371
|
+
footprintFileParserMap?: Record<string, FootprintFileParserEntry>;
|
|
48274
48372
|
}
|
|
48275
48373
|
declare const platformConfig: z.ZodType<PlatformConfig>;
|
|
48276
48374
|
|
|
@@ -48278,4 +48376,4 @@ interface ProjectConfig extends Pick<PlatformConfig, "projectName" | "projectBas
|
|
|
48278
48376
|
}
|
|
48279
48377
|
declare const projectConfig: z.ZodType<ProjectConfig>;
|
|
48280
48378
|
|
|
48281
|
-
export { type AutocompleteString, type AutorouterConfig, type AutorouterProp, type BaseGroupProps, type BaseManualEditEvent, type BaseManualEditEventInput, type BasicFootprint, type BatteryPinLabels, type BatteryProps, type BoardProps, type Border, type BreakoutPointProps, type BreakoutProps, type CadAssemblyProps, type CadAssemblyPropsInput, type CadModelBase, type CadModelGlb, type CadModelGltf, type CadModelJscad, type CadModelObj, type CadModelProp, type CadModelProps, type CadModelPropsInput, type CadModelStep, type CadModelStl, type CadModelWrl, type CapacitorPinLabels, type CapacitorProps, type ChipConnections, type ChipPinLabels, type ChipProps, type ChipPropsSU, type CircleCutoutProps, type CirclePlatedHoleProps, type CircleSmtPadProps, type CircleSolderPasteProps, type CircularHoleWithRectPlatedProps, type CommonComponentProps, type CommonLayoutProps, type ComponentProps, type ConnectionTarget, type Connections, type ConnectorProps, type ConstrainedLayoutProps, type ConstraintProps, type CopperPourProps, type CopperPourPropsInput, type CrystalPinLabels, type CrystalProps, type CutoutProps, type CutoutPropsInput, type DiodePinLabels, type DiodeProps, type Direction, type DirectionAlongEdge, type EditPcbComponentLocationEvent, type EditPcbComponentLocationEventInput, type EditPcbGroupLocationEvent, type EditPcbGroupLocationEventInput, type EditSchematicComponentLocationEvent, type EditSchematicComponentLocationEventInput, type EditSchematicGroupLocationEvent, type EditSchematicGroupLocationEventInput, type EditTraceHintEvent, type EditTraceHintEventInput, type FabricationNotePathProps, type FabricationNoteTextProps, type FootprintLibraryResult, type FootprintProp, type FootprintProps, type FootprintPropsInput, type FootprintSoupElements, type FusePinLabels, type FuseProps, type GroupProps, type HoleProps, type InductorPinLabels, type InductorProps, type InferredChipProps, type InferredConstrainedLayoutProps, type InferredDiodeProps, type InferredFuseProps, type InferredHoleProps, type InferredSmtPadProps, type InferredSolderPasteProps, type InferredSwitchProps, type InferredTestpointProps, type InferredViaProps, type JumperProps, type KicadAutocompleteStringPath, type KicadPath, type LayoutConfig, type LedPinLabels, type LedProps, type ManualEditEvent, type ManualEditEventInput, type ManualEditsFile, type ManualEditsFileInput, type ManualPcbPlacement, type ManualPcbPlacementInput, type ManualSchematicPlacement, type ManualSchematicPlacementInput, type ManualTraceHint, type ManualTraceHintInput, type MosfetPinLabels, type MosfetProps, type NetAliasProps, type NetLabelProps, type NetProps, type NonSubcircuitGroupProps, type OvalPlatedHoleProps, type PartsEngine, type PcbKeepoutProps, type PcbLayoutProps, type PcbRouteCache, type PcbSameXConstraint, type PcbSameYConstraint, type PcbTraceProps, type PcbXDistConstraint, type PcbYDistConstraint, type PillPlatedHoleProps, type PillSmtPadProps, type PillWithRectPadPlatedHoleProps, type PinAttributeMap, type PinCompatibleVariant, type PinHeaderProps, type PinLabelFromPinLabelMap, type PinLabelsProp, type PinSideDefinition, type PinVariant, type PinoutProps, type PlatedHoleProps, type PlatformConfig, type PolygonCutoutProps, type PolygonSmtPadProps, type PortHints, type PortProps, type PotentiometerPinVariant, type PotentiometerProps, type PowerSourceProps, type ProjectConfig, type PushButtonProps, type RectCutoutProps, type RectSmtPadProps, type RectSolderPasteProps, type ResistorPinLabels, type ResistorProps, type ResonatorPinVariant, type ResonatorProps, type RotatedRectSmtPadProps, type SchematicBoxProps, type SchematicCellProps, type SchematicLineProps, type SchematicOrientation, type SchematicPathProps, type SchematicPinArrangement, type SchematicPinArrangementWithPinCounts, type SchematicPinArrangementWithSides, type SchematicPinArrangementWithSizes, type SchematicPinLabel, type SchematicPinStyle, type SchematicPortArrangement, type SchematicPortArrangementWithPinCounts, type SchematicPortArrangementWithSides, type SchematicPortArrangementWithSizes, type SchematicRowProps, type SchematicTableProps, type SchematicTextProps, type Selectors, type SilkscreenCircleProps, type SilkscreenLineProps, type SilkscreenPathProps, type SilkscreenRectProps, type SilkscreenTextProps, type SmtPadProps, type SolderJumperProps, type SolderPasteProps, type StampboardProps, type SubcircuitGroupProps, type SubcircuitGroupPropsWithBool, type SubcircuitProps, type SupplierName, type SupplierPartNumbers, type SupplierProps, type SwitchProps, type SymbolProp, type SymbolProps, type SymbolPropsInput, type TestpointProps, type TraceHintProps, type TraceProps, type TransistorPinLabels, type TransistorProps, type ViaProps, type VoltageSourcePinLabels, type VoltageSourceProps, type WaveShape, autorouterConfig, autorouterProp, baseGroupProps, base_manual_edit_event, batteryPins, batteryProps, boardProps, border, breakoutPointProps, breakoutProps, bugProps, cadModelBase, cadModelGlb, cadModelGltf, cadModelJscad, cadModelObj, cadModelProp, cadModelStep, cadModelStl, cadModelWrl, cadassemblyProps, cadmodelProps, capacitorPinLabels, capacitorPins, capacitorProps, chipProps, circleCutoutProps, circleSmtPadProps, circleSolderPasteProps, commonComponentProps, commonLayoutProps, componentProps, connectorProps, constrainedLayoutProps, constraintProps, copperPourProps, crystalPins, crystalProps, cutoutProps, diodePins, diodeProps, direction, directionAlongEdge, distanceOrMultiplier, edit_component_location_event, edit_pcb_component_location_event, edit_pcb_group_location_event, edit_schematic_component_location_event, edit_schematic_group_location_event, edit_trace_hint_event, explicitPinSideDefinition, fabricationNotePathProps, fabricationNoteTextProps, footprintProp, footprintProps, fusePinLabels, fuseProps, groupProps, holeProps, inductorPins, inductorProps, jumperProps, layoutConfig, ledPins, ledProps, lrPins, lrPolarPins, manual_edit_event, manual_edits_file, manual_pcb_placement, manual_schematic_placement, manual_trace_hint, mosfetPins, mosfetProps, netAliasProps, netLabelProps, netProps, ninePointAnchor, partsEngine, pcbKeepoutProps, pcbLayoutProps, pcbSameXConstraintProps, pcbSameYConstraintProps, pcbTraceProps, pcbXDistConstraintProps, pcbYDistConstraintProps, pillSmtPadProps, pinAttributeMap, pinCompatibleVariant, pinHeaderProps, pinLabelsProp, pinoutProps, platedHoleProps, platformConfig, point3, polygonCutoutProps, polygonSmtPadProps, portHints, portProps, portRef, potentiometerProps, powerSourceProps, projectConfig, pushButtonProps, rectCutoutProps, rectSmtPadProps, rectSolderPasteProps, resistorPinLabels, resistorPins, resistorProps, resonatorProps, rotatedRectSmtPadProps, rotationPoint3, routeHintPointProps, schematicBoxProps, schematicCellProps, schematicLineProps, schematicOrientation, schematicPathProps, schematicPinArrangement, schematicPinLabel, schematicPinStyle, schematicPortArrangement, schematicRowProps, schematicTableProps, schematicTextProps, silkscreenCircleProps, silkscreenLineProps, silkscreenPathProps, silkscreenRectProps, silkscreenTextProps, smtPadProps, solderPasteProps, solderjumperProps, stampboardProps, subcircuitGroupProps, subcircuitGroupPropsWithBool, subcircuitProps, supplierProps, switchProps, symbolProp, symbolProps, testpointProps, traceHintProps, traceProps, transistorPins, transistorPinsLabels, transistorProps, viaProps, voltageSourcePinLabels, voltageSourcePins, voltageSourceProps };
|
|
48379
|
+
export { type AutocompleteString, type AutorouterConfig, type AutorouterProp, type BaseGroupProps, type BaseManualEditEvent, type BaseManualEditEventInput, type BasicFootprint, type BatteryPinLabels, type BatteryProps, type BoardProps, type Border, type BreakoutPointProps, type BreakoutProps, type CadAssemblyProps, type CadAssemblyPropsInput, type CadModelBase, type CadModelGlb, type CadModelGltf, type CadModelJscad, type CadModelObj, type CadModelProp, type CadModelProps, type CadModelPropsInput, type CadModelStep, type CadModelStl, type CadModelWrl, type CapacitorPinLabels, type CapacitorProps, type ChipConnections, type ChipPinLabels, type ChipProps, type ChipPropsSU, type CircleCutoutProps, type CircleHoleProps, type CirclePlatedHoleProps, type CircleSmtPadProps, type CircleSolderPasteProps, type CircularHoleWithRectPlatedProps, type CommonComponentProps, type CommonLayoutProps, type ComponentProps, type ConnectionTarget, type Connections, type ConnectorProps, type ConstrainedLayoutProps, type ConstraintProps, type CopperPourProps, type CopperPourPropsInput, type CrystalPinLabels, type CrystalProps, type CutoutProps, type CutoutPropsInput, type DiodePinLabels, type DiodeProps, type Direction, type DirectionAlongEdge, type EditPcbComponentLocationEvent, type EditPcbComponentLocationEventInput, type EditPcbGroupLocationEvent, type EditPcbGroupLocationEventInput, type EditSchematicComponentLocationEvent, type EditSchematicComponentLocationEventInput, type EditSchematicGroupLocationEvent, type EditSchematicGroupLocationEventInput, type EditTraceHintEvent, type EditTraceHintEventInput, type FabricationNotePathProps, type FabricationNoteTextProps, type FootprintFileParserEntry, type FootprintLibraryResult, type FootprintProp, type FootprintProps, type FootprintPropsInput, type FootprintSoupElements, type FusePinLabels, type FuseProps, type GroupProps, type HoleProps, type InductorPinLabels, type InductorProps, type InferredChipProps, type InferredConstrainedLayoutProps, type InferredDiodeProps, type InferredFuseProps, type InferredHoleProps, type InferredSmtPadProps, type InferredSolderPasteProps, type InferredSwitchProps, type InferredTestpointProps, type InferredViaProps, type JumperProps, type KicadAutocompleteStringPath, type KicadPath, type LayoutConfig, type LedPinLabels, type LedProps, type ManualEditEvent, type ManualEditEventInput, type ManualEditsFile, type ManualEditsFileInput, type ManualPcbPlacement, type ManualPcbPlacementInput, type ManualSchematicPlacement, type ManualSchematicPlacementInput, type ManualTraceHint, type ManualTraceHintInput, type MosfetPinLabels, type MosfetProps, type NetAliasProps, type NetLabelProps, type NetProps, type NonSubcircuitGroupProps, type OvalPlatedHoleProps, type PartsEngine, type PcbKeepoutProps, type PcbLayoutProps, type PcbRouteCache, type PcbSameXConstraint, type PcbSameYConstraint, type PcbTraceProps, type PcbXDistConstraint, type PcbYDistConstraint, type PillHoleProps, type PillPlatedHoleProps, type PillSmtPadProps, type PillWithRectPadPlatedHoleProps, type PinAttributeMap, type PinCompatibleVariant, type PinHeaderProps, type PinLabelFromPinLabelMap, type PinLabelsProp, type PinSideDefinition, type PinVariant, type PinoutProps, type PlatedHoleProps, type PlatformConfig, type PolygonCutoutProps, type PolygonSmtPadProps, type PortHints, type PortProps, type PotentiometerPinVariant, type PotentiometerProps, type PowerSourceProps, type ProjectConfig, type PushButtonProps, type RectCutoutProps, type RectSmtPadProps, type RectSolderPasteProps, type ResistorPinLabels, type ResistorProps, type ResonatorPinVariant, type ResonatorProps, type RotatedRectSmtPadProps, type SchematicBoxProps, type SchematicCellProps, type SchematicLineProps, type SchematicOrientation, type SchematicPathProps, type SchematicPinArrangement, type SchematicPinArrangementWithPinCounts, type SchematicPinArrangementWithSides, type SchematicPinArrangementWithSizes, type SchematicPinLabel, type SchematicPinStyle, type SchematicPortArrangement, type SchematicPortArrangementWithPinCounts, type SchematicPortArrangementWithSides, type SchematicPortArrangementWithSizes, type SchematicRowProps, type SchematicTableProps, type SchematicTextProps, type Selectors, type SilkscreenCircleProps, type SilkscreenLineProps, type SilkscreenPathProps, type SilkscreenRectProps, type SilkscreenTextProps, type SmtPadProps, type SolderJumperProps, type SolderPasteProps, type StampboardProps, type SubcircuitGroupProps, type SubcircuitGroupPropsWithBool, type SubcircuitProps, type SupplierName, type SupplierPartNumbers, type SupplierProps, type SwitchProps, type SymbolProp, type SymbolProps, type SymbolPropsInput, type TestpointProps, type TraceHintProps, type TraceProps, type TransistorPinLabels, type TransistorProps, type ViaProps, type VoltageSourcePinLabels, type VoltageSourceProps, type WaveShape, autorouterConfig, autorouterProp, baseGroupProps, base_manual_edit_event, batteryPins, batteryProps, boardProps, border, breakoutPointProps, breakoutProps, bugProps, cadModelBase, cadModelGlb, cadModelGltf, cadModelJscad, cadModelObj, cadModelProp, cadModelStep, cadModelStl, cadModelWrl, cadassemblyProps, cadmodelProps, capacitorPinLabels, capacitorPins, capacitorProps, chipProps, circleCutoutProps, circleSmtPadProps, circleSolderPasteProps, commonComponentProps, commonLayoutProps, componentProps, connectorProps, constrainedLayoutProps, constraintProps, copperPourProps, crystalPins, crystalProps, cutoutProps, diodePins, diodeProps, direction, directionAlongEdge, distanceOrMultiplier, edit_component_location_event, edit_pcb_component_location_event, edit_pcb_group_location_event, edit_schematic_component_location_event, edit_schematic_group_location_event, edit_trace_hint_event, explicitPinSideDefinition, fabricationNotePathProps, fabricationNoteTextProps, footprintProp, footprintProps, fusePinLabels, fuseProps, groupProps, holeProps, inductorPins, inductorProps, jumperProps, layoutConfig, ledPins, ledProps, lrPins, lrPolarPins, manual_edit_event, manual_edits_file, manual_pcb_placement, manual_schematic_placement, manual_trace_hint, mosfetPins, mosfetProps, netAliasProps, netLabelProps, netProps, ninePointAnchor, partsEngine, pcbKeepoutProps, pcbLayoutProps, pcbSameXConstraintProps, pcbSameYConstraintProps, pcbTraceProps, pcbXDistConstraintProps, pcbYDistConstraintProps, pillSmtPadProps, pinAttributeMap, pinCompatibleVariant, pinHeaderProps, pinLabelsProp, pinoutProps, platedHoleProps, platformConfig, point3, polygonCutoutProps, polygonSmtPadProps, portHints, portProps, portRef, potentiometerProps, powerSourceProps, projectConfig, pushButtonProps, rectCutoutProps, rectSmtPadProps, rectSolderPasteProps, resistorPinLabels, resistorPins, resistorProps, resonatorProps, rotatedRectSmtPadProps, rotationPoint3, routeHintPointProps, schematicBoxProps, schematicCellProps, schematicLineProps, schematicOrientation, schematicPathProps, schematicPinArrangement, schematicPinLabel, schematicPinStyle, schematicPortArrangement, schematicRowProps, schematicTableProps, schematicTextProps, silkscreenCircleProps, silkscreenLineProps, silkscreenPathProps, silkscreenRectProps, silkscreenTextProps, smtPadProps, solderPasteProps, solderjumperProps, stampboardProps, subcircuitGroupProps, subcircuitGroupPropsWithBool, subcircuitProps, supplierProps, switchProps, symbolProp, symbolProps, testpointProps, traceHintProps, traceProps, transistorPins, transistorPinsLabels, transistorProps, viaProps, voltageSourcePinLabels, voltageSourcePins, voltageSourceProps };
|
package/dist/index.js
CHANGED
|
@@ -787,8 +787,8 @@ var platedHoleProps = z34.discriminatedUnion("shape", [
|
|
|
787
787
|
holeShape: z34.literal("circle").optional(),
|
|
788
788
|
padShape: z34.literal("rect").optional(),
|
|
789
789
|
portHints: portHints.optional(),
|
|
790
|
-
|
|
791
|
-
|
|
790
|
+
holeOffsetX: distance11.optional(),
|
|
791
|
+
holeOffsetY: distance11.optional()
|
|
792
792
|
}),
|
|
793
793
|
pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({
|
|
794
794
|
name: z34.string().optional(),
|
|
@@ -800,7 +800,9 @@ var platedHoleProps = z34.discriminatedUnion("shape", [
|
|
|
800
800
|
holeHeight: distance11,
|
|
801
801
|
rectPadWidth: distance11,
|
|
802
802
|
rectPadHeight: distance11,
|
|
803
|
-
portHints: portHints.optional()
|
|
803
|
+
portHints: portHints.optional(),
|
|
804
|
+
holeOffsetX: distance11.optional(),
|
|
805
|
+
holeOffsetY: distance11.optional()
|
|
804
806
|
})
|
|
805
807
|
]).refine((a) => {
|
|
806
808
|
if ("innerWidth" in a && a.innerWidth !== void 0) {
|
|
@@ -1086,8 +1088,9 @@ expectTypesMatch(true);
|
|
|
1086
1088
|
|
|
1087
1089
|
// lib/components/hole.ts
|
|
1088
1090
|
import { z as z47 } from "zod";
|
|
1089
|
-
var
|
|
1091
|
+
var circleHoleProps = pcbLayoutProps.extend({
|
|
1090
1092
|
name: z47.string().optional(),
|
|
1093
|
+
shape: z47.literal("circle").optional(),
|
|
1091
1094
|
diameter: distance.optional(),
|
|
1092
1095
|
radius: distance.optional()
|
|
1093
1096
|
}).transform((d) => ({
|
|
@@ -1095,6 +1098,13 @@ var holeProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
|
1095
1098
|
diameter: d.diameter ?? 2 * d.radius,
|
|
1096
1099
|
radius: d.radius ?? d.diameter / 2
|
|
1097
1100
|
}));
|
|
1101
|
+
var pillHoleProps = pcbLayoutProps.extend({
|
|
1102
|
+
name: z47.string().optional(),
|
|
1103
|
+
shape: z47.literal("pill"),
|
|
1104
|
+
width: distance,
|
|
1105
|
+
height: distance
|
|
1106
|
+
});
|
|
1107
|
+
var holeProps = z47.union([circleHoleProps, pillHoleProps]);
|
|
1098
1108
|
expectTypesMatch(true);
|
|
1099
1109
|
|
|
1100
1110
|
// lib/components/trace.ts
|
|
@@ -1805,6 +1815,11 @@ var footprintLibraryResult = z89.object({
|
|
|
1805
1815
|
cadModel: cadModelProp.optional()
|
|
1806
1816
|
});
|
|
1807
1817
|
var pathToCircuitJsonFn = z89.function().args(z89.string()).returns(z89.promise(footprintLibraryResult)).describe("A function that takes a path and returns Circuit JSON");
|
|
1818
|
+
var footprintFileParserEntry = z89.object({
|
|
1819
|
+
loadFromUrl: z89.function().args(z89.string()).returns(z89.promise(footprintLibraryResult)).describe(
|
|
1820
|
+
"A function that takes a footprint file URL and returns Circuit JSON"
|
|
1821
|
+
)
|
|
1822
|
+
});
|
|
1808
1823
|
var platformConfig = z89.object({
|
|
1809
1824
|
partsEngine: partsEngine.optional(),
|
|
1810
1825
|
autorouter: autorouterProp.optional(),
|
|
@@ -1828,7 +1843,8 @@ var platformConfig = z89.object({
|
|
|
1828
1843
|
z89.union([unvalidatedCircuitJson, pathToCircuitJsonFn])
|
|
1829
1844
|
)
|
|
1830
1845
|
])
|
|
1831
|
-
).optional()
|
|
1846
|
+
).optional(),
|
|
1847
|
+
footprintFileParserMap: z89.record(z89.string(), footprintFileParserEntry).optional()
|
|
1832
1848
|
});
|
|
1833
1849
|
expectTypesMatch(true);
|
|
1834
1850
|
|