@tscircuit/footprinter 0.0.261 → 0.0.263

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
@@ -526,27 +526,35 @@ var circlepad = (pn, { x, y, radius }) => {
526
526
  var ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
527
527
 
528
528
  // src/fn/bga.ts
529
- import { z as z5 } from "zod";
529
+ import { z as z6 } from "zod";
530
+
531
+ // src/helpers/zod/base_def.ts
532
+ import { z as z3 } from "zod";
533
+ var base_def = z3.object({
534
+ noref: z3.boolean().optional().describe("disable ref label")
535
+ });
536
+
537
+ // src/fn/bga.ts
530
538
  import { length as length2, distance as distance2 } from "circuit-json";
531
539
 
532
540
  // src/helpers/zod/dim-2d.ts
533
- import { z as z3 } from "zod";
534
- var dim2d = z3.string().transform((a) => {
541
+ import { z as z4 } from "zod";
542
+ var dim2d = z4.string().transform((a) => {
535
543
  const [x, y] = a.split(/[x ]/);
536
544
  return {
537
545
  x: parseFloat(x),
538
546
  y: parseFloat(y)
539
547
  };
540
548
  }).pipe(
541
- z3.object({
542
- x: z3.number(),
543
- y: z3.number()
549
+ z4.object({
550
+ x: z4.number(),
551
+ y: z4.number()
544
552
  })
545
553
  );
546
554
 
547
555
  // src/helpers/zod/function-call.ts
548
- import { z as z4 } from "zod";
549
- var function_call = z4.string().or(z4.array(z4.any())).transform((a) => {
556
+ import { z as z5 } from "zod";
557
+ var function_call = z5.string().or(z5.array(z5.any())).transform((a) => {
550
558
  if (Array.isArray(a)) return a;
551
559
  if (a.startsWith("(") && a.endsWith(")")) {
552
560
  a = a.slice(1, -1);
@@ -555,24 +563,24 @@ var function_call = z4.string().or(z4.array(z4.any())).transform((a) => {
555
563
  const numVal = Number(v);
556
564
  return isNaN(numVal) ? v : numVal;
557
565
  });
558
- }).pipe(z4.array(z4.string().or(z4.number())));
566
+ }).pipe(z5.array(z5.string().or(z5.number())));
559
567
 
560
568
  // src/fn/bga.ts
561
569
  import "circuit-json";
562
- var bga_def = z5.object({
563
- fn: z5.string(),
564
- num_pins: z5.number().optional().default(64),
570
+ var bga_def = base_def.extend({
571
+ fn: z6.string(),
572
+ num_pins: z6.number().optional().default(64),
565
573
  grid: dim2d.optional(),
566
574
  p: distance2.default("0.8mm"),
567
575
  w: length2.optional(),
568
576
  h: length2.optional(),
569
577
  ball: length2.optional().describe("ball diameter"),
570
578
  pad: length2.optional().describe("pad width/height"),
571
- circularpads: z5.boolean().optional().describe("use circular pads"),
572
- tlorigin: z5.boolean().optional(),
573
- blorigin: z5.boolean().optional(),
574
- trorigin: z5.boolean().optional(),
575
- brorigin: z5.boolean().optional(),
579
+ circularpads: z6.boolean().optional().describe("use circular pads"),
580
+ tlorigin: z6.boolean().optional(),
581
+ blorigin: z6.boolean().optional(),
582
+ trorigin: z6.boolean().optional(),
583
+ brorigin: z6.boolean().optional(),
576
584
  missing: function_call.default([])
577
585
  }).transform((a) => {
578
586
  let origin = "tl";
@@ -742,7 +750,7 @@ var bga = (raw_params) => {
742
750
  };
743
751
 
744
752
  // src/fn/soic.ts
745
- import { z as z6 } from "zod";
753
+ import { z as z7 } from "zod";
746
754
  import { length as length3 } from "circuit-json";
747
755
 
748
756
  // src/helpers/pillpad.ts
@@ -762,16 +770,16 @@ var pillpad = (pn, x, y, w, h) => {
762
770
  };
763
771
 
764
772
  // src/fn/soic.ts
765
- var extendSoicDef = (newDefaults) => z6.object({
766
- fn: z6.string(),
767
- num_pins: z6.number().optional().default(8),
773
+ var extendSoicDef = (newDefaults) => z7.object({
774
+ fn: z7.string(),
775
+ num_pins: z7.number().optional().default(8),
768
776
  w: length3.default(length3.parse(newDefaults.w ?? "5.3mm")),
769
777
  p: length3.default(length3.parse(newDefaults.p ?? "1.27mm")),
770
778
  pw: length3.default(length3.parse(newDefaults.pw ?? "0.6mm")),
771
779
  pl: length3.default(length3.parse(newDefaults.pl ?? "1.0mm")),
772
- legsoutside: z6.boolean().optional().default(newDefaults.legsoutside ?? false),
773
- pillpads: z6.boolean().optional().default(newDefaults.pillpads ?? false),
774
- silkscreen_stroke_width: z6.number().optional().default(0.1)
780
+ legsoutside: z7.boolean().optional().default(newDefaults.legsoutside ?? false),
781
+ pillpads: z7.boolean().optional().default(newDefaults.pillpads ?? false),
782
+ silkscreen_stroke_width: z7.number().optional().default(0.1)
775
783
  }).transform((v) => {
776
784
  if (!v.pw && !v.pl) {
777
785
  v.pw = length3.parse("0.6mm");
@@ -855,12 +863,12 @@ var soicWithoutParsing = (parameters) => {
855
863
  };
856
864
 
857
865
  // src/fn/quad.ts
858
- import { z as z8 } from "zod";
866
+ import { z as z9 } from "zod";
859
867
  import { length as length4 } from "circuit-json";
860
868
 
861
869
  // src/helpers/zod/pin-order-specifier.ts
862
- import { z as z7 } from "zod";
863
- var pin_order_specifier = z7.enum([
870
+ import { z as z8 } from "zod";
871
+ var pin_order_specifier = z8.enum([
864
872
  "leftside",
865
873
  "topside",
866
874
  "rightside",
@@ -935,19 +943,19 @@ var getQuadPinMap = ({
935
943
  };
936
944
 
937
945
  // src/fn/quad.ts
938
- var base_quad_def = z8.object({
939
- fn: z8.string(),
940
- cc: z8.boolean().default(true).optional(),
941
- ccw: z8.boolean().default(true).optional(),
942
- startingpin: z8.string().or(z8.array(pin_order_specifier)).transform((a) => typeof a === "string" ? a.slice(1, -1).split(",") : a).pipe(z8.array(pin_order_specifier)).optional(),
943
- num_pins: z8.number().optional().default(64),
946
+ var base_quad_def = z9.object({
947
+ fn: z9.string(),
948
+ cc: z9.boolean().default(true).optional(),
949
+ ccw: z9.boolean().default(true).optional(),
950
+ startingpin: z9.string().or(z9.array(pin_order_specifier)).transform((a) => typeof a === "string" ? a.slice(1, -1).split(",") : a).pipe(z9.array(pin_order_specifier)).optional(),
951
+ num_pins: z9.number().optional().default(64),
944
952
  w: length4.optional(),
945
953
  h: length4.optional(),
946
954
  p: length4.default(length4.parse("0.5mm")),
947
955
  pw: length4.optional(),
948
956
  pl: length4.optional(),
949
- thermalpad: z8.union([z8.literal(true), dim2d]).optional(),
950
- legsoutside: z8.boolean().default(false)
957
+ thermalpad: z9.union([z9.literal(true), dim2d]).optional(),
958
+ legsoutside: z9.boolean().default(false)
951
959
  });
952
960
  var quadTransform = (v) => {
953
961
  if (v.w && !v.h) {
@@ -1369,17 +1377,17 @@ var sot363 = (raw_params) => {
1369
1377
  };
1370
1378
 
1371
1379
  // src/fn/sot886.ts
1372
- import { z as z9 } from "zod";
1380
+ import { z as z10 } from "zod";
1373
1381
  import { length as length5 } from "circuit-json";
1374
- var sot886_def = z9.object({
1375
- fn: z9.string(),
1376
- num_pins: z9.literal(6).default(6),
1377
- w: z9.string().default("1.01mm"),
1378
- h: z9.string().default("1.45mm"),
1379
- p: z9.string().default("0.5mm"),
1380
- pl: z9.string().default("0.33mm"),
1381
- pw: z9.string().default("0.27mm"),
1382
- string: z9.string().optional()
1382
+ var sot886_def = z10.object({
1383
+ fn: z10.string(),
1384
+ num_pins: z10.literal(6).default(6),
1385
+ w: z10.string().default("1.01mm"),
1386
+ h: z10.string().default("1.45mm"),
1387
+ p: z10.string().default("0.5mm"),
1388
+ pl: z10.string().default("0.33mm"),
1389
+ pw: z10.string().default("0.27mm"),
1390
+ string: z10.string().optional()
1383
1391
  });
1384
1392
  var sot886 = (raw_params) => {
1385
1393
  const parameters = sot886_def.parse({ fn: "sot886", ...raw_params });
@@ -1450,16 +1458,16 @@ var getSot886PadCoord = (pn, w, p, pl) => {
1450
1458
  };
1451
1459
 
1452
1460
  // src/fn/sot23.ts
1453
- import { z as z10 } from "zod";
1454
- var sot23_def = z10.object({
1455
- fn: z10.string(),
1456
- num_pins: z10.number().default(3),
1457
- w: z10.string().default("1.92mm"),
1458
- h: z10.string().default("2.74mm"),
1459
- pl: z10.string().default("0.8mm"),
1460
- pw: z10.string().default("0.764mm"),
1461
- p: z10.string().default("0.95mm"),
1462
- string: z10.string().optional()
1461
+ import { z as z11 } from "zod";
1462
+ var sot23_def = z11.object({
1463
+ fn: z11.string(),
1464
+ num_pins: z11.number().default(3),
1465
+ w: z11.string().default("1.92mm"),
1466
+ h: z11.string().default("2.74mm"),
1467
+ pl: z11.string().default("0.8mm"),
1468
+ pw: z11.string().default("0.764mm"),
1469
+ p: z11.string().default("0.95mm"),
1470
+ string: z11.string().optional()
1463
1471
  });
1464
1472
  var sot23_6_or_8_def = extendSoicDef({
1465
1473
  p: "0.95mm",
@@ -1748,7 +1756,7 @@ var dfn = (raw_params) => {
1748
1756
  };
1749
1757
 
1750
1758
  // src/fn/pinrow.ts
1751
- import { z as z13 } from "zod";
1759
+ import { z as z14 } from "zod";
1752
1760
  import { length as length6 } from "circuit-json";
1753
1761
 
1754
1762
  // src/helpers/silkscreenPin.ts
@@ -1835,24 +1843,24 @@ function determinePinlabelAnchorSide({
1835
1843
  }
1836
1844
 
1837
1845
  // src/fn/pinrow.ts
1838
- var pinrow_def = z13.object({
1839
- fn: z13.string(),
1840
- num_pins: z13.number().optional().default(6),
1841
- rows: z13.union([z13.string(), z13.number()]).transform((val) => Number(val)).optional().default(1).describe("number of rows"),
1846
+ var pinrow_def = z14.object({
1847
+ fn: z14.string(),
1848
+ num_pins: z14.number().optional().default(6),
1849
+ rows: z14.union([z14.string(), z14.number()]).transform((val) => Number(val)).optional().default(1).describe("number of rows"),
1842
1850
  p: length6.default("0.1in").describe("pitch"),
1843
1851
  id: length6.default("1.0mm").describe("inner diameter"),
1844
1852
  od: length6.default("1.5mm").describe("outer diameter"),
1845
- male: z13.boolean().optional().describe("for male pin headers"),
1846
- female: z13.boolean().optional().describe("for female pin headers"),
1847
- pinlabeltextalignleft: z13.boolean().optional().default(false),
1848
- pinlabeltextaligncenter: z13.boolean().optional().default(false),
1849
- pinlabeltextalignright: z13.boolean().optional().default(false),
1850
- pinlabelverticallyinverted: z13.boolean().optional().default(false),
1851
- pinlabelorthogonal: z13.boolean().optional().default(false),
1852
- nosquareplating: z13.boolean().optional().default(false).describe("do not use rectangular pad for pin 1"),
1853
- nopinlabels: z13.boolean().optional().default(false).describe("omit silkscreen pin labels"),
1854
- doublesidedpinlabel: z13.boolean().optional().default(false).describe("add silkscreen pins in top and bottom layers"),
1855
- bottomsidepinlabel: z13.boolean().optional().default(false).describe(
1853
+ male: z14.boolean().optional().describe("for male pin headers"),
1854
+ female: z14.boolean().optional().describe("for female pin headers"),
1855
+ pinlabeltextalignleft: z14.boolean().optional().default(false),
1856
+ pinlabeltextaligncenter: z14.boolean().optional().default(false),
1857
+ pinlabeltextalignright: z14.boolean().optional().default(false),
1858
+ pinlabelverticallyinverted: z14.boolean().optional().default(false),
1859
+ pinlabelorthogonal: z14.boolean().optional().default(false),
1860
+ nosquareplating: z14.boolean().optional().default(false).describe("do not use rectangular pad for pin 1"),
1861
+ nopinlabels: z14.boolean().optional().default(false).describe("omit silkscreen pin labels"),
1862
+ doublesidedpinlabel: z14.boolean().optional().default(false).describe("add silkscreen pins in top and bottom layers"),
1863
+ bottomsidepinlabel: z14.boolean().optional().default(false).describe(
1856
1864
  "place the silkscreen reference text on the bottom layer instead of top"
1857
1865
  )
1858
1866
  }).transform((data) => {
@@ -1866,7 +1874,7 @@ var pinrow_def = z13.object({
1866
1874
  }).superRefine((data, ctx) => {
1867
1875
  if (data.male && data.female) {
1868
1876
  ctx.addIssue({
1869
- code: z13.ZodIssueCode.custom,
1877
+ code: z14.ZodIssueCode.custom,
1870
1878
  message: "'male' and 'female' cannot both be true; it should be male or female.",
1871
1879
  path: ["male", "female"]
1872
1880
  });
@@ -2066,22 +2074,85 @@ var pinrow = (raw_params) => {
2066
2074
  };
2067
2075
 
2068
2076
  // src/fn/sot563.ts
2069
- var sot563_def = extendSoicDef({});
2077
+ import { z as z15 } from "zod";
2078
+ import { length as length7 } from "circuit-json";
2079
+ var sot563_def = z15.object({
2080
+ fn: z15.string(),
2081
+ num_pins: z15.literal(6).default(6),
2082
+ w: z15.string().default("2.1mm"),
2083
+ h: z15.string().default("2.45mm"),
2084
+ p: z15.string().default("0.5mm"),
2085
+ pl: z15.string().default("0.675mm"),
2086
+ pw: z15.string().default("0.35mm"),
2087
+ string: z15.string().optional()
2088
+ });
2070
2089
  var sot563 = (raw_params) => {
2071
- const parameters = sot563_def.parse({
2072
- fn: "sot563",
2073
- num_pins: 6,
2074
- w: 1.94,
2075
- p: 0.5,
2076
- pw: 0.3,
2077
- pl: 0.67,
2078
- legoutside: true
2079
- });
2090
+ const parameters = sot563_def.parse({ ...raw_params, fn: "sot563" });
2091
+ const w = length7.parse(parameters.w);
2092
+ const h = length7.parse(parameters.h);
2093
+ const p = length7.parse(parameters.p);
2094
+ const pl = length7.parse(parameters.pl);
2095
+ const pw = length7.parse(parameters.pw);
2096
+ const pads = [];
2097
+ for (let i = 0; i < 6; i++) {
2098
+ const { x, y } = getSot563PadCoord(i + 1, w, p, pl);
2099
+ pads.push(rectpad(i + 1, x, y, pl, pw));
2100
+ }
2101
+ const silkscreenTopLine = {
2102
+ type: "pcb_silkscreen_path",
2103
+ layer: "top",
2104
+ pcb_component_id: "",
2105
+ route: [
2106
+ { x: -w / 2, y: h / 2 },
2107
+ { x: w / 2, y: h / 2 }
2108
+ ],
2109
+ stroke_width: 0.05,
2110
+ pcb_silkscreen_path_id: ""
2111
+ };
2112
+ const silkscreenBottomLine = {
2113
+ type: "pcb_silkscreen_path",
2114
+ layer: "top",
2115
+ pcb_component_id: "",
2116
+ route: [
2117
+ { x: -w / 2, y: -h / 2 },
2118
+ { x: w / 2, y: -h / 2 }
2119
+ ],
2120
+ stroke_width: 0.05,
2121
+ pcb_silkscreen_path_id: ""
2122
+ };
2123
+ const pin1Position = getSot563PadCoord(1, w, p, pl);
2124
+ const pin1Marking = {
2125
+ type: "pcb_silkscreen_path",
2126
+ layer: "top",
2127
+ pcb_component_id: "pin_marker_1",
2128
+ route: [
2129
+ { x: pin1Position.x - pl / 2 - 0.3, y: pin1Position.y },
2130
+ { x: pin1Position.x - pl / 2 - 0.45, y: pin1Position.y + 0.15 },
2131
+ { x: pin1Position.x - pl / 2 - 0.45, y: pin1Position.y - 0.15 },
2132
+ { x: pin1Position.x - pl / 2 - 0.3, y: pin1Position.y }
2133
+ ],
2134
+ stroke_width: 0.05,
2135
+ pcb_silkscreen_path_id: "pin_marker_1"
2136
+ };
2137
+ const silkscreenRefText = silkscreenRef(0, h / 2 + 0.4, 0.25);
2080
2138
  return {
2081
- circuitJson: soicWithoutParsing(parameters),
2139
+ circuitJson: [
2140
+ ...pads,
2141
+ silkscreenTopLine,
2142
+ silkscreenBottomLine,
2143
+ silkscreenRefText,
2144
+ pin1Marking
2145
+ ],
2082
2146
  parameters
2083
2147
  };
2084
2148
  };
2149
+ var getSot563PadCoord = (pn, w, p, pl) => {
2150
+ const padCenterOffset = w / 2 - pl / 2;
2151
+ if (pn <= 3) {
2152
+ return { x: -padCenterOffset, y: p - (pn - 1) * p };
2153
+ }
2154
+ return { x: padCenterOffset, y: -p + (pn - 4) * p };
2155
+ };
2085
2156
 
2086
2157
  // src/fn/ms012.ts
2087
2158
  var ms012_def = extendSoicDef({
@@ -2112,23 +2183,23 @@ var ms013 = (raw_params) => {
2112
2183
  };
2113
2184
 
2114
2185
  // src/fn/sot723.ts
2115
- import { length as length7 } from "circuit-json";
2116
- import { z as z14 } from "zod";
2117
- var sot723_def = z14.object({
2118
- fn: z14.string(),
2119
- num_pins: z14.literal(3).default(3),
2120
- w: z14.string().default("1.2mm"),
2121
- h: z14.string().default("1.2mm"),
2122
- pw: z14.string().default("0.40mm"),
2123
- pl: z14.string().default("0.45mm"),
2124
- p: z14.string().default("0.575mm")
2186
+ import { length as length8 } from "circuit-json";
2187
+ import { z as z16 } from "zod";
2188
+ var sot723_def = z16.object({
2189
+ fn: z16.string(),
2190
+ num_pins: z16.literal(3).default(3),
2191
+ w: z16.string().default("1.2mm"),
2192
+ h: z16.string().default("1.2mm"),
2193
+ pw: z16.string().default("0.40mm"),
2194
+ pl: z16.string().default("0.45mm"),
2195
+ p: z16.string().default("0.575mm")
2125
2196
  });
2126
2197
  var sot723 = (raw_params) => {
2127
2198
  const parameters = sot723_def.parse(raw_params);
2128
2199
  const pad2 = sot723WithoutParsing(parameters);
2129
2200
  const silkscreenRefText = silkscreenRef(
2130
2201
  0,
2131
- length7.parse(parameters.h),
2202
+ length8.parse(parameters.h),
2132
2203
  0.2
2133
2204
  );
2134
2205
  return {
@@ -2140,11 +2211,11 @@ var getCcwSot723Coords = (parameters) => {
2140
2211
  const { pn, w, h, pl, p } = parameters;
2141
2212
  if (pn === 1) {
2142
2213
  return { x: p, y: 0 };
2143
- } else if (pn === 2) {
2214
+ }
2215
+ if (pn === 2) {
2144
2216
  return { x: -p, y: -0.4 };
2145
- } else {
2146
- return { x: -p, y: 0.4 };
2147
2217
  }
2218
+ return { x: -p, y: 0.4 };
2148
2219
  };
2149
2220
  var sot723WithoutParsing = (parameters) => {
2150
2221
  const pads = [];
@@ -2171,22 +2242,22 @@ var sot723WithoutParsing = (parameters) => {
2171
2242
  };
2172
2243
 
2173
2244
  // src/fn/sod123.ts
2174
- import { z as z15 } from "zod";
2175
- import { length as length8 } from "circuit-json";
2176
- var sod_def = z15.object({
2177
- fn: z15.string(),
2178
- num_pins: z15.literal(2).default(2),
2179
- w: z15.string().default("2.36mm"),
2180
- h: z15.string().default("1.22mm"),
2181
- pl: z15.string().default("0.9mm"),
2182
- pw: z15.string().default("1.2mm"),
2183
- p: z15.string().default("3.30mm")
2245
+ import { z as z17 } from "zod";
2246
+ import { length as length9 } from "circuit-json";
2247
+ var sod_def = z17.object({
2248
+ fn: z17.string(),
2249
+ num_pins: z17.literal(2).default(2),
2250
+ w: z17.string().default("2.36mm"),
2251
+ h: z17.string().default("1.22mm"),
2252
+ pl: z17.string().default("0.9mm"),
2253
+ pw: z17.string().default("1.2mm"),
2254
+ p: z17.string().default("3.30mm")
2184
2255
  });
2185
2256
  var sod123 = (raw_params) => {
2186
2257
  const parameters = sod_def.parse(raw_params);
2187
2258
  const silkscreenRefText = silkscreenRef(
2188
2259
  0,
2189
- length8.parse(parameters.h) / 4 + 0.4,
2260
+ length9.parse(parameters.h) / 4 + 0.4,
2190
2261
  0.3
2191
2262
  );
2192
2263
  return {
@@ -2226,14 +2297,14 @@ var sodWithoutParsing = (parameters) => {
2226
2297
 
2227
2298
  // src/fn/axial.ts
2228
2299
  import {
2229
- length as length9
2300
+ length as length10
2230
2301
  } from "circuit-json";
2231
- import { z as z16 } from "zod";
2232
- var axial_def = z16.object({
2233
- fn: z16.string(),
2234
- p: length9.optional().default("2.54mm"),
2235
- id: length9.optional().default("0.7mm"),
2236
- od: length9.optional().default("1.4mm")
2302
+ import { z as z18 } from "zod";
2303
+ var axial_def = z18.object({
2304
+ fn: z18.string(),
2305
+ p: length10.optional().default("2.54mm"),
2306
+ id: length10.optional().default("0.7mm"),
2307
+ od: length10.optional().default("1.4mm")
2237
2308
  });
2238
2309
  var axial = (raw_params) => {
2239
2310
  const parameters = axial_def.parse(raw_params);
@@ -2265,8 +2336,8 @@ var axial = (raw_params) => {
2265
2336
  };
2266
2337
 
2267
2338
  // src/fn/pushbutton.ts
2268
- import { length as length10 } from "circuit-json";
2269
- import { z as z17 } from "zod";
2339
+ import { length as length11 } from "circuit-json";
2340
+ import { z as z19 } from "zod";
2270
2341
 
2271
2342
  // src/helpers/silkscreenpath.ts
2272
2343
  var silkscreenpath = (route, options = {}) => {
@@ -2281,12 +2352,12 @@ var silkscreenpath = (route, options = {}) => {
2281
2352
  };
2282
2353
 
2283
2354
  // src/fn/pushbutton.ts
2284
- var pushbutton_def = z17.object({
2285
- fn: z17.literal("pushbutton"),
2286
- w: length10.default(4.5),
2287
- h: length10.default(6.5),
2288
- id: length10.default(1),
2289
- od: length10.default(1.2)
2355
+ var pushbutton_def = z19.object({
2356
+ fn: z19.literal("pushbutton"),
2357
+ w: length11.default(4.5),
2358
+ h: length11.default(6.5),
2359
+ id: length11.default(1),
2360
+ od: length11.default(1.2)
2290
2361
  });
2291
2362
  var pushbutton = (raw_params) => {
2292
2363
  const parameters = pushbutton_def.parse(raw_params);
@@ -2333,24 +2404,24 @@ var pushbutton = (raw_params) => {
2333
2404
 
2334
2405
  // src/fn/stampboard.ts
2335
2406
  import {
2336
- length as length11
2407
+ length as length12
2337
2408
  } from "circuit-json";
2338
- import { z as z18 } from "zod";
2339
- var stampboard_def = z18.object({
2340
- fn: z18.string(),
2341
- w: length11.default("22.58mm"),
2342
- h: length11.optional(),
2343
- left: length11.optional().default(20),
2344
- right: length11.optional().default(20),
2345
- top: length11.optional().default(2),
2346
- bottom: length11.optional().default(2),
2347
- p: length11.default(length11.parse("2.54mm")),
2348
- pw: length11.default(length11.parse("1.6mm")),
2349
- pl: length11.default(length11.parse("2.4mm")),
2350
- innerhole: z18.boolean().default(false),
2351
- innerholeedgedistance: length11.default(length11.parse("1.61mm")),
2352
- silkscreenlabels: z18.boolean().default(false),
2353
- silkscreenlabelmargin: length11.default(length11.parse("0.1mm"))
2409
+ import { z as z20 } from "zod";
2410
+ var stampboard_def = z20.object({
2411
+ fn: z20.string(),
2412
+ w: length12.default("22.58mm"),
2413
+ h: length12.optional(),
2414
+ left: length12.optional().default(20),
2415
+ right: length12.optional().default(20),
2416
+ top: length12.optional().default(2),
2417
+ bottom: length12.optional().default(2),
2418
+ p: length12.default(length12.parse("2.54mm")),
2419
+ pw: length12.default(length12.parse("1.6mm")),
2420
+ pl: length12.default(length12.parse("2.4mm")),
2421
+ innerhole: z20.boolean().default(false),
2422
+ innerholeedgedistance: length12.default(length12.parse("1.61mm")),
2423
+ silkscreenlabels: z20.boolean().default(false),
2424
+ silkscreenlabelmargin: length12.default(length12.parse("0.1mm"))
2354
2425
  });
2355
2426
  var getHeight = (parameters) => {
2356
2427
  const params = stampboard_def.parse(parameters);
@@ -2759,22 +2830,22 @@ var stampboard = (raw_params) => {
2759
2830
 
2760
2831
  // src/fn/stampreceiver.ts
2761
2832
  import {
2762
- length as length12
2833
+ length as length13
2763
2834
  } from "circuit-json";
2764
- import { z as z19 } from "zod";
2765
- var stampreceiver_def = z19.object({
2766
- fn: z19.string(),
2767
- w: length12.default("22.58mm"),
2768
- h: length12.optional(),
2769
- left: length12.optional().default(20),
2770
- right: length12.optional().default(20),
2771
- top: length12.optional().default(2),
2772
- bottom: length12.optional().default(2),
2773
- p: length12.default(length12.parse("2.54mm")),
2774
- pw: length12.default(length12.parse("1.6mm")),
2775
- pl: length12.default(length12.parse("3.2mm")),
2776
- innerhole: z19.boolean().default(false),
2777
- innerholeedgedistance: length12.default(length12.parse("1.61mm"))
2835
+ import { z as z21 } from "zod";
2836
+ var stampreceiver_def = z21.object({
2837
+ fn: z21.string(),
2838
+ w: length13.default("22.58mm"),
2839
+ h: length13.optional(),
2840
+ left: length13.optional().default(20),
2841
+ right: length13.optional().default(20),
2842
+ top: length13.optional().default(2),
2843
+ bottom: length13.optional().default(2),
2844
+ p: length13.default(length13.parse("2.54mm")),
2845
+ pw: length13.default(length13.parse("1.6mm")),
2846
+ pl: length13.default(length13.parse("3.2mm")),
2847
+ innerhole: z21.boolean().default(false),
2848
+ innerholeedgedistance: length13.default(length13.parse("1.61mm"))
2778
2849
  });
2779
2850
  var getHeight2 = (parameters) => {
2780
2851
  const params = stampreceiver_def.parse(parameters);
@@ -3075,20 +3146,20 @@ var lqfp = (parameters) => {
3075
3146
 
3076
3147
  // src/fn/breakoutheaders.ts
3077
3148
  import {
3078
- length as length13
3149
+ length as length14
3079
3150
  } from "circuit-json";
3080
- import { z as z20 } from "zod";
3081
- var breakoutheaders_def = z20.object({
3082
- fn: z20.string(),
3083
- w: length13.default("10mm"),
3084
- h: length13.optional(),
3085
- left: length13.optional().default(20),
3086
- right: length13.optional().default(20),
3087
- top: length13.optional().default(0),
3088
- bottom: length13.optional().default(0),
3089
- p: length13.default(length13.parse("2.54mm")),
3090
- id: length13.optional().default(length13.parse("1mm")),
3091
- od: length13.optional().default(length13.parse("1.5mm"))
3151
+ import { z as z22 } from "zod";
3152
+ var breakoutheaders_def = z22.object({
3153
+ fn: z22.string(),
3154
+ w: length14.default("10mm"),
3155
+ h: length14.optional(),
3156
+ left: length14.optional().default(20),
3157
+ right: length14.optional().default(20),
3158
+ top: length14.optional().default(0),
3159
+ bottom: length14.optional().default(0),
3160
+ p: length14.default(length14.parse("2.54mm")),
3161
+ id: length14.optional().default(length14.parse("1mm")),
3162
+ od: length14.optional().default(length14.parse("1.5mm"))
3092
3163
  });
3093
3164
  var getHeight3 = (parameters) => {
3094
3165
  const params = breakoutheaders_def.parse(parameters);
@@ -3280,9 +3351,9 @@ var breakoutheaders = (raw_params) => {
3280
3351
 
3281
3352
  // src/fn/hc49.ts
3282
3353
  import {
3283
- length as length14
3354
+ length as length15
3284
3355
  } from "circuit-json";
3285
- import { z as z21 } from "zod";
3356
+ import { z as z23 } from "zod";
3286
3357
  var generate_u_curve = (centerX, centerY, radius, direction) => {
3287
3358
  return Array.from({ length: 25 }, (_, i) => {
3288
3359
  const theta = i / 24 * Math.PI - Math.PI / 2;
@@ -3292,13 +3363,13 @@ var generate_u_curve = (centerX, centerY, radius, direction) => {
3292
3363
  };
3293
3364
  });
3294
3365
  };
3295
- var hc49_def = z21.object({
3296
- fn: z21.string(),
3297
- p: length14.optional().default("4.88mm"),
3298
- id: length14.optional().default("0.8mm"),
3299
- od: length14.optional().default("1.5mm"),
3300
- w: length14.optional().default("5.6mm"),
3301
- h: length14.optional().default("3.5mm")
3366
+ var hc49_def = z23.object({
3367
+ fn: z23.string(),
3368
+ p: length15.optional().default("4.88mm"),
3369
+ id: length15.optional().default("0.8mm"),
3370
+ od: length15.optional().default("1.5mm"),
3371
+ w: length15.optional().default("5.6mm"),
3372
+ h: length15.optional().default("3.5mm")
3302
3373
  });
3303
3374
  var hc49 = (raw_params) => {
3304
3375
  const parameters = hc49_def.parse(raw_params);
@@ -3338,12 +3409,12 @@ var hc49 = (raw_params) => {
3338
3409
  };
3339
3410
 
3340
3411
  // src/fn/pad.ts
3341
- import { z as z22 } from "zod";
3342
- import { length as length15 } from "circuit-json";
3412
+ import { z as z24 } from "zod";
3413
+ import { length as length16 } from "circuit-json";
3343
3414
  import { mm as mm5 } from "@tscircuit/mm";
3344
- var pad_def = z22.object({
3345
- w: length15,
3346
- h: length15
3415
+ var pad_def = z24.object({
3416
+ w: length16,
3417
+ h: length16
3347
3418
  });
3348
3419
  var pad = (params) => {
3349
3420
  const { w, h } = params;
@@ -3359,17 +3430,17 @@ var pad = (params) => {
3359
3430
  };
3360
3431
 
3361
3432
  // src/fn/to92.ts
3362
- import { z as z23 } from "zod";
3363
- var to92_def = z23.object({
3364
- fn: z23.string(),
3365
- num_pins: z23.union([z23.literal(3), z23.literal(2)]).default(3),
3366
- p: z23.string().default("1.27mm"),
3367
- id: z23.string().default("0.72mm"),
3368
- od: z23.string().default("0.95mm"),
3369
- w: z23.string().default("4.5mm"),
3370
- h: z23.string().default("4.5mm"),
3371
- inline: z23.boolean().default(false),
3372
- string: z23.string().optional()
3433
+ import { z as z25 } from "zod";
3434
+ var to92_def = z25.object({
3435
+ fn: z25.string(),
3436
+ num_pins: z25.union([z25.literal(3), z25.literal(2)]).default(3),
3437
+ p: z25.string().default("1.27mm"),
3438
+ id: z25.string().default("0.72mm"),
3439
+ od: z25.string().default("0.95mm"),
3440
+ w: z25.string().default("4.5mm"),
3441
+ h: z25.string().default("4.5mm"),
3442
+ inline: z25.boolean().default(false),
3443
+ string: z25.string().optional()
3373
3444
  });
3374
3445
  var generateSemicircle = (centerX, centerY, radius) => {
3375
3446
  return Array.from({ length: 25 }, (_, i) => {
@@ -3442,22 +3513,22 @@ var to92 = (raw_params) => {
3442
3513
  };
3443
3514
 
3444
3515
  // src/fn/sod523.ts
3445
- import { z as z24 } from "zod";
3446
- import { length as length16 } from "circuit-json";
3447
- var sod_def2 = z24.object({
3448
- fn: z24.string(),
3449
- num_pins: z24.literal(2).default(2),
3450
- w: z24.string().default("2.15mm"),
3451
- h: z24.string().default("1.20mm"),
3452
- pl: z24.string().default("0.5mm"),
3453
- pw: z24.string().default("0.6mm"),
3454
- p: z24.string().default("1.4mm")
3516
+ import { z as z26 } from "zod";
3517
+ import { length as length17 } from "circuit-json";
3518
+ var sod_def2 = z26.object({
3519
+ fn: z26.string(),
3520
+ num_pins: z26.literal(2).default(2),
3521
+ w: z26.string().default("2.15mm"),
3522
+ h: z26.string().default("1.20mm"),
3523
+ pl: z26.string().default("0.5mm"),
3524
+ pw: z26.string().default("0.6mm"),
3525
+ p: z26.string().default("1.4mm")
3455
3526
  });
3456
3527
  var sod523 = (raw_params) => {
3457
3528
  const parameters = sod_def2.parse(raw_params);
3458
3529
  const silkscreenRefText = silkscreenRef(
3459
3530
  0,
3460
- length16.parse(parameters.h),
3531
+ length17.parse(parameters.h),
3461
3532
  0.3
3462
3533
  );
3463
3534
  const silkscreenLine = {
@@ -3466,20 +3537,20 @@ var sod523 = (raw_params) => {
3466
3537
  pcb_component_id: "",
3467
3538
  route: [
3468
3539
  {
3469
- x: length16.parse(parameters.p) / 2,
3470
- y: length16.parse(parameters.h) / 2
3540
+ x: length17.parse(parameters.p) / 2,
3541
+ y: length17.parse(parameters.h) / 2
3471
3542
  },
3472
3543
  {
3473
- x: -length16.parse(parameters.w) / 2 - 0.2,
3474
- y: length16.parse(parameters.h) / 2
3544
+ x: -length17.parse(parameters.w) / 2 - 0.2,
3545
+ y: length17.parse(parameters.h) / 2
3475
3546
  },
3476
3547
  {
3477
- x: -length16.parse(parameters.w) / 2 - 0.2,
3478
- y: -length16.parse(parameters.h) / 2
3548
+ x: -length17.parse(parameters.w) / 2 - 0.2,
3549
+ y: -length17.parse(parameters.h) / 2
3479
3550
  },
3480
3551
  {
3481
- x: length16.parse(parameters.p) / 2,
3482
- y: -length16.parse(parameters.h) / 2
3552
+ x: length17.parse(parameters.p) / 2,
3553
+ y: -length17.parse(parameters.h) / 2
3483
3554
  }
3484
3555
  ],
3485
3556
  stroke_width: 0.1,
@@ -3567,22 +3638,22 @@ var sop8 = (raw_params) => {
3567
3638
  };
3568
3639
 
3569
3640
  // src/fn/sod80.ts
3570
- import { z as z25 } from "zod";
3571
- import { length as length17 } from "circuit-json";
3572
- var sod80_def = z25.object({
3573
- fn: z25.string(),
3574
- num_pins: z25.literal(2).default(2),
3575
- w: z25.string().default("5.0mm"),
3576
- h: z25.string().default("2.30mm"),
3577
- pl: z25.string().default("1.25mm"),
3578
- pw: z25.string().default("2mm"),
3579
- p: z25.string().default("3.75mm")
3641
+ import { z as z27 } from "zod";
3642
+ import { length as length18 } from "circuit-json";
3643
+ var sod80_def = z27.object({
3644
+ fn: z27.string(),
3645
+ num_pins: z27.literal(2).default(2),
3646
+ w: z27.string().default("5.0mm"),
3647
+ h: z27.string().default("2.30mm"),
3648
+ pl: z27.string().default("1.25mm"),
3649
+ pw: z27.string().default("2mm"),
3650
+ p: z27.string().default("3.75mm")
3580
3651
  });
3581
3652
  var sod80 = (raw_params) => {
3582
3653
  const parameters = sod80_def.parse(raw_params);
3583
3654
  const silkscreenRefText = silkscreenRef(
3584
3655
  0,
3585
- length17.parse(parameters.h) / 2 + 1,
3656
+ length18.parse(parameters.h) / 2 + 1,
3586
3657
  0.3
3587
3658
  );
3588
3659
  const silkscreenLine = {
@@ -3591,20 +3662,20 @@ var sod80 = (raw_params) => {
3591
3662
  pcb_component_id: "",
3592
3663
  route: [
3593
3664
  {
3594
- x: length17.parse(parameters.p) / 2 + 0.5,
3595
- y: length17.parse(parameters.h) / 2 + 0.5
3665
+ x: length18.parse(parameters.p) / 2 + 0.5,
3666
+ y: length18.parse(parameters.h) / 2 + 0.5
3596
3667
  },
3597
3668
  {
3598
- x: -length17.parse(parameters.w) / 2 - 0.5,
3599
- y: length17.parse(parameters.h) / 2 + 0.5
3669
+ x: -length18.parse(parameters.w) / 2 - 0.5,
3670
+ y: length18.parse(parameters.h) / 2 + 0.5
3600
3671
  },
3601
3672
  {
3602
- x: -length17.parse(parameters.w) / 2 - 0.5,
3603
- y: -length17.parse(parameters.h) / 2 - 0.5
3673
+ x: -length18.parse(parameters.w) / 2 - 0.5,
3674
+ y: -length18.parse(parameters.h) / 2 - 0.5
3604
3675
  },
3605
3676
  {
3606
- x: length17.parse(parameters.p) / 2 + 0.5,
3607
- y: -length17.parse(parameters.h) / 2 - 0.5
3677
+ x: length18.parse(parameters.p) / 2 + 0.5,
3678
+ y: -length18.parse(parameters.h) / 2 - 0.5
3608
3679
  }
3609
3680
  ],
3610
3681
  stroke_width: 0.1,
@@ -3643,22 +3714,22 @@ var sod80WithoutParsing = (parameters) => {
3643
3714
  };
3644
3715
 
3645
3716
  // src/fn/sod123w.ts
3646
- import { z as z26 } from "zod";
3647
- import { length as length18 } from "circuit-json";
3648
- var sod_def3 = z26.object({
3649
- fn: z26.string(),
3650
- num_pins: z26.literal(2).default(2),
3651
- w: z26.string().default("4.4mm"),
3652
- h: z26.string().default("2.1mm"),
3653
- pl: z26.string().default("1.2mm"),
3654
- pw: z26.string().default("1.2mm"),
3655
- p: z26.string().default("2.9mm")
3717
+ import { z as z28 } from "zod";
3718
+ import { length as length19 } from "circuit-json";
3719
+ var sod_def3 = z28.object({
3720
+ fn: z28.string(),
3721
+ num_pins: z28.literal(2).default(2),
3722
+ w: z28.string().default("4.4mm"),
3723
+ h: z28.string().default("2.1mm"),
3724
+ pl: z28.string().default("1.2mm"),
3725
+ pw: z28.string().default("1.2mm"),
3726
+ p: z28.string().default("2.9mm")
3656
3727
  });
3657
3728
  var sod123w = (raw_params) => {
3658
3729
  const parameters = sod_def3.parse(raw_params);
3659
3730
  const silkscreenRefText = silkscreenRef(
3660
3731
  0,
3661
- length18.parse(parameters.h) - 0.5,
3732
+ length19.parse(parameters.h) - 0.5,
3662
3733
  0.3
3663
3734
  );
3664
3735
  const silkscreenLine = {
@@ -3667,20 +3738,20 @@ var sod123w = (raw_params) => {
3667
3738
  pcb_component_id: "",
3668
3739
  route: [
3669
3740
  {
3670
- x: length18.parse(parameters.p) / 2,
3671
- y: length18.parse(parameters.h) / 2
3741
+ x: length19.parse(parameters.p) / 2,
3742
+ y: length19.parse(parameters.h) / 2
3672
3743
  },
3673
3744
  {
3674
- x: -length18.parse(parameters.w) / 2 - 0.2,
3675
- y: length18.parse(parameters.h) / 2
3745
+ x: -length19.parse(parameters.w) / 2 - 0.2,
3746
+ y: length19.parse(parameters.h) / 2
3676
3747
  },
3677
3748
  {
3678
- x: -length18.parse(parameters.w) / 2 - 0.2,
3679
- y: -length18.parse(parameters.h) / 2
3749
+ x: -length19.parse(parameters.w) / 2 - 0.2,
3750
+ y: -length19.parse(parameters.h) / 2
3680
3751
  },
3681
3752
  {
3682
- x: length18.parse(parameters.p) / 2,
3683
- y: -length18.parse(parameters.h) / 2
3753
+ x: length19.parse(parameters.p) / 2,
3754
+ y: -length19.parse(parameters.h) / 2
3684
3755
  }
3685
3756
  ],
3686
3757
  stroke_width: 0.1,
@@ -3722,22 +3793,22 @@ var sodWithoutParsing3 = (parameters) => {
3722
3793
  };
3723
3794
 
3724
3795
  // src/fn/sod323.ts
3725
- import { z as z27 } from "zod";
3726
- import { length as length19 } from "circuit-json";
3727
- var sod_def4 = z27.object({
3728
- fn: z27.string(),
3729
- num_pins: z27.literal(2).default(2),
3730
- w: z27.string().default("3.30mm"),
3731
- h: z27.string().default("1.80mm"),
3732
- pl: z27.string().default("0.60mm"),
3733
- pw: z27.string().default("0.45mm"),
3734
- p: z27.string().default("2.1mm")
3796
+ import { z as z29 } from "zod";
3797
+ import { length as length20 } from "circuit-json";
3798
+ var sod_def4 = z29.object({
3799
+ fn: z29.string(),
3800
+ num_pins: z29.literal(2).default(2),
3801
+ w: z29.string().default("3.30mm"),
3802
+ h: z29.string().default("1.80mm"),
3803
+ pl: z29.string().default("0.60mm"),
3804
+ pw: z29.string().default("0.45mm"),
3805
+ p: z29.string().default("2.1mm")
3735
3806
  });
3736
3807
  var sod323 = (raw_params) => {
3737
3808
  const parameters = sod_def4.parse(raw_params);
3738
3809
  const silkscreenRefText = silkscreenRef(
3739
3810
  0,
3740
- length19.parse(parameters.h) - 0.5,
3811
+ length20.parse(parameters.h) - 0.5,
3741
3812
  0.3
3742
3813
  );
3743
3814
  const silkscreenLine = {
@@ -3746,20 +3817,20 @@ var sod323 = (raw_params) => {
3746
3817
  pcb_component_id: "",
3747
3818
  route: [
3748
3819
  {
3749
- x: length19.parse(parameters.p) / 2,
3750
- y: length19.parse(parameters.h) / 2
3820
+ x: length20.parse(parameters.p) / 2,
3821
+ y: length20.parse(parameters.h) / 2
3751
3822
  },
3752
3823
  {
3753
- x: -length19.parse(parameters.w) / 2,
3754
- y: length19.parse(parameters.h) / 2
3824
+ x: -length20.parse(parameters.w) / 2,
3825
+ y: length20.parse(parameters.h) / 2
3755
3826
  },
3756
3827
  {
3757
- x: -length19.parse(parameters.w) / 2,
3758
- y: -length19.parse(parameters.h) / 2
3828
+ x: -length20.parse(parameters.w) / 2,
3829
+ y: -length20.parse(parameters.h) / 2
3759
3830
  },
3760
3831
  {
3761
- x: length19.parse(parameters.p) / 2,
3762
- y: -length19.parse(parameters.h) / 2
3832
+ x: length20.parse(parameters.p) / 2,
3833
+ y: -length20.parse(parameters.h) / 2
3763
3834
  }
3764
3835
  ],
3765
3836
  stroke_width: 0.1,
@@ -3801,22 +3872,22 @@ var sodWithoutParsing4 = (parameters) => {
3801
3872
  };
3802
3873
 
3803
3874
  // src/fn/sod923.ts
3804
- import { z as z28 } from "zod";
3805
- import { length as length20 } from "circuit-json";
3806
- var sod_def5 = z28.object({
3807
- fn: z28.string(),
3808
- num_pins: z28.literal(2).default(2),
3809
- w: z28.string().default("1.4mm"),
3810
- h: z28.string().default("0.9mm"),
3811
- pl: z28.string().default("0.36mm"),
3812
- pw: z28.string().default("0.25mm"),
3813
- p: z28.string().default("0.85mm")
3875
+ import { z as z30 } from "zod";
3876
+ import { length as length21 } from "circuit-json";
3877
+ var sod_def5 = z30.object({
3878
+ fn: z30.string(),
3879
+ num_pins: z30.literal(2).default(2),
3880
+ w: z30.string().default("1.4mm"),
3881
+ h: z30.string().default("0.9mm"),
3882
+ pl: z30.string().default("0.36mm"),
3883
+ pw: z30.string().default("0.25mm"),
3884
+ p: z30.string().default("0.85mm")
3814
3885
  });
3815
3886
  var sod923 = (raw_params) => {
3816
3887
  const parameters = sod_def5.parse(raw_params);
3817
3888
  const silkscreenRefText = silkscreenRef(
3818
3889
  0,
3819
- length20.parse(parameters.h),
3890
+ length21.parse(parameters.h),
3820
3891
  0.3
3821
3892
  );
3822
3893
  const silkscreenLine = {
@@ -3825,20 +3896,20 @@ var sod923 = (raw_params) => {
3825
3896
  pcb_component_id: "",
3826
3897
  route: [
3827
3898
  {
3828
- x: length20.parse(parameters.p) / 2 + 0.15,
3829
- y: length20.parse(parameters.h) / 2
3899
+ x: length21.parse(parameters.p) / 2 + 0.15,
3900
+ y: length21.parse(parameters.h) / 2
3830
3901
  },
3831
3902
  {
3832
- x: -length20.parse(parameters.w) / 2 - 0.15,
3833
- y: length20.parse(parameters.h) / 2
3903
+ x: -length21.parse(parameters.w) / 2 - 0.15,
3904
+ y: length21.parse(parameters.h) / 2
3834
3905
  },
3835
3906
  {
3836
- x: -length20.parse(parameters.w) / 2 - 0.15,
3837
- y: -length20.parse(parameters.h) / 2
3907
+ x: -length21.parse(parameters.w) / 2 - 0.15,
3908
+ y: -length21.parse(parameters.h) / 2
3838
3909
  },
3839
3910
  {
3840
- x: length20.parse(parameters.p) / 2 + 0.15,
3841
- y: -length20.parse(parameters.h) / 2
3911
+ x: length21.parse(parameters.p) / 2 + 0.15,
3912
+ y: -length21.parse(parameters.h) / 2
3842
3913
  }
3843
3914
  ],
3844
3915
  stroke_width: 0.1,
@@ -3881,22 +3952,22 @@ var sodWithoutParsing5 = (parameters) => {
3881
3952
  };
3882
3953
 
3883
3954
  // src/fn/sod882.ts
3884
- import { z as z29 } from "zod";
3885
- import { length as length21 } from "circuit-json";
3886
- var sod_def6 = z29.object({
3887
- fn: z29.string(),
3888
- num_pins: z29.literal(2).default(2),
3889
- w: z29.string().default("1.3mm"),
3890
- h: z29.string().default("0.9mm"),
3891
- pl: z29.string().default("0.4mm"),
3892
- pw: z29.string().default("0.7mm"),
3893
- p: z29.string().default("0.7mm")
3955
+ import { z as z31 } from "zod";
3956
+ import { length as length22 } from "circuit-json";
3957
+ var sod_def6 = z31.object({
3958
+ fn: z31.string(),
3959
+ num_pins: z31.literal(2).default(2),
3960
+ w: z31.string().default("1.3mm"),
3961
+ h: z31.string().default("0.9mm"),
3962
+ pl: z31.string().default("0.4mm"),
3963
+ pw: z31.string().default("0.7mm"),
3964
+ p: z31.string().default("0.7mm")
3894
3965
  });
3895
3966
  var sod882 = (raw_params) => {
3896
3967
  const parameters = sod_def6.parse(raw_params);
3897
3968
  const silkscreenRefText = silkscreenRef(
3898
3969
  0,
3899
- length21.parse(parameters.h) + 0.1,
3970
+ length22.parse(parameters.h) + 0.1,
3900
3971
  0.3
3901
3972
  );
3902
3973
  const silkscreenLine = {
@@ -3905,20 +3976,20 @@ var sod882 = (raw_params) => {
3905
3976
  pcb_component_id: "",
3906
3977
  route: [
3907
3978
  {
3908
- x: length21.parse(parameters.p) / 2 + 0.2,
3909
- y: length21.parse(parameters.h) / 2 + 0.2
3979
+ x: length22.parse(parameters.p) / 2 + 0.2,
3980
+ y: length22.parse(parameters.h) / 2 + 0.2
3910
3981
  },
3911
3982
  {
3912
- x: -length21.parse(parameters.w) / 2 - 0.2,
3913
- y: length21.parse(parameters.h) / 2 + 0.2
3983
+ x: -length22.parse(parameters.w) / 2 - 0.2,
3984
+ y: length22.parse(parameters.h) / 2 + 0.2
3914
3985
  },
3915
3986
  {
3916
- x: -length21.parse(parameters.w) / 2 - 0.2,
3917
- y: -length21.parse(parameters.h) / 2 - 0.2
3987
+ x: -length22.parse(parameters.w) / 2 - 0.2,
3988
+ y: -length22.parse(parameters.h) / 2 - 0.2
3918
3989
  },
3919
3990
  {
3920
- x: length21.parse(parameters.p) / 2 + 0.2,
3921
- y: -length21.parse(parameters.h) / 2 - 0.2
3991
+ x: length22.parse(parameters.p) / 2 + 0.2,
3992
+ y: -length22.parse(parameters.h) / 2 - 0.2
3922
3993
  }
3923
3994
  ],
3924
3995
  stroke_width: 0.1,
@@ -3961,22 +4032,22 @@ var sodWithoutParsing6 = (parameters) => {
3961
4032
  };
3962
4033
 
3963
4034
  // src/fn/sod323f.ts
3964
- import { z as z30 } from "zod";
3965
- import { length as length22 } from "circuit-json";
3966
- var sod_def7 = z30.object({
3967
- fn: z30.string(),
3968
- num_pins: z30.literal(2).default(2),
3969
- w: z30.string().default("3,05mm"),
3970
- h: z30.string().default("1.65mm"),
3971
- pl: z30.string().default("0.6mm"),
3972
- pw: z30.string().default("0.6mm"),
3973
- pad_spacing: z30.string().default("2.2mm")
4035
+ import { z as z32 } from "zod";
4036
+ import { length as length23 } from "circuit-json";
4037
+ var sod_def7 = z32.object({
4038
+ fn: z32.string(),
4039
+ num_pins: z32.literal(2).default(2),
4040
+ w: z32.string().default("3,05mm"),
4041
+ h: z32.string().default("1.65mm"),
4042
+ pl: z32.string().default("0.6mm"),
4043
+ pw: z32.string().default("0.6mm"),
4044
+ pad_spacing: z32.string().default("2.2mm")
3974
4045
  });
3975
4046
  var sod323f = (raw_params) => {
3976
4047
  const parameters = sod_def7.parse(raw_params);
3977
4048
  const silkscreenRefText = silkscreenRef(
3978
4049
  0,
3979
- length22.parse(parameters.h),
4050
+ length23.parse(parameters.h),
3980
4051
  0.3
3981
4052
  );
3982
4053
  const silkscreenLine = {
@@ -3985,20 +4056,20 @@ var sod323f = (raw_params) => {
3985
4056
  pcb_component_id: "",
3986
4057
  route: [
3987
4058
  {
3988
- x: length22.parse(parameters.pad_spacing) / 2,
3989
- y: length22.parse(parameters.h) / 2
4059
+ x: length23.parse(parameters.pad_spacing) / 2,
4060
+ y: length23.parse(parameters.h) / 2
3990
4061
  },
3991
4062
  {
3992
- x: -length22.parse(parameters.w) / 2 - 0.2,
3993
- y: length22.parse(parameters.h) / 2
4063
+ x: -length23.parse(parameters.w) / 2 - 0.2,
4064
+ y: length23.parse(parameters.h) / 2
3994
4065
  },
3995
4066
  {
3996
- x: -length22.parse(parameters.w) / 2 - 0.2,
3997
- y: -length22.parse(parameters.h) / 2
4067
+ x: -length23.parse(parameters.w) / 2 - 0.2,
4068
+ y: -length23.parse(parameters.h) / 2
3998
4069
  },
3999
4070
  {
4000
- x: length22.parse(parameters.pad_spacing) / 2,
4001
- y: -length22.parse(parameters.h) / 2
4071
+ x: length23.parse(parameters.pad_spacing) / 2,
4072
+ y: -length23.parse(parameters.h) / 2
4002
4073
  }
4003
4074
  ],
4004
4075
  stroke_width: 0.1,
@@ -4041,22 +4112,22 @@ var sodWithoutParsing7 = (parameters) => {
4041
4112
  };
4042
4113
 
4043
4114
  // src/fn/sod123f.ts
4044
- import { z as z31 } from "zod";
4045
- import { length as length23 } from "circuit-json";
4046
- var sod_def8 = z31.object({
4047
- fn: z31.string(),
4048
- num_pins: z31.literal(2).default(2),
4049
- w: z31.string().default("4.4mm"),
4050
- h: z31.string().default("2.1mm"),
4051
- pl: z31.string().default("1.2mm"),
4052
- pw: z31.string().default("1.2mm"),
4053
- p: z31.string().default("2.9mm")
4115
+ import { z as z33 } from "zod";
4116
+ import { length as length24 } from "circuit-json";
4117
+ var sod_def8 = z33.object({
4118
+ fn: z33.string(),
4119
+ num_pins: z33.literal(2).default(2),
4120
+ w: z33.string().default("4.4mm"),
4121
+ h: z33.string().default("2.1mm"),
4122
+ pl: z33.string().default("1.2mm"),
4123
+ pw: z33.string().default("1.2mm"),
4124
+ p: z33.string().default("2.9mm")
4054
4125
  });
4055
4126
  var sod123f = (raw_params) => {
4056
4127
  const parameters = sod_def8.parse(raw_params);
4057
4128
  const silkscreenRefText = silkscreenRef(
4058
4129
  0,
4059
- length23.parse(parameters.h),
4130
+ length24.parse(parameters.h),
4060
4131
  0.3
4061
4132
  );
4062
4133
  const silkscreenLine = {
@@ -4065,20 +4136,20 @@ var sod123f = (raw_params) => {
4065
4136
  pcb_component_id: "",
4066
4137
  route: [
4067
4138
  {
4068
- x: length23.parse(parameters.p) / 2,
4069
- y: length23.parse(parameters.h) / 2
4139
+ x: length24.parse(parameters.p) / 2,
4140
+ y: length24.parse(parameters.h) / 2
4070
4141
  },
4071
4142
  {
4072
- x: -length23.parse(parameters.w) / 2 - 0.2,
4073
- y: length23.parse(parameters.h) / 2
4143
+ x: -length24.parse(parameters.w) / 2 - 0.2,
4144
+ y: length24.parse(parameters.h) / 2
4074
4145
  },
4075
4146
  {
4076
- x: -length23.parse(parameters.w) / 2 - 0.2,
4077
- y: -length23.parse(parameters.h) / 2
4147
+ x: -length24.parse(parameters.w) / 2 - 0.2,
4148
+ y: -length24.parse(parameters.h) / 2
4078
4149
  },
4079
4150
  {
4080
- x: length23.parse(parameters.p) / 2,
4081
- y: -length23.parse(parameters.h) / 2
4151
+ x: length24.parse(parameters.p) / 2,
4152
+ y: -length24.parse(parameters.h) / 2
4082
4153
  }
4083
4154
  ],
4084
4155
  stroke_width: 0.1,
@@ -4121,22 +4192,22 @@ var sodWithoutParsing8 = (parameters) => {
4121
4192
  };
4122
4193
 
4123
4194
  // src/fn/sod123fl.ts
4124
- import { z as z32 } from "zod";
4125
- import { length as length24 } from "circuit-json";
4126
- var sod123FL_def = z32.object({
4127
- fn: z32.string(),
4128
- num_pins: z32.literal(2).default(2),
4129
- w: z32.string().default("4.4mm"),
4130
- h: z32.string().default("2.1mm"),
4131
- pl: z32.string().default("0.91mm"),
4132
- pw: z32.string().default("1.22mm"),
4133
- p: z32.string().default("3.146mm")
4195
+ import { z as z34 } from "zod";
4196
+ import { length as length25 } from "circuit-json";
4197
+ var sod123FL_def = z34.object({
4198
+ fn: z34.string(),
4199
+ num_pins: z34.literal(2).default(2),
4200
+ w: z34.string().default("4.4mm"),
4201
+ h: z34.string().default("2.1mm"),
4202
+ pl: z34.string().default("0.91mm"),
4203
+ pw: z34.string().default("1.22mm"),
4204
+ p: z34.string().default("3.146mm")
4134
4205
  });
4135
4206
  var sod123fl = (raw_params) => {
4136
4207
  const parameters = sod123FL_def.parse(raw_params);
4137
4208
  const silkscreenRefText = silkscreenRef(
4138
4209
  0,
4139
- length24.parse(parameters.h),
4210
+ length25.parse(parameters.h),
4140
4211
  0.3
4141
4212
  );
4142
4213
  const silkscreenLine = {
@@ -4145,20 +4216,20 @@ var sod123fl = (raw_params) => {
4145
4216
  pcb_component_id: "",
4146
4217
  route: [
4147
4218
  {
4148
- x: length24.parse(parameters.p) / 2,
4149
- y: length24.parse(parameters.h) / 2
4219
+ x: length25.parse(parameters.p) / 2,
4220
+ y: length25.parse(parameters.h) / 2
4150
4221
  },
4151
4222
  {
4152
- x: -length24.parse(parameters.w) / 2 - 0.2,
4153
- y: length24.parse(parameters.h) / 2
4223
+ x: -length25.parse(parameters.w) / 2 - 0.2,
4224
+ y: length25.parse(parameters.h) / 2
4154
4225
  },
4155
4226
  {
4156
- x: -length24.parse(parameters.w) / 2 - 0.2,
4157
- y: -length24.parse(parameters.h) / 2
4227
+ x: -length25.parse(parameters.w) / 2 - 0.2,
4228
+ y: -length25.parse(parameters.h) / 2
4158
4229
  },
4159
4230
  {
4160
- x: length24.parse(parameters.p) / 2,
4161
- y: -length24.parse(parameters.h) / 2
4231
+ x: length25.parse(parameters.p) / 2,
4232
+ y: -length25.parse(parameters.h) / 2
4162
4233
  }
4163
4234
  ],
4164
4235
  stroke_width: 0.1,
@@ -4201,22 +4272,22 @@ var sodWithoutParsing9 = (parameters) => {
4201
4272
  };
4202
4273
 
4203
4274
  // src/fn/sod723.ts
4204
- import { z as z33 } from "zod";
4205
- import { length as length25 } from "circuit-json";
4206
- var sod_def9 = z33.object({
4207
- fn: z33.string(),
4208
- num_pins: z33.literal(2).default(2),
4209
- w: z33.string().default("1.80mm"),
4210
- h: z33.string().default("1.00mm"),
4211
- pl: z33.string().default("0.66mm"),
4212
- pw: z33.string().default("0.5mm"),
4213
- p: z33.string().default("0.8mm")
4275
+ import { z as z35 } from "zod";
4276
+ import { length as length26 } from "circuit-json";
4277
+ var sod_def9 = z35.object({
4278
+ fn: z35.string(),
4279
+ num_pins: z35.literal(2).default(2),
4280
+ w: z35.string().default("1.80mm"),
4281
+ h: z35.string().default("1.00mm"),
4282
+ pl: z35.string().default("0.66mm"),
4283
+ pw: z35.string().default("0.5mm"),
4284
+ p: z35.string().default("0.8mm")
4214
4285
  });
4215
4286
  var sod723 = (raw_params) => {
4216
4287
  const parameters = sod_def9.parse(raw_params);
4217
4288
  const silkscreenRefText = silkscreenRef(
4218
4289
  0,
4219
- length25.parse(parameters.h),
4290
+ length26.parse(parameters.h),
4220
4291
  0.3
4221
4292
  );
4222
4293
  const silkscreenLine = {
@@ -4225,20 +4296,20 @@ var sod723 = (raw_params) => {
4225
4296
  pcb_component_id: "",
4226
4297
  route: [
4227
4298
  {
4228
- x: length25.parse(parameters.p) / 2,
4229
- y: length25.parse(parameters.h) / 2
4299
+ x: length26.parse(parameters.p) / 2,
4300
+ y: length26.parse(parameters.h) / 2
4230
4301
  },
4231
4302
  {
4232
- x: -length25.parse(parameters.w) / 2 - 0.1,
4233
- y: length25.parse(parameters.h) / 2
4303
+ x: -length26.parse(parameters.w) / 2 - 0.1,
4304
+ y: length26.parse(parameters.h) / 2
4234
4305
  },
4235
4306
  {
4236
- x: -length25.parse(parameters.w) / 2 - 0.1,
4237
- y: -length25.parse(parameters.h) / 2
4307
+ x: -length26.parse(parameters.w) / 2 - 0.1,
4308
+ y: -length26.parse(parameters.h) / 2
4238
4309
  },
4239
4310
  {
4240
- x: length25.parse(parameters.p) / 2,
4241
- y: -length25.parse(parameters.h) / 2
4311
+ x: length26.parse(parameters.p) / 2,
4312
+ y: -length26.parse(parameters.h) / 2
4242
4313
  }
4243
4314
  ],
4244
4315
  stroke_width: 0.1,
@@ -4281,22 +4352,22 @@ var sodWithoutParsing10 = (parameters) => {
4281
4352
  };
4282
4353
 
4283
4354
  // src/fn/sod128.ts
4284
- import { z as z34 } from "zod";
4285
- import { length as length26 } from "circuit-json";
4286
- var sod_def10 = z34.object({
4287
- fn: z34.string(),
4288
- num_pins: z34.literal(2).default(2),
4289
- w: z34.string().default("6.2mm"),
4290
- h: z34.string().default("3.4mm"),
4291
- pl: z34.string().default("1.4mm"),
4292
- pw: z34.string().default("2.1mm"),
4293
- p: z34.string().default("4.4mm")
4355
+ import { z as z36 } from "zod";
4356
+ import { length as length27 } from "circuit-json";
4357
+ var sod_def10 = z36.object({
4358
+ fn: z36.string(),
4359
+ num_pins: z36.literal(2).default(2),
4360
+ w: z36.string().default("6.2mm"),
4361
+ h: z36.string().default("3.4mm"),
4362
+ pl: z36.string().default("1.4mm"),
4363
+ pw: z36.string().default("2.1mm"),
4364
+ p: z36.string().default("4.4mm")
4294
4365
  });
4295
4366
  var sod128 = (raw_params) => {
4296
4367
  const parameters = sod_def10.parse(raw_params);
4297
4368
  const silkscreenRefText = silkscreenRef(
4298
4369
  0,
4299
- length26.parse(parameters.h) / 2 + 0.4,
4370
+ length27.parse(parameters.h) / 2 + 0.4,
4300
4371
  0.3
4301
4372
  );
4302
4373
  const silkscreenLine = {
@@ -4305,20 +4376,20 @@ var sod128 = (raw_params) => {
4305
4376
  pcb_component_id: "",
4306
4377
  route: [
4307
4378
  {
4308
- x: length26.parse(parameters.p) / 2,
4309
- y: length26.parse(parameters.h) / 2
4379
+ x: length27.parse(parameters.p) / 2,
4380
+ y: length27.parse(parameters.h) / 2
4310
4381
  },
4311
4382
  {
4312
- x: -length26.parse(parameters.w) / 2 - 0.2,
4313
- y: length26.parse(parameters.h) / 2
4383
+ x: -length27.parse(parameters.w) / 2 - 0.2,
4384
+ y: length27.parse(parameters.h) / 2
4314
4385
  },
4315
4386
  {
4316
- x: -length26.parse(parameters.w) / 2 - 0.2,
4317
- y: -length26.parse(parameters.h) / 2
4387
+ x: -length27.parse(parameters.w) / 2 - 0.2,
4388
+ y: -length27.parse(parameters.h) / 2
4318
4389
  },
4319
4390
  {
4320
- x: length26.parse(parameters.p) / 2,
4321
- y: -length26.parse(parameters.h) / 2
4391
+ x: length27.parse(parameters.p) / 2,
4392
+ y: -length27.parse(parameters.h) / 2
4322
4393
  }
4323
4394
  ],
4324
4395
  stroke_width: 0.1,
@@ -4361,29 +4432,29 @@ var sodWithoutParsing11 = (parameters) => {
4361
4432
  };
4362
4433
 
4363
4434
  // src/fn/sot89.ts
4364
- import { z as z35 } from "zod";
4365
- var sot89_def = z35.object({
4366
- fn: z35.string(),
4367
- num_pins: z35.union([z35.literal(3), z35.literal(5)]).default(3),
4368
- w: z35.string().default("4.20mm"),
4369
- h: z35.string().default("4.80mm"),
4370
- pl: z35.string().default("1.3mm"),
4371
- pw: z35.string().default("0.9mm"),
4372
- p: z35.string().default("1.5mm"),
4373
- string: z35.string().optional()
4435
+ import { z as z37 } from "zod";
4436
+ var sot89_def = z37.object({
4437
+ fn: z37.string(),
4438
+ num_pins: z37.union([z37.literal(3), z37.literal(5)]).default(3),
4439
+ w: z37.string().default("4.20mm"),
4440
+ h: z37.string().default("4.80mm"),
4441
+ pl: z37.string().default("1.3mm"),
4442
+ pw: z37.string().default("0.9mm"),
4443
+ p: z37.string().default("1.5mm"),
4444
+ string: z37.string().optional()
4374
4445
  });
4375
4446
  var sot89_3 = (parameters) => {
4376
4447
  const pads = [];
4377
4448
  const padGap = Number.parseFloat(parameters.p);
4378
4449
  const padWidth = Number.parseFloat(parameters.pw);
4379
- const length49 = Number.parseFloat(parameters.w);
4450
+ const length50 = Number.parseFloat(parameters.w);
4380
4451
  const padHeight = Number.parseFloat(parameters.pl);
4381
4452
  const centerExtra = 0.175;
4382
4453
  const outerPadXShift = (padHeight - (padHeight + centerExtra)) / 2;
4383
4454
  pads.push(
4384
- rectpad(1, -length49 / 2 + outerPadXShift, padGap, padHeight, padWidth),
4385
- rectpad(2, -length49 / 2, 0, padHeight + centerExtra, padWidth),
4386
- rectpad(3, -length49 / 2 + outerPadXShift, -padGap, padHeight, padWidth)
4455
+ rectpad(1, -length50 / 2 + outerPadXShift, padGap, padHeight, padWidth),
4456
+ rectpad(2, -length50 / 2, 0, padHeight + centerExtra, padWidth),
4457
+ rectpad(3, -length50 / 2 + outerPadXShift, -padGap, padHeight, padWidth)
4387
4458
  );
4388
4459
  const silkscreenRefText = silkscreenRef(0, 0, 0.3);
4389
4460
  const width = Number.parseFloat(parameters.w) / 2 - 1;
@@ -4423,7 +4494,7 @@ var sot89_5 = (parameters) => {
4423
4494
  const pads = [];
4424
4495
  const padGap = Number.parseFloat(parameters.p);
4425
4496
  const padWidth = Number.parseFloat(parameters.pw);
4426
- const length49 = Number.parseFloat(parameters.w);
4497
+ const length50 = Number.parseFloat(parameters.w);
4427
4498
  pads.push(
4428
4499
  rectpad(1, -1.85, -1.5, 1.5, 0.7),
4429
4500
  rectpad(2, -1.85, 1.5, 1.5, 0.7),
@@ -4491,18 +4562,18 @@ var sot89 = (raw_params) => {
4491
4562
 
4492
4563
  // src/fn/to220.ts
4493
4564
  import {
4494
- length as length27
4565
+ length as length28
4495
4566
  } from "circuit-json";
4496
- import { z as z36 } from "zod";
4497
- var to220_def = z36.object({
4498
- fn: z36.string(),
4499
- p: length27.optional().default("5.0mm"),
4500
- id: length27.optional().default("1.0mm"),
4501
- od: length27.optional().default("1.9mm"),
4502
- w: length27.optional().default("13mm"),
4503
- h: length27.optional().default("7mm"),
4504
- num_pins: z36.number().optional(),
4505
- string: z36.string().optional()
4567
+ import { z as z38 } from "zod";
4568
+ var to220_def = z38.object({
4569
+ fn: z38.string(),
4570
+ p: length28.optional().default("5.0mm"),
4571
+ id: length28.optional().default("1.0mm"),
4572
+ od: length28.optional().default("1.9mm"),
4573
+ w: length28.optional().default("13mm"),
4574
+ h: length28.optional().default("7mm"),
4575
+ num_pins: z38.number().optional(),
4576
+ string: z38.string().optional()
4506
4577
  });
4507
4578
  var to220 = (raw_params) => {
4508
4579
  const parameters = to220_def.parse(raw_params);
@@ -4582,22 +4653,22 @@ var to220 = (raw_params) => {
4582
4653
  };
4583
4654
 
4584
4655
  // src/fn/minimelf.ts
4585
- import { z as z37 } from "zod";
4586
- import { length as length28 } from "circuit-json";
4587
- var minimelf_def = z37.object({
4588
- fn: z37.string(),
4589
- num_pins: z37.literal(2).default(2),
4590
- w: z37.string().default("5.40mm"),
4591
- h: z37.string().default("2.30mm"),
4592
- pl: z37.string().default("1.30mm"),
4593
- pw: z37.string().default("1.70mm"),
4594
- p: z37.string().default("3.5mm")
4656
+ import { z as z39 } from "zod";
4657
+ import { length as length29 } from "circuit-json";
4658
+ var minimelf_def = z39.object({
4659
+ fn: z39.string(),
4660
+ num_pins: z39.literal(2).default(2),
4661
+ w: z39.string().default("5.40mm"),
4662
+ h: z39.string().default("2.30mm"),
4663
+ pl: z39.string().default("1.30mm"),
4664
+ pw: z39.string().default("1.70mm"),
4665
+ p: z39.string().default("3.5mm")
4595
4666
  });
4596
4667
  var minimelf = (raw_params) => {
4597
4668
  const parameters = minimelf_def.parse(raw_params);
4598
4669
  const silkscreenRefText = silkscreenRef(
4599
4670
  0,
4600
- length28.parse(parameters.h) / 2 + 0.4,
4671
+ length29.parse(parameters.h) / 2 + 0.4,
4601
4672
  0.3
4602
4673
  );
4603
4674
  const silkscreenLine = {
@@ -4606,20 +4677,20 @@ var minimelf = (raw_params) => {
4606
4677
  pcb_component_id: "",
4607
4678
  route: [
4608
4679
  {
4609
- x: length28.parse(parameters.p) / 2,
4610
- y: length28.parse(parameters.h) / 2
4680
+ x: length29.parse(parameters.p) / 2,
4681
+ y: length29.parse(parameters.h) / 2
4611
4682
  },
4612
4683
  {
4613
- x: -length28.parse(parameters.w) / 2,
4614
- y: length28.parse(parameters.h) / 2
4684
+ x: -length29.parse(parameters.w) / 2,
4685
+ y: length29.parse(parameters.h) / 2
4615
4686
  },
4616
4687
  {
4617
- x: -length28.parse(parameters.w) / 2,
4618
- y: -length28.parse(parameters.h) / 2
4688
+ x: -length29.parse(parameters.w) / 2,
4689
+ y: -length29.parse(parameters.h) / 2
4619
4690
  },
4620
4691
  {
4621
- x: length28.parse(parameters.p) / 2,
4622
- y: -length28.parse(parameters.h) / 2
4692
+ x: length29.parse(parameters.p) / 2,
4693
+ y: -length29.parse(parameters.h) / 2
4623
4694
  }
4624
4695
  ],
4625
4696
  stroke_width: 0.1,
@@ -4658,22 +4729,22 @@ var miniMelfWithoutParsing = (parameters) => {
4658
4729
  };
4659
4730
 
4660
4731
  // src/fn/sod882d.ts
4661
- import { z as z38 } from "zod";
4662
- import { length as length29 } from "circuit-json";
4663
- var sod_def11 = z38.object({
4664
- fn: z38.string(),
4665
- num_pins: z38.literal(2).default(2),
4666
- w: z38.string().default("1.90mm"),
4667
- h: z38.string().default("1.33mm"),
4668
- pl: z38.string().default("0.5mm"),
4669
- pw: z38.string().default("0.7mm"),
4670
- p: z38.string().default("0.8mm")
4732
+ import { z as z40 } from "zod";
4733
+ import { length as length30 } from "circuit-json";
4734
+ var sod_def11 = z40.object({
4735
+ fn: z40.string(),
4736
+ num_pins: z40.literal(2).default(2),
4737
+ w: z40.string().default("1.90mm"),
4738
+ h: z40.string().default("1.33mm"),
4739
+ pl: z40.string().default("0.5mm"),
4740
+ pw: z40.string().default("0.7mm"),
4741
+ p: z40.string().default("0.8mm")
4671
4742
  });
4672
4743
  var sod882d = (raw_params) => {
4673
4744
  const parameters = sod_def11.parse(raw_params);
4674
4745
  const silkscreenRefText = silkscreenRef(
4675
4746
  0,
4676
- length29.parse(parameters.h) + 0.1,
4747
+ length30.parse(parameters.h) + 0.1,
4677
4748
  0.3
4678
4749
  );
4679
4750
  const silkscreenLine = {
@@ -4682,20 +4753,20 @@ var sod882d = (raw_params) => {
4682
4753
  pcb_component_id: "",
4683
4754
  route: [
4684
4755
  {
4685
- x: length29.parse(parameters.p) / 2 + 0.1,
4686
- y: length29.parse(parameters.h) / 2
4756
+ x: length30.parse(parameters.p) / 2 + 0.1,
4757
+ y: length30.parse(parameters.h) / 2
4687
4758
  },
4688
4759
  {
4689
- x: -length29.parse(parameters.w) / 2,
4690
- y: length29.parse(parameters.h) / 2
4760
+ x: -length30.parse(parameters.w) / 2,
4761
+ y: length30.parse(parameters.h) / 2
4691
4762
  },
4692
4763
  {
4693
- x: -length29.parse(parameters.w) / 2,
4694
- y: -length29.parse(parameters.h) / 2
4764
+ x: -length30.parse(parameters.w) / 2,
4765
+ y: -length30.parse(parameters.h) / 2
4695
4766
  },
4696
4767
  {
4697
- x: length29.parse(parameters.p) / 2 + 0.1,
4698
- y: -length29.parse(parameters.h) / 2
4768
+ x: length30.parse(parameters.p) / 2 + 0.1,
4769
+ y: -length30.parse(parameters.h) / 2
4699
4770
  }
4700
4771
  ],
4701
4772
  stroke_width: 0.1,
@@ -4738,22 +4809,22 @@ var sodWithoutParsing12 = (parameters) => {
4738
4809
  };
4739
4810
 
4740
4811
  // src/fn/melf.ts
4741
- import { z as z39 } from "zod";
4742
- import { length as length30 } from "circuit-json";
4743
- var melf_def = z39.object({
4744
- fn: z39.string(),
4745
- num_pins: z39.literal(2).default(2),
4746
- w: z39.string().default("7.0mm"),
4747
- h: z39.string().default("3.35mm"),
4748
- pl: z39.string().default("1.50mm"),
4749
- pw: z39.string().default("2.70mm"),
4750
- p: z39.string().default("4.8mm")
4812
+ import { z as z41 } from "zod";
4813
+ import { length as length31 } from "circuit-json";
4814
+ var melf_def = z41.object({
4815
+ fn: z41.string(),
4816
+ num_pins: z41.literal(2).default(2),
4817
+ w: z41.string().default("7.0mm"),
4818
+ h: z41.string().default("3.35mm"),
4819
+ pl: z41.string().default("1.50mm"),
4820
+ pw: z41.string().default("2.70mm"),
4821
+ p: z41.string().default("4.8mm")
4751
4822
  });
4752
4823
  var melf = (raw_params) => {
4753
4824
  const parameters = melf_def.parse(raw_params);
4754
4825
  const silkscreenRefText = silkscreenRef(
4755
4826
  0,
4756
- length30.parse(parameters.h),
4827
+ length31.parse(parameters.h),
4757
4828
  0.3
4758
4829
  );
4759
4830
  const silkscreenLine = {
@@ -4762,20 +4833,20 @@ var melf = (raw_params) => {
4762
4833
  pcb_component_id: "",
4763
4834
  route: [
4764
4835
  {
4765
- x: length30.parse(parameters.p) / 2,
4766
- y: length30.parse(parameters.h) / 2
4836
+ x: length31.parse(parameters.p) / 2,
4837
+ y: length31.parse(parameters.h) / 2
4767
4838
  },
4768
4839
  {
4769
- x: -length30.parse(parameters.w) / 2,
4770
- y: length30.parse(parameters.h) / 2
4840
+ x: -length31.parse(parameters.w) / 2,
4841
+ y: length31.parse(parameters.h) / 2
4771
4842
  },
4772
4843
  {
4773
- x: -length30.parse(parameters.w) / 2,
4774
- y: -length30.parse(parameters.h) / 2
4844
+ x: -length31.parse(parameters.w) / 2,
4845
+ y: -length31.parse(parameters.h) / 2
4775
4846
  },
4776
4847
  {
4777
- x: length30.parse(parameters.p) / 2,
4778
- y: -length30.parse(parameters.h) / 2
4848
+ x: length31.parse(parameters.p) / 2,
4849
+ y: -length31.parse(parameters.h) / 2
4779
4850
  }
4780
4851
  ],
4781
4852
  stroke_width: 0.1,
@@ -4818,22 +4889,22 @@ var melfWithoutParsing = (parameters) => {
4818
4889
  };
4819
4890
 
4820
4891
  // src/fn/micromelf.ts
4821
- import { z as z40 } from "zod";
4822
- import { length as length31 } from "circuit-json";
4823
- var micromelf_def = z40.object({
4824
- fn: z40.string(),
4825
- num_pins: z40.literal(2).default(2),
4826
- w: z40.string().default("3.0mm"),
4827
- h: z40.string().default("1.80mm"),
4828
- pl: z40.string().default("0.80mm"),
4829
- pw: z40.string().default("1.20mm"),
4830
- p: z40.string().default("1.6mm")
4892
+ import { z as z42 } from "zod";
4893
+ import { length as length32 } from "circuit-json";
4894
+ var micromelf_def = z42.object({
4895
+ fn: z42.string(),
4896
+ num_pins: z42.literal(2).default(2),
4897
+ w: z42.string().default("3.0mm"),
4898
+ h: z42.string().default("1.80mm"),
4899
+ pl: z42.string().default("0.80mm"),
4900
+ pw: z42.string().default("1.20mm"),
4901
+ p: z42.string().default("1.6mm")
4831
4902
  });
4832
4903
  var micromelf = (raw_params) => {
4833
4904
  const parameters = micromelf_def.parse(raw_params);
4834
4905
  const silkscreenRefText = silkscreenRef(
4835
4906
  0,
4836
- length31.parse(parameters.h),
4907
+ length32.parse(parameters.h),
4837
4908
  0.3
4838
4909
  );
4839
4910
  const silkscreenLine = {
@@ -4842,20 +4913,20 @@ var micromelf = (raw_params) => {
4842
4913
  pcb_component_id: "",
4843
4914
  route: [
4844
4915
  {
4845
- x: length31.parse(parameters.p) / 2,
4846
- y: length31.parse(parameters.h) / 2
4916
+ x: length32.parse(parameters.p) / 2,
4917
+ y: length32.parse(parameters.h) / 2
4847
4918
  },
4848
4919
  {
4849
- x: -length31.parse(parameters.w) / 2 - 0.1,
4850
- y: length31.parse(parameters.h) / 2
4920
+ x: -length32.parse(parameters.w) / 2 - 0.1,
4921
+ y: length32.parse(parameters.h) / 2
4851
4922
  },
4852
4923
  {
4853
- x: -length31.parse(parameters.w) / 2 - 0.1,
4854
- y: -length31.parse(parameters.h) / 2
4924
+ x: -length32.parse(parameters.w) / 2 - 0.1,
4925
+ y: -length32.parse(parameters.h) / 2
4855
4926
  },
4856
4927
  {
4857
- x: length31.parse(parameters.p) / 2,
4858
- y: -length31.parse(parameters.h) / 2
4928
+ x: length32.parse(parameters.p) / 2,
4929
+ y: -length32.parse(parameters.h) / 2
4859
4930
  }
4860
4931
  ],
4861
4932
  stroke_width: 0.1,
@@ -4898,22 +4969,22 @@ var microMelfWithoutParsing = (parameters) => {
4898
4969
  };
4899
4970
 
4900
4971
  // src/fn/sma.ts
4901
- import { z as z41 } from "zod";
4902
- import { length as length32 } from "circuit-json";
4903
- var sma_def = z41.object({
4904
- fn: z41.string(),
4905
- num_pins: z41.literal(2).default(2),
4906
- w: z41.string().default("7.10mm"),
4907
- h: z41.string().default("3.40mm"),
4908
- pl: z41.string().default("2.45mm"),
4909
- pw: z41.string().default("1.80mm"),
4910
- p: z41.string().default("4.05mm")
4972
+ import { z as z43 } from "zod";
4973
+ import { length as length33 } from "circuit-json";
4974
+ var sma_def = z43.object({
4975
+ fn: z43.string(),
4976
+ num_pins: z43.literal(2).default(2),
4977
+ w: z43.string().default("7.10mm"),
4978
+ h: z43.string().default("3.40mm"),
4979
+ pl: z43.string().default("2.45mm"),
4980
+ pw: z43.string().default("1.80mm"),
4981
+ p: z43.string().default("4.05mm")
4911
4982
  });
4912
4983
  var sma = (raw_params) => {
4913
4984
  const parameters = sma_def.parse(raw_params);
4914
4985
  const silkscreenRefText = silkscreenRef(
4915
4986
  0,
4916
- length32.parse(parameters.h) / 2 + 0.5,
4987
+ length33.parse(parameters.h) / 2 + 0.5,
4917
4988
  0.3
4918
4989
  );
4919
4990
  const silkscreenLine = {
@@ -4922,20 +4993,20 @@ var sma = (raw_params) => {
4922
4993
  pcb_component_id: "",
4923
4994
  route: [
4924
4995
  {
4925
- x: length32.parse(parameters.p) / 2,
4926
- y: length32.parse(parameters.h) / 2
4996
+ x: length33.parse(parameters.p) / 2,
4997
+ y: length33.parse(parameters.h) / 2
4927
4998
  },
4928
4999
  {
4929
- x: -length32.parse(parameters.w) / 2 - 0.5,
4930
- y: length32.parse(parameters.h) / 2
5000
+ x: -length33.parse(parameters.w) / 2 - 0.5,
5001
+ y: length33.parse(parameters.h) / 2
4931
5002
  },
4932
5003
  {
4933
- x: -length32.parse(parameters.w) / 2 - 0.5,
4934
- y: -length32.parse(parameters.h) / 2
5004
+ x: -length33.parse(parameters.w) / 2 - 0.5,
5005
+ y: -length33.parse(parameters.h) / 2
4935
5006
  },
4936
5007
  {
4937
- x: length32.parse(parameters.p) / 2,
4938
- y: -length32.parse(parameters.h) / 2
5008
+ x: length33.parse(parameters.p) / 2,
5009
+ y: -length33.parse(parameters.h) / 2
4939
5010
  }
4940
5011
  ],
4941
5012
  stroke_width: 0.1,
@@ -4977,22 +5048,22 @@ var smaWithoutParsing = (parameters) => {
4977
5048
  };
4978
5049
 
4979
5050
  // src/fn/smf.ts
4980
- import { z as z42 } from "zod";
4981
- import { length as length33 } from "circuit-json";
4982
- var smf_def = z42.object({
4983
- fn: z42.string(),
4984
- num_pins: z42.literal(2).default(2),
4985
- w: z42.string().default("4.80mm"),
4986
- h: z42.string().default("2.10mm"),
4987
- pl: z42.string().default("1.30mm"),
4988
- pw: z42.string().default("1.40mm"),
4989
- p: z42.string().default("2.9mm")
5051
+ import { z as z44 } from "zod";
5052
+ import { length as length34 } from "circuit-json";
5053
+ var smf_def = z44.object({
5054
+ fn: z44.string(),
5055
+ num_pins: z44.literal(2).default(2),
5056
+ w: z44.string().default("4.80mm"),
5057
+ h: z44.string().default("2.10mm"),
5058
+ pl: z44.string().default("1.30mm"),
5059
+ pw: z44.string().default("1.40mm"),
5060
+ p: z44.string().default("2.9mm")
4990
5061
  });
4991
5062
  var smf = (raw_params) => {
4992
5063
  const parameters = smf_def.parse(raw_params);
4993
5064
  const silkscreenRefText = silkscreenRef(
4994
5065
  0,
4995
- length33.parse(parameters.h) - 0.5,
5066
+ length34.parse(parameters.h) - 0.5,
4996
5067
  0.3
4997
5068
  );
4998
5069
  const silkscreenLine = {
@@ -5001,20 +5072,20 @@ var smf = (raw_params) => {
5001
5072
  pcb_component_id: "",
5002
5073
  route: [
5003
5074
  {
5004
- x: length33.parse(parameters.p) / 2,
5005
- y: length33.parse(parameters.h) / 2
5075
+ x: length34.parse(parameters.p) / 2,
5076
+ y: length34.parse(parameters.h) / 2
5006
5077
  },
5007
5078
  {
5008
- x: -length33.parse(parameters.w) / 2,
5009
- y: length33.parse(parameters.h) / 2
5079
+ x: -length34.parse(parameters.w) / 2,
5080
+ y: length34.parse(parameters.h) / 2
5010
5081
  },
5011
5082
  {
5012
- x: -length33.parse(parameters.w) / 2,
5013
- y: -length33.parse(parameters.h) / 2
5083
+ x: -length34.parse(parameters.w) / 2,
5084
+ y: -length34.parse(parameters.h) / 2
5014
5085
  },
5015
5086
  {
5016
- x: length33.parse(parameters.p) / 2,
5017
- y: -length33.parse(parameters.h) / 2
5087
+ x: length34.parse(parameters.p) / 2,
5088
+ y: -length34.parse(parameters.h) / 2
5018
5089
  }
5019
5090
  ],
5020
5091
  stroke_width: 0.1,
@@ -5057,22 +5128,22 @@ var smfWithoutParsing = (parameters) => {
5057
5128
  };
5058
5129
 
5059
5130
  // src/fn/smb.ts
5060
- import { z as z43 } from "zod";
5061
- import { length as length34 } from "circuit-json";
5062
- var smb_def = z43.object({
5063
- fn: z43.string(),
5064
- num_pins: z43.literal(2).default(2),
5065
- w: z43.string().default("7.30mm"),
5066
- h: z43.string().default("4.40mm"),
5067
- pl: z43.string().default("2.50mm"),
5068
- pw: z43.string().default("2.30mm"),
5069
- p: z43.string().default("4.30mm")
5131
+ import { z as z45 } from "zod";
5132
+ import { length as length35 } from "circuit-json";
5133
+ var smb_def = z45.object({
5134
+ fn: z45.string(),
5135
+ num_pins: z45.literal(2).default(2),
5136
+ w: z45.string().default("7.30mm"),
5137
+ h: z45.string().default("4.40mm"),
5138
+ pl: z45.string().default("2.50mm"),
5139
+ pw: z45.string().default("2.30mm"),
5140
+ p: z45.string().default("4.30mm")
5070
5141
  });
5071
5142
  var smb = (raw_params) => {
5072
5143
  const parameters = smb_def.parse(raw_params);
5073
5144
  const silkscreenRefText = silkscreenRef(
5074
5145
  0,
5075
- length34.parse(parameters.h) / 2 + 0.5,
5146
+ length35.parse(parameters.h) / 2 + 0.5,
5076
5147
  0.3
5077
5148
  );
5078
5149
  const silkscreenLine = {
@@ -5081,20 +5152,20 @@ var smb = (raw_params) => {
5081
5152
  pcb_component_id: "",
5082
5153
  route: [
5083
5154
  {
5084
- x: length34.parse(parameters.p) / 2,
5085
- y: length34.parse(parameters.h) / 2
5155
+ x: length35.parse(parameters.p) / 2,
5156
+ y: length35.parse(parameters.h) / 2
5086
5157
  },
5087
5158
  {
5088
- x: -length34.parse(parameters.w) / 2 - 0.1,
5089
- y: length34.parse(parameters.h) / 2
5159
+ x: -length35.parse(parameters.w) / 2 - 0.1,
5160
+ y: length35.parse(parameters.h) / 2
5090
5161
  },
5091
5162
  {
5092
- x: -length34.parse(parameters.w) / 2 - 0.1,
5093
- y: -length34.parse(parameters.h) / 2
5163
+ x: -length35.parse(parameters.w) / 2 - 0.1,
5164
+ y: -length35.parse(parameters.h) / 2
5094
5165
  },
5095
5166
  {
5096
- x: length34.parse(parameters.p) / 2,
5097
- y: -length34.parse(parameters.h) / 2
5167
+ x: length35.parse(parameters.p) / 2,
5168
+ y: -length35.parse(parameters.h) / 2
5098
5169
  }
5099
5170
  ],
5100
5171
  stroke_width: 0.1,
@@ -5137,16 +5208,16 @@ var smbWithoutParsing = (parameters) => {
5137
5208
  };
5138
5209
 
5139
5210
  // src/fn/smc.ts
5140
- import { z as z44 } from "zod";
5141
- import { length as length35 } from "circuit-json";
5142
- var smc_def = z44.object({
5143
- fn: z44.string(),
5144
- num_pins: z44.literal(2).default(2),
5145
- w: z44.string().default("10.70mm"),
5146
- h: z44.string().default("6.60mm"),
5147
- pl: z44.string().default("3.30mm"),
5148
- pw: z44.string().default("2.50mm"),
5149
- p: z44.string().default("6.80mm")
5211
+ import { z as z46 } from "zod";
5212
+ import { length as length36 } from "circuit-json";
5213
+ var smc_def = z46.object({
5214
+ fn: z46.string(),
5215
+ num_pins: z46.literal(2).default(2),
5216
+ w: z46.string().default("10.70mm"),
5217
+ h: z46.string().default("6.60mm"),
5218
+ pl: z46.string().default("3.30mm"),
5219
+ pw: z46.string().default("2.50mm"),
5220
+ p: z46.string().default("6.80mm")
5150
5221
  });
5151
5222
  var smc = (raw_params) => {
5152
5223
  const parameters = smc_def.parse(raw_params);
@@ -5157,20 +5228,20 @@ var smc = (raw_params) => {
5157
5228
  pcb_component_id: "",
5158
5229
  route: [
5159
5230
  {
5160
- x: length35.parse(parameters.p) / 2,
5161
- y: length35.parse(parameters.h) / 2 - 0.8
5231
+ x: length36.parse(parameters.p) / 2,
5232
+ y: length36.parse(parameters.h) / 2 - 0.8
5162
5233
  },
5163
5234
  {
5164
- x: -length35.parse(parameters.w) / 2 - 0.8,
5165
- y: length35.parse(parameters.h) / 2 - 0.8
5235
+ x: -length36.parse(parameters.w) / 2 - 0.8,
5236
+ y: length36.parse(parameters.h) / 2 - 0.8
5166
5237
  },
5167
5238
  {
5168
- x: -length35.parse(parameters.w) / 2 - 0.8,
5169
- y: -length35.parse(parameters.h) / 2 + 0.8
5239
+ x: -length36.parse(parameters.w) / 2 - 0.8,
5240
+ y: -length36.parse(parameters.h) / 2 + 0.8
5170
5241
  },
5171
5242
  {
5172
- x: length35.parse(parameters.p) / 2,
5173
- y: -length35.parse(parameters.h) / 2 + 0.8
5243
+ x: length36.parse(parameters.p) / 2,
5244
+ y: -length36.parse(parameters.h) / 2 + 0.8
5174
5245
  }
5175
5246
  ],
5176
5247
  stroke_width: 0.1,
@@ -5212,16 +5283,16 @@ var smcWithoutParsing = (parameters) => {
5212
5283
  };
5213
5284
 
5214
5285
  // src/fn/sot223.ts
5215
- import { z as z45 } from "zod";
5216
- var sot223_def = z45.object({
5217
- fn: z45.string(),
5218
- num_pins: z45.number().default(4),
5219
- w: z45.string().default("8.50mm"),
5220
- h: z45.string().default("6.90mm"),
5221
- pl: z45.string().default("2mm"),
5222
- pw: z45.string().default("1.5mm"),
5223
- p: z45.string().default("2.30mm"),
5224
- string: z45.string().optional()
5286
+ import { z as z47 } from "zod";
5287
+ var sot223_def = z47.object({
5288
+ fn: z47.string(),
5289
+ num_pins: z47.number().default(4),
5290
+ w: z47.string().default("8.50mm"),
5291
+ h: z47.string().default("6.90mm"),
5292
+ pl: z47.string().default("2mm"),
5293
+ pw: z47.string().default("1.5mm"),
5294
+ p: z47.string().default("2.30mm"),
5295
+ string: z47.string().optional()
5225
5296
  });
5226
5297
  var sot223 = (raw_params) => {
5227
5298
  const match = raw_params.string?.match(/^sot223_(\d+)/);
@@ -5467,16 +5538,16 @@ var sot223_6 = (parameters) => {
5467
5538
  };
5468
5539
 
5469
5540
  // src/fn/sot23w.ts
5470
- import { z as z46 } from "zod";
5471
- var sot23w_def = z46.object({
5472
- fn: z46.string(),
5473
- num_pins: z46.number().default(3),
5474
- w: z46.string().default("3.40mm"),
5475
- h: z46.string().default("3.30mm"),
5476
- pl: z46.string().default("1mm"),
5477
- pw: z46.string().default("0.7mm"),
5478
- p: z46.string().default("1.2mm"),
5479
- string: z46.string().optional()
5541
+ import { z as z48 } from "zod";
5542
+ var sot23w_def = z48.object({
5543
+ fn: z48.string(),
5544
+ num_pins: z48.number().default(3),
5545
+ w: z48.string().default("3.40mm"),
5546
+ h: z48.string().default("3.30mm"),
5547
+ pl: z48.string().default("1mm"),
5548
+ pw: z48.string().default("0.7mm"),
5549
+ p: z48.string().default("1.2mm"),
5550
+ string: z48.string().optional()
5480
5551
  });
5481
5552
  var sot23w = (raw_params) => {
5482
5553
  const match = raw_params.string?.match(/^sot23w_(\d+)/);
@@ -5564,16 +5635,16 @@ var sot23w_3 = (parameters) => {
5564
5635
  };
5565
5636
 
5566
5637
  // src/fn/to92s.ts
5567
- import { z as z47 } from "zod";
5568
- var to92s_def = z47.object({
5569
- fn: z47.string(),
5570
- num_pins: z47.union([z47.literal(3), z47.literal(2)]).default(3),
5571
- p: z47.string().default("1.27mm"),
5572
- id: z47.string().default("0.72mm"),
5573
- od: z47.string().default("0.95mm"),
5574
- w: z47.string().default("2.5mm"),
5575
- h: z47.string().default("4.2mm"),
5576
- string: z47.string().optional()
5638
+ import { z as z49 } from "zod";
5639
+ var to92s_def = z49.object({
5640
+ fn: z49.string(),
5641
+ num_pins: z49.union([z49.literal(3), z49.literal(2)]).default(3),
5642
+ p: z49.string().default("1.27mm"),
5643
+ id: z49.string().default("0.72mm"),
5644
+ od: z49.string().default("0.95mm"),
5645
+ w: z49.string().default("2.5mm"),
5646
+ h: z49.string().default("4.2mm"),
5647
+ string: z49.string().optional()
5577
5648
  });
5578
5649
  var to92s_3 = (parameters) => {
5579
5650
  const { p, id, od, w, h } = parameters;
@@ -5640,18 +5711,18 @@ var to92s = (raw_params) => {
5640
5711
 
5641
5712
  // src/fn/jst.ts
5642
5713
  import {
5643
- length as length36
5714
+ length as length37
5644
5715
  } from "circuit-json";
5645
- import { z as z48 } from "zod";
5646
- var jst_def = z48.object({
5647
- fn: z48.string(),
5648
- p: length36.optional(),
5649
- id: length36.optional(),
5650
- pw: length36.optional(),
5651
- pl: length36.optional(),
5652
- w: length36.optional(),
5653
- h: length36.optional(),
5654
- sh: z48.union([z48.boolean(), z48.string(), z48.number()]).optional().transform((v) => {
5716
+ import { z as z50 } from "zod";
5717
+ var jst_def = z50.object({
5718
+ fn: z50.string(),
5719
+ p: length37.optional(),
5720
+ id: length37.optional(),
5721
+ pw: length37.optional(),
5722
+ pl: length37.optional(),
5723
+ w: length37.optional(),
5724
+ h: length37.optional(),
5725
+ sh: z50.union([z50.boolean(), z50.string(), z50.number()]).optional().transform((v) => {
5655
5726
  if (typeof v === "string") {
5656
5727
  const n = Number(v);
5657
5728
  return Number.isNaN(n) ? true : n;
@@ -5660,26 +5731,26 @@ var jst_def = z48.object({
5660
5731
  }).describe(
5661
5732
  'JST SH (Surface-mount) connector family. SH stands for "Super High-density".'
5662
5733
  ),
5663
- ph: z48.boolean().optional().describe(
5734
+ ph: z50.boolean().optional().describe(
5664
5735
  'JST PH (Through-hole) connector family. PH stands for "Pin Header".'
5665
5736
  ),
5666
- string: z48.string().optional()
5737
+ string: z50.string().optional()
5667
5738
  });
5668
5739
  var variantDefaults = {
5669
5740
  ph: {
5670
- p: length36.parse("2.2mm"),
5671
- id: length36.parse("0.70mm"),
5672
- pw: length36.parse("1.20mm"),
5673
- pl: length36.parse("1.20mm"),
5674
- w: length36.parse("6mm"),
5675
- h: length36.parse("5mm")
5741
+ p: length37.parse("2.2mm"),
5742
+ id: length37.parse("0.70mm"),
5743
+ pw: length37.parse("1.20mm"),
5744
+ pl: length37.parse("1.20mm"),
5745
+ w: length37.parse("6mm"),
5746
+ h: length37.parse("5mm")
5676
5747
  },
5677
5748
  sh: {
5678
- p: length36.parse("1mm"),
5679
- pw: length36.parse("0.6mm"),
5680
- pl: length36.parse("1.55mm"),
5681
- w: length36.parse("5.8mm"),
5682
- h: length36.parse("7.8mm")
5749
+ p: length37.parse("1mm"),
5750
+ pw: length37.parse("0.6mm"),
5751
+ pl: length37.parse("1.55mm"),
5752
+ w: length37.parse("5.8mm"),
5753
+ h: length37.parse("7.8mm")
5683
5754
  }
5684
5755
  };
5685
5756
  function getVariant(params) {
@@ -5778,22 +5849,22 @@ var jst = (raw_params) => {
5778
5849
  };
5779
5850
 
5780
5851
  // src/fn/sod110.ts
5781
- import { z as z49 } from "zod";
5782
- import { length as length37 } from "circuit-json";
5783
- var sod_def12 = z49.object({
5784
- fn: z49.string(),
5785
- num_pins: z49.literal(2).default(2),
5786
- w: z49.string().default("3.30mm"),
5787
- h: z49.string().default("1.70mm"),
5788
- pl: z49.string().default("0.80mm"),
5789
- pw: z49.string().default("1mm"),
5790
- p: z49.string().default("1.90mm")
5852
+ import { z as z51 } from "zod";
5853
+ import { length as length38 } from "circuit-json";
5854
+ var sod_def12 = z51.object({
5855
+ fn: z51.string(),
5856
+ num_pins: z51.literal(2).default(2),
5857
+ w: z51.string().default("3.30mm"),
5858
+ h: z51.string().default("1.70mm"),
5859
+ pl: z51.string().default("0.80mm"),
5860
+ pw: z51.string().default("1mm"),
5861
+ p: z51.string().default("1.90mm")
5791
5862
  });
5792
5863
  var sod110 = (raw_params) => {
5793
5864
  const parameters = sod_def12.parse(raw_params);
5794
5865
  const silkscreenRefText = silkscreenRef(
5795
5866
  0,
5796
- length37.parse(parameters.h) / 2 + 0.5,
5867
+ length38.parse(parameters.h) / 2 + 0.5,
5797
5868
  0.3
5798
5869
  );
5799
5870
  const silkscreenLine = {
@@ -5802,20 +5873,20 @@ var sod110 = (raw_params) => {
5802
5873
  pcb_component_id: "",
5803
5874
  route: [
5804
5875
  {
5805
- x: length37.parse(parameters.p) / 2,
5806
- y: length37.parse(parameters.h) / 2
5876
+ x: length38.parse(parameters.p) / 2,
5877
+ y: length38.parse(parameters.h) / 2
5807
5878
  },
5808
5879
  {
5809
- x: -length37.parse(parameters.w) / 2,
5810
- y: length37.parse(parameters.h) / 2
5880
+ x: -length38.parse(parameters.w) / 2,
5881
+ y: length38.parse(parameters.h) / 2
5811
5882
  },
5812
5883
  {
5813
- x: -length37.parse(parameters.w) / 2,
5814
- y: -length37.parse(parameters.h) / 2
5884
+ x: -length38.parse(parameters.w) / 2,
5885
+ y: -length38.parse(parameters.h) / 2
5815
5886
  },
5816
5887
  {
5817
- x: length37.parse(parameters.p) / 2,
5818
- y: -length37.parse(parameters.h) / 2
5888
+ x: length38.parse(parameters.p) / 2,
5889
+ y: -length38.parse(parameters.h) / 2
5819
5890
  }
5820
5891
  ],
5821
5892
  stroke_width: 0.1,
@@ -5857,8 +5928,8 @@ var sodWithoutParsing13 = (parameters) => {
5857
5928
  };
5858
5929
 
5859
5930
  // src/fn/vssop.ts
5860
- import { z as z50 } from "zod";
5861
- import { length as length38 } from "circuit-json";
5931
+ import { z as z52 } from "zod";
5932
+ import { length as length39 } from "circuit-json";
5862
5933
  var getDefaultValues = (num_pins) => {
5863
5934
  switch (num_pins) {
5864
5935
  case 8:
@@ -5887,24 +5958,24 @@ var getDefaultValues = (num_pins) => {
5887
5958
  };
5888
5959
  }
5889
5960
  };
5890
- var vssop_def = z50.object({
5891
- fn: z50.string(),
5892
- num_pins: z50.union([z50.literal(8), z50.literal(10)]).default(8),
5893
- w: z50.string().optional(),
5894
- h: z50.string().optional(),
5895
- p: z50.string().optional(),
5896
- pl: z50.string().optional(),
5897
- pw: z50.string().optional(),
5898
- string: z50.string().optional()
5961
+ var vssop_def = z52.object({
5962
+ fn: z52.string(),
5963
+ num_pins: z52.union([z52.literal(8), z52.literal(10)]).default(8),
5964
+ w: z52.string().optional(),
5965
+ h: z52.string().optional(),
5966
+ p: z52.string().optional(),
5967
+ pl: z52.string().optional(),
5968
+ pw: z52.string().optional(),
5969
+ string: z52.string().optional()
5899
5970
  });
5900
5971
  var vssop = (raw_params) => {
5901
5972
  const parameters = vssop_def.parse(raw_params);
5902
5973
  const defaults = getDefaultValues(parameters.num_pins);
5903
- const w = length38.parse(parameters.w || defaults.w);
5904
- const h = length38.parse(parameters.h || defaults.h);
5905
- const p = length38.parse(parameters.p || defaults.p);
5906
- const pl = length38.parse(parameters.pl || defaults.pl);
5907
- const pw = length38.parse(parameters.pw || defaults.pw);
5974
+ const w = length39.parse(parameters.w || defaults.w);
5975
+ const h = length39.parse(parameters.h || defaults.h);
5976
+ const p = length39.parse(parameters.p || defaults.p);
5977
+ const pl = length39.parse(parameters.pl || defaults.pl);
5978
+ const pw = length39.parse(parameters.pw || defaults.pw);
5908
5979
  const pads = [];
5909
5980
  const half = parameters.num_pins / 2;
5910
5981
  for (let i = 0; i < parameters.num_pins; i++) {
@@ -5981,14 +6052,14 @@ var getVssopPadCoord = (pinCount, pn, w, p) => {
5981
6052
  const col = pn <= half ? -1 : 1;
5982
6053
  const row = (half - 1) / 2 - rowIndex;
5983
6054
  return {
5984
- x: col * length38.parse(pinCount === 8 ? "1.8mm" : "2.2mm"),
6055
+ x: col * length39.parse(pinCount === 8 ? "1.8mm" : "2.2mm"),
5985
6056
  y: row * p
5986
6057
  };
5987
6058
  };
5988
6059
 
5989
6060
  // src/fn/msop.ts
5990
- import { z as z51 } from "zod";
5991
- import { length as length39 } from "circuit-json";
6061
+ import { z as z53 } from "zod";
6062
+ import { length as length40 } from "circuit-json";
5992
6063
  var getDefaultValues2 = (num_pins) => {
5993
6064
  switch (num_pins) {
5994
6065
  case 10:
@@ -6025,15 +6096,15 @@ var getDefaultValues2 = (num_pins) => {
6025
6096
  };
6026
6097
  }
6027
6098
  };
6028
- var msop_def = z51.object({
6029
- fn: z51.string(),
6030
- num_pins: z51.union([z51.literal(8), z51.literal(10), z51.literal(12), z51.literal(16)]).default(8),
6031
- w: z51.string().optional(),
6032
- h: z51.string().optional(),
6033
- p: z51.string().optional(),
6034
- pl: z51.string().optional(),
6035
- pw: z51.string().optional(),
6036
- string: z51.string().optional()
6099
+ var msop_def = z53.object({
6100
+ fn: z53.string(),
6101
+ num_pins: z53.union([z53.literal(8), z53.literal(10), z53.literal(12), z53.literal(16)]).default(8),
6102
+ w: z53.string().optional(),
6103
+ h: z53.string().optional(),
6104
+ p: z53.string().optional(),
6105
+ pl: z53.string().optional(),
6106
+ pw: z53.string().optional(),
6107
+ string: z53.string().optional()
6037
6108
  });
6038
6109
  var getMsopCoords = (pinCount, pn, w, p) => {
6039
6110
  const half = pinCount / 2;
@@ -6041,18 +6112,18 @@ var getMsopCoords = (pinCount, pn, w, p) => {
6041
6112
  const col = pn <= half ? -1 : 1;
6042
6113
  const row = (half - 1) / 2 - rowIndex;
6043
6114
  return {
6044
- x: col * length39.parse("2mm"),
6115
+ x: col * length40.parse("2mm"),
6045
6116
  y: row * p
6046
6117
  };
6047
6118
  };
6048
6119
  var msop = (raw_params) => {
6049
6120
  const parameters = msop_def.parse(raw_params);
6050
6121
  const defaults = getDefaultValues2(parameters.num_pins);
6051
- const w = length39.parse(parameters.w || defaults.w);
6052
- const h = length39.parse(parameters.h || defaults.h);
6053
- const p = length39.parse(parameters.p || defaults.p);
6054
- const pl = length39.parse(parameters.pl || defaults.pl);
6055
- const pw = length39.parse(parameters.pw || defaults.pw);
6122
+ const w = length40.parse(parameters.w || defaults.w);
6123
+ const h = length40.parse(parameters.h || defaults.h);
6124
+ const p = length40.parse(parameters.p || defaults.p);
6125
+ const pl = length40.parse(parameters.pl || defaults.pl);
6126
+ const pw = length40.parse(parameters.pw || defaults.pw);
6056
6127
  const pads = [];
6057
6128
  for (let i = 0; i < parameters.num_pins; i++) {
6058
6129
  const { x, y } = getMsopCoords(parameters.num_pins, i + 1, w, p);
@@ -6123,22 +6194,22 @@ var msop = (raw_params) => {
6123
6194
  };
6124
6195
 
6125
6196
  // src/fn/sod323w.ts
6126
- import { z as z52 } from "zod";
6127
- import { length as length40 } from "circuit-json";
6128
- var sod323w_def = z52.object({
6129
- fn: z52.string(),
6130
- num_pins: z52.literal(2).default(2),
6131
- w: z52.string().default("3.8mm"),
6132
- h: z52.string().default("1.65mm"),
6133
- pl: z52.string().default("1.2mm"),
6134
- pw: z52.string().default("1.2mm"),
6135
- pad_spacing: z52.string().default("2.6mm")
6197
+ import { z as z54 } from "zod";
6198
+ import { length as length41 } from "circuit-json";
6199
+ var sod323w_def = z54.object({
6200
+ fn: z54.string(),
6201
+ num_pins: z54.literal(2).default(2),
6202
+ w: z54.string().default("3.8mm"),
6203
+ h: z54.string().default("1.65mm"),
6204
+ pl: z54.string().default("1.2mm"),
6205
+ pw: z54.string().default("1.2mm"),
6206
+ pad_spacing: z54.string().default("2.6mm")
6136
6207
  });
6137
6208
  var sod323w = (raw_params) => {
6138
6209
  const parameters = sod323w_def.parse(raw_params);
6139
6210
  const silkscreenRefText = silkscreenRef(
6140
6211
  0,
6141
- length40.parse(parameters.h),
6212
+ length41.parse(parameters.h),
6142
6213
  0.3
6143
6214
  );
6144
6215
  const silkscreenLine = {
@@ -6147,20 +6218,20 @@ var sod323w = (raw_params) => {
6147
6218
  pcb_component_id: "",
6148
6219
  route: [
6149
6220
  {
6150
- x: length40.parse(parameters.pad_spacing) / 2,
6151
- y: length40.parse(parameters.h) / 2
6221
+ x: length41.parse(parameters.pad_spacing) / 2,
6222
+ y: length41.parse(parameters.h) / 2
6152
6223
  },
6153
6224
  {
6154
- x: -length40.parse(parameters.w) / 2 - 0.2,
6155
- y: length40.parse(parameters.h) / 2
6225
+ x: -length41.parse(parameters.w) / 2 - 0.2,
6226
+ y: length41.parse(parameters.h) / 2
6156
6227
  },
6157
6228
  {
6158
- x: -length40.parse(parameters.w) / 2 - 0.2,
6159
- y: -length40.parse(parameters.h) / 2
6229
+ x: -length41.parse(parameters.w) / 2 - 0.2,
6230
+ y: -length41.parse(parameters.h) / 2
6160
6231
  },
6161
6232
  {
6162
- x: length40.parse(parameters.pad_spacing) / 2,
6163
- y: -length40.parse(parameters.h) / 2
6233
+ x: length41.parse(parameters.pad_spacing) / 2,
6234
+ y: -length41.parse(parameters.h) / 2
6164
6235
  }
6165
6236
  ],
6166
6237
  stroke_width: 0.1,
@@ -6203,22 +6274,22 @@ var sodWithoutParsing14 = (parameters) => {
6203
6274
  };
6204
6275
 
6205
6276
  // src/fn/sod323fl.ts
6206
- import { z as z53 } from "zod";
6207
- import { length as length41 } from "circuit-json";
6208
- var sod323FL_def = z53.object({
6209
- fn: z53.string(),
6210
- num_pins: z53.literal(2).default(2),
6211
- w: z53.string().default("3.20mm"),
6212
- h: z53.string().default("1.65mm"),
6213
- pl: z53.string().default("0.8mm"),
6214
- pw: z53.string().default("0.9mm"),
6215
- pad_spacing: z53.string().default("2.1mm")
6277
+ import { z as z55 } from "zod";
6278
+ import { length as length42 } from "circuit-json";
6279
+ var sod323FL_def = z55.object({
6280
+ fn: z55.string(),
6281
+ num_pins: z55.literal(2).default(2),
6282
+ w: z55.string().default("3.20mm"),
6283
+ h: z55.string().default("1.65mm"),
6284
+ pl: z55.string().default("0.8mm"),
6285
+ pw: z55.string().default("0.9mm"),
6286
+ pad_spacing: z55.string().default("2.1mm")
6216
6287
  });
6217
6288
  var sod323fl = (raw_params) => {
6218
6289
  const parameters = sod323FL_def.parse(raw_params);
6219
6290
  const silkscreenRefText = silkscreenRef(
6220
6291
  0,
6221
- length41.parse(parameters.h),
6292
+ length42.parse(parameters.h),
6222
6293
  0.3
6223
6294
  );
6224
6295
  const silkscreenLine = {
@@ -6227,20 +6298,20 @@ var sod323fl = (raw_params) => {
6227
6298
  pcb_component_id: "",
6228
6299
  route: [
6229
6300
  {
6230
- x: length41.parse(parameters.pad_spacing) / 2,
6231
- y: length41.parse(parameters.h) / 2
6301
+ x: length42.parse(parameters.pad_spacing) / 2,
6302
+ y: length42.parse(parameters.h) / 2
6232
6303
  },
6233
6304
  {
6234
- x: -length41.parse(parameters.w) / 2 - 0.2,
6235
- y: length41.parse(parameters.h) / 2
6305
+ x: -length42.parse(parameters.w) / 2 - 0.2,
6306
+ y: length42.parse(parameters.h) / 2
6236
6307
  },
6237
6308
  {
6238
- x: -length41.parse(parameters.w) / 2 - 0.2,
6239
- y: -length41.parse(parameters.h) / 2
6309
+ x: -length42.parse(parameters.w) / 2 - 0.2,
6310
+ y: -length42.parse(parameters.h) / 2
6240
6311
  },
6241
6312
  {
6242
- x: length41.parse(parameters.pad_spacing) / 2,
6243
- y: -length41.parse(parameters.h) / 2
6313
+ x: length42.parse(parameters.pad_spacing) / 2,
6314
+ y: -length42.parse(parameters.h) / 2
6244
6315
  }
6245
6316
  ],
6246
6317
  stroke_width: 0.1,
@@ -6283,20 +6354,20 @@ var sodWithoutParsing15 = (parameters) => {
6283
6354
  };
6284
6355
 
6285
6356
  // src/fn/son.ts
6286
- import { z as z54 } from "zod";
6287
- import { length as length42 } from "circuit-json";
6288
- var son_def = z54.object({
6289
- fn: z54.string(),
6290
- num_pins: z54.union([z54.literal(6), z54.literal(8)]).default(8),
6291
- w: z54.string().default("3mm"),
6292
- h: z54.string().default("3mm"),
6293
- p: z54.string().default("0.5mm"),
6294
- pl: z54.string().default("0.52mm"),
6295
- pw: z54.string().default("0.35mm"),
6296
- epw: z54.string().default("1.40mm"),
6297
- eph: z54.string().default("1.60mm"),
6298
- string: z54.string().optional(),
6299
- ep: z54.boolean().default(false)
6357
+ import { z as z56 } from "zod";
6358
+ import { length as length43 } from "circuit-json";
6359
+ var son_def = z56.object({
6360
+ fn: z56.string(),
6361
+ num_pins: z56.union([z56.literal(6), z56.literal(8)]).default(8),
6362
+ w: z56.string().default("3mm"),
6363
+ h: z56.string().default("3mm"),
6364
+ p: z56.string().default("0.5mm"),
6365
+ pl: z56.string().default("0.52mm"),
6366
+ pw: z56.string().default("0.35mm"),
6367
+ epw: z56.string().default("1.40mm"),
6368
+ eph: z56.string().default("1.60mm"),
6369
+ string: z56.string().optional(),
6370
+ ep: z56.boolean().default(false)
6300
6371
  });
6301
6372
  var son = (raw_params) => {
6302
6373
  if (raw_params.string && raw_params.string.includes("_ep")) {
@@ -6308,13 +6379,13 @@ var son = (raw_params) => {
6308
6379
  ...raw_params,
6309
6380
  num_pins: numPins
6310
6381
  });
6311
- const w = length42.parse(parameters.w);
6312
- const h = length42.parse(parameters.h);
6313
- const p = length42.parse(parameters.p);
6314
- const pl = length42.parse(parameters.pl);
6315
- const pw = length42.parse(parameters.pw);
6316
- const epw = length42.parse(parameters.epw);
6317
- const eph = length42.parse(parameters.eph);
6382
+ const w = length43.parse(parameters.w);
6383
+ const h = length43.parse(parameters.h);
6384
+ const p = length43.parse(parameters.p);
6385
+ const pl = length43.parse(parameters.pl);
6386
+ const pw = length43.parse(parameters.pw);
6387
+ const epw = length43.parse(parameters.epw);
6388
+ const eph = length43.parse(parameters.eph);
6318
6389
  const pads = [];
6319
6390
  for (let i = 0; i < parameters.num_pins; i++) {
6320
6391
  const { x, y } = getSonPadCoord(parameters.num_pins, i + 1, w, p);
@@ -6392,18 +6463,18 @@ var getSonPadCoord = (num_pins, pn, w, p) => {
6392
6463
  const col = pn <= half ? -1 : 1;
6393
6464
  const row = (half - 1) / 2 - rowIndex;
6394
6465
  return {
6395
- x: col * length42.parse("1.4mm"),
6466
+ x: col * length43.parse("1.4mm"),
6396
6467
  y: row * p
6397
6468
  };
6398
6469
  };
6399
6470
 
6400
6471
  // src/fn/solderjumper.ts
6401
- import { length as length43 } from "circuit-json";
6472
+ import { length as length44 } from "circuit-json";
6402
6473
  var solderjumper = (params) => {
6403
6474
  const { num_pins, bridged, p = 2.54, pw = 1.5, ph = 1.5 } = params;
6404
- const padSpacing = length43.parse(p);
6405
- const padWidth = length43.parse(pw);
6406
- const padHeight = length43.parse(ph);
6475
+ const padSpacing = length44.parse(p);
6476
+ const padWidth = length44.parse(pw);
6477
+ const padHeight = length44.parse(ph);
6407
6478
  const traceWidth = Math.min(padHeight / 4, 0.5);
6408
6479
  const pads = [];
6409
6480
  for (let i = 0; i < num_pins; i++) {
@@ -6491,34 +6562,34 @@ var solderjumper = (params) => {
6491
6562
  };
6492
6563
 
6493
6564
  // src/fn/sot457.ts
6494
- import { z as z55 } from "zod";
6565
+ import { z as z57 } from "zod";
6495
6566
  var commonSchema = {
6496
- fn: z55.literal("sot457"),
6497
- num_pins: z55.literal(6).default(6),
6498
- pillh: z55.string().default("0.45mm"),
6499
- pillw: z55.string().default("1.45mm"),
6500
- pl: z55.string(),
6501
- pw: z55.string(),
6502
- p: z55.string(),
6503
- wave: z55.boolean().optional(),
6504
- reflow: z55.boolean().optional()
6505
- };
6506
- var sot457DefSchema = z55.object({
6567
+ fn: z57.literal("sot457"),
6568
+ num_pins: z57.literal(6).default(6),
6569
+ pillh: z57.string().default("0.45mm"),
6570
+ pillw: z57.string().default("1.45mm"),
6571
+ pl: z57.string(),
6572
+ pw: z57.string(),
6573
+ p: z57.string(),
6574
+ wave: z57.boolean().optional(),
6575
+ reflow: z57.boolean().optional()
6576
+ };
6577
+ var sot457DefSchema = z57.object({
6507
6578
  ...commonSchema,
6508
- h: z55.string().default("2.5mm"),
6509
- w: z55.string().default("2.7mm"),
6510
- pl: z55.string().default("0.8mm"),
6511
- pw: z55.string().default("0.55mm"),
6512
- p: z55.string().default("0.95mm")
6579
+ h: z57.string().default("2.5mm"),
6580
+ w: z57.string().default("2.7mm"),
6581
+ pl: z57.string().default("0.8mm"),
6582
+ pw: z57.string().default("0.55mm"),
6583
+ p: z57.string().default("0.95mm")
6513
6584
  });
6514
- var sot457WaveSchema = z55.object({
6585
+ var sot457WaveSchema = z57.object({
6515
6586
  ...commonSchema,
6516
- h: z55.string().default("3mm"),
6517
- w: z55.string().default("4mm"),
6518
- pillr: z55.string().default("0.225mm"),
6519
- pl: z55.string().default("1.45mm"),
6520
- pw: z55.string().default("1.5mm"),
6521
- p: z55.string().default("1.475mm")
6587
+ h: z57.string().default("3mm"),
6588
+ w: z57.string().default("4mm"),
6589
+ pillr: z57.string().default("0.225mm"),
6590
+ pl: z57.string().default("1.45mm"),
6591
+ pw: z57.string().default("1.5mm"),
6592
+ p: z57.string().default("1.475mm")
6522
6593
  }).transform((data) => ({
6523
6594
  ...data,
6524
6595
  wave: data.wave ?? (data.reflow === void 0 ? true : !data.reflow),
@@ -6657,25 +6728,25 @@ var sot457 = (rawParams) => {
6657
6728
  };
6658
6729
 
6659
6730
  // src/fn/sot963.ts
6660
- import { z as z56 } from "zod";
6661
- import { length as length44 } from "circuit-json";
6662
- var sot963_def = z56.object({
6663
- fn: z56.string(),
6664
- num_pins: z56.literal(6).default(6),
6665
- w: z56.string().default("1.1mm"),
6666
- h: z56.string().default("1.45mm"),
6667
- p: z56.string().default("0.35mm"),
6668
- pl: z56.string().default("0.2mm"),
6669
- pw: z56.string().default("0.2mm"),
6670
- string: z56.string().optional()
6731
+ import { z as z58 } from "zod";
6732
+ import { length as length45 } from "circuit-json";
6733
+ var sot963_def = z58.object({
6734
+ fn: z58.string(),
6735
+ num_pins: z58.literal(6).default(6),
6736
+ w: z58.string().default("1.1mm"),
6737
+ h: z58.string().default("1.45mm"),
6738
+ p: z58.string().default("0.35mm"),
6739
+ pl: z58.string().default("0.2mm"),
6740
+ pw: z58.string().default("0.2mm"),
6741
+ string: z58.string().optional()
6671
6742
  });
6672
6743
  var sot963 = (raw_params) => {
6673
6744
  const parameters = sot963_def.parse({ ...raw_params, fn: "sot963" });
6674
- const w = length44.parse(parameters.w);
6675
- const h = length44.parse(parameters.h);
6676
- const p = length44.parse(parameters.p);
6677
- const pl = length44.parse(parameters.pl);
6678
- const pw = length44.parse(parameters.pw);
6745
+ const w = length45.parse(parameters.w);
6746
+ const h = length45.parse(parameters.h);
6747
+ const p = length45.parse(parameters.p);
6748
+ const pl = length45.parse(parameters.pl);
6749
+ const pw = length45.parse(parameters.pw);
6679
6750
  const pads = [];
6680
6751
  for (let i = 0; i < 6; i++) {
6681
6752
  const { x, y } = getSot963PadCoord(i + 1, w, p, pl);
@@ -6738,19 +6809,19 @@ var getSot963PadCoord = (pn, w, p, pl) => {
6738
6809
  };
6739
6810
 
6740
6811
  // src/fn/potentiometer.ts
6741
- import { z as z57 } from "zod";
6742
- var potentiometer_def = z57.object({
6743
- fn: z57.string(),
6744
- num_pins: z57.union([z57.literal(3), z57.literal(2)]).default(3),
6745
- p: z57.string().default("3.8mm"),
6746
- id: z57.string().default("1.25mm"),
6747
- od: z57.string().default("2.35mm"),
6748
- ca: z57.string().default("14mm").describe(
6812
+ import { z as z59 } from "zod";
6813
+ var potentiometer_def = z59.object({
6814
+ fn: z59.string(),
6815
+ num_pins: z59.union([z59.literal(3), z59.literal(2)]).default(3),
6816
+ p: z59.string().default("3.8mm"),
6817
+ id: z59.string().default("1.25mm"),
6818
+ od: z59.string().default("2.35mm"),
6819
+ ca: z59.string().default("14mm").describe(
6749
6820
  "Caliper axis (width or diameter of the potentiometer body or adjustment knob)"
6750
6821
  ),
6751
- w: z57.string().default("5.35mm"),
6752
- h: z57.string().default("4mm"),
6753
- string: z57.string().optional()
6822
+ w: z59.string().default("5.35mm"),
6823
+ h: z59.string().default("4mm"),
6824
+ string: z59.string().optional()
6754
6825
  });
6755
6826
  var potentiometer_acp = (parameters) => {
6756
6827
  const { p, id, od, h, ca } = parameters;
@@ -6817,15 +6888,15 @@ var potentiometer = (raw_params) => {
6817
6888
 
6818
6889
  // src/fn/electrolytic.ts
6819
6890
  import {
6820
- length as length45
6891
+ length as length46
6821
6892
  } from "circuit-json";
6822
- import { z as z58 } from "zod";
6823
- var electrolytic_def = z58.object({
6824
- fn: z58.string(),
6825
- p: length45.optional().default("7.5mm"),
6826
- id: length45.optional().default("1mm"),
6827
- od: length45.optional().default("2mm"),
6828
- d: length45.optional().default("10.5mm")
6893
+ import { z as z60 } from "zod";
6894
+ var electrolytic_def = z60.object({
6895
+ fn: z60.string(),
6896
+ p: length46.optional().default("7.5mm"),
6897
+ id: length46.optional().default("1mm"),
6898
+ od: length46.optional().default("2mm"),
6899
+ d: length46.optional().default("10.5mm")
6829
6900
  });
6830
6901
  var generate_circle_arcs = (centerX, centerY, radius, cut, cutHeight) => {
6831
6902
  const topArc = [];
@@ -6932,22 +7003,22 @@ var electrolytic = (raw_params) => {
6932
7003
  };
6933
7004
 
6934
7005
  // src/fn/smbf.ts
6935
- import { z as z59 } from "zod";
6936
- import { length as length46 } from "circuit-json";
6937
- var smbf_def = z59.object({
6938
- fn: z59.string(),
6939
- num_pins: z59.literal(2).default(2),
6940
- w: z59.string().default("6.5mm"),
6941
- h: z59.string().default("3mm"),
6942
- pl: z59.string().default("1.75mm"),
6943
- pw: z59.string().default("2.40mm"),
6944
- p: z59.string().default("4.75mm")
7006
+ import { z as z61 } from "zod";
7007
+ import { length as length47 } from "circuit-json";
7008
+ var smbf_def = z61.object({
7009
+ fn: z61.string(),
7010
+ num_pins: z61.literal(2).default(2),
7011
+ w: z61.string().default("6.5mm"),
7012
+ h: z61.string().default("3mm"),
7013
+ pl: z61.string().default("1.75mm"),
7014
+ pw: z61.string().default("2.40mm"),
7015
+ p: z61.string().default("4.75mm")
6945
7016
  });
6946
7017
  var smbf = (raw_params) => {
6947
7018
  const parameters = smbf_def.parse(raw_params);
6948
7019
  const silkscreenRefText = silkscreenRef(
6949
7020
  0,
6950
- length46.parse(parameters.h) - 0.5,
7021
+ length47.parse(parameters.h) - 0.5,
6951
7022
  0.3
6952
7023
  );
6953
7024
  const silkscreenLine = {
@@ -6956,20 +7027,20 @@ var smbf = (raw_params) => {
6956
7027
  pcb_component_id: "",
6957
7028
  route: [
6958
7029
  {
6959
- x: length46.parse(parameters.p) / 2,
6960
- y: length46.parse(parameters.h) / 2
7030
+ x: length47.parse(parameters.p) / 2,
7031
+ y: length47.parse(parameters.h) / 2
6961
7032
  },
6962
7033
  {
6963
- x: -length46.parse(parameters.w) / 2 - 0.3,
6964
- y: length46.parse(parameters.h) / 2
7034
+ x: -length47.parse(parameters.w) / 2 - 0.3,
7035
+ y: length47.parse(parameters.h) / 2
6965
7036
  },
6966
7037
  {
6967
- x: -length46.parse(parameters.w) / 2 - 0.3,
6968
- y: -length46.parse(parameters.h) / 2
7038
+ x: -length47.parse(parameters.w) / 2 - 0.3,
7039
+ y: -length47.parse(parameters.h) / 2
6969
7040
  },
6970
7041
  {
6971
- x: length46.parse(parameters.p) / 2,
6972
- y: -length46.parse(parameters.h) / 2
7042
+ x: length47.parse(parameters.p) / 2,
7043
+ y: -length47.parse(parameters.h) / 2
6973
7044
  }
6974
7045
  ],
6975
7046
  stroke_width: 0.1,
@@ -7011,16 +7082,16 @@ var smbfWithoutParsing = (parameters) => {
7011
7082
  };
7012
7083
 
7013
7084
  // src/fn/sot323.ts
7014
- import { z as z60 } from "zod";
7015
- var sot323_def = z60.object({
7016
- fn: z60.string(),
7017
- num_pins: z60.number().default(3),
7018
- w: z60.string().default("2.45mm"),
7019
- h: z60.string().default("2.40mm"),
7020
- pl: z60.string().default("0.70mm"),
7021
- pw: z60.string().default("0.45mm"),
7022
- p: z60.string().default("1mm"),
7023
- string: z60.string().optional()
7085
+ import { z as z62 } from "zod";
7086
+ var sot323_def = z62.object({
7087
+ fn: z62.string(),
7088
+ num_pins: z62.number().default(3),
7089
+ w: z62.string().default("2.45mm"),
7090
+ h: z62.string().default("2.40mm"),
7091
+ pl: z62.string().default("0.70mm"),
7092
+ pw: z62.string().default("0.45mm"),
7093
+ p: z62.string().default("1mm"),
7094
+ string: z62.string().optional()
7024
7095
  });
7025
7096
  var sot323 = (raw_params) => {
7026
7097
  const match = raw_params.string?.match(/^sot323_(\d+)/);
@@ -7108,30 +7179,30 @@ var sot323_3 = (parameters) => {
7108
7179
  };
7109
7180
 
7110
7181
  // src/fn/smtpad.ts
7111
- import { z as z61 } from "zod";
7112
- import { length as length47 } from "circuit-json";
7182
+ import { z as z63 } from "zod";
7183
+ import { length as length48 } from "circuit-json";
7113
7184
  import { mm as mm6 } from "@tscircuit/mm";
7114
- var smtpad_def = z61.object({
7115
- fn: z61.string(),
7116
- circle: z61.boolean().optional(),
7117
- rect: z61.boolean().optional(),
7118
- square: z61.boolean().optional(),
7119
- pill: z61.boolean().optional(),
7120
- d: length47.optional(),
7121
- pd: length47.optional(),
7122
- diameter: length47.optional(),
7123
- r: length47.optional(),
7124
- pr: length47.optional(),
7125
- radius: length47.optional(),
7126
- w: length47.optional(),
7127
- pw: length47.optional(),
7128
- width: length47.optional(),
7129
- h: length47.optional(),
7130
- ph: length47.optional(),
7131
- height: length47.optional(),
7132
- s: length47.optional(),
7133
- size: length47.optional(),
7134
- string: z61.string().optional()
7185
+ var smtpad_def = z63.object({
7186
+ fn: z63.string(),
7187
+ circle: z63.boolean().optional(),
7188
+ rect: z63.boolean().optional(),
7189
+ square: z63.boolean().optional(),
7190
+ pill: z63.boolean().optional(),
7191
+ d: length48.optional(),
7192
+ pd: length48.optional(),
7193
+ diameter: length48.optional(),
7194
+ r: length48.optional(),
7195
+ pr: length48.optional(),
7196
+ radius: length48.optional(),
7197
+ w: length48.optional(),
7198
+ pw: length48.optional(),
7199
+ width: length48.optional(),
7200
+ h: length48.optional(),
7201
+ ph: length48.optional(),
7202
+ height: length48.optional(),
7203
+ s: length48.optional(),
7204
+ size: length48.optional(),
7205
+ string: z63.string().optional()
7135
7206
  }).transform((v) => {
7136
7207
  let shape = "rect";
7137
7208
  if (v.circle) shape = "circle";
@@ -7197,18 +7268,18 @@ var smtpad = (raw_params) => {
7197
7268
  };
7198
7269
 
7199
7270
  // src/fn/platedhole.ts
7200
- import { z as z62 } from "zod";
7201
- import { length as length48 } from "circuit-json";
7271
+ import { z as z64 } from "zod";
7272
+ import { length as length49 } from "circuit-json";
7202
7273
  import { mm as mm7 } from "@tscircuit/mm";
7203
- var platedhole_def = z62.object({
7204
- fn: z62.string(),
7205
- d: length48.optional(),
7206
- hd: length48.optional(),
7207
- r: length48.optional(),
7208
- hr: length48.optional(),
7209
- pd: length48.optional(),
7210
- pr: length48.optional(),
7211
- squarepad: z62.boolean().optional().default(false)
7274
+ var platedhole_def = z64.object({
7275
+ fn: z64.string(),
7276
+ d: length49.optional(),
7277
+ hd: length49.optional(),
7278
+ r: length49.optional(),
7279
+ hr: length49.optional(),
7280
+ pd: length49.optional(),
7281
+ pr: length49.optional(),
7282
+ squarepad: z64.boolean().optional().default(false)
7212
7283
  }).transform((v) => {
7213
7284
  let holeD;
7214
7285
  if (v.d !== void 0) holeD = mm7(v.d);
@@ -7240,14 +7311,14 @@ var platedhole2 = (raw_params) => {
7240
7311
  };
7241
7312
 
7242
7313
  // src/fn/sot.ts
7243
- import { z as z63 } from "zod";
7244
- var sot_def = z63.object({
7245
- fn: z63.string(),
7246
- num_pins: z63.literal(6).default(6),
7247
- h: z63.string().default("1.6mm"),
7248
- pl: z63.string().default("1mm"),
7249
- pw: z63.string().default("0.7mm"),
7250
- p: z63.string().default("0.95mm")
7314
+ import { z as z65 } from "zod";
7315
+ var sot_def = z65.object({
7316
+ fn: z65.string(),
7317
+ num_pins: z65.literal(6).default(6),
7318
+ h: z65.string().default("1.6mm"),
7319
+ pl: z65.string().default("1mm"),
7320
+ pw: z65.string().default("0.7mm"),
7321
+ p: z65.string().default("0.95mm")
7251
7322
  });
7252
7323
  var sot = (raw_params) => {
7253
7324
  const parameters = sot_def.parse(raw_params);
@@ -7364,9 +7435,9 @@ var sotWithoutParsing = (parameters) => {
7364
7435
  };
7365
7436
 
7366
7437
  // src/fn/m2host.ts
7367
- import { z as z64 } from "zod";
7368
- var m2host_def = z64.object({
7369
- fn: z64.string()
7438
+ import { z as z66 } from "zod";
7439
+ var m2host_def = z66.object({
7440
+ fn: z66.string()
7370
7441
  });
7371
7442
  var m2host = (raw_params) => {
7372
7443
  const parameters = m2host_def.parse(raw_params);
@@ -7566,6 +7637,20 @@ var applyOrigin = (elements, origin) => {
7566
7637
  return elements;
7567
7638
  };
7568
7639
 
7640
+ // src/helpers/apply-noref.ts
7641
+ var applyNoRef = (elements, parameters) => {
7642
+ const refs = elements.filter(
7643
+ (el) => el.type === "pcb_silkscreen_text"
7644
+ );
7645
+ if (refs.length === 0) return elements;
7646
+ for (const ref of refs) {
7647
+ if (parameters.noref) {
7648
+ ref.text = "";
7649
+ }
7650
+ }
7651
+ return elements;
7652
+ };
7653
+
7569
7654
  // src/footprinter.ts
7570
7655
  var string2 = (def) => {
7571
7656
  let fp2 = footprinter();
@@ -7613,7 +7698,7 @@ var footprinter = () => {
7613
7698
  if ("fn" in target && fn_exports[target.fn]) {
7614
7699
  return () => {
7615
7700
  const { circuitJson } = fn_exports[target.fn](target);
7616
- return applyOrigin(circuitJson, target.origin);
7701
+ return applyOrigin(applyNoRef(circuitJson, target), target.origin);
7617
7702
  };
7618
7703
  }
7619
7704
  if (!fn_exports[target.fn]) {