@tscircuit/props 0.0.328 → 0.0.330
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 +29 -22
- package/dist/index.d.ts +196 -173
- package/dist/index.js +479 -472
- package/dist/index.js.map +1 -1
- package/lib/components/board.ts +3 -0
- 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) |
|
|
@@ -165,6 +165,7 @@ export interface BoardProps extends Omit<SubcircuitGroupProps, "subcircuit"> {
|
|
|
165
165
|
/** Number of layers for the PCB */
|
|
166
166
|
layers?: 2 | 4;
|
|
167
167
|
borderRadius?: Distance;
|
|
168
|
+
boardOrigin?: z.infer<typeof ninePointAnchor>;
|
|
168
169
|
}
|
|
169
170
|
```
|
|
170
171
|
|
|
@@ -461,6 +462,21 @@ export interface BaseGroupProps extends CommonLayoutProps, LayoutConfig {
|
|
|
461
462
|
*/
|
|
462
463
|
schTitle?: string;
|
|
463
464
|
|
|
465
|
+
/**
|
|
466
|
+
* If true, render this group as a single schematic box
|
|
467
|
+
*/
|
|
468
|
+
showAsSchematicBox?: boolean;
|
|
469
|
+
|
|
470
|
+
/**
|
|
471
|
+
* Mapping of external pin names to internal connection targets
|
|
472
|
+
*/
|
|
473
|
+
connections?: Connections;
|
|
474
|
+
|
|
475
|
+
/**
|
|
476
|
+
* Arrangement for pins when rendered as a schematic box
|
|
477
|
+
*/
|
|
478
|
+
schPinArrangement?: SchematicPinArrangement;
|
|
479
|
+
|
|
464
480
|
pcbWidth?: Distance;
|
|
465
481
|
pcbHeight?: Distance;
|
|
466
482
|
schWidth?: Distance;
|
|
@@ -547,14 +563,6 @@ export interface BaseGroupProps extends CommonLayoutProps, LayoutConfig {
|
|
|
547
563
|
|
|
548
564
|
[Source](https://github.com/tscircuit/props/blob/main/lib/components/group.ts)
|
|
549
565
|
|
|
550
|
-
### HoleProps `<hole />`
|
|
551
|
-
|
|
552
|
-
```ts
|
|
553
|
-
export type HoleProps = CircleHoleProps | PillHoleProps;
|
|
554
|
-
```
|
|
555
|
-
|
|
556
|
-
[Source](https://github.com/tscircuit/props/blob/main/lib/components/hole.ts)
|
|
557
|
-
|
|
558
566
|
### CircleHoleProps `<hole />`
|
|
559
567
|
|
|
560
568
|
```ts
|
|
@@ -568,19 +576,6 @@ export interface CircleHoleProps extends PcbLayoutProps {
|
|
|
568
576
|
|
|
569
577
|
[Source](https://github.com/tscircuit/props/blob/main/lib/components/hole.ts)
|
|
570
578
|
|
|
571
|
-
### PillHoleProps `<hole />`
|
|
572
|
-
|
|
573
|
-
```ts
|
|
574
|
-
export interface PillHoleProps extends PcbLayoutProps {
|
|
575
|
-
name?: string;
|
|
576
|
-
shape: "pill";
|
|
577
|
-
width: Distance;
|
|
578
|
-
height: Distance;
|
|
579
|
-
}
|
|
580
|
-
```
|
|
581
|
-
|
|
582
|
-
[Source](https://github.com/tscircuit/props/blob/main/lib/components/hole.ts)
|
|
583
|
-
|
|
584
579
|
### InductorProps `<inductor />`
|
|
585
580
|
|
|
586
581
|
```ts
|
|
@@ -901,6 +896,7 @@ export interface RectSmtPadProps extends Omit<PcbLayoutProps, "pcbRotation"> {
|
|
|
901
896
|
shape: "rect";
|
|
902
897
|
width: Distance;
|
|
903
898
|
height: Distance;
|
|
899
|
+
rectBorderRadius?: Distance;
|
|
904
900
|
portHints?: PortHints;
|
|
905
901
|
coveredWithSolderMask?: boolean;
|
|
906
902
|
}
|
|
@@ -1074,6 +1070,15 @@ export interface VoltageSourceProps<PinLabel extends string = string>
|
|
|
1074
1070
|
### PlatformConfig
|
|
1075
1071
|
|
|
1076
1072
|
```ts
|
|
1073
|
+
export interface FootprintLibraryResult {
|
|
1074
|
+
footprintCircuitJson: any[];
|
|
1075
|
+
cadModel?: CadModelProp;
|
|
1076
|
+
}
|
|
1077
|
+
|
|
1078
|
+
export interface FootprintFileParserEntry {
|
|
1079
|
+
loadFromUrl: (url: string) => Promise<FootprintLibraryResult>;
|
|
1080
|
+
}
|
|
1081
|
+
|
|
1077
1082
|
export interface PlatformConfig {
|
|
1078
1083
|
partsEngine?: PartsEngine;
|
|
1079
1084
|
|
|
@@ -1104,6 +1109,8 @@ export interface PlatformConfig {
|
|
|
1104
1109
|
any[] | ((path: string) => Promise<FootprintLibraryResult>)
|
|
1105
1110
|
>
|
|
1106
1111
|
>;
|
|
1112
|
+
|
|
1113
|
+
footprintFileParserMap?: Record<string, FootprintFileParserEntry>;
|
|
1107
1114
|
}
|
|
1108
1115
|
```
|
|
1109
1116
|
|