@tscircuit/footprinter 0.0.303 → 0.0.305

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
@@ -1664,30 +1664,100 @@ var mlp = (parameters) => {
1664
1664
  };
1665
1665
 
1666
1666
  // src/fn/ssop.ts
1667
- var ssop_def = extendSoicDef({
1668
- w: "3.9mm",
1669
- p: "1.27mm"
1667
+ import { length as length11 } from "circuit-json";
1668
+ import { z as z16 } from "zod";
1669
+ var ssop_def = base_def.extend({
1670
+ fn: z16.string(),
1671
+ num_pins: z16.number().optional().default(8),
1672
+ w: length11.default(length11.parse("3.9mm")),
1673
+ p: length11.default(length11.parse("1.27mm")),
1674
+ pw: length11.optional(),
1675
+ pl: length11.optional(),
1676
+ legsoutside: z16.boolean().optional().default(false),
1677
+ silkscreen_stroke_width: z16.number().optional().default(0.1)
1678
+ }).transform((v) => {
1679
+ if (v.pw == null && v.pl == null) {
1680
+ v.pw = length11.parse("0.51mm");
1681
+ v.pl = length11.parse("1.1mm");
1682
+ } else if (v.pw == null) {
1683
+ v.pw = v.pl * (0.51 / 1.1);
1684
+ } else if (v.pl == null) {
1685
+ v.pl = v.pw * (1.1 / 0.51);
1686
+ }
1687
+ return v;
1670
1688
  });
1689
+ var getSsopCoords = (parameters) => {
1690
+ const { num_pins, pn, w, p } = parameters;
1691
+ const ph = num_pins / 2;
1692
+ const isLeft = pn <= ph;
1693
+ const leftPinGaps = ph - 1;
1694
+ const gs = p;
1695
+ const h = gs * leftPinGaps;
1696
+ const padRowSpan = w + length11.parse("0.2mm");
1697
+ const x = (isLeft ? -1 : 1) * (padRowSpan / 2);
1698
+ if (isLeft) {
1699
+ return { x, y: h / 2 - (pn - 1) * gs };
1700
+ }
1701
+ return { x, y: -h / 2 + (pn - ph - 1) * gs };
1702
+ };
1671
1703
  var ssop = (raw_params) => {
1672
1704
  const parameters = ssop_def.parse(raw_params);
1705
+ const pads = [];
1706
+ for (let i = 0; i < parameters.num_pins; i++) {
1707
+ const { x, y } = getSsopCoords({
1708
+ num_pins: parameters.num_pins,
1709
+ pn: i + 1,
1710
+ w: parameters.w,
1711
+ p: parameters.p,
1712
+ pl: parameters.pl,
1713
+ legsoutside: parameters.legsoutside
1714
+ });
1715
+ pads.push(rectpad(i + 1, x, y, parameters.pl, parameters.pw));
1716
+ }
1717
+ const m = Math.min(1, parameters.p / 2);
1718
+ const sw = parameters.w - (parameters.legsoutside ? 0 : parameters.pl) - 0.2;
1719
+ const sh = (parameters.num_pins / 2 - 1) * parameters.p + parameters.pw + m;
1720
+ const silkscreenRefText = silkscreenRef(
1721
+ 0,
1722
+ sh / 2 + 0.4,
1723
+ sh / 12
1724
+ );
1725
+ const silkscreenBorder = {
1726
+ type: "pcb_silkscreen_path",
1727
+ layer: "top",
1728
+ pcb_component_id: "",
1729
+ pcb_silkscreen_path_id: "silkscreen_path_1",
1730
+ stroke_width: parameters.silkscreen_stroke_width ?? 0.1,
1731
+ route: [
1732
+ { x: -sw / 2, y: -sh / 2 },
1733
+ { x: -sw / 2, y: sh / 2 },
1734
+ ...u_curve.map(({ x, y }) => ({
1735
+ x: x * sw / 6,
1736
+ y: y * sw / 6 + sh / 2
1737
+ })),
1738
+ { x: sw / 2, y: sh / 2 },
1739
+ { x: sw / 2, y: -sh / 2 },
1740
+ { x: -sw / 2, y: -sh / 2 }
1741
+ ]
1742
+ };
1673
1743
  return {
1674
- circuitJson: soicWithoutParsing(parameters),
1744
+ circuitJson: [...pads, silkscreenBorder, silkscreenRefText],
1675
1745
  parameters
1676
1746
  };
1677
1747
  };
1678
1748
 
1679
1749
  // src/fn/tssop.ts
1680
- import { length as length11 } from "circuit-json";
1681
- import { z as z16 } from "zod";
1750
+ import { length as length12 } from "circuit-json";
1751
+ import { z as z17 } from "zod";
1682
1752
  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)
1753
+ fn: z17.string(),
1754
+ num_pins: z17.number().optional().default(8),
1755
+ w: length12.default(length12.parse("3.0mm")),
1756
+ p: length12.default(length12.parse("0.5mm")),
1757
+ pw: length12.default(length12.parse("0.30mm")),
1758
+ pl: length12.default(length12.parse("1.45mm")),
1759
+ legsoutside: z17.boolean().optional().default(true),
1760
+ silkscreen_stroke_width: z17.number().optional().default(0.1)
1691
1761
  });
1692
1762
  var getTssopCoords = (parameters) => {
1693
1763
  const { num_pins, pn, w, p, pl, legsoutside } = parameters;
@@ -1704,11 +1774,11 @@ var getTssopCoords = (parameters) => {
1704
1774
  var tssop = (raw_params) => {
1705
1775
  const params = { ...raw_params };
1706
1776
  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");
1777
+ const pValue = typeof pRaw === "string" || typeof pRaw === "number" ? length12.parse(pRaw) : void 0;
1778
+ const isFinePitch = pValue != null && pValue <= length12.parse("0.5mm");
1709
1779
  const parameters = tssop_def.parse(params);
1710
1780
  const pads = [];
1711
- const wForPads = isFinePitch ? parameters.w - length11.parse("0.15mm") : parameters.w;
1781
+ const wForPads = isFinePitch ? parameters.w - length12.parse("0.15mm") : parameters.w;
1712
1782
  for (let i = 0; i < parameters.num_pins; i++) {
1713
1783
  const { x, y } = getTssopCoords({
1714
1784
  num_pins: parameters.num_pins,
@@ -1753,25 +1823,25 @@ var tssop = (raw_params) => {
1753
1823
  };
1754
1824
 
1755
1825
  // src/fn/sot363.ts
1756
- import { z as z17 } from "zod";
1757
- import { length as length12 } from "circuit-json";
1826
+ import { z as z18 } from "zod";
1827
+ import { length as length13 } from "circuit-json";
1758
1828
  var sot363_def = base_def.extend({
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()
1829
+ fn: z18.string(),
1830
+ num_pins: z18.literal(6).default(6),
1831
+ w: z18.string().default("3.1mm"),
1832
+ h: z18.string().default("2.0mm"),
1833
+ p: z18.string().default("0.65mm"),
1834
+ pl: z18.string().default("1.325mm"),
1835
+ pw: z18.string().default("0.4mm"),
1836
+ string: z18.string().optional()
1767
1837
  });
1768
1838
  var sot363 = (raw_params) => {
1769
1839
  const parameters = sot363_def.parse({ ...raw_params, fn: "sot363" });
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);
1840
+ const w = length13.parse(parameters.w);
1841
+ const h = length13.parse(parameters.h);
1842
+ const p = length13.parse(parameters.p);
1843
+ const pl = length13.parse(parameters.pl);
1844
+ const pw = length13.parse(parameters.pw);
1775
1845
  const pads = [];
1776
1846
  for (let i = 0; i < 6; i++) {
1777
1847
  const { x, y } = getSot363PadCoord(i + 1, w, p, pl);
@@ -1834,25 +1904,25 @@ var getSot363PadCoord = (pn, w, p, pl) => {
1834
1904
  };
1835
1905
 
1836
1906
  // src/fn/sot886.ts
1837
- import { z as z18 } from "zod";
1838
- import { length as length13 } from "circuit-json";
1907
+ import { z as z19 } from "zod";
1908
+ import { length as length14 } from "circuit-json";
1839
1909
  var sot886_def = base_def.extend({
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()
1910
+ fn: z19.string(),
1911
+ num_pins: z19.literal(6).default(6),
1912
+ w: z19.string().default("1.01mm"),
1913
+ h: z19.string().default("1.45mm"),
1914
+ p: z19.string().default("0.5mm"),
1915
+ pl: z19.string().default("0.33mm"),
1916
+ pw: z19.string().default("0.27mm"),
1917
+ string: z19.string().optional()
1848
1918
  });
1849
1919
  var sot886 = (raw_params) => {
1850
1920
  const parameters = sot886_def.parse({ ...raw_params, fn: "sot886" });
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);
1921
+ const w = length14.parse(parameters.w);
1922
+ const h = length14.parse(parameters.h);
1923
+ const p = length14.parse(parameters.p);
1924
+ const pl = length14.parse(parameters.pl);
1925
+ const pw = length14.parse(parameters.pw);
1856
1926
  const pads = [];
1857
1927
  for (let i = 0; i < 6; i++) {
1858
1928
  const { x, y } = getSot886PadCoord(i + 1, w, p, pl);
@@ -1915,16 +1985,16 @@ var getSot886PadCoord = (pn, w, p, pl) => {
1915
1985
  };
1916
1986
 
1917
1987
  // src/fn/sot23.ts
1918
- import { z as z19 } from "zod";
1988
+ import { z as z20 } from "zod";
1919
1989
  var sot23_def = base_def.extend({
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()
1990
+ fn: z20.string(),
1991
+ num_pins: z20.number().default(3),
1992
+ w: z20.string().default("1.92mm"),
1993
+ h: z20.string().default("2.74mm"),
1994
+ pl: z20.string().default("1.32mm"),
1995
+ pw: z20.string().default("0.6mm"),
1996
+ p: z20.string().default("0.95mm"),
1997
+ string: z20.string().optional()
1928
1998
  });
1929
1999
  var sot23_6_or_8_def = extendSoicDef({
1930
2000
  p: "0.95mm",
@@ -2214,8 +2284,8 @@ var dfn = (raw_params) => {
2214
2284
  };
2215
2285
 
2216
2286
  // src/fn/pinrow.ts
2217
- import { z as z22 } from "zod";
2218
- import { length as length14 } from "circuit-json";
2287
+ import { z as z23 } from "zod";
2288
+ import { length as length15 } from "circuit-json";
2219
2289
 
2220
2290
  // src/helpers/silkscreenPin.ts
2221
2291
  var silkscreenPin = ({
@@ -2302,28 +2372,28 @@ function determinePinlabelAnchorSide({
2302
2372
 
2303
2373
  // src/fn/pinrow.ts
2304
2374
  var pinrow_def = base_def.extend({
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(
2375
+ fn: z23.string(),
2376
+ num_pins: z23.number().optional().default(6),
2377
+ rows: z23.union([z23.string(), z23.number()]).transform((val) => Number(val)).optional().default(1).describe("number of rows"),
2378
+ p: length15.default("0.1in").describe("pitch"),
2379
+ id: length15.default("1.0mm").describe("inner diameter"),
2380
+ od: length15.default("1.5mm").describe("outer diameter"),
2381
+ male: z23.boolean().optional().describe("for male pin headers"),
2382
+ female: z23.boolean().optional().describe("for female pin headers"),
2383
+ smd: z23.boolean().optional().describe("surface mount device"),
2384
+ surfacemount: z23.boolean().optional().describe("surface mount device (verbose)"),
2385
+ rightangle: z23.boolean().optional().describe("right angle"),
2386
+ pw: length15.optional().default("1.0mm").describe("pad width for SMD"),
2387
+ pl: length15.optional().default("2.0mm").describe("pad length for SMD"),
2388
+ pinlabeltextalignleft: z23.boolean().optional().default(false),
2389
+ pinlabeltextaligncenter: z23.boolean().optional().default(false),
2390
+ pinlabeltextalignright: z23.boolean().optional().default(false),
2391
+ pinlabelverticallyinverted: z23.boolean().optional().default(false),
2392
+ pinlabelorthogonal: z23.boolean().optional().default(false),
2393
+ nosquareplating: z23.boolean().optional().default(false).describe("do not use rectangular pad for pin 1"),
2394
+ nopinlabels: z23.boolean().optional().default(false).describe("omit silkscreen pin labels"),
2395
+ doublesidedpinlabel: z23.boolean().optional().default(false).describe("add silkscreen pins in top and bottom layers"),
2396
+ bottomsidepinlabel: z23.boolean().optional().default(false).describe(
2327
2397
  "place the silkscreen reference text on the bottom layer instead of top"
2328
2398
  )
2329
2399
  }).transform((data) => {
@@ -2339,7 +2409,7 @@ var pinrow_def = base_def.extend({
2339
2409
  }).superRefine((data, ctx) => {
2340
2410
  if (data.male && data.female) {
2341
2411
  ctx.addIssue({
2342
- code: z22.ZodIssueCode.custom,
2412
+ code: z23.ZodIssueCode.custom,
2343
2413
  message: "'male' and 'female' cannot both be true; it should be male or female.",
2344
2414
  path: ["male", "female"]
2345
2415
  });
@@ -2577,25 +2647,25 @@ var pinrow = (raw_params) => {
2577
2647
  };
2578
2648
 
2579
2649
  // src/fn/sot563.ts
2580
- import { z as z23 } from "zod";
2581
- import { length as length15 } from "circuit-json";
2650
+ import { z as z24 } from "zod";
2651
+ import { length as length16 } from "circuit-json";
2582
2652
  var sot563_def = base_def.extend({
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()
2653
+ fn: z24.string(),
2654
+ num_pins: z24.literal(6).default(6),
2655
+ w: z24.string().default("2.1mm"),
2656
+ h: z24.string().default("2.45mm"),
2657
+ p: z24.string().default("0.5mm"),
2658
+ pl: z24.string().default("0.675mm"),
2659
+ pw: z24.string().default("0.35mm"),
2660
+ string: z24.string().optional()
2591
2661
  });
2592
2662
  var sot563 = (raw_params) => {
2593
2663
  const parameters = sot563_def.parse({ ...raw_params, fn: "sot563" });
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);
2664
+ const w = length16.parse(parameters.w);
2665
+ const h = length16.parse(parameters.h);
2666
+ const p = length16.parse(parameters.p);
2667
+ const pl = length16.parse(parameters.pl);
2668
+ const pw = length16.parse(parameters.pw);
2599
2669
  const pads = [];
2600
2670
  for (let i = 0; i < 6; i++) {
2601
2671
  const { x, y } = getSot563PadCoord(i + 1, w, p, pl);
@@ -2686,23 +2756,23 @@ var ms013 = (raw_params) => {
2686
2756
  };
2687
2757
 
2688
2758
  // src/fn/sot723.ts
2689
- import { length as length16 } from "circuit-json";
2690
- import { z as z24 } from "zod";
2759
+ import { length as length17 } from "circuit-json";
2760
+ import { z as z25 } from "zod";
2691
2761
  var sot723_def = base_def.extend({
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")
2762
+ fn: z25.string(),
2763
+ num_pins: z25.literal(3).default(3),
2764
+ w: z25.string().default("1.2mm"),
2765
+ h: z25.string().default("1.2mm"),
2766
+ pw: z25.string().default("0.40mm"),
2767
+ pl: z25.string().default("0.45mm"),
2768
+ p: z25.string().default("0.575mm")
2699
2769
  });
2700
2770
  var sot723 = (raw_params) => {
2701
2771
  const parameters = sot723_def.parse(raw_params);
2702
2772
  const pad2 = sot723WithoutParsing(parameters);
2703
2773
  const silkscreenRefText = silkscreenRef(
2704
2774
  0,
2705
- length16.parse(parameters.h),
2775
+ length17.parse(parameters.h),
2706
2776
  0.2
2707
2777
  );
2708
2778
  return {
@@ -2745,22 +2815,22 @@ var sot723WithoutParsing = (parameters) => {
2745
2815
  };
2746
2816
 
2747
2817
  // src/fn/sod123.ts
2748
- import { z as z25 } from "zod";
2749
- import { length as length17 } from "circuit-json";
2818
+ import { z as z26 } from "zod";
2819
+ import { length as length18 } from "circuit-json";
2750
2820
  var sod_def = base_def.extend({
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")
2821
+ fn: z26.string(),
2822
+ num_pins: z26.literal(2).default(2),
2823
+ w: z26.string().default("2.36mm"),
2824
+ h: z26.string().default("1.22mm"),
2825
+ pl: z26.string().default("0.9mm"),
2826
+ pw: z26.string().default("1.2mm"),
2827
+ p: z26.string().default("3.30mm")
2758
2828
  });
2759
2829
  var sod123 = (raw_params) => {
2760
2830
  const parameters = sod_def.parse(raw_params);
2761
2831
  const silkscreenRefText = silkscreenRef(
2762
2832
  0,
2763
- length17.parse(parameters.h) / 4 + 0.4,
2833
+ length18.parse(parameters.h) / 4 + 0.4,
2764
2834
  0.3
2765
2835
  );
2766
2836
  return {
@@ -2800,14 +2870,14 @@ var sodWithoutParsing = (parameters) => {
2800
2870
 
2801
2871
  // src/fn/axial.ts
2802
2872
  import {
2803
- length as length18
2873
+ length as length19
2804
2874
  } from "circuit-json";
2805
- import { z as z26 } from "zod";
2875
+ import { z as z27 } from "zod";
2806
2876
  var axial_def = base_def.extend({
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")
2877
+ fn: z27.string(),
2878
+ p: length19.optional().default("2.54mm"),
2879
+ id: length19.optional().default("0.7mm"),
2880
+ od: length19.optional().default("1.4mm")
2811
2881
  });
2812
2882
  var axial = (raw_params) => {
2813
2883
  const parameters = axial_def.parse(raw_params);
@@ -2840,9 +2910,9 @@ var axial = (raw_params) => {
2840
2910
 
2841
2911
  // src/fn/radial.ts
2842
2912
  import {
2843
- length as length19
2913
+ length as length20
2844
2914
  } from "circuit-json";
2845
- import { z as z27 } from "zod";
2915
+ import { z as z28 } from "zod";
2846
2916
 
2847
2917
  // src/helpers/generateCircleArcs.ts
2848
2918
  var generateCircleArcs = (centerX, centerY, radius, cut, cutHeight, segmentLength = 0.1) => {
@@ -2873,13 +2943,13 @@ var generateCircleArcs = (centerX, centerY, radius, cut, cutHeight, segmentLengt
2873
2943
 
2874
2944
  // src/fn/radial.ts
2875
2945
  var radial_def = base_def.extend({
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()
2946
+ fn: z28.string(),
2947
+ p: length20.optional().default("5mm"),
2948
+ id: length20.optional().default("0.8mm"),
2949
+ od: length20.optional().default("1.6mm"),
2950
+ ceramic: z28.boolean().optional(),
2951
+ electrolytic: z28.boolean().optional(),
2952
+ polarized: z28.boolean().optional()
2883
2953
  });
2884
2954
  var radial = (raw_params) => {
2885
2955
  const parameters = radial_def.parse(raw_params);
@@ -2976,8 +3046,8 @@ var radial = (raw_params) => {
2976
3046
  };
2977
3047
 
2978
3048
  // src/fn/pushbutton.ts
2979
- import { length as length20 } from "circuit-json";
2980
- import { z as z28 } from "zod";
3049
+ import { length as length21 } from "circuit-json";
3050
+ import { z as z29 } from "zod";
2981
3051
 
2982
3052
  // src/helpers/silkscreenpath.ts
2983
3053
  var silkscreenpath = (route, options = {}) => {
@@ -2993,11 +3063,11 @@ var silkscreenpath = (route, options = {}) => {
2993
3063
 
2994
3064
  // src/fn/pushbutton.ts
2995
3065
  var pushbutton_def = base_def.extend({
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)
3066
+ fn: z29.literal("pushbutton"),
3067
+ w: length21.default(4.5),
3068
+ h: length21.default(6.5),
3069
+ id: length21.default(1),
3070
+ od: length21.default(1.2)
3001
3071
  });
3002
3072
  var pushbutton = (raw_params) => {
3003
3073
  const parameters = pushbutton_def.parse(raw_params);
@@ -3044,24 +3114,24 @@ var pushbutton = (raw_params) => {
3044
3114
 
3045
3115
  // src/fn/stampboard.ts
3046
3116
  import {
3047
- length as length21
3117
+ length as length22
3048
3118
  } from "circuit-json";
3049
- import { z as z29 } from "zod";
3119
+ import { z as z30 } from "zod";
3050
3120
  var stampboard_def = base_def.extend({
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"))
3121
+ fn: z30.string(),
3122
+ w: length22.default("22.58mm"),
3123
+ h: length22.optional(),
3124
+ left: length22.optional().default(20),
3125
+ right: length22.optional().default(20),
3126
+ top: length22.optional().default(2),
3127
+ bottom: length22.optional().default(2),
3128
+ p: length22.default(length22.parse("2.54mm")),
3129
+ pw: length22.default(length22.parse("1.6mm")),
3130
+ pl: length22.default(length22.parse("2.4mm")),
3131
+ innerhole: z30.boolean().default(false),
3132
+ innerholeedgedistance: length22.default(length22.parse("1.61mm")),
3133
+ silkscreenlabels: z30.boolean().default(false),
3134
+ silkscreenlabelmargin: length22.default(length22.parse("0.1mm"))
3065
3135
  });
3066
3136
  var getHeight = (parameters) => {
3067
3137
  const params = stampboard_def.parse(parameters);
@@ -3470,22 +3540,22 @@ var stampboard = (raw_params) => {
3470
3540
 
3471
3541
  // src/fn/stampreceiver.ts
3472
3542
  import {
3473
- length as length22
3543
+ length as length23
3474
3544
  } from "circuit-json";
3475
- import { z as z30 } from "zod";
3545
+ import { z as z31 } from "zod";
3476
3546
  var stampreceiver_def = base_def.extend({
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"))
3547
+ fn: z31.string(),
3548
+ w: length23.default("22.58mm"),
3549
+ h: length23.optional(),
3550
+ left: length23.optional().default(20),
3551
+ right: length23.optional().default(20),
3552
+ top: length23.optional().default(2),
3553
+ bottom: length23.optional().default(2),
3554
+ p: length23.default(length23.parse("2.54mm")),
3555
+ pw: length23.default(length23.parse("1.6mm")),
3556
+ pl: length23.default(length23.parse("3.2mm")),
3557
+ innerhole: z31.boolean().default(false),
3558
+ innerholeedgedistance: length23.default(length23.parse("1.61mm"))
3489
3559
  });
3490
3560
  var getHeight2 = (parameters) => {
3491
3561
  const params = stampreceiver_def.parse(parameters);
@@ -3786,20 +3856,20 @@ var lqfp = (parameters) => {
3786
3856
 
3787
3857
  // src/fn/breakoutheaders.ts
3788
3858
  import {
3789
- length as length23
3859
+ length as length24
3790
3860
  } from "circuit-json";
3791
- import { z as z31 } from "zod";
3861
+ import { z as z32 } from "zod";
3792
3862
  var breakoutheaders_def = base_def.extend({
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"))
3863
+ fn: z32.string(),
3864
+ w: length24.default("10mm"),
3865
+ h: length24.optional(),
3866
+ left: length24.optional().default(20),
3867
+ right: length24.optional().default(20),
3868
+ top: length24.optional().default(0),
3869
+ bottom: length24.optional().default(0),
3870
+ p: length24.default(length24.parse("2.54mm")),
3871
+ id: length24.optional().default(length24.parse("1mm")),
3872
+ od: length24.optional().default(length24.parse("1.5mm"))
3803
3873
  });
3804
3874
  var getHeight3 = (parameters) => {
3805
3875
  const params = breakoutheaders_def.parse(parameters);
@@ -3991,9 +4061,9 @@ var breakoutheaders = (raw_params) => {
3991
4061
 
3992
4062
  // src/fn/hc49.ts
3993
4063
  import {
3994
- length as length24
4064
+ length as length25
3995
4065
  } from "circuit-json";
3996
- import { z as z32 } from "zod";
4066
+ import { z as z33 } from "zod";
3997
4067
  var generate_u_curve = (centerX, centerY, radius, direction) => {
3998
4068
  return Array.from({ length: 25 }, (_, i) => {
3999
4069
  const theta = i / 24 * Math.PI - Math.PI / 2;
@@ -4004,12 +4074,12 @@ var generate_u_curve = (centerX, centerY, radius, direction) => {
4004
4074
  });
4005
4075
  };
4006
4076
  var hc49_def = base_def.extend({
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")
4077
+ fn: z33.string(),
4078
+ p: length25.optional().default("4.88mm"),
4079
+ id: length25.optional().default("0.8mm"),
4080
+ od: length25.optional().default("1.5mm"),
4081
+ w: length25.optional().default("5.6mm"),
4082
+ h: length25.optional().default("3.5mm")
4013
4083
  });
4014
4084
  var hc49 = (raw_params) => {
4015
4085
  const parameters = hc49_def.parse(raw_params);
@@ -4050,11 +4120,11 @@ var hc49 = (raw_params) => {
4050
4120
 
4051
4121
  // src/fn/pad.ts
4052
4122
  import "zod";
4053
- import { length as length25 } from "circuit-json";
4123
+ import { length as length26 } from "circuit-json";
4054
4124
  import { mm as mm11 } from "@tscircuit/mm";
4055
4125
  var pad_def = base_def.extend({
4056
- w: length25,
4057
- h: length25
4126
+ w: length26,
4127
+ h: length26
4058
4128
  });
4059
4129
  var pad = (params) => {
4060
4130
  const { w, h } = params;
@@ -4070,7 +4140,7 @@ var pad = (params) => {
4070
4140
  };
4071
4141
 
4072
4142
  // src/fn/to92.ts
4073
- import { z as z34 } from "zod";
4143
+ import { z as z35 } from "zod";
4074
4144
  import "@tscircuit/mm";
4075
4145
 
4076
4146
  // src/helpers/platedHolePill.ts
@@ -4095,15 +4165,15 @@ var platedHolePill = (pn, x, y, holeDiameter, outerWidth, outerHeight) => {
4095
4165
 
4096
4166
  // src/fn/to92.ts
4097
4167
  var to92_def = base_def.extend({
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()
4168
+ fn: z35.string(),
4169
+ num_pins: z35.union([z35.literal(3), z35.literal(2)]).default(3),
4170
+ p: z35.string().default("1.27mm"),
4171
+ id: z35.string().default("0.72mm"),
4172
+ od: z35.string().default("0.95mm"),
4173
+ w: z35.string().default("4.5mm"),
4174
+ h: z35.string().default("4.5mm"),
4175
+ inline: z35.boolean().default(false),
4176
+ string: z35.string().optional()
4107
4177
  });
4108
4178
  var generateSemicircle = (centerX, centerY, radius) => {
4109
4179
  return Array.from({ length: 25 }, (_, i) => {
@@ -4213,22 +4283,22 @@ var to92 = (raw_params) => {
4213
4283
  };
4214
4284
 
4215
4285
  // src/fn/sod523.ts
4216
- import { z as z35 } from "zod";
4217
- import { length as length26 } from "circuit-json";
4286
+ import { z as z36 } from "zod";
4287
+ import { length as length27 } from "circuit-json";
4218
4288
  var sod_def2 = base_def.extend({
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")
4289
+ fn: z36.string(),
4290
+ num_pins: z36.literal(2).default(2),
4291
+ w: z36.string().default("2.15mm"),
4292
+ h: z36.string().default("1.20mm"),
4293
+ pl: z36.string().default("0.5mm"),
4294
+ pw: z36.string().default("0.6mm"),
4295
+ p: z36.string().default("1.4mm")
4226
4296
  });
4227
4297
  var sod523 = (raw_params) => {
4228
4298
  const parameters = sod_def2.parse(raw_params);
4229
4299
  const silkscreenRefText = silkscreenRef(
4230
4300
  0,
4231
- length26.parse(parameters.h),
4301
+ length27.parse(parameters.h),
4232
4302
  0.3
4233
4303
  );
4234
4304
  const silkscreenLine = {
@@ -4237,20 +4307,20 @@ var sod523 = (raw_params) => {
4237
4307
  pcb_component_id: "",
4238
4308
  route: [
4239
4309
  {
4240
- x: length26.parse(parameters.p) / 2,
4241
- y: length26.parse(parameters.h) / 2
4310
+ x: length27.parse(parameters.p) / 2,
4311
+ y: length27.parse(parameters.h) / 2
4242
4312
  },
4243
4313
  {
4244
- x: -length26.parse(parameters.w) / 2 - 0.2,
4245
- y: length26.parse(parameters.h) / 2
4314
+ x: -length27.parse(parameters.w) / 2 - 0.2,
4315
+ y: length27.parse(parameters.h) / 2
4246
4316
  },
4247
4317
  {
4248
- x: -length26.parse(parameters.w) / 2 - 0.2,
4249
- y: -length26.parse(parameters.h) / 2
4318
+ x: -length27.parse(parameters.w) / 2 - 0.2,
4319
+ y: -length27.parse(parameters.h) / 2
4250
4320
  },
4251
4321
  {
4252
- x: length26.parse(parameters.p) / 2,
4253
- y: -length26.parse(parameters.h) / 2
4322
+ x: length27.parse(parameters.p) / 2,
4323
+ y: -length27.parse(parameters.h) / 2
4254
4324
  }
4255
4325
  ],
4256
4326
  stroke_width: 0.1,
@@ -4338,22 +4408,22 @@ var sop8 = (raw_params) => {
4338
4408
  };
4339
4409
 
4340
4410
  // src/fn/sod80.ts
4341
- import { z as z36 } from "zod";
4342
- import { length as length27 } from "circuit-json";
4411
+ import { z as z37 } from "zod";
4412
+ import { length as length28 } from "circuit-json";
4343
4413
  var sod80_def = base_def.extend({
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")
4414
+ fn: z37.string(),
4415
+ num_pins: z37.literal(2).default(2),
4416
+ w: z37.string().default("5.0mm"),
4417
+ h: z37.string().default("2.30mm"),
4418
+ pl: z37.string().default("1.25mm"),
4419
+ pw: z37.string().default("2mm"),
4420
+ p: z37.string().default("3.75mm")
4351
4421
  });
4352
4422
  var sod80 = (raw_params) => {
4353
4423
  const parameters = sod80_def.parse(raw_params);
4354
4424
  const silkscreenRefText = silkscreenRef(
4355
4425
  0,
4356
- length27.parse(parameters.h) / 2 + 1,
4426
+ length28.parse(parameters.h) / 2 + 1,
4357
4427
  0.3
4358
4428
  );
4359
4429
  const silkscreenLine = {
@@ -4362,20 +4432,20 @@ var sod80 = (raw_params) => {
4362
4432
  pcb_component_id: "",
4363
4433
  route: [
4364
4434
  {
4365
- x: length27.parse(parameters.p) / 2 + 0.5,
4366
- y: length27.parse(parameters.h) / 2 + 0.5
4435
+ x: length28.parse(parameters.p) / 2 + 0.5,
4436
+ y: length28.parse(parameters.h) / 2 + 0.5
4367
4437
  },
4368
4438
  {
4369
- x: -length27.parse(parameters.w) / 2 - 0.5,
4370
- y: length27.parse(parameters.h) / 2 + 0.5
4439
+ x: -length28.parse(parameters.w) / 2 - 0.5,
4440
+ y: length28.parse(parameters.h) / 2 + 0.5
4371
4441
  },
4372
4442
  {
4373
- x: -length27.parse(parameters.w) / 2 - 0.5,
4374
- y: -length27.parse(parameters.h) / 2 - 0.5
4443
+ x: -length28.parse(parameters.w) / 2 - 0.5,
4444
+ y: -length28.parse(parameters.h) / 2 - 0.5
4375
4445
  },
4376
4446
  {
4377
- x: length27.parse(parameters.p) / 2 + 0.5,
4378
- y: -length27.parse(parameters.h) / 2 - 0.5
4447
+ x: length28.parse(parameters.p) / 2 + 0.5,
4448
+ y: -length28.parse(parameters.h) / 2 - 0.5
4379
4449
  }
4380
4450
  ],
4381
4451
  stroke_width: 0.1,
@@ -4414,22 +4484,22 @@ var sod80WithoutParsing = (parameters) => {
4414
4484
  };
4415
4485
 
4416
4486
  // src/fn/sod123w.ts
4417
- import { z as z37 } from "zod";
4418
- import { length as length28 } from "circuit-json";
4487
+ import { z as z38 } from "zod";
4488
+ import { length as length29 } from "circuit-json";
4419
4489
  var sod_def3 = base_def.extend({
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")
4490
+ fn: z38.string(),
4491
+ num_pins: z38.literal(2).default(2),
4492
+ w: z38.string().default("4.4mm"),
4493
+ h: z38.string().default("2.1mm"),
4494
+ pl: z38.string().default("1.2mm"),
4495
+ pw: z38.string().default("1.2mm"),
4496
+ p: z38.string().default("2.9mm")
4427
4497
  });
4428
4498
  var sod123w = (raw_params) => {
4429
4499
  const parameters = sod_def3.parse(raw_params);
4430
4500
  const silkscreenRefText = silkscreenRef(
4431
4501
  0,
4432
- length28.parse(parameters.h) - 0.5,
4502
+ length29.parse(parameters.h) - 0.5,
4433
4503
  0.3
4434
4504
  );
4435
4505
  const silkscreenLine = {
@@ -4438,20 +4508,20 @@ var sod123w = (raw_params) => {
4438
4508
  pcb_component_id: "",
4439
4509
  route: [
4440
4510
  {
4441
- x: length28.parse(parameters.p) / 2,
4442
- y: length28.parse(parameters.h) / 2
4511
+ x: length29.parse(parameters.p) / 2,
4512
+ y: length29.parse(parameters.h) / 2
4443
4513
  },
4444
4514
  {
4445
- x: -length28.parse(parameters.w) / 2 - 0.2,
4446
- y: length28.parse(parameters.h) / 2
4515
+ x: -length29.parse(parameters.w) / 2 - 0.2,
4516
+ y: length29.parse(parameters.h) / 2
4447
4517
  },
4448
4518
  {
4449
- x: -length28.parse(parameters.w) / 2 - 0.2,
4450
- y: -length28.parse(parameters.h) / 2
4519
+ x: -length29.parse(parameters.w) / 2 - 0.2,
4520
+ y: -length29.parse(parameters.h) / 2
4451
4521
  },
4452
4522
  {
4453
- x: length28.parse(parameters.p) / 2,
4454
- y: -length28.parse(parameters.h) / 2
4523
+ x: length29.parse(parameters.p) / 2,
4524
+ y: -length29.parse(parameters.h) / 2
4455
4525
  }
4456
4526
  ],
4457
4527
  stroke_width: 0.1,
@@ -4493,22 +4563,22 @@ var sodWithoutParsing3 = (parameters) => {
4493
4563
  };
4494
4564
 
4495
4565
  // src/fn/sod323.ts
4496
- import { z as z38 } from "zod";
4497
- import { length as length29 } from "circuit-json";
4566
+ import { z as z39 } from "zod";
4567
+ import { length as length30 } from "circuit-json";
4498
4568
  var sod_def4 = base_def.extend({
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")
4569
+ fn: z39.string(),
4570
+ num_pins: z39.literal(2).default(2),
4571
+ w: z39.string().default("3.30mm"),
4572
+ h: z39.string().default("1.80mm"),
4573
+ pl: z39.string().default("0.60mm"),
4574
+ pw: z39.string().default("0.45mm"),
4575
+ p: z39.string().default("2.1mm")
4506
4576
  });
4507
4577
  var sod323 = (raw_params) => {
4508
4578
  const parameters = sod_def4.parse(raw_params);
4509
4579
  const silkscreenRefText = silkscreenRef(
4510
4580
  0,
4511
- length29.parse(parameters.h) - 0.5,
4581
+ length30.parse(parameters.h) - 0.5,
4512
4582
  0.3
4513
4583
  );
4514
4584
  const silkscreenLine = {
@@ -4517,20 +4587,20 @@ var sod323 = (raw_params) => {
4517
4587
  pcb_component_id: "",
4518
4588
  route: [
4519
4589
  {
4520
- x: length29.parse(parameters.p) / 2,
4521
- y: length29.parse(parameters.h) / 2
4590
+ x: length30.parse(parameters.p) / 2,
4591
+ y: length30.parse(parameters.h) / 2
4522
4592
  },
4523
4593
  {
4524
- x: -length29.parse(parameters.w) / 2,
4525
- y: length29.parse(parameters.h) / 2
4594
+ x: -length30.parse(parameters.w) / 2,
4595
+ y: length30.parse(parameters.h) / 2
4526
4596
  },
4527
4597
  {
4528
- x: -length29.parse(parameters.w) / 2,
4529
- y: -length29.parse(parameters.h) / 2
4598
+ x: -length30.parse(parameters.w) / 2,
4599
+ y: -length30.parse(parameters.h) / 2
4530
4600
  },
4531
4601
  {
4532
- x: length29.parse(parameters.p) / 2,
4533
- y: -length29.parse(parameters.h) / 2
4602
+ x: length30.parse(parameters.p) / 2,
4603
+ y: -length30.parse(parameters.h) / 2
4534
4604
  }
4535
4605
  ],
4536
4606
  stroke_width: 0.1,
@@ -4572,22 +4642,22 @@ var sodWithoutParsing4 = (parameters) => {
4572
4642
  };
4573
4643
 
4574
4644
  // src/fn/sod923.ts
4575
- import { z as z39 } from "zod";
4576
- import { length as length30 } from "circuit-json";
4645
+ import { z as z40 } from "zod";
4646
+ import { length as length31 } from "circuit-json";
4577
4647
  var sod_def5 = base_def.extend({
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")
4648
+ fn: z40.string(),
4649
+ num_pins: z40.literal(2).default(2),
4650
+ w: z40.string().default("1.4mm"),
4651
+ h: z40.string().default("0.9mm"),
4652
+ pl: z40.string().default("0.36mm"),
4653
+ pw: z40.string().default("0.25mm"),
4654
+ p: z40.string().default("0.85mm")
4585
4655
  });
4586
4656
  var sod923 = (raw_params) => {
4587
4657
  const parameters = sod_def5.parse(raw_params);
4588
4658
  const silkscreenRefText = silkscreenRef(
4589
4659
  0,
4590
- length30.parse(parameters.h),
4660
+ length31.parse(parameters.h),
4591
4661
  0.3
4592
4662
  );
4593
4663
  const silkscreenLine = {
@@ -4596,20 +4666,20 @@ var sod923 = (raw_params) => {
4596
4666
  pcb_component_id: "",
4597
4667
  route: [
4598
4668
  {
4599
- x: length30.parse(parameters.p) / 2 + 0.15,
4600
- y: length30.parse(parameters.h) / 2
4669
+ x: length31.parse(parameters.p) / 2 + 0.15,
4670
+ y: length31.parse(parameters.h) / 2
4601
4671
  },
4602
4672
  {
4603
- x: -length30.parse(parameters.w) / 2 - 0.15,
4604
- y: length30.parse(parameters.h) / 2
4673
+ x: -length31.parse(parameters.w) / 2 - 0.15,
4674
+ y: length31.parse(parameters.h) / 2
4605
4675
  },
4606
4676
  {
4607
- x: -length30.parse(parameters.w) / 2 - 0.15,
4608
- y: -length30.parse(parameters.h) / 2
4677
+ x: -length31.parse(parameters.w) / 2 - 0.15,
4678
+ y: -length31.parse(parameters.h) / 2
4609
4679
  },
4610
4680
  {
4611
- x: length30.parse(parameters.p) / 2 + 0.15,
4612
- y: -length30.parse(parameters.h) / 2
4681
+ x: length31.parse(parameters.p) / 2 + 0.15,
4682
+ y: -length31.parse(parameters.h) / 2
4613
4683
  }
4614
4684
  ],
4615
4685
  stroke_width: 0.1,
@@ -4652,22 +4722,22 @@ var sodWithoutParsing5 = (parameters) => {
4652
4722
  };
4653
4723
 
4654
4724
  // src/fn/sod882.ts
4655
- import { z as z40 } from "zod";
4656
- import { length as length31 } from "circuit-json";
4725
+ import { z as z41 } from "zod";
4726
+ import { length as length32 } from "circuit-json";
4657
4727
  var sod_def6 = base_def.extend({
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")
4728
+ fn: z41.string(),
4729
+ num_pins: z41.literal(2).default(2),
4730
+ w: z41.string().default("1.3mm"),
4731
+ h: z41.string().default("0.9mm"),
4732
+ pl: z41.string().default("0.4mm"),
4733
+ pw: z41.string().default("0.7mm"),
4734
+ p: z41.string().default("0.7mm")
4665
4735
  });
4666
4736
  var sod882 = (raw_params) => {
4667
4737
  const parameters = sod_def6.parse(raw_params);
4668
4738
  const silkscreenRefText = silkscreenRef(
4669
4739
  0,
4670
- length31.parse(parameters.h) + 0.1,
4740
+ length32.parse(parameters.h) + 0.1,
4671
4741
  0.3
4672
4742
  );
4673
4743
  const silkscreenLine = {
@@ -4676,20 +4746,20 @@ var sod882 = (raw_params) => {
4676
4746
  pcb_component_id: "",
4677
4747
  route: [
4678
4748
  {
4679
- x: length31.parse(parameters.p) / 2 + 0.2,
4680
- y: length31.parse(parameters.h) / 2 + 0.2
4749
+ x: length32.parse(parameters.p) / 2 + 0.2,
4750
+ y: length32.parse(parameters.h) / 2 + 0.2
4681
4751
  },
4682
4752
  {
4683
- x: -length31.parse(parameters.w) / 2 - 0.2,
4684
- y: length31.parse(parameters.h) / 2 + 0.2
4753
+ x: -length32.parse(parameters.w) / 2 - 0.2,
4754
+ y: length32.parse(parameters.h) / 2 + 0.2
4685
4755
  },
4686
4756
  {
4687
- x: -length31.parse(parameters.w) / 2 - 0.2,
4688
- y: -length31.parse(parameters.h) / 2 - 0.2
4757
+ x: -length32.parse(parameters.w) / 2 - 0.2,
4758
+ y: -length32.parse(parameters.h) / 2 - 0.2
4689
4759
  },
4690
4760
  {
4691
- x: length31.parse(parameters.p) / 2 + 0.2,
4692
- y: -length31.parse(parameters.h) / 2 - 0.2
4761
+ x: length32.parse(parameters.p) / 2 + 0.2,
4762
+ y: -length32.parse(parameters.h) / 2 - 0.2
4693
4763
  }
4694
4764
  ],
4695
4765
  stroke_width: 0.1,
@@ -4732,22 +4802,22 @@ var sodWithoutParsing6 = (parameters) => {
4732
4802
  };
4733
4803
 
4734
4804
  // src/fn/sod323f.ts
4735
- import { z as z41 } from "zod";
4736
- import { length as length32 } from "circuit-json";
4805
+ import { z as z42 } from "zod";
4806
+ import { length as length33 } from "circuit-json";
4737
4807
  var sod_def7 = base_def.extend({
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")
4808
+ fn: z42.string(),
4809
+ num_pins: z42.literal(2).default(2),
4810
+ w: z42.string().default("3,05mm"),
4811
+ h: z42.string().default("1.65mm"),
4812
+ pl: z42.string().default("0.6mm"),
4813
+ pw: z42.string().default("0.6mm"),
4814
+ pad_spacing: z42.string().default("2.2mm")
4745
4815
  });
4746
4816
  var sod323f = (raw_params) => {
4747
4817
  const parameters = sod_def7.parse(raw_params);
4748
4818
  const silkscreenRefText = silkscreenRef(
4749
4819
  0,
4750
- length32.parse(parameters.h),
4820
+ length33.parse(parameters.h),
4751
4821
  0.3
4752
4822
  );
4753
4823
  const silkscreenLine = {
@@ -4756,20 +4826,20 @@ var sod323f = (raw_params) => {
4756
4826
  pcb_component_id: "",
4757
4827
  route: [
4758
4828
  {
4759
- x: length32.parse(parameters.pad_spacing) / 2,
4760
- y: length32.parse(parameters.h) / 2
4829
+ x: length33.parse(parameters.pad_spacing) / 2,
4830
+ y: length33.parse(parameters.h) / 2
4761
4831
  },
4762
4832
  {
4763
- x: -length32.parse(parameters.w) / 2 - 0.2,
4764
- y: length32.parse(parameters.h) / 2
4833
+ x: -length33.parse(parameters.w) / 2 - 0.2,
4834
+ y: length33.parse(parameters.h) / 2
4765
4835
  },
4766
4836
  {
4767
- x: -length32.parse(parameters.w) / 2 - 0.2,
4768
- y: -length32.parse(parameters.h) / 2
4837
+ x: -length33.parse(parameters.w) / 2 - 0.2,
4838
+ y: -length33.parse(parameters.h) / 2
4769
4839
  },
4770
4840
  {
4771
- x: length32.parse(parameters.pad_spacing) / 2,
4772
- y: -length32.parse(parameters.h) / 2
4841
+ x: length33.parse(parameters.pad_spacing) / 2,
4842
+ y: -length33.parse(parameters.h) / 2
4773
4843
  }
4774
4844
  ],
4775
4845
  stroke_width: 0.1,
@@ -4812,22 +4882,22 @@ var sodWithoutParsing7 = (parameters) => {
4812
4882
  };
4813
4883
 
4814
4884
  // src/fn/sod123f.ts
4815
- import { z as z42 } from "zod";
4816
- import { length as length33 } from "circuit-json";
4885
+ import { z as z43 } from "zod";
4886
+ import { length as length34 } from "circuit-json";
4817
4887
  var sod_def8 = base_def.extend({
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")
4888
+ fn: z43.string(),
4889
+ num_pins: z43.literal(2).default(2),
4890
+ w: z43.string().default("4.4mm"),
4891
+ h: z43.string().default("2.1mm"),
4892
+ pl: z43.string().default("1.2mm"),
4893
+ pw: z43.string().default("1.2mm"),
4894
+ p: z43.string().default("2.9mm")
4825
4895
  });
4826
4896
  var sod123f = (raw_params) => {
4827
4897
  const parameters = sod_def8.parse(raw_params);
4828
4898
  const silkscreenRefText = silkscreenRef(
4829
4899
  0,
4830
- length33.parse(parameters.h),
4900
+ length34.parse(parameters.h),
4831
4901
  0.3
4832
4902
  );
4833
4903
  const silkscreenLine = {
@@ -4836,20 +4906,20 @@ var sod123f = (raw_params) => {
4836
4906
  pcb_component_id: "",
4837
4907
  route: [
4838
4908
  {
4839
- x: length33.parse(parameters.p) / 2,
4840
- y: length33.parse(parameters.h) / 2
4909
+ x: length34.parse(parameters.p) / 2,
4910
+ y: length34.parse(parameters.h) / 2
4841
4911
  },
4842
4912
  {
4843
- x: -length33.parse(parameters.w) / 2 - 0.2,
4844
- y: length33.parse(parameters.h) / 2
4913
+ x: -length34.parse(parameters.w) / 2 - 0.2,
4914
+ y: length34.parse(parameters.h) / 2
4845
4915
  },
4846
4916
  {
4847
- x: -length33.parse(parameters.w) / 2 - 0.2,
4848
- y: -length33.parse(parameters.h) / 2
4917
+ x: -length34.parse(parameters.w) / 2 - 0.2,
4918
+ y: -length34.parse(parameters.h) / 2
4849
4919
  },
4850
4920
  {
4851
- x: length33.parse(parameters.p) / 2,
4852
- y: -length33.parse(parameters.h) / 2
4921
+ x: length34.parse(parameters.p) / 2,
4922
+ y: -length34.parse(parameters.h) / 2
4853
4923
  }
4854
4924
  ],
4855
4925
  stroke_width: 0.1,
@@ -4892,22 +4962,22 @@ var sodWithoutParsing8 = (parameters) => {
4892
4962
  };
4893
4963
 
4894
4964
  // src/fn/sod123fl.ts
4895
- import { z as z43 } from "zod";
4896
- import { length as length34 } from "circuit-json";
4965
+ import { z as z44 } from "zod";
4966
+ import { length as length35 } from "circuit-json";
4897
4967
  var sod123FL_def = base_def.extend({
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")
4968
+ fn: z44.string(),
4969
+ num_pins: z44.literal(2).default(2),
4970
+ w: z44.string().default("4.4mm"),
4971
+ h: z44.string().default("2.1mm"),
4972
+ pl: z44.string().default("0.91mm"),
4973
+ pw: z44.string().default("1.22mm"),
4974
+ p: z44.string().default("3.146mm")
4905
4975
  });
4906
4976
  var sod123fl = (raw_params) => {
4907
4977
  const parameters = sod123FL_def.parse(raw_params);
4908
4978
  const silkscreenRefText = silkscreenRef(
4909
4979
  0,
4910
- length34.parse(parameters.h),
4980
+ length35.parse(parameters.h),
4911
4981
  0.3
4912
4982
  );
4913
4983
  const silkscreenLine = {
@@ -4916,20 +4986,20 @@ var sod123fl = (raw_params) => {
4916
4986
  pcb_component_id: "",
4917
4987
  route: [
4918
4988
  {
4919
- x: length34.parse(parameters.p) / 2,
4920
- y: length34.parse(parameters.h) / 2
4989
+ x: length35.parse(parameters.p) / 2,
4990
+ y: length35.parse(parameters.h) / 2
4921
4991
  },
4922
4992
  {
4923
- x: -length34.parse(parameters.w) / 2 - 0.2,
4924
- y: length34.parse(parameters.h) / 2
4993
+ x: -length35.parse(parameters.w) / 2 - 0.2,
4994
+ y: length35.parse(parameters.h) / 2
4925
4995
  },
4926
4996
  {
4927
- x: -length34.parse(parameters.w) / 2 - 0.2,
4928
- y: -length34.parse(parameters.h) / 2
4997
+ x: -length35.parse(parameters.w) / 2 - 0.2,
4998
+ y: -length35.parse(parameters.h) / 2
4929
4999
  },
4930
5000
  {
4931
- x: length34.parse(parameters.p) / 2,
4932
- y: -length34.parse(parameters.h) / 2
5001
+ x: length35.parse(parameters.p) / 2,
5002
+ y: -length35.parse(parameters.h) / 2
4933
5003
  }
4934
5004
  ],
4935
5005
  stroke_width: 0.1,
@@ -4972,22 +5042,22 @@ var sodWithoutParsing9 = (parameters) => {
4972
5042
  };
4973
5043
 
4974
5044
  // src/fn/sod723.ts
4975
- import { z as z44 } from "zod";
4976
- import { length as length35 } from "circuit-json";
5045
+ import { z as z45 } from "zod";
5046
+ import { length as length36 } from "circuit-json";
4977
5047
  var sod_def9 = base_def.extend({
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")
5048
+ fn: z45.string(),
5049
+ num_pins: z45.literal(2).default(2),
5050
+ w: z45.string().default("1.80mm"),
5051
+ h: z45.string().default("1.00mm"),
5052
+ pl: z45.string().default("0.66mm"),
5053
+ pw: z45.string().default("0.5mm"),
5054
+ p: z45.string().default("0.8mm")
4985
5055
  });
4986
5056
  var sod723 = (raw_params) => {
4987
5057
  const parameters = sod_def9.parse(raw_params);
4988
5058
  const silkscreenRefText = silkscreenRef(
4989
5059
  0,
4990
- length35.parse(parameters.h),
5060
+ length36.parse(parameters.h),
4991
5061
  0.3
4992
5062
  );
4993
5063
  const silkscreenLine = {
@@ -4996,20 +5066,20 @@ var sod723 = (raw_params) => {
4996
5066
  pcb_component_id: "",
4997
5067
  route: [
4998
5068
  {
4999
- x: length35.parse(parameters.p) / 2,
5000
- y: length35.parse(parameters.h) / 2
5069
+ x: length36.parse(parameters.p) / 2,
5070
+ y: length36.parse(parameters.h) / 2
5001
5071
  },
5002
5072
  {
5003
- x: -length35.parse(parameters.w) / 2 - 0.1,
5004
- y: length35.parse(parameters.h) / 2
5073
+ x: -length36.parse(parameters.w) / 2 - 0.1,
5074
+ y: length36.parse(parameters.h) / 2
5005
5075
  },
5006
5076
  {
5007
- x: -length35.parse(parameters.w) / 2 - 0.1,
5008
- y: -length35.parse(parameters.h) / 2
5077
+ x: -length36.parse(parameters.w) / 2 - 0.1,
5078
+ y: -length36.parse(parameters.h) / 2
5009
5079
  },
5010
5080
  {
5011
- x: length35.parse(parameters.p) / 2,
5012
- y: -length35.parse(parameters.h) / 2
5081
+ x: length36.parse(parameters.p) / 2,
5082
+ y: -length36.parse(parameters.h) / 2
5013
5083
  }
5014
5084
  ],
5015
5085
  stroke_width: 0.1,
@@ -5052,22 +5122,22 @@ var sodWithoutParsing10 = (parameters) => {
5052
5122
  };
5053
5123
 
5054
5124
  // src/fn/sod128.ts
5055
- import { z as z45 } from "zod";
5056
- import { length as length36 } from "circuit-json";
5125
+ import { z as z46 } from "zod";
5126
+ import { length as length37 } from "circuit-json";
5057
5127
  var sod_def10 = base_def.extend({
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")
5128
+ fn: z46.string(),
5129
+ num_pins: z46.literal(2).default(2),
5130
+ w: z46.string().default("6.2mm"),
5131
+ h: z46.string().default("3.4mm"),
5132
+ pl: z46.string().default("1.4mm"),
5133
+ pw: z46.string().default("2.1mm"),
5134
+ p: z46.string().default("4.4mm")
5065
5135
  });
5066
5136
  var sod128 = (raw_params) => {
5067
5137
  const parameters = sod_def10.parse(raw_params);
5068
5138
  const silkscreenRefText = silkscreenRef(
5069
5139
  0,
5070
- length36.parse(parameters.h) / 2 + 0.4,
5140
+ length37.parse(parameters.h) / 2 + 0.4,
5071
5141
  0.3
5072
5142
  );
5073
5143
  const silkscreenLine = {
@@ -5076,20 +5146,20 @@ var sod128 = (raw_params) => {
5076
5146
  pcb_component_id: "",
5077
5147
  route: [
5078
5148
  {
5079
- x: length36.parse(parameters.p) / 2,
5080
- y: length36.parse(parameters.h) / 2
5149
+ x: length37.parse(parameters.p) / 2,
5150
+ y: length37.parse(parameters.h) / 2
5081
5151
  },
5082
5152
  {
5083
- x: -length36.parse(parameters.w) / 2 - 0.2,
5084
- y: length36.parse(parameters.h) / 2
5153
+ x: -length37.parse(parameters.w) / 2 - 0.2,
5154
+ y: length37.parse(parameters.h) / 2
5085
5155
  },
5086
5156
  {
5087
- x: -length36.parse(parameters.w) / 2 - 0.2,
5088
- y: -length36.parse(parameters.h) / 2
5157
+ x: -length37.parse(parameters.w) / 2 - 0.2,
5158
+ y: -length37.parse(parameters.h) / 2
5089
5159
  },
5090
5160
  {
5091
- x: length36.parse(parameters.p) / 2,
5092
- y: -length36.parse(parameters.h) / 2
5161
+ x: length37.parse(parameters.p) / 2,
5162
+ y: -length37.parse(parameters.h) / 2
5093
5163
  }
5094
5164
  ],
5095
5165
  stroke_width: 0.1,
@@ -5132,29 +5202,29 @@ var sodWithoutParsing11 = (parameters) => {
5132
5202
  };
5133
5203
 
5134
5204
  // src/fn/sot89.ts
5135
- import { z as z46 } from "zod";
5205
+ import { z as z47 } from "zod";
5136
5206
  var sot89_def = base_def.extend({
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()
5207
+ fn: z47.string(),
5208
+ num_pins: z47.union([z47.literal(3), z47.literal(5)]).default(3),
5209
+ w: z47.string().default("4.20mm"),
5210
+ h: z47.string().default("4.80mm"),
5211
+ pl: z47.string().default("1.3mm"),
5212
+ pw: z47.string().default("0.9mm"),
5213
+ p: z47.string().default("1.5mm"),
5214
+ string: z47.string().optional()
5145
5215
  });
5146
5216
  var sot89_3 = (parameters) => {
5147
5217
  const pads = [];
5148
5218
  const padGap = Number.parseFloat(parameters.p);
5149
5219
  const padWidth = Number.parseFloat(parameters.pw);
5150
- const length60 = Number.parseFloat(parameters.w);
5220
+ const length61 = Number.parseFloat(parameters.w);
5151
5221
  const padHeight = Number.parseFloat(parameters.pl);
5152
5222
  const centerExtra = 0.175;
5153
5223
  const outerPadXShift = (padHeight - (padHeight + centerExtra)) / 2;
5154
5224
  pads.push(
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)
5225
+ rectpad(1, -length61 / 2 + outerPadXShift, padGap, padHeight, padWidth),
5226
+ rectpad(2, -length61 / 2, 0, padHeight + centerExtra, padWidth),
5227
+ rectpad(3, -length61 / 2 + outerPadXShift, -padGap, padHeight, padWidth)
5158
5228
  );
5159
5229
  const silkscreenRefText = silkscreenRef(0, 0, 0.3);
5160
5230
  const width = Number.parseFloat(parameters.w) / 2 - 1;
@@ -5194,7 +5264,7 @@ var sot89_5 = (parameters) => {
5194
5264
  const pads = [];
5195
5265
  const padGap = Number.parseFloat(parameters.p);
5196
5266
  const padWidth = Number.parseFloat(parameters.pw);
5197
- const length60 = Number.parseFloat(parameters.w);
5267
+ const length61 = Number.parseFloat(parameters.w);
5198
5268
  pads.push(
5199
5269
  rectpad(1, -1.85, -1.5, 1.5, 0.7),
5200
5270
  rectpad(2, -1.85, 1.5, 1.5, 0.7),
@@ -5262,18 +5332,18 @@ var sot89 = (raw_params) => {
5262
5332
 
5263
5333
  // src/fn/to220.ts
5264
5334
  import {
5265
- length as length37
5335
+ length as length38
5266
5336
  } from "circuit-json";
5267
- import { z as z47 } from "zod";
5337
+ import { z as z48 } from "zod";
5268
5338
  var to220_def = base_def.extend({
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()
5339
+ fn: z48.string(),
5340
+ p: length38.optional().default("5.0mm"),
5341
+ id: length38.optional().default("1.0mm"),
5342
+ od: length38.optional().default("1.9mm"),
5343
+ w: length38.optional().default("13mm"),
5344
+ h: length38.optional().default("7mm"),
5345
+ num_pins: z48.number().optional(),
5346
+ string: z48.string().optional()
5277
5347
  });
5278
5348
  var to220 = (raw_params) => {
5279
5349
  const parameters = to220_def.parse(raw_params);
@@ -5353,22 +5423,22 @@ var to220 = (raw_params) => {
5353
5423
  };
5354
5424
 
5355
5425
  // src/fn/minimelf.ts
5356
- import { z as z48 } from "zod";
5357
- import { length as length38 } from "circuit-json";
5426
+ import { z as z49 } from "zod";
5427
+ import { length as length39 } from "circuit-json";
5358
5428
  var minimelf_def = base_def.extend({
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")
5429
+ fn: z49.string(),
5430
+ num_pins: z49.literal(2).default(2),
5431
+ w: z49.string().default("5.40mm"),
5432
+ h: z49.string().default("2.30mm"),
5433
+ pl: z49.string().default("1.30mm"),
5434
+ pw: z49.string().default("1.70mm"),
5435
+ p: z49.string().default("3.5mm")
5366
5436
  });
5367
5437
  var minimelf = (raw_params) => {
5368
5438
  const parameters = minimelf_def.parse(raw_params);
5369
5439
  const silkscreenRefText = silkscreenRef(
5370
5440
  0,
5371
- length38.parse(parameters.h) / 2 + 0.4,
5441
+ length39.parse(parameters.h) / 2 + 0.4,
5372
5442
  0.3
5373
5443
  );
5374
5444
  const silkscreenLine = {
@@ -5377,20 +5447,20 @@ var minimelf = (raw_params) => {
5377
5447
  pcb_component_id: "",
5378
5448
  route: [
5379
5449
  {
5380
- x: length38.parse(parameters.p) / 2,
5381
- y: length38.parse(parameters.h) / 2
5450
+ x: length39.parse(parameters.p) / 2,
5451
+ y: length39.parse(parameters.h) / 2
5382
5452
  },
5383
5453
  {
5384
- x: -length38.parse(parameters.w) / 2,
5385
- y: length38.parse(parameters.h) / 2
5454
+ x: -length39.parse(parameters.w) / 2,
5455
+ y: length39.parse(parameters.h) / 2
5386
5456
  },
5387
5457
  {
5388
- x: -length38.parse(parameters.w) / 2,
5389
- y: -length38.parse(parameters.h) / 2
5458
+ x: -length39.parse(parameters.w) / 2,
5459
+ y: -length39.parse(parameters.h) / 2
5390
5460
  },
5391
5461
  {
5392
- x: length38.parse(parameters.p) / 2,
5393
- y: -length38.parse(parameters.h) / 2
5462
+ x: length39.parse(parameters.p) / 2,
5463
+ y: -length39.parse(parameters.h) / 2
5394
5464
  }
5395
5465
  ],
5396
5466
  stroke_width: 0.1,
@@ -5429,22 +5499,22 @@ var miniMelfWithoutParsing = (parameters) => {
5429
5499
  };
5430
5500
 
5431
5501
  // src/fn/sod882d.ts
5432
- import { z as z49 } from "zod";
5433
- import { length as length39 } from "circuit-json";
5502
+ import { z as z50 } from "zod";
5503
+ import { length as length40 } from "circuit-json";
5434
5504
  var sod_def11 = base_def.extend({
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")
5505
+ fn: z50.string(),
5506
+ num_pins: z50.literal(2).default(2),
5507
+ w: z50.string().default("1.90mm"),
5508
+ h: z50.string().default("1.33mm"),
5509
+ pl: z50.string().default("0.5mm"),
5510
+ pw: z50.string().default("0.7mm"),
5511
+ p: z50.string().default("0.8mm")
5442
5512
  });
5443
5513
  var sod882d = (raw_params) => {
5444
5514
  const parameters = sod_def11.parse(raw_params);
5445
5515
  const silkscreenRefText = silkscreenRef(
5446
5516
  0,
5447
- length39.parse(parameters.h) + 0.1,
5517
+ length40.parse(parameters.h) + 0.1,
5448
5518
  0.3
5449
5519
  );
5450
5520
  const silkscreenLine = {
@@ -5453,20 +5523,20 @@ var sod882d = (raw_params) => {
5453
5523
  pcb_component_id: "",
5454
5524
  route: [
5455
5525
  {
5456
- x: length39.parse(parameters.p) / 2 + 0.1,
5457
- y: length39.parse(parameters.h) / 2
5526
+ x: length40.parse(parameters.p) / 2 + 0.1,
5527
+ y: length40.parse(parameters.h) / 2
5458
5528
  },
5459
5529
  {
5460
- x: -length39.parse(parameters.w) / 2,
5461
- y: length39.parse(parameters.h) / 2
5530
+ x: -length40.parse(parameters.w) / 2,
5531
+ y: length40.parse(parameters.h) / 2
5462
5532
  },
5463
5533
  {
5464
- x: -length39.parse(parameters.w) / 2,
5465
- y: -length39.parse(parameters.h) / 2
5534
+ x: -length40.parse(parameters.w) / 2,
5535
+ y: -length40.parse(parameters.h) / 2
5466
5536
  },
5467
5537
  {
5468
- x: length39.parse(parameters.p) / 2 + 0.1,
5469
- y: -length39.parse(parameters.h) / 2
5538
+ x: length40.parse(parameters.p) / 2 + 0.1,
5539
+ y: -length40.parse(parameters.h) / 2
5470
5540
  }
5471
5541
  ],
5472
5542
  stroke_width: 0.1,
@@ -5509,22 +5579,22 @@ var sodWithoutParsing12 = (parameters) => {
5509
5579
  };
5510
5580
 
5511
5581
  // src/fn/melf.ts
5512
- import { z as z50 } from "zod";
5513
- import { length as length40 } from "circuit-json";
5582
+ import { z as z51 } from "zod";
5583
+ import { length as length41 } from "circuit-json";
5514
5584
  var melf_def = base_def.extend({
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")
5585
+ fn: z51.string(),
5586
+ num_pins: z51.literal(2).default(2),
5587
+ w: z51.string().default("7.0mm"),
5588
+ h: z51.string().default("3.35mm"),
5589
+ pl: z51.string().default("1.50mm"),
5590
+ pw: z51.string().default("2.70mm"),
5591
+ p: z51.string().default("4.8mm")
5522
5592
  });
5523
5593
  var melf = (raw_params) => {
5524
5594
  const parameters = melf_def.parse(raw_params);
5525
5595
  const silkscreenRefText = silkscreenRef(
5526
5596
  0,
5527
- length40.parse(parameters.h),
5597
+ length41.parse(parameters.h),
5528
5598
  0.3
5529
5599
  );
5530
5600
  const silkscreenLine = {
@@ -5533,20 +5603,20 @@ var melf = (raw_params) => {
5533
5603
  pcb_component_id: "",
5534
5604
  route: [
5535
5605
  {
5536
- x: length40.parse(parameters.p) / 2,
5537
- y: length40.parse(parameters.h) / 2
5606
+ x: length41.parse(parameters.p) / 2,
5607
+ y: length41.parse(parameters.h) / 2
5538
5608
  },
5539
5609
  {
5540
- x: -length40.parse(parameters.w) / 2,
5541
- y: length40.parse(parameters.h) / 2
5610
+ x: -length41.parse(parameters.w) / 2,
5611
+ y: length41.parse(parameters.h) / 2
5542
5612
  },
5543
5613
  {
5544
- x: -length40.parse(parameters.w) / 2,
5545
- y: -length40.parse(parameters.h) / 2
5614
+ x: -length41.parse(parameters.w) / 2,
5615
+ y: -length41.parse(parameters.h) / 2
5546
5616
  },
5547
5617
  {
5548
- x: length40.parse(parameters.p) / 2,
5549
- y: -length40.parse(parameters.h) / 2
5618
+ x: length41.parse(parameters.p) / 2,
5619
+ y: -length41.parse(parameters.h) / 2
5550
5620
  }
5551
5621
  ],
5552
5622
  stroke_width: 0.1,
@@ -5589,22 +5659,22 @@ var melfWithoutParsing = (parameters) => {
5589
5659
  };
5590
5660
 
5591
5661
  // src/fn/micromelf.ts
5592
- import { z as z51 } from "zod";
5593
- import { length as length41 } from "circuit-json";
5662
+ import { z as z52 } from "zod";
5663
+ import { length as length42 } from "circuit-json";
5594
5664
  var micromelf_def = base_def.extend({
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")
5665
+ fn: z52.string(),
5666
+ num_pins: z52.literal(2).default(2),
5667
+ w: z52.string().default("3.0mm"),
5668
+ h: z52.string().default("1.80mm"),
5669
+ pl: z52.string().default("0.80mm"),
5670
+ pw: z52.string().default("1.20mm"),
5671
+ p: z52.string().default("1.6mm")
5602
5672
  });
5603
5673
  var micromelf = (raw_params) => {
5604
5674
  const parameters = micromelf_def.parse(raw_params);
5605
5675
  const silkscreenRefText = silkscreenRef(
5606
5676
  0,
5607
- length41.parse(parameters.h),
5677
+ length42.parse(parameters.h),
5608
5678
  0.3
5609
5679
  );
5610
5680
  const silkscreenLine = {
@@ -5613,20 +5683,20 @@ var micromelf = (raw_params) => {
5613
5683
  pcb_component_id: "",
5614
5684
  route: [
5615
5685
  {
5616
- x: length41.parse(parameters.p) / 2,
5617
- y: length41.parse(parameters.h) / 2
5686
+ x: length42.parse(parameters.p) / 2,
5687
+ y: length42.parse(parameters.h) / 2
5618
5688
  },
5619
5689
  {
5620
- x: -length41.parse(parameters.w) / 2 - 0.1,
5621
- y: length41.parse(parameters.h) / 2
5690
+ x: -length42.parse(parameters.w) / 2 - 0.1,
5691
+ y: length42.parse(parameters.h) / 2
5622
5692
  },
5623
5693
  {
5624
- x: -length41.parse(parameters.w) / 2 - 0.1,
5625
- y: -length41.parse(parameters.h) / 2
5694
+ x: -length42.parse(parameters.w) / 2 - 0.1,
5695
+ y: -length42.parse(parameters.h) / 2
5626
5696
  },
5627
5697
  {
5628
- x: length41.parse(parameters.p) / 2,
5629
- y: -length41.parse(parameters.h) / 2
5698
+ x: length42.parse(parameters.p) / 2,
5699
+ y: -length42.parse(parameters.h) / 2
5630
5700
  }
5631
5701
  ],
5632
5702
  stroke_width: 0.1,
@@ -5669,22 +5739,22 @@ var microMelfWithoutParsing = (parameters) => {
5669
5739
  };
5670
5740
 
5671
5741
  // src/fn/sma.ts
5672
- import { z as z52 } from "zod";
5673
- import { length as length42 } from "circuit-json";
5742
+ import { z as z53 } from "zod";
5743
+ import { length as length43 } from "circuit-json";
5674
5744
  var sma_def = base_def.extend({
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")
5745
+ fn: z53.string(),
5746
+ num_pins: z53.literal(2).default(2),
5747
+ w: z53.string().default("7.10mm"),
5748
+ h: z53.string().default("3.40mm"),
5749
+ pl: z53.string().default("2.45mm"),
5750
+ pw: z53.string().default("1.80mm"),
5751
+ p: z53.string().default("4.05mm")
5682
5752
  });
5683
5753
  var sma = (raw_params) => {
5684
5754
  const parameters = sma_def.parse(raw_params);
5685
5755
  const silkscreenRefText = silkscreenRef(
5686
5756
  0,
5687
- length42.parse(parameters.h) / 2 + 0.5,
5757
+ length43.parse(parameters.h) / 2 + 0.5,
5688
5758
  0.3
5689
5759
  );
5690
5760
  const silkscreenLine = {
@@ -5693,20 +5763,20 @@ var sma = (raw_params) => {
5693
5763
  pcb_component_id: "",
5694
5764
  route: [
5695
5765
  {
5696
- x: length42.parse(parameters.p) / 2,
5697
- y: length42.parse(parameters.h) / 2
5766
+ x: length43.parse(parameters.p) / 2,
5767
+ y: length43.parse(parameters.h) / 2
5698
5768
  },
5699
5769
  {
5700
- x: -length42.parse(parameters.w) / 2 - 0.5,
5701
- y: length42.parse(parameters.h) / 2
5770
+ x: -length43.parse(parameters.w) / 2 - 0.5,
5771
+ y: length43.parse(parameters.h) / 2
5702
5772
  },
5703
5773
  {
5704
- x: -length42.parse(parameters.w) / 2 - 0.5,
5705
- y: -length42.parse(parameters.h) / 2
5774
+ x: -length43.parse(parameters.w) / 2 - 0.5,
5775
+ y: -length43.parse(parameters.h) / 2
5706
5776
  },
5707
5777
  {
5708
- x: length42.parse(parameters.p) / 2,
5709
- y: -length42.parse(parameters.h) / 2
5778
+ x: length43.parse(parameters.p) / 2,
5779
+ y: -length43.parse(parameters.h) / 2
5710
5780
  }
5711
5781
  ],
5712
5782
  stroke_width: 0.1,
@@ -5748,22 +5818,22 @@ var smaWithoutParsing = (parameters) => {
5748
5818
  };
5749
5819
 
5750
5820
  // src/fn/smf.ts
5751
- import { z as z53 } from "zod";
5752
- import { length as length43 } from "circuit-json";
5821
+ import { z as z54 } from "zod";
5822
+ import { length as length44 } from "circuit-json";
5753
5823
  var smf_def = base_def.extend({
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")
5824
+ fn: z54.string(),
5825
+ num_pins: z54.literal(2).default(2),
5826
+ w: z54.string().default("4.80mm"),
5827
+ h: z54.string().default("2.10mm"),
5828
+ pl: z54.string().default("1.30mm"),
5829
+ pw: z54.string().default("1.40mm"),
5830
+ p: z54.string().default("2.9mm")
5761
5831
  });
5762
5832
  var smf = (raw_params) => {
5763
5833
  const parameters = smf_def.parse(raw_params);
5764
5834
  const silkscreenRefText = silkscreenRef(
5765
5835
  0,
5766
- length43.parse(parameters.h) - 0.5,
5836
+ length44.parse(parameters.h) - 0.5,
5767
5837
  0.3
5768
5838
  );
5769
5839
  const silkscreenLine = {
@@ -5772,20 +5842,20 @@ var smf = (raw_params) => {
5772
5842
  pcb_component_id: "",
5773
5843
  route: [
5774
5844
  {
5775
- x: length43.parse(parameters.p) / 2,
5776
- y: length43.parse(parameters.h) / 2
5845
+ x: length44.parse(parameters.p) / 2,
5846
+ y: length44.parse(parameters.h) / 2
5777
5847
  },
5778
5848
  {
5779
- x: -length43.parse(parameters.w) / 2,
5780
- y: length43.parse(parameters.h) / 2
5849
+ x: -length44.parse(parameters.w) / 2,
5850
+ y: length44.parse(parameters.h) / 2
5781
5851
  },
5782
5852
  {
5783
- x: -length43.parse(parameters.w) / 2,
5784
- y: -length43.parse(parameters.h) / 2
5853
+ x: -length44.parse(parameters.w) / 2,
5854
+ y: -length44.parse(parameters.h) / 2
5785
5855
  },
5786
5856
  {
5787
- x: length43.parse(parameters.p) / 2,
5788
- y: -length43.parse(parameters.h) / 2
5857
+ x: length44.parse(parameters.p) / 2,
5858
+ y: -length44.parse(parameters.h) / 2
5789
5859
  }
5790
5860
  ],
5791
5861
  stroke_width: 0.1,
@@ -5828,22 +5898,22 @@ var smfWithoutParsing = (parameters) => {
5828
5898
  };
5829
5899
 
5830
5900
  // src/fn/smb.ts
5831
- import { z as z54 } from "zod";
5832
- import { length as length44 } from "circuit-json";
5901
+ import { z as z55 } from "zod";
5902
+ import { length as length45 } from "circuit-json";
5833
5903
  var smb_def = base_def.extend({
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")
5904
+ fn: z55.string(),
5905
+ num_pins: z55.literal(2).default(2),
5906
+ w: z55.string().default("7.30mm"),
5907
+ h: z55.string().default("4.40mm"),
5908
+ pl: z55.string().default("2.50mm"),
5909
+ pw: z55.string().default("2.30mm"),
5910
+ p: z55.string().default("4.30mm")
5841
5911
  });
5842
5912
  var smb = (raw_params) => {
5843
5913
  const parameters = smb_def.parse(raw_params);
5844
5914
  const silkscreenRefText = silkscreenRef(
5845
5915
  0,
5846
- length44.parse(parameters.h) / 2 + 0.5,
5916
+ length45.parse(parameters.h) / 2 + 0.5,
5847
5917
  0.3
5848
5918
  );
5849
5919
  const silkscreenLine = {
@@ -5852,20 +5922,20 @@ var smb = (raw_params) => {
5852
5922
  pcb_component_id: "",
5853
5923
  route: [
5854
5924
  {
5855
- x: length44.parse(parameters.p) / 2,
5856
- y: length44.parse(parameters.h) / 2
5925
+ x: length45.parse(parameters.p) / 2,
5926
+ y: length45.parse(parameters.h) / 2
5857
5927
  },
5858
5928
  {
5859
- x: -length44.parse(parameters.w) / 2 - 0.1,
5860
- y: length44.parse(parameters.h) / 2
5929
+ x: -length45.parse(parameters.w) / 2 - 0.1,
5930
+ y: length45.parse(parameters.h) / 2
5861
5931
  },
5862
5932
  {
5863
- x: -length44.parse(parameters.w) / 2 - 0.1,
5864
- y: -length44.parse(parameters.h) / 2
5933
+ x: -length45.parse(parameters.w) / 2 - 0.1,
5934
+ y: -length45.parse(parameters.h) / 2
5865
5935
  },
5866
5936
  {
5867
- x: length44.parse(parameters.p) / 2,
5868
- y: -length44.parse(parameters.h) / 2
5937
+ x: length45.parse(parameters.p) / 2,
5938
+ y: -length45.parse(parameters.h) / 2
5869
5939
  }
5870
5940
  ],
5871
5941
  stroke_width: 0.1,
@@ -5908,16 +5978,16 @@ var smbWithoutParsing = (parameters) => {
5908
5978
  };
5909
5979
 
5910
5980
  // src/fn/smc.ts
5911
- import { z as z55 } from "zod";
5912
- import { length as length45 } from "circuit-json";
5981
+ import { z as z56 } from "zod";
5982
+ import { length as length46 } from "circuit-json";
5913
5983
  var smc_def = base_def.extend({
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")
5984
+ fn: z56.string(),
5985
+ num_pins: z56.literal(2).default(2),
5986
+ w: z56.string().default("10.70mm"),
5987
+ h: z56.string().default("6.60mm"),
5988
+ pl: z56.string().default("3.30mm"),
5989
+ pw: z56.string().default("2.50mm"),
5990
+ p: z56.string().default("6.80mm")
5921
5991
  });
5922
5992
  var smc = (raw_params) => {
5923
5993
  const parameters = smc_def.parse(raw_params);
@@ -5928,20 +5998,20 @@ var smc = (raw_params) => {
5928
5998
  pcb_component_id: "",
5929
5999
  route: [
5930
6000
  {
5931
- x: length45.parse(parameters.p) / 2,
5932
- y: length45.parse(parameters.h) / 2 - 0.8
6001
+ x: length46.parse(parameters.p) / 2,
6002
+ y: length46.parse(parameters.h) / 2 - 0.8
5933
6003
  },
5934
6004
  {
5935
- x: -length45.parse(parameters.w) / 2 - 0.8,
5936
- y: length45.parse(parameters.h) / 2 - 0.8
6005
+ x: -length46.parse(parameters.w) / 2 - 0.8,
6006
+ y: length46.parse(parameters.h) / 2 - 0.8
5937
6007
  },
5938
6008
  {
5939
- x: -length45.parse(parameters.w) / 2 - 0.8,
5940
- y: -length45.parse(parameters.h) / 2 + 0.8
6009
+ x: -length46.parse(parameters.w) / 2 - 0.8,
6010
+ y: -length46.parse(parameters.h) / 2 + 0.8
5941
6011
  },
5942
6012
  {
5943
- x: length45.parse(parameters.p) / 2,
5944
- y: -length45.parse(parameters.h) / 2 + 0.8
6013
+ x: length46.parse(parameters.p) / 2,
6014
+ y: -length46.parse(parameters.h) / 2 + 0.8
5945
6015
  }
5946
6016
  ],
5947
6017
  stroke_width: 0.1,
@@ -5983,16 +6053,16 @@ var smcWithoutParsing = (parameters) => {
5983
6053
  };
5984
6054
 
5985
6055
  // src/fn/sot223.ts
5986
- import { z as z56 } from "zod";
6056
+ import { z as z57 } from "zod";
5987
6057
  var sot223_def = base_def.extend({
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()
6058
+ fn: z57.string(),
6059
+ num_pins: z57.number().default(4),
6060
+ w: z57.string().default("8.50mm"),
6061
+ h: z57.string().default("6.90mm"),
6062
+ pl: z57.string().default("2mm"),
6063
+ pw: z57.string().default("1.5mm"),
6064
+ p: z57.string().default("2.30mm"),
6065
+ string: z57.string().optional()
5996
6066
  });
5997
6067
  var sot223 = (raw_params) => {
5998
6068
  const match = raw_params.string?.match(/^sot223_(\d+)/);
@@ -6238,16 +6308,16 @@ var sot223_6 = (parameters) => {
6238
6308
  };
6239
6309
 
6240
6310
  // src/fn/sot23w.ts
6241
- import { z as z57 } from "zod";
6311
+ import { z as z58 } from "zod";
6242
6312
  var sot23w_def = base_def.extend({
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()
6313
+ fn: z58.string(),
6314
+ num_pins: z58.number().default(3),
6315
+ w: z58.string().default("3.40mm"),
6316
+ h: z58.string().default("3.30mm"),
6317
+ pl: z58.string().default("1mm"),
6318
+ pw: z58.string().default("0.7mm"),
6319
+ p: z58.string().default("1.2mm"),
6320
+ string: z58.string().optional()
6251
6321
  });
6252
6322
  var sot23w = (raw_params) => {
6253
6323
  const match = raw_params.string?.match(/^sot23w_(\d+)/);
@@ -6335,16 +6405,16 @@ var sot23w_3 = (parameters) => {
6335
6405
  };
6336
6406
 
6337
6407
  // src/fn/to92s.ts
6338
- import { z as z58 } from "zod";
6408
+ import { z as z59 } from "zod";
6339
6409
  var to92s_def = base_def.extend({
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()
6410
+ fn: z59.string(),
6411
+ num_pins: z59.union([z59.literal(3), z59.literal(2)]).default(3),
6412
+ p: z59.string().default("1.27mm"),
6413
+ id: z59.string().default("0.72mm"),
6414
+ od: z59.string().default("0.95mm"),
6415
+ w: z59.string().default("2.5mm"),
6416
+ h: z59.string().default("4.2mm"),
6417
+ string: z59.string().optional()
6348
6418
  });
6349
6419
  var to92s_3 = (parameters) => {
6350
6420
  const { p, id, od, w, h } = parameters;
@@ -6411,18 +6481,18 @@ var to92s = (raw_params) => {
6411
6481
 
6412
6482
  // src/fn/jst.ts
6413
6483
  import {
6414
- length as length46
6484
+ length as length47
6415
6485
  } from "circuit-json";
6416
- import { z as z59 } from "zod";
6486
+ import { z as z60 } from "zod";
6417
6487
  var jst_def = base_def.extend({
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) => {
6488
+ fn: z60.string(),
6489
+ p: length47.optional(),
6490
+ id: length47.optional(),
6491
+ pw: length47.optional(),
6492
+ pl: length47.optional(),
6493
+ w: length47.optional(),
6494
+ h: length47.optional(),
6495
+ sh: z60.union([z60.boolean(), z60.string(), z60.number()]).optional().transform((v) => {
6426
6496
  if (typeof v === "string") {
6427
6497
  const n = Number(v);
6428
6498
  return Number.isNaN(n) ? true : n;
@@ -6431,26 +6501,26 @@ var jst_def = base_def.extend({
6431
6501
  }).describe(
6432
6502
  'JST SH (Surface-mount) connector family. SH stands for "Super High-density".'
6433
6503
  ),
6434
- ph: z59.boolean().optional().describe(
6504
+ ph: z60.boolean().optional().describe(
6435
6505
  'JST PH (Through-hole) connector family. PH stands for "Pin Header".'
6436
6506
  ),
6437
- string: z59.string().optional()
6507
+ string: z60.string().optional()
6438
6508
  });
6439
6509
  var variantDefaults = {
6440
6510
  ph: {
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")
6511
+ p: length47.parse("2.2mm"),
6512
+ id: length47.parse("0.70mm"),
6513
+ pw: length47.parse("1.20mm"),
6514
+ pl: length47.parse("1.20mm"),
6515
+ w: length47.parse("6mm"),
6516
+ h: length47.parse("5mm")
6447
6517
  },
6448
6518
  sh: {
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")
6519
+ p: length47.parse("1mm"),
6520
+ pw: length47.parse("0.6mm"),
6521
+ pl: length47.parse("1.55mm"),
6522
+ w: length47.parse("5.8mm"),
6523
+ h: length47.parse("7.8mm")
6454
6524
  }
6455
6525
  };
6456
6526
  function getVariant(params) {
@@ -6567,22 +6637,22 @@ var jst = (raw_params) => {
6567
6637
  };
6568
6638
 
6569
6639
  // src/fn/sod110.ts
6570
- import { z as z60 } from "zod";
6571
- import { length as length47 } from "circuit-json";
6640
+ import { z as z61 } from "zod";
6641
+ import { length as length48 } from "circuit-json";
6572
6642
  var sod_def12 = base_def.extend({
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")
6643
+ fn: z61.string(),
6644
+ num_pins: z61.literal(2).default(2),
6645
+ w: z61.string().default("3.30mm"),
6646
+ h: z61.string().default("1.70mm"),
6647
+ pl: z61.string().default("0.80mm"),
6648
+ pw: z61.string().default("1mm"),
6649
+ p: z61.string().default("1.90mm")
6580
6650
  });
6581
6651
  var sod110 = (raw_params) => {
6582
6652
  const parameters = sod_def12.parse(raw_params);
6583
6653
  const silkscreenRefText = silkscreenRef(
6584
6654
  0,
6585
- length47.parse(parameters.h) / 2 + 0.5,
6655
+ length48.parse(parameters.h) / 2 + 0.5,
6586
6656
  0.3
6587
6657
  );
6588
6658
  const silkscreenLine = {
@@ -6591,20 +6661,20 @@ var sod110 = (raw_params) => {
6591
6661
  pcb_component_id: "",
6592
6662
  route: [
6593
6663
  {
6594
- x: length47.parse(parameters.p) / 2,
6595
- y: length47.parse(parameters.h) / 2
6664
+ x: length48.parse(parameters.p) / 2,
6665
+ y: length48.parse(parameters.h) / 2
6596
6666
  },
6597
6667
  {
6598
- x: -length47.parse(parameters.w) / 2,
6599
- y: length47.parse(parameters.h) / 2
6668
+ x: -length48.parse(parameters.w) / 2,
6669
+ y: length48.parse(parameters.h) / 2
6600
6670
  },
6601
6671
  {
6602
- x: -length47.parse(parameters.w) / 2,
6603
- y: -length47.parse(parameters.h) / 2
6672
+ x: -length48.parse(parameters.w) / 2,
6673
+ y: -length48.parse(parameters.h) / 2
6604
6674
  },
6605
6675
  {
6606
- x: length47.parse(parameters.p) / 2,
6607
- y: -length47.parse(parameters.h) / 2
6676
+ x: length48.parse(parameters.p) / 2,
6677
+ y: -length48.parse(parameters.h) / 2
6608
6678
  }
6609
6679
  ],
6610
6680
  stroke_width: 0.1,
@@ -6646,8 +6716,8 @@ var sodWithoutParsing13 = (parameters) => {
6646
6716
  };
6647
6717
 
6648
6718
  // src/fn/vssop.ts
6649
- import { z as z61 } from "zod";
6650
- import { length as length48 } from "circuit-json";
6719
+ import { z as z62 } from "zod";
6720
+ import { length as length49 } from "circuit-json";
6651
6721
  var getDefaultValues = (num_pins) => {
6652
6722
  switch (num_pins) {
6653
6723
  case 8:
@@ -6677,23 +6747,23 @@ var getDefaultValues = (num_pins) => {
6677
6747
  }
6678
6748
  };
6679
6749
  var vssop_def = base_def.extend({
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()
6750
+ fn: z62.string(),
6751
+ num_pins: z62.union([z62.literal(8), z62.literal(10)]).default(8),
6752
+ w: z62.string().optional(),
6753
+ h: z62.string().optional(),
6754
+ p: z62.string().optional(),
6755
+ pl: z62.string().optional(),
6756
+ pw: z62.string().optional(),
6757
+ string: z62.string().optional()
6688
6758
  });
6689
6759
  var vssop = (raw_params) => {
6690
6760
  const parameters = vssop_def.parse(raw_params);
6691
6761
  const defaults = getDefaultValues(parameters.num_pins);
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);
6762
+ const w = length49.parse(parameters.w || defaults.w);
6763
+ const h = length49.parse(parameters.h || defaults.h);
6764
+ const p = length49.parse(parameters.p || defaults.p);
6765
+ const pl = length49.parse(parameters.pl || defaults.pl);
6766
+ const pw = length49.parse(parameters.pw || defaults.pw);
6697
6767
  const pads = [];
6698
6768
  const half = parameters.num_pins / 2;
6699
6769
  for (let i = 0; i < parameters.num_pins; i++) {
@@ -6770,14 +6840,14 @@ var getVssopPadCoord = (pinCount, pn, w, p) => {
6770
6840
  const col = pn <= half ? -1 : 1;
6771
6841
  const row = (half - 1) / 2 - rowIndex;
6772
6842
  return {
6773
- x: col * length48.parse(pinCount === 8 ? "1.8mm" : "2.2mm"),
6843
+ x: col * length49.parse(pinCount === 8 ? "1.8mm" : "2.2mm"),
6774
6844
  y: row * p
6775
6845
  };
6776
6846
  };
6777
6847
 
6778
6848
  // src/fn/msop.ts
6779
- import { z as z62 } from "zod";
6780
- import { length as length49 } from "circuit-json";
6849
+ import { z as z63 } from "zod";
6850
+ import { length as length50 } from "circuit-json";
6781
6851
  var getDefaultValues2 = (num_pins) => {
6782
6852
  switch (num_pins) {
6783
6853
  case 10:
@@ -6815,14 +6885,14 @@ var getDefaultValues2 = (num_pins) => {
6815
6885
  }
6816
6886
  };
6817
6887
  var msop_def = base_def.extend({
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()
6888
+ fn: z63.string(),
6889
+ num_pins: z63.union([z63.literal(8), z63.literal(10), z63.literal(12), z63.literal(16)]).default(8),
6890
+ w: z63.string().optional(),
6891
+ h: z63.string().optional(),
6892
+ p: z63.string().optional(),
6893
+ pl: z63.string().optional(),
6894
+ pw: z63.string().optional(),
6895
+ string: z63.string().optional()
6826
6896
  });
6827
6897
  var getMsopCoords = (pinCount, pn, w, p) => {
6828
6898
  const half = pinCount / 2;
@@ -6830,18 +6900,18 @@ var getMsopCoords = (pinCount, pn, w, p) => {
6830
6900
  const col = pn <= half ? -1 : 1;
6831
6901
  const row = (half - 1) / 2 - rowIndex;
6832
6902
  return {
6833
- x: col * length49.parse("2mm"),
6903
+ x: col * length50.parse("2mm"),
6834
6904
  y: row * p
6835
6905
  };
6836
6906
  };
6837
6907
  var msop = (raw_params) => {
6838
6908
  const parameters = msop_def.parse(raw_params);
6839
6909
  const defaults = getDefaultValues2(parameters.num_pins);
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);
6910
+ const w = length50.parse(parameters.w || defaults.w);
6911
+ const h = length50.parse(parameters.h || defaults.h);
6912
+ const p = length50.parse(parameters.p || defaults.p);
6913
+ const pl = length50.parse(parameters.pl || defaults.pl);
6914
+ const pw = length50.parse(parameters.pw || defaults.pw);
6845
6915
  const pads = [];
6846
6916
  for (let i = 0; i < parameters.num_pins; i++) {
6847
6917
  const { x, y } = getMsopCoords(parameters.num_pins, i + 1, w, p);
@@ -6912,22 +6982,22 @@ var msop = (raw_params) => {
6912
6982
  };
6913
6983
 
6914
6984
  // src/fn/sod323w.ts
6915
- import { z as z63 } from "zod";
6916
- import { length as length50 } from "circuit-json";
6985
+ import { z as z64 } from "zod";
6986
+ import { length as length51 } from "circuit-json";
6917
6987
  var sod323w_def = base_def.extend({
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")
6988
+ fn: z64.string(),
6989
+ num_pins: z64.literal(2).default(2),
6990
+ w: z64.string().default("3.8mm"),
6991
+ h: z64.string().default("1.65mm"),
6992
+ pl: z64.string().default("1.2mm"),
6993
+ pw: z64.string().default("1.2mm"),
6994
+ pad_spacing: z64.string().default("2.6mm")
6925
6995
  });
6926
6996
  var sod323w = (raw_params) => {
6927
6997
  const parameters = sod323w_def.parse(raw_params);
6928
6998
  const silkscreenRefText = silkscreenRef(
6929
6999
  0,
6930
- length50.parse(parameters.h),
7000
+ length51.parse(parameters.h),
6931
7001
  0.3
6932
7002
  );
6933
7003
  const silkscreenLine = {
@@ -6936,20 +7006,20 @@ var sod323w = (raw_params) => {
6936
7006
  pcb_component_id: "",
6937
7007
  route: [
6938
7008
  {
6939
- x: length50.parse(parameters.pad_spacing) / 2,
6940
- y: length50.parse(parameters.h) / 2
7009
+ x: length51.parse(parameters.pad_spacing) / 2,
7010
+ y: length51.parse(parameters.h) / 2
6941
7011
  },
6942
7012
  {
6943
- x: -length50.parse(parameters.w) / 2 - 0.2,
6944
- y: length50.parse(parameters.h) / 2
7013
+ x: -length51.parse(parameters.w) / 2 - 0.2,
7014
+ y: length51.parse(parameters.h) / 2
6945
7015
  },
6946
7016
  {
6947
- x: -length50.parse(parameters.w) / 2 - 0.2,
6948
- y: -length50.parse(parameters.h) / 2
7017
+ x: -length51.parse(parameters.w) / 2 - 0.2,
7018
+ y: -length51.parse(parameters.h) / 2
6949
7019
  },
6950
7020
  {
6951
- x: length50.parse(parameters.pad_spacing) / 2,
6952
- y: -length50.parse(parameters.h) / 2
7021
+ x: length51.parse(parameters.pad_spacing) / 2,
7022
+ y: -length51.parse(parameters.h) / 2
6953
7023
  }
6954
7024
  ],
6955
7025
  stroke_width: 0.1,
@@ -6992,22 +7062,22 @@ var sodWithoutParsing14 = (parameters) => {
6992
7062
  };
6993
7063
 
6994
7064
  // src/fn/sod323fl.ts
6995
- import { z as z64 } from "zod";
6996
- import { length as length51 } from "circuit-json";
7065
+ import { z as z65 } from "zod";
7066
+ import { length as length52 } from "circuit-json";
6997
7067
  var sod323FL_def = base_def.extend({
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")
7068
+ fn: z65.string(),
7069
+ num_pins: z65.literal(2).default(2),
7070
+ w: z65.string().default("3.20mm"),
7071
+ h: z65.string().default("1.65mm"),
7072
+ pl: z65.string().default("0.8mm"),
7073
+ pw: z65.string().default("0.9mm"),
7074
+ pad_spacing: z65.string().default("2.1mm")
7005
7075
  });
7006
7076
  var sod323fl = (raw_params) => {
7007
7077
  const parameters = sod323FL_def.parse(raw_params);
7008
7078
  const silkscreenRefText = silkscreenRef(
7009
7079
  0,
7010
- length51.parse(parameters.h),
7080
+ length52.parse(parameters.h),
7011
7081
  0.3
7012
7082
  );
7013
7083
  const silkscreenLine = {
@@ -7016,20 +7086,20 @@ var sod323fl = (raw_params) => {
7016
7086
  pcb_component_id: "",
7017
7087
  route: [
7018
7088
  {
7019
- x: length51.parse(parameters.pad_spacing) / 2,
7020
- y: length51.parse(parameters.h) / 2
7089
+ x: length52.parse(parameters.pad_spacing) / 2,
7090
+ y: length52.parse(parameters.h) / 2
7021
7091
  },
7022
7092
  {
7023
- x: -length51.parse(parameters.w) / 2 - 0.2,
7024
- y: length51.parse(parameters.h) / 2
7093
+ x: -length52.parse(parameters.w) / 2 - 0.2,
7094
+ y: length52.parse(parameters.h) / 2
7025
7095
  },
7026
7096
  {
7027
- x: -length51.parse(parameters.w) / 2 - 0.2,
7028
- y: -length51.parse(parameters.h) / 2
7097
+ x: -length52.parse(parameters.w) / 2 - 0.2,
7098
+ y: -length52.parse(parameters.h) / 2
7029
7099
  },
7030
7100
  {
7031
- x: length51.parse(parameters.pad_spacing) / 2,
7032
- y: -length51.parse(parameters.h) / 2
7101
+ x: length52.parse(parameters.pad_spacing) / 2,
7102
+ y: -length52.parse(parameters.h) / 2
7033
7103
  }
7034
7104
  ],
7035
7105
  stroke_width: 0.1,
@@ -7072,20 +7142,20 @@ var sodWithoutParsing15 = (parameters) => {
7072
7142
  };
7073
7143
 
7074
7144
  // src/fn/son.ts
7075
- import { z as z65 } from "zod";
7076
- import { length as length52 } from "circuit-json";
7145
+ import { z as z66 } from "zod";
7146
+ import { length as length53 } from "circuit-json";
7077
7147
  var son_def = base_def.extend({
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)
7148
+ fn: z66.string(),
7149
+ num_pins: z66.union([z66.literal(6), z66.literal(8)]).default(8),
7150
+ w: z66.string().default("3mm"),
7151
+ h: z66.string().default("3mm"),
7152
+ p: z66.string().default("0.5mm"),
7153
+ pl: z66.string().default("0.52mm"),
7154
+ pw: z66.string().default("0.35mm"),
7155
+ epw: z66.string().default("1.40mm"),
7156
+ eph: z66.string().default("1.60mm"),
7157
+ string: z66.string().optional(),
7158
+ ep: z66.boolean().default(false)
7089
7159
  });
7090
7160
  var son = (raw_params) => {
7091
7161
  if (raw_params.string && raw_params.string.includes("_ep")) {
@@ -7097,13 +7167,13 @@ var son = (raw_params) => {
7097
7167
  ...raw_params,
7098
7168
  num_pins: numPins
7099
7169
  });
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);
7170
+ const w = length53.parse(parameters.w);
7171
+ const h = length53.parse(parameters.h);
7172
+ const p = length53.parse(parameters.p);
7173
+ const pl = length53.parse(parameters.pl);
7174
+ const pw = length53.parse(parameters.pw);
7175
+ const epw = length53.parse(parameters.epw);
7176
+ const eph = length53.parse(parameters.eph);
7107
7177
  const pads = [];
7108
7178
  for (let i = 0; i < parameters.num_pins; i++) {
7109
7179
  const { x, y } = getSonPadCoord(parameters.num_pins, i + 1, w, p);
@@ -7181,18 +7251,18 @@ var getSonPadCoord = (num_pins, pn, w, p) => {
7181
7251
  const col = pn <= half ? -1 : 1;
7182
7252
  const row = (half - 1) / 2 - rowIndex;
7183
7253
  return {
7184
- x: col * length52.parse("1.4mm"),
7254
+ x: col * length53.parse("1.4mm"),
7185
7255
  y: row * p
7186
7256
  };
7187
7257
  };
7188
7258
 
7189
7259
  // src/fn/solderjumper.ts
7190
- import { length as length53 } from "circuit-json";
7260
+ import { length as length54 } from "circuit-json";
7191
7261
  var solderjumper = (params) => {
7192
7262
  const { num_pins, bridged, p = 2.54, pw = 1.5, ph = 1.5 } = params;
7193
- const padSpacing7 = length53.parse(p);
7194
- const padWidth = length53.parse(pw);
7195
- const padHeight = length53.parse(ph);
7263
+ const padSpacing7 = length54.parse(p);
7264
+ const padWidth = length54.parse(pw);
7265
+ const padHeight = length54.parse(ph);
7196
7266
  const traceWidth = Math.min(padHeight / 4, 0.5);
7197
7267
  const pads = [];
7198
7268
  for (let i = 0; i < num_pins; i++) {
@@ -7280,34 +7350,34 @@ var solderjumper = (params) => {
7280
7350
  };
7281
7351
 
7282
7352
  // src/fn/sot457.ts
7283
- import { z as z66 } from "zod";
7353
+ import { z as z67 } from "zod";
7284
7354
  var commonSchema = {
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()
7355
+ fn: z67.literal("sot457"),
7356
+ num_pins: z67.literal(6).default(6),
7357
+ pillh: z67.string().default("0.45mm"),
7358
+ pillw: z67.string().default("1.45mm"),
7359
+ pl: z67.string(),
7360
+ pw: z67.string(),
7361
+ p: z67.string(),
7362
+ wave: z67.boolean().optional(),
7363
+ reflow: z67.boolean().optional()
7294
7364
  };
7295
7365
  var sot457DefSchema = base_def.extend({
7296
7366
  ...commonSchema,
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")
7367
+ h: z67.string().default("2.5mm"),
7368
+ w: z67.string().default("2.7mm"),
7369
+ pl: z67.string().default("0.8mm"),
7370
+ pw: z67.string().default("0.55mm"),
7371
+ p: z67.string().default("0.95mm")
7302
7372
  });
7303
7373
  var sot457WaveSchema = base_def.extend({
7304
7374
  ...commonSchema,
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")
7375
+ h: z67.string().default("3mm"),
7376
+ w: z67.string().default("4mm"),
7377
+ pillr: z67.string().default("0.225mm"),
7378
+ pl: z67.string().default("1.45mm"),
7379
+ pw: z67.string().default("1.5mm"),
7380
+ p: z67.string().default("1.475mm")
7311
7381
  }).transform((data) => ({
7312
7382
  ...data,
7313
7383
  wave: data.wave ?? (data.reflow === void 0 ? true : !data.reflow),
@@ -7446,25 +7516,25 @@ var sot457 = (rawParams) => {
7446
7516
  };
7447
7517
 
7448
7518
  // src/fn/sot963.ts
7449
- import { z as z67 } from "zod";
7450
- import { length as length54 } from "circuit-json";
7519
+ import { z as z68 } from "zod";
7520
+ import { length as length55 } from "circuit-json";
7451
7521
  var sot963_def = base_def.extend({
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()
7522
+ fn: z68.string(),
7523
+ num_pins: z68.literal(6).default(6),
7524
+ w: z68.string().default("1.1mm"),
7525
+ h: z68.string().default("1.45mm"),
7526
+ p: z68.string().default("0.35mm"),
7527
+ pl: z68.string().default("0.2mm"),
7528
+ pw: z68.string().default("0.2mm"),
7529
+ string: z68.string().optional()
7460
7530
  });
7461
7531
  var sot963 = (raw_params) => {
7462
7532
  const parameters = sot963_def.parse({ ...raw_params, fn: "sot963" });
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);
7533
+ const w = length55.parse(parameters.w);
7534
+ const h = length55.parse(parameters.h);
7535
+ const p = length55.parse(parameters.p);
7536
+ const pl = length55.parse(parameters.pl);
7537
+ const pw = length55.parse(parameters.pw);
7468
7538
  const pads = [];
7469
7539
  for (let i = 0; i < 6; i++) {
7470
7540
  const { x, y } = getSot963PadCoord(i + 1, w, p, pl);
@@ -7527,19 +7597,19 @@ var getSot963PadCoord = (pn, w, p, pl) => {
7527
7597
  };
7528
7598
 
7529
7599
  // src/fn/potentiometer.ts
7530
- import { z as z68 } from "zod";
7600
+ import { z as z69 } from "zod";
7531
7601
  var potentiometer_def = base_def.extend({
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(
7602
+ fn: z69.string(),
7603
+ num_pins: z69.union([z69.literal(3), z69.literal(2)]).default(3),
7604
+ p: z69.string().default("3.8mm"),
7605
+ id: z69.string().default("1.25mm"),
7606
+ od: z69.string().default("2.35mm"),
7607
+ ca: z69.string().default("14mm").describe(
7538
7608
  "Caliper axis (width or diameter of the potentiometer body or adjustment knob)"
7539
7609
  ),
7540
- w: z68.string().default("5.35mm"),
7541
- h: z68.string().default("4mm"),
7542
- string: z68.string().optional()
7610
+ w: z69.string().default("5.35mm"),
7611
+ h: z69.string().default("4mm"),
7612
+ string: z69.string().optional()
7543
7613
  });
7544
7614
  var potentiometer_acp = (parameters) => {
7545
7615
  const { p, id, od, h, ca } = parameters;
@@ -7606,15 +7676,15 @@ var potentiometer = (raw_params) => {
7606
7676
 
7607
7677
  // src/fn/electrolytic.ts
7608
7678
  import {
7609
- length as length55
7679
+ length as length56
7610
7680
  } from "circuit-json";
7611
- import { z as z69 } from "zod";
7681
+ import { z as z70 } from "zod";
7612
7682
  var electrolytic_def = base_def.extend({
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")
7683
+ fn: z70.string(),
7684
+ p: length56.optional().default("7.5mm"),
7685
+ id: length56.optional().default("1mm"),
7686
+ od: length56.optional().default("2mm"),
7687
+ d: length56.optional().default("10.5mm")
7618
7688
  });
7619
7689
  var generate_circle_arcs = (centerX, centerY, radius, cut, cutHeight) => {
7620
7690
  const topArc = [];
@@ -7721,22 +7791,22 @@ var electrolytic = (raw_params) => {
7721
7791
  };
7722
7792
 
7723
7793
  // src/fn/smbf.ts
7724
- import { z as z70 } from "zod";
7725
- import { length as length56 } from "circuit-json";
7794
+ import { z as z71 } from "zod";
7795
+ import { length as length57 } from "circuit-json";
7726
7796
  var smbf_def = base_def.extend({
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")
7797
+ fn: z71.string(),
7798
+ num_pins: z71.literal(2).default(2),
7799
+ w: z71.string().default("6.5mm"),
7800
+ h: z71.string().default("3mm"),
7801
+ pl: z71.string().default("1.75mm"),
7802
+ pw: z71.string().default("2.40mm"),
7803
+ p: z71.string().default("4.75mm")
7734
7804
  });
7735
7805
  var smbf = (raw_params) => {
7736
7806
  const parameters = smbf_def.parse(raw_params);
7737
7807
  const silkscreenRefText = silkscreenRef(
7738
7808
  0,
7739
- length56.parse(parameters.h) - 0.5,
7809
+ length57.parse(parameters.h) - 0.5,
7740
7810
  0.3
7741
7811
  );
7742
7812
  const silkscreenLine = {
@@ -7745,20 +7815,20 @@ var smbf = (raw_params) => {
7745
7815
  pcb_component_id: "",
7746
7816
  route: [
7747
7817
  {
7748
- x: length56.parse(parameters.p) / 2,
7749
- y: length56.parse(parameters.h) / 2
7818
+ x: length57.parse(parameters.p) / 2,
7819
+ y: length57.parse(parameters.h) / 2
7750
7820
  },
7751
7821
  {
7752
- x: -length56.parse(parameters.w) / 2 - 0.3,
7753
- y: length56.parse(parameters.h) / 2
7822
+ x: -length57.parse(parameters.w) / 2 - 0.3,
7823
+ y: length57.parse(parameters.h) / 2
7754
7824
  },
7755
7825
  {
7756
- x: -length56.parse(parameters.w) / 2 - 0.3,
7757
- y: -length56.parse(parameters.h) / 2
7826
+ x: -length57.parse(parameters.w) / 2 - 0.3,
7827
+ y: -length57.parse(parameters.h) / 2
7758
7828
  },
7759
7829
  {
7760
- x: length56.parse(parameters.p) / 2,
7761
- y: -length56.parse(parameters.h) / 2
7830
+ x: length57.parse(parameters.p) / 2,
7831
+ y: -length57.parse(parameters.h) / 2
7762
7832
  }
7763
7833
  ],
7764
7834
  stroke_width: 0.1,
@@ -7800,16 +7870,16 @@ var smbfWithoutParsing = (parameters) => {
7800
7870
  };
7801
7871
 
7802
7872
  // src/fn/sot323.ts
7803
- import { z as z71 } from "zod";
7873
+ import { z as z72 } from "zod";
7804
7874
  var sot323_def = base_def.extend({
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()
7875
+ fn: z72.string(),
7876
+ num_pins: z72.number().default(3),
7877
+ w: z72.string().default("2.45mm"),
7878
+ h: z72.string().default("2.40mm"),
7879
+ pl: z72.string().default("1.225mm"),
7880
+ pw: z72.string().default("0.5mm"),
7881
+ p: z72.string().default("0.95mm"),
7882
+ string: z72.string().optional()
7813
7883
  });
7814
7884
  var sot323 = (raw_params) => {
7815
7885
  const match = raw_params.string?.match(/^sot323_(\d+)/);
@@ -7897,30 +7967,30 @@ var sot323_3 = (parameters) => {
7897
7967
  };
7898
7968
 
7899
7969
  // src/fn/smtpad.ts
7900
- import { z as z72 } from "zod";
7901
- import { length as length57 } from "circuit-json";
7970
+ import { z as z73 } from "zod";
7971
+ import { length as length58 } from "circuit-json";
7902
7972
  import { mm as mm14 } from "@tscircuit/mm";
7903
7973
  var smtpad_def = base_def.extend({
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()
7974
+ fn: z73.string(),
7975
+ circle: z73.boolean().optional(),
7976
+ rect: z73.boolean().optional(),
7977
+ square: z73.boolean().optional(),
7978
+ pill: z73.boolean().optional(),
7979
+ d: length58.optional(),
7980
+ pd: length58.optional(),
7981
+ diameter: length58.optional(),
7982
+ r: length58.optional(),
7983
+ pr: length58.optional(),
7984
+ radius: length58.optional(),
7985
+ w: length58.optional(),
7986
+ pw: length58.optional(),
7987
+ width: length58.optional(),
7988
+ h: length58.optional(),
7989
+ ph: length58.optional(),
7990
+ height: length58.optional(),
7991
+ s: length58.optional(),
7992
+ size: length58.optional(),
7993
+ string: z73.string().optional()
7924
7994
  }).transform((v) => {
7925
7995
  let shape = "rect";
7926
7996
  if (v.circle) shape = "circle";
@@ -7986,18 +8056,18 @@ var smtpad = (raw_params) => {
7986
8056
  };
7987
8057
 
7988
8058
  // src/fn/platedhole.ts
7989
- import { z as z73 } from "zod";
7990
- import { length as length58 } from "circuit-json";
8059
+ import { z as z74 } from "zod";
8060
+ import { length as length59 } from "circuit-json";
7991
8061
  import { mm as mm15 } from "@tscircuit/mm";
7992
8062
  var platedhole_def = base_def.extend({
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)
8063
+ fn: z74.string(),
8064
+ d: length59.optional(),
8065
+ hd: length59.optional(),
8066
+ r: length59.optional(),
8067
+ hr: length59.optional(),
8068
+ pd: length59.optional(),
8069
+ pr: length59.optional(),
8070
+ squarepad: z74.boolean().optional().default(false)
8001
8071
  }).transform((v) => {
8002
8072
  let holeD;
8003
8073
  if (v.d !== void 0) holeD = mm15(v.d);
@@ -8036,14 +8106,14 @@ var platedhole2 = (raw_params) => {
8036
8106
  };
8037
8107
 
8038
8108
  // src/fn/sot.ts
8039
- import { z as z74 } from "zod";
8109
+ import { z as z75 } from "zod";
8040
8110
  var sot_def = base_def.extend({
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")
8111
+ fn: z75.string(),
8112
+ num_pins: z75.literal(6).default(6),
8113
+ h: z75.string().default("1.6mm"),
8114
+ pl: z75.string().default("1mm"),
8115
+ pw: z75.string().default("0.7mm"),
8116
+ p: z75.string().default("0.95mm")
8047
8117
  });
8048
8118
  var sot = (raw_params) => {
8049
8119
  const parameters = sot_def.parse(raw_params);
@@ -8160,16 +8230,16 @@ var sotWithoutParsing = (parameters) => {
8160
8230
  };
8161
8231
 
8162
8232
  // src/fn/sot343.ts
8163
- import { z as z75 } from "zod";
8233
+ import { z as z76 } from "zod";
8164
8234
  var sot343_def = base_def.extend({
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()
8235
+ fn: z76.string(),
8236
+ num_pins: z76.number().default(4),
8237
+ w: z76.string().default("3.2mm"),
8238
+ h: z76.string().default("2.6mm"),
8239
+ pl: z76.string().default("1.35mm"),
8240
+ pw: z76.string().default("0.50mm"),
8241
+ p: z76.string().default("0.6mm"),
8242
+ string: z76.string().optional()
8173
8243
  });
8174
8244
  var sot343 = (raw_params) => {
8175
8245
  const match = raw_params.string?.match(/^sot343_(\d+)/);
@@ -8264,9 +8334,9 @@ var sot343_4 = (parameters) => {
8264
8334
  };
8265
8335
 
8266
8336
  // src/fn/m2host.ts
8267
- import { z as z76 } from "zod";
8337
+ import { z as z77 } from "zod";
8268
8338
  var m2host_def = base_def.extend({
8269
- fn: z76.string()
8339
+ fn: z77.string()
8270
8340
  });
8271
8341
  var m2host = (raw_params) => {
8272
8342
  const parameters = m2host_def.parse(raw_params);
@@ -8370,37 +8440,41 @@ var m2host = (raw_params) => {
8370
8440
  };
8371
8441
 
8372
8442
  // src/fn/mountedpcbmodule.ts
8373
- import { length as length59 } from "circuit-json";
8374
- import { z as z77 } from "zod";
8443
+ import { length as length60 } from "circuit-json";
8444
+ import { z as z78 } from "zod";
8375
8445
  var mountedpcbmodule_def = base_def.extend({
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(
8446
+ fn: z78.string(),
8447
+ numPins: z78.number().optional().default(0),
8448
+ rows: z78.union([z78.string(), z78.number()]).transform((val) => Number(val)).optional().default(1).describe("number of rows"),
8449
+ p: length60.default("2.54mm").describe("pitch"),
8450
+ id: length60.default("1.0mm").describe("inner diameter"),
8451
+ od: length60.default("1.5mm").describe("outer diameter"),
8452
+ male: z78.boolean().optional().describe("the module uses male headers"),
8453
+ female: z78.boolean().optional().describe("the module uses female headers"),
8454
+ smd: z78.boolean().optional().describe("surface mount device"),
8455
+ pinlabeltextalignleft: z78.boolean().optional().default(false),
8456
+ pinlabeltextaligncenter: z78.boolean().optional().default(false),
8457
+ pinlabeltextalignright: z78.boolean().optional().default(false),
8458
+ pinlabelverticallyinverted: z78.boolean().optional().default(false),
8459
+ pinlabelorthogonal: z78.boolean().optional().default(false),
8460
+ nopinlabels: z78.boolean().optional().default(false).describe("omit silkscreen pin labels"),
8461
+ doublesidedpinlabel: z78.boolean().optional().default(false).describe("add silkscreen pins in top and bottom layers"),
8462
+ bottomsidepinlabel: z78.boolean().optional().default(false).describe(
8393
8463
  "place the silkscreen reference text on the bottom layer instead of top"
8394
8464
  ),
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
- width: length59.optional(),
8401
- height: length59.optional(),
8402
- pinRowHoleEdgeToEdgeDist: length59.default("2mm"),
8403
- holes: z77.union([z77.string(), z77.array(z77.string())]).optional().transform((val) => {
8465
+ pinRowSide: z78.enum(["left", "right", "top", "bottom"]).optional().default("left"),
8466
+ pinrowleft: z78.boolean().optional().default(false),
8467
+ pinrowright: z78.boolean().optional().default(false),
8468
+ pinrowtop: z78.boolean().optional().default(false),
8469
+ pinrowbottom: z78.boolean().optional().default(false),
8470
+ pinrowleftpins: z78.union([z78.string(), z78.number()]).transform((val) => Number(val)).optional(),
8471
+ pinrowrightpins: z78.union([z78.string(), z78.number()]).transform((val) => Number(val)).optional(),
8472
+ pinrowtoppins: z78.union([z78.string(), z78.number()]).transform((val) => Number(val)).optional(),
8473
+ pinrowbottompins: z78.union([z78.string(), z78.number()]).transform((val) => Number(val)).optional(),
8474
+ width: length60.optional(),
8475
+ height: length60.optional(),
8476
+ pinRowHoleEdgeToEdgeDist: length60.default("2mm"),
8477
+ holes: z78.union([z78.string(), z78.array(z78.string())]).optional().transform((val) => {
8404
8478
  if (!val) return val;
8405
8479
  if (Array.isArray(val)) return val;
8406
8480
  if (val.startsWith("(") && val.endsWith(")")) {
@@ -8408,18 +8482,18 @@ var mountedpcbmodule_def = base_def.extend({
8408
8482
  }
8409
8483
  return [val];
8410
8484
  }),
8411
- holeXDist: length59.optional(),
8412
- holeYDist: length59.optional(),
8413
- holeInset: length59.default("1mm"),
8414
- pinrow: z77.union([z77.string(), z77.number()]).optional(),
8415
- usbposition: z77.enum(["left", "right", "top", "bottom"]).optional().default("left"),
8416
- usbleft: z77.boolean().optional().default(false),
8417
- usbtop: z77.boolean().optional().default(false),
8418
- usbright: z77.boolean().optional().default(false),
8419
- usbbottom: z77.boolean().optional().default(false),
8420
- usbtype: z77.enum(["micro", "c"]).optional(),
8421
- usbmicro: z77.boolean().optional().default(false),
8422
- usbc: z77.boolean().optional().default(false)
8485
+ holeXDist: length60.optional(),
8486
+ holeYDist: length60.optional(),
8487
+ holeInset: length60.default("1mm"),
8488
+ pinrow: z78.union([z78.string(), z78.number()]).optional(),
8489
+ usbposition: z78.enum(["left", "right", "top", "bottom"]).optional().default("left"),
8490
+ usbleft: z78.boolean().optional().default(false),
8491
+ usbtop: z78.boolean().optional().default(false),
8492
+ usbright: z78.boolean().optional().default(false),
8493
+ usbbottom: z78.boolean().optional().default(false),
8494
+ usbtype: z78.enum(["micro", "c"]).optional(),
8495
+ usbmicro: z78.boolean().optional().default(false),
8496
+ usbc: z78.boolean().optional().default(false)
8423
8497
  }).transform((data) => {
8424
8498
  const pinlabelAnchorSide = determinePinlabelAnchorSide(data);
8425
8499
  let pinRowSide = data.pinRowSide;
@@ -8438,10 +8512,41 @@ var mountedpcbmodule_def = base_def.extend({
8438
8512
  if (data.pinrow !== void 0) {
8439
8513
  data.numPins = Number(data.pinrow);
8440
8514
  }
8515
+ const sidePinCounts = {
8516
+ left: data.pinrowleftpins,
8517
+ right: data.pinrowrightpins,
8518
+ top: data.pinrowtoppins,
8519
+ bottom: data.pinrowbottompins
8520
+ };
8521
+ const hasSidePins = Object.values(sidePinCounts).some(
8522
+ (value) => value !== void 0 && value > 0
8523
+ );
8524
+ const leftRightBoth = (sidePinCounts.left ?? 0) > 0 && (sidePinCounts.right ?? 0) > 0;
8525
+ const topBottomBoth = (sidePinCounts.top ?? 0) > 0 && (sidePinCounts.bottom ?? 0) > 0;
8526
+ if (hasSidePins) {
8527
+ if ((sidePinCounts.left ?? 0) > 0) pinRowSide = "left";
8528
+ else if ((sidePinCounts.right ?? 0) > 0) pinRowSide = "right";
8529
+ else if ((sidePinCounts.top ?? 0) > 0) pinRowSide = "top";
8530
+ else if ((sidePinCounts.bottom ?? 0) > 0) pinRowSide = "bottom";
8531
+ data.numPins = (sidePinCounts.left ?? 0) + (sidePinCounts.right ?? 0) + (sidePinCounts.top ?? 0) + (sidePinCounts.bottom ?? 0);
8532
+ }
8441
8533
  const numPinsPerRow = Math.ceil(data.numPins / data.rows);
8534
+ const verticalPins = Math.max(
8535
+ sidePinCounts.left ?? 0,
8536
+ sidePinCounts.right ?? 0
8537
+ );
8538
+ const horizontalPins = Math.max(
8539
+ sidePinCounts.top ?? 0,
8540
+ sidePinCounts.bottom ?? 0
8541
+ );
8442
8542
  let calculatedWidth;
8443
8543
  let calculatedHeight;
8444
- if (pinRowSide === "left" || pinRowSide === "right") {
8544
+ if (hasSidePins) {
8545
+ const widthGap = leftRightBoth ? data.p : 0;
8546
+ const heightGap = topBottomBoth ? data.p : 0;
8547
+ calculatedWidth = (horizontalPins > 0 ? (horizontalPins - 1) * data.p : 0) + 2 * data.pinRowHoleEdgeToEdgeDist + widthGap;
8548
+ calculatedHeight = (verticalPins > 0 ? (verticalPins - 1) * data.p : 0) + 2 * data.pinRowHoleEdgeToEdgeDist + heightGap;
8549
+ } else if (pinRowSide === "left" || pinRowSide === "right") {
8445
8550
  calculatedWidth = (data.rows - 1) * data.p + 2 * data.pinRowHoleEdgeToEdgeDist;
8446
8551
  calculatedHeight = (numPinsPerRow - 1) * data.p + 2 * data.pinRowHoleEdgeToEdgeDist;
8447
8552
  } else {
@@ -8456,15 +8561,21 @@ var mountedpcbmodule_def = base_def.extend({
8456
8561
  ...data,
8457
8562
  pinlabelAnchorSide,
8458
8563
  pinRowSide,
8564
+ usbposition,
8565
+ usbtype,
8459
8566
  male: data.male ?? !data.female,
8460
8567
  female: data.female ?? false,
8461
8568
  width: data.width ?? calculatedWidth,
8462
- height: data.height ?? calculatedHeight
8569
+ height: data.height ?? calculatedHeight,
8570
+ pinrowleftpins: sidePinCounts.left,
8571
+ pinrowrightpins: sidePinCounts.right,
8572
+ pinrowtoppins: sidePinCounts.top,
8573
+ pinrowbottompins: sidePinCounts.bottom
8463
8574
  };
8464
8575
  }).superRefine((data, ctx) => {
8465
8576
  if (data.male && data.female) {
8466
8577
  ctx.addIssue({
8467
- code: z77.ZodIssueCode.custom,
8578
+ code: z78.ZodIssueCode.custom,
8468
8579
  message: "'male' and 'female' cannot both be true; it should be male or female.",
8469
8580
  path: ["male", "female"]
8470
8581
  });
@@ -8493,95 +8604,195 @@ var mountedpcbmodule = (raw_params) => {
8493
8604
  holes,
8494
8605
  holeXDist,
8495
8606
  holeYDist,
8496
- holeInset
8607
+ holeInset,
8608
+ pinrowleftpins,
8609
+ pinrowrightpins,
8610
+ pinrowtoppins,
8611
+ pinrowbottompins,
8612
+ usbposition,
8613
+ usbtype
8497
8614
  } = parameters;
8498
8615
  let pinlabelTextAlign = "center";
8499
8616
  if (pinlabeltextalignleft) pinlabelTextAlign = "left";
8500
8617
  else if (pinlabeltextalignright) pinlabelTextAlign = "right";
8501
8618
  const elements = [];
8502
- const pinSpacing = p;
8503
- let pinStartX = 0;
8504
- let pinStartY = 0;
8505
- let pinDirectionX = 0;
8506
- let pinDirectionY = 0;
8507
- let rowDirectionX = 0;
8508
- let rowDirectionY = 0;
8509
- const numPinsPerRow = Math.ceil(numPins / rows);
8510
- if (pinRowSide === "left" || pinRowSide === "right") {
8511
- pinStartX = pinRowSide === "left" ? -width / 2 + pinRowHoleEdgeToEdgeDist : width / 2 - pinRowHoleEdgeToEdgeDist;
8512
- pinStartY = (numPinsPerRow - 1) / 2 * pinSpacing;
8513
- pinDirectionX = 0;
8514
- pinDirectionY = -pinSpacing;
8515
- rowDirectionX = pinRowSide === "left" ? pinSpacing : -pinSpacing;
8516
- rowDirectionY = 0;
8517
- } else {
8518
- pinStartX = -(numPinsPerRow - 1) / 2 * pinSpacing;
8519
- pinStartY = pinRowSide === "top" ? height / 2 - pinRowHoleEdgeToEdgeDist : -height / 2 + pinRowHoleEdgeToEdgeDist;
8520
- pinDirectionX = pinSpacing;
8521
- pinDirectionY = 0;
8522
- rowDirectionX = 0;
8523
- rowDirectionY = pinRowSide === "top" ? -pinSpacing : pinSpacing;
8524
- }
8525
- let pinNumber = 1;
8526
- for (let row = 0; row < rows && pinNumber <= numPins; row++) {
8527
- for (let col = 0; col < numPinsPerRow && pinNumber <= numPins; col++) {
8528
- const xoff = pinStartX + col * pinDirectionX + row * rowDirectionX;
8529
- const yoff = pinStartY + col * pinDirectionY + row * rowDirectionY;
8530
- if (parameters.smd) {
8619
+ const sidePinCounts = {
8620
+ left: pinrowleftpins,
8621
+ right: pinrowrightpins,
8622
+ top: pinrowtoppins,
8623
+ bottom: pinrowbottompins
8624
+ };
8625
+ const hasSidePins = Object.values(sidePinCounts).some(
8626
+ (value) => value !== void 0 && value > 0
8627
+ );
8628
+ const addPin = (pinNumber, xoff, yoff, anchorSide) => {
8629
+ if (parameters.smd) {
8630
+ elements.push(
8631
+ rectpad(pinNumber, xoff, yoff, parameters.od, parameters.od)
8632
+ );
8633
+ } else if (pinNumber === 1) {
8634
+ elements.push(
8635
+ platedHoleWithRectPad({
8636
+ pn: pinNumber,
8637
+ x: xoff,
8638
+ y: yoff,
8639
+ holeDiameter: id,
8640
+ rectPadWidth: od,
8641
+ rectPadHeight: od
8642
+ })
8643
+ );
8644
+ } else {
8645
+ elements.push(platedhole(pinNumber, xoff, yoff, id, od));
8646
+ }
8647
+ if (!nopinlabels) {
8648
+ const anchor_x = xoff + (anchorSide === "left" ? -od : anchorSide === "right" ? od : 0);
8649
+ const anchor_y = yoff + (anchorSide === "top" ? od : anchorSide === "bottom" ? -od : 0);
8650
+ if (!bottomsidepinlabel) {
8531
8651
  elements.push(
8532
- rectpad(pinNumber, xoff, yoff, parameters.od, parameters.od)
8652
+ silkscreenPin({
8653
+ fs: od / 5,
8654
+ pn: pinNumber,
8655
+ anchor_x,
8656
+ anchor_y,
8657
+ anchorplacement: anchorSide,
8658
+ textalign: pinlabelTextAlign,
8659
+ orthogonal: pinlabelorthogonal,
8660
+ verticallyinverted: pinlabelverticallyinverted,
8661
+ layer: "top"
8662
+ })
8663
+ );
8664
+ }
8665
+ if (doublesidedpinlabel || bottomsidepinlabel) {
8666
+ elements.push(
8667
+ silkscreenPin({
8668
+ fs: od / 5,
8669
+ pn: pinNumber,
8670
+ anchor_x,
8671
+ anchor_y,
8672
+ anchorplacement: anchorSide,
8673
+ textalign: pinlabelTextAlign,
8674
+ orthogonal: pinlabelorthogonal,
8675
+ verticallyinverted: pinlabelverticallyinverted,
8676
+ layer: "bottom"
8677
+ })
8533
8678
  );
8679
+ }
8680
+ }
8681
+ };
8682
+ if (hasSidePins) {
8683
+ const pinSpacing = p;
8684
+ let pinNumber = 1;
8685
+ const leftCount = sidePinCounts.left ?? 0;
8686
+ const rightCount = sidePinCounts.right ?? 0;
8687
+ const topCount = sidePinCounts.top ?? 0;
8688
+ const bottomCount = sidePinCounts.bottom ?? 0;
8689
+ const addSidePins = (side, count) => {
8690
+ if (count <= 0) return;
8691
+ if (side === "left" || side === "right") {
8692
+ const xoff = side === "left" ? -width / 2 + pinRowHoleEdgeToEdgeDist : width / 2 - pinRowHoleEdgeToEdgeDist;
8693
+ const startY = (count - 1) / 2 * pinSpacing;
8694
+ for (let i = 0; i < count; i++) {
8695
+ addPin(pinNumber, xoff, startY - i * pinSpacing, side);
8696
+ pinNumber++;
8697
+ }
8534
8698
  } else {
8535
- if (pinNumber === 1) {
8536
- elements.push(
8537
- platedHoleWithRectPad({
8538
- pn: pinNumber,
8539
- x: xoff,
8540
- y: yoff,
8541
- holeDiameter: id,
8542
- rectPadWidth: od,
8543
- rectPadHeight: od
8544
- })
8545
- );
8546
- } else {
8547
- elements.push(platedhole(pinNumber, xoff, yoff, id, od));
8699
+ const yoff = side === "top" ? height / 2 - pinRowHoleEdgeToEdgeDist : -height / 2 + pinRowHoleEdgeToEdgeDist;
8700
+ const startX = -((count - 1) / 2) * pinSpacing;
8701
+ for (let i = 0; i < count; i++) {
8702
+ addPin(pinNumber, startX + i * pinSpacing, yoff, side);
8703
+ pinNumber++;
8548
8704
  }
8549
8705
  }
8550
- if (!nopinlabels) {
8551
- const anchor_x = xoff + (pinRowSide === "left" ? -od : pinRowSide === "right" ? od : 0);
8552
- const anchor_y = yoff + (pinRowSide === "top" ? od : pinRowSide === "bottom" ? -od : 0);
8553
- if (!bottomsidepinlabel) {
8706
+ };
8707
+ addSidePins("left", leftCount);
8708
+ addSidePins("right", rightCount);
8709
+ addSidePins("top", topCount);
8710
+ addSidePins("bottom", bottomCount);
8711
+ } else {
8712
+ const pinSpacing = p;
8713
+ let pinStartX = 0;
8714
+ let pinStartY = 0;
8715
+ let pinDirectionX = 0;
8716
+ let pinDirectionY = 0;
8717
+ let rowDirectionX = 0;
8718
+ let rowDirectionY = 0;
8719
+ const numPinsPerRow = Math.ceil(numPins / rows);
8720
+ if (pinRowSide === "left" || pinRowSide === "right") {
8721
+ pinStartX = pinRowSide === "left" ? -width / 2 + pinRowHoleEdgeToEdgeDist : width / 2 - pinRowHoleEdgeToEdgeDist;
8722
+ pinStartY = (numPinsPerRow - 1) / 2 * pinSpacing;
8723
+ pinDirectionX = 0;
8724
+ pinDirectionY = -pinSpacing;
8725
+ rowDirectionX = pinRowSide === "left" ? pinSpacing : -pinSpacing;
8726
+ rowDirectionY = 0;
8727
+ } else {
8728
+ pinStartX = -(numPinsPerRow - 1) / 2 * pinSpacing;
8729
+ pinStartY = pinRowSide === "top" ? height / 2 - pinRowHoleEdgeToEdgeDist : -height / 2 + pinRowHoleEdgeToEdgeDist;
8730
+ pinDirectionX = pinSpacing;
8731
+ pinDirectionY = 0;
8732
+ rowDirectionX = 0;
8733
+ rowDirectionY = pinRowSide === "top" ? -pinSpacing : pinSpacing;
8734
+ }
8735
+ let pinNumber = 1;
8736
+ for (let row = 0; row < rows && pinNumber <= numPins; row++) {
8737
+ for (let col = 0; col < numPinsPerRow && pinNumber <= numPins; col++) {
8738
+ const xoff = pinStartX + col * pinDirectionX + row * rowDirectionX;
8739
+ const yoff = pinStartY + col * pinDirectionY + row * rowDirectionY;
8740
+ if (parameters.smd) {
8554
8741
  elements.push(
8555
- silkscreenPin({
8556
- fs: od / 5,
8557
- pn: pinNumber,
8558
- anchor_x,
8559
- anchor_y,
8560
- anchorplacement: pinlabelAnchorSide,
8561
- textalign: pinlabelTextAlign,
8562
- orthogonal: pinlabelorthogonal,
8563
- verticallyinverted: pinlabelverticallyinverted,
8564
- layer: "top"
8565
- })
8742
+ rectpad(pinNumber, xoff, yoff, parameters.od, parameters.od)
8566
8743
  );
8744
+ } else {
8745
+ if (pinNumber === 1) {
8746
+ elements.push(
8747
+ platedHoleWithRectPad({
8748
+ pn: pinNumber,
8749
+ x: xoff,
8750
+ y: yoff,
8751
+ holeDiameter: id,
8752
+ rectPadWidth: od,
8753
+ rectPadHeight: od
8754
+ })
8755
+ );
8756
+ } else {
8757
+ elements.push(platedhole(pinNumber, xoff, yoff, id, od));
8758
+ }
8567
8759
  }
8568
- if (doublesidedpinlabel || bottomsidepinlabel) {
8569
- elements.push(
8570
- silkscreenPin({
8571
- fs: od / 5,
8572
- pn: pinNumber,
8573
- anchor_x,
8574
- anchor_y,
8575
- anchorplacement: pinlabelAnchorSide,
8576
- textalign: pinlabelTextAlign,
8577
- orthogonal: pinlabelorthogonal,
8578
- verticallyinverted: pinlabelverticallyinverted,
8579
- layer: "bottom"
8580
- })
8581
- );
8760
+ if (!nopinlabels) {
8761
+ const anchor_x = xoff + (pinRowSide === "left" ? -od : pinRowSide === "right" ? od : 0);
8762
+ const anchor_y = yoff + (pinRowSide === "top" ? od : pinRowSide === "bottom" ? -od : 0);
8763
+ if (!bottomsidepinlabel) {
8764
+ elements.push(
8765
+ silkscreenPin({
8766
+ fs: od / 5,
8767
+ pn: pinNumber,
8768
+ anchor_x,
8769
+ anchor_y,
8770
+ anchorplacement: pinlabelAnchorSide,
8771
+ textalign: pinlabelTextAlign,
8772
+ orthogonal: pinlabelorthogonal,
8773
+ verticallyinverted: pinlabelverticallyinverted,
8774
+ layer: "top"
8775
+ })
8776
+ );
8777
+ }
8778
+ if (doublesidedpinlabel || bottomsidepinlabel) {
8779
+ elements.push(
8780
+ silkscreenPin({
8781
+ fs: od / 5,
8782
+ pn: pinNumber,
8783
+ anchor_x,
8784
+ anchor_y,
8785
+ anchorplacement: pinlabelAnchorSide,
8786
+ textalign: pinlabelTextAlign,
8787
+ orthogonal: pinlabelorthogonal,
8788
+ verticallyinverted: pinlabelverticallyinverted,
8789
+ layer: "bottom"
8790
+ })
8791
+ );
8792
+ }
8582
8793
  }
8794
+ pinNumber++;
8583
8795
  }
8584
- pinNumber++;
8585
8796
  }
8586
8797
  }
8587
8798
  if (holes) {
@@ -8623,6 +8834,62 @@ var mountedpcbmodule = (raw_params) => {
8623
8834
  }
8624
8835
  const refText = silkscreenRef(0, height / 2 + 1, 0.5);
8625
8836
  elements.push(refText);
8837
+ if (usbposition && usbtype) {
8838
+ let usbRectWidth;
8839
+ let usbRectHeight;
8840
+ if (usbtype === "c") {
8841
+ usbRectWidth = 8;
8842
+ usbRectHeight = 3;
8843
+ } else if (usbtype === "micro") {
8844
+ usbRectWidth = 6;
8845
+ usbRectHeight = 2;
8846
+ } else {
8847
+ return {
8848
+ circuitJson: elements,
8849
+ parameters
8850
+ };
8851
+ }
8852
+ let usbRect;
8853
+ if (usbposition === "left") {
8854
+ usbRect = [
8855
+ { x: -width / 2, y: -usbRectWidth / 2 },
8856
+ { x: -width / 2 + usbRectHeight, y: -usbRectWidth / 2 },
8857
+ { x: -width / 2 + usbRectHeight, y: usbRectWidth / 2 },
8858
+ { x: -width / 2, y: usbRectWidth / 2 },
8859
+ { x: -width / 2, y: -usbRectWidth / 2 }
8860
+ ];
8861
+ } else if (usbposition === "right") {
8862
+ usbRect = [
8863
+ { x: width / 2 - usbRectHeight, y: -usbRectWidth / 2 },
8864
+ { x: width / 2, y: -usbRectWidth / 2 },
8865
+ { x: width / 2, y: usbRectWidth / 2 },
8866
+ { x: width / 2 - usbRectHeight, y: usbRectWidth / 2 },
8867
+ { x: width / 2 - usbRectHeight, y: -usbRectWidth / 2 }
8868
+ ];
8869
+ } else if (usbposition === "top") {
8870
+ usbRect = [
8871
+ { x: -usbRectWidth / 2, y: height / 2 - usbRectHeight },
8872
+ { x: usbRectWidth / 2, y: height / 2 - usbRectHeight },
8873
+ { x: usbRectWidth / 2, y: height / 2 },
8874
+ { x: -usbRectWidth / 2, y: height / 2 },
8875
+ { x: -usbRectWidth / 2, y: height / 2 - usbRectHeight }
8876
+ ];
8877
+ } else if (usbposition === "bottom") {
8878
+ usbRect = [
8879
+ { x: -usbRectWidth / 2, y: -height / 2 },
8880
+ { x: usbRectWidth / 2, y: -height / 2 },
8881
+ { x: usbRectWidth / 2, y: -height / 2 + usbRectHeight },
8882
+ { x: -usbRectWidth / 2, y: -height / 2 + usbRectHeight },
8883
+ { x: -usbRectWidth / 2, y: -height / 2 }
8884
+ ];
8885
+ } else {
8886
+ return {
8887
+ circuitJson: elements,
8888
+ parameters
8889
+ };
8890
+ }
8891
+ elements.push(silkscreenpath(usbRect, { stroke_width: 0.1, layer: "top" }));
8892
+ }
8626
8893
  return {
8627
8894
  circuitJson: elements,
8628
8895
  parameters
@@ -8630,16 +8897,16 @@ var mountedpcbmodule = (raw_params) => {
8630
8897
  };
8631
8898
 
8632
8899
  // src/fn/to92l.ts
8633
- import { z as z78 } from "zod";
8900
+ import { z as z79 } from "zod";
8634
8901
  var to92l_def = base_def.extend({
8635
- fn: z78.string(),
8636
- num_pins: z78.number().default(3),
8637
- inline: z78.boolean().default(false),
8638
- p: z78.string().default("1.27mm"),
8639
- id: z78.string().default("0.75mm"),
8640
- od: z78.string().default("1.3mm"),
8641
- w: z78.string().default("4.8mm"),
8642
- h: z78.string().default("4.0mm")
8902
+ fn: z79.string(),
8903
+ num_pins: z79.number().default(3),
8904
+ inline: z79.boolean().default(false),
8905
+ p: z79.string().default("1.27mm"),
8906
+ id: z79.string().default("0.75mm"),
8907
+ od: z79.string().default("1.3mm"),
8908
+ w: z79.string().default("4.8mm"),
8909
+ h: z79.string().default("4.0mm")
8643
8910
  });
8644
8911
  var to92l = (raw_params) => {
8645
8912
  const parameters = to92l_def.parse(raw_params);