@tscircuit/footprinter 0.0.296 → 0.0.298

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
@@ -502,14 +502,13 @@ var passive = (params) => {
502
502
  silkscreenLine,
503
503
  silkscreenRefText
504
504
  ];
505
- } else {
506
- return [
507
- rectpad(["1", "left"], -p / 2, 0, pw, ph),
508
- rectpad(["2", "right"], p / 2, 0, pw, ph),
509
- silkscreenLine,
510
- silkscreenRefText
511
- ];
512
505
  }
506
+ return [
507
+ rectpad(["1", "left"], -p / 2, 0, pw, ph),
508
+ rectpad(["2", "right"], p / 2, 0, pw, ph),
509
+ silkscreenLine,
510
+ silkscreenRefText
511
+ ];
513
512
  };
514
513
 
515
514
  // src/fn/diode.ts
@@ -527,6 +526,9 @@ var led = (parameters) => {
527
526
  return { circuitJson: passive(parameters), parameters };
528
527
  };
529
528
 
529
+ // src/helpers/res0402-array2.ts
530
+ import { length as length2 } from "circuit-json";
531
+
530
532
  // src/helpers/chipArray.ts
531
533
  var chipArray = (params) => {
532
534
  const { padSpacing: padSpacing7, padWidth, padHeight, padPitch, numRows, textbottom } = params;
@@ -603,9 +605,9 @@ var chipArray = (params) => {
603
605
  import { z as z4 } from "zod";
604
606
  import mm4 from "@tscircuit/mm";
605
607
  var res0402Array2_def = base_def.extend({
606
- pw: z4.string().default("0.5mm"),
607
- ph: z4.string().default("0.4mm"),
608
- p: z4.string().default("0.7mm"),
608
+ pw: length2.default("0.5mm"),
609
+ ph: length2.default("0.4mm"),
610
+ p: length2.default("0.7mm"),
609
611
  textbottom: z4.boolean().optional(),
610
612
  convex: z4.boolean().optional(),
611
613
  concave: z4.boolean().optional()
@@ -632,12 +634,13 @@ var res0402Array2 = (rawParams) => {
632
634
  };
633
635
 
634
636
  // src/helpers/res0402-array4.ts
637
+ import { length as length3 } from "circuit-json";
635
638
  import { z as z5 } from "zod";
636
639
  import mm5 from "@tscircuit/mm";
637
640
  var res0402Array4_def = base_def.extend({
638
- pw: z5.string().default("0.5mm"),
639
- ph: z5.string().default("0.32mm"),
640
- p: z5.string().default("0.5mm"),
641
+ pw: length3.default("0.5mm"),
642
+ ph: length3.default("0.32mm"),
643
+ p: length3.default("0.5mm"),
641
644
  textbottom: z5.boolean().optional(),
642
645
  convex: z5.boolean().optional(),
643
646
  concave: z5.boolean().optional()
@@ -661,12 +664,13 @@ var res0402Array4 = (rawParams) => {
661
664
  };
662
665
 
663
666
  // src/helpers/res0603-array2.ts
667
+ import { length as length4 } from "circuit-json";
664
668
  import { z as z6 } from "zod";
665
669
  import mm6 from "@tscircuit/mm";
666
670
  var res0603Array2_def = base_def.extend({
667
- pw: z6.string().default("0.9mm"),
668
- ph: z6.string().default("0.4mm"),
669
- p: z6.string().default("0.8mm"),
671
+ pw: length4.default("0.9mm"),
672
+ ph: length4.default("0.4mm"),
673
+ p: length4.default("0.8mm"),
670
674
  textbottom: z6.boolean().optional(),
671
675
  convex: z6.boolean().optional(),
672
676
  concave: z6.boolean().optional()
@@ -690,12 +694,13 @@ var res0603Array2 = (rawParams) => {
690
694
  };
691
695
 
692
696
  // src/helpers/res0603-array4.ts
697
+ import { length as length5 } from "circuit-json";
693
698
  import { z as z7 } from "zod";
694
699
  import mm7 from "@tscircuit/mm";
695
700
  var res0603Array4_def = base_def.extend({
696
- pw: z7.string().default("0.9mm"),
697
- ph: z7.string().default("0.4mm"),
698
- p: z7.string().default("0.8mm"),
701
+ pw: length5.default("0.9mm"),
702
+ ph: length5.default("0.4mm"),
703
+ p: length5.default("0.8mm"),
699
704
  textbottom: z7.boolean().optional(),
700
705
  convex: z7.boolean().optional(),
701
706
  concave: z7.boolean().optional()
@@ -719,12 +724,13 @@ var res0603Array4 = (rawParams) => {
719
724
  };
720
725
 
721
726
  // src/helpers/res0606-array2.ts
727
+ import { length as length6 } from "circuit-json";
722
728
  import { z as z8 } from "zod";
723
729
  import mm8 from "@tscircuit/mm";
724
730
  var res0606Array2_def = base_def.extend({
725
- pw: z8.string().default("0.7mm"),
726
- ph: z8.string().default("0.64mm"),
727
- p: z8.string().default("0.94mm"),
731
+ pw: length6.default("0.7mm"),
732
+ ph: length6.default("0.64mm"),
733
+ p: length6.default("0.94mm"),
728
734
  textbottom: z8.boolean().optional(),
729
735
  convex: z8.boolean().optional(),
730
736
  concave: z8.boolean().optional()
@@ -748,12 +754,13 @@ var res0606Array2 = (rawParams) => {
748
754
  };
749
755
 
750
756
  // src/helpers/res1206-array4.ts
757
+ import { length as length7 } from "circuit-json";
751
758
  import { z as z9 } from "zod";
752
759
  import mm9 from "@tscircuit/mm";
753
760
  var res1206Array4_def = base_def.extend({
754
- pw: z9.string().default("0.9mm"),
755
- ph: z9.string().default("0.9mm"),
756
- p: z9.string().default("1.34mm"),
761
+ pw: length7.default("0.9mm"),
762
+ ph: length7.default("0.9mm"),
763
+ p: length7.default("1.34mm"),
757
764
  textbottom: z9.boolean().optional(),
758
765
  convex: z9.boolean().optional(),
759
766
  concave: z9.boolean().optional()
@@ -861,7 +868,7 @@ var ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
861
868
 
862
869
  // src/fn/bga.ts
863
870
  import { z as z12 } from "zod";
864
- import { length as length2, distance as distance2 } from "circuit-json";
871
+ import { length as length8, distance as distance2 } from "circuit-json";
865
872
 
866
873
  // src/helpers/zod/dim-2d.ts
867
874
  import { z as z10 } from "zod";
@@ -898,10 +905,10 @@ var bga_def = base_def.extend({
898
905
  num_pins: z12.number().optional().default(64),
899
906
  grid: dim2d.optional(),
900
907
  p: distance2.default("0.8mm"),
901
- w: length2.optional(),
902
- h: length2.optional(),
903
- ball: length2.optional().describe("ball diameter"),
904
- pad: length2.optional().describe("pad width/height"),
908
+ w: length8.optional(),
909
+ h: length8.optional(),
910
+ ball: length8.optional().describe("ball diameter"),
911
+ pad: length8.optional().describe("pad width/height"),
905
912
  circularpads: z12.boolean().optional().describe("use circular pads"),
906
913
  tlorigin: z12.boolean().optional(),
907
914
  blorigin: z12.boolean().optional(),
@@ -1077,7 +1084,7 @@ var bga = (raw_params) => {
1077
1084
 
1078
1085
  // src/fn/soic.ts
1079
1086
  import { z as z13 } from "zod";
1080
- import { length as length3 } from "circuit-json";
1087
+ import { length as length9 } from "circuit-json";
1081
1088
 
1082
1089
  // src/helpers/pillpad.ts
1083
1090
  var pillpad = (pn, x, y, w, h) => {
@@ -1099,17 +1106,17 @@ var pillpad = (pn, x, y, w, h) => {
1099
1106
  var extendSoicDef = (newDefaults) => base_def.extend({
1100
1107
  fn: z13.string(),
1101
1108
  num_pins: z13.number().optional().default(8),
1102
- w: length3.default(length3.parse(newDefaults.w ?? "5.3mm")),
1103
- p: length3.default(length3.parse(newDefaults.p ?? "1.27mm")),
1104
- pw: length3.default(length3.parse(newDefaults.pw ?? "0.6mm")),
1105
- pl: length3.default(length3.parse(newDefaults.pl ?? "1.0mm")),
1109
+ w: length9.default(length9.parse(newDefaults.w ?? "5.3mm")),
1110
+ p: length9.default(length9.parse(newDefaults.p ?? "1.27mm")),
1111
+ pw: length9.default(length9.parse(newDefaults.pw ?? "0.6mm")),
1112
+ pl: length9.default(length9.parse(newDefaults.pl ?? "1.0mm")),
1106
1113
  legsoutside: z13.boolean().optional().default(newDefaults.legsoutside ?? false),
1107
1114
  pillpads: z13.boolean().optional().default(newDefaults.pillpads ?? false),
1108
1115
  silkscreen_stroke_width: z13.number().optional().default(0.1)
1109
1116
  }).transform((v) => {
1110
1117
  if (!v.pw && !v.pl) {
1111
- v.pw = length3.parse("0.6mm");
1112
- v.pl = length3.parse("1.0mm");
1118
+ v.pw = length9.parse("0.6mm");
1119
+ v.pl = length9.parse("1.0mm");
1113
1120
  } else if (!v.pw) {
1114
1121
  v.pw = v.pl * (0.6 / 1);
1115
1122
  } else if (!v.pl) {
@@ -1190,7 +1197,7 @@ var soicWithoutParsing = (parameters) => {
1190
1197
 
1191
1198
  // src/fn/quad.ts
1192
1199
  import { z as z15 } from "zod";
1193
- import { length as length4 } from "circuit-json";
1200
+ import { length as length10 } from "circuit-json";
1194
1201
 
1195
1202
  // src/helpers/zod/pin-order-specifier.ts
1196
1203
  import { z as z14 } from "zod";
@@ -1275,11 +1282,11 @@ var base_quad_def = base_def.extend({
1275
1282
  ccw: z15.boolean().default(true).optional(),
1276
1283
  startingpin: z15.string().or(z15.array(pin_order_specifier)).transform((a) => typeof a === "string" ? a.slice(1, -1).split(",") : a).pipe(z15.array(pin_order_specifier)).optional(),
1277
1284
  num_pins: z15.number().optional().default(64),
1278
- w: length4.optional(),
1279
- h: length4.optional(),
1280
- p: length4.default(length4.parse("0.5mm")),
1281
- pw: length4.optional(),
1282
- pl: length4.optional(),
1285
+ w: length10.optional(),
1286
+ h: length10.optional(),
1287
+ p: length10.default(length10.parse("0.5mm")),
1288
+ pw: length10.optional(),
1289
+ pl: length10.optional(),
1283
1290
  thermalpad: z15.union([z15.literal(true), dim2d]).optional(),
1284
1291
  legsoutside: z15.boolean().default(false)
1285
1292
  });
@@ -1686,7 +1693,7 @@ var tssop = (raw_params) => {
1686
1693
 
1687
1694
  // src/fn/sot363.ts
1688
1695
  import { z as z16 } from "zod";
1689
- import { length as length5 } from "circuit-json";
1696
+ import { length as length11 } from "circuit-json";
1690
1697
  var sot363_def = base_def.extend({
1691
1698
  fn: z16.string(),
1692
1699
  num_pins: z16.literal(6).default(6),
@@ -1699,11 +1706,11 @@ var sot363_def = base_def.extend({
1699
1706
  });
1700
1707
  var sot363 = (raw_params) => {
1701
1708
  const parameters = sot363_def.parse({ ...raw_params, fn: "sot363" });
1702
- const w = length5.parse(parameters.w);
1703
- const h = length5.parse(parameters.h);
1704
- const p = length5.parse(parameters.p);
1705
- const pl = length5.parse(parameters.pl);
1706
- const pw = length5.parse(parameters.pw);
1709
+ const w = length11.parse(parameters.w);
1710
+ const h = length11.parse(parameters.h);
1711
+ const p = length11.parse(parameters.p);
1712
+ const pl = length11.parse(parameters.pl);
1713
+ const pw = length11.parse(parameters.pw);
1707
1714
  const pads = [];
1708
1715
  for (let i = 0; i < 6; i++) {
1709
1716
  const { x, y } = getSot363PadCoord(i + 1, w, p, pl);
@@ -1767,7 +1774,7 @@ var getSot363PadCoord = (pn, w, p, pl) => {
1767
1774
 
1768
1775
  // src/fn/sot886.ts
1769
1776
  import { z as z17 } from "zod";
1770
- import { length as length6 } from "circuit-json";
1777
+ import { length as length12 } from "circuit-json";
1771
1778
  var sot886_def = base_def.extend({
1772
1779
  fn: z17.string(),
1773
1780
  num_pins: z17.literal(6).default(6),
@@ -1780,11 +1787,11 @@ var sot886_def = base_def.extend({
1780
1787
  });
1781
1788
  var sot886 = (raw_params) => {
1782
1789
  const parameters = sot886_def.parse({ ...raw_params, fn: "sot886" });
1783
- const w = length6.parse(parameters.w);
1784
- const h = length6.parse(parameters.h);
1785
- const p = length6.parse(parameters.p);
1786
- const pl = length6.parse(parameters.pl);
1787
- const pw = length6.parse(parameters.pw);
1790
+ const w = length12.parse(parameters.w);
1791
+ const h = length12.parse(parameters.h);
1792
+ const p = length12.parse(parameters.p);
1793
+ const pl = length12.parse(parameters.pl);
1794
+ const pw = length12.parse(parameters.pw);
1788
1795
  const pads = [];
1789
1796
  for (let i = 0; i < 6; i++) {
1790
1797
  const { x, y } = getSot886PadCoord(i + 1, w, p, pl);
@@ -2147,7 +2154,7 @@ var dfn = (raw_params) => {
2147
2154
 
2148
2155
  // src/fn/pinrow.ts
2149
2156
  import { z as z21 } from "zod";
2150
- import { length as length7 } from "circuit-json";
2157
+ import { length as length13 } from "circuit-json";
2151
2158
 
2152
2159
  // src/helpers/silkscreenPin.ts
2153
2160
  var silkscreenPin = ({
@@ -2237,16 +2244,16 @@ var pinrow_def = base_def.extend({
2237
2244
  fn: z21.string(),
2238
2245
  num_pins: z21.number().optional().default(6),
2239
2246
  rows: z21.union([z21.string(), z21.number()]).transform((val) => Number(val)).optional().default(1).describe("number of rows"),
2240
- p: length7.default("0.1in").describe("pitch"),
2241
- id: length7.default("1.0mm").describe("inner diameter"),
2242
- od: length7.default("1.5mm").describe("outer diameter"),
2247
+ p: length13.default("0.1in").describe("pitch"),
2248
+ id: length13.default("1.0mm").describe("inner diameter"),
2249
+ od: length13.default("1.5mm").describe("outer diameter"),
2243
2250
  male: z21.boolean().optional().describe("for male pin headers"),
2244
2251
  female: z21.boolean().optional().describe("for female pin headers"),
2245
2252
  smd: z21.boolean().optional().describe("surface mount device"),
2246
2253
  surfacemount: z21.boolean().optional().describe("surface mount device (verbose)"),
2247
2254
  rightangle: z21.boolean().optional().describe("right angle"),
2248
- pw: length7.optional().default("1.0mm").describe("pad width for SMD"),
2249
- pl: length7.optional().default("2.0mm").describe("pad length for SMD"),
2255
+ pw: length13.optional().default("1.0mm").describe("pad width for SMD"),
2256
+ pl: length13.optional().default("2.0mm").describe("pad length for SMD"),
2250
2257
  pinlabeltextalignleft: z21.boolean().optional().default(false),
2251
2258
  pinlabeltextaligncenter: z21.boolean().optional().default(false),
2252
2259
  pinlabeltextalignright: z21.boolean().optional().default(false),
@@ -2510,7 +2517,7 @@ var pinrow = (raw_params) => {
2510
2517
 
2511
2518
  // src/fn/sot563.ts
2512
2519
  import { z as z22 } from "zod";
2513
- import { length as length8 } from "circuit-json";
2520
+ import { length as length14 } from "circuit-json";
2514
2521
  var sot563_def = base_def.extend({
2515
2522
  fn: z22.string(),
2516
2523
  num_pins: z22.literal(6).default(6),
@@ -2523,11 +2530,11 @@ var sot563_def = base_def.extend({
2523
2530
  });
2524
2531
  var sot563 = (raw_params) => {
2525
2532
  const parameters = sot563_def.parse({ ...raw_params, fn: "sot563" });
2526
- const w = length8.parse(parameters.w);
2527
- const h = length8.parse(parameters.h);
2528
- const p = length8.parse(parameters.p);
2529
- const pl = length8.parse(parameters.pl);
2530
- const pw = length8.parse(parameters.pw);
2533
+ const w = length14.parse(parameters.w);
2534
+ const h = length14.parse(parameters.h);
2535
+ const p = length14.parse(parameters.p);
2536
+ const pl = length14.parse(parameters.pl);
2537
+ const pw = length14.parse(parameters.pw);
2531
2538
  const pads = [];
2532
2539
  for (let i = 0; i < 6; i++) {
2533
2540
  const { x, y } = getSot563PadCoord(i + 1, w, p, pl);
@@ -2618,7 +2625,7 @@ var ms013 = (raw_params) => {
2618
2625
  };
2619
2626
 
2620
2627
  // src/fn/sot723.ts
2621
- import { length as length9 } from "circuit-json";
2628
+ import { length as length15 } from "circuit-json";
2622
2629
  import { z as z23 } from "zod";
2623
2630
  var sot723_def = base_def.extend({
2624
2631
  fn: z23.string(),
@@ -2634,7 +2641,7 @@ var sot723 = (raw_params) => {
2634
2641
  const pad2 = sot723WithoutParsing(parameters);
2635
2642
  const silkscreenRefText = silkscreenRef(
2636
2643
  0,
2637
- length9.parse(parameters.h),
2644
+ length15.parse(parameters.h),
2638
2645
  0.2
2639
2646
  );
2640
2647
  return {
@@ -2678,7 +2685,7 @@ var sot723WithoutParsing = (parameters) => {
2678
2685
 
2679
2686
  // src/fn/sod123.ts
2680
2687
  import { z as z24 } from "zod";
2681
- import { length as length10 } from "circuit-json";
2688
+ import { length as length16 } from "circuit-json";
2682
2689
  var sod_def = base_def.extend({
2683
2690
  fn: z24.string(),
2684
2691
  num_pins: z24.literal(2).default(2),
@@ -2692,7 +2699,7 @@ var sod123 = (raw_params) => {
2692
2699
  const parameters = sod_def.parse(raw_params);
2693
2700
  const silkscreenRefText = silkscreenRef(
2694
2701
  0,
2695
- length10.parse(parameters.h) / 4 + 0.4,
2702
+ length16.parse(parameters.h) / 4 + 0.4,
2696
2703
  0.3
2697
2704
  );
2698
2705
  return {
@@ -2732,14 +2739,14 @@ var sodWithoutParsing = (parameters) => {
2732
2739
 
2733
2740
  // src/fn/axial.ts
2734
2741
  import {
2735
- length as length11
2742
+ length as length17
2736
2743
  } from "circuit-json";
2737
2744
  import { z as z25 } from "zod";
2738
2745
  var axial_def = base_def.extend({
2739
2746
  fn: z25.string(),
2740
- p: length11.optional().default("2.54mm"),
2741
- id: length11.optional().default("0.7mm"),
2742
- od: length11.optional().default("1.4mm")
2747
+ p: length17.optional().default("2.54mm"),
2748
+ id: length17.optional().default("0.7mm"),
2749
+ od: length17.optional().default("1.4mm")
2743
2750
  });
2744
2751
  var axial = (raw_params) => {
2745
2752
  const parameters = axial_def.parse(raw_params);
@@ -2772,7 +2779,7 @@ var axial = (raw_params) => {
2772
2779
 
2773
2780
  // src/fn/radial.ts
2774
2781
  import {
2775
- length as length12
2782
+ length as length18
2776
2783
  } from "circuit-json";
2777
2784
  import { z as z26 } from "zod";
2778
2785
 
@@ -2806,9 +2813,9 @@ var generateCircleArcs = (centerX, centerY, radius, cut, cutHeight, segmentLengt
2806
2813
  // src/fn/radial.ts
2807
2814
  var radial_def = base_def.extend({
2808
2815
  fn: z26.string(),
2809
- p: length12.optional().default("5mm"),
2810
- id: length12.optional().default("0.8mm"),
2811
- od: length12.optional().default("1.6mm"),
2816
+ p: length18.optional().default("5mm"),
2817
+ id: length18.optional().default("0.8mm"),
2818
+ od: length18.optional().default("1.6mm"),
2812
2819
  ceramic: z26.boolean().optional(),
2813
2820
  electrolytic: z26.boolean().optional(),
2814
2821
  polarized: z26.boolean().optional()
@@ -2908,7 +2915,7 @@ var radial = (raw_params) => {
2908
2915
  };
2909
2916
 
2910
2917
  // src/fn/pushbutton.ts
2911
- import { length as length13 } from "circuit-json";
2918
+ import { length as length19 } from "circuit-json";
2912
2919
  import { z as z27 } from "zod";
2913
2920
 
2914
2921
  // src/helpers/silkscreenpath.ts
@@ -2926,10 +2933,10 @@ var silkscreenpath = (route, options = {}) => {
2926
2933
  // src/fn/pushbutton.ts
2927
2934
  var pushbutton_def = base_def.extend({
2928
2935
  fn: z27.literal("pushbutton"),
2929
- w: length13.default(4.5),
2930
- h: length13.default(6.5),
2931
- id: length13.default(1),
2932
- od: length13.default(1.2)
2936
+ w: length19.default(4.5),
2937
+ h: length19.default(6.5),
2938
+ id: length19.default(1),
2939
+ od: length19.default(1.2)
2933
2940
  });
2934
2941
  var pushbutton = (raw_params) => {
2935
2942
  const parameters = pushbutton_def.parse(raw_params);
@@ -2976,24 +2983,24 @@ var pushbutton = (raw_params) => {
2976
2983
 
2977
2984
  // src/fn/stampboard.ts
2978
2985
  import {
2979
- length as length14
2986
+ length as length20
2980
2987
  } from "circuit-json";
2981
2988
  import { z as z28 } from "zod";
2982
2989
  var stampboard_def = base_def.extend({
2983
2990
  fn: z28.string(),
2984
- w: length14.default("22.58mm"),
2985
- h: length14.optional(),
2986
- left: length14.optional().default(20),
2987
- right: length14.optional().default(20),
2988
- top: length14.optional().default(2),
2989
- bottom: length14.optional().default(2),
2990
- p: length14.default(length14.parse("2.54mm")),
2991
- pw: length14.default(length14.parse("1.6mm")),
2992
- pl: length14.default(length14.parse("2.4mm")),
2991
+ w: length20.default("22.58mm"),
2992
+ h: length20.optional(),
2993
+ left: length20.optional().default(20),
2994
+ right: length20.optional().default(20),
2995
+ top: length20.optional().default(2),
2996
+ bottom: length20.optional().default(2),
2997
+ p: length20.default(length20.parse("2.54mm")),
2998
+ pw: length20.default(length20.parse("1.6mm")),
2999
+ pl: length20.default(length20.parse("2.4mm")),
2993
3000
  innerhole: z28.boolean().default(false),
2994
- innerholeedgedistance: length14.default(length14.parse("1.61mm")),
3001
+ innerholeedgedistance: length20.default(length20.parse("1.61mm")),
2995
3002
  silkscreenlabels: z28.boolean().default(false),
2996
- silkscreenlabelmargin: length14.default(length14.parse("0.1mm"))
3003
+ silkscreenlabelmargin: length20.default(length20.parse("0.1mm"))
2997
3004
  });
2998
3005
  var getHeight = (parameters) => {
2999
3006
  const params = stampboard_def.parse(parameters);
@@ -3402,22 +3409,22 @@ var stampboard = (raw_params) => {
3402
3409
 
3403
3410
  // src/fn/stampreceiver.ts
3404
3411
  import {
3405
- length as length15
3412
+ length as length21
3406
3413
  } from "circuit-json";
3407
3414
  import { z as z29 } from "zod";
3408
3415
  var stampreceiver_def = base_def.extend({
3409
3416
  fn: z29.string(),
3410
- w: length15.default("22.58mm"),
3411
- h: length15.optional(),
3412
- left: length15.optional().default(20),
3413
- right: length15.optional().default(20),
3414
- top: length15.optional().default(2),
3415
- bottom: length15.optional().default(2),
3416
- p: length15.default(length15.parse("2.54mm")),
3417
- pw: length15.default(length15.parse("1.6mm")),
3418
- pl: length15.default(length15.parse("3.2mm")),
3417
+ w: length21.default("22.58mm"),
3418
+ h: length21.optional(),
3419
+ left: length21.optional().default(20),
3420
+ right: length21.optional().default(20),
3421
+ top: length21.optional().default(2),
3422
+ bottom: length21.optional().default(2),
3423
+ p: length21.default(length21.parse("2.54mm")),
3424
+ pw: length21.default(length21.parse("1.6mm")),
3425
+ pl: length21.default(length21.parse("3.2mm")),
3419
3426
  innerhole: z29.boolean().default(false),
3420
- innerholeedgedistance: length15.default(length15.parse("1.61mm"))
3427
+ innerholeedgedistance: length21.default(length21.parse("1.61mm"))
3421
3428
  });
3422
3429
  var getHeight2 = (parameters) => {
3423
3430
  const params = stampreceiver_def.parse(parameters);
@@ -3718,20 +3725,20 @@ var lqfp = (parameters) => {
3718
3725
 
3719
3726
  // src/fn/breakoutheaders.ts
3720
3727
  import {
3721
- length as length16
3728
+ length as length22
3722
3729
  } from "circuit-json";
3723
3730
  import { z as z30 } from "zod";
3724
3731
  var breakoutheaders_def = base_def.extend({
3725
3732
  fn: z30.string(),
3726
- w: length16.default("10mm"),
3727
- h: length16.optional(),
3728
- left: length16.optional().default(20),
3729
- right: length16.optional().default(20),
3730
- top: length16.optional().default(0),
3731
- bottom: length16.optional().default(0),
3732
- p: length16.default(length16.parse("2.54mm")),
3733
- id: length16.optional().default(length16.parse("1mm")),
3734
- od: length16.optional().default(length16.parse("1.5mm"))
3733
+ w: length22.default("10mm"),
3734
+ h: length22.optional(),
3735
+ left: length22.optional().default(20),
3736
+ right: length22.optional().default(20),
3737
+ top: length22.optional().default(0),
3738
+ bottom: length22.optional().default(0),
3739
+ p: length22.default(length22.parse("2.54mm")),
3740
+ id: length22.optional().default(length22.parse("1mm")),
3741
+ od: length22.optional().default(length22.parse("1.5mm"))
3735
3742
  });
3736
3743
  var getHeight3 = (parameters) => {
3737
3744
  const params = breakoutheaders_def.parse(parameters);
@@ -3923,7 +3930,7 @@ var breakoutheaders = (raw_params) => {
3923
3930
 
3924
3931
  // src/fn/hc49.ts
3925
3932
  import {
3926
- length as length17
3933
+ length as length23
3927
3934
  } from "circuit-json";
3928
3935
  import { z as z31 } from "zod";
3929
3936
  var generate_u_curve = (centerX, centerY, radius, direction) => {
@@ -3937,11 +3944,11 @@ var generate_u_curve = (centerX, centerY, radius, direction) => {
3937
3944
  };
3938
3945
  var hc49_def = base_def.extend({
3939
3946
  fn: z31.string(),
3940
- p: length17.optional().default("4.88mm"),
3941
- id: length17.optional().default("0.8mm"),
3942
- od: length17.optional().default("1.5mm"),
3943
- w: length17.optional().default("5.6mm"),
3944
- h: length17.optional().default("3.5mm")
3947
+ p: length23.optional().default("4.88mm"),
3948
+ id: length23.optional().default("0.8mm"),
3949
+ od: length23.optional().default("1.5mm"),
3950
+ w: length23.optional().default("5.6mm"),
3951
+ h: length23.optional().default("3.5mm")
3945
3952
  });
3946
3953
  var hc49 = (raw_params) => {
3947
3954
  const parameters = hc49_def.parse(raw_params);
@@ -3982,11 +3989,11 @@ var hc49 = (raw_params) => {
3982
3989
 
3983
3990
  // src/fn/pad.ts
3984
3991
  import "zod";
3985
- import { length as length18 } from "circuit-json";
3992
+ import { length as length24 } from "circuit-json";
3986
3993
  import { mm as mm11 } from "@tscircuit/mm";
3987
3994
  var pad_def = base_def.extend({
3988
- w: length18,
3989
- h: length18
3995
+ w: length24,
3996
+ h: length24
3990
3997
  });
3991
3998
  var pad = (params) => {
3992
3999
  const { w, h } = params;
@@ -4146,7 +4153,7 @@ var to92 = (raw_params) => {
4146
4153
 
4147
4154
  // src/fn/sod523.ts
4148
4155
  import { z as z34 } from "zod";
4149
- import { length as length19 } from "circuit-json";
4156
+ import { length as length25 } from "circuit-json";
4150
4157
  var sod_def2 = base_def.extend({
4151
4158
  fn: z34.string(),
4152
4159
  num_pins: z34.literal(2).default(2),
@@ -4160,7 +4167,7 @@ var sod523 = (raw_params) => {
4160
4167
  const parameters = sod_def2.parse(raw_params);
4161
4168
  const silkscreenRefText = silkscreenRef(
4162
4169
  0,
4163
- length19.parse(parameters.h),
4170
+ length25.parse(parameters.h),
4164
4171
  0.3
4165
4172
  );
4166
4173
  const silkscreenLine = {
@@ -4169,20 +4176,20 @@ var sod523 = (raw_params) => {
4169
4176
  pcb_component_id: "",
4170
4177
  route: [
4171
4178
  {
4172
- x: length19.parse(parameters.p) / 2,
4173
- y: length19.parse(parameters.h) / 2
4179
+ x: length25.parse(parameters.p) / 2,
4180
+ y: length25.parse(parameters.h) / 2
4174
4181
  },
4175
4182
  {
4176
- x: -length19.parse(parameters.w) / 2 - 0.2,
4177
- y: length19.parse(parameters.h) / 2
4183
+ x: -length25.parse(parameters.w) / 2 - 0.2,
4184
+ y: length25.parse(parameters.h) / 2
4178
4185
  },
4179
4186
  {
4180
- x: -length19.parse(parameters.w) / 2 - 0.2,
4181
- y: -length19.parse(parameters.h) / 2
4187
+ x: -length25.parse(parameters.w) / 2 - 0.2,
4188
+ y: -length25.parse(parameters.h) / 2
4182
4189
  },
4183
4190
  {
4184
- x: length19.parse(parameters.p) / 2,
4185
- y: -length19.parse(parameters.h) / 2
4191
+ x: length25.parse(parameters.p) / 2,
4192
+ y: -length25.parse(parameters.h) / 2
4186
4193
  }
4187
4194
  ],
4188
4195
  stroke_width: 0.1,
@@ -4271,7 +4278,7 @@ var sop8 = (raw_params) => {
4271
4278
 
4272
4279
  // src/fn/sod80.ts
4273
4280
  import { z as z35 } from "zod";
4274
- import { length as length20 } from "circuit-json";
4281
+ import { length as length26 } from "circuit-json";
4275
4282
  var sod80_def = base_def.extend({
4276
4283
  fn: z35.string(),
4277
4284
  num_pins: z35.literal(2).default(2),
@@ -4285,7 +4292,7 @@ var sod80 = (raw_params) => {
4285
4292
  const parameters = sod80_def.parse(raw_params);
4286
4293
  const silkscreenRefText = silkscreenRef(
4287
4294
  0,
4288
- length20.parse(parameters.h) / 2 + 1,
4295
+ length26.parse(parameters.h) / 2 + 1,
4289
4296
  0.3
4290
4297
  );
4291
4298
  const silkscreenLine = {
@@ -4294,20 +4301,20 @@ var sod80 = (raw_params) => {
4294
4301
  pcb_component_id: "",
4295
4302
  route: [
4296
4303
  {
4297
- x: length20.parse(parameters.p) / 2 + 0.5,
4298
- y: length20.parse(parameters.h) / 2 + 0.5
4304
+ x: length26.parse(parameters.p) / 2 + 0.5,
4305
+ y: length26.parse(parameters.h) / 2 + 0.5
4299
4306
  },
4300
4307
  {
4301
- x: -length20.parse(parameters.w) / 2 - 0.5,
4302
- y: length20.parse(parameters.h) / 2 + 0.5
4308
+ x: -length26.parse(parameters.w) / 2 - 0.5,
4309
+ y: length26.parse(parameters.h) / 2 + 0.5
4303
4310
  },
4304
4311
  {
4305
- x: -length20.parse(parameters.w) / 2 - 0.5,
4306
- y: -length20.parse(parameters.h) / 2 - 0.5
4312
+ x: -length26.parse(parameters.w) / 2 - 0.5,
4313
+ y: -length26.parse(parameters.h) / 2 - 0.5
4307
4314
  },
4308
4315
  {
4309
- x: length20.parse(parameters.p) / 2 + 0.5,
4310
- y: -length20.parse(parameters.h) / 2 - 0.5
4316
+ x: length26.parse(parameters.p) / 2 + 0.5,
4317
+ y: -length26.parse(parameters.h) / 2 - 0.5
4311
4318
  }
4312
4319
  ],
4313
4320
  stroke_width: 0.1,
@@ -4347,7 +4354,7 @@ var sod80WithoutParsing = (parameters) => {
4347
4354
 
4348
4355
  // src/fn/sod123w.ts
4349
4356
  import { z as z36 } from "zod";
4350
- import { length as length21 } from "circuit-json";
4357
+ import { length as length27 } from "circuit-json";
4351
4358
  var sod_def3 = base_def.extend({
4352
4359
  fn: z36.string(),
4353
4360
  num_pins: z36.literal(2).default(2),
@@ -4361,7 +4368,7 @@ var sod123w = (raw_params) => {
4361
4368
  const parameters = sod_def3.parse(raw_params);
4362
4369
  const silkscreenRefText = silkscreenRef(
4363
4370
  0,
4364
- length21.parse(parameters.h) - 0.5,
4371
+ length27.parse(parameters.h) - 0.5,
4365
4372
  0.3
4366
4373
  );
4367
4374
  const silkscreenLine = {
@@ -4370,20 +4377,20 @@ var sod123w = (raw_params) => {
4370
4377
  pcb_component_id: "",
4371
4378
  route: [
4372
4379
  {
4373
- x: length21.parse(parameters.p) / 2,
4374
- y: length21.parse(parameters.h) / 2
4380
+ x: length27.parse(parameters.p) / 2,
4381
+ y: length27.parse(parameters.h) / 2
4375
4382
  },
4376
4383
  {
4377
- x: -length21.parse(parameters.w) / 2 - 0.2,
4378
- y: length21.parse(parameters.h) / 2
4384
+ x: -length27.parse(parameters.w) / 2 - 0.2,
4385
+ y: length27.parse(parameters.h) / 2
4379
4386
  },
4380
4387
  {
4381
- x: -length21.parse(parameters.w) / 2 - 0.2,
4382
- y: -length21.parse(parameters.h) / 2
4388
+ x: -length27.parse(parameters.w) / 2 - 0.2,
4389
+ y: -length27.parse(parameters.h) / 2
4383
4390
  },
4384
4391
  {
4385
- x: length21.parse(parameters.p) / 2,
4386
- y: -length21.parse(parameters.h) / 2
4392
+ x: length27.parse(parameters.p) / 2,
4393
+ y: -length27.parse(parameters.h) / 2
4387
4394
  }
4388
4395
  ],
4389
4396
  stroke_width: 0.1,
@@ -4426,7 +4433,7 @@ var sodWithoutParsing3 = (parameters) => {
4426
4433
 
4427
4434
  // src/fn/sod323.ts
4428
4435
  import { z as z37 } from "zod";
4429
- import { length as length22 } from "circuit-json";
4436
+ import { length as length28 } from "circuit-json";
4430
4437
  var sod_def4 = base_def.extend({
4431
4438
  fn: z37.string(),
4432
4439
  num_pins: z37.literal(2).default(2),
@@ -4440,7 +4447,7 @@ var sod323 = (raw_params) => {
4440
4447
  const parameters = sod_def4.parse(raw_params);
4441
4448
  const silkscreenRefText = silkscreenRef(
4442
4449
  0,
4443
- length22.parse(parameters.h) - 0.5,
4450
+ length28.parse(parameters.h) - 0.5,
4444
4451
  0.3
4445
4452
  );
4446
4453
  const silkscreenLine = {
@@ -4449,20 +4456,20 @@ var sod323 = (raw_params) => {
4449
4456
  pcb_component_id: "",
4450
4457
  route: [
4451
4458
  {
4452
- x: length22.parse(parameters.p) / 2,
4453
- y: length22.parse(parameters.h) / 2
4459
+ x: length28.parse(parameters.p) / 2,
4460
+ y: length28.parse(parameters.h) / 2
4454
4461
  },
4455
4462
  {
4456
- x: -length22.parse(parameters.w) / 2,
4457
- y: length22.parse(parameters.h) / 2
4463
+ x: -length28.parse(parameters.w) / 2,
4464
+ y: length28.parse(parameters.h) / 2
4458
4465
  },
4459
4466
  {
4460
- x: -length22.parse(parameters.w) / 2,
4461
- y: -length22.parse(parameters.h) / 2
4467
+ x: -length28.parse(parameters.w) / 2,
4468
+ y: -length28.parse(parameters.h) / 2
4462
4469
  },
4463
4470
  {
4464
- x: length22.parse(parameters.p) / 2,
4465
- y: -length22.parse(parameters.h) / 2
4471
+ x: length28.parse(parameters.p) / 2,
4472
+ y: -length28.parse(parameters.h) / 2
4466
4473
  }
4467
4474
  ],
4468
4475
  stroke_width: 0.1,
@@ -4505,7 +4512,7 @@ var sodWithoutParsing4 = (parameters) => {
4505
4512
 
4506
4513
  // src/fn/sod923.ts
4507
4514
  import { z as z38 } from "zod";
4508
- import { length as length23 } from "circuit-json";
4515
+ import { length as length29 } from "circuit-json";
4509
4516
  var sod_def5 = base_def.extend({
4510
4517
  fn: z38.string(),
4511
4518
  num_pins: z38.literal(2).default(2),
@@ -4519,7 +4526,7 @@ var sod923 = (raw_params) => {
4519
4526
  const parameters = sod_def5.parse(raw_params);
4520
4527
  const silkscreenRefText = silkscreenRef(
4521
4528
  0,
4522
- length23.parse(parameters.h),
4529
+ length29.parse(parameters.h),
4523
4530
  0.3
4524
4531
  );
4525
4532
  const silkscreenLine = {
@@ -4528,20 +4535,20 @@ var sod923 = (raw_params) => {
4528
4535
  pcb_component_id: "",
4529
4536
  route: [
4530
4537
  {
4531
- x: length23.parse(parameters.p) / 2 + 0.15,
4532
- y: length23.parse(parameters.h) / 2
4538
+ x: length29.parse(parameters.p) / 2 + 0.15,
4539
+ y: length29.parse(parameters.h) / 2
4533
4540
  },
4534
4541
  {
4535
- x: -length23.parse(parameters.w) / 2 - 0.15,
4536
- y: length23.parse(parameters.h) / 2
4542
+ x: -length29.parse(parameters.w) / 2 - 0.15,
4543
+ y: length29.parse(parameters.h) / 2
4537
4544
  },
4538
4545
  {
4539
- x: -length23.parse(parameters.w) / 2 - 0.15,
4540
- y: -length23.parse(parameters.h) / 2
4546
+ x: -length29.parse(parameters.w) / 2 - 0.15,
4547
+ y: -length29.parse(parameters.h) / 2
4541
4548
  },
4542
4549
  {
4543
- x: length23.parse(parameters.p) / 2 + 0.15,
4544
- y: -length23.parse(parameters.h) / 2
4550
+ x: length29.parse(parameters.p) / 2 + 0.15,
4551
+ y: -length29.parse(parameters.h) / 2
4545
4552
  }
4546
4553
  ],
4547
4554
  stroke_width: 0.1,
@@ -4585,7 +4592,7 @@ var sodWithoutParsing5 = (parameters) => {
4585
4592
 
4586
4593
  // src/fn/sod882.ts
4587
4594
  import { z as z39 } from "zod";
4588
- import { length as length24 } from "circuit-json";
4595
+ import { length as length30 } from "circuit-json";
4589
4596
  var sod_def6 = base_def.extend({
4590
4597
  fn: z39.string(),
4591
4598
  num_pins: z39.literal(2).default(2),
@@ -4599,7 +4606,7 @@ var sod882 = (raw_params) => {
4599
4606
  const parameters = sod_def6.parse(raw_params);
4600
4607
  const silkscreenRefText = silkscreenRef(
4601
4608
  0,
4602
- length24.parse(parameters.h) + 0.1,
4609
+ length30.parse(parameters.h) + 0.1,
4603
4610
  0.3
4604
4611
  );
4605
4612
  const silkscreenLine = {
@@ -4608,20 +4615,20 @@ var sod882 = (raw_params) => {
4608
4615
  pcb_component_id: "",
4609
4616
  route: [
4610
4617
  {
4611
- x: length24.parse(parameters.p) / 2 + 0.2,
4612
- y: length24.parse(parameters.h) / 2 + 0.2
4618
+ x: length30.parse(parameters.p) / 2 + 0.2,
4619
+ y: length30.parse(parameters.h) / 2 + 0.2
4613
4620
  },
4614
4621
  {
4615
- x: -length24.parse(parameters.w) / 2 - 0.2,
4616
- y: length24.parse(parameters.h) / 2 + 0.2
4622
+ x: -length30.parse(parameters.w) / 2 - 0.2,
4623
+ y: length30.parse(parameters.h) / 2 + 0.2
4617
4624
  },
4618
4625
  {
4619
- x: -length24.parse(parameters.w) / 2 - 0.2,
4620
- y: -length24.parse(parameters.h) / 2 - 0.2
4626
+ x: -length30.parse(parameters.w) / 2 - 0.2,
4627
+ y: -length30.parse(parameters.h) / 2 - 0.2
4621
4628
  },
4622
4629
  {
4623
- x: length24.parse(parameters.p) / 2 + 0.2,
4624
- y: -length24.parse(parameters.h) / 2 - 0.2
4630
+ x: length30.parse(parameters.p) / 2 + 0.2,
4631
+ y: -length30.parse(parameters.h) / 2 - 0.2
4625
4632
  }
4626
4633
  ],
4627
4634
  stroke_width: 0.1,
@@ -4665,7 +4672,7 @@ var sodWithoutParsing6 = (parameters) => {
4665
4672
 
4666
4673
  // src/fn/sod323f.ts
4667
4674
  import { z as z40 } from "zod";
4668
- import { length as length25 } from "circuit-json";
4675
+ import { length as length31 } from "circuit-json";
4669
4676
  var sod_def7 = base_def.extend({
4670
4677
  fn: z40.string(),
4671
4678
  num_pins: z40.literal(2).default(2),
@@ -4679,7 +4686,7 @@ var sod323f = (raw_params) => {
4679
4686
  const parameters = sod_def7.parse(raw_params);
4680
4687
  const silkscreenRefText = silkscreenRef(
4681
4688
  0,
4682
- length25.parse(parameters.h),
4689
+ length31.parse(parameters.h),
4683
4690
  0.3
4684
4691
  );
4685
4692
  const silkscreenLine = {
@@ -4688,20 +4695,20 @@ var sod323f = (raw_params) => {
4688
4695
  pcb_component_id: "",
4689
4696
  route: [
4690
4697
  {
4691
- x: length25.parse(parameters.pad_spacing) / 2,
4692
- y: length25.parse(parameters.h) / 2
4698
+ x: length31.parse(parameters.pad_spacing) / 2,
4699
+ y: length31.parse(parameters.h) / 2
4693
4700
  },
4694
4701
  {
4695
- x: -length25.parse(parameters.w) / 2 - 0.2,
4696
- y: length25.parse(parameters.h) / 2
4702
+ x: -length31.parse(parameters.w) / 2 - 0.2,
4703
+ y: length31.parse(parameters.h) / 2
4697
4704
  },
4698
4705
  {
4699
- x: -length25.parse(parameters.w) / 2 - 0.2,
4700
- y: -length25.parse(parameters.h) / 2
4706
+ x: -length31.parse(parameters.w) / 2 - 0.2,
4707
+ y: -length31.parse(parameters.h) / 2
4701
4708
  },
4702
4709
  {
4703
- x: length25.parse(parameters.pad_spacing) / 2,
4704
- y: -length25.parse(parameters.h) / 2
4710
+ x: length31.parse(parameters.pad_spacing) / 2,
4711
+ y: -length31.parse(parameters.h) / 2
4705
4712
  }
4706
4713
  ],
4707
4714
  stroke_width: 0.1,
@@ -4745,7 +4752,7 @@ var sodWithoutParsing7 = (parameters) => {
4745
4752
 
4746
4753
  // src/fn/sod123f.ts
4747
4754
  import { z as z41 } from "zod";
4748
- import { length as length26 } from "circuit-json";
4755
+ import { length as length32 } from "circuit-json";
4749
4756
  var sod_def8 = base_def.extend({
4750
4757
  fn: z41.string(),
4751
4758
  num_pins: z41.literal(2).default(2),
@@ -4759,7 +4766,7 @@ var sod123f = (raw_params) => {
4759
4766
  const parameters = sod_def8.parse(raw_params);
4760
4767
  const silkscreenRefText = silkscreenRef(
4761
4768
  0,
4762
- length26.parse(parameters.h),
4769
+ length32.parse(parameters.h),
4763
4770
  0.3
4764
4771
  );
4765
4772
  const silkscreenLine = {
@@ -4768,20 +4775,20 @@ var sod123f = (raw_params) => {
4768
4775
  pcb_component_id: "",
4769
4776
  route: [
4770
4777
  {
4771
- x: length26.parse(parameters.p) / 2,
4772
- y: length26.parse(parameters.h) / 2
4778
+ x: length32.parse(parameters.p) / 2,
4779
+ y: length32.parse(parameters.h) / 2
4773
4780
  },
4774
4781
  {
4775
- x: -length26.parse(parameters.w) / 2 - 0.2,
4776
- y: length26.parse(parameters.h) / 2
4782
+ x: -length32.parse(parameters.w) / 2 - 0.2,
4783
+ y: length32.parse(parameters.h) / 2
4777
4784
  },
4778
4785
  {
4779
- x: -length26.parse(parameters.w) / 2 - 0.2,
4780
- y: -length26.parse(parameters.h) / 2
4786
+ x: -length32.parse(parameters.w) / 2 - 0.2,
4787
+ y: -length32.parse(parameters.h) / 2
4781
4788
  },
4782
4789
  {
4783
- x: length26.parse(parameters.p) / 2,
4784
- y: -length26.parse(parameters.h) / 2
4790
+ x: length32.parse(parameters.p) / 2,
4791
+ y: -length32.parse(parameters.h) / 2
4785
4792
  }
4786
4793
  ],
4787
4794
  stroke_width: 0.1,
@@ -4825,7 +4832,7 @@ var sodWithoutParsing8 = (parameters) => {
4825
4832
 
4826
4833
  // src/fn/sod123fl.ts
4827
4834
  import { z as z42 } from "zod";
4828
- import { length as length27 } from "circuit-json";
4835
+ import { length as length33 } from "circuit-json";
4829
4836
  var sod123FL_def = base_def.extend({
4830
4837
  fn: z42.string(),
4831
4838
  num_pins: z42.literal(2).default(2),
@@ -4839,7 +4846,7 @@ var sod123fl = (raw_params) => {
4839
4846
  const parameters = sod123FL_def.parse(raw_params);
4840
4847
  const silkscreenRefText = silkscreenRef(
4841
4848
  0,
4842
- length27.parse(parameters.h),
4849
+ length33.parse(parameters.h),
4843
4850
  0.3
4844
4851
  );
4845
4852
  const silkscreenLine = {
@@ -4848,20 +4855,20 @@ var sod123fl = (raw_params) => {
4848
4855
  pcb_component_id: "",
4849
4856
  route: [
4850
4857
  {
4851
- x: length27.parse(parameters.p) / 2,
4852
- y: length27.parse(parameters.h) / 2
4858
+ x: length33.parse(parameters.p) / 2,
4859
+ y: length33.parse(parameters.h) / 2
4853
4860
  },
4854
4861
  {
4855
- x: -length27.parse(parameters.w) / 2 - 0.2,
4856
- y: length27.parse(parameters.h) / 2
4862
+ x: -length33.parse(parameters.w) / 2 - 0.2,
4863
+ y: length33.parse(parameters.h) / 2
4857
4864
  },
4858
4865
  {
4859
- x: -length27.parse(parameters.w) / 2 - 0.2,
4860
- y: -length27.parse(parameters.h) / 2
4866
+ x: -length33.parse(parameters.w) / 2 - 0.2,
4867
+ y: -length33.parse(parameters.h) / 2
4861
4868
  },
4862
4869
  {
4863
- x: length27.parse(parameters.p) / 2,
4864
- y: -length27.parse(parameters.h) / 2
4870
+ x: length33.parse(parameters.p) / 2,
4871
+ y: -length33.parse(parameters.h) / 2
4865
4872
  }
4866
4873
  ],
4867
4874
  stroke_width: 0.1,
@@ -4905,7 +4912,7 @@ var sodWithoutParsing9 = (parameters) => {
4905
4912
 
4906
4913
  // src/fn/sod723.ts
4907
4914
  import { z as z43 } from "zod";
4908
- import { length as length28 } from "circuit-json";
4915
+ import { length as length34 } from "circuit-json";
4909
4916
  var sod_def9 = base_def.extend({
4910
4917
  fn: z43.string(),
4911
4918
  num_pins: z43.literal(2).default(2),
@@ -4919,7 +4926,7 @@ var sod723 = (raw_params) => {
4919
4926
  const parameters = sod_def9.parse(raw_params);
4920
4927
  const silkscreenRefText = silkscreenRef(
4921
4928
  0,
4922
- length28.parse(parameters.h),
4929
+ length34.parse(parameters.h),
4923
4930
  0.3
4924
4931
  );
4925
4932
  const silkscreenLine = {
@@ -4928,20 +4935,20 @@ var sod723 = (raw_params) => {
4928
4935
  pcb_component_id: "",
4929
4936
  route: [
4930
4937
  {
4931
- x: length28.parse(parameters.p) / 2,
4932
- y: length28.parse(parameters.h) / 2
4938
+ x: length34.parse(parameters.p) / 2,
4939
+ y: length34.parse(parameters.h) / 2
4933
4940
  },
4934
4941
  {
4935
- x: -length28.parse(parameters.w) / 2 - 0.1,
4936
- y: length28.parse(parameters.h) / 2
4942
+ x: -length34.parse(parameters.w) / 2 - 0.1,
4943
+ y: length34.parse(parameters.h) / 2
4937
4944
  },
4938
4945
  {
4939
- x: -length28.parse(parameters.w) / 2 - 0.1,
4940
- y: -length28.parse(parameters.h) / 2
4946
+ x: -length34.parse(parameters.w) / 2 - 0.1,
4947
+ y: -length34.parse(parameters.h) / 2
4941
4948
  },
4942
4949
  {
4943
- x: length28.parse(parameters.p) / 2,
4944
- y: -length28.parse(parameters.h) / 2
4950
+ x: length34.parse(parameters.p) / 2,
4951
+ y: -length34.parse(parameters.h) / 2
4945
4952
  }
4946
4953
  ],
4947
4954
  stroke_width: 0.1,
@@ -4985,7 +4992,7 @@ var sodWithoutParsing10 = (parameters) => {
4985
4992
 
4986
4993
  // src/fn/sod128.ts
4987
4994
  import { z as z44 } from "zod";
4988
- import { length as length29 } from "circuit-json";
4995
+ import { length as length35 } from "circuit-json";
4989
4996
  var sod_def10 = base_def.extend({
4990
4997
  fn: z44.string(),
4991
4998
  num_pins: z44.literal(2).default(2),
@@ -4999,7 +5006,7 @@ var sod128 = (raw_params) => {
4999
5006
  const parameters = sod_def10.parse(raw_params);
5000
5007
  const silkscreenRefText = silkscreenRef(
5001
5008
  0,
5002
- length29.parse(parameters.h) / 2 + 0.4,
5009
+ length35.parse(parameters.h) / 2 + 0.4,
5003
5010
  0.3
5004
5011
  );
5005
5012
  const silkscreenLine = {
@@ -5008,20 +5015,20 @@ var sod128 = (raw_params) => {
5008
5015
  pcb_component_id: "",
5009
5016
  route: [
5010
5017
  {
5011
- x: length29.parse(parameters.p) / 2,
5012
- y: length29.parse(parameters.h) / 2
5018
+ x: length35.parse(parameters.p) / 2,
5019
+ y: length35.parse(parameters.h) / 2
5013
5020
  },
5014
5021
  {
5015
- x: -length29.parse(parameters.w) / 2 - 0.2,
5016
- y: length29.parse(parameters.h) / 2
5022
+ x: -length35.parse(parameters.w) / 2 - 0.2,
5023
+ y: length35.parse(parameters.h) / 2
5017
5024
  },
5018
5025
  {
5019
- x: -length29.parse(parameters.w) / 2 - 0.2,
5020
- y: -length29.parse(parameters.h) / 2
5026
+ x: -length35.parse(parameters.w) / 2 - 0.2,
5027
+ y: -length35.parse(parameters.h) / 2
5021
5028
  },
5022
5029
  {
5023
- x: length29.parse(parameters.p) / 2,
5024
- y: -length29.parse(parameters.h) / 2
5030
+ x: length35.parse(parameters.p) / 2,
5031
+ y: -length35.parse(parameters.h) / 2
5025
5032
  }
5026
5033
  ],
5027
5034
  stroke_width: 0.1,
@@ -5079,14 +5086,14 @@ var sot89_3 = (parameters) => {
5079
5086
  const pads = [];
5080
5087
  const padGap = Number.parseFloat(parameters.p);
5081
5088
  const padWidth = Number.parseFloat(parameters.pw);
5082
- const length52 = Number.parseFloat(parameters.w);
5089
+ const length58 = Number.parseFloat(parameters.w);
5083
5090
  const padHeight = Number.parseFloat(parameters.pl);
5084
5091
  const centerExtra = 0.175;
5085
5092
  const outerPadXShift = (padHeight - (padHeight + centerExtra)) / 2;
5086
5093
  pads.push(
5087
- rectpad(1, -length52 / 2 + outerPadXShift, padGap, padHeight, padWidth),
5088
- rectpad(2, -length52 / 2, 0, padHeight + centerExtra, padWidth),
5089
- rectpad(3, -length52 / 2 + outerPadXShift, -padGap, padHeight, padWidth)
5094
+ rectpad(1, -length58 / 2 + outerPadXShift, padGap, padHeight, padWidth),
5095
+ rectpad(2, -length58 / 2, 0, padHeight + centerExtra, padWidth),
5096
+ rectpad(3, -length58 / 2 + outerPadXShift, -padGap, padHeight, padWidth)
5090
5097
  );
5091
5098
  const silkscreenRefText = silkscreenRef(0, 0, 0.3);
5092
5099
  const width = Number.parseFloat(parameters.w) / 2 - 1;
@@ -5126,7 +5133,7 @@ var sot89_5 = (parameters) => {
5126
5133
  const pads = [];
5127
5134
  const padGap = Number.parseFloat(parameters.p);
5128
5135
  const padWidth = Number.parseFloat(parameters.pw);
5129
- const length52 = Number.parseFloat(parameters.w);
5136
+ const length58 = Number.parseFloat(parameters.w);
5130
5137
  pads.push(
5131
5138
  rectpad(1, -1.85, -1.5, 1.5, 0.7),
5132
5139
  rectpad(2, -1.85, 1.5, 1.5, 0.7),
@@ -5194,16 +5201,16 @@ var sot89 = (raw_params) => {
5194
5201
 
5195
5202
  // src/fn/to220.ts
5196
5203
  import {
5197
- length as length30
5204
+ length as length36
5198
5205
  } from "circuit-json";
5199
5206
  import { z as z46 } from "zod";
5200
5207
  var to220_def = base_def.extend({
5201
5208
  fn: z46.string(),
5202
- p: length30.optional().default("5.0mm"),
5203
- id: length30.optional().default("1.0mm"),
5204
- od: length30.optional().default("1.9mm"),
5205
- w: length30.optional().default("13mm"),
5206
- h: length30.optional().default("7mm"),
5209
+ p: length36.optional().default("5.0mm"),
5210
+ id: length36.optional().default("1.0mm"),
5211
+ od: length36.optional().default("1.9mm"),
5212
+ w: length36.optional().default("13mm"),
5213
+ h: length36.optional().default("7mm"),
5207
5214
  num_pins: z46.number().optional(),
5208
5215
  string: z46.string().optional()
5209
5216
  });
@@ -5286,7 +5293,7 @@ var to220 = (raw_params) => {
5286
5293
 
5287
5294
  // src/fn/minimelf.ts
5288
5295
  import { z as z47 } from "zod";
5289
- import { length as length31 } from "circuit-json";
5296
+ import { length as length37 } from "circuit-json";
5290
5297
  var minimelf_def = base_def.extend({
5291
5298
  fn: z47.string(),
5292
5299
  num_pins: z47.literal(2).default(2),
@@ -5300,7 +5307,7 @@ var minimelf = (raw_params) => {
5300
5307
  const parameters = minimelf_def.parse(raw_params);
5301
5308
  const silkscreenRefText = silkscreenRef(
5302
5309
  0,
5303
- length31.parse(parameters.h) / 2 + 0.4,
5310
+ length37.parse(parameters.h) / 2 + 0.4,
5304
5311
  0.3
5305
5312
  );
5306
5313
  const silkscreenLine = {
@@ -5309,20 +5316,20 @@ var minimelf = (raw_params) => {
5309
5316
  pcb_component_id: "",
5310
5317
  route: [
5311
5318
  {
5312
- x: length31.parse(parameters.p) / 2,
5313
- y: length31.parse(parameters.h) / 2
5319
+ x: length37.parse(parameters.p) / 2,
5320
+ y: length37.parse(parameters.h) / 2
5314
5321
  },
5315
5322
  {
5316
- x: -length31.parse(parameters.w) / 2,
5317
- y: length31.parse(parameters.h) / 2
5323
+ x: -length37.parse(parameters.w) / 2,
5324
+ y: length37.parse(parameters.h) / 2
5318
5325
  },
5319
5326
  {
5320
- x: -length31.parse(parameters.w) / 2,
5321
- y: -length31.parse(parameters.h) / 2
5327
+ x: -length37.parse(parameters.w) / 2,
5328
+ y: -length37.parse(parameters.h) / 2
5322
5329
  },
5323
5330
  {
5324
- x: length31.parse(parameters.p) / 2,
5325
- y: -length31.parse(parameters.h) / 2
5331
+ x: length37.parse(parameters.p) / 2,
5332
+ y: -length37.parse(parameters.h) / 2
5326
5333
  }
5327
5334
  ],
5328
5335
  stroke_width: 0.1,
@@ -5362,7 +5369,7 @@ var miniMelfWithoutParsing = (parameters) => {
5362
5369
 
5363
5370
  // src/fn/sod882d.ts
5364
5371
  import { z as z48 } from "zod";
5365
- import { length as length32 } from "circuit-json";
5372
+ import { length as length38 } from "circuit-json";
5366
5373
  var sod_def11 = base_def.extend({
5367
5374
  fn: z48.string(),
5368
5375
  num_pins: z48.literal(2).default(2),
@@ -5376,7 +5383,7 @@ var sod882d = (raw_params) => {
5376
5383
  const parameters = sod_def11.parse(raw_params);
5377
5384
  const silkscreenRefText = silkscreenRef(
5378
5385
  0,
5379
- length32.parse(parameters.h) + 0.1,
5386
+ length38.parse(parameters.h) + 0.1,
5380
5387
  0.3
5381
5388
  );
5382
5389
  const silkscreenLine = {
@@ -5385,20 +5392,20 @@ var sod882d = (raw_params) => {
5385
5392
  pcb_component_id: "",
5386
5393
  route: [
5387
5394
  {
5388
- x: length32.parse(parameters.p) / 2 + 0.1,
5389
- y: length32.parse(parameters.h) / 2
5395
+ x: length38.parse(parameters.p) / 2 + 0.1,
5396
+ y: length38.parse(parameters.h) / 2
5390
5397
  },
5391
5398
  {
5392
- x: -length32.parse(parameters.w) / 2,
5393
- y: length32.parse(parameters.h) / 2
5399
+ x: -length38.parse(parameters.w) / 2,
5400
+ y: length38.parse(parameters.h) / 2
5394
5401
  },
5395
5402
  {
5396
- x: -length32.parse(parameters.w) / 2,
5397
- y: -length32.parse(parameters.h) / 2
5403
+ x: -length38.parse(parameters.w) / 2,
5404
+ y: -length38.parse(parameters.h) / 2
5398
5405
  },
5399
5406
  {
5400
- x: length32.parse(parameters.p) / 2 + 0.1,
5401
- y: -length32.parse(parameters.h) / 2
5407
+ x: length38.parse(parameters.p) / 2 + 0.1,
5408
+ y: -length38.parse(parameters.h) / 2
5402
5409
  }
5403
5410
  ],
5404
5411
  stroke_width: 0.1,
@@ -5442,7 +5449,7 @@ var sodWithoutParsing12 = (parameters) => {
5442
5449
 
5443
5450
  // src/fn/melf.ts
5444
5451
  import { z as z49 } from "zod";
5445
- import { length as length33 } from "circuit-json";
5452
+ import { length as length39 } from "circuit-json";
5446
5453
  var melf_def = base_def.extend({
5447
5454
  fn: z49.string(),
5448
5455
  num_pins: z49.literal(2).default(2),
@@ -5456,7 +5463,7 @@ var melf = (raw_params) => {
5456
5463
  const parameters = melf_def.parse(raw_params);
5457
5464
  const silkscreenRefText = silkscreenRef(
5458
5465
  0,
5459
- length33.parse(parameters.h),
5466
+ length39.parse(parameters.h),
5460
5467
  0.3
5461
5468
  );
5462
5469
  const silkscreenLine = {
@@ -5465,20 +5472,20 @@ var melf = (raw_params) => {
5465
5472
  pcb_component_id: "",
5466
5473
  route: [
5467
5474
  {
5468
- x: length33.parse(parameters.p) / 2,
5469
- y: length33.parse(parameters.h) / 2
5475
+ x: length39.parse(parameters.p) / 2,
5476
+ y: length39.parse(parameters.h) / 2
5470
5477
  },
5471
5478
  {
5472
- x: -length33.parse(parameters.w) / 2,
5473
- y: length33.parse(parameters.h) / 2
5479
+ x: -length39.parse(parameters.w) / 2,
5480
+ y: length39.parse(parameters.h) / 2
5474
5481
  },
5475
5482
  {
5476
- x: -length33.parse(parameters.w) / 2,
5477
- y: -length33.parse(parameters.h) / 2
5483
+ x: -length39.parse(parameters.w) / 2,
5484
+ y: -length39.parse(parameters.h) / 2
5478
5485
  },
5479
5486
  {
5480
- x: length33.parse(parameters.p) / 2,
5481
- y: -length33.parse(parameters.h) / 2
5487
+ x: length39.parse(parameters.p) / 2,
5488
+ y: -length39.parse(parameters.h) / 2
5482
5489
  }
5483
5490
  ],
5484
5491
  stroke_width: 0.1,
@@ -5522,7 +5529,7 @@ var melfWithoutParsing = (parameters) => {
5522
5529
 
5523
5530
  // src/fn/micromelf.ts
5524
5531
  import { z as z50 } from "zod";
5525
- import { length as length34 } from "circuit-json";
5532
+ import { length as length40 } from "circuit-json";
5526
5533
  var micromelf_def = base_def.extend({
5527
5534
  fn: z50.string(),
5528
5535
  num_pins: z50.literal(2).default(2),
@@ -5536,7 +5543,7 @@ var micromelf = (raw_params) => {
5536
5543
  const parameters = micromelf_def.parse(raw_params);
5537
5544
  const silkscreenRefText = silkscreenRef(
5538
5545
  0,
5539
- length34.parse(parameters.h),
5546
+ length40.parse(parameters.h),
5540
5547
  0.3
5541
5548
  );
5542
5549
  const silkscreenLine = {
@@ -5545,20 +5552,20 @@ var micromelf = (raw_params) => {
5545
5552
  pcb_component_id: "",
5546
5553
  route: [
5547
5554
  {
5548
- x: length34.parse(parameters.p) / 2,
5549
- y: length34.parse(parameters.h) / 2
5555
+ x: length40.parse(parameters.p) / 2,
5556
+ y: length40.parse(parameters.h) / 2
5550
5557
  },
5551
5558
  {
5552
- x: -length34.parse(parameters.w) / 2 - 0.1,
5553
- y: length34.parse(parameters.h) / 2
5559
+ x: -length40.parse(parameters.w) / 2 - 0.1,
5560
+ y: length40.parse(parameters.h) / 2
5554
5561
  },
5555
5562
  {
5556
- x: -length34.parse(parameters.w) / 2 - 0.1,
5557
- y: -length34.parse(parameters.h) / 2
5563
+ x: -length40.parse(parameters.w) / 2 - 0.1,
5564
+ y: -length40.parse(parameters.h) / 2
5558
5565
  },
5559
5566
  {
5560
- x: length34.parse(parameters.p) / 2,
5561
- y: -length34.parse(parameters.h) / 2
5567
+ x: length40.parse(parameters.p) / 2,
5568
+ y: -length40.parse(parameters.h) / 2
5562
5569
  }
5563
5570
  ],
5564
5571
  stroke_width: 0.1,
@@ -5602,7 +5609,7 @@ var microMelfWithoutParsing = (parameters) => {
5602
5609
 
5603
5610
  // src/fn/sma.ts
5604
5611
  import { z as z51 } from "zod";
5605
- import { length as length35 } from "circuit-json";
5612
+ import { length as length41 } from "circuit-json";
5606
5613
  var sma_def = base_def.extend({
5607
5614
  fn: z51.string(),
5608
5615
  num_pins: z51.literal(2).default(2),
@@ -5616,7 +5623,7 @@ var sma = (raw_params) => {
5616
5623
  const parameters = sma_def.parse(raw_params);
5617
5624
  const silkscreenRefText = silkscreenRef(
5618
5625
  0,
5619
- length35.parse(parameters.h) / 2 + 0.5,
5626
+ length41.parse(parameters.h) / 2 + 0.5,
5620
5627
  0.3
5621
5628
  );
5622
5629
  const silkscreenLine = {
@@ -5625,20 +5632,20 @@ var sma = (raw_params) => {
5625
5632
  pcb_component_id: "",
5626
5633
  route: [
5627
5634
  {
5628
- x: length35.parse(parameters.p) / 2,
5629
- y: length35.parse(parameters.h) / 2
5635
+ x: length41.parse(parameters.p) / 2,
5636
+ y: length41.parse(parameters.h) / 2
5630
5637
  },
5631
5638
  {
5632
- x: -length35.parse(parameters.w) / 2 - 0.5,
5633
- y: length35.parse(parameters.h) / 2
5639
+ x: -length41.parse(parameters.w) / 2 - 0.5,
5640
+ y: length41.parse(parameters.h) / 2
5634
5641
  },
5635
5642
  {
5636
- x: -length35.parse(parameters.w) / 2 - 0.5,
5637
- y: -length35.parse(parameters.h) / 2
5643
+ x: -length41.parse(parameters.w) / 2 - 0.5,
5644
+ y: -length41.parse(parameters.h) / 2
5638
5645
  },
5639
5646
  {
5640
- x: length35.parse(parameters.p) / 2,
5641
- y: -length35.parse(parameters.h) / 2
5647
+ x: length41.parse(parameters.p) / 2,
5648
+ y: -length41.parse(parameters.h) / 2
5642
5649
  }
5643
5650
  ],
5644
5651
  stroke_width: 0.1,
@@ -5681,7 +5688,7 @@ var smaWithoutParsing = (parameters) => {
5681
5688
 
5682
5689
  // src/fn/smf.ts
5683
5690
  import { z as z52 } from "zod";
5684
- import { length as length36 } from "circuit-json";
5691
+ import { length as length42 } from "circuit-json";
5685
5692
  var smf_def = base_def.extend({
5686
5693
  fn: z52.string(),
5687
5694
  num_pins: z52.literal(2).default(2),
@@ -5695,7 +5702,7 @@ var smf = (raw_params) => {
5695
5702
  const parameters = smf_def.parse(raw_params);
5696
5703
  const silkscreenRefText = silkscreenRef(
5697
5704
  0,
5698
- length36.parse(parameters.h) - 0.5,
5705
+ length42.parse(parameters.h) - 0.5,
5699
5706
  0.3
5700
5707
  );
5701
5708
  const silkscreenLine = {
@@ -5704,20 +5711,20 @@ var smf = (raw_params) => {
5704
5711
  pcb_component_id: "",
5705
5712
  route: [
5706
5713
  {
5707
- x: length36.parse(parameters.p) / 2,
5708
- y: length36.parse(parameters.h) / 2
5714
+ x: length42.parse(parameters.p) / 2,
5715
+ y: length42.parse(parameters.h) / 2
5709
5716
  },
5710
5717
  {
5711
- x: -length36.parse(parameters.w) / 2,
5712
- y: length36.parse(parameters.h) / 2
5718
+ x: -length42.parse(parameters.w) / 2,
5719
+ y: length42.parse(parameters.h) / 2
5713
5720
  },
5714
5721
  {
5715
- x: -length36.parse(parameters.w) / 2,
5716
- y: -length36.parse(parameters.h) / 2
5722
+ x: -length42.parse(parameters.w) / 2,
5723
+ y: -length42.parse(parameters.h) / 2
5717
5724
  },
5718
5725
  {
5719
- x: length36.parse(parameters.p) / 2,
5720
- y: -length36.parse(parameters.h) / 2
5726
+ x: length42.parse(parameters.p) / 2,
5727
+ y: -length42.parse(parameters.h) / 2
5721
5728
  }
5722
5729
  ],
5723
5730
  stroke_width: 0.1,
@@ -5761,7 +5768,7 @@ var smfWithoutParsing = (parameters) => {
5761
5768
 
5762
5769
  // src/fn/smb.ts
5763
5770
  import { z as z53 } from "zod";
5764
- import { length as length37 } from "circuit-json";
5771
+ import { length as length43 } from "circuit-json";
5765
5772
  var smb_def = base_def.extend({
5766
5773
  fn: z53.string(),
5767
5774
  num_pins: z53.literal(2).default(2),
@@ -5775,7 +5782,7 @@ var smb = (raw_params) => {
5775
5782
  const parameters = smb_def.parse(raw_params);
5776
5783
  const silkscreenRefText = silkscreenRef(
5777
5784
  0,
5778
- length37.parse(parameters.h) / 2 + 0.5,
5785
+ length43.parse(parameters.h) / 2 + 0.5,
5779
5786
  0.3
5780
5787
  );
5781
5788
  const silkscreenLine = {
@@ -5784,20 +5791,20 @@ var smb = (raw_params) => {
5784
5791
  pcb_component_id: "",
5785
5792
  route: [
5786
5793
  {
5787
- x: length37.parse(parameters.p) / 2,
5788
- y: length37.parse(parameters.h) / 2
5794
+ x: length43.parse(parameters.p) / 2,
5795
+ y: length43.parse(parameters.h) / 2
5789
5796
  },
5790
5797
  {
5791
- x: -length37.parse(parameters.w) / 2 - 0.1,
5792
- y: length37.parse(parameters.h) / 2
5798
+ x: -length43.parse(parameters.w) / 2 - 0.1,
5799
+ y: length43.parse(parameters.h) / 2
5793
5800
  },
5794
5801
  {
5795
- x: -length37.parse(parameters.w) / 2 - 0.1,
5796
- y: -length37.parse(parameters.h) / 2
5802
+ x: -length43.parse(parameters.w) / 2 - 0.1,
5803
+ y: -length43.parse(parameters.h) / 2
5797
5804
  },
5798
5805
  {
5799
- x: length37.parse(parameters.p) / 2,
5800
- y: -length37.parse(parameters.h) / 2
5806
+ x: length43.parse(parameters.p) / 2,
5807
+ y: -length43.parse(parameters.h) / 2
5801
5808
  }
5802
5809
  ],
5803
5810
  stroke_width: 0.1,
@@ -5841,7 +5848,7 @@ var smbWithoutParsing = (parameters) => {
5841
5848
 
5842
5849
  // src/fn/smc.ts
5843
5850
  import { z as z54 } from "zod";
5844
- import { length as length38 } from "circuit-json";
5851
+ import { length as length44 } from "circuit-json";
5845
5852
  var smc_def = base_def.extend({
5846
5853
  fn: z54.string(),
5847
5854
  num_pins: z54.literal(2).default(2),
@@ -5860,20 +5867,20 @@ var smc = (raw_params) => {
5860
5867
  pcb_component_id: "",
5861
5868
  route: [
5862
5869
  {
5863
- x: length38.parse(parameters.p) / 2,
5864
- y: length38.parse(parameters.h) / 2 - 0.8
5870
+ x: length44.parse(parameters.p) / 2,
5871
+ y: length44.parse(parameters.h) / 2 - 0.8
5865
5872
  },
5866
5873
  {
5867
- x: -length38.parse(parameters.w) / 2 - 0.8,
5868
- y: length38.parse(parameters.h) / 2 - 0.8
5874
+ x: -length44.parse(parameters.w) / 2 - 0.8,
5875
+ y: length44.parse(parameters.h) / 2 - 0.8
5869
5876
  },
5870
5877
  {
5871
- x: -length38.parse(parameters.w) / 2 - 0.8,
5872
- y: -length38.parse(parameters.h) / 2 + 0.8
5878
+ x: -length44.parse(parameters.w) / 2 - 0.8,
5879
+ y: -length44.parse(parameters.h) / 2 + 0.8
5873
5880
  },
5874
5881
  {
5875
- x: length38.parse(parameters.p) / 2,
5876
- y: -length38.parse(parameters.h) / 2 + 0.8
5882
+ x: length44.parse(parameters.p) / 2,
5883
+ y: -length44.parse(parameters.h) / 2 + 0.8
5877
5884
  }
5878
5885
  ],
5879
5886
  stroke_width: 0.1,
@@ -6343,17 +6350,17 @@ var to92s = (raw_params) => {
6343
6350
 
6344
6351
  // src/fn/jst.ts
6345
6352
  import {
6346
- length as length39
6353
+ length as length45
6347
6354
  } from "circuit-json";
6348
6355
  import { z as z58 } from "zod";
6349
6356
  var jst_def = base_def.extend({
6350
6357
  fn: z58.string(),
6351
- p: length39.optional(),
6352
- id: length39.optional(),
6353
- pw: length39.optional(),
6354
- pl: length39.optional(),
6355
- w: length39.optional(),
6356
- h: length39.optional(),
6358
+ p: length45.optional(),
6359
+ id: length45.optional(),
6360
+ pw: length45.optional(),
6361
+ pl: length45.optional(),
6362
+ w: length45.optional(),
6363
+ h: length45.optional(),
6357
6364
  sh: z58.union([z58.boolean(), z58.string(), z58.number()]).optional().transform((v) => {
6358
6365
  if (typeof v === "string") {
6359
6366
  const n = Number(v);
@@ -6370,19 +6377,19 @@ var jst_def = base_def.extend({
6370
6377
  });
6371
6378
  var variantDefaults = {
6372
6379
  ph: {
6373
- p: length39.parse("2.2mm"),
6374
- id: length39.parse("0.70mm"),
6375
- pw: length39.parse("1.20mm"),
6376
- pl: length39.parse("1.20mm"),
6377
- w: length39.parse("6mm"),
6378
- h: length39.parse("5mm")
6380
+ p: length45.parse("2.2mm"),
6381
+ id: length45.parse("0.70mm"),
6382
+ pw: length45.parse("1.20mm"),
6383
+ pl: length45.parse("1.20mm"),
6384
+ w: length45.parse("6mm"),
6385
+ h: length45.parse("5mm")
6379
6386
  },
6380
6387
  sh: {
6381
- p: length39.parse("1mm"),
6382
- pw: length39.parse("0.6mm"),
6383
- pl: length39.parse("1.55mm"),
6384
- w: length39.parse("5.8mm"),
6385
- h: length39.parse("7.8mm")
6388
+ p: length45.parse("1mm"),
6389
+ pw: length45.parse("0.6mm"),
6390
+ pl: length45.parse("1.55mm"),
6391
+ w: length45.parse("5.8mm"),
6392
+ h: length45.parse("7.8mm")
6386
6393
  }
6387
6394
  };
6388
6395
  function getVariant(params) {
@@ -6500,7 +6507,7 @@ var jst = (raw_params) => {
6500
6507
 
6501
6508
  // src/fn/sod110.ts
6502
6509
  import { z as z59 } from "zod";
6503
- import { length as length40 } from "circuit-json";
6510
+ import { length as length46 } from "circuit-json";
6504
6511
  var sod_def12 = base_def.extend({
6505
6512
  fn: z59.string(),
6506
6513
  num_pins: z59.literal(2).default(2),
@@ -6514,7 +6521,7 @@ var sod110 = (raw_params) => {
6514
6521
  const parameters = sod_def12.parse(raw_params);
6515
6522
  const silkscreenRefText = silkscreenRef(
6516
6523
  0,
6517
- length40.parse(parameters.h) / 2 + 0.5,
6524
+ length46.parse(parameters.h) / 2 + 0.5,
6518
6525
  0.3
6519
6526
  );
6520
6527
  const silkscreenLine = {
@@ -6523,20 +6530,20 @@ var sod110 = (raw_params) => {
6523
6530
  pcb_component_id: "",
6524
6531
  route: [
6525
6532
  {
6526
- x: length40.parse(parameters.p) / 2,
6527
- y: length40.parse(parameters.h) / 2
6533
+ x: length46.parse(parameters.p) / 2,
6534
+ y: length46.parse(parameters.h) / 2
6528
6535
  },
6529
6536
  {
6530
- x: -length40.parse(parameters.w) / 2,
6531
- y: length40.parse(parameters.h) / 2
6537
+ x: -length46.parse(parameters.w) / 2,
6538
+ y: length46.parse(parameters.h) / 2
6532
6539
  },
6533
6540
  {
6534
- x: -length40.parse(parameters.w) / 2,
6535
- y: -length40.parse(parameters.h) / 2
6541
+ x: -length46.parse(parameters.w) / 2,
6542
+ y: -length46.parse(parameters.h) / 2
6536
6543
  },
6537
6544
  {
6538
- x: length40.parse(parameters.p) / 2,
6539
- y: -length40.parse(parameters.h) / 2
6545
+ x: length46.parse(parameters.p) / 2,
6546
+ y: -length46.parse(parameters.h) / 2
6540
6547
  }
6541
6548
  ],
6542
6549
  stroke_width: 0.1,
@@ -6579,7 +6586,7 @@ var sodWithoutParsing13 = (parameters) => {
6579
6586
 
6580
6587
  // src/fn/vssop.ts
6581
6588
  import { z as z60 } from "zod";
6582
- import { length as length41 } from "circuit-json";
6589
+ import { length as length47 } from "circuit-json";
6583
6590
  var getDefaultValues = (num_pins) => {
6584
6591
  switch (num_pins) {
6585
6592
  case 8:
@@ -6621,11 +6628,11 @@ var vssop_def = base_def.extend({
6621
6628
  var vssop = (raw_params) => {
6622
6629
  const parameters = vssop_def.parse(raw_params);
6623
6630
  const defaults = getDefaultValues(parameters.num_pins);
6624
- const w = length41.parse(parameters.w || defaults.w);
6625
- const h = length41.parse(parameters.h || defaults.h);
6626
- const p = length41.parse(parameters.p || defaults.p);
6627
- const pl = length41.parse(parameters.pl || defaults.pl);
6628
- const pw = length41.parse(parameters.pw || defaults.pw);
6631
+ const w = length47.parse(parameters.w || defaults.w);
6632
+ const h = length47.parse(parameters.h || defaults.h);
6633
+ const p = length47.parse(parameters.p || defaults.p);
6634
+ const pl = length47.parse(parameters.pl || defaults.pl);
6635
+ const pw = length47.parse(parameters.pw || defaults.pw);
6629
6636
  const pads = [];
6630
6637
  const half = parameters.num_pins / 2;
6631
6638
  for (let i = 0; i < parameters.num_pins; i++) {
@@ -6702,14 +6709,14 @@ var getVssopPadCoord = (pinCount, pn, w, p) => {
6702
6709
  const col = pn <= half ? -1 : 1;
6703
6710
  const row = (half - 1) / 2 - rowIndex;
6704
6711
  return {
6705
- x: col * length41.parse(pinCount === 8 ? "1.8mm" : "2.2mm"),
6712
+ x: col * length47.parse(pinCount === 8 ? "1.8mm" : "2.2mm"),
6706
6713
  y: row * p
6707
6714
  };
6708
6715
  };
6709
6716
 
6710
6717
  // src/fn/msop.ts
6711
6718
  import { z as z61 } from "zod";
6712
- import { length as length42 } from "circuit-json";
6719
+ import { length as length48 } from "circuit-json";
6713
6720
  var getDefaultValues2 = (num_pins) => {
6714
6721
  switch (num_pins) {
6715
6722
  case 10:
@@ -6762,18 +6769,18 @@ var getMsopCoords = (pinCount, pn, w, p) => {
6762
6769
  const col = pn <= half ? -1 : 1;
6763
6770
  const row = (half - 1) / 2 - rowIndex;
6764
6771
  return {
6765
- x: col * length42.parse("2mm"),
6772
+ x: col * length48.parse("2mm"),
6766
6773
  y: row * p
6767
6774
  };
6768
6775
  };
6769
6776
  var msop = (raw_params) => {
6770
6777
  const parameters = msop_def.parse(raw_params);
6771
6778
  const defaults = getDefaultValues2(parameters.num_pins);
6772
- const w = length42.parse(parameters.w || defaults.w);
6773
- const h = length42.parse(parameters.h || defaults.h);
6774
- const p = length42.parse(parameters.p || defaults.p);
6775
- const pl = length42.parse(parameters.pl || defaults.pl);
6776
- const pw = length42.parse(parameters.pw || defaults.pw);
6779
+ const w = length48.parse(parameters.w || defaults.w);
6780
+ const h = length48.parse(parameters.h || defaults.h);
6781
+ const p = length48.parse(parameters.p || defaults.p);
6782
+ const pl = length48.parse(parameters.pl || defaults.pl);
6783
+ const pw = length48.parse(parameters.pw || defaults.pw);
6777
6784
  const pads = [];
6778
6785
  for (let i = 0; i < parameters.num_pins; i++) {
6779
6786
  const { x, y } = getMsopCoords(parameters.num_pins, i + 1, w, p);
@@ -6845,7 +6852,7 @@ var msop = (raw_params) => {
6845
6852
 
6846
6853
  // src/fn/sod323w.ts
6847
6854
  import { z as z62 } from "zod";
6848
- import { length as length43 } from "circuit-json";
6855
+ import { length as length49 } from "circuit-json";
6849
6856
  var sod323w_def = base_def.extend({
6850
6857
  fn: z62.string(),
6851
6858
  num_pins: z62.literal(2).default(2),
@@ -6859,7 +6866,7 @@ var sod323w = (raw_params) => {
6859
6866
  const parameters = sod323w_def.parse(raw_params);
6860
6867
  const silkscreenRefText = silkscreenRef(
6861
6868
  0,
6862
- length43.parse(parameters.h),
6869
+ length49.parse(parameters.h),
6863
6870
  0.3
6864
6871
  );
6865
6872
  const silkscreenLine = {
@@ -6868,20 +6875,20 @@ var sod323w = (raw_params) => {
6868
6875
  pcb_component_id: "",
6869
6876
  route: [
6870
6877
  {
6871
- x: length43.parse(parameters.pad_spacing) / 2,
6872
- y: length43.parse(parameters.h) / 2
6878
+ x: length49.parse(parameters.pad_spacing) / 2,
6879
+ y: length49.parse(parameters.h) / 2
6873
6880
  },
6874
6881
  {
6875
- x: -length43.parse(parameters.w) / 2 - 0.2,
6876
- y: length43.parse(parameters.h) / 2
6882
+ x: -length49.parse(parameters.w) / 2 - 0.2,
6883
+ y: length49.parse(parameters.h) / 2
6877
6884
  },
6878
6885
  {
6879
- x: -length43.parse(parameters.w) / 2 - 0.2,
6880
- y: -length43.parse(parameters.h) / 2
6886
+ x: -length49.parse(parameters.w) / 2 - 0.2,
6887
+ y: -length49.parse(parameters.h) / 2
6881
6888
  },
6882
6889
  {
6883
- x: length43.parse(parameters.pad_spacing) / 2,
6884
- y: -length43.parse(parameters.h) / 2
6890
+ x: length49.parse(parameters.pad_spacing) / 2,
6891
+ y: -length49.parse(parameters.h) / 2
6885
6892
  }
6886
6893
  ],
6887
6894
  stroke_width: 0.1,
@@ -6925,7 +6932,7 @@ var sodWithoutParsing14 = (parameters) => {
6925
6932
 
6926
6933
  // src/fn/sod323fl.ts
6927
6934
  import { z as z63 } from "zod";
6928
- import { length as length44 } from "circuit-json";
6935
+ import { length as length50 } from "circuit-json";
6929
6936
  var sod323FL_def = base_def.extend({
6930
6937
  fn: z63.string(),
6931
6938
  num_pins: z63.literal(2).default(2),
@@ -6939,7 +6946,7 @@ var sod323fl = (raw_params) => {
6939
6946
  const parameters = sod323FL_def.parse(raw_params);
6940
6947
  const silkscreenRefText = silkscreenRef(
6941
6948
  0,
6942
- length44.parse(parameters.h),
6949
+ length50.parse(parameters.h),
6943
6950
  0.3
6944
6951
  );
6945
6952
  const silkscreenLine = {
@@ -6948,20 +6955,20 @@ var sod323fl = (raw_params) => {
6948
6955
  pcb_component_id: "",
6949
6956
  route: [
6950
6957
  {
6951
- x: length44.parse(parameters.pad_spacing) / 2,
6952
- y: length44.parse(parameters.h) / 2
6958
+ x: length50.parse(parameters.pad_spacing) / 2,
6959
+ y: length50.parse(parameters.h) / 2
6953
6960
  },
6954
6961
  {
6955
- x: -length44.parse(parameters.w) / 2 - 0.2,
6956
- y: length44.parse(parameters.h) / 2
6962
+ x: -length50.parse(parameters.w) / 2 - 0.2,
6963
+ y: length50.parse(parameters.h) / 2
6957
6964
  },
6958
6965
  {
6959
- x: -length44.parse(parameters.w) / 2 - 0.2,
6960
- y: -length44.parse(parameters.h) / 2
6966
+ x: -length50.parse(parameters.w) / 2 - 0.2,
6967
+ y: -length50.parse(parameters.h) / 2
6961
6968
  },
6962
6969
  {
6963
- x: length44.parse(parameters.pad_spacing) / 2,
6964
- y: -length44.parse(parameters.h) / 2
6970
+ x: length50.parse(parameters.pad_spacing) / 2,
6971
+ y: -length50.parse(parameters.h) / 2
6965
6972
  }
6966
6973
  ],
6967
6974
  stroke_width: 0.1,
@@ -7005,7 +7012,7 @@ var sodWithoutParsing15 = (parameters) => {
7005
7012
 
7006
7013
  // src/fn/son.ts
7007
7014
  import { z as z64 } from "zod";
7008
- import { length as length45 } from "circuit-json";
7015
+ import { length as length51 } from "circuit-json";
7009
7016
  var son_def = base_def.extend({
7010
7017
  fn: z64.string(),
7011
7018
  num_pins: z64.union([z64.literal(6), z64.literal(8)]).default(8),
@@ -7029,13 +7036,13 @@ var son = (raw_params) => {
7029
7036
  ...raw_params,
7030
7037
  num_pins: numPins
7031
7038
  });
7032
- const w = length45.parse(parameters.w);
7033
- const h = length45.parse(parameters.h);
7034
- const p = length45.parse(parameters.p);
7035
- const pl = length45.parse(parameters.pl);
7036
- const pw = length45.parse(parameters.pw);
7037
- const epw = length45.parse(parameters.epw);
7038
- const eph = length45.parse(parameters.eph);
7039
+ const w = length51.parse(parameters.w);
7040
+ const h = length51.parse(parameters.h);
7041
+ const p = length51.parse(parameters.p);
7042
+ const pl = length51.parse(parameters.pl);
7043
+ const pw = length51.parse(parameters.pw);
7044
+ const epw = length51.parse(parameters.epw);
7045
+ const eph = length51.parse(parameters.eph);
7039
7046
  const pads = [];
7040
7047
  for (let i = 0; i < parameters.num_pins; i++) {
7041
7048
  const { x, y } = getSonPadCoord(parameters.num_pins, i + 1, w, p);
@@ -7113,18 +7120,18 @@ var getSonPadCoord = (num_pins, pn, w, p) => {
7113
7120
  const col = pn <= half ? -1 : 1;
7114
7121
  const row = (half - 1) / 2 - rowIndex;
7115
7122
  return {
7116
- x: col * length45.parse("1.4mm"),
7123
+ x: col * length51.parse("1.4mm"),
7117
7124
  y: row * p
7118
7125
  };
7119
7126
  };
7120
7127
 
7121
7128
  // src/fn/solderjumper.ts
7122
- import { length as length46 } from "circuit-json";
7129
+ import { length as length52 } from "circuit-json";
7123
7130
  var solderjumper = (params) => {
7124
7131
  const { num_pins, bridged, p = 2.54, pw = 1.5, ph = 1.5 } = params;
7125
- const padSpacing7 = length46.parse(p);
7126
- const padWidth = length46.parse(pw);
7127
- const padHeight = length46.parse(ph);
7132
+ const padSpacing7 = length52.parse(p);
7133
+ const padWidth = length52.parse(pw);
7134
+ const padHeight = length52.parse(ph);
7128
7135
  const traceWidth = Math.min(padHeight / 4, 0.5);
7129
7136
  const pads = [];
7130
7137
  for (let i = 0; i < num_pins; i++) {
@@ -7379,7 +7386,7 @@ var sot457 = (rawParams) => {
7379
7386
 
7380
7387
  // src/fn/sot963.ts
7381
7388
  import { z as z66 } from "zod";
7382
- import { length as length47 } from "circuit-json";
7389
+ import { length as length53 } from "circuit-json";
7383
7390
  var sot963_def = base_def.extend({
7384
7391
  fn: z66.string(),
7385
7392
  num_pins: z66.literal(6).default(6),
@@ -7392,11 +7399,11 @@ var sot963_def = base_def.extend({
7392
7399
  });
7393
7400
  var sot963 = (raw_params) => {
7394
7401
  const parameters = sot963_def.parse({ ...raw_params, fn: "sot963" });
7395
- const w = length47.parse(parameters.w);
7396
- const h = length47.parse(parameters.h);
7397
- const p = length47.parse(parameters.p);
7398
- const pl = length47.parse(parameters.pl);
7399
- const pw = length47.parse(parameters.pw);
7402
+ const w = length53.parse(parameters.w);
7403
+ const h = length53.parse(parameters.h);
7404
+ const p = length53.parse(parameters.p);
7405
+ const pl = length53.parse(parameters.pl);
7406
+ const pw = length53.parse(parameters.pw);
7400
7407
  const pads = [];
7401
7408
  for (let i = 0; i < 6; i++) {
7402
7409
  const { x, y } = getSot963PadCoord(i + 1, w, p, pl);
@@ -7538,15 +7545,15 @@ var potentiometer = (raw_params) => {
7538
7545
 
7539
7546
  // src/fn/electrolytic.ts
7540
7547
  import {
7541
- length as length48
7548
+ length as length54
7542
7549
  } from "circuit-json";
7543
7550
  import { z as z68 } from "zod";
7544
7551
  var electrolytic_def = base_def.extend({
7545
7552
  fn: z68.string(),
7546
- p: length48.optional().default("7.5mm"),
7547
- id: length48.optional().default("1mm"),
7548
- od: length48.optional().default("2mm"),
7549
- d: length48.optional().default("10.5mm")
7553
+ p: length54.optional().default("7.5mm"),
7554
+ id: length54.optional().default("1mm"),
7555
+ od: length54.optional().default("2mm"),
7556
+ d: length54.optional().default("10.5mm")
7550
7557
  });
7551
7558
  var generate_circle_arcs = (centerX, centerY, radius, cut, cutHeight) => {
7552
7559
  const topArc = [];
@@ -7654,7 +7661,7 @@ var electrolytic = (raw_params) => {
7654
7661
 
7655
7662
  // src/fn/smbf.ts
7656
7663
  import { z as z69 } from "zod";
7657
- import { length as length49 } from "circuit-json";
7664
+ import { length as length55 } from "circuit-json";
7658
7665
  var smbf_def = base_def.extend({
7659
7666
  fn: z69.string(),
7660
7667
  num_pins: z69.literal(2).default(2),
@@ -7668,7 +7675,7 @@ var smbf = (raw_params) => {
7668
7675
  const parameters = smbf_def.parse(raw_params);
7669
7676
  const silkscreenRefText = silkscreenRef(
7670
7677
  0,
7671
- length49.parse(parameters.h) - 0.5,
7678
+ length55.parse(parameters.h) - 0.5,
7672
7679
  0.3
7673
7680
  );
7674
7681
  const silkscreenLine = {
@@ -7677,20 +7684,20 @@ var smbf = (raw_params) => {
7677
7684
  pcb_component_id: "",
7678
7685
  route: [
7679
7686
  {
7680
- x: length49.parse(parameters.p) / 2,
7681
- y: length49.parse(parameters.h) / 2
7687
+ x: length55.parse(parameters.p) / 2,
7688
+ y: length55.parse(parameters.h) / 2
7682
7689
  },
7683
7690
  {
7684
- x: -length49.parse(parameters.w) / 2 - 0.3,
7685
- y: length49.parse(parameters.h) / 2
7691
+ x: -length55.parse(parameters.w) / 2 - 0.3,
7692
+ y: length55.parse(parameters.h) / 2
7686
7693
  },
7687
7694
  {
7688
- x: -length49.parse(parameters.w) / 2 - 0.3,
7689
- y: -length49.parse(parameters.h) / 2
7695
+ x: -length55.parse(parameters.w) / 2 - 0.3,
7696
+ y: -length55.parse(parameters.h) / 2
7690
7697
  },
7691
7698
  {
7692
- x: length49.parse(parameters.p) / 2,
7693
- y: -length49.parse(parameters.h) / 2
7699
+ x: length55.parse(parameters.p) / 2,
7700
+ y: -length55.parse(parameters.h) / 2
7694
7701
  }
7695
7702
  ],
7696
7703
  stroke_width: 0.1,
@@ -7830,7 +7837,7 @@ var sot323_3 = (parameters) => {
7830
7837
 
7831
7838
  // src/fn/smtpad.ts
7832
7839
  import { z as z71 } from "zod";
7833
- import { length as length50 } from "circuit-json";
7840
+ import { length as length56 } from "circuit-json";
7834
7841
  import { mm as mm14 } from "@tscircuit/mm";
7835
7842
  var smtpad_def = base_def.extend({
7836
7843
  fn: z71.string(),
@@ -7838,20 +7845,20 @@ var smtpad_def = base_def.extend({
7838
7845
  rect: z71.boolean().optional(),
7839
7846
  square: z71.boolean().optional(),
7840
7847
  pill: z71.boolean().optional(),
7841
- d: length50.optional(),
7842
- pd: length50.optional(),
7843
- diameter: length50.optional(),
7844
- r: length50.optional(),
7845
- pr: length50.optional(),
7846
- radius: length50.optional(),
7847
- w: length50.optional(),
7848
- pw: length50.optional(),
7849
- width: length50.optional(),
7850
- h: length50.optional(),
7851
- ph: length50.optional(),
7852
- height: length50.optional(),
7853
- s: length50.optional(),
7854
- size: length50.optional(),
7848
+ d: length56.optional(),
7849
+ pd: length56.optional(),
7850
+ diameter: length56.optional(),
7851
+ r: length56.optional(),
7852
+ pr: length56.optional(),
7853
+ radius: length56.optional(),
7854
+ w: length56.optional(),
7855
+ pw: length56.optional(),
7856
+ width: length56.optional(),
7857
+ h: length56.optional(),
7858
+ ph: length56.optional(),
7859
+ height: length56.optional(),
7860
+ s: length56.optional(),
7861
+ size: length56.optional(),
7855
7862
  string: z71.string().optional()
7856
7863
  }).transform((v) => {
7857
7864
  let shape = "rect";
@@ -7919,16 +7926,16 @@ var smtpad = (raw_params) => {
7919
7926
 
7920
7927
  // src/fn/platedhole.ts
7921
7928
  import { z as z72 } from "zod";
7922
- import { length as length51 } from "circuit-json";
7929
+ import { length as length57 } from "circuit-json";
7923
7930
  import { mm as mm15 } from "@tscircuit/mm";
7924
7931
  var platedhole_def = base_def.extend({
7925
7932
  fn: z72.string(),
7926
- d: length51.optional(),
7927
- hd: length51.optional(),
7928
- r: length51.optional(),
7929
- hr: length51.optional(),
7930
- pd: length51.optional(),
7931
- pr: length51.optional(),
7933
+ d: length57.optional(),
7934
+ hd: length57.optional(),
7935
+ r: length57.optional(),
7936
+ hr: length57.optional(),
7937
+ pd: length57.optional(),
7938
+ pr: length57.optional(),
7932
7939
  squarepad: z72.boolean().optional().default(false)
7933
7940
  }).transform((v) => {
7934
7941
  let holeD;
@@ -8379,10 +8386,10 @@ var applyOrigin = (elements, origin) => {
8379
8386
  (el) => el.type === "pcb_smtpad" || el.type === "pcb_plated_hole" || el.type === "pcb_thtpad"
8380
8387
  );
8381
8388
  if (pads.length === 0) return elements;
8382
- let minX = Infinity;
8383
- let maxX = -Infinity;
8384
- let minY = Infinity;
8385
- let maxY = -Infinity;
8389
+ let minX = Number.POSITIVE_INFINITY;
8390
+ let maxX = Number.NEGATIVE_INFINITY;
8391
+ let minY = Number.POSITIVE_INFINITY;
8392
+ let maxY = Number.NEGATIVE_INFINITY;
8386
8393
  const updateBounds = (x, y, w = 0, h = 0) => {
8387
8394
  const left = x - w / 2;
8388
8395
  const right = x + w / 2;
@@ -8437,11 +8444,12 @@ var applyOrigin = (elements, origin) => {
8437
8444
  dx = maxX;
8438
8445
  dy = (minY + maxY) / 2;
8439
8446
  break;
8440
- case "pin1":
8447
+ case "pin1": {
8441
8448
  const pin1 = pads.find((p) => p.port_hints?.[0] === "1") || pads[0];
8442
8449
  dx = pin1.x;
8443
8450
  dy = pin1.y;
8444
8451
  break;
8452
+ }
8445
8453
  }
8446
8454
  if (dx === 0 && dy === 0) return elements;
8447
8455
  for (const el of elements) {