@tscircuit/footprinter 0.0.302 → 0.0.304

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.js CHANGED
@@ -1677,41 +1677,101 @@ var ssop = (raw_params) => {
1677
1677
  };
1678
1678
 
1679
1679
  // src/fn/tssop.ts
1680
- var tssop_def = extendSoicDef({
1681
- w: "7.1mm",
1682
- p: "0.65mm",
1683
- pl: "1.35mm",
1684
- pw: "0.40mm",
1685
- legsoutside: true
1680
+ import { length as length11 } from "circuit-json";
1681
+ import { z as z16 } from "zod";
1682
+ var tssop_def = base_def.extend({
1683
+ fn: z16.string(),
1684
+ num_pins: z16.number().optional().default(8),
1685
+ w: length11.default(length11.parse("3.0mm")),
1686
+ p: length11.default(length11.parse("0.5mm")),
1687
+ pw: length11.default(length11.parse("0.30mm")),
1688
+ pl: length11.default(length11.parse("1.45mm")),
1689
+ legsoutside: z16.boolean().optional().default(true),
1690
+ silkscreen_stroke_width: z16.number().optional().default(0.1)
1686
1691
  });
1692
+ var getTssopCoords = (parameters) => {
1693
+ const { num_pins, pn, w, p, pl, legsoutside } = parameters;
1694
+ const ph = num_pins / 2;
1695
+ const isLeft = pn <= ph;
1696
+ const leftPinGaps = ph - 1;
1697
+ const h = p * leftPinGaps;
1698
+ const legoffset = legsoutside ? pl / 2 : -pl / 2;
1699
+ if (isLeft) {
1700
+ return { x: -w / 2 - legoffset, y: h / 2 - (pn - 1) * p };
1701
+ }
1702
+ return { x: w / 2 + legoffset, y: -h / 2 + (pn - ph - 1) * p };
1703
+ };
1687
1704
  var tssop = (raw_params) => {
1688
- const parameters = tssop_def.parse(raw_params);
1705
+ const params = { ...raw_params };
1706
+ const pRaw = params.p;
1707
+ const pValue = typeof pRaw === "string" || typeof pRaw === "number" ? length11.parse(pRaw) : void 0;
1708
+ const isFinePitch = pValue != null && pValue <= length11.parse("0.5mm");
1709
+ const parameters = tssop_def.parse(params);
1710
+ const pads = [];
1711
+ const wForPads = isFinePitch ? parameters.w - length11.parse("0.15mm") : parameters.w;
1712
+ for (let i = 0; i < parameters.num_pins; i++) {
1713
+ const { x, y } = getTssopCoords({
1714
+ num_pins: parameters.num_pins,
1715
+ pn: i + 1,
1716
+ w: wForPads,
1717
+ p: parameters.p,
1718
+ pl: parameters.pl,
1719
+ legsoutside: parameters.legsoutside
1720
+ });
1721
+ pads.push(rectpad(i + 1, x, y, parameters.pl, parameters.pw));
1722
+ }
1723
+ const m = Math.min(1, parameters.p / 2);
1724
+ const sw = parameters.w - (parameters.legsoutside ? 0 : parameters.pl * 2) - 0.2;
1725
+ const sh = (parameters.num_pins / 2 - 1) * parameters.p + parameters.pw + m;
1726
+ const silkscreenRefText = silkscreenRef(
1727
+ 0,
1728
+ sh / 2 + 0.4,
1729
+ sh / 12
1730
+ );
1731
+ const silkscreenBorder = {
1732
+ type: "pcb_silkscreen_path",
1733
+ layer: "top",
1734
+ pcb_component_id: "",
1735
+ pcb_silkscreen_path_id: "silkscreen_path_1",
1736
+ stroke_width: parameters.silkscreen_stroke_width ?? 0.1,
1737
+ route: [
1738
+ { x: -sw / 2, y: -sh / 2 },
1739
+ { x: -sw / 2, y: sh / 2 },
1740
+ ...u_curve.map(({ x, y }) => ({
1741
+ x: x * sw / 6,
1742
+ y: y * sw / 6 + sh / 2
1743
+ })),
1744
+ { x: sw / 2, y: sh / 2 },
1745
+ { x: sw / 2, y: -sh / 2 },
1746
+ { x: -sw / 2, y: -sh / 2 }
1747
+ ]
1748
+ };
1689
1749
  return {
1690
- circuitJson: soicWithoutParsing(parameters),
1750
+ circuitJson: [...pads, silkscreenBorder, silkscreenRefText],
1691
1751
  parameters
1692
1752
  };
1693
1753
  };
1694
1754
 
1695
1755
  // src/fn/sot363.ts
1696
- import { z as z16 } from "zod";
1697
- import { length as length11 } from "circuit-json";
1756
+ import { z as z17 } from "zod";
1757
+ import { length as length12 } from "circuit-json";
1698
1758
  var sot363_def = base_def.extend({
1699
- fn: z16.string(),
1700
- num_pins: z16.literal(6).default(6),
1701
- w: z16.string().default("3.1mm"),
1702
- h: z16.string().default("2.0mm"),
1703
- p: z16.string().default("0.65mm"),
1704
- pl: z16.string().default("1.325mm"),
1705
- pw: z16.string().default("0.4mm"),
1706
- string: z16.string().optional()
1759
+ fn: z17.string(),
1760
+ num_pins: z17.literal(6).default(6),
1761
+ w: z17.string().default("3.1mm"),
1762
+ h: z17.string().default("2.0mm"),
1763
+ p: z17.string().default("0.65mm"),
1764
+ pl: z17.string().default("1.325mm"),
1765
+ pw: z17.string().default("0.4mm"),
1766
+ string: z17.string().optional()
1707
1767
  });
1708
1768
  var sot363 = (raw_params) => {
1709
1769
  const parameters = sot363_def.parse({ ...raw_params, fn: "sot363" });
1710
- const w = length11.parse(parameters.w);
1711
- const h = length11.parse(parameters.h);
1712
- const p = length11.parse(parameters.p);
1713
- const pl = length11.parse(parameters.pl);
1714
- const pw = length11.parse(parameters.pw);
1770
+ const w = length12.parse(parameters.w);
1771
+ const h = length12.parse(parameters.h);
1772
+ const p = length12.parse(parameters.p);
1773
+ const pl = length12.parse(parameters.pl);
1774
+ const pw = length12.parse(parameters.pw);
1715
1775
  const pads = [];
1716
1776
  for (let i = 0; i < 6; i++) {
1717
1777
  const { x, y } = getSot363PadCoord(i + 1, w, p, pl);
@@ -1774,25 +1834,25 @@ var getSot363PadCoord = (pn, w, p, pl) => {
1774
1834
  };
1775
1835
 
1776
1836
  // src/fn/sot886.ts
1777
- import { z as z17 } from "zod";
1778
- import { length as length12 } from "circuit-json";
1837
+ import { z as z18 } from "zod";
1838
+ import { length as length13 } from "circuit-json";
1779
1839
  var sot886_def = base_def.extend({
1780
- fn: z17.string(),
1781
- num_pins: z17.literal(6).default(6),
1782
- w: z17.string().default("1.01mm"),
1783
- h: z17.string().default("1.45mm"),
1784
- p: z17.string().default("0.5mm"),
1785
- pl: z17.string().default("0.33mm"),
1786
- pw: z17.string().default("0.27mm"),
1787
- string: z17.string().optional()
1840
+ fn: z18.string(),
1841
+ num_pins: z18.literal(6).default(6),
1842
+ w: z18.string().default("1.01mm"),
1843
+ h: z18.string().default("1.45mm"),
1844
+ p: z18.string().default("0.5mm"),
1845
+ pl: z18.string().default("0.33mm"),
1846
+ pw: z18.string().default("0.27mm"),
1847
+ string: z18.string().optional()
1788
1848
  });
1789
1849
  var sot886 = (raw_params) => {
1790
1850
  const parameters = sot886_def.parse({ ...raw_params, fn: "sot886" });
1791
- const w = length12.parse(parameters.w);
1792
- const h = length12.parse(parameters.h);
1793
- const p = length12.parse(parameters.p);
1794
- const pl = length12.parse(parameters.pl);
1795
- const pw = length12.parse(parameters.pw);
1851
+ const w = length13.parse(parameters.w);
1852
+ const h = length13.parse(parameters.h);
1853
+ const p = length13.parse(parameters.p);
1854
+ const pl = length13.parse(parameters.pl);
1855
+ const pw = length13.parse(parameters.pw);
1796
1856
  const pads = [];
1797
1857
  for (let i = 0; i < 6; i++) {
1798
1858
  const { x, y } = getSot886PadCoord(i + 1, w, p, pl);
@@ -1855,16 +1915,16 @@ var getSot886PadCoord = (pn, w, p, pl) => {
1855
1915
  };
1856
1916
 
1857
1917
  // src/fn/sot23.ts
1858
- import { z as z18 } from "zod";
1918
+ import { z as z19 } from "zod";
1859
1919
  var sot23_def = base_def.extend({
1860
- fn: z18.string(),
1861
- num_pins: z18.number().default(3),
1862
- w: z18.string().default("1.92mm"),
1863
- h: z18.string().default("2.74mm"),
1864
- pl: z18.string().default("1.32mm"),
1865
- pw: z18.string().default("0.6mm"),
1866
- p: z18.string().default("0.95mm"),
1867
- string: z18.string().optional()
1920
+ fn: z19.string(),
1921
+ num_pins: z19.number().default(3),
1922
+ w: z19.string().default("1.92mm"),
1923
+ h: z19.string().default("2.74mm"),
1924
+ pl: z19.string().default("1.32mm"),
1925
+ pw: z19.string().default("0.6mm"),
1926
+ p: z19.string().default("0.95mm"),
1927
+ string: z19.string().optional()
1868
1928
  });
1869
1929
  var sot23_6_or_8_def = extendSoicDef({
1870
1930
  p: "0.95mm",
@@ -2154,8 +2214,8 @@ var dfn = (raw_params) => {
2154
2214
  };
2155
2215
 
2156
2216
  // src/fn/pinrow.ts
2157
- import { z as z21 } from "zod";
2158
- import { length as length13 } from "circuit-json";
2217
+ import { z as z22 } from "zod";
2218
+ import { length as length14 } from "circuit-json";
2159
2219
 
2160
2220
  // src/helpers/silkscreenPin.ts
2161
2221
  var silkscreenPin = ({
@@ -2242,28 +2302,28 @@ function determinePinlabelAnchorSide({
2242
2302
 
2243
2303
  // src/fn/pinrow.ts
2244
2304
  var pinrow_def = base_def.extend({
2245
- fn: z21.string(),
2246
- num_pins: z21.number().optional().default(6),
2247
- rows: z21.union([z21.string(), z21.number()]).transform((val) => Number(val)).optional().default(1).describe("number of rows"),
2248
- p: length13.default("0.1in").describe("pitch"),
2249
- id: length13.default("1.0mm").describe("inner diameter"),
2250
- od: length13.default("1.5mm").describe("outer diameter"),
2251
- male: z21.boolean().optional().describe("for male pin headers"),
2252
- female: z21.boolean().optional().describe("for female pin headers"),
2253
- smd: z21.boolean().optional().describe("surface mount device"),
2254
- surfacemount: z21.boolean().optional().describe("surface mount device (verbose)"),
2255
- rightangle: z21.boolean().optional().describe("right angle"),
2256
- pw: length13.optional().default("1.0mm").describe("pad width for SMD"),
2257
- pl: length13.optional().default("2.0mm").describe("pad length for SMD"),
2258
- pinlabeltextalignleft: z21.boolean().optional().default(false),
2259
- pinlabeltextaligncenter: z21.boolean().optional().default(false),
2260
- pinlabeltextalignright: z21.boolean().optional().default(false),
2261
- pinlabelverticallyinverted: z21.boolean().optional().default(false),
2262
- pinlabelorthogonal: z21.boolean().optional().default(false),
2263
- nosquareplating: z21.boolean().optional().default(false).describe("do not use rectangular pad for pin 1"),
2264
- nopinlabels: z21.boolean().optional().default(false).describe("omit silkscreen pin labels"),
2265
- doublesidedpinlabel: z21.boolean().optional().default(false).describe("add silkscreen pins in top and bottom layers"),
2266
- bottomsidepinlabel: z21.boolean().optional().default(false).describe(
2305
+ fn: z22.string(),
2306
+ num_pins: z22.number().optional().default(6),
2307
+ rows: z22.union([z22.string(), z22.number()]).transform((val) => Number(val)).optional().default(1).describe("number of rows"),
2308
+ p: length14.default("0.1in").describe("pitch"),
2309
+ id: length14.default("1.0mm").describe("inner diameter"),
2310
+ od: length14.default("1.5mm").describe("outer diameter"),
2311
+ male: z22.boolean().optional().describe("for male pin headers"),
2312
+ female: z22.boolean().optional().describe("for female pin headers"),
2313
+ smd: z22.boolean().optional().describe("surface mount device"),
2314
+ surfacemount: z22.boolean().optional().describe("surface mount device (verbose)"),
2315
+ rightangle: z22.boolean().optional().describe("right angle"),
2316
+ pw: length14.optional().default("1.0mm").describe("pad width for SMD"),
2317
+ pl: length14.optional().default("2.0mm").describe("pad length for SMD"),
2318
+ pinlabeltextalignleft: z22.boolean().optional().default(false),
2319
+ pinlabeltextaligncenter: z22.boolean().optional().default(false),
2320
+ pinlabeltextalignright: z22.boolean().optional().default(false),
2321
+ pinlabelverticallyinverted: z22.boolean().optional().default(false),
2322
+ pinlabelorthogonal: z22.boolean().optional().default(false),
2323
+ nosquareplating: z22.boolean().optional().default(false).describe("do not use rectangular pad for pin 1"),
2324
+ nopinlabels: z22.boolean().optional().default(false).describe("omit silkscreen pin labels"),
2325
+ doublesidedpinlabel: z22.boolean().optional().default(false).describe("add silkscreen pins in top and bottom layers"),
2326
+ bottomsidepinlabel: z22.boolean().optional().default(false).describe(
2267
2327
  "place the silkscreen reference text on the bottom layer instead of top"
2268
2328
  )
2269
2329
  }).transform((data) => {
@@ -2279,7 +2339,7 @@ var pinrow_def = base_def.extend({
2279
2339
  }).superRefine((data, ctx) => {
2280
2340
  if (data.male && data.female) {
2281
2341
  ctx.addIssue({
2282
- code: z21.ZodIssueCode.custom,
2342
+ code: z22.ZodIssueCode.custom,
2283
2343
  message: "'male' and 'female' cannot both be true; it should be male or female.",
2284
2344
  path: ["male", "female"]
2285
2345
  });
@@ -2517,25 +2577,25 @@ var pinrow = (raw_params) => {
2517
2577
  };
2518
2578
 
2519
2579
  // src/fn/sot563.ts
2520
- import { z as z22 } from "zod";
2521
- import { length as length14 } from "circuit-json";
2580
+ import { z as z23 } from "zod";
2581
+ import { length as length15 } from "circuit-json";
2522
2582
  var sot563_def = base_def.extend({
2523
- fn: z22.string(),
2524
- num_pins: z22.literal(6).default(6),
2525
- w: z22.string().default("2.1mm"),
2526
- h: z22.string().default("2.45mm"),
2527
- p: z22.string().default("0.5mm"),
2528
- pl: z22.string().default("0.675mm"),
2529
- pw: z22.string().default("0.35mm"),
2530
- string: z22.string().optional()
2583
+ fn: z23.string(),
2584
+ num_pins: z23.literal(6).default(6),
2585
+ w: z23.string().default("2.1mm"),
2586
+ h: z23.string().default("2.45mm"),
2587
+ p: z23.string().default("0.5mm"),
2588
+ pl: z23.string().default("0.675mm"),
2589
+ pw: z23.string().default("0.35mm"),
2590
+ string: z23.string().optional()
2531
2591
  });
2532
2592
  var sot563 = (raw_params) => {
2533
2593
  const parameters = sot563_def.parse({ ...raw_params, fn: "sot563" });
2534
- const w = length14.parse(parameters.w);
2535
- const h = length14.parse(parameters.h);
2536
- const p = length14.parse(parameters.p);
2537
- const pl = length14.parse(parameters.pl);
2538
- const pw = length14.parse(parameters.pw);
2594
+ const w = length15.parse(parameters.w);
2595
+ const h = length15.parse(parameters.h);
2596
+ const p = length15.parse(parameters.p);
2597
+ const pl = length15.parse(parameters.pl);
2598
+ const pw = length15.parse(parameters.pw);
2539
2599
  const pads = [];
2540
2600
  for (let i = 0; i < 6; i++) {
2541
2601
  const { x, y } = getSot563PadCoord(i + 1, w, p, pl);
@@ -2626,23 +2686,23 @@ var ms013 = (raw_params) => {
2626
2686
  };
2627
2687
 
2628
2688
  // src/fn/sot723.ts
2629
- import { length as length15 } from "circuit-json";
2630
- import { z as z23 } from "zod";
2689
+ import { length as length16 } from "circuit-json";
2690
+ import { z as z24 } from "zod";
2631
2691
  var sot723_def = base_def.extend({
2632
- fn: z23.string(),
2633
- num_pins: z23.literal(3).default(3),
2634
- w: z23.string().default("1.2mm"),
2635
- h: z23.string().default("1.2mm"),
2636
- pw: z23.string().default("0.40mm"),
2637
- pl: z23.string().default("0.45mm"),
2638
- p: z23.string().default("0.575mm")
2692
+ fn: z24.string(),
2693
+ num_pins: z24.literal(3).default(3),
2694
+ w: z24.string().default("1.2mm"),
2695
+ h: z24.string().default("1.2mm"),
2696
+ pw: z24.string().default("0.40mm"),
2697
+ pl: z24.string().default("0.45mm"),
2698
+ p: z24.string().default("0.575mm")
2639
2699
  });
2640
2700
  var sot723 = (raw_params) => {
2641
2701
  const parameters = sot723_def.parse(raw_params);
2642
2702
  const pad2 = sot723WithoutParsing(parameters);
2643
2703
  const silkscreenRefText = silkscreenRef(
2644
2704
  0,
2645
- length15.parse(parameters.h),
2705
+ length16.parse(parameters.h),
2646
2706
  0.2
2647
2707
  );
2648
2708
  return {
@@ -2685,22 +2745,22 @@ var sot723WithoutParsing = (parameters) => {
2685
2745
  };
2686
2746
 
2687
2747
  // src/fn/sod123.ts
2688
- import { z as z24 } from "zod";
2689
- import { length as length16 } from "circuit-json";
2748
+ import { z as z25 } from "zod";
2749
+ import { length as length17 } from "circuit-json";
2690
2750
  var sod_def = base_def.extend({
2691
- fn: z24.string(),
2692
- num_pins: z24.literal(2).default(2),
2693
- w: z24.string().default("2.36mm"),
2694
- h: z24.string().default("1.22mm"),
2695
- pl: z24.string().default("0.9mm"),
2696
- pw: z24.string().default("1.2mm"),
2697
- p: z24.string().default("3.30mm")
2751
+ fn: z25.string(),
2752
+ num_pins: z25.literal(2).default(2),
2753
+ w: z25.string().default("2.36mm"),
2754
+ h: z25.string().default("1.22mm"),
2755
+ pl: z25.string().default("0.9mm"),
2756
+ pw: z25.string().default("1.2mm"),
2757
+ p: z25.string().default("3.30mm")
2698
2758
  });
2699
2759
  var sod123 = (raw_params) => {
2700
2760
  const parameters = sod_def.parse(raw_params);
2701
2761
  const silkscreenRefText = silkscreenRef(
2702
2762
  0,
2703
- length16.parse(parameters.h) / 4 + 0.4,
2763
+ length17.parse(parameters.h) / 4 + 0.4,
2704
2764
  0.3
2705
2765
  );
2706
2766
  return {
@@ -2740,14 +2800,14 @@ var sodWithoutParsing = (parameters) => {
2740
2800
 
2741
2801
  // src/fn/axial.ts
2742
2802
  import {
2743
- length as length17
2803
+ length as length18
2744
2804
  } from "circuit-json";
2745
- import { z as z25 } from "zod";
2805
+ import { z as z26 } from "zod";
2746
2806
  var axial_def = base_def.extend({
2747
- fn: z25.string(),
2748
- p: length17.optional().default("2.54mm"),
2749
- id: length17.optional().default("0.7mm"),
2750
- od: length17.optional().default("1.4mm")
2807
+ fn: z26.string(),
2808
+ p: length18.optional().default("2.54mm"),
2809
+ id: length18.optional().default("0.7mm"),
2810
+ od: length18.optional().default("1.4mm")
2751
2811
  });
2752
2812
  var axial = (raw_params) => {
2753
2813
  const parameters = axial_def.parse(raw_params);
@@ -2780,9 +2840,9 @@ var axial = (raw_params) => {
2780
2840
 
2781
2841
  // src/fn/radial.ts
2782
2842
  import {
2783
- length as length18
2843
+ length as length19
2784
2844
  } from "circuit-json";
2785
- import { z as z26 } from "zod";
2845
+ import { z as z27 } from "zod";
2786
2846
 
2787
2847
  // src/helpers/generateCircleArcs.ts
2788
2848
  var generateCircleArcs = (centerX, centerY, radius, cut, cutHeight, segmentLength = 0.1) => {
@@ -2813,13 +2873,13 @@ var generateCircleArcs = (centerX, centerY, radius, cut, cutHeight, segmentLengt
2813
2873
 
2814
2874
  // src/fn/radial.ts
2815
2875
  var radial_def = base_def.extend({
2816
- fn: z26.string(),
2817
- p: length18.optional().default("5mm"),
2818
- id: length18.optional().default("0.8mm"),
2819
- od: length18.optional().default("1.6mm"),
2820
- ceramic: z26.boolean().optional(),
2821
- electrolytic: z26.boolean().optional(),
2822
- polarized: z26.boolean().optional()
2876
+ fn: z27.string(),
2877
+ p: length19.optional().default("5mm"),
2878
+ id: length19.optional().default("0.8mm"),
2879
+ od: length19.optional().default("1.6mm"),
2880
+ ceramic: z27.boolean().optional(),
2881
+ electrolytic: z27.boolean().optional(),
2882
+ polarized: z27.boolean().optional()
2823
2883
  });
2824
2884
  var radial = (raw_params) => {
2825
2885
  const parameters = radial_def.parse(raw_params);
@@ -2916,8 +2976,8 @@ var radial = (raw_params) => {
2916
2976
  };
2917
2977
 
2918
2978
  // src/fn/pushbutton.ts
2919
- import { length as length19 } from "circuit-json";
2920
- import { z as z27 } from "zod";
2979
+ import { length as length20 } from "circuit-json";
2980
+ import { z as z28 } from "zod";
2921
2981
 
2922
2982
  // src/helpers/silkscreenpath.ts
2923
2983
  var silkscreenpath = (route, options = {}) => {
@@ -2933,11 +2993,11 @@ var silkscreenpath = (route, options = {}) => {
2933
2993
 
2934
2994
  // src/fn/pushbutton.ts
2935
2995
  var pushbutton_def = base_def.extend({
2936
- fn: z27.literal("pushbutton"),
2937
- w: length19.default(4.5),
2938
- h: length19.default(6.5),
2939
- id: length19.default(1),
2940
- od: length19.default(1.2)
2996
+ fn: z28.literal("pushbutton"),
2997
+ w: length20.default(4.5),
2998
+ h: length20.default(6.5),
2999
+ id: length20.default(1),
3000
+ od: length20.default(1.2)
2941
3001
  });
2942
3002
  var pushbutton = (raw_params) => {
2943
3003
  const parameters = pushbutton_def.parse(raw_params);
@@ -2984,24 +3044,24 @@ var pushbutton = (raw_params) => {
2984
3044
 
2985
3045
  // src/fn/stampboard.ts
2986
3046
  import {
2987
- length as length20
3047
+ length as length21
2988
3048
  } from "circuit-json";
2989
- import { z as z28 } from "zod";
3049
+ import { z as z29 } from "zod";
2990
3050
  var stampboard_def = base_def.extend({
2991
- fn: z28.string(),
2992
- w: length20.default("22.58mm"),
2993
- h: length20.optional(),
2994
- left: length20.optional().default(20),
2995
- right: length20.optional().default(20),
2996
- top: length20.optional().default(2),
2997
- bottom: length20.optional().default(2),
2998
- p: length20.default(length20.parse("2.54mm")),
2999
- pw: length20.default(length20.parse("1.6mm")),
3000
- pl: length20.default(length20.parse("2.4mm")),
3001
- innerhole: z28.boolean().default(false),
3002
- innerholeedgedistance: length20.default(length20.parse("1.61mm")),
3003
- silkscreenlabels: z28.boolean().default(false),
3004
- silkscreenlabelmargin: length20.default(length20.parse("0.1mm"))
3051
+ fn: z29.string(),
3052
+ w: length21.default("22.58mm"),
3053
+ h: length21.optional(),
3054
+ left: length21.optional().default(20),
3055
+ right: length21.optional().default(20),
3056
+ top: length21.optional().default(2),
3057
+ bottom: length21.optional().default(2),
3058
+ p: length21.default(length21.parse("2.54mm")),
3059
+ pw: length21.default(length21.parse("1.6mm")),
3060
+ pl: length21.default(length21.parse("2.4mm")),
3061
+ innerhole: z29.boolean().default(false),
3062
+ innerholeedgedistance: length21.default(length21.parse("1.61mm")),
3063
+ silkscreenlabels: z29.boolean().default(false),
3064
+ silkscreenlabelmargin: length21.default(length21.parse("0.1mm"))
3005
3065
  });
3006
3066
  var getHeight = (parameters) => {
3007
3067
  const params = stampboard_def.parse(parameters);
@@ -3410,22 +3470,22 @@ var stampboard = (raw_params) => {
3410
3470
 
3411
3471
  // src/fn/stampreceiver.ts
3412
3472
  import {
3413
- length as length21
3473
+ length as length22
3414
3474
  } from "circuit-json";
3415
- import { z as z29 } from "zod";
3475
+ import { z as z30 } from "zod";
3416
3476
  var stampreceiver_def = base_def.extend({
3417
- fn: z29.string(),
3418
- w: length21.default("22.58mm"),
3419
- h: length21.optional(),
3420
- left: length21.optional().default(20),
3421
- right: length21.optional().default(20),
3422
- top: length21.optional().default(2),
3423
- bottom: length21.optional().default(2),
3424
- p: length21.default(length21.parse("2.54mm")),
3425
- pw: length21.default(length21.parse("1.6mm")),
3426
- pl: length21.default(length21.parse("3.2mm")),
3427
- innerhole: z29.boolean().default(false),
3428
- innerholeedgedistance: length21.default(length21.parse("1.61mm"))
3477
+ fn: z30.string(),
3478
+ w: length22.default("22.58mm"),
3479
+ h: length22.optional(),
3480
+ left: length22.optional().default(20),
3481
+ right: length22.optional().default(20),
3482
+ top: length22.optional().default(2),
3483
+ bottom: length22.optional().default(2),
3484
+ p: length22.default(length22.parse("2.54mm")),
3485
+ pw: length22.default(length22.parse("1.6mm")),
3486
+ pl: length22.default(length22.parse("3.2mm")),
3487
+ innerhole: z30.boolean().default(false),
3488
+ innerholeedgedistance: length22.default(length22.parse("1.61mm"))
3429
3489
  });
3430
3490
  var getHeight2 = (parameters) => {
3431
3491
  const params = stampreceiver_def.parse(parameters);
@@ -3726,20 +3786,20 @@ var lqfp = (parameters) => {
3726
3786
 
3727
3787
  // src/fn/breakoutheaders.ts
3728
3788
  import {
3729
- length as length22
3789
+ length as length23
3730
3790
  } from "circuit-json";
3731
- import { z as z30 } from "zod";
3791
+ import { z as z31 } from "zod";
3732
3792
  var breakoutheaders_def = base_def.extend({
3733
- fn: z30.string(),
3734
- w: length22.default("10mm"),
3735
- h: length22.optional(),
3736
- left: length22.optional().default(20),
3737
- right: length22.optional().default(20),
3738
- top: length22.optional().default(0),
3739
- bottom: length22.optional().default(0),
3740
- p: length22.default(length22.parse("2.54mm")),
3741
- id: length22.optional().default(length22.parse("1mm")),
3742
- od: length22.optional().default(length22.parse("1.5mm"))
3793
+ fn: z31.string(),
3794
+ w: length23.default("10mm"),
3795
+ h: length23.optional(),
3796
+ left: length23.optional().default(20),
3797
+ right: length23.optional().default(20),
3798
+ top: length23.optional().default(0),
3799
+ bottom: length23.optional().default(0),
3800
+ p: length23.default(length23.parse("2.54mm")),
3801
+ id: length23.optional().default(length23.parse("1mm")),
3802
+ od: length23.optional().default(length23.parse("1.5mm"))
3743
3803
  });
3744
3804
  var getHeight3 = (parameters) => {
3745
3805
  const params = breakoutheaders_def.parse(parameters);
@@ -3931,9 +3991,9 @@ var breakoutheaders = (raw_params) => {
3931
3991
 
3932
3992
  // src/fn/hc49.ts
3933
3993
  import {
3934
- length as length23
3994
+ length as length24
3935
3995
  } from "circuit-json";
3936
- import { z as z31 } from "zod";
3996
+ import { z as z32 } from "zod";
3937
3997
  var generate_u_curve = (centerX, centerY, radius, direction) => {
3938
3998
  return Array.from({ length: 25 }, (_, i) => {
3939
3999
  const theta = i / 24 * Math.PI - Math.PI / 2;
@@ -3944,12 +4004,12 @@ var generate_u_curve = (centerX, centerY, radius, direction) => {
3944
4004
  });
3945
4005
  };
3946
4006
  var hc49_def = base_def.extend({
3947
- fn: z31.string(),
3948
- p: length23.optional().default("4.88mm"),
3949
- id: length23.optional().default("0.8mm"),
3950
- od: length23.optional().default("1.5mm"),
3951
- w: length23.optional().default("5.6mm"),
3952
- h: length23.optional().default("3.5mm")
4007
+ fn: z32.string(),
4008
+ p: length24.optional().default("4.88mm"),
4009
+ id: length24.optional().default("0.8mm"),
4010
+ od: length24.optional().default("1.5mm"),
4011
+ w: length24.optional().default("5.6mm"),
4012
+ h: length24.optional().default("3.5mm")
3953
4013
  });
3954
4014
  var hc49 = (raw_params) => {
3955
4015
  const parameters = hc49_def.parse(raw_params);
@@ -3990,11 +4050,11 @@ var hc49 = (raw_params) => {
3990
4050
 
3991
4051
  // src/fn/pad.ts
3992
4052
  import "zod";
3993
- import { length as length24 } from "circuit-json";
4053
+ import { length as length25 } from "circuit-json";
3994
4054
  import { mm as mm11 } from "@tscircuit/mm";
3995
4055
  var pad_def = base_def.extend({
3996
- w: length24,
3997
- h: length24
4056
+ w: length25,
4057
+ h: length25
3998
4058
  });
3999
4059
  var pad = (params) => {
4000
4060
  const { w, h } = params;
@@ -4010,7 +4070,7 @@ var pad = (params) => {
4010
4070
  };
4011
4071
 
4012
4072
  // src/fn/to92.ts
4013
- import { z as z33 } from "zod";
4073
+ import { z as z34 } from "zod";
4014
4074
  import "@tscircuit/mm";
4015
4075
 
4016
4076
  // src/helpers/platedHolePill.ts
@@ -4035,15 +4095,15 @@ var platedHolePill = (pn, x, y, holeDiameter, outerWidth, outerHeight) => {
4035
4095
 
4036
4096
  // src/fn/to92.ts
4037
4097
  var to92_def = base_def.extend({
4038
- fn: z33.string(),
4039
- num_pins: z33.union([z33.literal(3), z33.literal(2)]).default(3),
4040
- p: z33.string().default("1.27mm"),
4041
- id: z33.string().default("0.72mm"),
4042
- od: z33.string().default("0.95mm"),
4043
- w: z33.string().default("4.5mm"),
4044
- h: z33.string().default("4.5mm"),
4045
- inline: z33.boolean().default(false),
4046
- string: z33.string().optional()
4098
+ fn: z34.string(),
4099
+ num_pins: z34.union([z34.literal(3), z34.literal(2)]).default(3),
4100
+ p: z34.string().default("1.27mm"),
4101
+ id: z34.string().default("0.72mm"),
4102
+ od: z34.string().default("0.95mm"),
4103
+ w: z34.string().default("4.5mm"),
4104
+ h: z34.string().default("4.5mm"),
4105
+ inline: z34.boolean().default(false),
4106
+ string: z34.string().optional()
4047
4107
  });
4048
4108
  var generateSemicircle = (centerX, centerY, radius) => {
4049
4109
  return Array.from({ length: 25 }, (_, i) => {
@@ -4153,22 +4213,22 @@ var to92 = (raw_params) => {
4153
4213
  };
4154
4214
 
4155
4215
  // src/fn/sod523.ts
4156
- import { z as z34 } from "zod";
4157
- import { length as length25 } from "circuit-json";
4216
+ import { z as z35 } from "zod";
4217
+ import { length as length26 } from "circuit-json";
4158
4218
  var sod_def2 = base_def.extend({
4159
- fn: z34.string(),
4160
- num_pins: z34.literal(2).default(2),
4161
- w: z34.string().default("2.15mm"),
4162
- h: z34.string().default("1.20mm"),
4163
- pl: z34.string().default("0.5mm"),
4164
- pw: z34.string().default("0.6mm"),
4165
- p: z34.string().default("1.4mm")
4219
+ fn: z35.string(),
4220
+ num_pins: z35.literal(2).default(2),
4221
+ w: z35.string().default("2.15mm"),
4222
+ h: z35.string().default("1.20mm"),
4223
+ pl: z35.string().default("0.5mm"),
4224
+ pw: z35.string().default("0.6mm"),
4225
+ p: z35.string().default("1.4mm")
4166
4226
  });
4167
4227
  var sod523 = (raw_params) => {
4168
4228
  const parameters = sod_def2.parse(raw_params);
4169
4229
  const silkscreenRefText = silkscreenRef(
4170
4230
  0,
4171
- length25.parse(parameters.h),
4231
+ length26.parse(parameters.h),
4172
4232
  0.3
4173
4233
  );
4174
4234
  const silkscreenLine = {
@@ -4177,20 +4237,20 @@ var sod523 = (raw_params) => {
4177
4237
  pcb_component_id: "",
4178
4238
  route: [
4179
4239
  {
4180
- x: length25.parse(parameters.p) / 2,
4181
- y: length25.parse(parameters.h) / 2
4240
+ x: length26.parse(parameters.p) / 2,
4241
+ y: length26.parse(parameters.h) / 2
4182
4242
  },
4183
4243
  {
4184
- x: -length25.parse(parameters.w) / 2 - 0.2,
4185
- y: length25.parse(parameters.h) / 2
4244
+ x: -length26.parse(parameters.w) / 2 - 0.2,
4245
+ y: length26.parse(parameters.h) / 2
4186
4246
  },
4187
4247
  {
4188
- x: -length25.parse(parameters.w) / 2 - 0.2,
4189
- y: -length25.parse(parameters.h) / 2
4248
+ x: -length26.parse(parameters.w) / 2 - 0.2,
4249
+ y: -length26.parse(parameters.h) / 2
4190
4250
  },
4191
4251
  {
4192
- x: length25.parse(parameters.p) / 2,
4193
- y: -length25.parse(parameters.h) / 2
4252
+ x: length26.parse(parameters.p) / 2,
4253
+ y: -length26.parse(parameters.h) / 2
4194
4254
  }
4195
4255
  ],
4196
4256
  stroke_width: 0.1,
@@ -4278,22 +4338,22 @@ var sop8 = (raw_params) => {
4278
4338
  };
4279
4339
 
4280
4340
  // src/fn/sod80.ts
4281
- import { z as z35 } from "zod";
4282
- import { length as length26 } from "circuit-json";
4341
+ import { z as z36 } from "zod";
4342
+ import { length as length27 } from "circuit-json";
4283
4343
  var sod80_def = base_def.extend({
4284
- fn: z35.string(),
4285
- num_pins: z35.literal(2).default(2),
4286
- w: z35.string().default("5.0mm"),
4287
- h: z35.string().default("2.30mm"),
4288
- pl: z35.string().default("1.25mm"),
4289
- pw: z35.string().default("2mm"),
4290
- p: z35.string().default("3.75mm")
4344
+ fn: z36.string(),
4345
+ num_pins: z36.literal(2).default(2),
4346
+ w: z36.string().default("5.0mm"),
4347
+ h: z36.string().default("2.30mm"),
4348
+ pl: z36.string().default("1.25mm"),
4349
+ pw: z36.string().default("2mm"),
4350
+ p: z36.string().default("3.75mm")
4291
4351
  });
4292
4352
  var sod80 = (raw_params) => {
4293
4353
  const parameters = sod80_def.parse(raw_params);
4294
4354
  const silkscreenRefText = silkscreenRef(
4295
4355
  0,
4296
- length26.parse(parameters.h) / 2 + 1,
4356
+ length27.parse(parameters.h) / 2 + 1,
4297
4357
  0.3
4298
4358
  );
4299
4359
  const silkscreenLine = {
@@ -4302,20 +4362,20 @@ var sod80 = (raw_params) => {
4302
4362
  pcb_component_id: "",
4303
4363
  route: [
4304
4364
  {
4305
- x: length26.parse(parameters.p) / 2 + 0.5,
4306
- y: length26.parse(parameters.h) / 2 + 0.5
4365
+ x: length27.parse(parameters.p) / 2 + 0.5,
4366
+ y: length27.parse(parameters.h) / 2 + 0.5
4307
4367
  },
4308
4368
  {
4309
- x: -length26.parse(parameters.w) / 2 - 0.5,
4310
- y: length26.parse(parameters.h) / 2 + 0.5
4369
+ x: -length27.parse(parameters.w) / 2 - 0.5,
4370
+ y: length27.parse(parameters.h) / 2 + 0.5
4311
4371
  },
4312
4372
  {
4313
- x: -length26.parse(parameters.w) / 2 - 0.5,
4314
- y: -length26.parse(parameters.h) / 2 - 0.5
4373
+ x: -length27.parse(parameters.w) / 2 - 0.5,
4374
+ y: -length27.parse(parameters.h) / 2 - 0.5
4315
4375
  },
4316
4376
  {
4317
- x: length26.parse(parameters.p) / 2 + 0.5,
4318
- y: -length26.parse(parameters.h) / 2 - 0.5
4377
+ x: length27.parse(parameters.p) / 2 + 0.5,
4378
+ y: -length27.parse(parameters.h) / 2 - 0.5
4319
4379
  }
4320
4380
  ],
4321
4381
  stroke_width: 0.1,
@@ -4354,22 +4414,22 @@ var sod80WithoutParsing = (parameters) => {
4354
4414
  };
4355
4415
 
4356
4416
  // src/fn/sod123w.ts
4357
- import { z as z36 } from "zod";
4358
- import { length as length27 } from "circuit-json";
4417
+ import { z as z37 } from "zod";
4418
+ import { length as length28 } from "circuit-json";
4359
4419
  var sod_def3 = base_def.extend({
4360
- fn: z36.string(),
4361
- num_pins: z36.literal(2).default(2),
4362
- w: z36.string().default("4.4mm"),
4363
- h: z36.string().default("2.1mm"),
4364
- pl: z36.string().default("1.2mm"),
4365
- pw: z36.string().default("1.2mm"),
4366
- p: z36.string().default("2.9mm")
4420
+ fn: z37.string(),
4421
+ num_pins: z37.literal(2).default(2),
4422
+ w: z37.string().default("4.4mm"),
4423
+ h: z37.string().default("2.1mm"),
4424
+ pl: z37.string().default("1.2mm"),
4425
+ pw: z37.string().default("1.2mm"),
4426
+ p: z37.string().default("2.9mm")
4367
4427
  });
4368
4428
  var sod123w = (raw_params) => {
4369
4429
  const parameters = sod_def3.parse(raw_params);
4370
4430
  const silkscreenRefText = silkscreenRef(
4371
4431
  0,
4372
- length27.parse(parameters.h) - 0.5,
4432
+ length28.parse(parameters.h) - 0.5,
4373
4433
  0.3
4374
4434
  );
4375
4435
  const silkscreenLine = {
@@ -4378,20 +4438,20 @@ var sod123w = (raw_params) => {
4378
4438
  pcb_component_id: "",
4379
4439
  route: [
4380
4440
  {
4381
- x: length27.parse(parameters.p) / 2,
4382
- y: length27.parse(parameters.h) / 2
4441
+ x: length28.parse(parameters.p) / 2,
4442
+ y: length28.parse(parameters.h) / 2
4383
4443
  },
4384
4444
  {
4385
- x: -length27.parse(parameters.w) / 2 - 0.2,
4386
- y: length27.parse(parameters.h) / 2
4445
+ x: -length28.parse(parameters.w) / 2 - 0.2,
4446
+ y: length28.parse(parameters.h) / 2
4387
4447
  },
4388
4448
  {
4389
- x: -length27.parse(parameters.w) / 2 - 0.2,
4390
- y: -length27.parse(parameters.h) / 2
4449
+ x: -length28.parse(parameters.w) / 2 - 0.2,
4450
+ y: -length28.parse(parameters.h) / 2
4391
4451
  },
4392
4452
  {
4393
- x: length27.parse(parameters.p) / 2,
4394
- y: -length27.parse(parameters.h) / 2
4453
+ x: length28.parse(parameters.p) / 2,
4454
+ y: -length28.parse(parameters.h) / 2
4395
4455
  }
4396
4456
  ],
4397
4457
  stroke_width: 0.1,
@@ -4433,22 +4493,22 @@ var sodWithoutParsing3 = (parameters) => {
4433
4493
  };
4434
4494
 
4435
4495
  // src/fn/sod323.ts
4436
- import { z as z37 } from "zod";
4437
- import { length as length28 } from "circuit-json";
4496
+ import { z as z38 } from "zod";
4497
+ import { length as length29 } from "circuit-json";
4438
4498
  var sod_def4 = base_def.extend({
4439
- fn: z37.string(),
4440
- num_pins: z37.literal(2).default(2),
4441
- w: z37.string().default("3.30mm"),
4442
- h: z37.string().default("1.80mm"),
4443
- pl: z37.string().default("0.60mm"),
4444
- pw: z37.string().default("0.45mm"),
4445
- p: z37.string().default("2.1mm")
4499
+ fn: z38.string(),
4500
+ num_pins: z38.literal(2).default(2),
4501
+ w: z38.string().default("3.30mm"),
4502
+ h: z38.string().default("1.80mm"),
4503
+ pl: z38.string().default("0.60mm"),
4504
+ pw: z38.string().default("0.45mm"),
4505
+ p: z38.string().default("2.1mm")
4446
4506
  });
4447
4507
  var sod323 = (raw_params) => {
4448
4508
  const parameters = sod_def4.parse(raw_params);
4449
4509
  const silkscreenRefText = silkscreenRef(
4450
4510
  0,
4451
- length28.parse(parameters.h) - 0.5,
4511
+ length29.parse(parameters.h) - 0.5,
4452
4512
  0.3
4453
4513
  );
4454
4514
  const silkscreenLine = {
@@ -4457,20 +4517,20 @@ var sod323 = (raw_params) => {
4457
4517
  pcb_component_id: "",
4458
4518
  route: [
4459
4519
  {
4460
- x: length28.parse(parameters.p) / 2,
4461
- y: length28.parse(parameters.h) / 2
4520
+ x: length29.parse(parameters.p) / 2,
4521
+ y: length29.parse(parameters.h) / 2
4462
4522
  },
4463
4523
  {
4464
- x: -length28.parse(parameters.w) / 2,
4465
- y: length28.parse(parameters.h) / 2
4524
+ x: -length29.parse(parameters.w) / 2,
4525
+ y: length29.parse(parameters.h) / 2
4466
4526
  },
4467
4527
  {
4468
- x: -length28.parse(parameters.w) / 2,
4469
- y: -length28.parse(parameters.h) / 2
4528
+ x: -length29.parse(parameters.w) / 2,
4529
+ y: -length29.parse(parameters.h) / 2
4470
4530
  },
4471
4531
  {
4472
- x: length28.parse(parameters.p) / 2,
4473
- y: -length28.parse(parameters.h) / 2
4532
+ x: length29.parse(parameters.p) / 2,
4533
+ y: -length29.parse(parameters.h) / 2
4474
4534
  }
4475
4535
  ],
4476
4536
  stroke_width: 0.1,
@@ -4512,22 +4572,22 @@ var sodWithoutParsing4 = (parameters) => {
4512
4572
  };
4513
4573
 
4514
4574
  // src/fn/sod923.ts
4515
- import { z as z38 } from "zod";
4516
- import { length as length29 } from "circuit-json";
4575
+ import { z as z39 } from "zod";
4576
+ import { length as length30 } from "circuit-json";
4517
4577
  var sod_def5 = base_def.extend({
4518
- fn: z38.string(),
4519
- num_pins: z38.literal(2).default(2),
4520
- w: z38.string().default("1.4mm"),
4521
- h: z38.string().default("0.9mm"),
4522
- pl: z38.string().default("0.36mm"),
4523
- pw: z38.string().default("0.25mm"),
4524
- p: z38.string().default("0.85mm")
4578
+ fn: z39.string(),
4579
+ num_pins: z39.literal(2).default(2),
4580
+ w: z39.string().default("1.4mm"),
4581
+ h: z39.string().default("0.9mm"),
4582
+ pl: z39.string().default("0.36mm"),
4583
+ pw: z39.string().default("0.25mm"),
4584
+ p: z39.string().default("0.85mm")
4525
4585
  });
4526
4586
  var sod923 = (raw_params) => {
4527
4587
  const parameters = sod_def5.parse(raw_params);
4528
4588
  const silkscreenRefText = silkscreenRef(
4529
4589
  0,
4530
- length29.parse(parameters.h),
4590
+ length30.parse(parameters.h),
4531
4591
  0.3
4532
4592
  );
4533
4593
  const silkscreenLine = {
@@ -4536,20 +4596,20 @@ var sod923 = (raw_params) => {
4536
4596
  pcb_component_id: "",
4537
4597
  route: [
4538
4598
  {
4539
- x: length29.parse(parameters.p) / 2 + 0.15,
4540
- y: length29.parse(parameters.h) / 2
4599
+ x: length30.parse(parameters.p) / 2 + 0.15,
4600
+ y: length30.parse(parameters.h) / 2
4541
4601
  },
4542
4602
  {
4543
- x: -length29.parse(parameters.w) / 2 - 0.15,
4544
- y: length29.parse(parameters.h) / 2
4603
+ x: -length30.parse(parameters.w) / 2 - 0.15,
4604
+ y: length30.parse(parameters.h) / 2
4545
4605
  },
4546
4606
  {
4547
- x: -length29.parse(parameters.w) / 2 - 0.15,
4548
- y: -length29.parse(parameters.h) / 2
4607
+ x: -length30.parse(parameters.w) / 2 - 0.15,
4608
+ y: -length30.parse(parameters.h) / 2
4549
4609
  },
4550
4610
  {
4551
- x: length29.parse(parameters.p) / 2 + 0.15,
4552
- y: -length29.parse(parameters.h) / 2
4611
+ x: length30.parse(parameters.p) / 2 + 0.15,
4612
+ y: -length30.parse(parameters.h) / 2
4553
4613
  }
4554
4614
  ],
4555
4615
  stroke_width: 0.1,
@@ -4592,22 +4652,22 @@ var sodWithoutParsing5 = (parameters) => {
4592
4652
  };
4593
4653
 
4594
4654
  // src/fn/sod882.ts
4595
- import { z as z39 } from "zod";
4596
- import { length as length30 } from "circuit-json";
4655
+ import { z as z40 } from "zod";
4656
+ import { length as length31 } from "circuit-json";
4597
4657
  var sod_def6 = base_def.extend({
4598
- fn: z39.string(),
4599
- num_pins: z39.literal(2).default(2),
4600
- w: z39.string().default("1.3mm"),
4601
- h: z39.string().default("0.9mm"),
4602
- pl: z39.string().default("0.4mm"),
4603
- pw: z39.string().default("0.7mm"),
4604
- p: z39.string().default("0.7mm")
4658
+ fn: z40.string(),
4659
+ num_pins: z40.literal(2).default(2),
4660
+ w: z40.string().default("1.3mm"),
4661
+ h: z40.string().default("0.9mm"),
4662
+ pl: z40.string().default("0.4mm"),
4663
+ pw: z40.string().default("0.7mm"),
4664
+ p: z40.string().default("0.7mm")
4605
4665
  });
4606
4666
  var sod882 = (raw_params) => {
4607
4667
  const parameters = sod_def6.parse(raw_params);
4608
4668
  const silkscreenRefText = silkscreenRef(
4609
4669
  0,
4610
- length30.parse(parameters.h) + 0.1,
4670
+ length31.parse(parameters.h) + 0.1,
4611
4671
  0.3
4612
4672
  );
4613
4673
  const silkscreenLine = {
@@ -4616,20 +4676,20 @@ var sod882 = (raw_params) => {
4616
4676
  pcb_component_id: "",
4617
4677
  route: [
4618
4678
  {
4619
- x: length30.parse(parameters.p) / 2 + 0.2,
4620
- y: length30.parse(parameters.h) / 2 + 0.2
4679
+ x: length31.parse(parameters.p) / 2 + 0.2,
4680
+ y: length31.parse(parameters.h) / 2 + 0.2
4621
4681
  },
4622
4682
  {
4623
- x: -length30.parse(parameters.w) / 2 - 0.2,
4624
- y: length30.parse(parameters.h) / 2 + 0.2
4683
+ x: -length31.parse(parameters.w) / 2 - 0.2,
4684
+ y: length31.parse(parameters.h) / 2 + 0.2
4625
4685
  },
4626
4686
  {
4627
- x: -length30.parse(parameters.w) / 2 - 0.2,
4628
- y: -length30.parse(parameters.h) / 2 - 0.2
4687
+ x: -length31.parse(parameters.w) / 2 - 0.2,
4688
+ y: -length31.parse(parameters.h) / 2 - 0.2
4629
4689
  },
4630
4690
  {
4631
- x: length30.parse(parameters.p) / 2 + 0.2,
4632
- y: -length30.parse(parameters.h) / 2 - 0.2
4691
+ x: length31.parse(parameters.p) / 2 + 0.2,
4692
+ y: -length31.parse(parameters.h) / 2 - 0.2
4633
4693
  }
4634
4694
  ],
4635
4695
  stroke_width: 0.1,
@@ -4672,22 +4732,22 @@ var sodWithoutParsing6 = (parameters) => {
4672
4732
  };
4673
4733
 
4674
4734
  // src/fn/sod323f.ts
4675
- import { z as z40 } from "zod";
4676
- import { length as length31 } from "circuit-json";
4735
+ import { z as z41 } from "zod";
4736
+ import { length as length32 } from "circuit-json";
4677
4737
  var sod_def7 = base_def.extend({
4678
- fn: z40.string(),
4679
- num_pins: z40.literal(2).default(2),
4680
- w: z40.string().default("3,05mm"),
4681
- h: z40.string().default("1.65mm"),
4682
- pl: z40.string().default("0.6mm"),
4683
- pw: z40.string().default("0.6mm"),
4684
- pad_spacing: z40.string().default("2.2mm")
4738
+ fn: z41.string(),
4739
+ num_pins: z41.literal(2).default(2),
4740
+ w: z41.string().default("3,05mm"),
4741
+ h: z41.string().default("1.65mm"),
4742
+ pl: z41.string().default("0.6mm"),
4743
+ pw: z41.string().default("0.6mm"),
4744
+ pad_spacing: z41.string().default("2.2mm")
4685
4745
  });
4686
4746
  var sod323f = (raw_params) => {
4687
4747
  const parameters = sod_def7.parse(raw_params);
4688
4748
  const silkscreenRefText = silkscreenRef(
4689
4749
  0,
4690
- length31.parse(parameters.h),
4750
+ length32.parse(parameters.h),
4691
4751
  0.3
4692
4752
  );
4693
4753
  const silkscreenLine = {
@@ -4696,20 +4756,20 @@ var sod323f = (raw_params) => {
4696
4756
  pcb_component_id: "",
4697
4757
  route: [
4698
4758
  {
4699
- x: length31.parse(parameters.pad_spacing) / 2,
4700
- y: length31.parse(parameters.h) / 2
4759
+ x: length32.parse(parameters.pad_spacing) / 2,
4760
+ y: length32.parse(parameters.h) / 2
4701
4761
  },
4702
4762
  {
4703
- x: -length31.parse(parameters.w) / 2 - 0.2,
4704
- y: length31.parse(parameters.h) / 2
4763
+ x: -length32.parse(parameters.w) / 2 - 0.2,
4764
+ y: length32.parse(parameters.h) / 2
4705
4765
  },
4706
4766
  {
4707
- x: -length31.parse(parameters.w) / 2 - 0.2,
4708
- y: -length31.parse(parameters.h) / 2
4767
+ x: -length32.parse(parameters.w) / 2 - 0.2,
4768
+ y: -length32.parse(parameters.h) / 2
4709
4769
  },
4710
4770
  {
4711
- x: length31.parse(parameters.pad_spacing) / 2,
4712
- y: -length31.parse(parameters.h) / 2
4771
+ x: length32.parse(parameters.pad_spacing) / 2,
4772
+ y: -length32.parse(parameters.h) / 2
4713
4773
  }
4714
4774
  ],
4715
4775
  stroke_width: 0.1,
@@ -4752,22 +4812,22 @@ var sodWithoutParsing7 = (parameters) => {
4752
4812
  };
4753
4813
 
4754
4814
  // src/fn/sod123f.ts
4755
- import { z as z41 } from "zod";
4756
- import { length as length32 } from "circuit-json";
4815
+ import { z as z42 } from "zod";
4816
+ import { length as length33 } from "circuit-json";
4757
4817
  var sod_def8 = base_def.extend({
4758
- fn: z41.string(),
4759
- num_pins: z41.literal(2).default(2),
4760
- w: z41.string().default("4.4mm"),
4761
- h: z41.string().default("2.1mm"),
4762
- pl: z41.string().default("1.2mm"),
4763
- pw: z41.string().default("1.2mm"),
4764
- p: z41.string().default("2.9mm")
4765
- });
4766
- var sod123f = (raw_params) => {
4818
+ fn: z42.string(),
4819
+ num_pins: z42.literal(2).default(2),
4820
+ w: z42.string().default("4.4mm"),
4821
+ h: z42.string().default("2.1mm"),
4822
+ pl: z42.string().default("1.2mm"),
4823
+ pw: z42.string().default("1.2mm"),
4824
+ p: z42.string().default("2.9mm")
4825
+ });
4826
+ var sod123f = (raw_params) => {
4767
4827
  const parameters = sod_def8.parse(raw_params);
4768
4828
  const silkscreenRefText = silkscreenRef(
4769
4829
  0,
4770
- length32.parse(parameters.h),
4830
+ length33.parse(parameters.h),
4771
4831
  0.3
4772
4832
  );
4773
4833
  const silkscreenLine = {
@@ -4776,20 +4836,20 @@ var sod123f = (raw_params) => {
4776
4836
  pcb_component_id: "",
4777
4837
  route: [
4778
4838
  {
4779
- x: length32.parse(parameters.p) / 2,
4780
- y: length32.parse(parameters.h) / 2
4839
+ x: length33.parse(parameters.p) / 2,
4840
+ y: length33.parse(parameters.h) / 2
4781
4841
  },
4782
4842
  {
4783
- x: -length32.parse(parameters.w) / 2 - 0.2,
4784
- y: length32.parse(parameters.h) / 2
4843
+ x: -length33.parse(parameters.w) / 2 - 0.2,
4844
+ y: length33.parse(parameters.h) / 2
4785
4845
  },
4786
4846
  {
4787
- x: -length32.parse(parameters.w) / 2 - 0.2,
4788
- y: -length32.parse(parameters.h) / 2
4847
+ x: -length33.parse(parameters.w) / 2 - 0.2,
4848
+ y: -length33.parse(parameters.h) / 2
4789
4849
  },
4790
4850
  {
4791
- x: length32.parse(parameters.p) / 2,
4792
- y: -length32.parse(parameters.h) / 2
4851
+ x: length33.parse(parameters.p) / 2,
4852
+ y: -length33.parse(parameters.h) / 2
4793
4853
  }
4794
4854
  ],
4795
4855
  stroke_width: 0.1,
@@ -4832,22 +4892,22 @@ var sodWithoutParsing8 = (parameters) => {
4832
4892
  };
4833
4893
 
4834
4894
  // src/fn/sod123fl.ts
4835
- import { z as z42 } from "zod";
4836
- import { length as length33 } from "circuit-json";
4895
+ import { z as z43 } from "zod";
4896
+ import { length as length34 } from "circuit-json";
4837
4897
  var sod123FL_def = base_def.extend({
4838
- fn: z42.string(),
4839
- num_pins: z42.literal(2).default(2),
4840
- w: z42.string().default("4.4mm"),
4841
- h: z42.string().default("2.1mm"),
4842
- pl: z42.string().default("0.91mm"),
4843
- pw: z42.string().default("1.22mm"),
4844
- p: z42.string().default("3.146mm")
4898
+ fn: z43.string(),
4899
+ num_pins: z43.literal(2).default(2),
4900
+ w: z43.string().default("4.4mm"),
4901
+ h: z43.string().default("2.1mm"),
4902
+ pl: z43.string().default("0.91mm"),
4903
+ pw: z43.string().default("1.22mm"),
4904
+ p: z43.string().default("3.146mm")
4845
4905
  });
4846
4906
  var sod123fl = (raw_params) => {
4847
4907
  const parameters = sod123FL_def.parse(raw_params);
4848
4908
  const silkscreenRefText = silkscreenRef(
4849
4909
  0,
4850
- length33.parse(parameters.h),
4910
+ length34.parse(parameters.h),
4851
4911
  0.3
4852
4912
  );
4853
4913
  const silkscreenLine = {
@@ -4856,20 +4916,20 @@ var sod123fl = (raw_params) => {
4856
4916
  pcb_component_id: "",
4857
4917
  route: [
4858
4918
  {
4859
- x: length33.parse(parameters.p) / 2,
4860
- y: length33.parse(parameters.h) / 2
4919
+ x: length34.parse(parameters.p) / 2,
4920
+ y: length34.parse(parameters.h) / 2
4861
4921
  },
4862
4922
  {
4863
- x: -length33.parse(parameters.w) / 2 - 0.2,
4864
- y: length33.parse(parameters.h) / 2
4923
+ x: -length34.parse(parameters.w) / 2 - 0.2,
4924
+ y: length34.parse(parameters.h) / 2
4865
4925
  },
4866
4926
  {
4867
- x: -length33.parse(parameters.w) / 2 - 0.2,
4868
- y: -length33.parse(parameters.h) / 2
4927
+ x: -length34.parse(parameters.w) / 2 - 0.2,
4928
+ y: -length34.parse(parameters.h) / 2
4869
4929
  },
4870
4930
  {
4871
- x: length33.parse(parameters.p) / 2,
4872
- y: -length33.parse(parameters.h) / 2
4931
+ x: length34.parse(parameters.p) / 2,
4932
+ y: -length34.parse(parameters.h) / 2
4873
4933
  }
4874
4934
  ],
4875
4935
  stroke_width: 0.1,
@@ -4912,22 +4972,22 @@ var sodWithoutParsing9 = (parameters) => {
4912
4972
  };
4913
4973
 
4914
4974
  // src/fn/sod723.ts
4915
- import { z as z43 } from "zod";
4916
- import { length as length34 } from "circuit-json";
4975
+ import { z as z44 } from "zod";
4976
+ import { length as length35 } from "circuit-json";
4917
4977
  var sod_def9 = base_def.extend({
4918
- fn: z43.string(),
4919
- num_pins: z43.literal(2).default(2),
4920
- w: z43.string().default("1.80mm"),
4921
- h: z43.string().default("1.00mm"),
4922
- pl: z43.string().default("0.66mm"),
4923
- pw: z43.string().default("0.5mm"),
4924
- p: z43.string().default("0.8mm")
4978
+ fn: z44.string(),
4979
+ num_pins: z44.literal(2).default(2),
4980
+ w: z44.string().default("1.80mm"),
4981
+ h: z44.string().default("1.00mm"),
4982
+ pl: z44.string().default("0.66mm"),
4983
+ pw: z44.string().default("0.5mm"),
4984
+ p: z44.string().default("0.8mm")
4925
4985
  });
4926
4986
  var sod723 = (raw_params) => {
4927
4987
  const parameters = sod_def9.parse(raw_params);
4928
4988
  const silkscreenRefText = silkscreenRef(
4929
4989
  0,
4930
- length34.parse(parameters.h),
4990
+ length35.parse(parameters.h),
4931
4991
  0.3
4932
4992
  );
4933
4993
  const silkscreenLine = {
@@ -4936,20 +4996,20 @@ var sod723 = (raw_params) => {
4936
4996
  pcb_component_id: "",
4937
4997
  route: [
4938
4998
  {
4939
- x: length34.parse(parameters.p) / 2,
4940
- y: length34.parse(parameters.h) / 2
4999
+ x: length35.parse(parameters.p) / 2,
5000
+ y: length35.parse(parameters.h) / 2
4941
5001
  },
4942
5002
  {
4943
- x: -length34.parse(parameters.w) / 2 - 0.1,
4944
- y: length34.parse(parameters.h) / 2
5003
+ x: -length35.parse(parameters.w) / 2 - 0.1,
5004
+ y: length35.parse(parameters.h) / 2
4945
5005
  },
4946
5006
  {
4947
- x: -length34.parse(parameters.w) / 2 - 0.1,
4948
- y: -length34.parse(parameters.h) / 2
5007
+ x: -length35.parse(parameters.w) / 2 - 0.1,
5008
+ y: -length35.parse(parameters.h) / 2
4949
5009
  },
4950
5010
  {
4951
- x: length34.parse(parameters.p) / 2,
4952
- y: -length34.parse(parameters.h) / 2
5011
+ x: length35.parse(parameters.p) / 2,
5012
+ y: -length35.parse(parameters.h) / 2
4953
5013
  }
4954
5014
  ],
4955
5015
  stroke_width: 0.1,
@@ -4992,22 +5052,22 @@ var sodWithoutParsing10 = (parameters) => {
4992
5052
  };
4993
5053
 
4994
5054
  // src/fn/sod128.ts
4995
- import { z as z44 } from "zod";
4996
- import { length as length35 } from "circuit-json";
5055
+ import { z as z45 } from "zod";
5056
+ import { length as length36 } from "circuit-json";
4997
5057
  var sod_def10 = base_def.extend({
4998
- fn: z44.string(),
4999
- num_pins: z44.literal(2).default(2),
5000
- w: z44.string().default("6.2mm"),
5001
- h: z44.string().default("3.4mm"),
5002
- pl: z44.string().default("1.4mm"),
5003
- pw: z44.string().default("2.1mm"),
5004
- p: z44.string().default("4.4mm")
5058
+ fn: z45.string(),
5059
+ num_pins: z45.literal(2).default(2),
5060
+ w: z45.string().default("6.2mm"),
5061
+ h: z45.string().default("3.4mm"),
5062
+ pl: z45.string().default("1.4mm"),
5063
+ pw: z45.string().default("2.1mm"),
5064
+ p: z45.string().default("4.4mm")
5005
5065
  });
5006
5066
  var sod128 = (raw_params) => {
5007
5067
  const parameters = sod_def10.parse(raw_params);
5008
5068
  const silkscreenRefText = silkscreenRef(
5009
5069
  0,
5010
- length35.parse(parameters.h) / 2 + 0.4,
5070
+ length36.parse(parameters.h) / 2 + 0.4,
5011
5071
  0.3
5012
5072
  );
5013
5073
  const silkscreenLine = {
@@ -5016,20 +5076,20 @@ var sod128 = (raw_params) => {
5016
5076
  pcb_component_id: "",
5017
5077
  route: [
5018
5078
  {
5019
- x: length35.parse(parameters.p) / 2,
5020
- y: length35.parse(parameters.h) / 2
5079
+ x: length36.parse(parameters.p) / 2,
5080
+ y: length36.parse(parameters.h) / 2
5021
5081
  },
5022
5082
  {
5023
- x: -length35.parse(parameters.w) / 2 - 0.2,
5024
- y: length35.parse(parameters.h) / 2
5083
+ x: -length36.parse(parameters.w) / 2 - 0.2,
5084
+ y: length36.parse(parameters.h) / 2
5025
5085
  },
5026
5086
  {
5027
- x: -length35.parse(parameters.w) / 2 - 0.2,
5028
- y: -length35.parse(parameters.h) / 2
5087
+ x: -length36.parse(parameters.w) / 2 - 0.2,
5088
+ y: -length36.parse(parameters.h) / 2
5029
5089
  },
5030
5090
  {
5031
- x: length35.parse(parameters.p) / 2,
5032
- y: -length35.parse(parameters.h) / 2
5091
+ x: length36.parse(parameters.p) / 2,
5092
+ y: -length36.parse(parameters.h) / 2
5033
5093
  }
5034
5094
  ],
5035
5095
  stroke_width: 0.1,
@@ -5072,29 +5132,29 @@ var sodWithoutParsing11 = (parameters) => {
5072
5132
  };
5073
5133
 
5074
5134
  // src/fn/sot89.ts
5075
- import { z as z45 } from "zod";
5135
+ import { z as z46 } from "zod";
5076
5136
  var sot89_def = base_def.extend({
5077
- fn: z45.string(),
5078
- num_pins: z45.union([z45.literal(3), z45.literal(5)]).default(3),
5079
- w: z45.string().default("4.20mm"),
5080
- h: z45.string().default("4.80mm"),
5081
- pl: z45.string().default("1.3mm"),
5082
- pw: z45.string().default("0.9mm"),
5083
- p: z45.string().default("1.5mm"),
5084
- string: z45.string().optional()
5137
+ fn: z46.string(),
5138
+ num_pins: z46.union([z46.literal(3), z46.literal(5)]).default(3),
5139
+ w: z46.string().default("4.20mm"),
5140
+ h: z46.string().default("4.80mm"),
5141
+ pl: z46.string().default("1.3mm"),
5142
+ pw: z46.string().default("0.9mm"),
5143
+ p: z46.string().default("1.5mm"),
5144
+ string: z46.string().optional()
5085
5145
  });
5086
5146
  var sot89_3 = (parameters) => {
5087
5147
  const pads = [];
5088
5148
  const padGap = Number.parseFloat(parameters.p);
5089
5149
  const padWidth = Number.parseFloat(parameters.pw);
5090
- const length59 = Number.parseFloat(parameters.w);
5150
+ const length60 = Number.parseFloat(parameters.w);
5091
5151
  const padHeight = Number.parseFloat(parameters.pl);
5092
5152
  const centerExtra = 0.175;
5093
5153
  const outerPadXShift = (padHeight - (padHeight + centerExtra)) / 2;
5094
5154
  pads.push(
5095
- rectpad(1, -length59 / 2 + outerPadXShift, padGap, padHeight, padWidth),
5096
- rectpad(2, -length59 / 2, 0, padHeight + centerExtra, padWidth),
5097
- rectpad(3, -length59 / 2 + outerPadXShift, -padGap, padHeight, padWidth)
5155
+ rectpad(1, -length60 / 2 + outerPadXShift, padGap, padHeight, padWidth),
5156
+ rectpad(2, -length60 / 2, 0, padHeight + centerExtra, padWidth),
5157
+ rectpad(3, -length60 / 2 + outerPadXShift, -padGap, padHeight, padWidth)
5098
5158
  );
5099
5159
  const silkscreenRefText = silkscreenRef(0, 0, 0.3);
5100
5160
  const width = Number.parseFloat(parameters.w) / 2 - 1;
@@ -5134,7 +5194,7 @@ var sot89_5 = (parameters) => {
5134
5194
  const pads = [];
5135
5195
  const padGap = Number.parseFloat(parameters.p);
5136
5196
  const padWidth = Number.parseFloat(parameters.pw);
5137
- const length59 = Number.parseFloat(parameters.w);
5197
+ const length60 = Number.parseFloat(parameters.w);
5138
5198
  pads.push(
5139
5199
  rectpad(1, -1.85, -1.5, 1.5, 0.7),
5140
5200
  rectpad(2, -1.85, 1.5, 1.5, 0.7),
@@ -5202,18 +5262,18 @@ var sot89 = (raw_params) => {
5202
5262
 
5203
5263
  // src/fn/to220.ts
5204
5264
  import {
5205
- length as length36
5265
+ length as length37
5206
5266
  } from "circuit-json";
5207
- import { z as z46 } from "zod";
5267
+ import { z as z47 } from "zod";
5208
5268
  var to220_def = base_def.extend({
5209
- fn: z46.string(),
5210
- p: length36.optional().default("5.0mm"),
5211
- id: length36.optional().default("1.0mm"),
5212
- od: length36.optional().default("1.9mm"),
5213
- w: length36.optional().default("13mm"),
5214
- h: length36.optional().default("7mm"),
5215
- num_pins: z46.number().optional(),
5216
- string: z46.string().optional()
5269
+ fn: z47.string(),
5270
+ p: length37.optional().default("5.0mm"),
5271
+ id: length37.optional().default("1.0mm"),
5272
+ od: length37.optional().default("1.9mm"),
5273
+ w: length37.optional().default("13mm"),
5274
+ h: length37.optional().default("7mm"),
5275
+ num_pins: z47.number().optional(),
5276
+ string: z47.string().optional()
5217
5277
  });
5218
5278
  var to220 = (raw_params) => {
5219
5279
  const parameters = to220_def.parse(raw_params);
@@ -5293,22 +5353,22 @@ var to220 = (raw_params) => {
5293
5353
  };
5294
5354
 
5295
5355
  // src/fn/minimelf.ts
5296
- import { z as z47 } from "zod";
5297
- import { length as length37 } from "circuit-json";
5356
+ import { z as z48 } from "zod";
5357
+ import { length as length38 } from "circuit-json";
5298
5358
  var minimelf_def = base_def.extend({
5299
- fn: z47.string(),
5300
- num_pins: z47.literal(2).default(2),
5301
- w: z47.string().default("5.40mm"),
5302
- h: z47.string().default("2.30mm"),
5303
- pl: z47.string().default("1.30mm"),
5304
- pw: z47.string().default("1.70mm"),
5305
- p: z47.string().default("3.5mm")
5359
+ fn: z48.string(),
5360
+ num_pins: z48.literal(2).default(2),
5361
+ w: z48.string().default("5.40mm"),
5362
+ h: z48.string().default("2.30mm"),
5363
+ pl: z48.string().default("1.30mm"),
5364
+ pw: z48.string().default("1.70mm"),
5365
+ p: z48.string().default("3.5mm")
5306
5366
  });
5307
5367
  var minimelf = (raw_params) => {
5308
5368
  const parameters = minimelf_def.parse(raw_params);
5309
5369
  const silkscreenRefText = silkscreenRef(
5310
5370
  0,
5311
- length37.parse(parameters.h) / 2 + 0.4,
5371
+ length38.parse(parameters.h) / 2 + 0.4,
5312
5372
  0.3
5313
5373
  );
5314
5374
  const silkscreenLine = {
@@ -5317,20 +5377,20 @@ var minimelf = (raw_params) => {
5317
5377
  pcb_component_id: "",
5318
5378
  route: [
5319
5379
  {
5320
- x: length37.parse(parameters.p) / 2,
5321
- y: length37.parse(parameters.h) / 2
5380
+ x: length38.parse(parameters.p) / 2,
5381
+ y: length38.parse(parameters.h) / 2
5322
5382
  },
5323
5383
  {
5324
- x: -length37.parse(parameters.w) / 2,
5325
- y: length37.parse(parameters.h) / 2
5384
+ x: -length38.parse(parameters.w) / 2,
5385
+ y: length38.parse(parameters.h) / 2
5326
5386
  },
5327
5387
  {
5328
- x: -length37.parse(parameters.w) / 2,
5329
- y: -length37.parse(parameters.h) / 2
5388
+ x: -length38.parse(parameters.w) / 2,
5389
+ y: -length38.parse(parameters.h) / 2
5330
5390
  },
5331
5391
  {
5332
- x: length37.parse(parameters.p) / 2,
5333
- y: -length37.parse(parameters.h) / 2
5392
+ x: length38.parse(parameters.p) / 2,
5393
+ y: -length38.parse(parameters.h) / 2
5334
5394
  }
5335
5395
  ],
5336
5396
  stroke_width: 0.1,
@@ -5369,22 +5429,22 @@ var miniMelfWithoutParsing = (parameters) => {
5369
5429
  };
5370
5430
 
5371
5431
  // src/fn/sod882d.ts
5372
- import { z as z48 } from "zod";
5373
- import { length as length38 } from "circuit-json";
5432
+ import { z as z49 } from "zod";
5433
+ import { length as length39 } from "circuit-json";
5374
5434
  var sod_def11 = base_def.extend({
5375
- fn: z48.string(),
5376
- num_pins: z48.literal(2).default(2),
5377
- w: z48.string().default("1.90mm"),
5378
- h: z48.string().default("1.33mm"),
5379
- pl: z48.string().default("0.5mm"),
5380
- pw: z48.string().default("0.7mm"),
5381
- p: z48.string().default("0.8mm")
5435
+ fn: z49.string(),
5436
+ num_pins: z49.literal(2).default(2),
5437
+ w: z49.string().default("1.90mm"),
5438
+ h: z49.string().default("1.33mm"),
5439
+ pl: z49.string().default("0.5mm"),
5440
+ pw: z49.string().default("0.7mm"),
5441
+ p: z49.string().default("0.8mm")
5382
5442
  });
5383
5443
  var sod882d = (raw_params) => {
5384
5444
  const parameters = sod_def11.parse(raw_params);
5385
5445
  const silkscreenRefText = silkscreenRef(
5386
5446
  0,
5387
- length38.parse(parameters.h) + 0.1,
5447
+ length39.parse(parameters.h) + 0.1,
5388
5448
  0.3
5389
5449
  );
5390
5450
  const silkscreenLine = {
@@ -5393,20 +5453,20 @@ var sod882d = (raw_params) => {
5393
5453
  pcb_component_id: "",
5394
5454
  route: [
5395
5455
  {
5396
- x: length38.parse(parameters.p) / 2 + 0.1,
5397
- y: length38.parse(parameters.h) / 2
5456
+ x: length39.parse(parameters.p) / 2 + 0.1,
5457
+ y: length39.parse(parameters.h) / 2
5398
5458
  },
5399
5459
  {
5400
- x: -length38.parse(parameters.w) / 2,
5401
- y: length38.parse(parameters.h) / 2
5460
+ x: -length39.parse(parameters.w) / 2,
5461
+ y: length39.parse(parameters.h) / 2
5402
5462
  },
5403
5463
  {
5404
- x: -length38.parse(parameters.w) / 2,
5405
- y: -length38.parse(parameters.h) / 2
5464
+ x: -length39.parse(parameters.w) / 2,
5465
+ y: -length39.parse(parameters.h) / 2
5406
5466
  },
5407
5467
  {
5408
- x: length38.parse(parameters.p) / 2 + 0.1,
5409
- y: -length38.parse(parameters.h) / 2
5468
+ x: length39.parse(parameters.p) / 2 + 0.1,
5469
+ y: -length39.parse(parameters.h) / 2
5410
5470
  }
5411
5471
  ],
5412
5472
  stroke_width: 0.1,
@@ -5449,22 +5509,22 @@ var sodWithoutParsing12 = (parameters) => {
5449
5509
  };
5450
5510
 
5451
5511
  // src/fn/melf.ts
5452
- import { z as z49 } from "zod";
5453
- import { length as length39 } from "circuit-json";
5512
+ import { z as z50 } from "zod";
5513
+ import { length as length40 } from "circuit-json";
5454
5514
  var melf_def = base_def.extend({
5455
- fn: z49.string(),
5456
- num_pins: z49.literal(2).default(2),
5457
- w: z49.string().default("7.0mm"),
5458
- h: z49.string().default("3.35mm"),
5459
- pl: z49.string().default("1.50mm"),
5460
- pw: z49.string().default("2.70mm"),
5461
- p: z49.string().default("4.8mm")
5515
+ fn: z50.string(),
5516
+ num_pins: z50.literal(2).default(2),
5517
+ w: z50.string().default("7.0mm"),
5518
+ h: z50.string().default("3.35mm"),
5519
+ pl: z50.string().default("1.50mm"),
5520
+ pw: z50.string().default("2.70mm"),
5521
+ p: z50.string().default("4.8mm")
5462
5522
  });
5463
5523
  var melf = (raw_params) => {
5464
5524
  const parameters = melf_def.parse(raw_params);
5465
5525
  const silkscreenRefText = silkscreenRef(
5466
5526
  0,
5467
- length39.parse(parameters.h),
5527
+ length40.parse(parameters.h),
5468
5528
  0.3
5469
5529
  );
5470
5530
  const silkscreenLine = {
@@ -5473,20 +5533,20 @@ var melf = (raw_params) => {
5473
5533
  pcb_component_id: "",
5474
5534
  route: [
5475
5535
  {
5476
- x: length39.parse(parameters.p) / 2,
5477
- y: length39.parse(parameters.h) / 2
5536
+ x: length40.parse(parameters.p) / 2,
5537
+ y: length40.parse(parameters.h) / 2
5478
5538
  },
5479
5539
  {
5480
- x: -length39.parse(parameters.w) / 2,
5481
- y: length39.parse(parameters.h) / 2
5540
+ x: -length40.parse(parameters.w) / 2,
5541
+ y: length40.parse(parameters.h) / 2
5482
5542
  },
5483
5543
  {
5484
- x: -length39.parse(parameters.w) / 2,
5485
- y: -length39.parse(parameters.h) / 2
5544
+ x: -length40.parse(parameters.w) / 2,
5545
+ y: -length40.parse(parameters.h) / 2
5486
5546
  },
5487
5547
  {
5488
- x: length39.parse(parameters.p) / 2,
5489
- y: -length39.parse(parameters.h) / 2
5548
+ x: length40.parse(parameters.p) / 2,
5549
+ y: -length40.parse(parameters.h) / 2
5490
5550
  }
5491
5551
  ],
5492
5552
  stroke_width: 0.1,
@@ -5529,22 +5589,22 @@ var melfWithoutParsing = (parameters) => {
5529
5589
  };
5530
5590
 
5531
5591
  // src/fn/micromelf.ts
5532
- import { z as z50 } from "zod";
5533
- import { length as length40 } from "circuit-json";
5592
+ import { z as z51 } from "zod";
5593
+ import { length as length41 } from "circuit-json";
5534
5594
  var micromelf_def = base_def.extend({
5535
- fn: z50.string(),
5536
- num_pins: z50.literal(2).default(2),
5537
- w: z50.string().default("3.0mm"),
5538
- h: z50.string().default("1.80mm"),
5539
- pl: z50.string().default("0.80mm"),
5540
- pw: z50.string().default("1.20mm"),
5541
- p: z50.string().default("1.6mm")
5595
+ fn: z51.string(),
5596
+ num_pins: z51.literal(2).default(2),
5597
+ w: z51.string().default("3.0mm"),
5598
+ h: z51.string().default("1.80mm"),
5599
+ pl: z51.string().default("0.80mm"),
5600
+ pw: z51.string().default("1.20mm"),
5601
+ p: z51.string().default("1.6mm")
5542
5602
  });
5543
5603
  var micromelf = (raw_params) => {
5544
5604
  const parameters = micromelf_def.parse(raw_params);
5545
5605
  const silkscreenRefText = silkscreenRef(
5546
5606
  0,
5547
- length40.parse(parameters.h),
5607
+ length41.parse(parameters.h),
5548
5608
  0.3
5549
5609
  );
5550
5610
  const silkscreenLine = {
@@ -5553,20 +5613,20 @@ var micromelf = (raw_params) => {
5553
5613
  pcb_component_id: "",
5554
5614
  route: [
5555
5615
  {
5556
- x: length40.parse(parameters.p) / 2,
5557
- y: length40.parse(parameters.h) / 2
5616
+ x: length41.parse(parameters.p) / 2,
5617
+ y: length41.parse(parameters.h) / 2
5558
5618
  },
5559
5619
  {
5560
- x: -length40.parse(parameters.w) / 2 - 0.1,
5561
- y: length40.parse(parameters.h) / 2
5620
+ x: -length41.parse(parameters.w) / 2 - 0.1,
5621
+ y: length41.parse(parameters.h) / 2
5562
5622
  },
5563
5623
  {
5564
- x: -length40.parse(parameters.w) / 2 - 0.1,
5565
- y: -length40.parse(parameters.h) / 2
5624
+ x: -length41.parse(parameters.w) / 2 - 0.1,
5625
+ y: -length41.parse(parameters.h) / 2
5566
5626
  },
5567
5627
  {
5568
- x: length40.parse(parameters.p) / 2,
5569
- y: -length40.parse(parameters.h) / 2
5628
+ x: length41.parse(parameters.p) / 2,
5629
+ y: -length41.parse(parameters.h) / 2
5570
5630
  }
5571
5631
  ],
5572
5632
  stroke_width: 0.1,
@@ -5609,22 +5669,22 @@ var microMelfWithoutParsing = (parameters) => {
5609
5669
  };
5610
5670
 
5611
5671
  // src/fn/sma.ts
5612
- import { z as z51 } from "zod";
5613
- import { length as length41 } from "circuit-json";
5672
+ import { z as z52 } from "zod";
5673
+ import { length as length42 } from "circuit-json";
5614
5674
  var sma_def = base_def.extend({
5615
- fn: z51.string(),
5616
- num_pins: z51.literal(2).default(2),
5617
- w: z51.string().default("7.10mm"),
5618
- h: z51.string().default("3.40mm"),
5619
- pl: z51.string().default("2.45mm"),
5620
- pw: z51.string().default("1.80mm"),
5621
- p: z51.string().default("4.05mm")
5675
+ fn: z52.string(),
5676
+ num_pins: z52.literal(2).default(2),
5677
+ w: z52.string().default("7.10mm"),
5678
+ h: z52.string().default("3.40mm"),
5679
+ pl: z52.string().default("2.45mm"),
5680
+ pw: z52.string().default("1.80mm"),
5681
+ p: z52.string().default("4.05mm")
5622
5682
  });
5623
5683
  var sma = (raw_params) => {
5624
5684
  const parameters = sma_def.parse(raw_params);
5625
5685
  const silkscreenRefText = silkscreenRef(
5626
5686
  0,
5627
- length41.parse(parameters.h) / 2 + 0.5,
5687
+ length42.parse(parameters.h) / 2 + 0.5,
5628
5688
  0.3
5629
5689
  );
5630
5690
  const silkscreenLine = {
@@ -5633,20 +5693,20 @@ var sma = (raw_params) => {
5633
5693
  pcb_component_id: "",
5634
5694
  route: [
5635
5695
  {
5636
- x: length41.parse(parameters.p) / 2,
5637
- y: length41.parse(parameters.h) / 2
5696
+ x: length42.parse(parameters.p) / 2,
5697
+ y: length42.parse(parameters.h) / 2
5638
5698
  },
5639
5699
  {
5640
- x: -length41.parse(parameters.w) / 2 - 0.5,
5641
- y: length41.parse(parameters.h) / 2
5700
+ x: -length42.parse(parameters.w) / 2 - 0.5,
5701
+ y: length42.parse(parameters.h) / 2
5642
5702
  },
5643
5703
  {
5644
- x: -length41.parse(parameters.w) / 2 - 0.5,
5645
- y: -length41.parse(parameters.h) / 2
5704
+ x: -length42.parse(parameters.w) / 2 - 0.5,
5705
+ y: -length42.parse(parameters.h) / 2
5646
5706
  },
5647
5707
  {
5648
- x: length41.parse(parameters.p) / 2,
5649
- y: -length41.parse(parameters.h) / 2
5708
+ x: length42.parse(parameters.p) / 2,
5709
+ y: -length42.parse(parameters.h) / 2
5650
5710
  }
5651
5711
  ],
5652
5712
  stroke_width: 0.1,
@@ -5688,22 +5748,22 @@ var smaWithoutParsing = (parameters) => {
5688
5748
  };
5689
5749
 
5690
5750
  // src/fn/smf.ts
5691
- import { z as z52 } from "zod";
5692
- import { length as length42 } from "circuit-json";
5751
+ import { z as z53 } from "zod";
5752
+ import { length as length43 } from "circuit-json";
5693
5753
  var smf_def = base_def.extend({
5694
- fn: z52.string(),
5695
- num_pins: z52.literal(2).default(2),
5696
- w: z52.string().default("4.80mm"),
5697
- h: z52.string().default("2.10mm"),
5698
- pl: z52.string().default("1.30mm"),
5699
- pw: z52.string().default("1.40mm"),
5700
- p: z52.string().default("2.9mm")
5754
+ fn: z53.string(),
5755
+ num_pins: z53.literal(2).default(2),
5756
+ w: z53.string().default("4.80mm"),
5757
+ h: z53.string().default("2.10mm"),
5758
+ pl: z53.string().default("1.30mm"),
5759
+ pw: z53.string().default("1.40mm"),
5760
+ p: z53.string().default("2.9mm")
5701
5761
  });
5702
5762
  var smf = (raw_params) => {
5703
5763
  const parameters = smf_def.parse(raw_params);
5704
5764
  const silkscreenRefText = silkscreenRef(
5705
5765
  0,
5706
- length42.parse(parameters.h) - 0.5,
5766
+ length43.parse(parameters.h) - 0.5,
5707
5767
  0.3
5708
5768
  );
5709
5769
  const silkscreenLine = {
@@ -5712,20 +5772,20 @@ var smf = (raw_params) => {
5712
5772
  pcb_component_id: "",
5713
5773
  route: [
5714
5774
  {
5715
- x: length42.parse(parameters.p) / 2,
5716
- y: length42.parse(parameters.h) / 2
5775
+ x: length43.parse(parameters.p) / 2,
5776
+ y: length43.parse(parameters.h) / 2
5717
5777
  },
5718
5778
  {
5719
- x: -length42.parse(parameters.w) / 2,
5720
- y: length42.parse(parameters.h) / 2
5779
+ x: -length43.parse(parameters.w) / 2,
5780
+ y: length43.parse(parameters.h) / 2
5721
5781
  },
5722
5782
  {
5723
- x: -length42.parse(parameters.w) / 2,
5724
- y: -length42.parse(parameters.h) / 2
5783
+ x: -length43.parse(parameters.w) / 2,
5784
+ y: -length43.parse(parameters.h) / 2
5725
5785
  },
5726
5786
  {
5727
- x: length42.parse(parameters.p) / 2,
5728
- y: -length42.parse(parameters.h) / 2
5787
+ x: length43.parse(parameters.p) / 2,
5788
+ y: -length43.parse(parameters.h) / 2
5729
5789
  }
5730
5790
  ],
5731
5791
  stroke_width: 0.1,
@@ -5768,22 +5828,22 @@ var smfWithoutParsing = (parameters) => {
5768
5828
  };
5769
5829
 
5770
5830
  // src/fn/smb.ts
5771
- import { z as z53 } from "zod";
5772
- import { length as length43 } from "circuit-json";
5831
+ import { z as z54 } from "zod";
5832
+ import { length as length44 } from "circuit-json";
5773
5833
  var smb_def = base_def.extend({
5774
- fn: z53.string(),
5775
- num_pins: z53.literal(2).default(2),
5776
- w: z53.string().default("7.30mm"),
5777
- h: z53.string().default("4.40mm"),
5778
- pl: z53.string().default("2.50mm"),
5779
- pw: z53.string().default("2.30mm"),
5780
- p: z53.string().default("4.30mm")
5834
+ fn: z54.string(),
5835
+ num_pins: z54.literal(2).default(2),
5836
+ w: z54.string().default("7.30mm"),
5837
+ h: z54.string().default("4.40mm"),
5838
+ pl: z54.string().default("2.50mm"),
5839
+ pw: z54.string().default("2.30mm"),
5840
+ p: z54.string().default("4.30mm")
5781
5841
  });
5782
5842
  var smb = (raw_params) => {
5783
5843
  const parameters = smb_def.parse(raw_params);
5784
5844
  const silkscreenRefText = silkscreenRef(
5785
5845
  0,
5786
- length43.parse(parameters.h) / 2 + 0.5,
5846
+ length44.parse(parameters.h) / 2 + 0.5,
5787
5847
  0.3
5788
5848
  );
5789
5849
  const silkscreenLine = {
@@ -5792,20 +5852,20 @@ var smb = (raw_params) => {
5792
5852
  pcb_component_id: "",
5793
5853
  route: [
5794
5854
  {
5795
- x: length43.parse(parameters.p) / 2,
5796
- y: length43.parse(parameters.h) / 2
5855
+ x: length44.parse(parameters.p) / 2,
5856
+ y: length44.parse(parameters.h) / 2
5797
5857
  },
5798
5858
  {
5799
- x: -length43.parse(parameters.w) / 2 - 0.1,
5800
- y: length43.parse(parameters.h) / 2
5859
+ x: -length44.parse(parameters.w) / 2 - 0.1,
5860
+ y: length44.parse(parameters.h) / 2
5801
5861
  },
5802
5862
  {
5803
- x: -length43.parse(parameters.w) / 2 - 0.1,
5804
- y: -length43.parse(parameters.h) / 2
5863
+ x: -length44.parse(parameters.w) / 2 - 0.1,
5864
+ y: -length44.parse(parameters.h) / 2
5805
5865
  },
5806
5866
  {
5807
- x: length43.parse(parameters.p) / 2,
5808
- y: -length43.parse(parameters.h) / 2
5867
+ x: length44.parse(parameters.p) / 2,
5868
+ y: -length44.parse(parameters.h) / 2
5809
5869
  }
5810
5870
  ],
5811
5871
  stroke_width: 0.1,
@@ -5848,16 +5908,16 @@ var smbWithoutParsing = (parameters) => {
5848
5908
  };
5849
5909
 
5850
5910
  // src/fn/smc.ts
5851
- import { z as z54 } from "zod";
5852
- import { length as length44 } from "circuit-json";
5911
+ import { z as z55 } from "zod";
5912
+ import { length as length45 } from "circuit-json";
5853
5913
  var smc_def = base_def.extend({
5854
- fn: z54.string(),
5855
- num_pins: z54.literal(2).default(2),
5856
- w: z54.string().default("10.70mm"),
5857
- h: z54.string().default("6.60mm"),
5858
- pl: z54.string().default("3.30mm"),
5859
- pw: z54.string().default("2.50mm"),
5860
- p: z54.string().default("6.80mm")
5914
+ fn: z55.string(),
5915
+ num_pins: z55.literal(2).default(2),
5916
+ w: z55.string().default("10.70mm"),
5917
+ h: z55.string().default("6.60mm"),
5918
+ pl: z55.string().default("3.30mm"),
5919
+ pw: z55.string().default("2.50mm"),
5920
+ p: z55.string().default("6.80mm")
5861
5921
  });
5862
5922
  var smc = (raw_params) => {
5863
5923
  const parameters = smc_def.parse(raw_params);
@@ -5868,20 +5928,20 @@ var smc = (raw_params) => {
5868
5928
  pcb_component_id: "",
5869
5929
  route: [
5870
5930
  {
5871
- x: length44.parse(parameters.p) / 2,
5872
- y: length44.parse(parameters.h) / 2 - 0.8
5931
+ x: length45.parse(parameters.p) / 2,
5932
+ y: length45.parse(parameters.h) / 2 - 0.8
5873
5933
  },
5874
5934
  {
5875
- x: -length44.parse(parameters.w) / 2 - 0.8,
5876
- y: length44.parse(parameters.h) / 2 - 0.8
5935
+ x: -length45.parse(parameters.w) / 2 - 0.8,
5936
+ y: length45.parse(parameters.h) / 2 - 0.8
5877
5937
  },
5878
5938
  {
5879
- x: -length44.parse(parameters.w) / 2 - 0.8,
5880
- y: -length44.parse(parameters.h) / 2 + 0.8
5939
+ x: -length45.parse(parameters.w) / 2 - 0.8,
5940
+ y: -length45.parse(parameters.h) / 2 + 0.8
5881
5941
  },
5882
5942
  {
5883
- x: length44.parse(parameters.p) / 2,
5884
- y: -length44.parse(parameters.h) / 2 + 0.8
5943
+ x: length45.parse(parameters.p) / 2,
5944
+ y: -length45.parse(parameters.h) / 2 + 0.8
5885
5945
  }
5886
5946
  ],
5887
5947
  stroke_width: 0.1,
@@ -5923,16 +5983,16 @@ var smcWithoutParsing = (parameters) => {
5923
5983
  };
5924
5984
 
5925
5985
  // src/fn/sot223.ts
5926
- import { z as z55 } from "zod";
5986
+ import { z as z56 } from "zod";
5927
5987
  var sot223_def = base_def.extend({
5928
- fn: z55.string(),
5929
- num_pins: z55.number().default(4),
5930
- w: z55.string().default("8.50mm"),
5931
- h: z55.string().default("6.90mm"),
5932
- pl: z55.string().default("2mm"),
5933
- pw: z55.string().default("1.5mm"),
5934
- p: z55.string().default("2.30mm"),
5935
- string: z55.string().optional()
5988
+ fn: z56.string(),
5989
+ num_pins: z56.number().default(4),
5990
+ w: z56.string().default("8.50mm"),
5991
+ h: z56.string().default("6.90mm"),
5992
+ pl: z56.string().default("2mm"),
5993
+ pw: z56.string().default("1.5mm"),
5994
+ p: z56.string().default("2.30mm"),
5995
+ string: z56.string().optional()
5936
5996
  });
5937
5997
  var sot223 = (raw_params) => {
5938
5998
  const match = raw_params.string?.match(/^sot223_(\d+)/);
@@ -6178,16 +6238,16 @@ var sot223_6 = (parameters) => {
6178
6238
  };
6179
6239
 
6180
6240
  // src/fn/sot23w.ts
6181
- import { z as z56 } from "zod";
6241
+ import { z as z57 } from "zod";
6182
6242
  var sot23w_def = base_def.extend({
6183
- fn: z56.string(),
6184
- num_pins: z56.number().default(3),
6185
- w: z56.string().default("3.40mm"),
6186
- h: z56.string().default("3.30mm"),
6187
- pl: z56.string().default("1mm"),
6188
- pw: z56.string().default("0.7mm"),
6189
- p: z56.string().default("1.2mm"),
6190
- string: z56.string().optional()
6243
+ fn: z57.string(),
6244
+ num_pins: z57.number().default(3),
6245
+ w: z57.string().default("3.40mm"),
6246
+ h: z57.string().default("3.30mm"),
6247
+ pl: z57.string().default("1mm"),
6248
+ pw: z57.string().default("0.7mm"),
6249
+ p: z57.string().default("1.2mm"),
6250
+ string: z57.string().optional()
6191
6251
  });
6192
6252
  var sot23w = (raw_params) => {
6193
6253
  const match = raw_params.string?.match(/^sot23w_(\d+)/);
@@ -6275,16 +6335,16 @@ var sot23w_3 = (parameters) => {
6275
6335
  };
6276
6336
 
6277
6337
  // src/fn/to92s.ts
6278
- import { z as z57 } from "zod";
6338
+ import { z as z58 } from "zod";
6279
6339
  var to92s_def = base_def.extend({
6280
- fn: z57.string(),
6281
- num_pins: z57.union([z57.literal(3), z57.literal(2)]).default(3),
6282
- p: z57.string().default("1.27mm"),
6283
- id: z57.string().default("0.72mm"),
6284
- od: z57.string().default("0.95mm"),
6285
- w: z57.string().default("2.5mm"),
6286
- h: z57.string().default("4.2mm"),
6287
- string: z57.string().optional()
6340
+ fn: z58.string(),
6341
+ num_pins: z58.union([z58.literal(3), z58.literal(2)]).default(3),
6342
+ p: z58.string().default("1.27mm"),
6343
+ id: z58.string().default("0.72mm"),
6344
+ od: z58.string().default("0.95mm"),
6345
+ w: z58.string().default("2.5mm"),
6346
+ h: z58.string().default("4.2mm"),
6347
+ string: z58.string().optional()
6288
6348
  });
6289
6349
  var to92s_3 = (parameters) => {
6290
6350
  const { p, id, od, w, h } = parameters;
@@ -6351,18 +6411,18 @@ var to92s = (raw_params) => {
6351
6411
 
6352
6412
  // src/fn/jst.ts
6353
6413
  import {
6354
- length as length45
6414
+ length as length46
6355
6415
  } from "circuit-json";
6356
- import { z as z58 } from "zod";
6416
+ import { z as z59 } from "zod";
6357
6417
  var jst_def = base_def.extend({
6358
- fn: z58.string(),
6359
- p: length45.optional(),
6360
- id: length45.optional(),
6361
- pw: length45.optional(),
6362
- pl: length45.optional(),
6363
- w: length45.optional(),
6364
- h: length45.optional(),
6365
- sh: z58.union([z58.boolean(), z58.string(), z58.number()]).optional().transform((v) => {
6418
+ fn: z59.string(),
6419
+ p: length46.optional(),
6420
+ id: length46.optional(),
6421
+ pw: length46.optional(),
6422
+ pl: length46.optional(),
6423
+ w: length46.optional(),
6424
+ h: length46.optional(),
6425
+ sh: z59.union([z59.boolean(), z59.string(), z59.number()]).optional().transform((v) => {
6366
6426
  if (typeof v === "string") {
6367
6427
  const n = Number(v);
6368
6428
  return Number.isNaN(n) ? true : n;
@@ -6371,26 +6431,26 @@ var jst_def = base_def.extend({
6371
6431
  }).describe(
6372
6432
  'JST SH (Surface-mount) connector family. SH stands for "Super High-density".'
6373
6433
  ),
6374
- ph: z58.boolean().optional().describe(
6434
+ ph: z59.boolean().optional().describe(
6375
6435
  'JST PH (Through-hole) connector family. PH stands for "Pin Header".'
6376
6436
  ),
6377
- string: z58.string().optional()
6437
+ string: z59.string().optional()
6378
6438
  });
6379
6439
  var variantDefaults = {
6380
6440
  ph: {
6381
- p: length45.parse("2.2mm"),
6382
- id: length45.parse("0.70mm"),
6383
- pw: length45.parse("1.20mm"),
6384
- pl: length45.parse("1.20mm"),
6385
- w: length45.parse("6mm"),
6386
- h: length45.parse("5mm")
6441
+ p: length46.parse("2.2mm"),
6442
+ id: length46.parse("0.70mm"),
6443
+ pw: length46.parse("1.20mm"),
6444
+ pl: length46.parse("1.20mm"),
6445
+ w: length46.parse("6mm"),
6446
+ h: length46.parse("5mm")
6387
6447
  },
6388
6448
  sh: {
6389
- p: length45.parse("1mm"),
6390
- pw: length45.parse("0.6mm"),
6391
- pl: length45.parse("1.55mm"),
6392
- w: length45.parse("5.8mm"),
6393
- h: length45.parse("7.8mm")
6449
+ p: length46.parse("1mm"),
6450
+ pw: length46.parse("0.6mm"),
6451
+ pl: length46.parse("1.55mm"),
6452
+ w: length46.parse("5.8mm"),
6453
+ h: length46.parse("7.8mm")
6394
6454
  }
6395
6455
  };
6396
6456
  function getVariant(params) {
@@ -6507,22 +6567,22 @@ var jst = (raw_params) => {
6507
6567
  };
6508
6568
 
6509
6569
  // src/fn/sod110.ts
6510
- import { z as z59 } from "zod";
6511
- import { length as length46 } from "circuit-json";
6570
+ import { z as z60 } from "zod";
6571
+ import { length as length47 } from "circuit-json";
6512
6572
  var sod_def12 = base_def.extend({
6513
- fn: z59.string(),
6514
- num_pins: z59.literal(2).default(2),
6515
- w: z59.string().default("3.30mm"),
6516
- h: z59.string().default("1.70mm"),
6517
- pl: z59.string().default("0.80mm"),
6518
- pw: z59.string().default("1mm"),
6519
- p: z59.string().default("1.90mm")
6573
+ fn: z60.string(),
6574
+ num_pins: z60.literal(2).default(2),
6575
+ w: z60.string().default("3.30mm"),
6576
+ h: z60.string().default("1.70mm"),
6577
+ pl: z60.string().default("0.80mm"),
6578
+ pw: z60.string().default("1mm"),
6579
+ p: z60.string().default("1.90mm")
6520
6580
  });
6521
6581
  var sod110 = (raw_params) => {
6522
6582
  const parameters = sod_def12.parse(raw_params);
6523
6583
  const silkscreenRefText = silkscreenRef(
6524
6584
  0,
6525
- length46.parse(parameters.h) / 2 + 0.5,
6585
+ length47.parse(parameters.h) / 2 + 0.5,
6526
6586
  0.3
6527
6587
  );
6528
6588
  const silkscreenLine = {
@@ -6531,20 +6591,20 @@ var sod110 = (raw_params) => {
6531
6591
  pcb_component_id: "",
6532
6592
  route: [
6533
6593
  {
6534
- x: length46.parse(parameters.p) / 2,
6535
- y: length46.parse(parameters.h) / 2
6594
+ x: length47.parse(parameters.p) / 2,
6595
+ y: length47.parse(parameters.h) / 2
6536
6596
  },
6537
6597
  {
6538
- x: -length46.parse(parameters.w) / 2,
6539
- y: length46.parse(parameters.h) / 2
6598
+ x: -length47.parse(parameters.w) / 2,
6599
+ y: length47.parse(parameters.h) / 2
6540
6600
  },
6541
6601
  {
6542
- x: -length46.parse(parameters.w) / 2,
6543
- y: -length46.parse(parameters.h) / 2
6602
+ x: -length47.parse(parameters.w) / 2,
6603
+ y: -length47.parse(parameters.h) / 2
6544
6604
  },
6545
6605
  {
6546
- x: length46.parse(parameters.p) / 2,
6547
- y: -length46.parse(parameters.h) / 2
6606
+ x: length47.parse(parameters.p) / 2,
6607
+ y: -length47.parse(parameters.h) / 2
6548
6608
  }
6549
6609
  ],
6550
6610
  stroke_width: 0.1,
@@ -6586,8 +6646,8 @@ var sodWithoutParsing13 = (parameters) => {
6586
6646
  };
6587
6647
 
6588
6648
  // src/fn/vssop.ts
6589
- import { z as z60 } from "zod";
6590
- import { length as length47 } from "circuit-json";
6649
+ import { z as z61 } from "zod";
6650
+ import { length as length48 } from "circuit-json";
6591
6651
  var getDefaultValues = (num_pins) => {
6592
6652
  switch (num_pins) {
6593
6653
  case 8:
@@ -6617,23 +6677,23 @@ var getDefaultValues = (num_pins) => {
6617
6677
  }
6618
6678
  };
6619
6679
  var vssop_def = base_def.extend({
6620
- fn: z60.string(),
6621
- num_pins: z60.union([z60.literal(8), z60.literal(10)]).default(8),
6622
- w: z60.string().optional(),
6623
- h: z60.string().optional(),
6624
- p: z60.string().optional(),
6625
- pl: z60.string().optional(),
6626
- pw: z60.string().optional(),
6627
- string: z60.string().optional()
6680
+ fn: z61.string(),
6681
+ num_pins: z61.union([z61.literal(8), z61.literal(10)]).default(8),
6682
+ w: z61.string().optional(),
6683
+ h: z61.string().optional(),
6684
+ p: z61.string().optional(),
6685
+ pl: z61.string().optional(),
6686
+ pw: z61.string().optional(),
6687
+ string: z61.string().optional()
6628
6688
  });
6629
6689
  var vssop = (raw_params) => {
6630
6690
  const parameters = vssop_def.parse(raw_params);
6631
6691
  const defaults = getDefaultValues(parameters.num_pins);
6632
- const w = length47.parse(parameters.w || defaults.w);
6633
- const h = length47.parse(parameters.h || defaults.h);
6634
- const p = length47.parse(parameters.p || defaults.p);
6635
- const pl = length47.parse(parameters.pl || defaults.pl);
6636
- const pw = length47.parse(parameters.pw || defaults.pw);
6692
+ const w = length48.parse(parameters.w || defaults.w);
6693
+ const h = length48.parse(parameters.h || defaults.h);
6694
+ const p = length48.parse(parameters.p || defaults.p);
6695
+ const pl = length48.parse(parameters.pl || defaults.pl);
6696
+ const pw = length48.parse(parameters.pw || defaults.pw);
6637
6697
  const pads = [];
6638
6698
  const half = parameters.num_pins / 2;
6639
6699
  for (let i = 0; i < parameters.num_pins; i++) {
@@ -6710,14 +6770,14 @@ var getVssopPadCoord = (pinCount, pn, w, p) => {
6710
6770
  const col = pn <= half ? -1 : 1;
6711
6771
  const row = (half - 1) / 2 - rowIndex;
6712
6772
  return {
6713
- x: col * length47.parse(pinCount === 8 ? "1.8mm" : "2.2mm"),
6773
+ x: col * length48.parse(pinCount === 8 ? "1.8mm" : "2.2mm"),
6714
6774
  y: row * p
6715
6775
  };
6716
6776
  };
6717
6777
 
6718
6778
  // src/fn/msop.ts
6719
- import { z as z61 } from "zod";
6720
- import { length as length48 } from "circuit-json";
6779
+ import { z as z62 } from "zod";
6780
+ import { length as length49 } from "circuit-json";
6721
6781
  var getDefaultValues2 = (num_pins) => {
6722
6782
  switch (num_pins) {
6723
6783
  case 10:
@@ -6755,14 +6815,14 @@ var getDefaultValues2 = (num_pins) => {
6755
6815
  }
6756
6816
  };
6757
6817
  var msop_def = base_def.extend({
6758
- fn: z61.string(),
6759
- num_pins: z61.union([z61.literal(8), z61.literal(10), z61.literal(12), z61.literal(16)]).default(8),
6760
- w: z61.string().optional(),
6761
- h: z61.string().optional(),
6762
- p: z61.string().optional(),
6763
- pl: z61.string().optional(),
6764
- pw: z61.string().optional(),
6765
- string: z61.string().optional()
6818
+ fn: z62.string(),
6819
+ num_pins: z62.union([z62.literal(8), z62.literal(10), z62.literal(12), z62.literal(16)]).default(8),
6820
+ w: z62.string().optional(),
6821
+ h: z62.string().optional(),
6822
+ p: z62.string().optional(),
6823
+ pl: z62.string().optional(),
6824
+ pw: z62.string().optional(),
6825
+ string: z62.string().optional()
6766
6826
  });
6767
6827
  var getMsopCoords = (pinCount, pn, w, p) => {
6768
6828
  const half = pinCount / 2;
@@ -6770,18 +6830,18 @@ var getMsopCoords = (pinCount, pn, w, p) => {
6770
6830
  const col = pn <= half ? -1 : 1;
6771
6831
  const row = (half - 1) / 2 - rowIndex;
6772
6832
  return {
6773
- x: col * length48.parse("2mm"),
6833
+ x: col * length49.parse("2mm"),
6774
6834
  y: row * p
6775
6835
  };
6776
6836
  };
6777
6837
  var msop = (raw_params) => {
6778
6838
  const parameters = msop_def.parse(raw_params);
6779
6839
  const defaults = getDefaultValues2(parameters.num_pins);
6780
- const w = length48.parse(parameters.w || defaults.w);
6781
- const h = length48.parse(parameters.h || defaults.h);
6782
- const p = length48.parse(parameters.p || defaults.p);
6783
- const pl = length48.parse(parameters.pl || defaults.pl);
6784
- const pw = length48.parse(parameters.pw || defaults.pw);
6840
+ const w = length49.parse(parameters.w || defaults.w);
6841
+ const h = length49.parse(parameters.h || defaults.h);
6842
+ const p = length49.parse(parameters.p || defaults.p);
6843
+ const pl = length49.parse(parameters.pl || defaults.pl);
6844
+ const pw = length49.parse(parameters.pw || defaults.pw);
6785
6845
  const pads = [];
6786
6846
  for (let i = 0; i < parameters.num_pins; i++) {
6787
6847
  const { x, y } = getMsopCoords(parameters.num_pins, i + 1, w, p);
@@ -6852,22 +6912,22 @@ var msop = (raw_params) => {
6852
6912
  };
6853
6913
 
6854
6914
  // src/fn/sod323w.ts
6855
- import { z as z62 } from "zod";
6856
- import { length as length49 } from "circuit-json";
6915
+ import { z as z63 } from "zod";
6916
+ import { length as length50 } from "circuit-json";
6857
6917
  var sod323w_def = base_def.extend({
6858
- fn: z62.string(),
6859
- num_pins: z62.literal(2).default(2),
6860
- w: z62.string().default("3.8mm"),
6861
- h: z62.string().default("1.65mm"),
6862
- pl: z62.string().default("1.2mm"),
6863
- pw: z62.string().default("1.2mm"),
6864
- pad_spacing: z62.string().default("2.6mm")
6918
+ fn: z63.string(),
6919
+ num_pins: z63.literal(2).default(2),
6920
+ w: z63.string().default("3.8mm"),
6921
+ h: z63.string().default("1.65mm"),
6922
+ pl: z63.string().default("1.2mm"),
6923
+ pw: z63.string().default("1.2mm"),
6924
+ pad_spacing: z63.string().default("2.6mm")
6865
6925
  });
6866
6926
  var sod323w = (raw_params) => {
6867
6927
  const parameters = sod323w_def.parse(raw_params);
6868
6928
  const silkscreenRefText = silkscreenRef(
6869
6929
  0,
6870
- length49.parse(parameters.h),
6930
+ length50.parse(parameters.h),
6871
6931
  0.3
6872
6932
  );
6873
6933
  const silkscreenLine = {
@@ -6876,20 +6936,20 @@ var sod323w = (raw_params) => {
6876
6936
  pcb_component_id: "",
6877
6937
  route: [
6878
6938
  {
6879
- x: length49.parse(parameters.pad_spacing) / 2,
6880
- y: length49.parse(parameters.h) / 2
6939
+ x: length50.parse(parameters.pad_spacing) / 2,
6940
+ y: length50.parse(parameters.h) / 2
6881
6941
  },
6882
6942
  {
6883
- x: -length49.parse(parameters.w) / 2 - 0.2,
6884
- y: length49.parse(parameters.h) / 2
6943
+ x: -length50.parse(parameters.w) / 2 - 0.2,
6944
+ y: length50.parse(parameters.h) / 2
6885
6945
  },
6886
6946
  {
6887
- x: -length49.parse(parameters.w) / 2 - 0.2,
6888
- y: -length49.parse(parameters.h) / 2
6947
+ x: -length50.parse(parameters.w) / 2 - 0.2,
6948
+ y: -length50.parse(parameters.h) / 2
6889
6949
  },
6890
6950
  {
6891
- x: length49.parse(parameters.pad_spacing) / 2,
6892
- y: -length49.parse(parameters.h) / 2
6951
+ x: length50.parse(parameters.pad_spacing) / 2,
6952
+ y: -length50.parse(parameters.h) / 2
6893
6953
  }
6894
6954
  ],
6895
6955
  stroke_width: 0.1,
@@ -6932,22 +6992,22 @@ var sodWithoutParsing14 = (parameters) => {
6932
6992
  };
6933
6993
 
6934
6994
  // src/fn/sod323fl.ts
6935
- import { z as z63 } from "zod";
6936
- import { length as length50 } from "circuit-json";
6995
+ import { z as z64 } from "zod";
6996
+ import { length as length51 } from "circuit-json";
6937
6997
  var sod323FL_def = base_def.extend({
6938
- fn: z63.string(),
6939
- num_pins: z63.literal(2).default(2),
6940
- w: z63.string().default("3.20mm"),
6941
- h: z63.string().default("1.65mm"),
6942
- pl: z63.string().default("0.8mm"),
6943
- pw: z63.string().default("0.9mm"),
6944
- pad_spacing: z63.string().default("2.1mm")
6998
+ fn: z64.string(),
6999
+ num_pins: z64.literal(2).default(2),
7000
+ w: z64.string().default("3.20mm"),
7001
+ h: z64.string().default("1.65mm"),
7002
+ pl: z64.string().default("0.8mm"),
7003
+ pw: z64.string().default("0.9mm"),
7004
+ pad_spacing: z64.string().default("2.1mm")
6945
7005
  });
6946
7006
  var sod323fl = (raw_params) => {
6947
7007
  const parameters = sod323FL_def.parse(raw_params);
6948
7008
  const silkscreenRefText = silkscreenRef(
6949
7009
  0,
6950
- length50.parse(parameters.h),
7010
+ length51.parse(parameters.h),
6951
7011
  0.3
6952
7012
  );
6953
7013
  const silkscreenLine = {
@@ -6956,20 +7016,20 @@ var sod323fl = (raw_params) => {
6956
7016
  pcb_component_id: "",
6957
7017
  route: [
6958
7018
  {
6959
- x: length50.parse(parameters.pad_spacing) / 2,
6960
- y: length50.parse(parameters.h) / 2
7019
+ x: length51.parse(parameters.pad_spacing) / 2,
7020
+ y: length51.parse(parameters.h) / 2
6961
7021
  },
6962
7022
  {
6963
- x: -length50.parse(parameters.w) / 2 - 0.2,
6964
- y: length50.parse(parameters.h) / 2
7023
+ x: -length51.parse(parameters.w) / 2 - 0.2,
7024
+ y: length51.parse(parameters.h) / 2
6965
7025
  },
6966
7026
  {
6967
- x: -length50.parse(parameters.w) / 2 - 0.2,
6968
- y: -length50.parse(parameters.h) / 2
7027
+ x: -length51.parse(parameters.w) / 2 - 0.2,
7028
+ y: -length51.parse(parameters.h) / 2
6969
7029
  },
6970
7030
  {
6971
- x: length50.parse(parameters.pad_spacing) / 2,
6972
- y: -length50.parse(parameters.h) / 2
7031
+ x: length51.parse(parameters.pad_spacing) / 2,
7032
+ y: -length51.parse(parameters.h) / 2
6973
7033
  }
6974
7034
  ],
6975
7035
  stroke_width: 0.1,
@@ -7012,20 +7072,20 @@ var sodWithoutParsing15 = (parameters) => {
7012
7072
  };
7013
7073
 
7014
7074
  // src/fn/son.ts
7015
- import { z as z64 } from "zod";
7016
- import { length as length51 } from "circuit-json";
7075
+ import { z as z65 } from "zod";
7076
+ import { length as length52 } from "circuit-json";
7017
7077
  var son_def = base_def.extend({
7018
- fn: z64.string(),
7019
- num_pins: z64.union([z64.literal(6), z64.literal(8)]).default(8),
7020
- w: z64.string().default("3mm"),
7021
- h: z64.string().default("3mm"),
7022
- p: z64.string().default("0.5mm"),
7023
- pl: z64.string().default("0.52mm"),
7024
- pw: z64.string().default("0.35mm"),
7025
- epw: z64.string().default("1.40mm"),
7026
- eph: z64.string().default("1.60mm"),
7027
- string: z64.string().optional(),
7028
- ep: z64.boolean().default(false)
7078
+ fn: z65.string(),
7079
+ num_pins: z65.union([z65.literal(6), z65.literal(8)]).default(8),
7080
+ w: z65.string().default("3mm"),
7081
+ h: z65.string().default("3mm"),
7082
+ p: z65.string().default("0.5mm"),
7083
+ pl: z65.string().default("0.52mm"),
7084
+ pw: z65.string().default("0.35mm"),
7085
+ epw: z65.string().default("1.40mm"),
7086
+ eph: z65.string().default("1.60mm"),
7087
+ string: z65.string().optional(),
7088
+ ep: z65.boolean().default(false)
7029
7089
  });
7030
7090
  var son = (raw_params) => {
7031
7091
  if (raw_params.string && raw_params.string.includes("_ep")) {
@@ -7037,13 +7097,13 @@ var son = (raw_params) => {
7037
7097
  ...raw_params,
7038
7098
  num_pins: numPins
7039
7099
  });
7040
- const w = length51.parse(parameters.w);
7041
- const h = length51.parse(parameters.h);
7042
- const p = length51.parse(parameters.p);
7043
- const pl = length51.parse(parameters.pl);
7044
- const pw = length51.parse(parameters.pw);
7045
- const epw = length51.parse(parameters.epw);
7046
- const eph = length51.parse(parameters.eph);
7100
+ const w = length52.parse(parameters.w);
7101
+ const h = length52.parse(parameters.h);
7102
+ const p = length52.parse(parameters.p);
7103
+ const pl = length52.parse(parameters.pl);
7104
+ const pw = length52.parse(parameters.pw);
7105
+ const epw = length52.parse(parameters.epw);
7106
+ const eph = length52.parse(parameters.eph);
7047
7107
  const pads = [];
7048
7108
  for (let i = 0; i < parameters.num_pins; i++) {
7049
7109
  const { x, y } = getSonPadCoord(parameters.num_pins, i + 1, w, p);
@@ -7121,18 +7181,18 @@ var getSonPadCoord = (num_pins, pn, w, p) => {
7121
7181
  const col = pn <= half ? -1 : 1;
7122
7182
  const row = (half - 1) / 2 - rowIndex;
7123
7183
  return {
7124
- x: col * length51.parse("1.4mm"),
7184
+ x: col * length52.parse("1.4mm"),
7125
7185
  y: row * p
7126
7186
  };
7127
7187
  };
7128
7188
 
7129
7189
  // src/fn/solderjumper.ts
7130
- import { length as length52 } from "circuit-json";
7190
+ import { length as length53 } from "circuit-json";
7131
7191
  var solderjumper = (params) => {
7132
7192
  const { num_pins, bridged, p = 2.54, pw = 1.5, ph = 1.5 } = params;
7133
- const padSpacing7 = length52.parse(p);
7134
- const padWidth = length52.parse(pw);
7135
- const padHeight = length52.parse(ph);
7193
+ const padSpacing7 = length53.parse(p);
7194
+ const padWidth = length53.parse(pw);
7195
+ const padHeight = length53.parse(ph);
7136
7196
  const traceWidth = Math.min(padHeight / 4, 0.5);
7137
7197
  const pads = [];
7138
7198
  for (let i = 0; i < num_pins; i++) {
@@ -7220,34 +7280,34 @@ var solderjumper = (params) => {
7220
7280
  };
7221
7281
 
7222
7282
  // src/fn/sot457.ts
7223
- import { z as z65 } from "zod";
7283
+ import { z as z66 } from "zod";
7224
7284
  var commonSchema = {
7225
- fn: z65.literal("sot457"),
7226
- num_pins: z65.literal(6).default(6),
7227
- pillh: z65.string().default("0.45mm"),
7228
- pillw: z65.string().default("1.45mm"),
7229
- pl: z65.string(),
7230
- pw: z65.string(),
7231
- p: z65.string(),
7232
- wave: z65.boolean().optional(),
7233
- reflow: z65.boolean().optional()
7285
+ fn: z66.literal("sot457"),
7286
+ num_pins: z66.literal(6).default(6),
7287
+ pillh: z66.string().default("0.45mm"),
7288
+ pillw: z66.string().default("1.45mm"),
7289
+ pl: z66.string(),
7290
+ pw: z66.string(),
7291
+ p: z66.string(),
7292
+ wave: z66.boolean().optional(),
7293
+ reflow: z66.boolean().optional()
7234
7294
  };
7235
7295
  var sot457DefSchema = base_def.extend({
7236
7296
  ...commonSchema,
7237
- h: z65.string().default("2.5mm"),
7238
- w: z65.string().default("2.7mm"),
7239
- pl: z65.string().default("0.8mm"),
7240
- pw: z65.string().default("0.55mm"),
7241
- p: z65.string().default("0.95mm")
7297
+ h: z66.string().default("2.5mm"),
7298
+ w: z66.string().default("2.7mm"),
7299
+ pl: z66.string().default("0.8mm"),
7300
+ pw: z66.string().default("0.55mm"),
7301
+ p: z66.string().default("0.95mm")
7242
7302
  });
7243
7303
  var sot457WaveSchema = base_def.extend({
7244
7304
  ...commonSchema,
7245
- h: z65.string().default("3mm"),
7246
- w: z65.string().default("4mm"),
7247
- pillr: z65.string().default("0.225mm"),
7248
- pl: z65.string().default("1.45mm"),
7249
- pw: z65.string().default("1.5mm"),
7250
- p: z65.string().default("1.475mm")
7305
+ h: z66.string().default("3mm"),
7306
+ w: z66.string().default("4mm"),
7307
+ pillr: z66.string().default("0.225mm"),
7308
+ pl: z66.string().default("1.45mm"),
7309
+ pw: z66.string().default("1.5mm"),
7310
+ p: z66.string().default("1.475mm")
7251
7311
  }).transform((data) => ({
7252
7312
  ...data,
7253
7313
  wave: data.wave ?? (data.reflow === void 0 ? true : !data.reflow),
@@ -7386,25 +7446,25 @@ var sot457 = (rawParams) => {
7386
7446
  };
7387
7447
 
7388
7448
  // src/fn/sot963.ts
7389
- import { z as z66 } from "zod";
7390
- import { length as length53 } from "circuit-json";
7449
+ import { z as z67 } from "zod";
7450
+ import { length as length54 } from "circuit-json";
7391
7451
  var sot963_def = base_def.extend({
7392
- fn: z66.string(),
7393
- num_pins: z66.literal(6).default(6),
7394
- w: z66.string().default("1.1mm"),
7395
- h: z66.string().default("1.45mm"),
7396
- p: z66.string().default("0.35mm"),
7397
- pl: z66.string().default("0.2mm"),
7398
- pw: z66.string().default("0.2mm"),
7399
- string: z66.string().optional()
7452
+ fn: z67.string(),
7453
+ num_pins: z67.literal(6).default(6),
7454
+ w: z67.string().default("1.1mm"),
7455
+ h: z67.string().default("1.45mm"),
7456
+ p: z67.string().default("0.35mm"),
7457
+ pl: z67.string().default("0.2mm"),
7458
+ pw: z67.string().default("0.2mm"),
7459
+ string: z67.string().optional()
7400
7460
  });
7401
7461
  var sot963 = (raw_params) => {
7402
7462
  const parameters = sot963_def.parse({ ...raw_params, fn: "sot963" });
7403
- const w = length53.parse(parameters.w);
7404
- const h = length53.parse(parameters.h);
7405
- const p = length53.parse(parameters.p);
7406
- const pl = length53.parse(parameters.pl);
7407
- const pw = length53.parse(parameters.pw);
7463
+ const w = length54.parse(parameters.w);
7464
+ const h = length54.parse(parameters.h);
7465
+ const p = length54.parse(parameters.p);
7466
+ const pl = length54.parse(parameters.pl);
7467
+ const pw = length54.parse(parameters.pw);
7408
7468
  const pads = [];
7409
7469
  for (let i = 0; i < 6; i++) {
7410
7470
  const { x, y } = getSot963PadCoord(i + 1, w, p, pl);
@@ -7467,19 +7527,19 @@ var getSot963PadCoord = (pn, w, p, pl) => {
7467
7527
  };
7468
7528
 
7469
7529
  // src/fn/potentiometer.ts
7470
- import { z as z67 } from "zod";
7530
+ import { z as z68 } from "zod";
7471
7531
  var potentiometer_def = base_def.extend({
7472
- fn: z67.string(),
7473
- num_pins: z67.union([z67.literal(3), z67.literal(2)]).default(3),
7474
- p: z67.string().default("3.8mm"),
7475
- id: z67.string().default("1.25mm"),
7476
- od: z67.string().default("2.35mm"),
7477
- ca: z67.string().default("14mm").describe(
7532
+ fn: z68.string(),
7533
+ num_pins: z68.union([z68.literal(3), z68.literal(2)]).default(3),
7534
+ p: z68.string().default("3.8mm"),
7535
+ id: z68.string().default("1.25mm"),
7536
+ od: z68.string().default("2.35mm"),
7537
+ ca: z68.string().default("14mm").describe(
7478
7538
  "Caliper axis (width or diameter of the potentiometer body or adjustment knob)"
7479
7539
  ),
7480
- w: z67.string().default("5.35mm"),
7481
- h: z67.string().default("4mm"),
7482
- string: z67.string().optional()
7540
+ w: z68.string().default("5.35mm"),
7541
+ h: z68.string().default("4mm"),
7542
+ string: z68.string().optional()
7483
7543
  });
7484
7544
  var potentiometer_acp = (parameters) => {
7485
7545
  const { p, id, od, h, ca } = parameters;
@@ -7546,15 +7606,15 @@ var potentiometer = (raw_params) => {
7546
7606
 
7547
7607
  // src/fn/electrolytic.ts
7548
7608
  import {
7549
- length as length54
7609
+ length as length55
7550
7610
  } from "circuit-json";
7551
- import { z as z68 } from "zod";
7611
+ import { z as z69 } from "zod";
7552
7612
  var electrolytic_def = base_def.extend({
7553
- fn: z68.string(),
7554
- p: length54.optional().default("7.5mm"),
7555
- id: length54.optional().default("1mm"),
7556
- od: length54.optional().default("2mm"),
7557
- d: length54.optional().default("10.5mm")
7613
+ fn: z69.string(),
7614
+ p: length55.optional().default("7.5mm"),
7615
+ id: length55.optional().default("1mm"),
7616
+ od: length55.optional().default("2mm"),
7617
+ d: length55.optional().default("10.5mm")
7558
7618
  });
7559
7619
  var generate_circle_arcs = (centerX, centerY, radius, cut, cutHeight) => {
7560
7620
  const topArc = [];
@@ -7661,22 +7721,22 @@ var electrolytic = (raw_params) => {
7661
7721
  };
7662
7722
 
7663
7723
  // src/fn/smbf.ts
7664
- import { z as z69 } from "zod";
7665
- import { length as length55 } from "circuit-json";
7724
+ import { z as z70 } from "zod";
7725
+ import { length as length56 } from "circuit-json";
7666
7726
  var smbf_def = base_def.extend({
7667
- fn: z69.string(),
7668
- num_pins: z69.literal(2).default(2),
7669
- w: z69.string().default("6.5mm"),
7670
- h: z69.string().default("3mm"),
7671
- pl: z69.string().default("1.75mm"),
7672
- pw: z69.string().default("2.40mm"),
7673
- p: z69.string().default("4.75mm")
7727
+ fn: z70.string(),
7728
+ num_pins: z70.literal(2).default(2),
7729
+ w: z70.string().default("6.5mm"),
7730
+ h: z70.string().default("3mm"),
7731
+ pl: z70.string().default("1.75mm"),
7732
+ pw: z70.string().default("2.40mm"),
7733
+ p: z70.string().default("4.75mm")
7674
7734
  });
7675
7735
  var smbf = (raw_params) => {
7676
7736
  const parameters = smbf_def.parse(raw_params);
7677
7737
  const silkscreenRefText = silkscreenRef(
7678
7738
  0,
7679
- length55.parse(parameters.h) - 0.5,
7739
+ length56.parse(parameters.h) - 0.5,
7680
7740
  0.3
7681
7741
  );
7682
7742
  const silkscreenLine = {
@@ -7685,20 +7745,20 @@ var smbf = (raw_params) => {
7685
7745
  pcb_component_id: "",
7686
7746
  route: [
7687
7747
  {
7688
- x: length55.parse(parameters.p) / 2,
7689
- y: length55.parse(parameters.h) / 2
7748
+ x: length56.parse(parameters.p) / 2,
7749
+ y: length56.parse(parameters.h) / 2
7690
7750
  },
7691
7751
  {
7692
- x: -length55.parse(parameters.w) / 2 - 0.3,
7693
- y: length55.parse(parameters.h) / 2
7752
+ x: -length56.parse(parameters.w) / 2 - 0.3,
7753
+ y: length56.parse(parameters.h) / 2
7694
7754
  },
7695
7755
  {
7696
- x: -length55.parse(parameters.w) / 2 - 0.3,
7697
- y: -length55.parse(parameters.h) / 2
7756
+ x: -length56.parse(parameters.w) / 2 - 0.3,
7757
+ y: -length56.parse(parameters.h) / 2
7698
7758
  },
7699
7759
  {
7700
- x: length55.parse(parameters.p) / 2,
7701
- y: -length55.parse(parameters.h) / 2
7760
+ x: length56.parse(parameters.p) / 2,
7761
+ y: -length56.parse(parameters.h) / 2
7702
7762
  }
7703
7763
  ],
7704
7764
  stroke_width: 0.1,
@@ -7740,16 +7800,16 @@ var smbfWithoutParsing = (parameters) => {
7740
7800
  };
7741
7801
 
7742
7802
  // src/fn/sot323.ts
7743
- import { z as z70 } from "zod";
7803
+ import { z as z71 } from "zod";
7744
7804
  var sot323_def = base_def.extend({
7745
- fn: z70.string(),
7746
- num_pins: z70.number().default(3),
7747
- w: z70.string().default("2.45mm"),
7748
- h: z70.string().default("2.40mm"),
7749
- pl: z70.string().default("1.225mm"),
7750
- pw: z70.string().default("0.5mm"),
7751
- p: z70.string().default("0.95mm"),
7752
- string: z70.string().optional()
7805
+ fn: z71.string(),
7806
+ num_pins: z71.number().default(3),
7807
+ w: z71.string().default("2.45mm"),
7808
+ h: z71.string().default("2.40mm"),
7809
+ pl: z71.string().default("1.225mm"),
7810
+ pw: z71.string().default("0.5mm"),
7811
+ p: z71.string().default("0.95mm"),
7812
+ string: z71.string().optional()
7753
7813
  });
7754
7814
  var sot323 = (raw_params) => {
7755
7815
  const match = raw_params.string?.match(/^sot323_(\d+)/);
@@ -7837,30 +7897,30 @@ var sot323_3 = (parameters) => {
7837
7897
  };
7838
7898
 
7839
7899
  // src/fn/smtpad.ts
7840
- import { z as z71 } from "zod";
7841
- import { length as length56 } from "circuit-json";
7900
+ import { z as z72 } from "zod";
7901
+ import { length as length57 } from "circuit-json";
7842
7902
  import { mm as mm14 } from "@tscircuit/mm";
7843
7903
  var smtpad_def = base_def.extend({
7844
- fn: z71.string(),
7845
- circle: z71.boolean().optional(),
7846
- rect: z71.boolean().optional(),
7847
- square: z71.boolean().optional(),
7848
- pill: z71.boolean().optional(),
7849
- d: length56.optional(),
7850
- pd: length56.optional(),
7851
- diameter: length56.optional(),
7852
- r: length56.optional(),
7853
- pr: length56.optional(),
7854
- radius: length56.optional(),
7855
- w: length56.optional(),
7856
- pw: length56.optional(),
7857
- width: length56.optional(),
7858
- h: length56.optional(),
7859
- ph: length56.optional(),
7860
- height: length56.optional(),
7861
- s: length56.optional(),
7862
- size: length56.optional(),
7863
- string: z71.string().optional()
7904
+ fn: z72.string(),
7905
+ circle: z72.boolean().optional(),
7906
+ rect: z72.boolean().optional(),
7907
+ square: z72.boolean().optional(),
7908
+ pill: z72.boolean().optional(),
7909
+ d: length57.optional(),
7910
+ pd: length57.optional(),
7911
+ diameter: length57.optional(),
7912
+ r: length57.optional(),
7913
+ pr: length57.optional(),
7914
+ radius: length57.optional(),
7915
+ w: length57.optional(),
7916
+ pw: length57.optional(),
7917
+ width: length57.optional(),
7918
+ h: length57.optional(),
7919
+ ph: length57.optional(),
7920
+ height: length57.optional(),
7921
+ s: length57.optional(),
7922
+ size: length57.optional(),
7923
+ string: z72.string().optional()
7864
7924
  }).transform((v) => {
7865
7925
  let shape = "rect";
7866
7926
  if (v.circle) shape = "circle";
@@ -7926,18 +7986,18 @@ var smtpad = (raw_params) => {
7926
7986
  };
7927
7987
 
7928
7988
  // src/fn/platedhole.ts
7929
- import { z as z72 } from "zod";
7930
- import { length as length57 } from "circuit-json";
7989
+ import { z as z73 } from "zod";
7990
+ import { length as length58 } from "circuit-json";
7931
7991
  import { mm as mm15 } from "@tscircuit/mm";
7932
7992
  var platedhole_def = base_def.extend({
7933
- fn: z72.string(),
7934
- d: length57.optional(),
7935
- hd: length57.optional(),
7936
- r: length57.optional(),
7937
- hr: length57.optional(),
7938
- pd: length57.optional(),
7939
- pr: length57.optional(),
7940
- squarepad: z72.boolean().optional().default(false)
7993
+ fn: z73.string(),
7994
+ d: length58.optional(),
7995
+ hd: length58.optional(),
7996
+ r: length58.optional(),
7997
+ hr: length58.optional(),
7998
+ pd: length58.optional(),
7999
+ pr: length58.optional(),
8000
+ squarepad: z73.boolean().optional().default(false)
7941
8001
  }).transform((v) => {
7942
8002
  let holeD;
7943
8003
  if (v.d !== void 0) holeD = mm15(v.d);
@@ -7976,14 +8036,14 @@ var platedhole2 = (raw_params) => {
7976
8036
  };
7977
8037
 
7978
8038
  // src/fn/sot.ts
7979
- import { z as z73 } from "zod";
8039
+ import { z as z74 } from "zod";
7980
8040
  var sot_def = base_def.extend({
7981
- fn: z73.string(),
7982
- num_pins: z73.literal(6).default(6),
7983
- h: z73.string().default("1.6mm"),
7984
- pl: z73.string().default("1mm"),
7985
- pw: z73.string().default("0.7mm"),
7986
- p: z73.string().default("0.95mm")
8041
+ fn: z74.string(),
8042
+ num_pins: z74.literal(6).default(6),
8043
+ h: z74.string().default("1.6mm"),
8044
+ pl: z74.string().default("1mm"),
8045
+ pw: z74.string().default("0.7mm"),
8046
+ p: z74.string().default("0.95mm")
7987
8047
  });
7988
8048
  var sot = (raw_params) => {
7989
8049
  const parameters = sot_def.parse(raw_params);
@@ -8100,16 +8160,16 @@ var sotWithoutParsing = (parameters) => {
8100
8160
  };
8101
8161
 
8102
8162
  // src/fn/sot343.ts
8103
- import { z as z74 } from "zod";
8163
+ import { z as z75 } from "zod";
8104
8164
  var sot343_def = base_def.extend({
8105
- fn: z74.string(),
8106
- num_pins: z74.number().default(4),
8107
- w: z74.string().default("3.2mm"),
8108
- h: z74.string().default("2.6mm"),
8109
- pl: z74.string().default("1.35mm"),
8110
- pw: z74.string().default("0.50mm"),
8111
- p: z74.string().default("0.6mm"),
8112
- string: z74.string().optional()
8165
+ fn: z75.string(),
8166
+ num_pins: z75.number().default(4),
8167
+ w: z75.string().default("3.2mm"),
8168
+ h: z75.string().default("2.6mm"),
8169
+ pl: z75.string().default("1.35mm"),
8170
+ pw: z75.string().default("0.50mm"),
8171
+ p: z75.string().default("0.6mm"),
8172
+ string: z75.string().optional()
8113
8173
  });
8114
8174
  var sot343 = (raw_params) => {
8115
8175
  const match = raw_params.string?.match(/^sot343_(\d+)/);
@@ -8204,9 +8264,9 @@ var sot343_4 = (parameters) => {
8204
8264
  };
8205
8265
 
8206
8266
  // src/fn/m2host.ts
8207
- import { z as z75 } from "zod";
8267
+ import { z as z76 } from "zod";
8208
8268
  var m2host_def = base_def.extend({
8209
- fn: z75.string()
8269
+ fn: z76.string()
8210
8270
  });
8211
8271
  var m2host = (raw_params) => {
8212
8272
  const parameters = m2host_def.parse(raw_params);
@@ -8310,37 +8370,41 @@ var m2host = (raw_params) => {
8310
8370
  };
8311
8371
 
8312
8372
  // src/fn/mountedpcbmodule.ts
8313
- import { length as length58 } from "circuit-json";
8314
- import { z as z76 } from "zod";
8373
+ import { length as length59 } from "circuit-json";
8374
+ import { z as z77 } from "zod";
8315
8375
  var mountedpcbmodule_def = base_def.extend({
8316
- fn: z76.string(),
8317
- numPins: z76.number().optional().default(0),
8318
- rows: z76.union([z76.string(), z76.number()]).transform((val) => Number(val)).optional().default(1).describe("number of rows"),
8319
- p: length58.default("2.54mm").describe("pitch"),
8320
- id: length58.default("1.0mm").describe("inner diameter"),
8321
- od: length58.default("1.5mm").describe("outer diameter"),
8322
- male: z76.boolean().optional().describe("the module uses male headers"),
8323
- female: z76.boolean().optional().describe("the module uses female headers"),
8324
- smd: z76.boolean().optional().describe("surface mount device"),
8325
- pinlabeltextalignleft: z76.boolean().optional().default(false),
8326
- pinlabeltextaligncenter: z76.boolean().optional().default(false),
8327
- pinlabeltextalignright: z76.boolean().optional().default(false),
8328
- pinlabelverticallyinverted: z76.boolean().optional().default(false),
8329
- pinlabelorthogonal: z76.boolean().optional().default(false),
8330
- nopinlabels: z76.boolean().optional().default(false).describe("omit silkscreen pin labels"),
8331
- doublesidedpinlabel: z76.boolean().optional().default(false).describe("add silkscreen pins in top and bottom layers"),
8332
- bottomsidepinlabel: z76.boolean().optional().default(false).describe(
8376
+ fn: z77.string(),
8377
+ numPins: z77.number().optional().default(0),
8378
+ rows: z77.union([z77.string(), z77.number()]).transform((val) => Number(val)).optional().default(1).describe("number of rows"),
8379
+ p: length59.default("2.54mm").describe("pitch"),
8380
+ id: length59.default("1.0mm").describe("inner diameter"),
8381
+ od: length59.default("1.5mm").describe("outer diameter"),
8382
+ male: z77.boolean().optional().describe("the module uses male headers"),
8383
+ female: z77.boolean().optional().describe("the module uses female headers"),
8384
+ smd: z77.boolean().optional().describe("surface mount device"),
8385
+ pinlabeltextalignleft: z77.boolean().optional().default(false),
8386
+ pinlabeltextaligncenter: z77.boolean().optional().default(false),
8387
+ pinlabeltextalignright: z77.boolean().optional().default(false),
8388
+ pinlabelverticallyinverted: z77.boolean().optional().default(false),
8389
+ pinlabelorthogonal: z77.boolean().optional().default(false),
8390
+ nopinlabels: z77.boolean().optional().default(false).describe("omit silkscreen pin labels"),
8391
+ doublesidedpinlabel: z77.boolean().optional().default(false).describe("add silkscreen pins in top and bottom layers"),
8392
+ bottomsidepinlabel: z77.boolean().optional().default(false).describe(
8333
8393
  "place the silkscreen reference text on the bottom layer instead of top"
8334
8394
  ),
8335
- pinRowSide: z76.enum(["left", "right", "top", "bottom"]).optional().default("left"),
8336
- pinrowleft: z76.boolean().optional().default(false),
8337
- pinrowright: z76.boolean().optional().default(false),
8338
- pinrowtop: z76.boolean().optional().default(false),
8339
- pinrowbottom: z76.boolean().optional().default(false),
8340
- width: length58.optional(),
8341
- height: length58.optional(),
8342
- pinRowHoleEdgeToEdgeDist: length58.default("2mm"),
8343
- holes: z76.union([z76.string(), z76.array(z76.string())]).optional().transform((val) => {
8395
+ pinRowSide: z77.enum(["left", "right", "top", "bottom"]).optional().default("left"),
8396
+ pinrowleft: z77.boolean().optional().default(false),
8397
+ pinrowright: z77.boolean().optional().default(false),
8398
+ pinrowtop: z77.boolean().optional().default(false),
8399
+ pinrowbottom: z77.boolean().optional().default(false),
8400
+ pinrowleftpins: z77.union([z77.string(), z77.number()]).transform((val) => Number(val)).optional(),
8401
+ pinrowrightpins: z77.union([z77.string(), z77.number()]).transform((val) => Number(val)).optional(),
8402
+ pinrowtoppins: z77.union([z77.string(), z77.number()]).transform((val) => Number(val)).optional(),
8403
+ pinrowbottompins: z77.union([z77.string(), z77.number()]).transform((val) => Number(val)).optional(),
8404
+ width: length59.optional(),
8405
+ height: length59.optional(),
8406
+ pinRowHoleEdgeToEdgeDist: length59.default("2mm"),
8407
+ holes: z77.union([z77.string(), z77.array(z77.string())]).optional().transform((val) => {
8344
8408
  if (!val) return val;
8345
8409
  if (Array.isArray(val)) return val;
8346
8410
  if (val.startsWith("(") && val.endsWith(")")) {
@@ -8348,18 +8412,18 @@ var mountedpcbmodule_def = base_def.extend({
8348
8412
  }
8349
8413
  return [val];
8350
8414
  }),
8351
- holeXDist: length58.optional(),
8352
- holeYDist: length58.optional(),
8353
- holeInset: length58.default("1mm"),
8354
- pinrow: z76.union([z76.string(), z76.number()]).optional(),
8355
- usbposition: z76.enum(["left", "right", "top", "bottom"]).optional().default("left"),
8356
- usbleft: z76.boolean().optional().default(false),
8357
- usbtop: z76.boolean().optional().default(false),
8358
- usbright: z76.boolean().optional().default(false),
8359
- usbbottom: z76.boolean().optional().default(false),
8360
- usbtype: z76.enum(["micro", "c"]).optional(),
8361
- usbmicro: z76.boolean().optional().default(false),
8362
- usbc: z76.boolean().optional().default(false)
8415
+ holeXDist: length59.optional(),
8416
+ holeYDist: length59.optional(),
8417
+ holeInset: length59.default("1mm"),
8418
+ pinrow: z77.union([z77.string(), z77.number()]).optional(),
8419
+ usbposition: z77.enum(["left", "right", "top", "bottom"]).optional().default("left"),
8420
+ usbleft: z77.boolean().optional().default(false),
8421
+ usbtop: z77.boolean().optional().default(false),
8422
+ usbright: z77.boolean().optional().default(false),
8423
+ usbbottom: z77.boolean().optional().default(false),
8424
+ usbtype: z77.enum(["micro", "c"]).optional(),
8425
+ usbmicro: z77.boolean().optional().default(false),
8426
+ usbc: z77.boolean().optional().default(false)
8363
8427
  }).transform((data) => {
8364
8428
  const pinlabelAnchorSide = determinePinlabelAnchorSide(data);
8365
8429
  let pinRowSide = data.pinRowSide;
@@ -8378,10 +8442,41 @@ var mountedpcbmodule_def = base_def.extend({
8378
8442
  if (data.pinrow !== void 0) {
8379
8443
  data.numPins = Number(data.pinrow);
8380
8444
  }
8445
+ const sidePinCounts = {
8446
+ left: data.pinrowleftpins,
8447
+ right: data.pinrowrightpins,
8448
+ top: data.pinrowtoppins,
8449
+ bottom: data.pinrowbottompins
8450
+ };
8451
+ const hasSidePins = Object.values(sidePinCounts).some(
8452
+ (value) => value !== void 0 && value > 0
8453
+ );
8454
+ const leftRightBoth = (sidePinCounts.left ?? 0) > 0 && (sidePinCounts.right ?? 0) > 0;
8455
+ const topBottomBoth = (sidePinCounts.top ?? 0) > 0 && (sidePinCounts.bottom ?? 0) > 0;
8456
+ if (hasSidePins) {
8457
+ if ((sidePinCounts.left ?? 0) > 0) pinRowSide = "left";
8458
+ else if ((sidePinCounts.right ?? 0) > 0) pinRowSide = "right";
8459
+ else if ((sidePinCounts.top ?? 0) > 0) pinRowSide = "top";
8460
+ else if ((sidePinCounts.bottom ?? 0) > 0) pinRowSide = "bottom";
8461
+ data.numPins = (sidePinCounts.left ?? 0) + (sidePinCounts.right ?? 0) + (sidePinCounts.top ?? 0) + (sidePinCounts.bottom ?? 0);
8462
+ }
8381
8463
  const numPinsPerRow = Math.ceil(data.numPins / data.rows);
8464
+ const verticalPins = Math.max(
8465
+ sidePinCounts.left ?? 0,
8466
+ sidePinCounts.right ?? 0
8467
+ );
8468
+ const horizontalPins = Math.max(
8469
+ sidePinCounts.top ?? 0,
8470
+ sidePinCounts.bottom ?? 0
8471
+ );
8382
8472
  let calculatedWidth;
8383
8473
  let calculatedHeight;
8384
- if (pinRowSide === "left" || pinRowSide === "right") {
8474
+ if (hasSidePins) {
8475
+ const widthGap = leftRightBoth ? data.p : 0;
8476
+ const heightGap = topBottomBoth ? data.p : 0;
8477
+ calculatedWidth = (horizontalPins > 0 ? (horizontalPins - 1) * data.p : 0) + 2 * data.pinRowHoleEdgeToEdgeDist + widthGap;
8478
+ calculatedHeight = (verticalPins > 0 ? (verticalPins - 1) * data.p : 0) + 2 * data.pinRowHoleEdgeToEdgeDist + heightGap;
8479
+ } else if (pinRowSide === "left" || pinRowSide === "right") {
8385
8480
  calculatedWidth = (data.rows - 1) * data.p + 2 * data.pinRowHoleEdgeToEdgeDist;
8386
8481
  calculatedHeight = (numPinsPerRow - 1) * data.p + 2 * data.pinRowHoleEdgeToEdgeDist;
8387
8482
  } else {
@@ -8396,15 +8491,21 @@ var mountedpcbmodule_def = base_def.extend({
8396
8491
  ...data,
8397
8492
  pinlabelAnchorSide,
8398
8493
  pinRowSide,
8494
+ usbposition,
8495
+ usbtype,
8399
8496
  male: data.male ?? !data.female,
8400
8497
  female: data.female ?? false,
8401
8498
  width: data.width ?? calculatedWidth,
8402
- height: data.height ?? calculatedHeight
8499
+ height: data.height ?? calculatedHeight,
8500
+ pinrowleftpins: sidePinCounts.left,
8501
+ pinrowrightpins: sidePinCounts.right,
8502
+ pinrowtoppins: sidePinCounts.top,
8503
+ pinrowbottompins: sidePinCounts.bottom
8403
8504
  };
8404
8505
  }).superRefine((data, ctx) => {
8405
8506
  if (data.male && data.female) {
8406
8507
  ctx.addIssue({
8407
- code: z76.ZodIssueCode.custom,
8508
+ code: z77.ZodIssueCode.custom,
8408
8509
  message: "'male' and 'female' cannot both be true; it should be male or female.",
8409
8510
  path: ["male", "female"]
8410
8511
  });
@@ -8433,95 +8534,195 @@ var mountedpcbmodule = (raw_params) => {
8433
8534
  holes,
8434
8535
  holeXDist,
8435
8536
  holeYDist,
8436
- holeInset
8537
+ holeInset,
8538
+ pinrowleftpins,
8539
+ pinrowrightpins,
8540
+ pinrowtoppins,
8541
+ pinrowbottompins,
8542
+ usbposition,
8543
+ usbtype
8437
8544
  } = parameters;
8438
8545
  let pinlabelTextAlign = "center";
8439
8546
  if (pinlabeltextalignleft) pinlabelTextAlign = "left";
8440
8547
  else if (pinlabeltextalignright) pinlabelTextAlign = "right";
8441
8548
  const elements = [];
8442
- const pinSpacing = p;
8443
- let pinStartX = 0;
8444
- let pinStartY = 0;
8445
- let pinDirectionX = 0;
8446
- let pinDirectionY = 0;
8447
- let rowDirectionX = 0;
8448
- let rowDirectionY = 0;
8449
- const numPinsPerRow = Math.ceil(numPins / rows);
8450
- if (pinRowSide === "left" || pinRowSide === "right") {
8451
- pinStartX = pinRowSide === "left" ? -width / 2 + pinRowHoleEdgeToEdgeDist : width / 2 - pinRowHoleEdgeToEdgeDist;
8452
- pinStartY = (numPinsPerRow - 1) / 2 * pinSpacing;
8453
- pinDirectionX = 0;
8454
- pinDirectionY = -pinSpacing;
8455
- rowDirectionX = pinRowSide === "left" ? pinSpacing : -pinSpacing;
8456
- rowDirectionY = 0;
8457
- } else {
8458
- pinStartX = -(numPinsPerRow - 1) / 2 * pinSpacing;
8459
- pinStartY = pinRowSide === "top" ? height / 2 - pinRowHoleEdgeToEdgeDist : -height / 2 + pinRowHoleEdgeToEdgeDist;
8460
- pinDirectionX = pinSpacing;
8461
- pinDirectionY = 0;
8462
- rowDirectionX = 0;
8463
- rowDirectionY = pinRowSide === "top" ? -pinSpacing : pinSpacing;
8464
- }
8465
- let pinNumber = 1;
8466
- for (let row = 0; row < rows && pinNumber <= numPins; row++) {
8467
- for (let col = 0; col < numPinsPerRow && pinNumber <= numPins; col++) {
8468
- const xoff = pinStartX + col * pinDirectionX + row * rowDirectionX;
8469
- const yoff = pinStartY + col * pinDirectionY + row * rowDirectionY;
8470
- if (parameters.smd) {
8549
+ const sidePinCounts = {
8550
+ left: pinrowleftpins,
8551
+ right: pinrowrightpins,
8552
+ top: pinrowtoppins,
8553
+ bottom: pinrowbottompins
8554
+ };
8555
+ const hasSidePins = Object.values(sidePinCounts).some(
8556
+ (value) => value !== void 0 && value > 0
8557
+ );
8558
+ const addPin = (pinNumber, xoff, yoff, anchorSide) => {
8559
+ if (parameters.smd) {
8560
+ elements.push(
8561
+ rectpad(pinNumber, xoff, yoff, parameters.od, parameters.od)
8562
+ );
8563
+ } else if (pinNumber === 1) {
8564
+ elements.push(
8565
+ platedHoleWithRectPad({
8566
+ pn: pinNumber,
8567
+ x: xoff,
8568
+ y: yoff,
8569
+ holeDiameter: id,
8570
+ rectPadWidth: od,
8571
+ rectPadHeight: od
8572
+ })
8573
+ );
8574
+ } else {
8575
+ elements.push(platedhole(pinNumber, xoff, yoff, id, od));
8576
+ }
8577
+ if (!nopinlabels) {
8578
+ const anchor_x = xoff + (anchorSide === "left" ? -od : anchorSide === "right" ? od : 0);
8579
+ const anchor_y = yoff + (anchorSide === "top" ? od : anchorSide === "bottom" ? -od : 0);
8580
+ if (!bottomsidepinlabel) {
8471
8581
  elements.push(
8472
- rectpad(pinNumber, xoff, yoff, parameters.od, parameters.od)
8582
+ silkscreenPin({
8583
+ fs: od / 5,
8584
+ pn: pinNumber,
8585
+ anchor_x,
8586
+ anchor_y,
8587
+ anchorplacement: anchorSide,
8588
+ textalign: pinlabelTextAlign,
8589
+ orthogonal: pinlabelorthogonal,
8590
+ verticallyinverted: pinlabelverticallyinverted,
8591
+ layer: "top"
8592
+ })
8593
+ );
8594
+ }
8595
+ if (doublesidedpinlabel || bottomsidepinlabel) {
8596
+ elements.push(
8597
+ silkscreenPin({
8598
+ fs: od / 5,
8599
+ pn: pinNumber,
8600
+ anchor_x,
8601
+ anchor_y,
8602
+ anchorplacement: anchorSide,
8603
+ textalign: pinlabelTextAlign,
8604
+ orthogonal: pinlabelorthogonal,
8605
+ verticallyinverted: pinlabelverticallyinverted,
8606
+ layer: "bottom"
8607
+ })
8473
8608
  );
8609
+ }
8610
+ }
8611
+ };
8612
+ if (hasSidePins) {
8613
+ const pinSpacing = p;
8614
+ let pinNumber = 1;
8615
+ const leftCount = sidePinCounts.left ?? 0;
8616
+ const rightCount = sidePinCounts.right ?? 0;
8617
+ const topCount = sidePinCounts.top ?? 0;
8618
+ const bottomCount = sidePinCounts.bottom ?? 0;
8619
+ const addSidePins = (side, count) => {
8620
+ if (count <= 0) return;
8621
+ if (side === "left" || side === "right") {
8622
+ const xoff = side === "left" ? -width / 2 + pinRowHoleEdgeToEdgeDist : width / 2 - pinRowHoleEdgeToEdgeDist;
8623
+ const startY = (count - 1) / 2 * pinSpacing;
8624
+ for (let i = 0; i < count; i++) {
8625
+ addPin(pinNumber, xoff, startY - i * pinSpacing, side);
8626
+ pinNumber++;
8627
+ }
8474
8628
  } else {
8475
- if (pinNumber === 1) {
8476
- elements.push(
8477
- platedHoleWithRectPad({
8478
- pn: pinNumber,
8479
- x: xoff,
8480
- y: yoff,
8481
- holeDiameter: id,
8482
- rectPadWidth: od,
8483
- rectPadHeight: od
8484
- })
8485
- );
8486
- } else {
8487
- elements.push(platedhole(pinNumber, xoff, yoff, id, od));
8629
+ const yoff = side === "top" ? height / 2 - pinRowHoleEdgeToEdgeDist : -height / 2 + pinRowHoleEdgeToEdgeDist;
8630
+ const startX = -((count - 1) / 2) * pinSpacing;
8631
+ for (let i = 0; i < count; i++) {
8632
+ addPin(pinNumber, startX + i * pinSpacing, yoff, side);
8633
+ pinNumber++;
8488
8634
  }
8489
8635
  }
8490
- if (!nopinlabels) {
8491
- const anchor_x = xoff + (pinRowSide === "left" ? -od : pinRowSide === "right" ? od : 0);
8492
- const anchor_y = yoff + (pinRowSide === "top" ? od : pinRowSide === "bottom" ? -od : 0);
8493
- if (!bottomsidepinlabel) {
8636
+ };
8637
+ addSidePins("left", leftCount);
8638
+ addSidePins("right", rightCount);
8639
+ addSidePins("top", topCount);
8640
+ addSidePins("bottom", bottomCount);
8641
+ } else {
8642
+ const pinSpacing = p;
8643
+ let pinStartX = 0;
8644
+ let pinStartY = 0;
8645
+ let pinDirectionX = 0;
8646
+ let pinDirectionY = 0;
8647
+ let rowDirectionX = 0;
8648
+ let rowDirectionY = 0;
8649
+ const numPinsPerRow = Math.ceil(numPins / rows);
8650
+ if (pinRowSide === "left" || pinRowSide === "right") {
8651
+ pinStartX = pinRowSide === "left" ? -width / 2 + pinRowHoleEdgeToEdgeDist : width / 2 - pinRowHoleEdgeToEdgeDist;
8652
+ pinStartY = (numPinsPerRow - 1) / 2 * pinSpacing;
8653
+ pinDirectionX = 0;
8654
+ pinDirectionY = -pinSpacing;
8655
+ rowDirectionX = pinRowSide === "left" ? pinSpacing : -pinSpacing;
8656
+ rowDirectionY = 0;
8657
+ } else {
8658
+ pinStartX = -(numPinsPerRow - 1) / 2 * pinSpacing;
8659
+ pinStartY = pinRowSide === "top" ? height / 2 - pinRowHoleEdgeToEdgeDist : -height / 2 + pinRowHoleEdgeToEdgeDist;
8660
+ pinDirectionX = pinSpacing;
8661
+ pinDirectionY = 0;
8662
+ rowDirectionX = 0;
8663
+ rowDirectionY = pinRowSide === "top" ? -pinSpacing : pinSpacing;
8664
+ }
8665
+ let pinNumber = 1;
8666
+ for (let row = 0; row < rows && pinNumber <= numPins; row++) {
8667
+ for (let col = 0; col < numPinsPerRow && pinNumber <= numPins; col++) {
8668
+ const xoff = pinStartX + col * pinDirectionX + row * rowDirectionX;
8669
+ const yoff = pinStartY + col * pinDirectionY + row * rowDirectionY;
8670
+ if (parameters.smd) {
8494
8671
  elements.push(
8495
- silkscreenPin({
8496
- fs: od / 5,
8497
- pn: pinNumber,
8498
- anchor_x,
8499
- anchor_y,
8500
- anchorplacement: pinlabelAnchorSide,
8501
- textalign: pinlabelTextAlign,
8502
- orthogonal: pinlabelorthogonal,
8503
- verticallyinverted: pinlabelverticallyinverted,
8504
- layer: "top"
8505
- })
8672
+ rectpad(pinNumber, xoff, yoff, parameters.od, parameters.od)
8506
8673
  );
8674
+ } else {
8675
+ if (pinNumber === 1) {
8676
+ elements.push(
8677
+ platedHoleWithRectPad({
8678
+ pn: pinNumber,
8679
+ x: xoff,
8680
+ y: yoff,
8681
+ holeDiameter: id,
8682
+ rectPadWidth: od,
8683
+ rectPadHeight: od
8684
+ })
8685
+ );
8686
+ } else {
8687
+ elements.push(platedhole(pinNumber, xoff, yoff, id, od));
8688
+ }
8507
8689
  }
8508
- if (doublesidedpinlabel || bottomsidepinlabel) {
8509
- elements.push(
8510
- silkscreenPin({
8511
- fs: od / 5,
8512
- pn: pinNumber,
8513
- anchor_x,
8514
- anchor_y,
8515
- anchorplacement: pinlabelAnchorSide,
8516
- textalign: pinlabelTextAlign,
8517
- orthogonal: pinlabelorthogonal,
8518
- verticallyinverted: pinlabelverticallyinverted,
8519
- layer: "bottom"
8520
- })
8521
- );
8690
+ if (!nopinlabels) {
8691
+ const anchor_x = xoff + (pinRowSide === "left" ? -od : pinRowSide === "right" ? od : 0);
8692
+ const anchor_y = yoff + (pinRowSide === "top" ? od : pinRowSide === "bottom" ? -od : 0);
8693
+ if (!bottomsidepinlabel) {
8694
+ elements.push(
8695
+ silkscreenPin({
8696
+ fs: od / 5,
8697
+ pn: pinNumber,
8698
+ anchor_x,
8699
+ anchor_y,
8700
+ anchorplacement: pinlabelAnchorSide,
8701
+ textalign: pinlabelTextAlign,
8702
+ orthogonal: pinlabelorthogonal,
8703
+ verticallyinverted: pinlabelverticallyinverted,
8704
+ layer: "top"
8705
+ })
8706
+ );
8707
+ }
8708
+ if (doublesidedpinlabel || bottomsidepinlabel) {
8709
+ elements.push(
8710
+ silkscreenPin({
8711
+ fs: od / 5,
8712
+ pn: pinNumber,
8713
+ anchor_x,
8714
+ anchor_y,
8715
+ anchorplacement: pinlabelAnchorSide,
8716
+ textalign: pinlabelTextAlign,
8717
+ orthogonal: pinlabelorthogonal,
8718
+ verticallyinverted: pinlabelverticallyinverted,
8719
+ layer: "bottom"
8720
+ })
8721
+ );
8722
+ }
8522
8723
  }
8724
+ pinNumber++;
8523
8725
  }
8524
- pinNumber++;
8525
8726
  }
8526
8727
  }
8527
8728
  if (holes) {
@@ -8563,6 +8764,62 @@ var mountedpcbmodule = (raw_params) => {
8563
8764
  }
8564
8765
  const refText = silkscreenRef(0, height / 2 + 1, 0.5);
8565
8766
  elements.push(refText);
8767
+ if (usbposition && usbtype) {
8768
+ let usbRectWidth;
8769
+ let usbRectHeight;
8770
+ if (usbtype === "c") {
8771
+ usbRectWidth = 8;
8772
+ usbRectHeight = 3;
8773
+ } else if (usbtype === "micro") {
8774
+ usbRectWidth = 6;
8775
+ usbRectHeight = 2;
8776
+ } else {
8777
+ return {
8778
+ circuitJson: elements,
8779
+ parameters
8780
+ };
8781
+ }
8782
+ let usbRect;
8783
+ if (usbposition === "left") {
8784
+ usbRect = [
8785
+ { x: -width / 2, y: -usbRectWidth / 2 },
8786
+ { x: -width / 2 + usbRectHeight, y: -usbRectWidth / 2 },
8787
+ { x: -width / 2 + usbRectHeight, y: usbRectWidth / 2 },
8788
+ { x: -width / 2, y: usbRectWidth / 2 },
8789
+ { x: -width / 2, y: -usbRectWidth / 2 }
8790
+ ];
8791
+ } else if (usbposition === "right") {
8792
+ usbRect = [
8793
+ { x: width / 2 - usbRectHeight, y: -usbRectWidth / 2 },
8794
+ { x: width / 2, y: -usbRectWidth / 2 },
8795
+ { x: width / 2, y: usbRectWidth / 2 },
8796
+ { x: width / 2 - usbRectHeight, y: usbRectWidth / 2 },
8797
+ { x: width / 2 - usbRectHeight, y: -usbRectWidth / 2 }
8798
+ ];
8799
+ } else if (usbposition === "top") {
8800
+ usbRect = [
8801
+ { x: -usbRectWidth / 2, y: height / 2 - usbRectHeight },
8802
+ { x: usbRectWidth / 2, y: height / 2 - usbRectHeight },
8803
+ { x: usbRectWidth / 2, y: height / 2 },
8804
+ { x: -usbRectWidth / 2, y: height / 2 },
8805
+ { x: -usbRectWidth / 2, y: height / 2 - usbRectHeight }
8806
+ ];
8807
+ } else if (usbposition === "bottom") {
8808
+ usbRect = [
8809
+ { x: -usbRectWidth / 2, y: -height / 2 },
8810
+ { x: usbRectWidth / 2, y: -height / 2 },
8811
+ { x: usbRectWidth / 2, y: -height / 2 + usbRectHeight },
8812
+ { x: -usbRectWidth / 2, y: -height / 2 + usbRectHeight },
8813
+ { x: -usbRectWidth / 2, y: -height / 2 }
8814
+ ];
8815
+ } else {
8816
+ return {
8817
+ circuitJson: elements,
8818
+ parameters
8819
+ };
8820
+ }
8821
+ elements.push(silkscreenpath(usbRect, { stroke_width: 0.1, layer: "top" }));
8822
+ }
8566
8823
  return {
8567
8824
  circuitJson: elements,
8568
8825
  parameters
@@ -8570,16 +8827,16 @@ var mountedpcbmodule = (raw_params) => {
8570
8827
  };
8571
8828
 
8572
8829
  // src/fn/to92l.ts
8573
- import { z as z77 } from "zod";
8830
+ import { z as z78 } from "zod";
8574
8831
  var to92l_def = base_def.extend({
8575
- fn: z77.string(),
8576
- num_pins: z77.number().default(3),
8577
- inline: z77.boolean().default(false),
8578
- p: z77.string().default("1.27mm"),
8579
- id: z77.string().default("0.75mm"),
8580
- od: z77.string().default("1.3mm"),
8581
- w: z77.string().default("4.8mm"),
8582
- h: z77.string().default("4.0mm")
8832
+ fn: z78.string(),
8833
+ num_pins: z78.number().default(3),
8834
+ inline: z78.boolean().default(false),
8835
+ p: z78.string().default("1.27mm"),
8836
+ id: z78.string().default("0.75mm"),
8837
+ od: z78.string().default("1.3mm"),
8838
+ w: z78.string().default("4.8mm"),
8839
+ h: z78.string().default("4.0mm")
8583
8840
  });
8584
8841
  var to92l = (raw_params) => {
8585
8842
  const parameters = to92l_def.parse(raw_params);