@tscircuit/footprinter 0.0.2 → 0.0.3
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.cjs +11615 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +33 -0
- package/package.json +2 -2
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { AnySoupElement } from '@tscircuit/soup';
|
|
2
|
+
|
|
3
|
+
type FootprinterParamsBuilder<K extends string> = {
|
|
4
|
+
[P in K | "params" | "soup"]: P extends "params" | "soup" ? Footprinter[P] : (v?: number | string) => FootprinterParamsBuilder<K>;
|
|
5
|
+
};
|
|
6
|
+
type CommonPassiveOptionKey = "metric" | "imperial" | "tht" | "p" | "pw" | "ph" | "w" | "h";
|
|
7
|
+
type Footprinter = {
|
|
8
|
+
dip: (num_pins: number) => FootprinterParamsBuilder<"w" | "p" | "id" | "od">;
|
|
9
|
+
cap: () => FootprinterParamsBuilder<CommonPassiveOptionKey>;
|
|
10
|
+
res: () => FootprinterParamsBuilder<CommonPassiveOptionKey>;
|
|
11
|
+
diode: () => FootprinterParamsBuilder<CommonPassiveOptionKey>;
|
|
12
|
+
led: () => FootprinterParamsBuilder<CommonPassiveOptionKey>;
|
|
13
|
+
lr: (num_pins: number) => FootprinterParamsBuilder<"w" | "l" | "pl" | "pr">;
|
|
14
|
+
quad: (num_pins: number) => FootprinterParamsBuilder<"w" | "l" | "square" | "pl" | "pr" | "pb" | "pt" | "p" | "pw" | "ph">;
|
|
15
|
+
bga: (num_pins: number) => FootprinterParamsBuilder<"grid" | "p" | "w" | "h" | "ball" | "pad" | "missing">;
|
|
16
|
+
params: () => any;
|
|
17
|
+
soup: () => AnySoupElement[];
|
|
18
|
+
};
|
|
19
|
+
declare const string: (def: string) => Footprinter;
|
|
20
|
+
declare const footprinter: {
|
|
21
|
+
(): Footprinter & {
|
|
22
|
+
string: typeof string;
|
|
23
|
+
};
|
|
24
|
+
string: (def: string) => Footprinter;
|
|
25
|
+
};
|
|
26
|
+
declare const fp: {
|
|
27
|
+
(): Footprinter & {
|
|
28
|
+
string: typeof string;
|
|
29
|
+
};
|
|
30
|
+
string: (def: string) => Footprinter;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export { type Footprinter, type FootprinterParamsBuilder, footprinter, fp, string };
|
package/package.json
CHANGED