@tscircuit/footprinter 0.0.280 → 0.0.282

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
@@ -35,6 +35,7 @@ __export(fn_exports, {
35
35
  qfn: () => qfn,
36
36
  qfp: () => qfp,
37
37
  quad: () => quad,
38
+ radial: () => radial,
38
39
  res: () => res,
39
40
  sma: () => sma,
40
41
  smb: () => smb,
@@ -516,9 +517,125 @@ var led = (parameters) => {
516
517
  return { circuitJson: passive(parameters), parameters };
517
518
  };
518
519
 
520
+ // src/helpers/res0402-array2.ts
521
+ var padSpacing = 1.02;
522
+ var padWidth = 0.54;
523
+ var padHeight = 0.64;
524
+ var padPitch = 0.9;
525
+ var res0402Array2 = (params) => {
526
+ const yPositions = [padPitch / 2, -padPitch / 2];
527
+ const pads = [];
528
+ yPositions.forEach((y, index) => {
529
+ pads.push(rectpad(index + 1, -padSpacing / 2, y, padWidth, padHeight));
530
+ });
531
+ yPositions.slice().reverse().forEach((y, index) => {
532
+ pads.push(rectpad(index + 3, padSpacing / 2, y, padWidth, padHeight));
533
+ });
534
+ const top = Math.max(...yPositions) + padHeight / 2 + 0.4;
535
+ const bottom = Math.min(...yPositions) - padHeight / 2 - 0.4;
536
+ const left = -padSpacing / 2 - padWidth / 2 - 0.4;
537
+ const right = padSpacing / 2 + padWidth / 2 + 0.4;
538
+ const silkscreenLine = {
539
+ type: "pcb_silkscreen_path",
540
+ layer: "top",
541
+ pcb_component_id: "",
542
+ route: [
543
+ { x: right, y: top },
544
+ { x: left, y: top },
545
+ { x: left, y: bottom },
546
+ { x: right, y: bottom },
547
+ { x: right, y: top }
548
+ ],
549
+ stroke_width: 0.1,
550
+ pcb_silkscreen_path_id: ""
551
+ };
552
+ const textY = params.textbottom ? bottom - 0.9 : top + 0.9;
553
+ const silkscreenRefText = silkscreenRef(0, textY, 0.2);
554
+ return [...pads, silkscreenLine, silkscreenRefText];
555
+ };
556
+
557
+ // src/helpers/res0402-array4.ts
558
+ var padSpacing2 = 1.02;
559
+ var padWidth2 = 0.54;
560
+ var padHeight2 = 0.64;
561
+ var padPitch2 = 0.9;
562
+ var res0402Array4 = (params) => {
563
+ const yPositions = [
564
+ padPitch2 * 1.5,
565
+ padPitch2 * 0.5,
566
+ -padPitch2 * 0.5,
567
+ -padPitch2 * 1.5
568
+ ];
569
+ const pads = [];
570
+ yPositions.forEach((y, index) => {
571
+ pads.push(rectpad(index + 1, -padSpacing2 / 2, y, padWidth2, padHeight2));
572
+ });
573
+ yPositions.slice().reverse().forEach((y, index) => {
574
+ pads.push(rectpad(index + 5, padSpacing2 / 2, y, padWidth2, padHeight2));
575
+ });
576
+ const top = Math.max(...yPositions) + padHeight2 / 2 + 0.4;
577
+ const bottom = Math.min(...yPositions) - padHeight2 / 2 - 0.4;
578
+ const left = -padSpacing2 / 2 - padWidth2 / 2 - 0.4;
579
+ const right = padSpacing2 / 2 + padWidth2 / 2 + 0.4;
580
+ const silkscreenLine = {
581
+ type: "pcb_silkscreen_path",
582
+ layer: "top",
583
+ pcb_component_id: "",
584
+ route: [
585
+ { x: right, y: top },
586
+ { x: left, y: top },
587
+ { x: left, y: bottom },
588
+ { x: right, y: bottom },
589
+ { x: right, y: top }
590
+ ],
591
+ stroke_width: 0.1,
592
+ pcb_silkscreen_path_id: ""
593
+ };
594
+ const textY = params.textbottom ? bottom - 0.9 : top + 0.9;
595
+ const silkscreenRefText = silkscreenRef(0, textY, 0.2);
596
+ return [...pads, silkscreenLine, silkscreenRefText];
597
+ };
598
+
519
599
  // src/fn/res.ts
520
- var res = (parameters) => {
521
- return { circuitJson: passive(parameters), parameters };
600
+ var getArrayCount = (parameters) => {
601
+ const arrayValue = parameters.array ?? parameters.x;
602
+ if (typeof arrayValue === "number") {
603
+ return Number.isNaN(arrayValue) ? void 0 : arrayValue;
604
+ }
605
+ if (typeof arrayValue === "string") {
606
+ const parsed = Number.parseInt(arrayValue, 10);
607
+ return Number.isNaN(parsed) ? void 0 : parsed;
608
+ }
609
+ if (typeof parameters.imperial === "string") {
610
+ const match = parameters.imperial.match(/(?:array|x)(2|4)$/);
611
+ const count = match?.[1];
612
+ if (count) {
613
+ return Number.parseInt(count, 10);
614
+ }
615
+ }
616
+ return void 0;
617
+ };
618
+ var getImperialBase = (imperial) => {
619
+ if (!imperial) return void 0;
620
+ const imperialString = typeof imperial === "number" ? `${imperial}` : imperial;
621
+ return imperialString.split("_")[0];
622
+ };
623
+ var res = (rawParameters) => {
624
+ const arrayCount = getArrayCount(rawParameters);
625
+ const imperialBase = getImperialBase(rawParameters.imperial);
626
+ if (arrayCount === 2 && imperialBase === "0402") {
627
+ return {
628
+ circuitJson: res0402Array2(rawParameters),
629
+ parameters: rawParameters
630
+ };
631
+ }
632
+ if (arrayCount === 4 && imperialBase === "0402") {
633
+ return {
634
+ circuitJson: res0402Array4(rawParameters),
635
+ parameters: rawParameters
636
+ };
637
+ }
638
+ return { circuitJson: passive(rawParameters), parameters: rawParameters };
522
639
  };
523
640
 
524
641
  // src/helpers/circlepad.ts
@@ -2379,10 +2496,147 @@ var axial = (raw_params) => {
2379
2496
  };
2380
2497
  };
2381
2498
 
2382
- // src/fn/pushbutton.ts
2383
- import { length as length11 } from "circuit-json";
2499
+ // src/fn/radial.ts
2500
+ import {
2501
+ length as length11
2502
+ } from "circuit-json";
2384
2503
  import { z as z19 } from "zod";
2385
2504
 
2505
+ // src/helpers/generateCircleArcs.ts
2506
+ var generateCircleArcs = (centerX, centerY, radius, cut, cutHeight, segmentLength = 0.1) => {
2507
+ const topArc = [];
2508
+ const bottomArc = [];
2509
+ const segments = Math.max(1, Math.ceil(Math.PI * radius / segmentLength));
2510
+ const thetaStep = Math.PI / segments;
2511
+ for (let i = 0; i <= segments; i++) {
2512
+ const theta = i * thetaStep;
2513
+ const x = centerX + Math.cos(theta) * radius;
2514
+ const y = centerY + Math.sin(theta) * radius;
2515
+ if (x < centerX - cut && y >= centerY - cutHeight / 2 && y <= centerY + cutHeight / 2) {
2516
+ continue;
2517
+ }
2518
+ topArc.push({ x, y });
2519
+ }
2520
+ for (let i = 0; i <= segments; i++) {
2521
+ const theta = Math.PI + i * thetaStep;
2522
+ const x = centerX + Math.cos(theta) * radius;
2523
+ const y = centerY + Math.sin(theta) * radius;
2524
+ if (x < centerX - cut && y >= centerY - cutHeight / 2 && y <= centerY + cutHeight / 2) {
2525
+ continue;
2526
+ }
2527
+ bottomArc.push({ x, y });
2528
+ }
2529
+ return { topArc, bottomArc };
2530
+ };
2531
+
2532
+ // src/fn/radial.ts
2533
+ var radial_def = base_def.extend({
2534
+ fn: z19.string(),
2535
+ p: length11.optional().default("5mm"),
2536
+ id: length11.optional().default("0.8mm"),
2537
+ od: length11.optional().default("1.6mm"),
2538
+ ceramic: z19.boolean().optional(),
2539
+ electrolytic: z19.boolean().optional(),
2540
+ polarized: z19.boolean().optional()
2541
+ });
2542
+ var radial = (raw_params) => {
2543
+ const parameters = radial_def.parse(raw_params);
2544
+ const { p, id, od } = parameters;
2545
+ if (id === 0.8 && od === 1.6) {
2546
+ parameters.id = p === 5 ? 0.8 : p * 0.25;
2547
+ parameters.od = p === 5 ? 1.6 : p * 0.5;
2548
+ }
2549
+ const plated_holes = [
2550
+ platedhole(1, -p / 2, 0, parameters.id, parameters.od),
2551
+ platedhole(2, p / 2, 0, parameters.id, parameters.od)
2552
+ ];
2553
+ const bodyR = p + 0.1;
2554
+ const { topArc, bottomArc } = generateCircleArcs(
2555
+ 0,
2556
+ 0,
2557
+ bodyR,
2558
+ parameters.od / 2,
2559
+ parameters.od
2560
+ );
2561
+ const strokeWidth = 0.02 * p;
2562
+ const silkscreenBodyTop = {
2563
+ type: "pcb_silkscreen_path",
2564
+ layer: "top",
2565
+ pcb_component_id: "",
2566
+ route: topArc,
2567
+ stroke_width: strokeWidth,
2568
+ pcb_silkscreen_path_id: ""
2569
+ };
2570
+ const silkscreenBodyBottom = {
2571
+ type: "pcb_silkscreen_path",
2572
+ layer: "top",
2573
+ pcb_component_id: "",
2574
+ route: bottomArc,
2575
+ stroke_width: strokeWidth,
2576
+ pcb_silkscreen_path_id: ""
2577
+ };
2578
+ const silkscreenCenterLine = {
2579
+ type: "pcb_silkscreen_path",
2580
+ layer: "top",
2581
+ pcb_component_id: "",
2582
+ route: [
2583
+ { x: 0, y: bodyR },
2584
+ { x: 0, y: -bodyR }
2585
+ ],
2586
+ stroke_width: strokeWidth,
2587
+ pcb_silkscreen_path_id: ""
2588
+ };
2589
+ const plusSize = 0.1 * p;
2590
+ const plusX = -(p + plusSize + 0.04 * p);
2591
+ const plusY = bodyR - plusSize - 0.08 * p;
2592
+ const plusHoriz = {
2593
+ type: "pcb_silkscreen_path",
2594
+ layer: "top",
2595
+ pcb_component_id: "",
2596
+ route: [
2597
+ { x: plusX - plusSize, y: plusY },
2598
+ { x: plusX + plusSize, y: plusY }
2599
+ ],
2600
+ stroke_width: strokeWidth,
2601
+ pcb_silkscreen_path_id: ""
2602
+ };
2603
+ const plusVert = {
2604
+ type: "pcb_silkscreen_path",
2605
+ layer: "top",
2606
+ pcb_component_id: "",
2607
+ route: [
2608
+ { x: plusX, y: plusY - plusSize },
2609
+ { x: plusX, y: plusY + plusSize }
2610
+ ],
2611
+ stroke_width: strokeWidth,
2612
+ pcb_silkscreen_path_id: ""
2613
+ };
2614
+ const silkscreenRefText = silkscreenRef(
2615
+ 0,
2616
+ bodyR + 0.12 * p,
2617
+ 0.1 * p
2618
+ );
2619
+ const circuitJson = [
2620
+ ...plated_holes,
2621
+ silkscreenBodyTop,
2622
+ silkscreenBodyBottom,
2623
+ silkscreenCenterLine,
2624
+ silkscreenRefText
2625
+ ];
2626
+ const hasPolarity = parameters.electrolytic === true || parameters.polarized === true;
2627
+ if (hasPolarity) {
2628
+ circuitJson.push(plusHoriz, plusVert);
2629
+ }
2630
+ return {
2631
+ circuitJson,
2632
+ parameters
2633
+ };
2634
+ };
2635
+
2636
+ // src/fn/pushbutton.ts
2637
+ import { length as length12 } from "circuit-json";
2638
+ import { z as z20 } from "zod";
2639
+
2386
2640
  // src/helpers/silkscreenpath.ts
2387
2641
  var silkscreenpath = (route, options = {}) => {
2388
2642
  return {
@@ -2397,11 +2651,11 @@ var silkscreenpath = (route, options = {}) => {
2397
2651
 
2398
2652
  // src/fn/pushbutton.ts
2399
2653
  var pushbutton_def = base_def.extend({
2400
- fn: z19.literal("pushbutton"),
2401
- w: length11.default(4.5),
2402
- h: length11.default(6.5),
2403
- id: length11.default(1),
2404
- od: length11.default(1.2)
2654
+ fn: z20.literal("pushbutton"),
2655
+ w: length12.default(4.5),
2656
+ h: length12.default(6.5),
2657
+ id: length12.default(1),
2658
+ od: length12.default(1.2)
2405
2659
  });
2406
2660
  var pushbutton = (raw_params) => {
2407
2661
  const parameters = pushbutton_def.parse(raw_params);
@@ -2448,24 +2702,24 @@ var pushbutton = (raw_params) => {
2448
2702
 
2449
2703
  // src/fn/stampboard.ts
2450
2704
  import {
2451
- length as length12
2705
+ length as length13
2452
2706
  } from "circuit-json";
2453
- import { z as z20 } from "zod";
2707
+ import { z as z21 } from "zod";
2454
2708
  var stampboard_def = base_def.extend({
2455
- fn: z20.string(),
2456
- w: length12.default("22.58mm"),
2457
- h: length12.optional(),
2458
- left: length12.optional().default(20),
2459
- right: length12.optional().default(20),
2460
- top: length12.optional().default(2),
2461
- bottom: length12.optional().default(2),
2462
- p: length12.default(length12.parse("2.54mm")),
2463
- pw: length12.default(length12.parse("1.6mm")),
2464
- pl: length12.default(length12.parse("2.4mm")),
2465
- innerhole: z20.boolean().default(false),
2466
- innerholeedgedistance: length12.default(length12.parse("1.61mm")),
2467
- silkscreenlabels: z20.boolean().default(false),
2468
- silkscreenlabelmargin: length12.default(length12.parse("0.1mm"))
2709
+ fn: z21.string(),
2710
+ w: length13.default("22.58mm"),
2711
+ h: length13.optional(),
2712
+ left: length13.optional().default(20),
2713
+ right: length13.optional().default(20),
2714
+ top: length13.optional().default(2),
2715
+ bottom: length13.optional().default(2),
2716
+ p: length13.default(length13.parse("2.54mm")),
2717
+ pw: length13.default(length13.parse("1.6mm")),
2718
+ pl: length13.default(length13.parse("2.4mm")),
2719
+ innerhole: z21.boolean().default(false),
2720
+ innerholeedgedistance: length13.default(length13.parse("1.61mm")),
2721
+ silkscreenlabels: z21.boolean().default(false),
2722
+ silkscreenlabelmargin: length13.default(length13.parse("0.1mm"))
2469
2723
  });
2470
2724
  var getHeight = (parameters) => {
2471
2725
  const params = stampboard_def.parse(parameters);
@@ -2874,22 +3128,22 @@ var stampboard = (raw_params) => {
2874
3128
 
2875
3129
  // src/fn/stampreceiver.ts
2876
3130
  import {
2877
- length as length13
3131
+ length as length14
2878
3132
  } from "circuit-json";
2879
- import { z as z21 } from "zod";
3133
+ import { z as z22 } from "zod";
2880
3134
  var stampreceiver_def = base_def.extend({
2881
- fn: z21.string(),
2882
- w: length13.default("22.58mm"),
2883
- h: length13.optional(),
2884
- left: length13.optional().default(20),
2885
- right: length13.optional().default(20),
2886
- top: length13.optional().default(2),
2887
- bottom: length13.optional().default(2),
2888
- p: length13.default(length13.parse("2.54mm")),
2889
- pw: length13.default(length13.parse("1.6mm")),
2890
- pl: length13.default(length13.parse("3.2mm")),
2891
- innerhole: z21.boolean().default(false),
2892
- innerholeedgedistance: length13.default(length13.parse("1.61mm"))
3135
+ fn: z22.string(),
3136
+ w: length14.default("22.58mm"),
3137
+ h: length14.optional(),
3138
+ left: length14.optional().default(20),
3139
+ right: length14.optional().default(20),
3140
+ top: length14.optional().default(2),
3141
+ bottom: length14.optional().default(2),
3142
+ p: length14.default(length14.parse("2.54mm")),
3143
+ pw: length14.default(length14.parse("1.6mm")),
3144
+ pl: length14.default(length14.parse("3.2mm")),
3145
+ innerhole: z22.boolean().default(false),
3146
+ innerholeedgedistance: length14.default(length14.parse("1.61mm"))
2893
3147
  });
2894
3148
  var getHeight2 = (parameters) => {
2895
3149
  const params = stampreceiver_def.parse(parameters);
@@ -3190,20 +3444,20 @@ var lqfp = (parameters) => {
3190
3444
 
3191
3445
  // src/fn/breakoutheaders.ts
3192
3446
  import {
3193
- length as length14
3447
+ length as length15
3194
3448
  } from "circuit-json";
3195
- import { z as z22 } from "zod";
3449
+ import { z as z23 } from "zod";
3196
3450
  var breakoutheaders_def = base_def.extend({
3197
- fn: z22.string(),
3198
- w: length14.default("10mm"),
3199
- h: length14.optional(),
3200
- left: length14.optional().default(20),
3201
- right: length14.optional().default(20),
3202
- top: length14.optional().default(0),
3203
- bottom: length14.optional().default(0),
3204
- p: length14.default(length14.parse("2.54mm")),
3205
- id: length14.optional().default(length14.parse("1mm")),
3206
- od: length14.optional().default(length14.parse("1.5mm"))
3451
+ fn: z23.string(),
3452
+ w: length15.default("10mm"),
3453
+ h: length15.optional(),
3454
+ left: length15.optional().default(20),
3455
+ right: length15.optional().default(20),
3456
+ top: length15.optional().default(0),
3457
+ bottom: length15.optional().default(0),
3458
+ p: length15.default(length15.parse("2.54mm")),
3459
+ id: length15.optional().default(length15.parse("1mm")),
3460
+ od: length15.optional().default(length15.parse("1.5mm"))
3207
3461
  });
3208
3462
  var getHeight3 = (parameters) => {
3209
3463
  const params = breakoutheaders_def.parse(parameters);
@@ -3395,9 +3649,9 @@ var breakoutheaders = (raw_params) => {
3395
3649
 
3396
3650
  // src/fn/hc49.ts
3397
3651
  import {
3398
- length as length15
3652
+ length as length16
3399
3653
  } from "circuit-json";
3400
- import { z as z23 } from "zod";
3654
+ import { z as z24 } from "zod";
3401
3655
  var generate_u_curve = (centerX, centerY, radius, direction) => {
3402
3656
  return Array.from({ length: 25 }, (_, i) => {
3403
3657
  const theta = i / 24 * Math.PI - Math.PI / 2;
@@ -3408,12 +3662,12 @@ var generate_u_curve = (centerX, centerY, radius, direction) => {
3408
3662
  });
3409
3663
  };
3410
3664
  var hc49_def = base_def.extend({
3411
- fn: z23.string(),
3412
- p: length15.optional().default("4.88mm"),
3413
- id: length15.optional().default("0.8mm"),
3414
- od: length15.optional().default("1.5mm"),
3415
- w: length15.optional().default("5.6mm"),
3416
- h: length15.optional().default("3.5mm")
3665
+ fn: z24.string(),
3666
+ p: length16.optional().default("4.88mm"),
3667
+ id: length16.optional().default("0.8mm"),
3668
+ od: length16.optional().default("1.5mm"),
3669
+ w: length16.optional().default("5.6mm"),
3670
+ h: length16.optional().default("3.5mm")
3417
3671
  });
3418
3672
  var hc49 = (raw_params) => {
3419
3673
  const parameters = hc49_def.parse(raw_params);
@@ -3454,11 +3708,11 @@ var hc49 = (raw_params) => {
3454
3708
 
3455
3709
  // src/fn/pad.ts
3456
3710
  import "zod";
3457
- import { length as length16 } from "circuit-json";
3711
+ import { length as length17 } from "circuit-json";
3458
3712
  import { mm as mm5 } from "@tscircuit/mm";
3459
3713
  var pad_def = base_def.extend({
3460
- w: length16,
3461
- h: length16
3714
+ w: length17,
3715
+ h: length17
3462
3716
  });
3463
3717
  var pad = (params) => {
3464
3718
  const { w, h } = params;
@@ -3474,7 +3728,7 @@ var pad = (params) => {
3474
3728
  };
3475
3729
 
3476
3730
  // src/fn/to92.ts
3477
- import { z as z25 } from "zod";
3731
+ import { z as z26 } from "zod";
3478
3732
  import "@tscircuit/mm";
3479
3733
 
3480
3734
  // src/helpers/platedHolePill.ts
@@ -3499,15 +3753,15 @@ var platedHolePill = (pn, x, y, holeDiameter, outerWidth, outerHeight) => {
3499
3753
 
3500
3754
  // src/fn/to92.ts
3501
3755
  var to92_def = base_def.extend({
3502
- fn: z25.string(),
3503
- num_pins: z25.union([z25.literal(3), z25.literal(2)]).default(3),
3504
- p: z25.string().default("1.27mm"),
3505
- id: z25.string().default("0.72mm"),
3506
- od: z25.string().default("0.95mm"),
3507
- w: z25.string().default("4.5mm"),
3508
- h: z25.string().default("4.5mm"),
3509
- inline: z25.boolean().default(false),
3510
- string: z25.string().optional()
3756
+ fn: z26.string(),
3757
+ num_pins: z26.union([z26.literal(3), z26.literal(2)]).default(3),
3758
+ p: z26.string().default("1.27mm"),
3759
+ id: z26.string().default("0.72mm"),
3760
+ od: z26.string().default("0.95mm"),
3761
+ w: z26.string().default("4.5mm"),
3762
+ h: z26.string().default("4.5mm"),
3763
+ inline: z26.boolean().default(false),
3764
+ string: z26.string().optional()
3511
3765
  });
3512
3766
  var generateSemicircle = (centerX, centerY, radius) => {
3513
3767
  return Array.from({ length: 25 }, (_, i) => {
@@ -3527,41 +3781,41 @@ var to92 = (raw_params) => {
3527
3781
  });
3528
3782
  const { p, id, od, w, h, inline } = parameters;
3529
3783
  const holeY = Number.parseFloat(h) / 2;
3530
- const padSpacing = Number.parseFloat(p);
3784
+ const padSpacing3 = Number.parseFloat(p);
3531
3785
  const holeDia = Number.parseFloat(id);
3532
3786
  const padDia = Number.parseFloat(od);
3533
- const padWidth = padDia;
3534
- const padHeight = padDia * (1.5 / 1.05);
3787
+ const padWidth3 = padDia;
3788
+ const padHeight3 = padDia * (1.5 / 1.05);
3535
3789
  let platedHoles = [];
3536
3790
  if (parameters.num_pins === 3) {
3537
3791
  if (inline) {
3538
3792
  platedHoles = [
3539
3793
  platedHoleWithRectPad(
3540
3794
  1,
3541
- -padSpacing,
3542
- holeY - padSpacing,
3795
+ -padSpacing3,
3796
+ holeY - padSpacing3,
3543
3797
  holeDia,
3544
3798
  padDia,
3545
- padHeight,
3799
+ padHeight3,
3546
3800
  0,
3547
3801
  0
3548
3802
  ),
3549
- platedHolePill(2, 0, holeY - padSpacing, holeDia, padWidth, padHeight),
3803
+ platedHolePill(2, 0, holeY - padSpacing3, holeDia, padWidth3, padHeight3),
3550
3804
  platedHolePill(
3551
3805
  3,
3552
- padSpacing,
3553
- holeY - padSpacing,
3806
+ padSpacing3,
3807
+ holeY - padSpacing3,
3554
3808
  holeDia,
3555
- padWidth,
3556
- padHeight
3809
+ padWidth3,
3810
+ padHeight3
3557
3811
  )
3558
3812
  ];
3559
3813
  } else {
3560
3814
  platedHoles = [
3561
3815
  platedHoleWithRectPad(
3562
3816
  1,
3563
- -padSpacing,
3564
- holeY - padSpacing,
3817
+ -padSpacing3,
3818
+ holeY - padSpacing3,
3565
3819
  holeDia,
3566
3820
  padDia,
3567
3821
  padDia,
@@ -3569,28 +3823,28 @@ var to92 = (raw_params) => {
3569
3823
  0
3570
3824
  ),
3571
3825
  platedhole(2, 0, holeY, holeDia, padDia),
3572
- platedhole(3, padSpacing, holeY - padSpacing, holeDia, padDia)
3826
+ platedhole(3, padSpacing3, holeY - padSpacing3, holeDia, padDia)
3573
3827
  ];
3574
3828
  }
3575
3829
  } else if (parameters.num_pins === 2) {
3576
3830
  platedHoles = [
3577
3831
  platedHoleWithRectPad(
3578
3832
  1,
3579
- -padSpacing,
3580
- holeY - padSpacing,
3833
+ -padSpacing3,
3834
+ holeY - padSpacing3,
3581
3835
  holeDia,
3582
- padWidth,
3583
- padHeight,
3836
+ padWidth3,
3837
+ padHeight3,
3584
3838
  0,
3585
3839
  0
3586
3840
  ),
3587
3841
  platedHolePill(
3588
3842
  2,
3589
- padSpacing,
3590
- holeY - padSpacing,
3843
+ padSpacing3,
3844
+ holeY - padSpacing3,
3591
3845
  holeDia,
3592
- padWidth,
3593
- padHeight
3846
+ padWidth3,
3847
+ padHeight3
3594
3848
  )
3595
3849
  ];
3596
3850
  } else {
@@ -3623,22 +3877,22 @@ var to92 = (raw_params) => {
3623
3877
  };
3624
3878
 
3625
3879
  // src/fn/sod523.ts
3626
- import { z as z26 } from "zod";
3627
- import { length as length17 } from "circuit-json";
3880
+ import { z as z27 } from "zod";
3881
+ import { length as length18 } from "circuit-json";
3628
3882
  var sod_def2 = base_def.extend({
3629
- fn: z26.string(),
3630
- num_pins: z26.literal(2).default(2),
3631
- w: z26.string().default("2.15mm"),
3632
- h: z26.string().default("1.20mm"),
3633
- pl: z26.string().default("0.5mm"),
3634
- pw: z26.string().default("0.6mm"),
3635
- p: z26.string().default("1.4mm")
3883
+ fn: z27.string(),
3884
+ num_pins: z27.literal(2).default(2),
3885
+ w: z27.string().default("2.15mm"),
3886
+ h: z27.string().default("1.20mm"),
3887
+ pl: z27.string().default("0.5mm"),
3888
+ pw: z27.string().default("0.6mm"),
3889
+ p: z27.string().default("1.4mm")
3636
3890
  });
3637
3891
  var sod523 = (raw_params) => {
3638
3892
  const parameters = sod_def2.parse(raw_params);
3639
3893
  const silkscreenRefText = silkscreenRef(
3640
3894
  0,
3641
- length17.parse(parameters.h),
3895
+ length18.parse(parameters.h),
3642
3896
  0.3
3643
3897
  );
3644
3898
  const silkscreenLine = {
@@ -3647,20 +3901,20 @@ var sod523 = (raw_params) => {
3647
3901
  pcb_component_id: "",
3648
3902
  route: [
3649
3903
  {
3650
- x: length17.parse(parameters.p) / 2,
3651
- y: length17.parse(parameters.h) / 2
3904
+ x: length18.parse(parameters.p) / 2,
3905
+ y: length18.parse(parameters.h) / 2
3652
3906
  },
3653
3907
  {
3654
- x: -length17.parse(parameters.w) / 2 - 0.2,
3655
- y: length17.parse(parameters.h) / 2
3908
+ x: -length18.parse(parameters.w) / 2 - 0.2,
3909
+ y: length18.parse(parameters.h) / 2
3656
3910
  },
3657
3911
  {
3658
- x: -length17.parse(parameters.w) / 2 - 0.2,
3659
- y: -length17.parse(parameters.h) / 2
3912
+ x: -length18.parse(parameters.w) / 2 - 0.2,
3913
+ y: -length18.parse(parameters.h) / 2
3660
3914
  },
3661
3915
  {
3662
- x: length17.parse(parameters.p) / 2,
3663
- y: -length17.parse(parameters.h) / 2
3916
+ x: length18.parse(parameters.p) / 2,
3917
+ y: -length18.parse(parameters.h) / 2
3664
3918
  }
3665
3919
  ],
3666
3920
  stroke_width: 0.1,
@@ -3748,22 +4002,22 @@ var sop8 = (raw_params) => {
3748
4002
  };
3749
4003
 
3750
4004
  // src/fn/sod80.ts
3751
- import { z as z27 } from "zod";
3752
- import { length as length18 } from "circuit-json";
4005
+ import { z as z28 } from "zod";
4006
+ import { length as length19 } from "circuit-json";
3753
4007
  var sod80_def = base_def.extend({
3754
- fn: z27.string(),
3755
- num_pins: z27.literal(2).default(2),
3756
- w: z27.string().default("5.0mm"),
3757
- h: z27.string().default("2.30mm"),
3758
- pl: z27.string().default("1.25mm"),
3759
- pw: z27.string().default("2mm"),
3760
- p: z27.string().default("3.75mm")
4008
+ fn: z28.string(),
4009
+ num_pins: z28.literal(2).default(2),
4010
+ w: z28.string().default("5.0mm"),
4011
+ h: z28.string().default("2.30mm"),
4012
+ pl: z28.string().default("1.25mm"),
4013
+ pw: z28.string().default("2mm"),
4014
+ p: z28.string().default("3.75mm")
3761
4015
  });
3762
4016
  var sod80 = (raw_params) => {
3763
4017
  const parameters = sod80_def.parse(raw_params);
3764
4018
  const silkscreenRefText = silkscreenRef(
3765
4019
  0,
3766
- length18.parse(parameters.h) / 2 + 1,
4020
+ length19.parse(parameters.h) / 2 + 1,
3767
4021
  0.3
3768
4022
  );
3769
4023
  const silkscreenLine = {
@@ -3772,20 +4026,20 @@ var sod80 = (raw_params) => {
3772
4026
  pcb_component_id: "",
3773
4027
  route: [
3774
4028
  {
3775
- x: length18.parse(parameters.p) / 2 + 0.5,
3776
- y: length18.parse(parameters.h) / 2 + 0.5
4029
+ x: length19.parse(parameters.p) / 2 + 0.5,
4030
+ y: length19.parse(parameters.h) / 2 + 0.5
3777
4031
  },
3778
4032
  {
3779
- x: -length18.parse(parameters.w) / 2 - 0.5,
3780
- y: length18.parse(parameters.h) / 2 + 0.5
4033
+ x: -length19.parse(parameters.w) / 2 - 0.5,
4034
+ y: length19.parse(parameters.h) / 2 + 0.5
3781
4035
  },
3782
4036
  {
3783
- x: -length18.parse(parameters.w) / 2 - 0.5,
3784
- y: -length18.parse(parameters.h) / 2 - 0.5
4037
+ x: -length19.parse(parameters.w) / 2 - 0.5,
4038
+ y: -length19.parse(parameters.h) / 2 - 0.5
3785
4039
  },
3786
4040
  {
3787
- x: length18.parse(parameters.p) / 2 + 0.5,
3788
- y: -length18.parse(parameters.h) / 2 - 0.5
4041
+ x: length19.parse(parameters.p) / 2 + 0.5,
4042
+ y: -length19.parse(parameters.h) / 2 - 0.5
3789
4043
  }
3790
4044
  ],
3791
4045
  stroke_width: 0.1,
@@ -3824,22 +4078,22 @@ var sod80WithoutParsing = (parameters) => {
3824
4078
  };
3825
4079
 
3826
4080
  // src/fn/sod123w.ts
3827
- import { z as z28 } from "zod";
3828
- import { length as length19 } from "circuit-json";
4081
+ import { z as z29 } from "zod";
4082
+ import { length as length20 } from "circuit-json";
3829
4083
  var sod_def3 = base_def.extend({
3830
- fn: z28.string(),
3831
- num_pins: z28.literal(2).default(2),
3832
- w: z28.string().default("4.4mm"),
3833
- h: z28.string().default("2.1mm"),
3834
- pl: z28.string().default("1.2mm"),
3835
- pw: z28.string().default("1.2mm"),
3836
- p: z28.string().default("2.9mm")
4084
+ fn: z29.string(),
4085
+ num_pins: z29.literal(2).default(2),
4086
+ w: z29.string().default("4.4mm"),
4087
+ h: z29.string().default("2.1mm"),
4088
+ pl: z29.string().default("1.2mm"),
4089
+ pw: z29.string().default("1.2mm"),
4090
+ p: z29.string().default("2.9mm")
3837
4091
  });
3838
4092
  var sod123w = (raw_params) => {
3839
4093
  const parameters = sod_def3.parse(raw_params);
3840
4094
  const silkscreenRefText = silkscreenRef(
3841
4095
  0,
3842
- length19.parse(parameters.h) - 0.5,
4096
+ length20.parse(parameters.h) - 0.5,
3843
4097
  0.3
3844
4098
  );
3845
4099
  const silkscreenLine = {
@@ -3848,20 +4102,20 @@ var sod123w = (raw_params) => {
3848
4102
  pcb_component_id: "",
3849
4103
  route: [
3850
4104
  {
3851
- x: length19.parse(parameters.p) / 2,
3852
- y: length19.parse(parameters.h) / 2
4105
+ x: length20.parse(parameters.p) / 2,
4106
+ y: length20.parse(parameters.h) / 2
3853
4107
  },
3854
4108
  {
3855
- x: -length19.parse(parameters.w) / 2 - 0.2,
3856
- y: length19.parse(parameters.h) / 2
4109
+ x: -length20.parse(parameters.w) / 2 - 0.2,
4110
+ y: length20.parse(parameters.h) / 2
3857
4111
  },
3858
4112
  {
3859
- x: -length19.parse(parameters.w) / 2 - 0.2,
3860
- y: -length19.parse(parameters.h) / 2
4113
+ x: -length20.parse(parameters.w) / 2 - 0.2,
4114
+ y: -length20.parse(parameters.h) / 2
3861
4115
  },
3862
4116
  {
3863
- x: length19.parse(parameters.p) / 2,
3864
- y: -length19.parse(parameters.h) / 2
4117
+ x: length20.parse(parameters.p) / 2,
4118
+ y: -length20.parse(parameters.h) / 2
3865
4119
  }
3866
4120
  ],
3867
4121
  stroke_width: 0.1,
@@ -3903,22 +4157,22 @@ var sodWithoutParsing3 = (parameters) => {
3903
4157
  };
3904
4158
 
3905
4159
  // src/fn/sod323.ts
3906
- import { z as z29 } from "zod";
3907
- import { length as length20 } from "circuit-json";
4160
+ import { z as z30 } from "zod";
4161
+ import { length as length21 } from "circuit-json";
3908
4162
  var sod_def4 = base_def.extend({
3909
- fn: z29.string(),
3910
- num_pins: z29.literal(2).default(2),
3911
- w: z29.string().default("3.30mm"),
3912
- h: z29.string().default("1.80mm"),
3913
- pl: z29.string().default("0.60mm"),
3914
- pw: z29.string().default("0.45mm"),
3915
- p: z29.string().default("2.1mm")
4163
+ fn: z30.string(),
4164
+ num_pins: z30.literal(2).default(2),
4165
+ w: z30.string().default("3.30mm"),
4166
+ h: z30.string().default("1.80mm"),
4167
+ pl: z30.string().default("0.60mm"),
4168
+ pw: z30.string().default("0.45mm"),
4169
+ p: z30.string().default("2.1mm")
3916
4170
  });
3917
4171
  var sod323 = (raw_params) => {
3918
4172
  const parameters = sod_def4.parse(raw_params);
3919
4173
  const silkscreenRefText = silkscreenRef(
3920
4174
  0,
3921
- length20.parse(parameters.h) - 0.5,
4175
+ length21.parse(parameters.h) - 0.5,
3922
4176
  0.3
3923
4177
  );
3924
4178
  const silkscreenLine = {
@@ -3927,20 +4181,20 @@ var sod323 = (raw_params) => {
3927
4181
  pcb_component_id: "",
3928
4182
  route: [
3929
4183
  {
3930
- x: length20.parse(parameters.p) / 2,
3931
- y: length20.parse(parameters.h) / 2
4184
+ x: length21.parse(parameters.p) / 2,
4185
+ y: length21.parse(parameters.h) / 2
3932
4186
  },
3933
4187
  {
3934
- x: -length20.parse(parameters.w) / 2,
3935
- y: length20.parse(parameters.h) / 2
4188
+ x: -length21.parse(parameters.w) / 2,
4189
+ y: length21.parse(parameters.h) / 2
3936
4190
  },
3937
4191
  {
3938
- x: -length20.parse(parameters.w) / 2,
3939
- y: -length20.parse(parameters.h) / 2
4192
+ x: -length21.parse(parameters.w) / 2,
4193
+ y: -length21.parse(parameters.h) / 2
3940
4194
  },
3941
4195
  {
3942
- x: length20.parse(parameters.p) / 2,
3943
- y: -length20.parse(parameters.h) / 2
4196
+ x: length21.parse(parameters.p) / 2,
4197
+ y: -length21.parse(parameters.h) / 2
3944
4198
  }
3945
4199
  ],
3946
4200
  stroke_width: 0.1,
@@ -3982,22 +4236,22 @@ var sodWithoutParsing4 = (parameters) => {
3982
4236
  };
3983
4237
 
3984
4238
  // src/fn/sod923.ts
3985
- import { z as z30 } from "zod";
3986
- import { length as length21 } from "circuit-json";
4239
+ import { z as z31 } from "zod";
4240
+ import { length as length22 } from "circuit-json";
3987
4241
  var sod_def5 = base_def.extend({
3988
- fn: z30.string(),
3989
- num_pins: z30.literal(2).default(2),
3990
- w: z30.string().default("1.4mm"),
3991
- h: z30.string().default("0.9mm"),
3992
- pl: z30.string().default("0.36mm"),
3993
- pw: z30.string().default("0.25mm"),
3994
- p: z30.string().default("0.85mm")
4242
+ fn: z31.string(),
4243
+ num_pins: z31.literal(2).default(2),
4244
+ w: z31.string().default("1.4mm"),
4245
+ h: z31.string().default("0.9mm"),
4246
+ pl: z31.string().default("0.36mm"),
4247
+ pw: z31.string().default("0.25mm"),
4248
+ p: z31.string().default("0.85mm")
3995
4249
  });
3996
4250
  var sod923 = (raw_params) => {
3997
4251
  const parameters = sod_def5.parse(raw_params);
3998
4252
  const silkscreenRefText = silkscreenRef(
3999
4253
  0,
4000
- length21.parse(parameters.h),
4254
+ length22.parse(parameters.h),
4001
4255
  0.3
4002
4256
  );
4003
4257
  const silkscreenLine = {
@@ -4006,20 +4260,20 @@ var sod923 = (raw_params) => {
4006
4260
  pcb_component_id: "",
4007
4261
  route: [
4008
4262
  {
4009
- x: length21.parse(parameters.p) / 2 + 0.15,
4010
- y: length21.parse(parameters.h) / 2
4263
+ x: length22.parse(parameters.p) / 2 + 0.15,
4264
+ y: length22.parse(parameters.h) / 2
4011
4265
  },
4012
4266
  {
4013
- x: -length21.parse(parameters.w) / 2 - 0.15,
4014
- y: length21.parse(parameters.h) / 2
4267
+ x: -length22.parse(parameters.w) / 2 - 0.15,
4268
+ y: length22.parse(parameters.h) / 2
4015
4269
  },
4016
4270
  {
4017
- x: -length21.parse(parameters.w) / 2 - 0.15,
4018
- y: -length21.parse(parameters.h) / 2
4271
+ x: -length22.parse(parameters.w) / 2 - 0.15,
4272
+ y: -length22.parse(parameters.h) / 2
4019
4273
  },
4020
4274
  {
4021
- x: length21.parse(parameters.p) / 2 + 0.15,
4022
- y: -length21.parse(parameters.h) / 2
4275
+ x: length22.parse(parameters.p) / 2 + 0.15,
4276
+ y: -length22.parse(parameters.h) / 2
4023
4277
  }
4024
4278
  ],
4025
4279
  stroke_width: 0.1,
@@ -4062,22 +4316,22 @@ var sodWithoutParsing5 = (parameters) => {
4062
4316
  };
4063
4317
 
4064
4318
  // src/fn/sod882.ts
4065
- import { z as z31 } from "zod";
4066
- import { length as length22 } from "circuit-json";
4319
+ import { z as z32 } from "zod";
4320
+ import { length as length23 } from "circuit-json";
4067
4321
  var sod_def6 = base_def.extend({
4068
- fn: z31.string(),
4069
- num_pins: z31.literal(2).default(2),
4070
- w: z31.string().default("1.3mm"),
4071
- h: z31.string().default("0.9mm"),
4072
- pl: z31.string().default("0.4mm"),
4073
- pw: z31.string().default("0.7mm"),
4074
- p: z31.string().default("0.7mm")
4322
+ fn: z32.string(),
4323
+ num_pins: z32.literal(2).default(2),
4324
+ w: z32.string().default("1.3mm"),
4325
+ h: z32.string().default("0.9mm"),
4326
+ pl: z32.string().default("0.4mm"),
4327
+ pw: z32.string().default("0.7mm"),
4328
+ p: z32.string().default("0.7mm")
4075
4329
  });
4076
4330
  var sod882 = (raw_params) => {
4077
4331
  const parameters = sod_def6.parse(raw_params);
4078
4332
  const silkscreenRefText = silkscreenRef(
4079
4333
  0,
4080
- length22.parse(parameters.h) + 0.1,
4334
+ length23.parse(parameters.h) + 0.1,
4081
4335
  0.3
4082
4336
  );
4083
4337
  const silkscreenLine = {
@@ -4086,20 +4340,20 @@ var sod882 = (raw_params) => {
4086
4340
  pcb_component_id: "",
4087
4341
  route: [
4088
4342
  {
4089
- x: length22.parse(parameters.p) / 2 + 0.2,
4090
- y: length22.parse(parameters.h) / 2 + 0.2
4343
+ x: length23.parse(parameters.p) / 2 + 0.2,
4344
+ y: length23.parse(parameters.h) / 2 + 0.2
4091
4345
  },
4092
4346
  {
4093
- x: -length22.parse(parameters.w) / 2 - 0.2,
4094
- y: length22.parse(parameters.h) / 2 + 0.2
4347
+ x: -length23.parse(parameters.w) / 2 - 0.2,
4348
+ y: length23.parse(parameters.h) / 2 + 0.2
4095
4349
  },
4096
4350
  {
4097
- x: -length22.parse(parameters.w) / 2 - 0.2,
4098
- y: -length22.parse(parameters.h) / 2 - 0.2
4351
+ x: -length23.parse(parameters.w) / 2 - 0.2,
4352
+ y: -length23.parse(parameters.h) / 2 - 0.2
4099
4353
  },
4100
4354
  {
4101
- x: length22.parse(parameters.p) / 2 + 0.2,
4102
- y: -length22.parse(parameters.h) / 2 - 0.2
4355
+ x: length23.parse(parameters.p) / 2 + 0.2,
4356
+ y: -length23.parse(parameters.h) / 2 - 0.2
4103
4357
  }
4104
4358
  ],
4105
4359
  stroke_width: 0.1,
@@ -4142,22 +4396,22 @@ var sodWithoutParsing6 = (parameters) => {
4142
4396
  };
4143
4397
 
4144
4398
  // src/fn/sod323f.ts
4145
- import { z as z32 } from "zod";
4146
- import { length as length23 } from "circuit-json";
4399
+ import { z as z33 } from "zod";
4400
+ import { length as length24 } from "circuit-json";
4147
4401
  var sod_def7 = base_def.extend({
4148
- fn: z32.string(),
4149
- num_pins: z32.literal(2).default(2),
4150
- w: z32.string().default("3,05mm"),
4151
- h: z32.string().default("1.65mm"),
4152
- pl: z32.string().default("0.6mm"),
4153
- pw: z32.string().default("0.6mm"),
4154
- pad_spacing: z32.string().default("2.2mm")
4402
+ fn: z33.string(),
4403
+ num_pins: z33.literal(2).default(2),
4404
+ w: z33.string().default("3,05mm"),
4405
+ h: z33.string().default("1.65mm"),
4406
+ pl: z33.string().default("0.6mm"),
4407
+ pw: z33.string().default("0.6mm"),
4408
+ pad_spacing: z33.string().default("2.2mm")
4155
4409
  });
4156
4410
  var sod323f = (raw_params) => {
4157
4411
  const parameters = sod_def7.parse(raw_params);
4158
4412
  const silkscreenRefText = silkscreenRef(
4159
4413
  0,
4160
- length23.parse(parameters.h),
4414
+ length24.parse(parameters.h),
4161
4415
  0.3
4162
4416
  );
4163
4417
  const silkscreenLine = {
@@ -4166,20 +4420,20 @@ var sod323f = (raw_params) => {
4166
4420
  pcb_component_id: "",
4167
4421
  route: [
4168
4422
  {
4169
- x: length23.parse(parameters.pad_spacing) / 2,
4170
- y: length23.parse(parameters.h) / 2
4423
+ x: length24.parse(parameters.pad_spacing) / 2,
4424
+ y: length24.parse(parameters.h) / 2
4171
4425
  },
4172
4426
  {
4173
- x: -length23.parse(parameters.w) / 2 - 0.2,
4174
- y: length23.parse(parameters.h) / 2
4427
+ x: -length24.parse(parameters.w) / 2 - 0.2,
4428
+ y: length24.parse(parameters.h) / 2
4175
4429
  },
4176
4430
  {
4177
- x: -length23.parse(parameters.w) / 2 - 0.2,
4178
- y: -length23.parse(parameters.h) / 2
4431
+ x: -length24.parse(parameters.w) / 2 - 0.2,
4432
+ y: -length24.parse(parameters.h) / 2
4179
4433
  },
4180
4434
  {
4181
- x: length23.parse(parameters.pad_spacing) / 2,
4182
- y: -length23.parse(parameters.h) / 2
4435
+ x: length24.parse(parameters.pad_spacing) / 2,
4436
+ y: -length24.parse(parameters.h) / 2
4183
4437
  }
4184
4438
  ],
4185
4439
  stroke_width: 0.1,
@@ -4222,22 +4476,22 @@ var sodWithoutParsing7 = (parameters) => {
4222
4476
  };
4223
4477
 
4224
4478
  // src/fn/sod123f.ts
4225
- import { z as z33 } from "zod";
4226
- import { length as length24 } from "circuit-json";
4479
+ import { z as z34 } from "zod";
4480
+ import { length as length25 } from "circuit-json";
4227
4481
  var sod_def8 = base_def.extend({
4228
- fn: z33.string(),
4229
- num_pins: z33.literal(2).default(2),
4230
- w: z33.string().default("4.4mm"),
4231
- h: z33.string().default("2.1mm"),
4232
- pl: z33.string().default("1.2mm"),
4233
- pw: z33.string().default("1.2mm"),
4234
- p: z33.string().default("2.9mm")
4482
+ fn: z34.string(),
4483
+ num_pins: z34.literal(2).default(2),
4484
+ w: z34.string().default("4.4mm"),
4485
+ h: z34.string().default("2.1mm"),
4486
+ pl: z34.string().default("1.2mm"),
4487
+ pw: z34.string().default("1.2mm"),
4488
+ p: z34.string().default("2.9mm")
4235
4489
  });
4236
4490
  var sod123f = (raw_params) => {
4237
4491
  const parameters = sod_def8.parse(raw_params);
4238
4492
  const silkscreenRefText = silkscreenRef(
4239
4493
  0,
4240
- length24.parse(parameters.h),
4494
+ length25.parse(parameters.h),
4241
4495
  0.3
4242
4496
  );
4243
4497
  const silkscreenLine = {
@@ -4246,20 +4500,20 @@ var sod123f = (raw_params) => {
4246
4500
  pcb_component_id: "",
4247
4501
  route: [
4248
4502
  {
4249
- x: length24.parse(parameters.p) / 2,
4250
- y: length24.parse(parameters.h) / 2
4503
+ x: length25.parse(parameters.p) / 2,
4504
+ y: length25.parse(parameters.h) / 2
4251
4505
  },
4252
4506
  {
4253
- x: -length24.parse(parameters.w) / 2 - 0.2,
4254
- y: length24.parse(parameters.h) / 2
4507
+ x: -length25.parse(parameters.w) / 2 - 0.2,
4508
+ y: length25.parse(parameters.h) / 2
4255
4509
  },
4256
4510
  {
4257
- x: -length24.parse(parameters.w) / 2 - 0.2,
4258
- y: -length24.parse(parameters.h) / 2
4511
+ x: -length25.parse(parameters.w) / 2 - 0.2,
4512
+ y: -length25.parse(parameters.h) / 2
4259
4513
  },
4260
4514
  {
4261
- x: length24.parse(parameters.p) / 2,
4262
- y: -length24.parse(parameters.h) / 2
4515
+ x: length25.parse(parameters.p) / 2,
4516
+ y: -length25.parse(parameters.h) / 2
4263
4517
  }
4264
4518
  ],
4265
4519
  stroke_width: 0.1,
@@ -4302,22 +4556,22 @@ var sodWithoutParsing8 = (parameters) => {
4302
4556
  };
4303
4557
 
4304
4558
  // src/fn/sod123fl.ts
4305
- import { z as z34 } from "zod";
4306
- import { length as length25 } from "circuit-json";
4559
+ import { z as z35 } from "zod";
4560
+ import { length as length26 } from "circuit-json";
4307
4561
  var sod123FL_def = base_def.extend({
4308
- fn: z34.string(),
4309
- num_pins: z34.literal(2).default(2),
4310
- w: z34.string().default("4.4mm"),
4311
- h: z34.string().default("2.1mm"),
4312
- pl: z34.string().default("0.91mm"),
4313
- pw: z34.string().default("1.22mm"),
4314
- p: z34.string().default("3.146mm")
4562
+ fn: z35.string(),
4563
+ num_pins: z35.literal(2).default(2),
4564
+ w: z35.string().default("4.4mm"),
4565
+ h: z35.string().default("2.1mm"),
4566
+ pl: z35.string().default("0.91mm"),
4567
+ pw: z35.string().default("1.22mm"),
4568
+ p: z35.string().default("3.146mm")
4315
4569
  });
4316
4570
  var sod123fl = (raw_params) => {
4317
4571
  const parameters = sod123FL_def.parse(raw_params);
4318
4572
  const silkscreenRefText = silkscreenRef(
4319
4573
  0,
4320
- length25.parse(parameters.h),
4574
+ length26.parse(parameters.h),
4321
4575
  0.3
4322
4576
  );
4323
4577
  const silkscreenLine = {
@@ -4326,20 +4580,20 @@ var sod123fl = (raw_params) => {
4326
4580
  pcb_component_id: "",
4327
4581
  route: [
4328
4582
  {
4329
- x: length25.parse(parameters.p) / 2,
4330
- y: length25.parse(parameters.h) / 2
4583
+ x: length26.parse(parameters.p) / 2,
4584
+ y: length26.parse(parameters.h) / 2
4331
4585
  },
4332
4586
  {
4333
- x: -length25.parse(parameters.w) / 2 - 0.2,
4334
- y: length25.parse(parameters.h) / 2
4587
+ x: -length26.parse(parameters.w) / 2 - 0.2,
4588
+ y: length26.parse(parameters.h) / 2
4335
4589
  },
4336
4590
  {
4337
- x: -length25.parse(parameters.w) / 2 - 0.2,
4338
- y: -length25.parse(parameters.h) / 2
4591
+ x: -length26.parse(parameters.w) / 2 - 0.2,
4592
+ y: -length26.parse(parameters.h) / 2
4339
4593
  },
4340
4594
  {
4341
- x: length25.parse(parameters.p) / 2,
4342
- y: -length25.parse(parameters.h) / 2
4595
+ x: length26.parse(parameters.p) / 2,
4596
+ y: -length26.parse(parameters.h) / 2
4343
4597
  }
4344
4598
  ],
4345
4599
  stroke_width: 0.1,
@@ -4382,22 +4636,22 @@ var sodWithoutParsing9 = (parameters) => {
4382
4636
  };
4383
4637
 
4384
4638
  // src/fn/sod723.ts
4385
- import { z as z35 } from "zod";
4386
- import { length as length26 } from "circuit-json";
4639
+ import { z as z36 } from "zod";
4640
+ import { length as length27 } from "circuit-json";
4387
4641
  var sod_def9 = base_def.extend({
4388
- fn: z35.string(),
4389
- num_pins: z35.literal(2).default(2),
4390
- w: z35.string().default("1.80mm"),
4391
- h: z35.string().default("1.00mm"),
4392
- pl: z35.string().default("0.66mm"),
4393
- pw: z35.string().default("0.5mm"),
4394
- p: z35.string().default("0.8mm")
4642
+ fn: z36.string(),
4643
+ num_pins: z36.literal(2).default(2),
4644
+ w: z36.string().default("1.80mm"),
4645
+ h: z36.string().default("1.00mm"),
4646
+ pl: z36.string().default("0.66mm"),
4647
+ pw: z36.string().default("0.5mm"),
4648
+ p: z36.string().default("0.8mm")
4395
4649
  });
4396
4650
  var sod723 = (raw_params) => {
4397
4651
  const parameters = sod_def9.parse(raw_params);
4398
4652
  const silkscreenRefText = silkscreenRef(
4399
4653
  0,
4400
- length26.parse(parameters.h),
4654
+ length27.parse(parameters.h),
4401
4655
  0.3
4402
4656
  );
4403
4657
  const silkscreenLine = {
@@ -4406,20 +4660,20 @@ var sod723 = (raw_params) => {
4406
4660
  pcb_component_id: "",
4407
4661
  route: [
4408
4662
  {
4409
- x: length26.parse(parameters.p) / 2,
4410
- y: length26.parse(parameters.h) / 2
4663
+ x: length27.parse(parameters.p) / 2,
4664
+ y: length27.parse(parameters.h) / 2
4411
4665
  },
4412
4666
  {
4413
- x: -length26.parse(parameters.w) / 2 - 0.1,
4414
- y: length26.parse(parameters.h) / 2
4667
+ x: -length27.parse(parameters.w) / 2 - 0.1,
4668
+ y: length27.parse(parameters.h) / 2
4415
4669
  },
4416
4670
  {
4417
- x: -length26.parse(parameters.w) / 2 - 0.1,
4418
- y: -length26.parse(parameters.h) / 2
4671
+ x: -length27.parse(parameters.w) / 2 - 0.1,
4672
+ y: -length27.parse(parameters.h) / 2
4419
4673
  },
4420
4674
  {
4421
- x: length26.parse(parameters.p) / 2,
4422
- y: -length26.parse(parameters.h) / 2
4675
+ x: length27.parse(parameters.p) / 2,
4676
+ y: -length27.parse(parameters.h) / 2
4423
4677
  }
4424
4678
  ],
4425
4679
  stroke_width: 0.1,
@@ -4462,22 +4716,22 @@ var sodWithoutParsing10 = (parameters) => {
4462
4716
  };
4463
4717
 
4464
4718
  // src/fn/sod128.ts
4465
- import { z as z36 } from "zod";
4466
- import { length as length27 } from "circuit-json";
4719
+ import { z as z37 } from "zod";
4720
+ import { length as length28 } from "circuit-json";
4467
4721
  var sod_def10 = base_def.extend({
4468
- fn: z36.string(),
4469
- num_pins: z36.literal(2).default(2),
4470
- w: z36.string().default("6.2mm"),
4471
- h: z36.string().default("3.4mm"),
4472
- pl: z36.string().default("1.4mm"),
4473
- pw: z36.string().default("2.1mm"),
4474
- p: z36.string().default("4.4mm")
4722
+ fn: z37.string(),
4723
+ num_pins: z37.literal(2).default(2),
4724
+ w: z37.string().default("6.2mm"),
4725
+ h: z37.string().default("3.4mm"),
4726
+ pl: z37.string().default("1.4mm"),
4727
+ pw: z37.string().default("2.1mm"),
4728
+ p: z37.string().default("4.4mm")
4475
4729
  });
4476
4730
  var sod128 = (raw_params) => {
4477
4731
  const parameters = sod_def10.parse(raw_params);
4478
4732
  const silkscreenRefText = silkscreenRef(
4479
4733
  0,
4480
- length27.parse(parameters.h) / 2 + 0.4,
4734
+ length28.parse(parameters.h) / 2 + 0.4,
4481
4735
  0.3
4482
4736
  );
4483
4737
  const silkscreenLine = {
@@ -4486,20 +4740,20 @@ var sod128 = (raw_params) => {
4486
4740
  pcb_component_id: "",
4487
4741
  route: [
4488
4742
  {
4489
- x: length27.parse(parameters.p) / 2,
4490
- y: length27.parse(parameters.h) / 2
4743
+ x: length28.parse(parameters.p) / 2,
4744
+ y: length28.parse(parameters.h) / 2
4491
4745
  },
4492
4746
  {
4493
- x: -length27.parse(parameters.w) / 2 - 0.2,
4494
- y: length27.parse(parameters.h) / 2
4747
+ x: -length28.parse(parameters.w) / 2 - 0.2,
4748
+ y: length28.parse(parameters.h) / 2
4495
4749
  },
4496
4750
  {
4497
- x: -length27.parse(parameters.w) / 2 - 0.2,
4498
- y: -length27.parse(parameters.h) / 2
4751
+ x: -length28.parse(parameters.w) / 2 - 0.2,
4752
+ y: -length28.parse(parameters.h) / 2
4499
4753
  },
4500
4754
  {
4501
- x: length27.parse(parameters.p) / 2,
4502
- y: -length27.parse(parameters.h) / 2
4755
+ x: length28.parse(parameters.p) / 2,
4756
+ y: -length28.parse(parameters.h) / 2
4503
4757
  }
4504
4758
  ],
4505
4759
  stroke_width: 0.1,
@@ -4542,29 +4796,29 @@ var sodWithoutParsing11 = (parameters) => {
4542
4796
  };
4543
4797
 
4544
4798
  // src/fn/sot89.ts
4545
- import { z as z37 } from "zod";
4799
+ import { z as z38 } from "zod";
4546
4800
  var sot89_def = base_def.extend({
4547
- fn: z37.string(),
4548
- num_pins: z37.union([z37.literal(3), z37.literal(5)]).default(3),
4549
- w: z37.string().default("4.20mm"),
4550
- h: z37.string().default("4.80mm"),
4551
- pl: z37.string().default("1.3mm"),
4552
- pw: z37.string().default("0.9mm"),
4553
- p: z37.string().default("1.5mm"),
4554
- string: z37.string().optional()
4801
+ fn: z38.string(),
4802
+ num_pins: z38.union([z38.literal(3), z38.literal(5)]).default(3),
4803
+ w: z38.string().default("4.20mm"),
4804
+ h: z38.string().default("4.80mm"),
4805
+ pl: z38.string().default("1.3mm"),
4806
+ pw: z38.string().default("0.9mm"),
4807
+ p: z38.string().default("1.5mm"),
4808
+ string: z38.string().optional()
4555
4809
  });
4556
4810
  var sot89_3 = (parameters) => {
4557
4811
  const pads = [];
4558
4812
  const padGap = Number.parseFloat(parameters.p);
4559
- const padWidth = Number.parseFloat(parameters.pw);
4560
- const length50 = Number.parseFloat(parameters.w);
4561
- const padHeight = Number.parseFloat(parameters.pl);
4813
+ const padWidth3 = Number.parseFloat(parameters.pw);
4814
+ const length51 = Number.parseFloat(parameters.w);
4815
+ const padHeight3 = Number.parseFloat(parameters.pl);
4562
4816
  const centerExtra = 0.175;
4563
- const outerPadXShift = (padHeight - (padHeight + centerExtra)) / 2;
4817
+ const outerPadXShift = (padHeight3 - (padHeight3 + centerExtra)) / 2;
4564
4818
  pads.push(
4565
- rectpad(1, -length50 / 2 + outerPadXShift, padGap, padHeight, padWidth),
4566
- rectpad(2, -length50 / 2, 0, padHeight + centerExtra, padWidth),
4567
- rectpad(3, -length50 / 2 + outerPadXShift, -padGap, padHeight, padWidth)
4819
+ rectpad(1, -length51 / 2 + outerPadXShift, padGap, padHeight3, padWidth3),
4820
+ rectpad(2, -length51 / 2, 0, padHeight3 + centerExtra, padWidth3),
4821
+ rectpad(3, -length51 / 2 + outerPadXShift, -padGap, padHeight3, padWidth3)
4568
4822
  );
4569
4823
  const silkscreenRefText = silkscreenRef(0, 0, 0.3);
4570
4824
  const width = Number.parseFloat(parameters.w) / 2 - 1;
@@ -4603,8 +4857,8 @@ var sot89_3 = (parameters) => {
4603
4857
  var sot89_5 = (parameters) => {
4604
4858
  const pads = [];
4605
4859
  const padGap = Number.parseFloat(parameters.p);
4606
- const padWidth = Number.parseFloat(parameters.pw);
4607
- const length50 = Number.parseFloat(parameters.w);
4860
+ const padWidth3 = Number.parseFloat(parameters.pw);
4861
+ const length51 = Number.parseFloat(parameters.w);
4608
4862
  pads.push(
4609
4863
  rectpad(1, -1.85, -1.5, 1.5, 0.7),
4610
4864
  rectpad(2, -1.85, 1.5, 1.5, 0.7),
@@ -4672,18 +4926,18 @@ var sot89 = (raw_params) => {
4672
4926
 
4673
4927
  // src/fn/to220.ts
4674
4928
  import {
4675
- length as length28
4929
+ length as length29
4676
4930
  } from "circuit-json";
4677
- import { z as z38 } from "zod";
4931
+ import { z as z39 } from "zod";
4678
4932
  var to220_def = base_def.extend({
4679
- fn: z38.string(),
4680
- p: length28.optional().default("5.0mm"),
4681
- id: length28.optional().default("1.0mm"),
4682
- od: length28.optional().default("1.9mm"),
4683
- w: length28.optional().default("13mm"),
4684
- h: length28.optional().default("7mm"),
4685
- num_pins: z38.number().optional(),
4686
- string: z38.string().optional()
4933
+ fn: z39.string(),
4934
+ p: length29.optional().default("5.0mm"),
4935
+ id: length29.optional().default("1.0mm"),
4936
+ od: length29.optional().default("1.9mm"),
4937
+ w: length29.optional().default("13mm"),
4938
+ h: length29.optional().default("7mm"),
4939
+ num_pins: z39.number().optional(),
4940
+ string: z39.string().optional()
4687
4941
  });
4688
4942
  var to220 = (raw_params) => {
4689
4943
  const parameters = to220_def.parse(raw_params);
@@ -4763,22 +5017,22 @@ var to220 = (raw_params) => {
4763
5017
  };
4764
5018
 
4765
5019
  // src/fn/minimelf.ts
4766
- import { z as z39 } from "zod";
4767
- import { length as length29 } from "circuit-json";
5020
+ import { z as z40 } from "zod";
5021
+ import { length as length30 } from "circuit-json";
4768
5022
  var minimelf_def = base_def.extend({
4769
- fn: z39.string(),
4770
- num_pins: z39.literal(2).default(2),
4771
- w: z39.string().default("5.40mm"),
4772
- h: z39.string().default("2.30mm"),
4773
- pl: z39.string().default("1.30mm"),
4774
- pw: z39.string().default("1.70mm"),
4775
- p: z39.string().default("3.5mm")
5023
+ fn: z40.string(),
5024
+ num_pins: z40.literal(2).default(2),
5025
+ w: z40.string().default("5.40mm"),
5026
+ h: z40.string().default("2.30mm"),
5027
+ pl: z40.string().default("1.30mm"),
5028
+ pw: z40.string().default("1.70mm"),
5029
+ p: z40.string().default("3.5mm")
4776
5030
  });
4777
5031
  var minimelf = (raw_params) => {
4778
5032
  const parameters = minimelf_def.parse(raw_params);
4779
5033
  const silkscreenRefText = silkscreenRef(
4780
5034
  0,
4781
- length29.parse(parameters.h) / 2 + 0.4,
5035
+ length30.parse(parameters.h) / 2 + 0.4,
4782
5036
  0.3
4783
5037
  );
4784
5038
  const silkscreenLine = {
@@ -4787,20 +5041,20 @@ var minimelf = (raw_params) => {
4787
5041
  pcb_component_id: "",
4788
5042
  route: [
4789
5043
  {
4790
- x: length29.parse(parameters.p) / 2,
4791
- y: length29.parse(parameters.h) / 2
5044
+ x: length30.parse(parameters.p) / 2,
5045
+ y: length30.parse(parameters.h) / 2
4792
5046
  },
4793
5047
  {
4794
- x: -length29.parse(parameters.w) / 2,
4795
- y: length29.parse(parameters.h) / 2
5048
+ x: -length30.parse(parameters.w) / 2,
5049
+ y: length30.parse(parameters.h) / 2
4796
5050
  },
4797
5051
  {
4798
- x: -length29.parse(parameters.w) / 2,
4799
- y: -length29.parse(parameters.h) / 2
5052
+ x: -length30.parse(parameters.w) / 2,
5053
+ y: -length30.parse(parameters.h) / 2
4800
5054
  },
4801
5055
  {
4802
- x: length29.parse(parameters.p) / 2,
4803
- y: -length29.parse(parameters.h) / 2
5056
+ x: length30.parse(parameters.p) / 2,
5057
+ y: -length30.parse(parameters.h) / 2
4804
5058
  }
4805
5059
  ],
4806
5060
  stroke_width: 0.1,
@@ -4839,22 +5093,22 @@ var miniMelfWithoutParsing = (parameters) => {
4839
5093
  };
4840
5094
 
4841
5095
  // src/fn/sod882d.ts
4842
- import { z as z40 } from "zod";
4843
- import { length as length30 } from "circuit-json";
5096
+ import { z as z41 } from "zod";
5097
+ import { length as length31 } from "circuit-json";
4844
5098
  var sod_def11 = base_def.extend({
4845
- fn: z40.string(),
4846
- num_pins: z40.literal(2).default(2),
4847
- w: z40.string().default("1.90mm"),
4848
- h: z40.string().default("1.33mm"),
4849
- pl: z40.string().default("0.5mm"),
4850
- pw: z40.string().default("0.7mm"),
4851
- p: z40.string().default("0.8mm")
5099
+ fn: z41.string(),
5100
+ num_pins: z41.literal(2).default(2),
5101
+ w: z41.string().default("1.90mm"),
5102
+ h: z41.string().default("1.33mm"),
5103
+ pl: z41.string().default("0.5mm"),
5104
+ pw: z41.string().default("0.7mm"),
5105
+ p: z41.string().default("0.8mm")
4852
5106
  });
4853
5107
  var sod882d = (raw_params) => {
4854
5108
  const parameters = sod_def11.parse(raw_params);
4855
5109
  const silkscreenRefText = silkscreenRef(
4856
5110
  0,
4857
- length30.parse(parameters.h) + 0.1,
5111
+ length31.parse(parameters.h) + 0.1,
4858
5112
  0.3
4859
5113
  );
4860
5114
  const silkscreenLine = {
@@ -4863,20 +5117,20 @@ var sod882d = (raw_params) => {
4863
5117
  pcb_component_id: "",
4864
5118
  route: [
4865
5119
  {
4866
- x: length30.parse(parameters.p) / 2 + 0.1,
4867
- y: length30.parse(parameters.h) / 2
5120
+ x: length31.parse(parameters.p) / 2 + 0.1,
5121
+ y: length31.parse(parameters.h) / 2
4868
5122
  },
4869
5123
  {
4870
- x: -length30.parse(parameters.w) / 2,
4871
- y: length30.parse(parameters.h) / 2
5124
+ x: -length31.parse(parameters.w) / 2,
5125
+ y: length31.parse(parameters.h) / 2
4872
5126
  },
4873
5127
  {
4874
- x: -length30.parse(parameters.w) / 2,
4875
- y: -length30.parse(parameters.h) / 2
5128
+ x: -length31.parse(parameters.w) / 2,
5129
+ y: -length31.parse(parameters.h) / 2
4876
5130
  },
4877
5131
  {
4878
- x: length30.parse(parameters.p) / 2 + 0.1,
4879
- y: -length30.parse(parameters.h) / 2
5132
+ x: length31.parse(parameters.p) / 2 + 0.1,
5133
+ y: -length31.parse(parameters.h) / 2
4880
5134
  }
4881
5135
  ],
4882
5136
  stroke_width: 0.1,
@@ -4919,22 +5173,22 @@ var sodWithoutParsing12 = (parameters) => {
4919
5173
  };
4920
5174
 
4921
5175
  // src/fn/melf.ts
4922
- import { z as z41 } from "zod";
4923
- import { length as length31 } from "circuit-json";
5176
+ import { z as z42 } from "zod";
5177
+ import { length as length32 } from "circuit-json";
4924
5178
  var melf_def = base_def.extend({
4925
- fn: z41.string(),
4926
- num_pins: z41.literal(2).default(2),
4927
- w: z41.string().default("7.0mm"),
4928
- h: z41.string().default("3.35mm"),
4929
- pl: z41.string().default("1.50mm"),
4930
- pw: z41.string().default("2.70mm"),
4931
- p: z41.string().default("4.8mm")
5179
+ fn: z42.string(),
5180
+ num_pins: z42.literal(2).default(2),
5181
+ w: z42.string().default("7.0mm"),
5182
+ h: z42.string().default("3.35mm"),
5183
+ pl: z42.string().default("1.50mm"),
5184
+ pw: z42.string().default("2.70mm"),
5185
+ p: z42.string().default("4.8mm")
4932
5186
  });
4933
5187
  var melf = (raw_params) => {
4934
5188
  const parameters = melf_def.parse(raw_params);
4935
5189
  const silkscreenRefText = silkscreenRef(
4936
5190
  0,
4937
- length31.parse(parameters.h),
5191
+ length32.parse(parameters.h),
4938
5192
  0.3
4939
5193
  );
4940
5194
  const silkscreenLine = {
@@ -4943,20 +5197,20 @@ var melf = (raw_params) => {
4943
5197
  pcb_component_id: "",
4944
5198
  route: [
4945
5199
  {
4946
- x: length31.parse(parameters.p) / 2,
4947
- y: length31.parse(parameters.h) / 2
5200
+ x: length32.parse(parameters.p) / 2,
5201
+ y: length32.parse(parameters.h) / 2
4948
5202
  },
4949
5203
  {
4950
- x: -length31.parse(parameters.w) / 2,
4951
- y: length31.parse(parameters.h) / 2
5204
+ x: -length32.parse(parameters.w) / 2,
5205
+ y: length32.parse(parameters.h) / 2
4952
5206
  },
4953
5207
  {
4954
- x: -length31.parse(parameters.w) / 2,
4955
- y: -length31.parse(parameters.h) / 2
5208
+ x: -length32.parse(parameters.w) / 2,
5209
+ y: -length32.parse(parameters.h) / 2
4956
5210
  },
4957
5211
  {
4958
- x: length31.parse(parameters.p) / 2,
4959
- y: -length31.parse(parameters.h) / 2
5212
+ x: length32.parse(parameters.p) / 2,
5213
+ y: -length32.parse(parameters.h) / 2
4960
5214
  }
4961
5215
  ],
4962
5216
  stroke_width: 0.1,
@@ -4999,22 +5253,22 @@ var melfWithoutParsing = (parameters) => {
4999
5253
  };
5000
5254
 
5001
5255
  // src/fn/micromelf.ts
5002
- import { z as z42 } from "zod";
5003
- import { length as length32 } from "circuit-json";
5256
+ import { z as z43 } from "zod";
5257
+ import { length as length33 } from "circuit-json";
5004
5258
  var micromelf_def = base_def.extend({
5005
- fn: z42.string(),
5006
- num_pins: z42.literal(2).default(2),
5007
- w: z42.string().default("3.0mm"),
5008
- h: z42.string().default("1.80mm"),
5009
- pl: z42.string().default("0.80mm"),
5010
- pw: z42.string().default("1.20mm"),
5011
- p: z42.string().default("1.6mm")
5259
+ fn: z43.string(),
5260
+ num_pins: z43.literal(2).default(2),
5261
+ w: z43.string().default("3.0mm"),
5262
+ h: z43.string().default("1.80mm"),
5263
+ pl: z43.string().default("0.80mm"),
5264
+ pw: z43.string().default("1.20mm"),
5265
+ p: z43.string().default("1.6mm")
5012
5266
  });
5013
5267
  var micromelf = (raw_params) => {
5014
5268
  const parameters = micromelf_def.parse(raw_params);
5015
5269
  const silkscreenRefText = silkscreenRef(
5016
5270
  0,
5017
- length32.parse(parameters.h),
5271
+ length33.parse(parameters.h),
5018
5272
  0.3
5019
5273
  );
5020
5274
  const silkscreenLine = {
@@ -5023,20 +5277,20 @@ var micromelf = (raw_params) => {
5023
5277
  pcb_component_id: "",
5024
5278
  route: [
5025
5279
  {
5026
- x: length32.parse(parameters.p) / 2,
5027
- y: length32.parse(parameters.h) / 2
5280
+ x: length33.parse(parameters.p) / 2,
5281
+ y: length33.parse(parameters.h) / 2
5028
5282
  },
5029
5283
  {
5030
- x: -length32.parse(parameters.w) / 2 - 0.1,
5031
- y: length32.parse(parameters.h) / 2
5284
+ x: -length33.parse(parameters.w) / 2 - 0.1,
5285
+ y: length33.parse(parameters.h) / 2
5032
5286
  },
5033
5287
  {
5034
- x: -length32.parse(parameters.w) / 2 - 0.1,
5035
- y: -length32.parse(parameters.h) / 2
5288
+ x: -length33.parse(parameters.w) / 2 - 0.1,
5289
+ y: -length33.parse(parameters.h) / 2
5036
5290
  },
5037
5291
  {
5038
- x: length32.parse(parameters.p) / 2,
5039
- y: -length32.parse(parameters.h) / 2
5292
+ x: length33.parse(parameters.p) / 2,
5293
+ y: -length33.parse(parameters.h) / 2
5040
5294
  }
5041
5295
  ],
5042
5296
  stroke_width: 0.1,
@@ -5079,22 +5333,22 @@ var microMelfWithoutParsing = (parameters) => {
5079
5333
  };
5080
5334
 
5081
5335
  // src/fn/sma.ts
5082
- import { z as z43 } from "zod";
5083
- import { length as length33 } from "circuit-json";
5336
+ import { z as z44 } from "zod";
5337
+ import { length as length34 } from "circuit-json";
5084
5338
  var sma_def = base_def.extend({
5085
- fn: z43.string(),
5086
- num_pins: z43.literal(2).default(2),
5087
- w: z43.string().default("7.10mm"),
5088
- h: z43.string().default("3.40mm"),
5089
- pl: z43.string().default("2.45mm"),
5090
- pw: z43.string().default("1.80mm"),
5091
- p: z43.string().default("4.05mm")
5339
+ fn: z44.string(),
5340
+ num_pins: z44.literal(2).default(2),
5341
+ w: z44.string().default("7.10mm"),
5342
+ h: z44.string().default("3.40mm"),
5343
+ pl: z44.string().default("2.45mm"),
5344
+ pw: z44.string().default("1.80mm"),
5345
+ p: z44.string().default("4.05mm")
5092
5346
  });
5093
5347
  var sma = (raw_params) => {
5094
5348
  const parameters = sma_def.parse(raw_params);
5095
5349
  const silkscreenRefText = silkscreenRef(
5096
5350
  0,
5097
- length33.parse(parameters.h) / 2 + 0.5,
5351
+ length34.parse(parameters.h) / 2 + 0.5,
5098
5352
  0.3
5099
5353
  );
5100
5354
  const silkscreenLine = {
@@ -5103,20 +5357,20 @@ var sma = (raw_params) => {
5103
5357
  pcb_component_id: "",
5104
5358
  route: [
5105
5359
  {
5106
- x: length33.parse(parameters.p) / 2,
5107
- y: length33.parse(parameters.h) / 2
5360
+ x: length34.parse(parameters.p) / 2,
5361
+ y: length34.parse(parameters.h) / 2
5108
5362
  },
5109
5363
  {
5110
- x: -length33.parse(parameters.w) / 2 - 0.5,
5111
- y: length33.parse(parameters.h) / 2
5364
+ x: -length34.parse(parameters.w) / 2 - 0.5,
5365
+ y: length34.parse(parameters.h) / 2
5112
5366
  },
5113
5367
  {
5114
- x: -length33.parse(parameters.w) / 2 - 0.5,
5115
- y: -length33.parse(parameters.h) / 2
5368
+ x: -length34.parse(parameters.w) / 2 - 0.5,
5369
+ y: -length34.parse(parameters.h) / 2
5116
5370
  },
5117
5371
  {
5118
- x: length33.parse(parameters.p) / 2,
5119
- y: -length33.parse(parameters.h) / 2
5372
+ x: length34.parse(parameters.p) / 2,
5373
+ y: -length34.parse(parameters.h) / 2
5120
5374
  }
5121
5375
  ],
5122
5376
  stroke_width: 0.1,
@@ -5158,22 +5412,22 @@ var smaWithoutParsing = (parameters) => {
5158
5412
  };
5159
5413
 
5160
5414
  // src/fn/smf.ts
5161
- import { z as z44 } from "zod";
5162
- import { length as length34 } from "circuit-json";
5415
+ import { z as z45 } from "zod";
5416
+ import { length as length35 } from "circuit-json";
5163
5417
  var smf_def = base_def.extend({
5164
- fn: z44.string(),
5165
- num_pins: z44.literal(2).default(2),
5166
- w: z44.string().default("4.80mm"),
5167
- h: z44.string().default("2.10mm"),
5168
- pl: z44.string().default("1.30mm"),
5169
- pw: z44.string().default("1.40mm"),
5170
- p: z44.string().default("2.9mm")
5418
+ fn: z45.string(),
5419
+ num_pins: z45.literal(2).default(2),
5420
+ w: z45.string().default("4.80mm"),
5421
+ h: z45.string().default("2.10mm"),
5422
+ pl: z45.string().default("1.30mm"),
5423
+ pw: z45.string().default("1.40mm"),
5424
+ p: z45.string().default("2.9mm")
5171
5425
  });
5172
5426
  var smf = (raw_params) => {
5173
5427
  const parameters = smf_def.parse(raw_params);
5174
5428
  const silkscreenRefText = silkscreenRef(
5175
5429
  0,
5176
- length34.parse(parameters.h) - 0.5,
5430
+ length35.parse(parameters.h) - 0.5,
5177
5431
  0.3
5178
5432
  );
5179
5433
  const silkscreenLine = {
@@ -5182,20 +5436,20 @@ var smf = (raw_params) => {
5182
5436
  pcb_component_id: "",
5183
5437
  route: [
5184
5438
  {
5185
- x: length34.parse(parameters.p) / 2,
5186
- y: length34.parse(parameters.h) / 2
5439
+ x: length35.parse(parameters.p) / 2,
5440
+ y: length35.parse(parameters.h) / 2
5187
5441
  },
5188
5442
  {
5189
- x: -length34.parse(parameters.w) / 2,
5190
- y: length34.parse(parameters.h) / 2
5443
+ x: -length35.parse(parameters.w) / 2,
5444
+ y: length35.parse(parameters.h) / 2
5191
5445
  },
5192
5446
  {
5193
- x: -length34.parse(parameters.w) / 2,
5194
- y: -length34.parse(parameters.h) / 2
5447
+ x: -length35.parse(parameters.w) / 2,
5448
+ y: -length35.parse(parameters.h) / 2
5195
5449
  },
5196
5450
  {
5197
- x: length34.parse(parameters.p) / 2,
5198
- y: -length34.parse(parameters.h) / 2
5451
+ x: length35.parse(parameters.p) / 2,
5452
+ y: -length35.parse(parameters.h) / 2
5199
5453
  }
5200
5454
  ],
5201
5455
  stroke_width: 0.1,
@@ -5238,22 +5492,22 @@ var smfWithoutParsing = (parameters) => {
5238
5492
  };
5239
5493
 
5240
5494
  // src/fn/smb.ts
5241
- import { z as z45 } from "zod";
5242
- import { length as length35 } from "circuit-json";
5495
+ import { z as z46 } from "zod";
5496
+ import { length as length36 } from "circuit-json";
5243
5497
  var smb_def = base_def.extend({
5244
- fn: z45.string(),
5245
- num_pins: z45.literal(2).default(2),
5246
- w: z45.string().default("7.30mm"),
5247
- h: z45.string().default("4.40mm"),
5248
- pl: z45.string().default("2.50mm"),
5249
- pw: z45.string().default("2.30mm"),
5250
- p: z45.string().default("4.30mm")
5498
+ fn: z46.string(),
5499
+ num_pins: z46.literal(2).default(2),
5500
+ w: z46.string().default("7.30mm"),
5501
+ h: z46.string().default("4.40mm"),
5502
+ pl: z46.string().default("2.50mm"),
5503
+ pw: z46.string().default("2.30mm"),
5504
+ p: z46.string().default("4.30mm")
5251
5505
  });
5252
5506
  var smb = (raw_params) => {
5253
5507
  const parameters = smb_def.parse(raw_params);
5254
5508
  const silkscreenRefText = silkscreenRef(
5255
5509
  0,
5256
- length35.parse(parameters.h) / 2 + 0.5,
5510
+ length36.parse(parameters.h) / 2 + 0.5,
5257
5511
  0.3
5258
5512
  );
5259
5513
  const silkscreenLine = {
@@ -5262,20 +5516,20 @@ var smb = (raw_params) => {
5262
5516
  pcb_component_id: "",
5263
5517
  route: [
5264
5518
  {
5265
- x: length35.parse(parameters.p) / 2,
5266
- y: length35.parse(parameters.h) / 2
5519
+ x: length36.parse(parameters.p) / 2,
5520
+ y: length36.parse(parameters.h) / 2
5267
5521
  },
5268
5522
  {
5269
- x: -length35.parse(parameters.w) / 2 - 0.1,
5270
- y: length35.parse(parameters.h) / 2
5523
+ x: -length36.parse(parameters.w) / 2 - 0.1,
5524
+ y: length36.parse(parameters.h) / 2
5271
5525
  },
5272
5526
  {
5273
- x: -length35.parse(parameters.w) / 2 - 0.1,
5274
- y: -length35.parse(parameters.h) / 2
5527
+ x: -length36.parse(parameters.w) / 2 - 0.1,
5528
+ y: -length36.parse(parameters.h) / 2
5275
5529
  },
5276
5530
  {
5277
- x: length35.parse(parameters.p) / 2,
5278
- y: -length35.parse(parameters.h) / 2
5531
+ x: length36.parse(parameters.p) / 2,
5532
+ y: -length36.parse(parameters.h) / 2
5279
5533
  }
5280
5534
  ],
5281
5535
  stroke_width: 0.1,
@@ -5318,16 +5572,16 @@ var smbWithoutParsing = (parameters) => {
5318
5572
  };
5319
5573
 
5320
5574
  // src/fn/smc.ts
5321
- import { z as z46 } from "zod";
5322
- import { length as length36 } from "circuit-json";
5575
+ import { z as z47 } from "zod";
5576
+ import { length as length37 } from "circuit-json";
5323
5577
  var smc_def = base_def.extend({
5324
- fn: z46.string(),
5325
- num_pins: z46.literal(2).default(2),
5326
- w: z46.string().default("10.70mm"),
5327
- h: z46.string().default("6.60mm"),
5328
- pl: z46.string().default("3.30mm"),
5329
- pw: z46.string().default("2.50mm"),
5330
- p: z46.string().default("6.80mm")
5578
+ fn: z47.string(),
5579
+ num_pins: z47.literal(2).default(2),
5580
+ w: z47.string().default("10.70mm"),
5581
+ h: z47.string().default("6.60mm"),
5582
+ pl: z47.string().default("3.30mm"),
5583
+ pw: z47.string().default("2.50mm"),
5584
+ p: z47.string().default("6.80mm")
5331
5585
  });
5332
5586
  var smc = (raw_params) => {
5333
5587
  const parameters = smc_def.parse(raw_params);
@@ -5338,20 +5592,20 @@ var smc = (raw_params) => {
5338
5592
  pcb_component_id: "",
5339
5593
  route: [
5340
5594
  {
5341
- x: length36.parse(parameters.p) / 2,
5342
- y: length36.parse(parameters.h) / 2 - 0.8
5595
+ x: length37.parse(parameters.p) / 2,
5596
+ y: length37.parse(parameters.h) / 2 - 0.8
5343
5597
  },
5344
5598
  {
5345
- x: -length36.parse(parameters.w) / 2 - 0.8,
5346
- y: length36.parse(parameters.h) / 2 - 0.8
5599
+ x: -length37.parse(parameters.w) / 2 - 0.8,
5600
+ y: length37.parse(parameters.h) / 2 - 0.8
5347
5601
  },
5348
5602
  {
5349
- x: -length36.parse(parameters.w) / 2 - 0.8,
5350
- y: -length36.parse(parameters.h) / 2 + 0.8
5603
+ x: -length37.parse(parameters.w) / 2 - 0.8,
5604
+ y: -length37.parse(parameters.h) / 2 + 0.8
5351
5605
  },
5352
5606
  {
5353
- x: length36.parse(parameters.p) / 2,
5354
- y: -length36.parse(parameters.h) / 2 + 0.8
5607
+ x: length37.parse(parameters.p) / 2,
5608
+ y: -length37.parse(parameters.h) / 2 + 0.8
5355
5609
  }
5356
5610
  ],
5357
5611
  stroke_width: 0.1,
@@ -5393,16 +5647,16 @@ var smcWithoutParsing = (parameters) => {
5393
5647
  };
5394
5648
 
5395
5649
  // src/fn/sot223.ts
5396
- import { z as z47 } from "zod";
5650
+ import { z as z48 } from "zod";
5397
5651
  var sot223_def = base_def.extend({
5398
- fn: z47.string(),
5399
- num_pins: z47.number().default(4),
5400
- w: z47.string().default("8.50mm"),
5401
- h: z47.string().default("6.90mm"),
5402
- pl: z47.string().default("2mm"),
5403
- pw: z47.string().default("1.5mm"),
5404
- p: z47.string().default("2.30mm"),
5405
- string: z47.string().optional()
5652
+ fn: z48.string(),
5653
+ num_pins: z48.number().default(4),
5654
+ w: z48.string().default("8.50mm"),
5655
+ h: z48.string().default("6.90mm"),
5656
+ pl: z48.string().default("2mm"),
5657
+ pw: z48.string().default("1.5mm"),
5658
+ p: z48.string().default("2.30mm"),
5659
+ string: z48.string().optional()
5406
5660
  });
5407
5661
  var sot223 = (raw_params) => {
5408
5662
  const match = raw_params.string?.match(/^sot223_(\d+)/);
@@ -5648,16 +5902,16 @@ var sot223_6 = (parameters) => {
5648
5902
  };
5649
5903
 
5650
5904
  // src/fn/sot23w.ts
5651
- import { z as z48 } from "zod";
5905
+ import { z as z49 } from "zod";
5652
5906
  var sot23w_def = base_def.extend({
5653
- fn: z48.string(),
5654
- num_pins: z48.number().default(3),
5655
- w: z48.string().default("3.40mm"),
5656
- h: z48.string().default("3.30mm"),
5657
- pl: z48.string().default("1mm"),
5658
- pw: z48.string().default("0.7mm"),
5659
- p: z48.string().default("1.2mm"),
5660
- string: z48.string().optional()
5907
+ fn: z49.string(),
5908
+ num_pins: z49.number().default(3),
5909
+ w: z49.string().default("3.40mm"),
5910
+ h: z49.string().default("3.30mm"),
5911
+ pl: z49.string().default("1mm"),
5912
+ pw: z49.string().default("0.7mm"),
5913
+ p: z49.string().default("1.2mm"),
5914
+ string: z49.string().optional()
5661
5915
  });
5662
5916
  var sot23w = (raw_params) => {
5663
5917
  const match = raw_params.string?.match(/^sot23w_(\d+)/);
@@ -5745,34 +5999,34 @@ var sot23w_3 = (parameters) => {
5745
5999
  };
5746
6000
 
5747
6001
  // src/fn/to92s.ts
5748
- import { z as z49 } from "zod";
6002
+ import { z as z50 } from "zod";
5749
6003
  var to92s_def = base_def.extend({
5750
- fn: z49.string(),
5751
- num_pins: z49.union([z49.literal(3), z49.literal(2)]).default(3),
5752
- p: z49.string().default("1.27mm"),
5753
- id: z49.string().default("0.72mm"),
5754
- od: z49.string().default("0.95mm"),
5755
- w: z49.string().default("2.5mm"),
5756
- h: z49.string().default("4.2mm"),
5757
- string: z49.string().optional()
6004
+ fn: z50.string(),
6005
+ num_pins: z50.union([z50.literal(3), z50.literal(2)]).default(3),
6006
+ p: z50.string().default("1.27mm"),
6007
+ id: z50.string().default("0.72mm"),
6008
+ od: z50.string().default("0.95mm"),
6009
+ w: z50.string().default("2.5mm"),
6010
+ h: z50.string().default("4.2mm"),
6011
+ string: z50.string().optional()
5758
6012
  });
5759
6013
  var to92s_3 = (parameters) => {
5760
6014
  const { p, id, od, w, h } = parameters;
5761
6015
  const holeY = Number.parseFloat(h) / 2;
5762
- const padSpacing = Number.parseFloat(p);
6016
+ const padSpacing3 = Number.parseFloat(p);
5763
6017
  return [
5764
- platedhole(1, -padSpacing, holeY - padSpacing, id, od),
5765
- platedhole(2, 0, holeY - padSpacing, id, od),
5766
- platedhole(3, padSpacing, holeY - padSpacing, id, od)
6018
+ platedhole(1, -padSpacing3, holeY - padSpacing3, id, od),
6019
+ platedhole(2, 0, holeY - padSpacing3, id, od),
6020
+ platedhole(3, padSpacing3, holeY - padSpacing3, id, od)
5767
6021
  ];
5768
6022
  };
5769
6023
  var to92s_2 = (parameters) => {
5770
6024
  const { p, id, od, h } = parameters;
5771
6025
  const holeY = Number.parseFloat(h) / 2;
5772
- const padSpacing = Number.parseFloat(p);
6026
+ const padSpacing3 = Number.parseFloat(p);
5773
6027
  return [
5774
- platedhole(1, -padSpacing, holeY - padSpacing, id, od),
5775
- platedhole(2, padSpacing, holeY - padSpacing, id, od)
6028
+ platedhole(1, -padSpacing3, holeY - padSpacing3, id, od),
6029
+ platedhole(2, padSpacing3, holeY - padSpacing3, id, od)
5776
6030
  ];
5777
6031
  };
5778
6032
  var to92s = (raw_params) => {
@@ -5791,19 +6045,19 @@ var to92s = (raw_params) => {
5791
6045
  throw new Error("Invalid number of pins for TO-92");
5792
6046
  }
5793
6047
  const holeY = Number.parseFloat(parameters.h) / 2;
5794
- const padSpacing = Number.parseFloat(parameters.p);
6048
+ const padSpacing3 = Number.parseFloat(parameters.p);
5795
6049
  const silkscreenBody = {
5796
6050
  type: "pcb_silkscreen_path",
5797
6051
  layer: "top",
5798
6052
  pcb_component_id: "",
5799
6053
  route: [
5800
- { x: -holeY, y: holeY - padSpacing },
6054
+ { x: -holeY, y: holeY - padSpacing3 },
5801
6055
  { x: -1.9, y: 0 },
5802
6056
  { x: 1.9, y: 0 },
5803
- { x: holeY, y: holeY - padSpacing },
6057
+ { x: holeY, y: holeY - padSpacing3 },
5804
6058
  { x: 1.5, y: Number.parseFloat(parameters.h) / 2 + 0.5 },
5805
6059
  { x: -1.5, y: Number.parseFloat(parameters.h) / 2 + 0.5 },
5806
- { x: -holeY, y: holeY - padSpacing }
6060
+ { x: -holeY, y: holeY - padSpacing3 }
5807
6061
  ],
5808
6062
  stroke_width: 0.1,
5809
6063
  pcb_silkscreen_path_id: ""
@@ -5821,18 +6075,18 @@ var to92s = (raw_params) => {
5821
6075
 
5822
6076
  // src/fn/jst.ts
5823
6077
  import {
5824
- length as length37
6078
+ length as length38
5825
6079
  } from "circuit-json";
5826
- import { z as z50 } from "zod";
6080
+ import { z as z51 } from "zod";
5827
6081
  var jst_def = base_def.extend({
5828
- fn: z50.string(),
5829
- p: length37.optional(),
5830
- id: length37.optional(),
5831
- pw: length37.optional(),
5832
- pl: length37.optional(),
5833
- w: length37.optional(),
5834
- h: length37.optional(),
5835
- sh: z50.union([z50.boolean(), z50.string(), z50.number()]).optional().transform((v) => {
6082
+ fn: z51.string(),
6083
+ p: length38.optional(),
6084
+ id: length38.optional(),
6085
+ pw: length38.optional(),
6086
+ pl: length38.optional(),
6087
+ w: length38.optional(),
6088
+ h: length38.optional(),
6089
+ sh: z51.union([z51.boolean(), z51.string(), z51.number()]).optional().transform((v) => {
5836
6090
  if (typeof v === "string") {
5837
6091
  const n = Number(v);
5838
6092
  return Number.isNaN(n) ? true : n;
@@ -5841,26 +6095,26 @@ var jst_def = base_def.extend({
5841
6095
  }).describe(
5842
6096
  'JST SH (Surface-mount) connector family. SH stands for "Super High-density".'
5843
6097
  ),
5844
- ph: z50.boolean().optional().describe(
6098
+ ph: z51.boolean().optional().describe(
5845
6099
  'JST PH (Through-hole) connector family. PH stands for "Pin Header".'
5846
6100
  ),
5847
- string: z50.string().optional()
6101
+ string: z51.string().optional()
5848
6102
  });
5849
6103
  var variantDefaults = {
5850
6104
  ph: {
5851
- p: length37.parse("2.2mm"),
5852
- id: length37.parse("0.70mm"),
5853
- pw: length37.parse("1.20mm"),
5854
- pl: length37.parse("1.20mm"),
5855
- w: length37.parse("6mm"),
5856
- h: length37.parse("5mm")
6105
+ p: length38.parse("2.2mm"),
6106
+ id: length38.parse("0.70mm"),
6107
+ pw: length38.parse("1.20mm"),
6108
+ pl: length38.parse("1.20mm"),
6109
+ w: length38.parse("6mm"),
6110
+ h: length38.parse("5mm")
5857
6111
  },
5858
6112
  sh: {
5859
- p: length37.parse("1mm"),
5860
- pw: length37.parse("0.6mm"),
5861
- pl: length37.parse("1.55mm"),
5862
- w: length37.parse("5.8mm"),
5863
- h: length37.parse("7.8mm")
6113
+ p: length38.parse("1mm"),
6114
+ pw: length38.parse("0.6mm"),
6115
+ pl: length38.parse("1.55mm"),
6116
+ w: length38.parse("5.8mm"),
6117
+ h: length38.parse("7.8mm")
5864
6118
  }
5865
6119
  };
5866
6120
  function getVariant(params) {
@@ -5959,22 +6213,22 @@ var jst = (raw_params) => {
5959
6213
  };
5960
6214
 
5961
6215
  // src/fn/sod110.ts
5962
- import { z as z51 } from "zod";
5963
- import { length as length38 } from "circuit-json";
6216
+ import { z as z52 } from "zod";
6217
+ import { length as length39 } from "circuit-json";
5964
6218
  var sod_def12 = base_def.extend({
5965
- fn: z51.string(),
5966
- num_pins: z51.literal(2).default(2),
5967
- w: z51.string().default("3.30mm"),
5968
- h: z51.string().default("1.70mm"),
5969
- pl: z51.string().default("0.80mm"),
5970
- pw: z51.string().default("1mm"),
5971
- p: z51.string().default("1.90mm")
6219
+ fn: z52.string(),
6220
+ num_pins: z52.literal(2).default(2),
6221
+ w: z52.string().default("3.30mm"),
6222
+ h: z52.string().default("1.70mm"),
6223
+ pl: z52.string().default("0.80mm"),
6224
+ pw: z52.string().default("1mm"),
6225
+ p: z52.string().default("1.90mm")
5972
6226
  });
5973
6227
  var sod110 = (raw_params) => {
5974
6228
  const parameters = sod_def12.parse(raw_params);
5975
6229
  const silkscreenRefText = silkscreenRef(
5976
6230
  0,
5977
- length38.parse(parameters.h) / 2 + 0.5,
6231
+ length39.parse(parameters.h) / 2 + 0.5,
5978
6232
  0.3
5979
6233
  );
5980
6234
  const silkscreenLine = {
@@ -5983,20 +6237,20 @@ var sod110 = (raw_params) => {
5983
6237
  pcb_component_id: "",
5984
6238
  route: [
5985
6239
  {
5986
- x: length38.parse(parameters.p) / 2,
5987
- y: length38.parse(parameters.h) / 2
6240
+ x: length39.parse(parameters.p) / 2,
6241
+ y: length39.parse(parameters.h) / 2
5988
6242
  },
5989
6243
  {
5990
- x: -length38.parse(parameters.w) / 2,
5991
- y: length38.parse(parameters.h) / 2
6244
+ x: -length39.parse(parameters.w) / 2,
6245
+ y: length39.parse(parameters.h) / 2
5992
6246
  },
5993
6247
  {
5994
- x: -length38.parse(parameters.w) / 2,
5995
- y: -length38.parse(parameters.h) / 2
6248
+ x: -length39.parse(parameters.w) / 2,
6249
+ y: -length39.parse(parameters.h) / 2
5996
6250
  },
5997
6251
  {
5998
- x: length38.parse(parameters.p) / 2,
5999
- y: -length38.parse(parameters.h) / 2
6252
+ x: length39.parse(parameters.p) / 2,
6253
+ y: -length39.parse(parameters.h) / 2
6000
6254
  }
6001
6255
  ],
6002
6256
  stroke_width: 0.1,
@@ -6038,8 +6292,8 @@ var sodWithoutParsing13 = (parameters) => {
6038
6292
  };
6039
6293
 
6040
6294
  // src/fn/vssop.ts
6041
- import { z as z52 } from "zod";
6042
- import { length as length39 } from "circuit-json";
6295
+ import { z as z53 } from "zod";
6296
+ import { length as length40 } from "circuit-json";
6043
6297
  var getDefaultValues = (num_pins) => {
6044
6298
  switch (num_pins) {
6045
6299
  case 8:
@@ -6069,23 +6323,23 @@ var getDefaultValues = (num_pins) => {
6069
6323
  }
6070
6324
  };
6071
6325
  var vssop_def = base_def.extend({
6072
- fn: z52.string(),
6073
- num_pins: z52.union([z52.literal(8), z52.literal(10)]).default(8),
6074
- w: z52.string().optional(),
6075
- h: z52.string().optional(),
6076
- p: z52.string().optional(),
6077
- pl: z52.string().optional(),
6078
- pw: z52.string().optional(),
6079
- string: z52.string().optional()
6326
+ fn: z53.string(),
6327
+ num_pins: z53.union([z53.literal(8), z53.literal(10)]).default(8),
6328
+ w: z53.string().optional(),
6329
+ h: z53.string().optional(),
6330
+ p: z53.string().optional(),
6331
+ pl: z53.string().optional(),
6332
+ pw: z53.string().optional(),
6333
+ string: z53.string().optional()
6080
6334
  });
6081
6335
  var vssop = (raw_params) => {
6082
6336
  const parameters = vssop_def.parse(raw_params);
6083
6337
  const defaults = getDefaultValues(parameters.num_pins);
6084
- const w = length39.parse(parameters.w || defaults.w);
6085
- const h = length39.parse(parameters.h || defaults.h);
6086
- const p = length39.parse(parameters.p || defaults.p);
6087
- const pl = length39.parse(parameters.pl || defaults.pl);
6088
- const pw = length39.parse(parameters.pw || defaults.pw);
6338
+ const w = length40.parse(parameters.w || defaults.w);
6339
+ const h = length40.parse(parameters.h || defaults.h);
6340
+ const p = length40.parse(parameters.p || defaults.p);
6341
+ const pl = length40.parse(parameters.pl || defaults.pl);
6342
+ const pw = length40.parse(parameters.pw || defaults.pw);
6089
6343
  const pads = [];
6090
6344
  const half = parameters.num_pins / 2;
6091
6345
  for (let i = 0; i < parameters.num_pins; i++) {
@@ -6162,14 +6416,14 @@ var getVssopPadCoord = (pinCount, pn, w, p) => {
6162
6416
  const col = pn <= half ? -1 : 1;
6163
6417
  const row = (half - 1) / 2 - rowIndex;
6164
6418
  return {
6165
- x: col * length39.parse(pinCount === 8 ? "1.8mm" : "2.2mm"),
6419
+ x: col * length40.parse(pinCount === 8 ? "1.8mm" : "2.2mm"),
6166
6420
  y: row * p
6167
6421
  };
6168
6422
  };
6169
6423
 
6170
6424
  // src/fn/msop.ts
6171
- import { z as z53 } from "zod";
6172
- import { length as length40 } from "circuit-json";
6425
+ import { z as z54 } from "zod";
6426
+ import { length as length41 } from "circuit-json";
6173
6427
  var getDefaultValues2 = (num_pins) => {
6174
6428
  switch (num_pins) {
6175
6429
  case 10:
@@ -6207,14 +6461,14 @@ var getDefaultValues2 = (num_pins) => {
6207
6461
  }
6208
6462
  };
6209
6463
  var msop_def = base_def.extend({
6210
- fn: z53.string(),
6211
- num_pins: z53.union([z53.literal(8), z53.literal(10), z53.literal(12), z53.literal(16)]).default(8),
6212
- w: z53.string().optional(),
6213
- h: z53.string().optional(),
6214
- p: z53.string().optional(),
6215
- pl: z53.string().optional(),
6216
- pw: z53.string().optional(),
6217
- string: z53.string().optional()
6464
+ fn: z54.string(),
6465
+ num_pins: z54.union([z54.literal(8), z54.literal(10), z54.literal(12), z54.literal(16)]).default(8),
6466
+ w: z54.string().optional(),
6467
+ h: z54.string().optional(),
6468
+ p: z54.string().optional(),
6469
+ pl: z54.string().optional(),
6470
+ pw: z54.string().optional(),
6471
+ string: z54.string().optional()
6218
6472
  });
6219
6473
  var getMsopCoords = (pinCount, pn, w, p) => {
6220
6474
  const half = pinCount / 2;
@@ -6222,18 +6476,18 @@ var getMsopCoords = (pinCount, pn, w, p) => {
6222
6476
  const col = pn <= half ? -1 : 1;
6223
6477
  const row = (half - 1) / 2 - rowIndex;
6224
6478
  return {
6225
- x: col * length40.parse("2mm"),
6479
+ x: col * length41.parse("2mm"),
6226
6480
  y: row * p
6227
6481
  };
6228
6482
  };
6229
6483
  var msop = (raw_params) => {
6230
6484
  const parameters = msop_def.parse(raw_params);
6231
6485
  const defaults = getDefaultValues2(parameters.num_pins);
6232
- const w = length40.parse(parameters.w || defaults.w);
6233
- const h = length40.parse(parameters.h || defaults.h);
6234
- const p = length40.parse(parameters.p || defaults.p);
6235
- const pl = length40.parse(parameters.pl || defaults.pl);
6236
- const pw = length40.parse(parameters.pw || defaults.pw);
6486
+ const w = length41.parse(parameters.w || defaults.w);
6487
+ const h = length41.parse(parameters.h || defaults.h);
6488
+ const p = length41.parse(parameters.p || defaults.p);
6489
+ const pl = length41.parse(parameters.pl || defaults.pl);
6490
+ const pw = length41.parse(parameters.pw || defaults.pw);
6237
6491
  const pads = [];
6238
6492
  for (let i = 0; i < parameters.num_pins; i++) {
6239
6493
  const { x, y } = getMsopCoords(parameters.num_pins, i + 1, w, p);
@@ -6304,22 +6558,22 @@ var msop = (raw_params) => {
6304
6558
  };
6305
6559
 
6306
6560
  // src/fn/sod323w.ts
6307
- import { z as z54 } from "zod";
6308
- import { length as length41 } from "circuit-json";
6561
+ import { z as z55 } from "zod";
6562
+ import { length as length42 } from "circuit-json";
6309
6563
  var sod323w_def = base_def.extend({
6310
- fn: z54.string(),
6311
- num_pins: z54.literal(2).default(2),
6312
- w: z54.string().default("3.8mm"),
6313
- h: z54.string().default("1.65mm"),
6314
- pl: z54.string().default("1.2mm"),
6315
- pw: z54.string().default("1.2mm"),
6316
- pad_spacing: z54.string().default("2.6mm")
6564
+ fn: z55.string(),
6565
+ num_pins: z55.literal(2).default(2),
6566
+ w: z55.string().default("3.8mm"),
6567
+ h: z55.string().default("1.65mm"),
6568
+ pl: z55.string().default("1.2mm"),
6569
+ pw: z55.string().default("1.2mm"),
6570
+ pad_spacing: z55.string().default("2.6mm")
6317
6571
  });
6318
6572
  var sod323w = (raw_params) => {
6319
6573
  const parameters = sod323w_def.parse(raw_params);
6320
6574
  const silkscreenRefText = silkscreenRef(
6321
6575
  0,
6322
- length41.parse(parameters.h),
6576
+ length42.parse(parameters.h),
6323
6577
  0.3
6324
6578
  );
6325
6579
  const silkscreenLine = {
@@ -6328,20 +6582,20 @@ var sod323w = (raw_params) => {
6328
6582
  pcb_component_id: "",
6329
6583
  route: [
6330
6584
  {
6331
- x: length41.parse(parameters.pad_spacing) / 2,
6332
- y: length41.parse(parameters.h) / 2
6585
+ x: length42.parse(parameters.pad_spacing) / 2,
6586
+ y: length42.parse(parameters.h) / 2
6333
6587
  },
6334
6588
  {
6335
- x: -length41.parse(parameters.w) / 2 - 0.2,
6336
- y: length41.parse(parameters.h) / 2
6589
+ x: -length42.parse(parameters.w) / 2 - 0.2,
6590
+ y: length42.parse(parameters.h) / 2
6337
6591
  },
6338
6592
  {
6339
- x: -length41.parse(parameters.w) / 2 - 0.2,
6340
- y: -length41.parse(parameters.h) / 2
6593
+ x: -length42.parse(parameters.w) / 2 - 0.2,
6594
+ y: -length42.parse(parameters.h) / 2
6341
6595
  },
6342
6596
  {
6343
- x: length41.parse(parameters.pad_spacing) / 2,
6344
- y: -length41.parse(parameters.h) / 2
6597
+ x: length42.parse(parameters.pad_spacing) / 2,
6598
+ y: -length42.parse(parameters.h) / 2
6345
6599
  }
6346
6600
  ],
6347
6601
  stroke_width: 0.1,
@@ -6384,22 +6638,22 @@ var sodWithoutParsing14 = (parameters) => {
6384
6638
  };
6385
6639
 
6386
6640
  // src/fn/sod323fl.ts
6387
- import { z as z55 } from "zod";
6388
- import { length as length42 } from "circuit-json";
6641
+ import { z as z56 } from "zod";
6642
+ import { length as length43 } from "circuit-json";
6389
6643
  var sod323FL_def = base_def.extend({
6390
- fn: z55.string(),
6391
- num_pins: z55.literal(2).default(2),
6392
- w: z55.string().default("3.20mm"),
6393
- h: z55.string().default("1.65mm"),
6394
- pl: z55.string().default("0.8mm"),
6395
- pw: z55.string().default("0.9mm"),
6396
- pad_spacing: z55.string().default("2.1mm")
6644
+ fn: z56.string(),
6645
+ num_pins: z56.literal(2).default(2),
6646
+ w: z56.string().default("3.20mm"),
6647
+ h: z56.string().default("1.65mm"),
6648
+ pl: z56.string().default("0.8mm"),
6649
+ pw: z56.string().default("0.9mm"),
6650
+ pad_spacing: z56.string().default("2.1mm")
6397
6651
  });
6398
6652
  var sod323fl = (raw_params) => {
6399
6653
  const parameters = sod323FL_def.parse(raw_params);
6400
6654
  const silkscreenRefText = silkscreenRef(
6401
6655
  0,
6402
- length42.parse(parameters.h),
6656
+ length43.parse(parameters.h),
6403
6657
  0.3
6404
6658
  );
6405
6659
  const silkscreenLine = {
@@ -6408,20 +6662,20 @@ var sod323fl = (raw_params) => {
6408
6662
  pcb_component_id: "",
6409
6663
  route: [
6410
6664
  {
6411
- x: length42.parse(parameters.pad_spacing) / 2,
6412
- y: length42.parse(parameters.h) / 2
6665
+ x: length43.parse(parameters.pad_spacing) / 2,
6666
+ y: length43.parse(parameters.h) / 2
6413
6667
  },
6414
6668
  {
6415
- x: -length42.parse(parameters.w) / 2 - 0.2,
6416
- y: length42.parse(parameters.h) / 2
6669
+ x: -length43.parse(parameters.w) / 2 - 0.2,
6670
+ y: length43.parse(parameters.h) / 2
6417
6671
  },
6418
6672
  {
6419
- x: -length42.parse(parameters.w) / 2 - 0.2,
6420
- y: -length42.parse(parameters.h) / 2
6673
+ x: -length43.parse(parameters.w) / 2 - 0.2,
6674
+ y: -length43.parse(parameters.h) / 2
6421
6675
  },
6422
6676
  {
6423
- x: length42.parse(parameters.pad_spacing) / 2,
6424
- y: -length42.parse(parameters.h) / 2
6677
+ x: length43.parse(parameters.pad_spacing) / 2,
6678
+ y: -length43.parse(parameters.h) / 2
6425
6679
  }
6426
6680
  ],
6427
6681
  stroke_width: 0.1,
@@ -6464,20 +6718,20 @@ var sodWithoutParsing15 = (parameters) => {
6464
6718
  };
6465
6719
 
6466
6720
  // src/fn/son.ts
6467
- import { z as z56 } from "zod";
6468
- import { length as length43 } from "circuit-json";
6721
+ import { z as z57 } from "zod";
6722
+ import { length as length44 } from "circuit-json";
6469
6723
  var son_def = base_def.extend({
6470
- fn: z56.string(),
6471
- num_pins: z56.union([z56.literal(6), z56.literal(8)]).default(8),
6472
- w: z56.string().default("3mm"),
6473
- h: z56.string().default("3mm"),
6474
- p: z56.string().default("0.5mm"),
6475
- pl: z56.string().default("0.52mm"),
6476
- pw: z56.string().default("0.35mm"),
6477
- epw: z56.string().default("1.40mm"),
6478
- eph: z56.string().default("1.60mm"),
6479
- string: z56.string().optional(),
6480
- ep: z56.boolean().default(false)
6724
+ fn: z57.string(),
6725
+ num_pins: z57.union([z57.literal(6), z57.literal(8)]).default(8),
6726
+ w: z57.string().default("3mm"),
6727
+ h: z57.string().default("3mm"),
6728
+ p: z57.string().default("0.5mm"),
6729
+ pl: z57.string().default("0.52mm"),
6730
+ pw: z57.string().default("0.35mm"),
6731
+ epw: z57.string().default("1.40mm"),
6732
+ eph: z57.string().default("1.60mm"),
6733
+ string: z57.string().optional(),
6734
+ ep: z57.boolean().default(false)
6481
6735
  });
6482
6736
  var son = (raw_params) => {
6483
6737
  if (raw_params.string && raw_params.string.includes("_ep")) {
@@ -6489,13 +6743,13 @@ var son = (raw_params) => {
6489
6743
  ...raw_params,
6490
6744
  num_pins: numPins
6491
6745
  });
6492
- const w = length43.parse(parameters.w);
6493
- const h = length43.parse(parameters.h);
6494
- const p = length43.parse(parameters.p);
6495
- const pl = length43.parse(parameters.pl);
6496
- const pw = length43.parse(parameters.pw);
6497
- const epw = length43.parse(parameters.epw);
6498
- const eph = length43.parse(parameters.eph);
6746
+ const w = length44.parse(parameters.w);
6747
+ const h = length44.parse(parameters.h);
6748
+ const p = length44.parse(parameters.p);
6749
+ const pl = length44.parse(parameters.pl);
6750
+ const pw = length44.parse(parameters.pw);
6751
+ const epw = length44.parse(parameters.epw);
6752
+ const eph = length44.parse(parameters.eph);
6499
6753
  const pads = [];
6500
6754
  for (let i = 0; i < parameters.num_pins; i++) {
6501
6755
  const { x, y } = getSonPadCoord(parameters.num_pins, i + 1, w, p);
@@ -6573,22 +6827,22 @@ var getSonPadCoord = (num_pins, pn, w, p) => {
6573
6827
  const col = pn <= half ? -1 : 1;
6574
6828
  const row = (half - 1) / 2 - rowIndex;
6575
6829
  return {
6576
- x: col * length43.parse("1.4mm"),
6830
+ x: col * length44.parse("1.4mm"),
6577
6831
  y: row * p
6578
6832
  };
6579
6833
  };
6580
6834
 
6581
6835
  // src/fn/solderjumper.ts
6582
- import { length as length44 } from "circuit-json";
6836
+ import { length as length45 } from "circuit-json";
6583
6837
  var solderjumper = (params) => {
6584
6838
  const { num_pins, bridged, p = 2.54, pw = 1.5, ph = 1.5 } = params;
6585
- const padSpacing = length44.parse(p);
6586
- const padWidth = length44.parse(pw);
6587
- const padHeight = length44.parse(ph);
6588
- const traceWidth = Math.min(padHeight / 4, 0.5);
6839
+ const padSpacing3 = length45.parse(p);
6840
+ const padWidth3 = length45.parse(pw);
6841
+ const padHeight3 = length45.parse(ph);
6842
+ const traceWidth = Math.min(padHeight3 / 4, 0.5);
6589
6843
  const pads = [];
6590
6844
  for (let i = 0; i < num_pins; i++) {
6591
- pads.push(rectpad(i + 1, i * padSpacing, 0, padWidth, padHeight));
6845
+ pads.push(rectpad(i + 1, i * padSpacing3, 0, padWidth3, padHeight3));
6592
6846
  }
6593
6847
  let traces = [];
6594
6848
  if (bridged) {
@@ -6598,11 +6852,11 @@ var solderjumper = (params) => {
6598
6852
  const from = pins[i];
6599
6853
  const to = pins[i + 1];
6600
6854
  if (typeof from === "number" && typeof to === "number" && !isNaN(from) && !isNaN(to)) {
6601
- const xCenterFrom = (from - 1) * padSpacing;
6602
- const xCenterTo = (to - 1) * padSpacing;
6855
+ const xCenterFrom = (from - 1) * padSpacing3;
6856
+ const xCenterTo = (to - 1) * padSpacing3;
6603
6857
  const directionMult = Math.sign(xCenterTo - xCenterFrom);
6604
- const x1 = xCenterFrom + directionMult * (padWidth / 2);
6605
- const x2 = xCenterTo - directionMult * (padWidth / 2);
6858
+ const x1 = xCenterFrom + directionMult * (padWidth3 / 2);
6859
+ const x2 = xCenterTo - directionMult * (padWidth3 / 2);
6606
6860
  traces.push({
6607
6861
  type: "pcb_trace",
6608
6862
  pcb_trace_id: "",
@@ -6629,9 +6883,9 @@ var solderjumper = (params) => {
6629
6883
  }
6630
6884
  }
6631
6885
  }
6632
- const outlineWidth = (num_pins - 1) * padSpacing + padWidth + 0.7;
6633
- const outlineHeight = padHeight + 1;
6634
- const outlineCenterX = (num_pins - 1) * padSpacing / 2;
6886
+ const outlineWidth = (num_pins - 1) * padSpacing3 + padWidth3 + 0.7;
6887
+ const outlineHeight = padHeight3 + 1;
6888
+ const outlineCenterX = (num_pins - 1) * padSpacing3 / 2;
6635
6889
  const outlineCenterY = 0;
6636
6890
  const silkscreenRect = {
6637
6891
  type: "pcb_silkscreen_path",
@@ -6672,34 +6926,34 @@ var solderjumper = (params) => {
6672
6926
  };
6673
6927
 
6674
6928
  // src/fn/sot457.ts
6675
- import { z as z57 } from "zod";
6929
+ import { z as z58 } from "zod";
6676
6930
  var commonSchema = {
6677
- fn: z57.literal("sot457"),
6678
- num_pins: z57.literal(6).default(6),
6679
- pillh: z57.string().default("0.45mm"),
6680
- pillw: z57.string().default("1.45mm"),
6681
- pl: z57.string(),
6682
- pw: z57.string(),
6683
- p: z57.string(),
6684
- wave: z57.boolean().optional(),
6685
- reflow: z57.boolean().optional()
6931
+ fn: z58.literal("sot457"),
6932
+ num_pins: z58.literal(6).default(6),
6933
+ pillh: z58.string().default("0.45mm"),
6934
+ pillw: z58.string().default("1.45mm"),
6935
+ pl: z58.string(),
6936
+ pw: z58.string(),
6937
+ p: z58.string(),
6938
+ wave: z58.boolean().optional(),
6939
+ reflow: z58.boolean().optional()
6686
6940
  };
6687
6941
  var sot457DefSchema = base_def.extend({
6688
6942
  ...commonSchema,
6689
- h: z57.string().default("2.5mm"),
6690
- w: z57.string().default("2.7mm"),
6691
- pl: z57.string().default("0.8mm"),
6692
- pw: z57.string().default("0.55mm"),
6693
- p: z57.string().default("0.95mm")
6943
+ h: z58.string().default("2.5mm"),
6944
+ w: z58.string().default("2.7mm"),
6945
+ pl: z58.string().default("0.8mm"),
6946
+ pw: z58.string().default("0.55mm"),
6947
+ p: z58.string().default("0.95mm")
6694
6948
  });
6695
6949
  var sot457WaveSchema = base_def.extend({
6696
6950
  ...commonSchema,
6697
- h: z57.string().default("3mm"),
6698
- w: z57.string().default("4mm"),
6699
- pillr: z57.string().default("0.225mm"),
6700
- pl: z57.string().default("1.45mm"),
6701
- pw: z57.string().default("1.5mm"),
6702
- p: z57.string().default("1.475mm")
6951
+ h: z58.string().default("3mm"),
6952
+ w: z58.string().default("4mm"),
6953
+ pillr: z58.string().default("0.225mm"),
6954
+ pl: z58.string().default("1.45mm"),
6955
+ pw: z58.string().default("1.5mm"),
6956
+ p: z58.string().default("1.475mm")
6703
6957
  }).transform((data) => ({
6704
6958
  ...data,
6705
6959
  wave: data.wave ?? (data.reflow === void 0 ? true : !data.reflow),
@@ -6732,40 +6986,40 @@ var generateSot457Elements = (params) => {
6732
6986
  const pads = [];
6733
6987
  const pitch = parseDimension(params.p);
6734
6988
  const padLength = parseDimension(params.pl);
6735
- const padWidth = parseDimension(params.pw);
6989
+ const padWidth3 = parseDimension(params.pw);
6736
6990
  const width = parseDimension(params.w);
6737
6991
  const height = parseDimension(params.h);
6738
6992
  if (params.wave) {
6739
6993
  const pinConfigs = {
6740
- 1: ({ padWidth: padWidth2, padHeight }) => rectpad(1, -pitch, pitch, padHeight, padWidth2),
6741
- 2: ({ padWidth: padWidth2, padHeight }) => rectpad(2, -pitch, -pitch, padHeight, padWidth2),
6742
- 3: ({ padWidth: padWidth2, padHeight }) => pillpad(
6994
+ 1: ({ padWidth: padWidth4, padHeight: padHeight3 }) => rectpad(1, -pitch, pitch, padHeight3, padWidth4),
6995
+ 2: ({ padWidth: padWidth4, padHeight: padHeight3 }) => rectpad(2, -pitch, -pitch, padHeight3, padWidth4),
6996
+ 3: ({ padWidth: padWidth4, padHeight: padHeight3 }) => pillpad(
6743
6997
  3,
6744
6998
  -pitch,
6745
6999
  0,
6746
7000
  parseDimension(params.pillw),
6747
7001
  parseDimension(params.pillh)
6748
7002
  ),
6749
- 4: ({ padWidth: padWidth2, padHeight }) => pillpad(
7003
+ 4: ({ padWidth: padWidth4, padHeight: padHeight3 }) => pillpad(
6750
7004
  4,
6751
7005
  pitch,
6752
7006
  0,
6753
7007
  parseDimension(params.pillw),
6754
7008
  parseDimension(params.pillh)
6755
7009
  ),
6756
- 5: ({ padWidth: padWidth2, padHeight }) => rectpad(5, pitch, pitch, padHeight, padWidth2),
6757
- 6: ({ padWidth: padWidth2, padHeight }) => rectpad(6, pitch, -pitch, padHeight, padWidth2)
7010
+ 5: ({ padWidth: padWidth4, padHeight: padHeight3 }) => rectpad(5, pitch, pitch, padHeight3, padWidth4),
7011
+ 6: ({ padWidth: padWidth4, padHeight: padHeight3 }) => rectpad(6, pitch, -pitch, padHeight3, padWidth4)
6758
7012
  };
6759
7013
  for (let i = 1; i <= params.num_pins; i++) {
6760
7014
  const config = pinConfigs[i];
6761
7015
  if (config) {
6762
- pads.push(config({ padWidth: padLength, padHeight: padWidth }));
7016
+ pads.push(config({ padWidth: padLength, padHeight: padWidth3 }));
6763
7017
  }
6764
7018
  }
6765
7019
  } else {
6766
7020
  for (let i = 1; i <= params.num_pins; i++) {
6767
7021
  const { x, y } = getCcwSot457Coords({ pitch, width, pinNumber: i });
6768
- pads.push(rectpad(i, x, y, padLength, padWidth));
7022
+ pads.push(rectpad(i, x, y, padLength, padWidth3));
6769
7023
  }
6770
7024
  }
6771
7025
  const silkscreenPath1 = {
@@ -6794,7 +7048,7 @@ var generateSot457Elements = (params) => {
6794
7048
  const pin1Position = getCcwSot457Coords({ pitch, width, pinNumber: 1 });
6795
7049
  const triangleHeight = params.wave ? 1 : 0.5;
6796
7050
  const triangleWidth = params.wave ? 0.7 : 0.3;
6797
- pin1Position.x -= params.wave ? padWidth : padWidth * 1.7;
7051
+ pin1Position.x -= params.wave ? padWidth3 : padWidth3 * 1.7;
6798
7052
  const pin1Indicator = {
6799
7053
  type: "pcb_silkscreen_path",
6800
7054
  layer: "top",
@@ -6838,25 +7092,25 @@ var sot457 = (rawParams) => {
6838
7092
  };
6839
7093
 
6840
7094
  // src/fn/sot963.ts
6841
- import { z as z58 } from "zod";
6842
- import { length as length45 } from "circuit-json";
7095
+ import { z as z59 } from "zod";
7096
+ import { length as length46 } from "circuit-json";
6843
7097
  var sot963_def = base_def.extend({
6844
- fn: z58.string(),
6845
- num_pins: z58.literal(6).default(6),
6846
- w: z58.string().default("1.1mm"),
6847
- h: z58.string().default("1.45mm"),
6848
- p: z58.string().default("0.35mm"),
6849
- pl: z58.string().default("0.2mm"),
6850
- pw: z58.string().default("0.2mm"),
6851
- string: z58.string().optional()
7098
+ fn: z59.string(),
7099
+ num_pins: z59.literal(6).default(6),
7100
+ w: z59.string().default("1.1mm"),
7101
+ h: z59.string().default("1.45mm"),
7102
+ p: z59.string().default("0.35mm"),
7103
+ pl: z59.string().default("0.2mm"),
7104
+ pw: z59.string().default("0.2mm"),
7105
+ string: z59.string().optional()
6852
7106
  });
6853
7107
  var sot963 = (raw_params) => {
6854
7108
  const parameters = sot963_def.parse({ ...raw_params, fn: "sot963" });
6855
- const w = length45.parse(parameters.w);
6856
- const h = length45.parse(parameters.h);
6857
- const p = length45.parse(parameters.p);
6858
- const pl = length45.parse(parameters.pl);
6859
- const pw = length45.parse(parameters.pw);
7109
+ const w = length46.parse(parameters.w);
7110
+ const h = length46.parse(parameters.h);
7111
+ const p = length46.parse(parameters.p);
7112
+ const pl = length46.parse(parameters.pl);
7113
+ const pw = length46.parse(parameters.pw);
6860
7114
  const pads = [];
6861
7115
  for (let i = 0; i < 6; i++) {
6862
7116
  const { x, y } = getSot963PadCoord(i + 1, w, p, pl);
@@ -6919,19 +7173,19 @@ var getSot963PadCoord = (pn, w, p, pl) => {
6919
7173
  };
6920
7174
 
6921
7175
  // src/fn/potentiometer.ts
6922
- import { z as z59 } from "zod";
7176
+ import { z as z60 } from "zod";
6923
7177
  var potentiometer_def = base_def.extend({
6924
- fn: z59.string(),
6925
- num_pins: z59.union([z59.literal(3), z59.literal(2)]).default(3),
6926
- p: z59.string().default("3.8mm"),
6927
- id: z59.string().default("1.25mm"),
6928
- od: z59.string().default("2.35mm"),
6929
- ca: z59.string().default("14mm").describe(
7178
+ fn: z60.string(),
7179
+ num_pins: z60.union([z60.literal(3), z60.literal(2)]).default(3),
7180
+ p: z60.string().default("3.8mm"),
7181
+ id: z60.string().default("1.25mm"),
7182
+ od: z60.string().default("2.35mm"),
7183
+ ca: z60.string().default("14mm").describe(
6930
7184
  "Caliper axis (width or diameter of the potentiometer body or adjustment knob)"
6931
7185
  ),
6932
- w: z59.string().default("5.35mm"),
6933
- h: z59.string().default("4mm"),
6934
- string: z59.string().optional()
7186
+ w: z60.string().default("5.35mm"),
7187
+ h: z60.string().default("4mm"),
7188
+ string: z60.string().optional()
6935
7189
  });
6936
7190
  var potentiometer_acp = (parameters) => {
6937
7191
  const { p, id, od, h, ca } = parameters;
@@ -6998,15 +7252,15 @@ var potentiometer = (raw_params) => {
6998
7252
 
6999
7253
  // src/fn/electrolytic.ts
7000
7254
  import {
7001
- length as length46
7255
+ length as length47
7002
7256
  } from "circuit-json";
7003
- import { z as z60 } from "zod";
7257
+ import { z as z61 } from "zod";
7004
7258
  var electrolytic_def = base_def.extend({
7005
- fn: z60.string(),
7006
- p: length46.optional().default("7.5mm"),
7007
- id: length46.optional().default("1mm"),
7008
- od: length46.optional().default("2mm"),
7009
- d: length46.optional().default("10.5mm")
7259
+ fn: z61.string(),
7260
+ p: length47.optional().default("7.5mm"),
7261
+ id: length47.optional().default("1mm"),
7262
+ od: length47.optional().default("2mm"),
7263
+ d: length47.optional().default("10.5mm")
7010
7264
  });
7011
7265
  var generate_circle_arcs = (centerX, centerY, radius, cut, cutHeight) => {
7012
7266
  const topArc = [];
@@ -7113,22 +7367,22 @@ var electrolytic = (raw_params) => {
7113
7367
  };
7114
7368
 
7115
7369
  // src/fn/smbf.ts
7116
- import { z as z61 } from "zod";
7117
- import { length as length47 } from "circuit-json";
7370
+ import { z as z62 } from "zod";
7371
+ import { length as length48 } from "circuit-json";
7118
7372
  var smbf_def = base_def.extend({
7119
- fn: z61.string(),
7120
- num_pins: z61.literal(2).default(2),
7121
- w: z61.string().default("6.5mm"),
7122
- h: z61.string().default("3mm"),
7123
- pl: z61.string().default("1.75mm"),
7124
- pw: z61.string().default("2.40mm"),
7125
- p: z61.string().default("4.75mm")
7373
+ fn: z62.string(),
7374
+ num_pins: z62.literal(2).default(2),
7375
+ w: z62.string().default("6.5mm"),
7376
+ h: z62.string().default("3mm"),
7377
+ pl: z62.string().default("1.75mm"),
7378
+ pw: z62.string().default("2.40mm"),
7379
+ p: z62.string().default("4.75mm")
7126
7380
  });
7127
7381
  var smbf = (raw_params) => {
7128
7382
  const parameters = smbf_def.parse(raw_params);
7129
7383
  const silkscreenRefText = silkscreenRef(
7130
7384
  0,
7131
- length47.parse(parameters.h) - 0.5,
7385
+ length48.parse(parameters.h) - 0.5,
7132
7386
  0.3
7133
7387
  );
7134
7388
  const silkscreenLine = {
@@ -7137,20 +7391,20 @@ var smbf = (raw_params) => {
7137
7391
  pcb_component_id: "",
7138
7392
  route: [
7139
7393
  {
7140
- x: length47.parse(parameters.p) / 2,
7141
- y: length47.parse(parameters.h) / 2
7394
+ x: length48.parse(parameters.p) / 2,
7395
+ y: length48.parse(parameters.h) / 2
7142
7396
  },
7143
7397
  {
7144
- x: -length47.parse(parameters.w) / 2 - 0.3,
7145
- y: length47.parse(parameters.h) / 2
7398
+ x: -length48.parse(parameters.w) / 2 - 0.3,
7399
+ y: length48.parse(parameters.h) / 2
7146
7400
  },
7147
7401
  {
7148
- x: -length47.parse(parameters.w) / 2 - 0.3,
7149
- y: -length47.parse(parameters.h) / 2
7402
+ x: -length48.parse(parameters.w) / 2 - 0.3,
7403
+ y: -length48.parse(parameters.h) / 2
7150
7404
  },
7151
7405
  {
7152
- x: length47.parse(parameters.p) / 2,
7153
- y: -length47.parse(parameters.h) / 2
7406
+ x: length48.parse(parameters.p) / 2,
7407
+ y: -length48.parse(parameters.h) / 2
7154
7408
  }
7155
7409
  ],
7156
7410
  stroke_width: 0.1,
@@ -7192,16 +7446,16 @@ var smbfWithoutParsing = (parameters) => {
7192
7446
  };
7193
7447
 
7194
7448
  // src/fn/sot323.ts
7195
- import { z as z62 } from "zod";
7449
+ import { z as z63 } from "zod";
7196
7450
  var sot323_def = base_def.extend({
7197
- fn: z62.string(),
7198
- num_pins: z62.number().default(3),
7199
- w: z62.string().default("2.45mm"),
7200
- h: z62.string().default("2.40mm"),
7201
- pl: z62.string().default("1.225mm"),
7202
- pw: z62.string().default("0.5mm"),
7203
- p: z62.string().default("0.95mm"),
7204
- string: z62.string().optional()
7451
+ fn: z63.string(),
7452
+ num_pins: z63.number().default(3),
7453
+ w: z63.string().default("2.45mm"),
7454
+ h: z63.string().default("2.40mm"),
7455
+ pl: z63.string().default("1.225mm"),
7456
+ pw: z63.string().default("0.5mm"),
7457
+ p: z63.string().default("0.95mm"),
7458
+ string: z63.string().optional()
7205
7459
  });
7206
7460
  var sot323 = (raw_params) => {
7207
7461
  const match = raw_params.string?.match(/^sot323_(\d+)/);
@@ -7289,30 +7543,30 @@ var sot323_3 = (parameters) => {
7289
7543
  };
7290
7544
 
7291
7545
  // src/fn/smtpad.ts
7292
- import { z as z63 } from "zod";
7293
- import { length as length48 } from "circuit-json";
7546
+ import { z as z64 } from "zod";
7547
+ import { length as length49 } from "circuit-json";
7294
7548
  import { mm as mm8 } from "@tscircuit/mm";
7295
7549
  var smtpad_def = base_def.extend({
7296
- fn: z63.string(),
7297
- circle: z63.boolean().optional(),
7298
- rect: z63.boolean().optional(),
7299
- square: z63.boolean().optional(),
7300
- pill: z63.boolean().optional(),
7301
- d: length48.optional(),
7302
- pd: length48.optional(),
7303
- diameter: length48.optional(),
7304
- r: length48.optional(),
7305
- pr: length48.optional(),
7306
- radius: length48.optional(),
7307
- w: length48.optional(),
7308
- pw: length48.optional(),
7309
- width: length48.optional(),
7310
- h: length48.optional(),
7311
- ph: length48.optional(),
7312
- height: length48.optional(),
7313
- s: length48.optional(),
7314
- size: length48.optional(),
7315
- string: z63.string().optional()
7550
+ fn: z64.string(),
7551
+ circle: z64.boolean().optional(),
7552
+ rect: z64.boolean().optional(),
7553
+ square: z64.boolean().optional(),
7554
+ pill: z64.boolean().optional(),
7555
+ d: length49.optional(),
7556
+ pd: length49.optional(),
7557
+ diameter: length49.optional(),
7558
+ r: length49.optional(),
7559
+ pr: length49.optional(),
7560
+ radius: length49.optional(),
7561
+ w: length49.optional(),
7562
+ pw: length49.optional(),
7563
+ width: length49.optional(),
7564
+ h: length49.optional(),
7565
+ ph: length49.optional(),
7566
+ height: length49.optional(),
7567
+ s: length49.optional(),
7568
+ size: length49.optional(),
7569
+ string: z64.string().optional()
7316
7570
  }).transform((v) => {
7317
7571
  let shape = "rect";
7318
7572
  if (v.circle) shape = "circle";
@@ -7378,18 +7632,18 @@ var smtpad = (raw_params) => {
7378
7632
  };
7379
7633
 
7380
7634
  // src/fn/platedhole.ts
7381
- import { z as z64 } from "zod";
7382
- import { length as length49 } from "circuit-json";
7635
+ import { z as z65 } from "zod";
7636
+ import { length as length50 } from "circuit-json";
7383
7637
  import { mm as mm9 } from "@tscircuit/mm";
7384
7638
  var platedhole_def = base_def.extend({
7385
- fn: z64.string(),
7386
- d: length49.optional(),
7387
- hd: length49.optional(),
7388
- r: length49.optional(),
7389
- hr: length49.optional(),
7390
- pd: length49.optional(),
7391
- pr: length49.optional(),
7392
- squarepad: z64.boolean().optional().default(false)
7639
+ fn: z65.string(),
7640
+ d: length50.optional(),
7641
+ hd: length50.optional(),
7642
+ r: length50.optional(),
7643
+ hr: length50.optional(),
7644
+ pd: length50.optional(),
7645
+ pr: length50.optional(),
7646
+ squarepad: z65.boolean().optional().default(false)
7393
7647
  }).transform((v) => {
7394
7648
  let holeD;
7395
7649
  if (v.d !== void 0) holeD = mm9(v.d);
@@ -7421,14 +7675,14 @@ var platedhole2 = (raw_params) => {
7421
7675
  };
7422
7676
 
7423
7677
  // src/fn/sot.ts
7424
- import { z as z65 } from "zod";
7678
+ import { z as z66 } from "zod";
7425
7679
  var sot_def = base_def.extend({
7426
- fn: z65.string(),
7427
- num_pins: z65.literal(6).default(6),
7428
- h: z65.string().default("1.6mm"),
7429
- pl: z65.string().default("1mm"),
7430
- pw: z65.string().default("0.7mm"),
7431
- p: z65.string().default("0.95mm")
7680
+ fn: z66.string(),
7681
+ num_pins: z66.literal(6).default(6),
7682
+ h: z66.string().default("1.6mm"),
7683
+ pl: z66.string().default("1mm"),
7684
+ pw: z66.string().default("0.7mm"),
7685
+ p: z66.string().default("0.95mm")
7432
7686
  });
7433
7687
  var sot = (raw_params) => {
7434
7688
  const parameters = sot_def.parse(raw_params);
@@ -7545,16 +7799,16 @@ var sotWithoutParsing = (parameters) => {
7545
7799
  };
7546
7800
 
7547
7801
  // src/fn/sot343.ts
7548
- import { z as z66 } from "zod";
7802
+ import { z as z67 } from "zod";
7549
7803
  var sot343_def = base_def.extend({
7550
- fn: z66.string(),
7551
- num_pins: z66.number().default(4),
7552
- w: z66.string().default("3.2mm"),
7553
- h: z66.string().default("2.6mm"),
7554
- pl: z66.string().default("1.35mm"),
7555
- pw: z66.string().default("0.50mm"),
7556
- p: z66.string().default("0.6mm"),
7557
- string: z66.string().optional()
7804
+ fn: z67.string(),
7805
+ num_pins: z67.number().default(4),
7806
+ w: z67.string().default("3.2mm"),
7807
+ h: z67.string().default("2.6mm"),
7808
+ pl: z67.string().default("1.35mm"),
7809
+ pw: z67.string().default("0.50mm"),
7810
+ p: z67.string().default("0.6mm"),
7811
+ string: z67.string().optional()
7558
7812
  });
7559
7813
  var sot343 = (raw_params) => {
7560
7814
  const match = raw_params.string?.match(/^sot343_(\d+)/);
@@ -7649,14 +7903,14 @@ var sot343_4 = (parameters) => {
7649
7903
  };
7650
7904
 
7651
7905
  // src/fn/m2host.ts
7652
- import { z as z67 } from "zod";
7906
+ import { z as z68 } from "zod";
7653
7907
  var m2host_def = base_def.extend({
7654
- fn: z67.string()
7908
+ fn: z68.string()
7655
7909
  });
7656
7910
  var m2host = (raw_params) => {
7657
7911
  const parameters = m2host_def.parse(raw_params);
7658
7912
  const pads = [];
7659
- const padWidth = 0.5 - 0.15;
7913
+ const padWidth3 = 0.5 - 0.15;
7660
7914
  const padLength = 1.5;
7661
7915
  const pitch = 0.5;
7662
7916
  const halfPitch = pitch / 2;
@@ -7671,7 +7925,7 @@ var m2host = (raw_params) => {
7671
7925
  const padLengthWithOffset = padLength + (isBottomLayer ? 0.25 : 0);
7672
7926
  const rightEdgeOffset = 0.5;
7673
7927
  const x = rightEdgeOffset - padLengthWithOffset / 2;
7674
- const pad2 = rectpad(pn, x, y, padLengthWithOffset, padWidth);
7928
+ const pad2 = rectpad(pn, x, y, padLengthWithOffset, padWidth3);
7675
7929
  pad2.layer = isBottomLayer ? "bottom" : "top";
7676
7930
  pads.push(pad2);
7677
7931
  }
@@ -7754,16 +8008,16 @@ var m2host = (raw_params) => {
7754
8008
  };
7755
8009
 
7756
8010
  // src/fn/to92l.ts
7757
- import { z as z68 } from "zod";
8011
+ import { z as z69 } from "zod";
7758
8012
  var to92l_def = base_def.extend({
7759
- fn: z68.string(),
7760
- num_pins: z68.number().default(3),
7761
- inline: z68.boolean().default(false),
7762
- p: z68.string().default("1.27mm"),
7763
- id: z68.string().default("0.75mm"),
7764
- od: z68.string().default("1.3mm"),
7765
- w: z68.string().default("4.8mm"),
7766
- h: z68.string().default("4.0mm")
8013
+ fn: z69.string(),
8014
+ num_pins: z69.number().default(3),
8015
+ inline: z69.boolean().default(false),
8016
+ p: z69.string().default("1.27mm"),
8017
+ id: z69.string().default("0.75mm"),
8018
+ od: z69.string().default("1.3mm"),
8019
+ w: z69.string().default("4.8mm"),
8020
+ h: z69.string().default("4.0mm")
7767
8021
  });
7768
8022
  var to92l = (raw_params) => {
7769
8023
  const parameters = to92l_def.parse(raw_params);