@tscircuit/footprinter 0.0.147 → 0.0.148
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.d.ts +1 -0
- package/dist/index.js +94 -13
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1016,6 +1016,7 @@ type Footprinter = {
|
|
|
1016
1016
|
sot723: () => FootprinterParamsBuilder<"w" | "h" | "pl" | "pw">;
|
|
1017
1017
|
sot23: () => FootprinterParamsBuilder<"w" | "h" | "pl" | "pw">;
|
|
1018
1018
|
sot89: () => FootprinterParamsBuilder<"w" | "p" | "pl" | "pw" | "h">;
|
|
1019
|
+
sod323w: () => FootprinterParamsBuilder<"w" | "h" | "p" | "pl" | "pw">;
|
|
1019
1020
|
smc: () => FootprinterParamsBuilder<"w" | "h" | "p" | "pw" | "pl">;
|
|
1020
1021
|
minimelf: () => FootprinterParamsBuilder<"w" | "h" | "p" | "pw" | "pl">;
|
|
1021
1022
|
melf: () => FootprinterParamsBuilder<"w" | "h" | "p" | "pw" | "pl">;
|
package/dist/index.js
CHANGED
|
@@ -45,6 +45,7 @@ __export(fn_exports, {
|
|
|
45
45
|
sod323: () => sod323,
|
|
46
46
|
sod323f: () => sod323f,
|
|
47
47
|
sod323fl: () => sod323fl,
|
|
48
|
+
sod323w: () => sod323w,
|
|
48
49
|
sod523: () => sod523,
|
|
49
50
|
sod723: () => sod723,
|
|
50
51
|
sod882: () => sod882,
|
|
@@ -3620,12 +3621,12 @@ var sot89_3 = (parameters) => {
|
|
|
3620
3621
|
const pads = [];
|
|
3621
3622
|
const padGap = Number.parseFloat(parameters.p);
|
|
3622
3623
|
const padWidth = Number.parseFloat(parameters.pw);
|
|
3623
|
-
const
|
|
3624
|
+
const length41 = Number.parseFloat(parameters.w);
|
|
3624
3625
|
const padHeight = Number.parseFloat(parameters.pl);
|
|
3625
3626
|
pads.push(
|
|
3626
|
-
rectpad(1, -
|
|
3627
|
-
rectpad(2, -
|
|
3628
|
-
rectpad(3, -
|
|
3627
|
+
rectpad(1, -length41 / 2, padGap, padHeight, padWidth),
|
|
3628
|
+
rectpad(2, -length41 / 2 + (1.5 - 1.3) / 2, 0, 1.5, padWidth),
|
|
3629
|
+
rectpad(3, -length41 / 2, -padGap, padHeight, padWidth)
|
|
3629
3630
|
);
|
|
3630
3631
|
const silkscreenRefText = silkscreenRef(0, 0, 0.3);
|
|
3631
3632
|
const width = Number.parseFloat(parameters.w) / 2 - 1;
|
|
@@ -3665,7 +3666,7 @@ var sot89_5 = (parameters) => {
|
|
|
3665
3666
|
const pads = [];
|
|
3666
3667
|
const padGap = Number.parseFloat(parameters.p);
|
|
3667
3668
|
const padWidth = Number.parseFloat(parameters.pw);
|
|
3668
|
-
const
|
|
3669
|
+
const length41 = Number.parseFloat(parameters.w);
|
|
3669
3670
|
pads.push(
|
|
3670
3671
|
rectpad(1, -1.85, -1.5, 1.5, 0.7),
|
|
3671
3672
|
rectpad(2, -1.85, 1.5, 1.5, 0.7),
|
|
@@ -5265,20 +5266,20 @@ var msop = (raw_params) => {
|
|
|
5265
5266
|
};
|
|
5266
5267
|
};
|
|
5267
5268
|
|
|
5268
|
-
// src/fn/
|
|
5269
|
+
// src/fn/sod323w.ts
|
|
5269
5270
|
import { z as z49 } from "zod";
|
|
5270
5271
|
import { length as length39 } from "circuit-json";
|
|
5271
|
-
var
|
|
5272
|
+
var sod323w_def = z49.object({
|
|
5272
5273
|
fn: z49.string(),
|
|
5273
5274
|
num_pins: z49.literal(2).default(2),
|
|
5274
|
-
w: z49.string().default("3.
|
|
5275
|
+
w: z49.string().default("3.8mm"),
|
|
5275
5276
|
h: z49.string().default("1.65mm"),
|
|
5276
|
-
pl: z49.string().default("
|
|
5277
|
-
pw: z49.string().default("
|
|
5278
|
-
pad_spacing: z49.string().default("2.
|
|
5277
|
+
pl: z49.string().default("1.2mm"),
|
|
5278
|
+
pw: z49.string().default("1.2mm"),
|
|
5279
|
+
pad_spacing: z49.string().default("2.6mm")
|
|
5279
5280
|
});
|
|
5280
|
-
var
|
|
5281
|
-
const parameters =
|
|
5281
|
+
var sod323w = (raw_params) => {
|
|
5282
|
+
const parameters = sod323w_def.parse(raw_params);
|
|
5282
5283
|
const silkscreenRefText = silkscreenRef(
|
|
5283
5284
|
0,
|
|
5284
5285
|
length39.parse(parameters.h),
|
|
@@ -5345,6 +5346,86 @@ var sodWithoutParsing14 = (parameters) => {
|
|
|
5345
5346
|
return pads;
|
|
5346
5347
|
};
|
|
5347
5348
|
|
|
5349
|
+
// src/fn/sod323fl.ts
|
|
5350
|
+
import { z as z50 } from "zod";
|
|
5351
|
+
import { length as length40 } from "circuit-json";
|
|
5352
|
+
var sod323FL_def = z50.object({
|
|
5353
|
+
fn: z50.string(),
|
|
5354
|
+
num_pins: z50.literal(2).default(2),
|
|
5355
|
+
w: z50.string().default("3.20mm"),
|
|
5356
|
+
h: z50.string().default("1.65mm"),
|
|
5357
|
+
pl: z50.string().default("0.8mm"),
|
|
5358
|
+
pw: z50.string().default("0.9mm"),
|
|
5359
|
+
pad_spacing: z50.string().default("2.1mm")
|
|
5360
|
+
});
|
|
5361
|
+
var sod323fl = (raw_params) => {
|
|
5362
|
+
const parameters = sod323FL_def.parse(raw_params);
|
|
5363
|
+
const silkscreenRefText = silkscreenRef(
|
|
5364
|
+
0,
|
|
5365
|
+
length40.parse(parameters.h),
|
|
5366
|
+
0.3
|
|
5367
|
+
);
|
|
5368
|
+
const silkscreenLine = {
|
|
5369
|
+
type: "pcb_silkscreen_path",
|
|
5370
|
+
layer: "top",
|
|
5371
|
+
pcb_component_id: "",
|
|
5372
|
+
route: [
|
|
5373
|
+
{
|
|
5374
|
+
x: length40.parse(parameters.pad_spacing) / 2,
|
|
5375
|
+
y: length40.parse(parameters.h) / 2
|
|
5376
|
+
},
|
|
5377
|
+
{
|
|
5378
|
+
x: -length40.parse(parameters.w) / 2 - 0.2,
|
|
5379
|
+
y: length40.parse(parameters.h) / 2
|
|
5380
|
+
},
|
|
5381
|
+
{
|
|
5382
|
+
x: -length40.parse(parameters.w) / 2 - 0.2,
|
|
5383
|
+
y: -length40.parse(parameters.h) / 2
|
|
5384
|
+
},
|
|
5385
|
+
{
|
|
5386
|
+
x: length40.parse(parameters.pad_spacing) / 2,
|
|
5387
|
+
y: -length40.parse(parameters.h) / 2
|
|
5388
|
+
}
|
|
5389
|
+
],
|
|
5390
|
+
stroke_width: 0.1,
|
|
5391
|
+
pcb_silkscreen_path_id: ""
|
|
5392
|
+
};
|
|
5393
|
+
return {
|
|
5394
|
+
circuitJson: sodWithoutParsing15(parameters).concat(
|
|
5395
|
+
silkscreenLine,
|
|
5396
|
+
silkscreenRefText
|
|
5397
|
+
),
|
|
5398
|
+
parameters
|
|
5399
|
+
};
|
|
5400
|
+
};
|
|
5401
|
+
var getSodCoords15 = (parameters) => {
|
|
5402
|
+
const { pn, pad_spacing } = parameters;
|
|
5403
|
+
if (pn === 1) {
|
|
5404
|
+
return { x: -pad_spacing / 2, y: 0 };
|
|
5405
|
+
} else {
|
|
5406
|
+
return { x: pad_spacing / 2, y: 0 };
|
|
5407
|
+
}
|
|
5408
|
+
};
|
|
5409
|
+
var sodWithoutParsing15 = (parameters) => {
|
|
5410
|
+
const pads = [];
|
|
5411
|
+
for (let i = 1; i <= parameters.num_pins; i++) {
|
|
5412
|
+
const { x, y } = getSodCoords15({
|
|
5413
|
+
pn: i,
|
|
5414
|
+
pad_spacing: Number.parseFloat(parameters.pad_spacing)
|
|
5415
|
+
});
|
|
5416
|
+
pads.push(
|
|
5417
|
+
rectpad(
|
|
5418
|
+
i,
|
|
5419
|
+
x,
|
|
5420
|
+
y,
|
|
5421
|
+
Number.parseFloat(parameters.pl),
|
|
5422
|
+
Number.parseFloat(parameters.pw)
|
|
5423
|
+
)
|
|
5424
|
+
);
|
|
5425
|
+
}
|
|
5426
|
+
return pads;
|
|
5427
|
+
};
|
|
5428
|
+
|
|
5348
5429
|
// src/helpers/is-not-null.ts
|
|
5349
5430
|
function isNotNull(value) {
|
|
5350
5431
|
return value !== null;
|