@tscircuit/footprinter 0.0.123 → 0.0.124

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
@@ -56,19 +56,29 @@ __export(fn_exports, {
56
56
  tssop: () => tssop
57
57
  });
58
58
 
59
- // src/helpers/u-curve.ts
60
- var u_curve = Array.from(
61
- { length: 9 },
62
- (_, i) => Math.cos(i / 8 * Math.PI - Math.PI)
63
- ).map((x) => ({
64
- x,
65
- y: -Math.sqrt(1 - x ** 2)
66
- }));
59
+ // src/helpers/silkscreenRef.ts
60
+ var silkscreenRef = (x, y, font_size) => {
61
+ return {
62
+ type: "pcb_silkscreen_text",
63
+ pcb_silkscreen_text_id: "silkscreen_text_1",
64
+ font: "tscircuit2024",
65
+ font_size,
66
+ pcb_component_id: "pcb_component_1",
67
+ text: "{REF}",
68
+ layer: "top",
69
+ anchor_position: { x, y },
70
+ anchor_alignment: "center"
71
+ };
72
+ };
73
+
74
+ // src/fn/dip.ts
75
+ import { z } from "zod";
67
76
 
68
77
  // src/helpers/platedhole.ts
69
78
  import { mm } from "@tscircuit/mm";
70
79
  var platedhole = (pn, x, y, id, od) => {
71
80
  return {
81
+ pcb_plated_hole_id: "",
72
82
  type: "pcb_plated_hole",
73
83
  shape: "circle",
74
84
  x,
@@ -81,39 +91,40 @@ var platedhole = (pn, x, y, id, od) => {
81
91
  };
82
92
  };
83
93
 
84
- // src/fn/dip.ts
85
- import { z } from "zod";
86
- import { length } from "circuit-json";
87
-
88
- // src/helpers/silkscreenRef.ts
89
- var silkscreenRef = (x, y, font_size) => {
90
- return {
91
- type: "pcb_silkscreen_text",
92
- pcb_silkscreen_text_id: "silkscreen_text_1",
93
- font: "tscircuit2024",
94
- font_size,
95
- pcb_component_id: "pcb_component_1",
96
- text: "{REF}",
97
- layer: "top",
98
- anchor_position: { x, y },
99
- anchor_alignment: "center"
100
- };
101
- };
94
+ // src/helpers/u-curve.ts
95
+ var u_curve = Array.from(
96
+ { length: 9 },
97
+ (_, i) => Math.cos(i / 8 * Math.PI - Math.PI)
98
+ ).map((x) => ({
99
+ x,
100
+ y: -Math.sqrt(1 - x ** 2)
101
+ }));
102
102
 
103
103
  // src/fn/dip.ts
104
+ function convertMilToMm(value) {
105
+ if (typeof value === "string") {
106
+ if (value.trim().toLowerCase().endsWith("mil")) {
107
+ const num = Number.parseFloat(value);
108
+ return num * 0.0254;
109
+ }
110
+ return Number.parseFloat(value);
111
+ }
112
+ return Number(value);
113
+ }
114
+ var lengthInMm = z.union([z.string(), z.number()]).transform((val) => convertMilToMm(val));
104
115
  var extendDipDef = (newDefaults) => z.object({
105
116
  fn: z.string(),
106
117
  num_pins: z.number().optional().default(6),
107
118
  wide: z.boolean().optional(),
108
119
  narrow: z.boolean().optional(),
109
- w: length.optional(),
110
- p: length.default(length.parse(newDefaults.p ?? "2.54mm")),
111
- id: length.optional(),
112
- od: length.optional()
120
+ w: lengthInMm.optional(),
121
+ p: lengthInMm.default(newDefaults.p ?? "2.54mm"),
122
+ id: lengthInMm.optional(),
123
+ od: lengthInMm.optional()
113
124
  }).transform((v) => {
114
125
  if (!v.id && !v.od) {
115
- v.id = length.parse("1.0mm");
116
- v.od = length.parse("1.5mm");
126
+ v.id = convertMilToMm("1.0mm");
127
+ v.od = convertMilToMm("1.5mm");
117
128
  } else if (!v.id) {
118
129
  v.id = v.od * (1 / 1.5);
119
130
  } else if (!v.od) {
@@ -121,11 +132,11 @@ var extendDipDef = (newDefaults) => z.object({
121
132
  }
122
133
  if (!v.w) {
123
134
  if (v.wide) {
124
- v.w = length.parse("600mil");
135
+ v.w = convertMilToMm("600mil");
125
136
  } else if (v.narrow) {
126
- v.w = length.parse("300mil");
137
+ v.w = convertMilToMm("300mil");
127
138
  } else {
128
- v.w = length.parse(newDefaults.w ?? "300mil");
139
+ v.w = convertMilToMm(newDefaults.w ?? "300mil");
129
140
  }
130
141
  }
131
142
  return v;
@@ -138,10 +149,9 @@ var getCcwDipCoords = (pinCount, pn, w, p) => {
138
149
  const gs = p;
139
150
  const h = gs * leftPinGaps;
140
151
  if (isLeft) {
141
- return { x: -w / 2, y: h / 2 - (pn - 1) * gs };
142
- } else {
143
- return { x: w / 2, y: -h / 2 + (pn - ph - 1) * gs };
152
+ return { x: -w / 2 - 0.4, y: h / 2 - (pn - 1) * gs };
144
153
  }
154
+ return { x: w / 2 + 0.4, y: -h / 2 + (pn - ph - 1) * gs };
145
155
  };
146
156
  var dip = (raw_params) => {
147
157
  const parameters = dip_def.parse(raw_params);
@@ -230,7 +240,7 @@ var rectpad = (pn, x, y, w, h) => {
230
240
  // src/helpers/passive-fn.ts
231
241
  import mm2 from "@tscircuit/mm";
232
242
  import { z as z2 } from "zod";
233
- import { length as length2, distance } from "circuit-json";
243
+ import { length, distance } from "circuit-json";
234
244
 
235
245
  // src/helpers/silkscreenpath.ts
236
246
  var silkscreenpath = (route, options = {}) => {
@@ -335,13 +345,13 @@ var imperialMap = footprintSizes.reduce(
335
345
  );
336
346
  var passive_def = z2.object({
337
347
  tht: z2.boolean(),
338
- p: length2,
339
- pw: length2.optional(),
340
- ph: length2.optional(),
348
+ p: length,
349
+ pw: length.optional(),
350
+ ph: length.optional(),
341
351
  metric: distance.optional(),
342
352
  imperial: distance.optional(),
343
- w: length2.optional(),
344
- h: length2.optional()
353
+ w: length.optional(),
354
+ h: length.optional()
345
355
  });
346
356
  var deriveXFromH = (h) => 0.079 * h ** 2 + 0.94 * h - 9e-3;
347
357
  var deriveZFromW = (w) => 1.09 * w + 0.6;
@@ -448,7 +458,7 @@ var ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
448
458
 
449
459
  // src/fn/bga.ts
450
460
  import { z as z5 } from "zod";
451
- import { length as length3, distance as distance2 } from "circuit-json";
461
+ import { length as length2, distance as distance2 } from "circuit-json";
452
462
 
453
463
  // src/helpers/zod/dim-2d.ts
454
464
  import { z as z3 } from "zod";
@@ -485,10 +495,10 @@ var bga_def = z5.object({
485
495
  num_pins: z5.number().optional().default(64),
486
496
  grid: dim2d.optional(),
487
497
  p: distance2.default("0.8mm"),
488
- w: length3.optional(),
489
- h: length3.optional(),
490
- ball: length3.optional().describe("ball diameter"),
491
- pad: length3.optional().describe("pad width/height"),
498
+ w: length2.optional(),
499
+ h: length2.optional(),
500
+ ball: length2.optional().describe("ball diameter"),
501
+ pad: length2.optional().describe("pad width/height"),
492
502
  tlorigin: z5.boolean().optional(),
493
503
  blorigin: z5.boolean().optional(),
494
504
  trorigin: z5.boolean().optional(),
@@ -583,19 +593,19 @@ var bga = (raw_params) => {
583
593
 
584
594
  // src/fn/soic.ts
585
595
  import { z as z6 } from "zod";
586
- import { length as length4 } from "circuit-json";
596
+ import { length as length3 } from "circuit-json";
587
597
  var extendSoicDef = (newDefaults) => z6.object({
588
598
  fn: z6.string(),
589
599
  num_pins: z6.number().optional().default(8),
590
- w: length4.default(length4.parse(newDefaults.w ?? "5.3mm")),
591
- p: length4.default(length4.parse(newDefaults.p ?? "1.27mm")),
592
- pw: length4.optional(),
593
- pl: length4.optional(),
600
+ w: length3.default(length3.parse(newDefaults.w ?? "5.3mm")),
601
+ p: length3.default(length3.parse(newDefaults.p ?? "1.27mm")),
602
+ pw: length3.optional(),
603
+ pl: length3.optional(),
594
604
  legsoutside: z6.boolean().optional().default(newDefaults.legsoutside ?? false)
595
605
  }).transform((v) => {
596
606
  if (!v.pw && !v.pl) {
597
- v.pw = length4.parse("0.6mm");
598
- v.pl = length4.parse("1.0mm");
607
+ v.pw = length3.parse("0.6mm");
608
+ v.pl = length3.parse("1.0mm");
599
609
  } else if (!v.pw) {
600
610
  v.pw = v.pl * (0.6 / 1);
601
611
  } else if (!v.pl) {
@@ -675,7 +685,7 @@ var soicWithoutParsing = (parameters) => {
675
685
 
676
686
  // src/fn/quad.ts
677
687
  import { z as z8 } from "zod";
678
- import { length as length5 } from "circuit-json";
688
+ import { length as length4 } from "circuit-json";
679
689
 
680
690
  // src/helpers/zod/pin-order-specifier.ts
681
691
  import { z as z7 } from "zod";
@@ -760,11 +770,11 @@ var base_quad_def = z8.object({
760
770
  ccw: z8.boolean().default(true).optional(),
761
771
  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(),
762
772
  num_pins: z8.number().optional().default(64),
763
- w: length5.optional(),
764
- h: length5.optional(),
765
- p: length5.default(length5.parse("0.5mm")),
766
- pw: length5.optional(),
767
- pl: length5.optional(),
773
+ w: length4.optional(),
774
+ h: length4.optional(),
775
+ p: length4.default(length4.parse("0.5mm")),
776
+ pw: length4.optional(),
777
+ pl: length4.optional(),
768
778
  thermalpad: z8.union([z8.literal(true), dim2d]).optional(),
769
779
  legsoutside: z8.boolean().default(false)
770
780
  });
@@ -1288,13 +1298,13 @@ var dfn = (raw_params) => {
1288
1298
 
1289
1299
  // src/fn/pinrow.ts
1290
1300
  import { z as z11 } from "zod";
1291
- import { length as length6 } from "circuit-json";
1301
+ import { length as length5 } from "circuit-json";
1292
1302
  var pinrow_def = z11.object({
1293
1303
  fn: z11.string(),
1294
1304
  num_pins: z11.number().optional().default(6),
1295
- p: length6.default("0.1in").describe("pitch"),
1296
- id: length6.default("1.0mm").describe("inner diameter"),
1297
- od: length6.default("1.5mm").describe("outer diameter")
1305
+ p: length5.default("0.1in").describe("pitch"),
1306
+ id: length5.default("1.0mm").describe("inner diameter"),
1307
+ od: length5.default("1.5mm").describe("outer diameter")
1298
1308
  });
1299
1309
  var pinrow = (raw_params) => {
1300
1310
  const parameters = pinrow_def.parse(raw_params);
@@ -1359,7 +1369,7 @@ var ms013 = (raw_params) => {
1359
1369
  };
1360
1370
 
1361
1371
  // src/fn/sot723.ts
1362
- import { length as length7 } from "circuit-json";
1372
+ import { length as length6 } from "circuit-json";
1363
1373
  import { z as z12 } from "zod";
1364
1374
  var sot723_def = z12.object({
1365
1375
  fn: z12.string(),
@@ -1374,7 +1384,7 @@ var sot723 = (raw_params) => {
1374
1384
  const pad2 = sot723WithoutParsing(parameters);
1375
1385
  const silkscreenRefText = silkscreenRef(
1376
1386
  0.4,
1377
- length7.parse(parameters.h),
1387
+ length6.parse(parameters.h),
1378
1388
  0.2
1379
1389
  );
1380
1390
  return {
@@ -1417,7 +1427,7 @@ var sot723WithoutParsing = (parameters) => {
1417
1427
 
1418
1428
  // src/fn/sod123.ts
1419
1429
  import { z as z13 } from "zod";
1420
- import { length as length8 } from "circuit-json";
1430
+ import { length as length7 } from "circuit-json";
1421
1431
  var sod_def = z13.object({
1422
1432
  fn: z13.string(),
1423
1433
  num_pins: z13.literal(2).default(2),
@@ -1431,7 +1441,7 @@ var sod123 = (raw_params) => {
1431
1441
  const parameters = sod_def.parse(raw_params);
1432
1442
  const silkscreenRefText = silkscreenRef(
1433
1443
  0,
1434
- length8.parse(parameters.h) / 4 + 0.4,
1444
+ length7.parse(parameters.h) / 4 + 0.4,
1435
1445
  0.3
1436
1446
  );
1437
1447
  return {
@@ -1471,14 +1481,14 @@ var sodWithoutParsing = (parameters) => {
1471
1481
 
1472
1482
  // src/fn/axial.ts
1473
1483
  import {
1474
- length as length9
1484
+ length as length8
1475
1485
  } from "circuit-json";
1476
1486
  import { z as z14 } from "zod";
1477
1487
  var axial_def = z14.object({
1478
1488
  fn: z14.string(),
1479
- p: length9.optional().default("2.54mm"),
1480
- id: length9.optional().default("0.7mm"),
1481
- od: length9.optional().default("1mm")
1489
+ p: length8.optional().default("2.54mm"),
1490
+ id: length8.optional().default("0.7mm"),
1491
+ od: length8.optional().default("1mm")
1482
1492
  });
1483
1493
  var axial = (raw_params) => {
1484
1494
  const parameters = axial_def.parse(raw_params);
@@ -1510,14 +1520,14 @@ var axial = (raw_params) => {
1510
1520
  };
1511
1521
 
1512
1522
  // src/fn/pushbutton.ts
1513
- import { length as length10 } from "circuit-json";
1523
+ import { length as length9 } from "circuit-json";
1514
1524
  import { z as z15 } from "zod";
1515
1525
  var pushbutton_def = z15.object({
1516
1526
  fn: z15.literal("pushbutton"),
1517
- w: length10.default(4.5),
1518
- h: length10.default(6.5),
1519
- id: length10.default(1),
1520
- od: length10.default(1.2)
1527
+ w: length9.default(4.5),
1528
+ h: length9.default(6.5),
1529
+ id: length9.default(1),
1530
+ od: length9.default(1.2)
1521
1531
  });
1522
1532
  var pushbutton = (raw_params) => {
1523
1533
  const parameters = pushbutton_def.parse(raw_params);
@@ -1564,22 +1574,22 @@ var pushbutton = (raw_params) => {
1564
1574
 
1565
1575
  // src/fn/stampboard.ts
1566
1576
  import {
1567
- length as length11
1577
+ length as length10
1568
1578
  } from "circuit-json";
1569
1579
  import { z as z16 } from "zod";
1570
1580
  var stampboard_def = z16.object({
1571
1581
  fn: z16.string(),
1572
- w: length11.default("22.58mm"),
1573
- h: length11.optional(),
1574
- left: length11.optional().default(20),
1575
- right: length11.optional().default(20),
1576
- top: length11.optional().default(2),
1577
- bottom: length11.optional().default(2),
1578
- p: length11.default(length11.parse("2.54mm")),
1579
- pw: length11.default(length11.parse("1.6mm")),
1580
- pl: length11.default(length11.parse("2.4mm")),
1582
+ w: length10.default("22.58mm"),
1583
+ h: length10.optional(),
1584
+ left: length10.optional().default(20),
1585
+ right: length10.optional().default(20),
1586
+ top: length10.optional().default(2),
1587
+ bottom: length10.optional().default(2),
1588
+ p: length10.default(length10.parse("2.54mm")),
1589
+ pw: length10.default(length10.parse("1.6mm")),
1590
+ pl: length10.default(length10.parse("2.4mm")),
1581
1591
  innerhole: z16.boolean().default(false),
1582
- innerholeedgedistance: length11.default(length11.parse("1.61mm"))
1592
+ innerholeedgedistance: length10.default(length10.parse("1.61mm"))
1583
1593
  });
1584
1594
  var getHeight = (parameters) => {
1585
1595
  const params = stampboard_def.parse(parameters);
@@ -1910,22 +1920,22 @@ var stampboard = (raw_params) => {
1910
1920
 
1911
1921
  // src/fn/stampreceiver.ts
1912
1922
  import {
1913
- length as length12
1923
+ length as length11
1914
1924
  } from "circuit-json";
1915
1925
  import { z as z17 } from "zod";
1916
1926
  var stampreceiver_def = z17.object({
1917
1927
  fn: z17.string(),
1918
- w: length12.default("22.58mm"),
1919
- h: length12.optional(),
1920
- left: length12.optional().default(20),
1921
- right: length12.optional().default(20),
1922
- top: length12.optional().default(2),
1923
- bottom: length12.optional().default(2),
1924
- p: length12.default(length12.parse("2.54mm")),
1925
- pw: length12.default(length12.parse("1.6mm")),
1926
- pl: length12.default(length12.parse("3.2mm")),
1928
+ w: length11.default("22.58mm"),
1929
+ h: length11.optional(),
1930
+ left: length11.optional().default(20),
1931
+ right: length11.optional().default(20),
1932
+ top: length11.optional().default(2),
1933
+ bottom: length11.optional().default(2),
1934
+ p: length11.default(length11.parse("2.54mm")),
1935
+ pw: length11.default(length11.parse("1.6mm")),
1936
+ pl: length11.default(length11.parse("3.2mm")),
1927
1937
  innerhole: z17.boolean().default(false),
1928
- innerholeedgedistance: length12.default(length12.parse("1.61mm"))
1938
+ innerholeedgedistance: length11.default(length11.parse("1.61mm"))
1929
1939
  });
1930
1940
  var getHeight2 = (parameters) => {
1931
1941
  const params = stampreceiver_def.parse(parameters);
@@ -2303,20 +2313,20 @@ var sot23_5WithoutParsing = (parameters) => {
2303
2313
 
2304
2314
  // src/fn/breakoutheaders.ts
2305
2315
  import {
2306
- length as length13
2316
+ length as length12
2307
2317
  } from "circuit-json";
2308
2318
  import { z as z19 } from "zod";
2309
2319
  var breakoutheaders_def = z19.object({
2310
2320
  fn: z19.string(),
2311
- w: length13.default("10mm"),
2312
- h: length13.optional(),
2313
- left: length13.optional().default(20),
2314
- right: length13.optional().default(20),
2315
- top: length13.optional().default(0),
2316
- bottom: length13.optional().default(0),
2317
- p: length13.default(length13.parse("2.54mm")),
2318
- id: length13.optional().default(length13.parse("1mm")),
2319
- od: length13.optional().default(length13.parse("1.5mm"))
2321
+ w: length12.default("10mm"),
2322
+ h: length12.optional(),
2323
+ left: length12.optional().default(20),
2324
+ right: length12.optional().default(20),
2325
+ top: length12.optional().default(0),
2326
+ bottom: length12.optional().default(0),
2327
+ p: length12.default(length12.parse("2.54mm")),
2328
+ id: length12.optional().default(length12.parse("1mm")),
2329
+ od: length12.optional().default(length12.parse("1.5mm"))
2320
2330
  });
2321
2331
  var getHeight3 = (parameters) => {
2322
2332
  const params = breakoutheaders_def.parse(parameters);
@@ -2508,7 +2518,7 @@ var breakoutheaders = (raw_params) => {
2508
2518
 
2509
2519
  // src/fn/hc49.ts
2510
2520
  import {
2511
- length as length14
2521
+ length as length13
2512
2522
  } from "circuit-json";
2513
2523
  import { z as z20 } from "zod";
2514
2524
  var generate_u_curve = (centerX, centerY, radius, direction) => {
@@ -2522,11 +2532,11 @@ var generate_u_curve = (centerX, centerY, radius, direction) => {
2522
2532
  };
2523
2533
  var hc49_def = z20.object({
2524
2534
  fn: z20.string(),
2525
- p: length14.optional().default("4.88mm"),
2526
- id: length14.optional().default("0.6mm"),
2527
- od: length14.optional().default("1.2mm"),
2528
- w: length14.optional().default("5.6mm"),
2529
- h: length14.optional().default("3.5mm")
2535
+ p: length13.optional().default("4.88mm"),
2536
+ id: length13.optional().default("0.6mm"),
2537
+ od: length13.optional().default("1.2mm"),
2538
+ w: length13.optional().default("5.6mm"),
2539
+ h: length13.optional().default("3.5mm")
2530
2540
  });
2531
2541
  var hc49 = (raw_params) => {
2532
2542
  const parameters = hc49_def.parse(raw_params);
@@ -2567,11 +2577,11 @@ var hc49 = (raw_params) => {
2567
2577
 
2568
2578
  // src/fn/pad.ts
2569
2579
  import { z as z21 } from "zod";
2570
- import { length as length15 } from "circuit-json";
2580
+ import { length as length14 } from "circuit-json";
2571
2581
  import { mm as mm3 } from "@tscircuit/mm";
2572
2582
  var pad_def = z21.object({
2573
- w: length15,
2574
- h: length15
2583
+ w: length14,
2584
+ h: length14
2575
2585
  });
2576
2586
  var pad = (params) => {
2577
2587
  const { w, h } = params;
@@ -2587,7 +2597,7 @@ var pad = (params) => {
2587
2597
 
2588
2598
  // src/fn/to92.ts
2589
2599
  import {
2590
- length as length16
2600
+ length as length15
2591
2601
  } from "circuit-json";
2592
2602
  import { z as z22 } from "zod";
2593
2603
  var generate_semicircle = (centerX, centerY, radius) => {
@@ -2601,11 +2611,11 @@ var generate_semicircle = (centerX, centerY, radius) => {
2601
2611
  };
2602
2612
  var to92_def = z22.object({
2603
2613
  fn: z22.string(),
2604
- p: length16.optional().default("1.27mm"),
2605
- id: length16.optional().default("0.72mm"),
2606
- od: length16.optional().default(".95mm"),
2607
- w: length16.optional().default("4.5mm"),
2608
- h: length16.optional().default("4.5mm"),
2614
+ p: length15.optional().default("1.27mm"),
2615
+ id: length15.optional().default("0.72mm"),
2616
+ od: length15.optional().default(".95mm"),
2617
+ w: length15.optional().default("4.5mm"),
2618
+ h: length15.optional().default("4.5mm"),
2609
2619
  arrangement: z22.enum(["triangular", "inline"]).optional().default("triangular")
2610
2620
  });
2611
2621
  var to92 = (raw_params) => {
@@ -2649,7 +2659,7 @@ var to92 = (raw_params) => {
2649
2659
 
2650
2660
  // src/fn/sod523.ts
2651
2661
  import { z as z23 } from "zod";
2652
- import { length as length17 } from "circuit-json";
2662
+ import { length as length16 } from "circuit-json";
2653
2663
  var sod_def2 = z23.object({
2654
2664
  fn: z23.string(),
2655
2665
  num_pins: z23.literal(2).default(2),
@@ -2663,7 +2673,7 @@ var sod523 = (raw_params) => {
2663
2673
  const parameters = sod_def2.parse(raw_params);
2664
2674
  const silkscreenRefText = silkscreenRef(
2665
2675
  0,
2666
- length17.parse(parameters.h),
2676
+ length16.parse(parameters.h),
2667
2677
  0.3
2668
2678
  );
2669
2679
  const silkscreenLine = {
@@ -2672,20 +2682,20 @@ var sod523 = (raw_params) => {
2672
2682
  pcb_component_id: "",
2673
2683
  route: [
2674
2684
  {
2675
- x: length17.parse(parameters.p) / 2,
2676
- y: length17.parse(parameters.h) / 2
2685
+ x: length16.parse(parameters.p) / 2,
2686
+ y: length16.parse(parameters.h) / 2
2677
2687
  },
2678
2688
  {
2679
- x: -length17.parse(parameters.w) / 2 - 0.2,
2680
- y: length17.parse(parameters.h) / 2
2689
+ x: -length16.parse(parameters.w) / 2 - 0.2,
2690
+ y: length16.parse(parameters.h) / 2
2681
2691
  },
2682
2692
  {
2683
- x: -length17.parse(parameters.w) / 2 - 0.2,
2684
- y: -length17.parse(parameters.h) / 2
2693
+ x: -length16.parse(parameters.w) / 2 - 0.2,
2694
+ y: -length16.parse(parameters.h) / 2
2685
2695
  },
2686
2696
  {
2687
- x: length17.parse(parameters.p) / 2,
2688
- y: -length17.parse(parameters.h) / 2
2697
+ x: length16.parse(parameters.p) / 2,
2698
+ y: -length16.parse(parameters.h) / 2
2689
2699
  }
2690
2700
  ],
2691
2701
  stroke_width: 0.1,
@@ -2774,7 +2784,7 @@ var sop8 = (raw_params) => {
2774
2784
 
2775
2785
  // src/fn/sod923.ts
2776
2786
  import { z as z24 } from "zod";
2777
- import { length as length18 } from "circuit-json";
2787
+ import { length as length17 } from "circuit-json";
2778
2788
  var sod_def3 = z24.object({
2779
2789
  fn: z24.string(),
2780
2790
  num_pins: z24.literal(2).default(2),
@@ -2788,7 +2798,7 @@ var sod923 = (raw_params) => {
2788
2798
  const parameters = sod_def3.parse(raw_params);
2789
2799
  const silkscreenRefText = silkscreenRef(
2790
2800
  0,
2791
- length18.parse(parameters.h),
2801
+ length17.parse(parameters.h),
2792
2802
  0.3
2793
2803
  );
2794
2804
  const silkscreenLine = {
@@ -2797,20 +2807,20 @@ var sod923 = (raw_params) => {
2797
2807
  pcb_component_id: "",
2798
2808
  route: [
2799
2809
  {
2800
- x: length18.parse(parameters.p) / 2 + 0.15,
2801
- y: length18.parse(parameters.h) / 2
2810
+ x: length17.parse(parameters.p) / 2 + 0.15,
2811
+ y: length17.parse(parameters.h) / 2
2802
2812
  },
2803
2813
  {
2804
- x: -length18.parse(parameters.w) / 2 - 0.4,
2805
- y: length18.parse(parameters.h) / 2
2814
+ x: -length17.parse(parameters.w) / 2 - 0.4,
2815
+ y: length17.parse(parameters.h) / 2
2806
2816
  },
2807
2817
  {
2808
- x: -length18.parse(parameters.w) / 2 - 0.4,
2809
- y: -length18.parse(parameters.h) / 2
2818
+ x: -length17.parse(parameters.w) / 2 - 0.4,
2819
+ y: -length17.parse(parameters.h) / 2
2810
2820
  },
2811
2821
  {
2812
- x: length18.parse(parameters.p) / 2 + 0.15,
2813
- y: -length18.parse(parameters.h) / 2
2822
+ x: length17.parse(parameters.p) / 2 + 0.15,
2823
+ y: -length17.parse(parameters.h) / 2
2814
2824
  }
2815
2825
  ],
2816
2826
  stroke_width: 0.1,
@@ -2854,7 +2864,7 @@ var sodWithoutParsing3 = (parameters) => {
2854
2864
 
2855
2865
  // src/fn/sod882.ts
2856
2866
  import { z as z25 } from "zod";
2857
- import { length as length19 } from "circuit-json";
2867
+ import { length as length18 } from "circuit-json";
2858
2868
  var sod_def4 = z25.object({
2859
2869
  fn: z25.string(),
2860
2870
  num_pins: z25.literal(2).default(2),
@@ -2868,7 +2878,7 @@ var sod882 = (raw_params) => {
2868
2878
  const parameters = sod_def4.parse(raw_params);
2869
2879
  const silkscreenRefText = silkscreenRef(
2870
2880
  0,
2871
- length19.parse(parameters.h) + 0.1,
2881
+ length18.parse(parameters.h) + 0.1,
2872
2882
  0.3
2873
2883
  );
2874
2884
  const silkscreenLine = {
@@ -2877,20 +2887,20 @@ var sod882 = (raw_params) => {
2877
2887
  pcb_component_id: "",
2878
2888
  route: [
2879
2889
  {
2880
- x: length19.parse(parameters.p) / 2 + 0.2,
2881
- y: length19.parse(parameters.h) / 2 + 0.2
2890
+ x: length18.parse(parameters.p) / 2 + 0.2,
2891
+ y: length18.parse(parameters.h) / 2 + 0.2
2882
2892
  },
2883
2893
  {
2884
- x: -length19.parse(parameters.w) / 2 - 0.2,
2885
- y: length19.parse(parameters.h) / 2 + 0.2
2894
+ x: -length18.parse(parameters.w) / 2 - 0.2,
2895
+ y: length18.parse(parameters.h) / 2 + 0.2
2886
2896
  },
2887
2897
  {
2888
- x: -length19.parse(parameters.w) / 2 - 0.2,
2889
- y: -length19.parse(parameters.h) / 2 - 0.2
2898
+ x: -length18.parse(parameters.w) / 2 - 0.2,
2899
+ y: -length18.parse(parameters.h) / 2 - 0.2
2890
2900
  },
2891
2901
  {
2892
- x: length19.parse(parameters.p) / 2 + 0.2,
2893
- y: -length19.parse(parameters.h) / 2 - 0.2
2902
+ x: length18.parse(parameters.p) / 2 + 0.2,
2903
+ y: -length18.parse(parameters.h) / 2 - 0.2
2894
2904
  }
2895
2905
  ],
2896
2906
  stroke_width: 0.1,
@@ -2934,7 +2944,7 @@ var sodWithoutParsing4 = (parameters) => {
2934
2944
 
2935
2945
  // src/fn/sod323f.ts
2936
2946
  import { z as z26 } from "zod";
2937
- import { length as length20 } from "circuit-json";
2947
+ import { length as length19 } from "circuit-json";
2938
2948
  var sod_def5 = z26.object({
2939
2949
  fn: z26.string(),
2940
2950
  num_pins: z26.literal(2).default(2),
@@ -2948,7 +2958,7 @@ var sod323f = (raw_params) => {
2948
2958
  const parameters = sod_def5.parse(raw_params);
2949
2959
  const silkscreenRefText = silkscreenRef(
2950
2960
  0,
2951
- length20.parse(parameters.h),
2961
+ length19.parse(parameters.h),
2952
2962
  0.3
2953
2963
  );
2954
2964
  const silkscreenLine = {
@@ -2957,20 +2967,20 @@ var sod323f = (raw_params) => {
2957
2967
  pcb_component_id: "",
2958
2968
  route: [
2959
2969
  {
2960
- x: length20.parse(parameters.pad_spacing) / 2,
2961
- y: length20.parse(parameters.h) / 2
2970
+ x: length19.parse(parameters.pad_spacing) / 2,
2971
+ y: length19.parse(parameters.h) / 2
2962
2972
  },
2963
2973
  {
2964
- x: -length20.parse(parameters.w) / 2 - 0.2,
2965
- y: length20.parse(parameters.h) / 2
2974
+ x: -length19.parse(parameters.w) / 2 - 0.2,
2975
+ y: length19.parse(parameters.h) / 2
2966
2976
  },
2967
2977
  {
2968
- x: -length20.parse(parameters.w) / 2 - 0.2,
2969
- y: -length20.parse(parameters.h) / 2
2978
+ x: -length19.parse(parameters.w) / 2 - 0.2,
2979
+ y: -length19.parse(parameters.h) / 2
2970
2980
  },
2971
2981
  {
2972
- x: length20.parse(parameters.pad_spacing) / 2,
2973
- y: -length20.parse(parameters.h) / 2
2982
+ x: length19.parse(parameters.pad_spacing) / 2,
2983
+ y: -length19.parse(parameters.h) / 2
2974
2984
  }
2975
2985
  ],
2976
2986
  stroke_width: 0.1,
@@ -3014,7 +3024,7 @@ var sodWithoutParsing5 = (parameters) => {
3014
3024
 
3015
3025
  // src/fn/sod123f.ts
3016
3026
  import { z as z27 } from "zod";
3017
- import { length as length21 } from "circuit-json";
3027
+ import { length as length20 } from "circuit-json";
3018
3028
  var sod_def6 = z27.object({
3019
3029
  fn: z27.string(),
3020
3030
  num_pins: z27.literal(2).default(2),
@@ -3028,7 +3038,7 @@ var sod123f = (raw_params) => {
3028
3038
  const parameters = sod_def6.parse(raw_params);
3029
3039
  const silkscreenRefText = silkscreenRef(
3030
3040
  0,
3031
- length21.parse(parameters.h),
3041
+ length20.parse(parameters.h),
3032
3042
  0.3
3033
3043
  );
3034
3044
  const silkscreenLine = {
@@ -3037,20 +3047,20 @@ var sod123f = (raw_params) => {
3037
3047
  pcb_component_id: "",
3038
3048
  route: [
3039
3049
  {
3040
- x: length21.parse(parameters.p) / 2,
3041
- y: length21.parse(parameters.h) / 2
3050
+ x: length20.parse(parameters.p) / 2,
3051
+ y: length20.parse(parameters.h) / 2
3042
3052
  },
3043
3053
  {
3044
- x: -length21.parse(parameters.w) / 2 - 0.2,
3045
- y: length21.parse(parameters.h) / 2
3054
+ x: -length20.parse(parameters.w) / 2 - 0.2,
3055
+ y: length20.parse(parameters.h) / 2
3046
3056
  },
3047
3057
  {
3048
- x: -length21.parse(parameters.w) / 2 - 0.2,
3049
- y: -length21.parse(parameters.h) / 2
3058
+ x: -length20.parse(parameters.w) / 2 - 0.2,
3059
+ y: -length20.parse(parameters.h) / 2
3050
3060
  },
3051
3061
  {
3052
- x: length21.parse(parameters.p) / 2,
3053
- y: -length21.parse(parameters.h) / 2
3062
+ x: length20.parse(parameters.p) / 2,
3063
+ y: -length20.parse(parameters.h) / 2
3054
3064
  }
3055
3065
  ],
3056
3066
  stroke_width: 0.1,
@@ -3094,7 +3104,7 @@ var sodWithoutParsing6 = (parameters) => {
3094
3104
 
3095
3105
  // src/fn/sod723.ts
3096
3106
  import { z as z28 } from "zod";
3097
- import { length as length22 } from "circuit-json";
3107
+ import { length as length21 } from "circuit-json";
3098
3108
  var sod_def7 = z28.object({
3099
3109
  fn: z28.string(),
3100
3110
  num_pins: z28.literal(2).default(2),
@@ -3108,7 +3118,7 @@ var sod723 = (raw_params) => {
3108
3118
  const parameters = sod_def7.parse(raw_params);
3109
3119
  const silkscreenRefText = silkscreenRef(
3110
3120
  0,
3111
- length22.parse(parameters.h),
3121
+ length21.parse(parameters.h),
3112
3122
  0.3
3113
3123
  );
3114
3124
  const silkscreenLine = {
@@ -3117,20 +3127,20 @@ var sod723 = (raw_params) => {
3117
3127
  pcb_component_id: "",
3118
3128
  route: [
3119
3129
  {
3120
- x: length22.parse(parameters.p) / 2,
3121
- y: length22.parse(parameters.h) / 2
3130
+ x: length21.parse(parameters.p) / 2,
3131
+ y: length21.parse(parameters.h) / 2
3122
3132
  },
3123
3133
  {
3124
- x: -length22.parse(parameters.w) / 2 - 0.1,
3125
- y: length22.parse(parameters.h) / 2
3134
+ x: -length21.parse(parameters.w) / 2 - 0.1,
3135
+ y: length21.parse(parameters.h) / 2
3126
3136
  },
3127
3137
  {
3128
- x: -length22.parse(parameters.w) / 2 - 0.1,
3129
- y: -length22.parse(parameters.h) / 2
3138
+ x: -length21.parse(parameters.w) / 2 - 0.1,
3139
+ y: -length21.parse(parameters.h) / 2
3130
3140
  },
3131
3141
  {
3132
- x: length22.parse(parameters.p) / 2,
3133
- y: -length22.parse(parameters.h) / 2
3142
+ x: length21.parse(parameters.p) / 2,
3143
+ y: -length21.parse(parameters.h) / 2
3134
3144
  }
3135
3145
  ],
3136
3146
  stroke_width: 0.1,
@@ -3174,7 +3184,7 @@ var sodWithoutParsing7 = (parameters) => {
3174
3184
 
3175
3185
  // src/fn/sod128.ts
3176
3186
  import { z as z29 } from "zod";
3177
- import { length as length23 } from "circuit-json";
3187
+ import { length as length22 } from "circuit-json";
3178
3188
  var sod_def8 = z29.object({
3179
3189
  fn: z29.string(),
3180
3190
  num_pins: z29.literal(2).default(2),
@@ -3188,7 +3198,7 @@ var sod128 = (raw_params) => {
3188
3198
  const parameters = sod_def8.parse(raw_params);
3189
3199
  const silkscreenRefText = silkscreenRef(
3190
3200
  0,
3191
- length23.parse(parameters.h) / 2 + 0.4,
3201
+ length22.parse(parameters.h) / 2 + 0.4,
3192
3202
  0.3
3193
3203
  );
3194
3204
  const silkscreenLine = {
@@ -3197,20 +3207,20 @@ var sod128 = (raw_params) => {
3197
3207
  pcb_component_id: "",
3198
3208
  route: [
3199
3209
  {
3200
- x: length23.parse(parameters.p) / 2,
3201
- y: length23.parse(parameters.h) / 2
3210
+ x: length22.parse(parameters.p) / 2,
3211
+ y: length22.parse(parameters.h) / 2
3202
3212
  },
3203
3213
  {
3204
- x: -length23.parse(parameters.w) / 2 - 0.2,
3205
- y: length23.parse(parameters.h) / 2
3214
+ x: -length22.parse(parameters.w) / 2 - 0.2,
3215
+ y: length22.parse(parameters.h) / 2
3206
3216
  },
3207
3217
  {
3208
- x: -length23.parse(parameters.w) / 2 - 0.2,
3209
- y: -length23.parse(parameters.h) / 2
3218
+ x: -length22.parse(parameters.w) / 2 - 0.2,
3219
+ y: -length22.parse(parameters.h) / 2
3210
3220
  },
3211
3221
  {
3212
- x: length23.parse(parameters.p) / 2,
3213
- y: -length23.parse(parameters.h) / 2
3222
+ x: length22.parse(parameters.p) / 2,
3223
+ y: -length22.parse(parameters.h) / 2
3214
3224
  }
3215
3225
  ],
3216
3226
  stroke_width: 0.1,
@@ -3254,18 +3264,18 @@ var sodWithoutParsing8 = (parameters) => {
3254
3264
 
3255
3265
  // src/fn/to220.ts
3256
3266
  import {
3257
- length as length24
3267
+ length as length23
3258
3268
  } from "circuit-json";
3259
3269
  import { z as z30 } from "zod";
3260
3270
  var to220_def = z30.object({
3261
3271
  fn: z30.string().default("to220_3").refine((val) => /^to220_\d+$/.test(val), {
3262
3272
  message: "Invalid format. Expected 'to220_N' where N is the number of pins."
3263
3273
  }),
3264
- p: length24.optional().default("5.0mm"),
3265
- id: length24.optional().default("1.0mm"),
3266
- od: length24.optional().default("1.9mm"),
3267
- w: length24.optional().default("13mm"),
3268
- h: length24.optional().default("7mm")
3274
+ p: length23.optional().default("5.0mm"),
3275
+ id: length23.optional().default("1.0mm"),
3276
+ od: length23.optional().default("1.9mm"),
3277
+ w: length23.optional().default("13mm"),
3278
+ h: length23.optional().default("7mm")
3269
3279
  }).transform((a) => {
3270
3280
  const match = a.fn.match(/^to220_(\d+)$/);
3271
3281
  const numPins = match ? parseInt(match[1], 10) : 3;
@@ -3353,7 +3363,7 @@ var to220 = (raw_params) => {
3353
3363
 
3354
3364
  // src/fn/minimelf.ts
3355
3365
  import { z as z31 } from "zod";
3356
- import { length as length25 } from "circuit-json";
3366
+ import { length as length24 } from "circuit-json";
3357
3367
  var minimelf_def = z31.object({
3358
3368
  fn: z31.string(),
3359
3369
  num_pins: z31.literal(2).default(2),
@@ -3367,7 +3377,7 @@ var minimelf = (raw_params) => {
3367
3377
  const parameters = minimelf_def.parse(raw_params);
3368
3378
  const silkscreenRefText = silkscreenRef(
3369
3379
  0,
3370
- length25.parse(parameters.h) / 2 + 0.4,
3380
+ length24.parse(parameters.h) / 2 + 0.4,
3371
3381
  0.3
3372
3382
  );
3373
3383
  const silkscreenLine = {
@@ -3376,20 +3386,20 @@ var minimelf = (raw_params) => {
3376
3386
  pcb_component_id: "",
3377
3387
  route: [
3378
3388
  {
3379
- x: length25.parse(parameters.p) / 2,
3380
- y: length25.parse(parameters.h) / 2
3389
+ x: length24.parse(parameters.p) / 2,
3390
+ y: length24.parse(parameters.h) / 2
3381
3391
  },
3382
3392
  {
3383
- x: -length25.parse(parameters.w) / 2,
3384
- y: length25.parse(parameters.h) / 2
3393
+ x: -length24.parse(parameters.w) / 2,
3394
+ y: length24.parse(parameters.h) / 2
3385
3395
  },
3386
3396
  {
3387
- x: -length25.parse(parameters.w) / 2,
3388
- y: -length25.parse(parameters.h) / 2
3397
+ x: -length24.parse(parameters.w) / 2,
3398
+ y: -length24.parse(parameters.h) / 2
3389
3399
  },
3390
3400
  {
3391
- x: length25.parse(parameters.p) / 2,
3392
- y: -length25.parse(parameters.h) / 2
3401
+ x: length24.parse(parameters.p) / 2,
3402
+ y: -length24.parse(parameters.h) / 2
3393
3403
  }
3394
3404
  ],
3395
3405
  stroke_width: 0.1,
@@ -3429,7 +3439,7 @@ var miniMelfWithoutParsing = (parameters) => {
3429
3439
 
3430
3440
  // src/fn/sod882d.ts
3431
3441
  import { z as z32 } from "zod";
3432
- import { length as length26 } from "circuit-json";
3442
+ import { length as length25 } from "circuit-json";
3433
3443
  var sod_def9 = z32.object({
3434
3444
  fn: z32.string(),
3435
3445
  num_pins: z32.literal(2).default(2),
@@ -3443,7 +3453,7 @@ var sod882d = (raw_params) => {
3443
3453
  const parameters = sod_def9.parse(raw_params);
3444
3454
  const silkscreenRefText = silkscreenRef(
3445
3455
  0,
3446
- length26.parse(parameters.h) + 0.1,
3456
+ length25.parse(parameters.h) + 0.1,
3447
3457
  0.3
3448
3458
  );
3449
3459
  const silkscreenLine = {
@@ -3452,20 +3462,20 @@ var sod882d = (raw_params) => {
3452
3462
  pcb_component_id: "",
3453
3463
  route: [
3454
3464
  {
3455
- x: length26.parse(parameters.p) / 2 + 0.1,
3456
- y: length26.parse(parameters.h) / 2
3465
+ x: length25.parse(parameters.p) / 2 + 0.1,
3466
+ y: length25.parse(parameters.h) / 2
3457
3467
  },
3458
3468
  {
3459
- x: -length26.parse(parameters.w) / 2,
3460
- y: length26.parse(parameters.h) / 2
3469
+ x: -length25.parse(parameters.w) / 2,
3470
+ y: length25.parse(parameters.h) / 2
3461
3471
  },
3462
3472
  {
3463
- x: -length26.parse(parameters.w) / 2,
3464
- y: -length26.parse(parameters.h) / 2
3473
+ x: -length25.parse(parameters.w) / 2,
3474
+ y: -length25.parse(parameters.h) / 2
3465
3475
  },
3466
3476
  {
3467
- x: length26.parse(parameters.p) / 2 + 0.1,
3468
- y: -length26.parse(parameters.h) / 2
3477
+ x: length25.parse(parameters.p) / 2 + 0.1,
3478
+ y: -length25.parse(parameters.h) / 2
3469
3479
  }
3470
3480
  ],
3471
3481
  stroke_width: 0.1,
@@ -3509,7 +3519,7 @@ var sodWithoutParsing9 = (parameters) => {
3509
3519
 
3510
3520
  // src/fn/melf.ts
3511
3521
  import { z as z33 } from "zod";
3512
- import { length as length27 } from "circuit-json";
3522
+ import { length as length26 } from "circuit-json";
3513
3523
  var melf_def = z33.object({
3514
3524
  fn: z33.string(),
3515
3525
  num_pins: z33.literal(2).default(2),
@@ -3523,7 +3533,7 @@ var melf = (raw_params) => {
3523
3533
  const parameters = melf_def.parse(raw_params);
3524
3534
  const silkscreenRefText = silkscreenRef(
3525
3535
  0,
3526
- length27.parse(parameters.h),
3536
+ length26.parse(parameters.h),
3527
3537
  0.3
3528
3538
  );
3529
3539
  const silkscreenLine = {
@@ -3532,20 +3542,20 @@ var melf = (raw_params) => {
3532
3542
  pcb_component_id: "",
3533
3543
  route: [
3534
3544
  {
3535
- x: length27.parse(parameters.p) / 2,
3536
- y: length27.parse(parameters.h) / 2
3545
+ x: length26.parse(parameters.p) / 2,
3546
+ y: length26.parse(parameters.h) / 2
3537
3547
  },
3538
3548
  {
3539
- x: -length27.parse(parameters.w) / 2,
3540
- y: length27.parse(parameters.h) / 2
3549
+ x: -length26.parse(parameters.w) / 2,
3550
+ y: length26.parse(parameters.h) / 2
3541
3551
  },
3542
3552
  {
3543
- x: -length27.parse(parameters.w) / 2,
3544
- y: -length27.parse(parameters.h) / 2
3553
+ x: -length26.parse(parameters.w) / 2,
3554
+ y: -length26.parse(parameters.h) / 2
3545
3555
  },
3546
3556
  {
3547
- x: length27.parse(parameters.p) / 2,
3548
- y: -length27.parse(parameters.h) / 2
3557
+ x: length26.parse(parameters.p) / 2,
3558
+ y: -length26.parse(parameters.h) / 2
3549
3559
  }
3550
3560
  ],
3551
3561
  stroke_width: 0.1,
@@ -3589,7 +3599,7 @@ var melfWithoutParsing = (parameters) => {
3589
3599
 
3590
3600
  // src/fn/micromelf.ts
3591
3601
  import { z as z34 } from "zod";
3592
- import { length as length28 } from "circuit-json";
3602
+ import { length as length27 } from "circuit-json";
3593
3603
  var micromelf_def = z34.object({
3594
3604
  fn: z34.string(),
3595
3605
  num_pins: z34.literal(2).default(2),
@@ -3603,7 +3613,7 @@ var micromelf = (raw_params) => {
3603
3613
  const parameters = micromelf_def.parse(raw_params);
3604
3614
  const silkscreenRefText = silkscreenRef(
3605
3615
  0,
3606
- length28.parse(parameters.h),
3616
+ length27.parse(parameters.h),
3607
3617
  0.3
3608
3618
  );
3609
3619
  const silkscreenLine = {
@@ -3612,20 +3622,20 @@ var micromelf = (raw_params) => {
3612
3622
  pcb_component_id: "",
3613
3623
  route: [
3614
3624
  {
3615
- x: length28.parse(parameters.p) / 2,
3616
- y: length28.parse(parameters.h) / 2
3625
+ x: length27.parse(parameters.p) / 2,
3626
+ y: length27.parse(parameters.h) / 2
3617
3627
  },
3618
3628
  {
3619
- x: -length28.parse(parameters.w) / 2 - 0.1,
3620
- y: length28.parse(parameters.h) / 2
3629
+ x: -length27.parse(parameters.w) / 2 - 0.1,
3630
+ y: length27.parse(parameters.h) / 2
3621
3631
  },
3622
3632
  {
3623
- x: -length28.parse(parameters.w) / 2 - 0.1,
3624
- y: -length28.parse(parameters.h) / 2
3633
+ x: -length27.parse(parameters.w) / 2 - 0.1,
3634
+ y: -length27.parse(parameters.h) / 2
3625
3635
  },
3626
3636
  {
3627
- x: length28.parse(parameters.p) / 2,
3628
- y: -length28.parse(parameters.h) / 2
3637
+ x: length27.parse(parameters.p) / 2,
3638
+ y: -length27.parse(parameters.h) / 2
3629
3639
  }
3630
3640
  ],
3631
3641
  stroke_width: 0.1,
@@ -3669,7 +3679,7 @@ var microMelfWithoutParsing = (parameters) => {
3669
3679
 
3670
3680
  // src/fn/smb.ts
3671
3681
  import { z as z35 } from "zod";
3672
- import { length as length29 } from "circuit-json";
3682
+ import { length as length28 } from "circuit-json";
3673
3683
  var smb_def = z35.object({
3674
3684
  fn: z35.string(),
3675
3685
  num_pins: z35.literal(2).default(2),
@@ -3683,7 +3693,7 @@ var smb = (raw_params) => {
3683
3693
  const parameters = smb_def.parse(raw_params);
3684
3694
  const silkscreenRefText = silkscreenRef(
3685
3695
  0,
3686
- length29.parse(parameters.h) / 2 + 0.5,
3696
+ length28.parse(parameters.h) / 2 + 0.5,
3687
3697
  0.3
3688
3698
  );
3689
3699
  const silkscreenLine = {
@@ -3692,20 +3702,20 @@ var smb = (raw_params) => {
3692
3702
  pcb_component_id: "",
3693
3703
  route: [
3694
3704
  {
3695
- x: length29.parse(parameters.p) / 2,
3696
- y: length29.parse(parameters.h) / 2
3705
+ x: length28.parse(parameters.p) / 2,
3706
+ y: length28.parse(parameters.h) / 2
3697
3707
  },
3698
3708
  {
3699
- x: -length29.parse(parameters.w) / 2 - 0.1,
3700
- y: length29.parse(parameters.h) / 2
3709
+ x: -length28.parse(parameters.w) / 2 - 0.1,
3710
+ y: length28.parse(parameters.h) / 2
3701
3711
  },
3702
3712
  {
3703
- x: -length29.parse(parameters.w) / 2 - 0.1,
3704
- y: -length29.parse(parameters.h) / 2
3713
+ x: -length28.parse(parameters.w) / 2 - 0.1,
3714
+ y: -length28.parse(parameters.h) / 2
3705
3715
  },
3706
3716
  {
3707
- x: length29.parse(parameters.p) / 2,
3708
- y: -length29.parse(parameters.h) / 2
3717
+ x: length28.parse(parameters.p) / 2,
3718
+ y: -length28.parse(parameters.h) / 2
3709
3719
  }
3710
3720
  ],
3711
3721
  stroke_width: 0.1,