@tscircuit/footprinter 0.0.146 → 0.0.147

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 CHANGED
@@ -1035,6 +1035,7 @@ type Footprinter = {
1035
1035
  sod723: () => FootprinterParamsBuilder<"w" | "h" | "p" | "pl" | "pw">;
1036
1036
  sod523: () => FootprinterParamsBuilder<"w" | "h" | "p" | "pl" | "pw">;
1037
1037
  sod323f: () => FootprinterParamsBuilder<"w" | "h" | "p" | "pl" | "pw">;
1038
+ sod323fl: () => FootprinterParamsBuilder<"w" | "h" | "p" | "pl" | "pw">;
1038
1039
  sod128: () => FootprinterParamsBuilder<"w" | "h" | "p" | "pl" | "pw">;
1039
1040
  sod123f: () => FootprinterParamsBuilder<"w" | "h" | "p" | "pl" | "pw">;
1040
1041
  sod123fl: () => FootprinterParamsBuilder<"w" | "h" | "p" | "pl" | "pw">;
package/dist/index.js CHANGED
@@ -44,6 +44,7 @@ __export(fn_exports, {
44
44
  sod128: () => sod128,
45
45
  sod323: () => sod323,
46
46
  sod323f: () => sod323f,
47
+ sod323fl: () => sod323fl,
47
48
  sod523: () => sod523,
48
49
  sod723: () => sod723,
49
50
  sod882: () => sod882,
@@ -3619,12 +3620,12 @@ var sot89_3 = (parameters) => {
3619
3620
  const pads = [];
3620
3621
  const padGap = Number.parseFloat(parameters.p);
3621
3622
  const padWidth = Number.parseFloat(parameters.pw);
3622
- const length39 = Number.parseFloat(parameters.w);
3623
+ const length40 = Number.parseFloat(parameters.w);
3623
3624
  const padHeight = Number.parseFloat(parameters.pl);
3624
3625
  pads.push(
3625
- rectpad(1, -length39 / 2, padGap, padHeight, padWidth),
3626
- rectpad(2, -length39 / 2 + (1.5 - 1.3) / 2, 0, 1.5, padWidth),
3627
- rectpad(3, -length39 / 2, -padGap, padHeight, padWidth)
3626
+ rectpad(1, -length40 / 2, padGap, padHeight, padWidth),
3627
+ rectpad(2, -length40 / 2 + (1.5 - 1.3) / 2, 0, 1.5, padWidth),
3628
+ rectpad(3, -length40 / 2, -padGap, padHeight, padWidth)
3628
3629
  );
3629
3630
  const silkscreenRefText = silkscreenRef(0, 0, 0.3);
3630
3631
  const width = Number.parseFloat(parameters.w) / 2 - 1;
@@ -3664,7 +3665,7 @@ var sot89_5 = (parameters) => {
3664
3665
  const pads = [];
3665
3666
  const padGap = Number.parseFloat(parameters.p);
3666
3667
  const padWidth = Number.parseFloat(parameters.pw);
3667
- const length39 = Number.parseFloat(parameters.w);
3668
+ const length40 = Number.parseFloat(parameters.w);
3668
3669
  pads.push(
3669
3670
  rectpad(1, -1.85, -1.5, 1.5, 0.7),
3670
3671
  rectpad(2, -1.85, 1.5, 1.5, 0.7),
@@ -5264,6 +5265,86 @@ var msop = (raw_params) => {
5264
5265
  };
5265
5266
  };
5266
5267
 
5268
+ // src/fn/sod323fl.ts
5269
+ import { z as z49 } from "zod";
5270
+ import { length as length39 } from "circuit-json";
5271
+ var sod323FL_def = z49.object({
5272
+ fn: z49.string(),
5273
+ num_pins: z49.literal(2).default(2),
5274
+ w: z49.string().default("3.20mm"),
5275
+ h: z49.string().default("1.65mm"),
5276
+ pl: z49.string().default("0.8mm"),
5277
+ pw: z49.string().default("0.9mm"),
5278
+ pad_spacing: z49.string().default("2.1mm")
5279
+ });
5280
+ var sod323fl = (raw_params) => {
5281
+ const parameters = sod323FL_def.parse(raw_params);
5282
+ const silkscreenRefText = silkscreenRef(
5283
+ 0,
5284
+ length39.parse(parameters.h),
5285
+ 0.3
5286
+ );
5287
+ const silkscreenLine = {
5288
+ type: "pcb_silkscreen_path",
5289
+ layer: "top",
5290
+ pcb_component_id: "",
5291
+ route: [
5292
+ {
5293
+ x: length39.parse(parameters.pad_spacing) / 2,
5294
+ y: length39.parse(parameters.h) / 2
5295
+ },
5296
+ {
5297
+ x: -length39.parse(parameters.w) / 2 - 0.2,
5298
+ y: length39.parse(parameters.h) / 2
5299
+ },
5300
+ {
5301
+ x: -length39.parse(parameters.w) / 2 - 0.2,
5302
+ y: -length39.parse(parameters.h) / 2
5303
+ },
5304
+ {
5305
+ x: length39.parse(parameters.pad_spacing) / 2,
5306
+ y: -length39.parse(parameters.h) / 2
5307
+ }
5308
+ ],
5309
+ stroke_width: 0.1,
5310
+ pcb_silkscreen_path_id: ""
5311
+ };
5312
+ return {
5313
+ circuitJson: sodWithoutParsing14(parameters).concat(
5314
+ silkscreenLine,
5315
+ silkscreenRefText
5316
+ ),
5317
+ parameters
5318
+ };
5319
+ };
5320
+ var getSodCoords14 = (parameters) => {
5321
+ const { pn, pad_spacing } = parameters;
5322
+ if (pn === 1) {
5323
+ return { x: -pad_spacing / 2, y: 0 };
5324
+ } else {
5325
+ return { x: pad_spacing / 2, y: 0 };
5326
+ }
5327
+ };
5328
+ var sodWithoutParsing14 = (parameters) => {
5329
+ const pads = [];
5330
+ for (let i = 1; i <= parameters.num_pins; i++) {
5331
+ const { x, y } = getSodCoords14({
5332
+ pn: i,
5333
+ pad_spacing: Number.parseFloat(parameters.pad_spacing)
5334
+ });
5335
+ pads.push(
5336
+ rectpad(
5337
+ i,
5338
+ x,
5339
+ y,
5340
+ Number.parseFloat(parameters.pl),
5341
+ Number.parseFloat(parameters.pw)
5342
+ )
5343
+ );
5344
+ }
5345
+ return pads;
5346
+ };
5347
+
5267
5348
  // src/helpers/is-not-null.ts
5268
5349
  function isNotNull(value) {
5269
5350
  return value !== null;