@tscircuit/footprinter 0.0.317 → 0.0.319

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
@@ -82,6 +82,7 @@ __export(fn_exports, {
82
82
  stampboard: () => stampboard,
83
83
  stampreceiver: () => stampreceiver,
84
84
  to220: () => to220,
85
+ to220f: () => to220f,
85
86
  to92: () => to92,
86
87
  to92l: () => to92l,
87
88
  to92s: () => to92s,
@@ -5223,14 +5224,14 @@ var sot89_3 = (parameters) => {
5223
5224
  const pads = [];
5224
5225
  const padGap = Number.parseFloat(parameters.p);
5225
5226
  const padWidth = Number.parseFloat(parameters.pw);
5226
- const length62 = Number.parseFloat(parameters.w);
5227
+ const length63 = Number.parseFloat(parameters.w);
5227
5228
  const padHeight = Number.parseFloat(parameters.pl);
5228
5229
  const centerExtra = 0.175;
5229
5230
  const outerPadXShift = (padHeight - (padHeight + centerExtra)) / 2;
5230
5231
  pads.push(
5231
- rectpad(1, -length62 / 2 + outerPadXShift, padGap, padHeight, padWidth),
5232
- rectpad(2, -length62 / 2, 0, padHeight + centerExtra, padWidth),
5233
- rectpad(3, -length62 / 2 + outerPadXShift, -padGap, padHeight, padWidth)
5232
+ rectpad(1, -length63 / 2 + outerPadXShift, padGap, padHeight, padWidth),
5233
+ rectpad(2, -length63 / 2, 0, padHeight + centerExtra, padWidth),
5234
+ rectpad(3, -length63 / 2 + outerPadXShift, -padGap, padHeight, padWidth)
5234
5235
  );
5235
5236
  const silkscreenRefText = silkscreenRef(0, 0, 0.3);
5236
5237
  const width = Number.parseFloat(parameters.w) / 2 - 1;
@@ -5270,7 +5271,7 @@ var sot89_5 = (parameters) => {
5270
5271
  const pads = [];
5271
5272
  const padGap = Number.parseFloat(parameters.p);
5272
5273
  const padWidth = Number.parseFloat(parameters.pw);
5273
- const length62 = Number.parseFloat(parameters.w);
5274
+ const length63 = Number.parseFloat(parameters.w);
5274
5275
  pads.push(
5275
5276
  rectpad(1, -1.85, -1.5, 1.5, 0.7),
5276
5277
  rectpad(2, -1.85, 1.5, 1.5, 0.7),
@@ -5353,8 +5354,8 @@ var to220_def = base_def.extend({
5353
5354
  });
5354
5355
  var to220 = (raw_params) => {
5355
5356
  const parameters = to220_def.parse(raw_params);
5356
- const { fn, id, od, w, h, string: string3 } = parameters;
5357
- const numPins = Number.parseInt(string3?.split("_")[1] ?? "3");
5357
+ const { id, od, w, h, string: string3 } = parameters;
5358
+ const numPins = parameters.num_pins ?? Number.parseInt(string3?.match(/^to220(?:_|-)(\d+)/i)?.[1] ?? "3");
5358
5359
  const holeY = -1;
5359
5360
  const halfWidth = w / 2;
5360
5361
  const halfHeight = h / 2;
@@ -5428,23 +5429,84 @@ var to220 = (raw_params) => {
5428
5429
  };
5429
5430
  };
5430
5431
 
5431
- // src/fn/minimelf.ts
5432
- import { z as z49 } from "zod";
5432
+ // src/fn/to220f.ts
5433
+ import { mm as mm14 } from "@tscircuit/mm";
5433
5434
  import { length as length39 } from "circuit-json";
5434
- var minimelf_def = base_def.extend({
5435
+ import { z as z49 } from "zod";
5436
+ var TO220F_PITCH_MM = 2.54;
5437
+ var to220f_def = base_def.extend({
5435
5438
  fn: z49.string(),
5436
- num_pins: z49.literal(2).default(2),
5437
- w: z49.string().default("5.40mm"),
5438
- h: z49.string().default("2.30mm"),
5439
- pl: z49.string().default("1.30mm"),
5440
- pw: z49.string().default("1.70mm"),
5441
- p: z49.string().default("3.5mm")
5439
+ // KiCad TO-220F-3_Vertical: hole=1.2mm, pad=1.905×2.0mm, pitch=2.54mm
5440
+ id: length39.optional().default("1.2mm"),
5441
+ od: length39.optional().default("1.905mm"),
5442
+ ph: length39.optional().default("2mm"),
5443
+ w: length39.optional().default("13mm"),
5444
+ h: length39.optional().default("7mm"),
5445
+ num_pins: z49.number().optional(),
5446
+ string: z49.string().optional()
5447
+ });
5448
+ var to220f = (raw_params) => {
5449
+ const parameters = to220f_def.parse(raw_params);
5450
+ const numPins = parameters.num_pins ?? Number.parseInt(
5451
+ parameters.string?.match(/^to220f(?:_|-)(\d+)/i)?.[1] ?? "3"
5452
+ );
5453
+ const baseResult = to220({
5454
+ ...parameters,
5455
+ fn: "to220",
5456
+ string: parameters.string?.replace(/^to220f/i, "to220"),
5457
+ num_pins: numPins
5458
+ });
5459
+ const holeY = -1;
5460
+ const newHoles = Array.from(
5461
+ { length: numPins },
5462
+ (_, i) => {
5463
+ const x = numPins % 2 === 0 ? (i - numPins / 2 + 0.5) * TO220F_PITCH_MM : (i - Math.floor(numPins / 2)) * TO220F_PITCH_MM;
5464
+ if (i === 0) {
5465
+ return platedHoleWithRectPad({
5466
+ pn: 1,
5467
+ x,
5468
+ y: holeY,
5469
+ holeDiameter: parameters.id,
5470
+ rectPadWidth: parameters.od,
5471
+ rectPadHeight: parameters.ph
5472
+ });
5473
+ }
5474
+ return platedHolePill(
5475
+ i + 1,
5476
+ x,
5477
+ holeY,
5478
+ mm14(parameters.id),
5479
+ mm14(parameters.od),
5480
+ mm14(parameters.ph)
5481
+ );
5482
+ }
5483
+ );
5484
+ const nonHoleElements = baseResult.circuitJson.filter(
5485
+ (e) => e.type !== "pcb_plated_hole"
5486
+ );
5487
+ return {
5488
+ circuitJson: [...newHoles, ...nonHoleElements],
5489
+ parameters: { ...parameters, p: TO220F_PITCH_MM, num_pins: numPins }
5490
+ };
5491
+ };
5492
+
5493
+ // src/fn/minimelf.ts
5494
+ import { z as z50 } from "zod";
5495
+ import { length as length40 } from "circuit-json";
5496
+ var minimelf_def = base_def.extend({
5497
+ fn: z50.string(),
5498
+ num_pins: z50.literal(2).default(2),
5499
+ w: z50.string().default("5.40mm"),
5500
+ h: z50.string().default("2.30mm"),
5501
+ pl: z50.string().default("1.30mm"),
5502
+ pw: z50.string().default("1.70mm"),
5503
+ p: z50.string().default("3.5mm")
5442
5504
  });
5443
5505
  var minimelf = (raw_params) => {
5444
5506
  const parameters = minimelf_def.parse(raw_params);
5445
5507
  const silkscreenRefText = silkscreenRef(
5446
5508
  0,
5447
- length39.parse(parameters.h) / 2 + 0.4,
5509
+ length40.parse(parameters.h) / 2 + 0.4,
5448
5510
  0.3
5449
5511
  );
5450
5512
  const silkscreenLine = {
@@ -5453,20 +5515,20 @@ var minimelf = (raw_params) => {
5453
5515
  pcb_component_id: "",
5454
5516
  route: [
5455
5517
  {
5456
- x: length39.parse(parameters.p) / 2,
5457
- y: length39.parse(parameters.h) / 2
5518
+ x: length40.parse(parameters.p) / 2,
5519
+ y: length40.parse(parameters.h) / 2
5458
5520
  },
5459
5521
  {
5460
- x: -length39.parse(parameters.w) / 2,
5461
- y: length39.parse(parameters.h) / 2
5522
+ x: -length40.parse(parameters.w) / 2,
5523
+ y: length40.parse(parameters.h) / 2
5462
5524
  },
5463
5525
  {
5464
- x: -length39.parse(parameters.w) / 2,
5465
- y: -length39.parse(parameters.h) / 2
5526
+ x: -length40.parse(parameters.w) / 2,
5527
+ y: -length40.parse(parameters.h) / 2
5466
5528
  },
5467
5529
  {
5468
- x: length39.parse(parameters.p) / 2,
5469
- y: -length39.parse(parameters.h) / 2
5530
+ x: length40.parse(parameters.p) / 2,
5531
+ y: -length40.parse(parameters.h) / 2
5470
5532
  }
5471
5533
  ],
5472
5534
  stroke_width: 0.1,
@@ -5505,22 +5567,22 @@ var miniMelfWithoutParsing = (parameters) => {
5505
5567
  };
5506
5568
 
5507
5569
  // src/fn/sod882d.ts
5508
- import { z as z50 } from "zod";
5509
- import { length as length40 } from "circuit-json";
5570
+ import { z as z51 } from "zod";
5571
+ import { length as length41 } from "circuit-json";
5510
5572
  var sod_def11 = base_def.extend({
5511
- fn: z50.string(),
5512
- num_pins: z50.literal(2).default(2),
5513
- w: z50.string().default("1.90mm"),
5514
- h: z50.string().default("1.33mm"),
5515
- pl: z50.string().default("0.5mm"),
5516
- pw: z50.string().default("0.7mm"),
5517
- p: z50.string().default("0.8mm")
5573
+ fn: z51.string(),
5574
+ num_pins: z51.literal(2).default(2),
5575
+ w: z51.string().default("1.90mm"),
5576
+ h: z51.string().default("1.33mm"),
5577
+ pl: z51.string().default("0.5mm"),
5578
+ pw: z51.string().default("0.7mm"),
5579
+ p: z51.string().default("0.8mm")
5518
5580
  });
5519
5581
  var sod882d = (raw_params) => {
5520
5582
  const parameters = sod_def11.parse(raw_params);
5521
5583
  const silkscreenRefText = silkscreenRef(
5522
5584
  0,
5523
- length40.parse(parameters.h) + 0.1,
5585
+ length41.parse(parameters.h) + 0.1,
5524
5586
  0.3
5525
5587
  );
5526
5588
  const silkscreenLine = {
@@ -5529,20 +5591,20 @@ var sod882d = (raw_params) => {
5529
5591
  pcb_component_id: "",
5530
5592
  route: [
5531
5593
  {
5532
- x: length40.parse(parameters.p) / 2 + 0.1,
5533
- y: length40.parse(parameters.h) / 2
5594
+ x: length41.parse(parameters.p) / 2 + 0.1,
5595
+ y: length41.parse(parameters.h) / 2
5534
5596
  },
5535
5597
  {
5536
- x: -length40.parse(parameters.w) / 2,
5537
- y: length40.parse(parameters.h) / 2
5598
+ x: -length41.parse(parameters.w) / 2,
5599
+ y: length41.parse(parameters.h) / 2
5538
5600
  },
5539
5601
  {
5540
- x: -length40.parse(parameters.w) / 2,
5541
- y: -length40.parse(parameters.h) / 2
5602
+ x: -length41.parse(parameters.w) / 2,
5603
+ y: -length41.parse(parameters.h) / 2
5542
5604
  },
5543
5605
  {
5544
- x: length40.parse(parameters.p) / 2 + 0.1,
5545
- y: -length40.parse(parameters.h) / 2
5606
+ x: length41.parse(parameters.p) / 2 + 0.1,
5607
+ y: -length41.parse(parameters.h) / 2
5546
5608
  }
5547
5609
  ],
5548
5610
  stroke_width: 0.1,
@@ -5585,22 +5647,22 @@ var sodWithoutParsing12 = (parameters) => {
5585
5647
  };
5586
5648
 
5587
5649
  // src/fn/melf.ts
5588
- import { z as z51 } from "zod";
5589
- import { length as length41 } from "circuit-json";
5650
+ import { z as z52 } from "zod";
5651
+ import { length as length42 } from "circuit-json";
5590
5652
  var melf_def = base_def.extend({
5591
- fn: z51.string(),
5592
- num_pins: z51.literal(2).default(2),
5593
- w: z51.string().default("7.0mm"),
5594
- h: z51.string().default("3.35mm"),
5595
- pl: z51.string().default("1.50mm"),
5596
- pw: z51.string().default("2.70mm"),
5597
- p: z51.string().default("4.8mm")
5653
+ fn: z52.string(),
5654
+ num_pins: z52.literal(2).default(2),
5655
+ w: z52.string().default("7.0mm"),
5656
+ h: z52.string().default("3.35mm"),
5657
+ pl: z52.string().default("1.50mm"),
5658
+ pw: z52.string().default("2.70mm"),
5659
+ p: z52.string().default("4.8mm")
5598
5660
  });
5599
5661
  var melf = (raw_params) => {
5600
5662
  const parameters = melf_def.parse(raw_params);
5601
5663
  const silkscreenRefText = silkscreenRef(
5602
5664
  0,
5603
- length41.parse(parameters.h),
5665
+ length42.parse(parameters.h),
5604
5666
  0.3
5605
5667
  );
5606
5668
  const silkscreenLine = {
@@ -5609,20 +5671,20 @@ var melf = (raw_params) => {
5609
5671
  pcb_component_id: "",
5610
5672
  route: [
5611
5673
  {
5612
- x: length41.parse(parameters.p) / 2,
5613
- y: length41.parse(parameters.h) / 2
5674
+ x: length42.parse(parameters.p) / 2,
5675
+ y: length42.parse(parameters.h) / 2
5614
5676
  },
5615
5677
  {
5616
- x: -length41.parse(parameters.w) / 2,
5617
- y: length41.parse(parameters.h) / 2
5678
+ x: -length42.parse(parameters.w) / 2,
5679
+ y: length42.parse(parameters.h) / 2
5618
5680
  },
5619
5681
  {
5620
- x: -length41.parse(parameters.w) / 2,
5621
- y: -length41.parse(parameters.h) / 2
5682
+ x: -length42.parse(parameters.w) / 2,
5683
+ y: -length42.parse(parameters.h) / 2
5622
5684
  },
5623
5685
  {
5624
- x: length41.parse(parameters.p) / 2,
5625
- y: -length41.parse(parameters.h) / 2
5686
+ x: length42.parse(parameters.p) / 2,
5687
+ y: -length42.parse(parameters.h) / 2
5626
5688
  }
5627
5689
  ],
5628
5690
  stroke_width: 0.1,
@@ -5665,22 +5727,22 @@ var melfWithoutParsing = (parameters) => {
5665
5727
  };
5666
5728
 
5667
5729
  // src/fn/micromelf.ts
5668
- import { z as z52 } from "zod";
5669
- import { length as length42 } from "circuit-json";
5730
+ import { z as z53 } from "zod";
5731
+ import { length as length43 } from "circuit-json";
5670
5732
  var micromelf_def = base_def.extend({
5671
- fn: z52.string(),
5672
- num_pins: z52.literal(2).default(2),
5673
- w: z52.string().default("3.0mm"),
5674
- h: z52.string().default("1.80mm"),
5675
- pl: z52.string().default("0.80mm"),
5676
- pw: z52.string().default("1.20mm"),
5677
- p: z52.string().default("1.6mm")
5733
+ fn: z53.string(),
5734
+ num_pins: z53.literal(2).default(2),
5735
+ w: z53.string().default("3.0mm"),
5736
+ h: z53.string().default("1.80mm"),
5737
+ pl: z53.string().default("0.80mm"),
5738
+ pw: z53.string().default("1.20mm"),
5739
+ p: z53.string().default("1.6mm")
5678
5740
  });
5679
5741
  var micromelf = (raw_params) => {
5680
5742
  const parameters = micromelf_def.parse(raw_params);
5681
5743
  const silkscreenRefText = silkscreenRef(
5682
5744
  0,
5683
- length42.parse(parameters.h),
5745
+ length43.parse(parameters.h),
5684
5746
  0.3
5685
5747
  );
5686
5748
  const silkscreenLine = {
@@ -5689,20 +5751,20 @@ var micromelf = (raw_params) => {
5689
5751
  pcb_component_id: "",
5690
5752
  route: [
5691
5753
  {
5692
- x: length42.parse(parameters.p) / 2,
5693
- y: length42.parse(parameters.h) / 2
5754
+ x: length43.parse(parameters.p) / 2,
5755
+ y: length43.parse(parameters.h) / 2
5694
5756
  },
5695
5757
  {
5696
- x: -length42.parse(parameters.w) / 2 - 0.1,
5697
- y: length42.parse(parameters.h) / 2
5758
+ x: -length43.parse(parameters.w) / 2 - 0.1,
5759
+ y: length43.parse(parameters.h) / 2
5698
5760
  },
5699
5761
  {
5700
- x: -length42.parse(parameters.w) / 2 - 0.1,
5701
- y: -length42.parse(parameters.h) / 2
5762
+ x: -length43.parse(parameters.w) / 2 - 0.1,
5763
+ y: -length43.parse(parameters.h) / 2
5702
5764
  },
5703
5765
  {
5704
- x: length42.parse(parameters.p) / 2,
5705
- y: -length42.parse(parameters.h) / 2
5766
+ x: length43.parse(parameters.p) / 2,
5767
+ y: -length43.parse(parameters.h) / 2
5706
5768
  }
5707
5769
  ],
5708
5770
  stroke_width: 0.1,
@@ -5745,22 +5807,22 @@ var microMelfWithoutParsing = (parameters) => {
5745
5807
  };
5746
5808
 
5747
5809
  // src/fn/sma.ts
5748
- import { z as z53 } from "zod";
5749
- import { length as length43 } from "circuit-json";
5810
+ import { z as z54 } from "zod";
5811
+ import { length as length44 } from "circuit-json";
5750
5812
  var sma_def = base_def.extend({
5751
- fn: z53.string(),
5752
- num_pins: z53.literal(2).default(2),
5753
- w: z53.string().default("7.10mm"),
5754
- h: z53.string().default("3.40mm"),
5755
- pl: z53.string().default("2.45mm"),
5756
- pw: z53.string().default("1.80mm"),
5757
- p: z53.string().default("4.05mm")
5813
+ fn: z54.string(),
5814
+ num_pins: z54.literal(2).default(2),
5815
+ w: z54.string().default("7.10mm"),
5816
+ h: z54.string().default("3.40mm"),
5817
+ pl: z54.string().default("2.45mm"),
5818
+ pw: z54.string().default("1.80mm"),
5819
+ p: z54.string().default("4.05mm")
5758
5820
  });
5759
5821
  var sma = (raw_params) => {
5760
5822
  const parameters = sma_def.parse(raw_params);
5761
5823
  const silkscreenRefText = silkscreenRef(
5762
5824
  0,
5763
- length43.parse(parameters.h) / 2 + 0.5,
5825
+ length44.parse(parameters.h) / 2 + 0.5,
5764
5826
  0.3
5765
5827
  );
5766
5828
  const silkscreenLine = {
@@ -5769,20 +5831,20 @@ var sma = (raw_params) => {
5769
5831
  pcb_component_id: "",
5770
5832
  route: [
5771
5833
  {
5772
- x: length43.parse(parameters.p) / 2,
5773
- y: length43.parse(parameters.h) / 2
5834
+ x: length44.parse(parameters.p) / 2,
5835
+ y: length44.parse(parameters.h) / 2
5774
5836
  },
5775
5837
  {
5776
- x: -length43.parse(parameters.w) / 2 - 0.5,
5777
- y: length43.parse(parameters.h) / 2
5838
+ x: -length44.parse(parameters.w) / 2 - 0.5,
5839
+ y: length44.parse(parameters.h) / 2
5778
5840
  },
5779
5841
  {
5780
- x: -length43.parse(parameters.w) / 2 - 0.5,
5781
- y: -length43.parse(parameters.h) / 2
5842
+ x: -length44.parse(parameters.w) / 2 - 0.5,
5843
+ y: -length44.parse(parameters.h) / 2
5782
5844
  },
5783
5845
  {
5784
- x: length43.parse(parameters.p) / 2,
5785
- y: -length43.parse(parameters.h) / 2
5846
+ x: length44.parse(parameters.p) / 2,
5847
+ y: -length44.parse(parameters.h) / 2
5786
5848
  }
5787
5849
  ],
5788
5850
  stroke_width: 0.1,
@@ -5824,22 +5886,22 @@ var smaWithoutParsing = (parameters) => {
5824
5886
  };
5825
5887
 
5826
5888
  // src/fn/smf.ts
5827
- import { z as z54 } from "zod";
5828
- import { length as length44 } from "circuit-json";
5889
+ import { z as z55 } from "zod";
5890
+ import { length as length45 } from "circuit-json";
5829
5891
  var smf_def = base_def.extend({
5830
- fn: z54.string(),
5831
- num_pins: z54.literal(2).default(2),
5832
- w: z54.string().default("4.80mm"),
5833
- h: z54.string().default("2.10mm"),
5834
- pl: z54.string().default("1.30mm"),
5835
- pw: z54.string().default("1.40mm"),
5836
- p: z54.string().default("2.9mm")
5892
+ fn: z55.string(),
5893
+ num_pins: z55.literal(2).default(2),
5894
+ w: z55.string().default("4.80mm"),
5895
+ h: z55.string().default("2.10mm"),
5896
+ pl: z55.string().default("1.30mm"),
5897
+ pw: z55.string().default("1.40mm"),
5898
+ p: z55.string().default("2.9mm")
5837
5899
  });
5838
5900
  var smf = (raw_params) => {
5839
5901
  const parameters = smf_def.parse(raw_params);
5840
5902
  const silkscreenRefText = silkscreenRef(
5841
5903
  0,
5842
- length44.parse(parameters.h) - 0.5,
5904
+ length45.parse(parameters.h) - 0.5,
5843
5905
  0.3
5844
5906
  );
5845
5907
  const silkscreenLine = {
@@ -5848,20 +5910,20 @@ var smf = (raw_params) => {
5848
5910
  pcb_component_id: "",
5849
5911
  route: [
5850
5912
  {
5851
- x: length44.parse(parameters.p) / 2,
5852
- y: length44.parse(parameters.h) / 2
5913
+ x: length45.parse(parameters.p) / 2,
5914
+ y: length45.parse(parameters.h) / 2
5853
5915
  },
5854
5916
  {
5855
- x: -length44.parse(parameters.w) / 2,
5856
- y: length44.parse(parameters.h) / 2
5917
+ x: -length45.parse(parameters.w) / 2,
5918
+ y: length45.parse(parameters.h) / 2
5857
5919
  },
5858
5920
  {
5859
- x: -length44.parse(parameters.w) / 2,
5860
- y: -length44.parse(parameters.h) / 2
5921
+ x: -length45.parse(parameters.w) / 2,
5922
+ y: -length45.parse(parameters.h) / 2
5861
5923
  },
5862
5924
  {
5863
- x: length44.parse(parameters.p) / 2,
5864
- y: -length44.parse(parameters.h) / 2
5925
+ x: length45.parse(parameters.p) / 2,
5926
+ y: -length45.parse(parameters.h) / 2
5865
5927
  }
5866
5928
  ],
5867
5929
  stroke_width: 0.1,
@@ -5904,22 +5966,22 @@ var smfWithoutParsing = (parameters) => {
5904
5966
  };
5905
5967
 
5906
5968
  // src/fn/smb.ts
5907
- import { z as z55 } from "zod";
5908
- import { length as length45 } from "circuit-json";
5969
+ import { z as z56 } from "zod";
5970
+ import { length as length46 } from "circuit-json";
5909
5971
  var smb_def = base_def.extend({
5910
- fn: z55.string(),
5911
- num_pins: z55.literal(2).default(2),
5912
- w: z55.string().default("7.30mm"),
5913
- h: z55.string().default("4.40mm"),
5914
- pl: z55.string().default("2.50mm"),
5915
- pw: z55.string().default("2.30mm"),
5916
- p: z55.string().default("4.30mm")
5972
+ fn: z56.string(),
5973
+ num_pins: z56.literal(2).default(2),
5974
+ w: z56.string().default("7.30mm"),
5975
+ h: z56.string().default("4.40mm"),
5976
+ pl: z56.string().default("2.50mm"),
5977
+ pw: z56.string().default("2.30mm"),
5978
+ p: z56.string().default("4.30mm")
5917
5979
  });
5918
5980
  var smb = (raw_params) => {
5919
5981
  const parameters = smb_def.parse(raw_params);
5920
5982
  const silkscreenRefText = silkscreenRef(
5921
5983
  0,
5922
- length45.parse(parameters.h) / 2 + 0.5,
5984
+ length46.parse(parameters.h) / 2 + 0.5,
5923
5985
  0.3
5924
5986
  );
5925
5987
  const silkscreenLine = {
@@ -5928,20 +5990,20 @@ var smb = (raw_params) => {
5928
5990
  pcb_component_id: "",
5929
5991
  route: [
5930
5992
  {
5931
- x: length45.parse(parameters.p) / 2,
5932
- y: length45.parse(parameters.h) / 2
5993
+ x: length46.parse(parameters.p) / 2,
5994
+ y: length46.parse(parameters.h) / 2
5933
5995
  },
5934
5996
  {
5935
- x: -length45.parse(parameters.w) / 2 - 0.1,
5936
- y: length45.parse(parameters.h) / 2
5997
+ x: -length46.parse(parameters.w) / 2 - 0.1,
5998
+ y: length46.parse(parameters.h) / 2
5937
5999
  },
5938
6000
  {
5939
- x: -length45.parse(parameters.w) / 2 - 0.1,
5940
- y: -length45.parse(parameters.h) / 2
6001
+ x: -length46.parse(parameters.w) / 2 - 0.1,
6002
+ y: -length46.parse(parameters.h) / 2
5941
6003
  },
5942
6004
  {
5943
- x: length45.parse(parameters.p) / 2,
5944
- y: -length45.parse(parameters.h) / 2
6005
+ x: length46.parse(parameters.p) / 2,
6006
+ y: -length46.parse(parameters.h) / 2
5945
6007
  }
5946
6008
  ],
5947
6009
  stroke_width: 0.1,
@@ -5984,16 +6046,16 @@ var smbWithoutParsing = (parameters) => {
5984
6046
  };
5985
6047
 
5986
6048
  // src/fn/smc.ts
5987
- import { z as z56 } from "zod";
5988
- import { length as length46 } from "circuit-json";
6049
+ import { z as z57 } from "zod";
6050
+ import { length as length47 } from "circuit-json";
5989
6051
  var smc_def = base_def.extend({
5990
- fn: z56.string(),
5991
- num_pins: z56.literal(2).default(2),
5992
- w: z56.string().default("10.70mm"),
5993
- h: z56.string().default("6.60mm"),
5994
- pl: z56.string().default("3.30mm"),
5995
- pw: z56.string().default("2.50mm"),
5996
- p: z56.string().default("6.80mm")
6052
+ fn: z57.string(),
6053
+ num_pins: z57.literal(2).default(2),
6054
+ w: z57.string().default("10.70mm"),
6055
+ h: z57.string().default("6.60mm"),
6056
+ pl: z57.string().default("3.30mm"),
6057
+ pw: z57.string().default("2.50mm"),
6058
+ p: z57.string().default("6.80mm")
5997
6059
  });
5998
6060
  var smc = (raw_params) => {
5999
6061
  const parameters = smc_def.parse(raw_params);
@@ -6004,20 +6066,20 @@ var smc = (raw_params) => {
6004
6066
  pcb_component_id: "",
6005
6067
  route: [
6006
6068
  {
6007
- x: length46.parse(parameters.p) / 2,
6008
- y: length46.parse(parameters.h) / 2 - 0.8
6069
+ x: length47.parse(parameters.p) / 2,
6070
+ y: length47.parse(parameters.h) / 2 - 0.8
6009
6071
  },
6010
6072
  {
6011
- x: -length46.parse(parameters.w) / 2 - 0.8,
6012
- y: length46.parse(parameters.h) / 2 - 0.8
6073
+ x: -length47.parse(parameters.w) / 2 - 0.8,
6074
+ y: length47.parse(parameters.h) / 2 - 0.8
6013
6075
  },
6014
6076
  {
6015
- x: -length46.parse(parameters.w) / 2 - 0.8,
6016
- y: -length46.parse(parameters.h) / 2 + 0.8
6077
+ x: -length47.parse(parameters.w) / 2 - 0.8,
6078
+ y: -length47.parse(parameters.h) / 2 + 0.8
6017
6079
  },
6018
6080
  {
6019
- x: length46.parse(parameters.p) / 2,
6020
- y: -length46.parse(parameters.h) / 2 + 0.8
6081
+ x: length47.parse(parameters.p) / 2,
6082
+ y: -length47.parse(parameters.h) / 2 + 0.8
6021
6083
  }
6022
6084
  ],
6023
6085
  stroke_width: 0.1,
@@ -6059,16 +6121,16 @@ var smcWithoutParsing = (parameters) => {
6059
6121
  };
6060
6122
 
6061
6123
  // src/fn/sot223.ts
6062
- import { z as z57 } from "zod";
6124
+ import { z as z58 } from "zod";
6063
6125
  var sot223_def = base_def.extend({
6064
- fn: z57.string(),
6065
- num_pins: z57.number().default(4),
6066
- w: z57.string().default("8.50mm"),
6067
- h: z57.string().default("6.90mm"),
6068
- pl: z57.string().default("2mm"),
6069
- pw: z57.string().default("1.5mm"),
6070
- p: z57.string().default("2.30mm"),
6071
- string: z57.string().optional()
6126
+ fn: z58.string(),
6127
+ num_pins: z58.number().default(4),
6128
+ w: z58.string().default("8.50mm"),
6129
+ h: z58.string().default("6.90mm"),
6130
+ pl: z58.string().default("2mm"),
6131
+ pw: z58.string().default("1.5mm"),
6132
+ p: z58.string().default("2.30mm"),
6133
+ string: z58.string().optional()
6072
6134
  });
6073
6135
  var sot223 = (raw_params) => {
6074
6136
  const match = raw_params.string?.match(/^sot223_(\d+)/);
@@ -6314,16 +6376,16 @@ var sot223_6 = (parameters) => {
6314
6376
  };
6315
6377
 
6316
6378
  // src/fn/sot23w.ts
6317
- import { z as z58 } from "zod";
6379
+ import { z as z59 } from "zod";
6318
6380
  var sot23w_def = base_def.extend({
6319
- fn: z58.string(),
6320
- num_pins: z58.number().default(3),
6321
- w: z58.string().default("3.40mm"),
6322
- h: z58.string().default("3.30mm"),
6323
- pl: z58.string().default("1mm"),
6324
- pw: z58.string().default("0.7mm"),
6325
- p: z58.string().default("1.2mm"),
6326
- string: z58.string().optional()
6381
+ fn: z59.string(),
6382
+ num_pins: z59.number().default(3),
6383
+ w: z59.string().default("3.40mm"),
6384
+ h: z59.string().default("3.30mm"),
6385
+ pl: z59.string().default("1mm"),
6386
+ pw: z59.string().default("0.7mm"),
6387
+ p: z59.string().default("1.2mm"),
6388
+ string: z59.string().optional()
6327
6389
  });
6328
6390
  var sot23w = (raw_params) => {
6329
6391
  const match = raw_params.string?.match(/^sot23w_(\d+)/);
@@ -6411,16 +6473,16 @@ var sot23w_3 = (parameters) => {
6411
6473
  };
6412
6474
 
6413
6475
  // src/fn/to92s.ts
6414
- import { z as z59 } from "zod";
6476
+ import { z as z60 } from "zod";
6415
6477
  var to92s_def = base_def.extend({
6416
- fn: z59.string(),
6417
- num_pins: z59.union([z59.literal(3), z59.literal(2)]).default(3),
6418
- p: z59.string().default("1.27mm"),
6419
- id: z59.string().default("0.72mm"),
6420
- od: z59.string().default("0.95mm"),
6421
- w: z59.string().default("2.5mm"),
6422
- h: z59.string().default("4.2mm"),
6423
- string: z59.string().optional()
6478
+ fn: z60.string(),
6479
+ num_pins: z60.union([z60.literal(3), z60.literal(2)]).default(3),
6480
+ p: z60.string().default("1.27mm"),
6481
+ id: z60.string().default("0.72mm"),
6482
+ od: z60.string().default("0.95mm"),
6483
+ w: z60.string().default("2.5mm"),
6484
+ h: z60.string().default("4.2mm"),
6485
+ string: z60.string().optional()
6424
6486
  });
6425
6487
  var to92s_3 = (parameters) => {
6426
6488
  const { p, id, od, w, h } = parameters;
@@ -6487,51 +6549,51 @@ var to92s = (raw_params) => {
6487
6549
 
6488
6550
  // src/fn/jst.ts
6489
6551
  import {
6490
- length as length47
6552
+ length as length48
6491
6553
  } from "circuit-json";
6492
- import { z as z60 } from "zod";
6554
+ import { z as z61 } from "zod";
6493
6555
  var jst_def = base_def.extend({
6494
- fn: z60.string(),
6495
- p: length47.optional(),
6496
- id: length47.optional(),
6497
- pw: length47.optional(),
6498
- pl: length47.optional(),
6499
- w: length47.optional(),
6500
- h: length47.optional(),
6501
- sh: z60.boolean().optional().describe(
6556
+ fn: z61.string(),
6557
+ p: length48.optional(),
6558
+ id: length48.optional(),
6559
+ pw: length48.optional(),
6560
+ pl: length48.optional(),
6561
+ w: length48.optional(),
6562
+ h: length48.optional(),
6563
+ sh: z61.boolean().optional().describe(
6502
6564
  'JST SH (Surface-mount) connector family. SH stands for "Super High-density".'
6503
6565
  ),
6504
- ph: z60.boolean().optional().describe(
6566
+ ph: z61.boolean().optional().describe(
6505
6567
  'JST PH (Through-hole) connector family. PH stands for "Pin Header".'
6506
6568
  ),
6507
- zh: z60.boolean().optional().describe(
6569
+ zh: z61.boolean().optional().describe(
6508
6570
  "JST ZH (Through-hole) connector family. 1.5mm pitch wire-to-board."
6509
6571
  ),
6510
- string: z60.string().optional()
6572
+ string: z61.string().optional()
6511
6573
  });
6512
6574
  var variantDefaults = {
6513
6575
  ph: {
6514
- p: length47.parse("2.2mm"),
6515
- id: length47.parse("0.70mm"),
6516
- pw: length47.parse("1.20mm"),
6517
- pl: length47.parse("1.20mm"),
6518
- w: length47.parse("6mm"),
6519
- h: length47.parse("5mm")
6576
+ p: length48.parse("2.2mm"),
6577
+ id: length48.parse("0.70mm"),
6578
+ pw: length48.parse("1.20mm"),
6579
+ pl: length48.parse("1.20mm"),
6580
+ w: length48.parse("6mm"),
6581
+ h: length48.parse("5mm")
6520
6582
  },
6521
6583
  sh: {
6522
- p: length47.parse("1mm"),
6523
- pw: length47.parse("0.6mm"),
6524
- pl: length47.parse("1.55mm"),
6525
- w: length47.parse("5.8mm"),
6526
- h: length47.parse("7.8mm")
6584
+ p: length48.parse("1mm"),
6585
+ pw: length48.parse("0.6mm"),
6586
+ pl: length48.parse("1.55mm"),
6587
+ w: length48.parse("5.8mm"),
6588
+ h: length48.parse("7.8mm")
6527
6589
  },
6528
6590
  zh: {
6529
- p: length47.parse("1.5mm"),
6530
- id: length47.parse("0.73mm"),
6531
- pw: length47.parse("1.03mm"),
6532
- pl: length47.parse("1.73mm"),
6533
- w: length47.parse("3mm"),
6534
- h: length47.parse("3.5mm")
6591
+ p: length48.parse("1.5mm"),
6592
+ id: length48.parse("0.73mm"),
6593
+ pw: length48.parse("1.03mm"),
6594
+ pl: length48.parse("1.73mm"),
6595
+ w: length48.parse("3mm"),
6596
+ h: length48.parse("3.5mm")
6535
6597
  }
6536
6598
  };
6537
6599
  function getVariant(params) {
@@ -6693,22 +6755,22 @@ var jst = (raw_params) => {
6693
6755
  };
6694
6756
 
6695
6757
  // src/fn/sod110.ts
6696
- import { z as z61 } from "zod";
6697
- import { length as length48 } from "circuit-json";
6758
+ import { z as z62 } from "zod";
6759
+ import { length as length49 } from "circuit-json";
6698
6760
  var sod_def12 = base_def.extend({
6699
- fn: z61.string(),
6700
- num_pins: z61.literal(2).default(2),
6701
- w: z61.string().default("3.30mm"),
6702
- h: z61.string().default("1.70mm"),
6703
- pl: z61.string().default("0.80mm"),
6704
- pw: z61.string().default("1mm"),
6705
- p: z61.string().default("1.90mm")
6761
+ fn: z62.string(),
6762
+ num_pins: z62.literal(2).default(2),
6763
+ w: z62.string().default("3.30mm"),
6764
+ h: z62.string().default("1.70mm"),
6765
+ pl: z62.string().default("0.80mm"),
6766
+ pw: z62.string().default("1mm"),
6767
+ p: z62.string().default("1.90mm")
6706
6768
  });
6707
6769
  var sod110 = (raw_params) => {
6708
6770
  const parameters = sod_def12.parse(raw_params);
6709
6771
  const silkscreenRefText = silkscreenRef(
6710
6772
  0,
6711
- length48.parse(parameters.h) / 2 + 0.5,
6773
+ length49.parse(parameters.h) / 2 + 0.5,
6712
6774
  0.3
6713
6775
  );
6714
6776
  const silkscreenLine = {
@@ -6717,20 +6779,20 @@ var sod110 = (raw_params) => {
6717
6779
  pcb_component_id: "",
6718
6780
  route: [
6719
6781
  {
6720
- x: length48.parse(parameters.p) / 2,
6721
- y: length48.parse(parameters.h) / 2
6782
+ x: length49.parse(parameters.p) / 2,
6783
+ y: length49.parse(parameters.h) / 2
6722
6784
  },
6723
6785
  {
6724
- x: -length48.parse(parameters.w) / 2,
6725
- y: length48.parse(parameters.h) / 2
6786
+ x: -length49.parse(parameters.w) / 2,
6787
+ y: length49.parse(parameters.h) / 2
6726
6788
  },
6727
6789
  {
6728
- x: -length48.parse(parameters.w) / 2,
6729
- y: -length48.parse(parameters.h) / 2
6790
+ x: -length49.parse(parameters.w) / 2,
6791
+ y: -length49.parse(parameters.h) / 2
6730
6792
  },
6731
6793
  {
6732
- x: length48.parse(parameters.p) / 2,
6733
- y: -length48.parse(parameters.h) / 2
6794
+ x: length49.parse(parameters.p) / 2,
6795
+ y: -length49.parse(parameters.h) / 2
6734
6796
  }
6735
6797
  ],
6736
6798
  stroke_width: 0.1,
@@ -6772,8 +6834,8 @@ var sodWithoutParsing13 = (parameters) => {
6772
6834
  };
6773
6835
 
6774
6836
  // src/fn/vssop.ts
6775
- import { z as z62 } from "zod";
6776
- import { length as length49 } from "circuit-json";
6837
+ import { z as z63 } from "zod";
6838
+ import { length as length50 } from "circuit-json";
6777
6839
  var getDefaultValues = (num_pins) => {
6778
6840
  switch (num_pins) {
6779
6841
  case 8:
@@ -6803,23 +6865,23 @@ var getDefaultValues = (num_pins) => {
6803
6865
  }
6804
6866
  };
6805
6867
  var vssop_def = base_def.extend({
6806
- fn: z62.string(),
6807
- num_pins: z62.union([z62.literal(8), z62.literal(10)]).default(8),
6808
- w: z62.string().optional(),
6809
- h: z62.string().optional(),
6810
- p: z62.string().optional(),
6811
- pl: z62.string().optional(),
6812
- pw: z62.string().optional(),
6813
- string: z62.string().optional()
6868
+ fn: z63.string(),
6869
+ num_pins: z63.union([z63.literal(8), z63.literal(10)]).default(8),
6870
+ w: z63.string().optional(),
6871
+ h: z63.string().optional(),
6872
+ p: z63.string().optional(),
6873
+ pl: z63.string().optional(),
6874
+ pw: z63.string().optional(),
6875
+ string: z63.string().optional()
6814
6876
  });
6815
6877
  var vssop = (raw_params) => {
6816
6878
  const parameters = vssop_def.parse(raw_params);
6817
6879
  const defaults = getDefaultValues(parameters.num_pins);
6818
- const w = length49.parse(parameters.w || defaults.w);
6819
- const h = length49.parse(parameters.h || defaults.h);
6820
- const p = length49.parse(parameters.p || defaults.p);
6821
- const pl = length49.parse(parameters.pl || defaults.pl);
6822
- const pw = length49.parse(parameters.pw || defaults.pw);
6880
+ const w = length50.parse(parameters.w || defaults.w);
6881
+ const h = length50.parse(parameters.h || defaults.h);
6882
+ const p = length50.parse(parameters.p || defaults.p);
6883
+ const pl = length50.parse(parameters.pl || defaults.pl);
6884
+ const pw = length50.parse(parameters.pw || defaults.pw);
6823
6885
  const pads = [];
6824
6886
  const half = parameters.num_pins / 2;
6825
6887
  for (let i = 0; i < parameters.num_pins; i++) {
@@ -6896,14 +6958,14 @@ var getVssopPadCoord = (pinCount, pn, w, p) => {
6896
6958
  const col = pn <= half ? -1 : 1;
6897
6959
  const row = (half - 1) / 2 - rowIndex;
6898
6960
  return {
6899
- x: col * length49.parse(pinCount === 8 ? "1.8mm" : "2.2mm"),
6961
+ x: col * length50.parse(pinCount === 8 ? "1.8mm" : "2.2mm"),
6900
6962
  y: row * p
6901
6963
  };
6902
6964
  };
6903
6965
 
6904
6966
  // src/fn/msop.ts
6905
- import { z as z63 } from "zod";
6906
- import { length as length50 } from "circuit-json";
6967
+ import { z as z64 } from "zod";
6968
+ import { length as length51 } from "circuit-json";
6907
6969
  var getDefaultValues2 = (num_pins) => {
6908
6970
  switch (num_pins) {
6909
6971
  case 10:
@@ -6941,14 +7003,14 @@ var getDefaultValues2 = (num_pins) => {
6941
7003
  }
6942
7004
  };
6943
7005
  var msop_def = base_def.extend({
6944
- fn: z63.string(),
6945
- num_pins: z63.union([z63.literal(8), z63.literal(10), z63.literal(12), z63.literal(16)]).default(8),
6946
- w: z63.string().optional(),
6947
- h: z63.string().optional(),
6948
- p: z63.string().optional(),
6949
- pl: z63.string().optional(),
6950
- pw: z63.string().optional(),
6951
- string: z63.string().optional()
7006
+ fn: z64.string(),
7007
+ num_pins: z64.union([z64.literal(8), z64.literal(10), z64.literal(12), z64.literal(16)]).default(8),
7008
+ w: z64.string().optional(),
7009
+ h: z64.string().optional(),
7010
+ p: z64.string().optional(),
7011
+ pl: z64.string().optional(),
7012
+ pw: z64.string().optional(),
7013
+ string: z64.string().optional()
6952
7014
  });
6953
7015
  var getMsopCoords = (pinCount, pn, w, p) => {
6954
7016
  const half = pinCount / 2;
@@ -6956,18 +7018,18 @@ var getMsopCoords = (pinCount, pn, w, p) => {
6956
7018
  const col = pn <= half ? -1 : 1;
6957
7019
  const row = (half - 1) / 2 - rowIndex;
6958
7020
  return {
6959
- x: col * length50.parse("2mm"),
7021
+ x: col * length51.parse("2mm"),
6960
7022
  y: row * p
6961
7023
  };
6962
7024
  };
6963
7025
  var msop = (raw_params) => {
6964
7026
  const parameters = msop_def.parse(raw_params);
6965
7027
  const defaults = getDefaultValues2(parameters.num_pins);
6966
- const w = length50.parse(parameters.w || defaults.w);
6967
- const h = length50.parse(parameters.h || defaults.h);
6968
- const p = length50.parse(parameters.p || defaults.p);
6969
- const pl = length50.parse(parameters.pl || defaults.pl);
6970
- const pw = length50.parse(parameters.pw || defaults.pw);
7028
+ const w = length51.parse(parameters.w || defaults.w);
7029
+ const h = length51.parse(parameters.h || defaults.h);
7030
+ const p = length51.parse(parameters.p || defaults.p);
7031
+ const pl = length51.parse(parameters.pl || defaults.pl);
7032
+ const pw = length51.parse(parameters.pw || defaults.pw);
6971
7033
  const pads = [];
6972
7034
  for (let i = 0; i < parameters.num_pins; i++) {
6973
7035
  const { x, y } = getMsopCoords(parameters.num_pins, i + 1, w, p);
@@ -7038,22 +7100,22 @@ var msop = (raw_params) => {
7038
7100
  };
7039
7101
 
7040
7102
  // src/fn/sod323w.ts
7041
- import { z as z64 } from "zod";
7042
- import { length as length51 } from "circuit-json";
7103
+ import { z as z65 } from "zod";
7104
+ import { length as length52 } from "circuit-json";
7043
7105
  var sod323w_def = base_def.extend({
7044
- fn: z64.string(),
7045
- num_pins: z64.literal(2).default(2),
7046
- w: z64.string().default("3.8mm"),
7047
- h: z64.string().default("1.65mm"),
7048
- pl: z64.string().default("1.2mm"),
7049
- pw: z64.string().default("1.2mm"),
7050
- pad_spacing: z64.string().default("2.6mm")
7106
+ fn: z65.string(),
7107
+ num_pins: z65.literal(2).default(2),
7108
+ w: z65.string().default("3.8mm"),
7109
+ h: z65.string().default("1.65mm"),
7110
+ pl: z65.string().default("1.2mm"),
7111
+ pw: z65.string().default("1.2mm"),
7112
+ pad_spacing: z65.string().default("2.6mm")
7051
7113
  });
7052
7114
  var sod323w = (raw_params) => {
7053
7115
  const parameters = sod323w_def.parse(raw_params);
7054
7116
  const silkscreenRefText = silkscreenRef(
7055
7117
  0,
7056
- length51.parse(parameters.h),
7118
+ length52.parse(parameters.h),
7057
7119
  0.3
7058
7120
  );
7059
7121
  const silkscreenLine = {
@@ -7062,20 +7124,20 @@ var sod323w = (raw_params) => {
7062
7124
  pcb_component_id: "",
7063
7125
  route: [
7064
7126
  {
7065
- x: length51.parse(parameters.pad_spacing) / 2,
7066
- y: length51.parse(parameters.h) / 2
7127
+ x: length52.parse(parameters.pad_spacing) / 2,
7128
+ y: length52.parse(parameters.h) / 2
7067
7129
  },
7068
7130
  {
7069
- x: -length51.parse(parameters.w) / 2 - 0.2,
7070
- y: length51.parse(parameters.h) / 2
7131
+ x: -length52.parse(parameters.w) / 2 - 0.2,
7132
+ y: length52.parse(parameters.h) / 2
7071
7133
  },
7072
7134
  {
7073
- x: -length51.parse(parameters.w) / 2 - 0.2,
7074
- y: -length51.parse(parameters.h) / 2
7135
+ x: -length52.parse(parameters.w) / 2 - 0.2,
7136
+ y: -length52.parse(parameters.h) / 2
7075
7137
  },
7076
7138
  {
7077
- x: length51.parse(parameters.pad_spacing) / 2,
7078
- y: -length51.parse(parameters.h) / 2
7139
+ x: length52.parse(parameters.pad_spacing) / 2,
7140
+ y: -length52.parse(parameters.h) / 2
7079
7141
  }
7080
7142
  ],
7081
7143
  stroke_width: 0.1,
@@ -7118,22 +7180,22 @@ var sodWithoutParsing14 = (parameters) => {
7118
7180
  };
7119
7181
 
7120
7182
  // src/fn/sod323fl.ts
7121
- import { z as z65 } from "zod";
7122
- import { length as length52 } from "circuit-json";
7183
+ import { z as z66 } from "zod";
7184
+ import { length as length53 } from "circuit-json";
7123
7185
  var sod323FL_def = base_def.extend({
7124
- fn: z65.string(),
7125
- num_pins: z65.literal(2).default(2),
7126
- w: z65.string().default("3.20mm"),
7127
- h: z65.string().default("1.65mm"),
7128
- pl: z65.string().default("0.8mm"),
7129
- pw: z65.string().default("0.9mm"),
7130
- pad_spacing: z65.string().default("2.1mm")
7186
+ fn: z66.string(),
7187
+ num_pins: z66.literal(2).default(2),
7188
+ w: z66.string().default("3.20mm"),
7189
+ h: z66.string().default("1.65mm"),
7190
+ pl: z66.string().default("0.8mm"),
7191
+ pw: z66.string().default("0.9mm"),
7192
+ pad_spacing: z66.string().default("2.1mm")
7131
7193
  });
7132
7194
  var sod323fl = (raw_params) => {
7133
7195
  const parameters = sod323FL_def.parse(raw_params);
7134
7196
  const silkscreenRefText = silkscreenRef(
7135
7197
  0,
7136
- length52.parse(parameters.h),
7198
+ length53.parse(parameters.h),
7137
7199
  0.3
7138
7200
  );
7139
7201
  const silkscreenLine = {
@@ -7142,20 +7204,20 @@ var sod323fl = (raw_params) => {
7142
7204
  pcb_component_id: "",
7143
7205
  route: [
7144
7206
  {
7145
- x: length52.parse(parameters.pad_spacing) / 2,
7146
- y: length52.parse(parameters.h) / 2
7207
+ x: length53.parse(parameters.pad_spacing) / 2,
7208
+ y: length53.parse(parameters.h) / 2
7147
7209
  },
7148
7210
  {
7149
- x: -length52.parse(parameters.w) / 2 - 0.2,
7150
- y: length52.parse(parameters.h) / 2
7211
+ x: -length53.parse(parameters.w) / 2 - 0.2,
7212
+ y: length53.parse(parameters.h) / 2
7151
7213
  },
7152
7214
  {
7153
- x: -length52.parse(parameters.w) / 2 - 0.2,
7154
- y: -length52.parse(parameters.h) / 2
7215
+ x: -length53.parse(parameters.w) / 2 - 0.2,
7216
+ y: -length53.parse(parameters.h) / 2
7155
7217
  },
7156
7218
  {
7157
- x: length52.parse(parameters.pad_spacing) / 2,
7158
- y: -length52.parse(parameters.h) / 2
7219
+ x: length53.parse(parameters.pad_spacing) / 2,
7220
+ y: -length53.parse(parameters.h) / 2
7159
7221
  }
7160
7222
  ],
7161
7223
  stroke_width: 0.1,
@@ -7198,20 +7260,20 @@ var sodWithoutParsing15 = (parameters) => {
7198
7260
  };
7199
7261
 
7200
7262
  // src/fn/son.ts
7201
- import { z as z66 } from "zod";
7202
- import { length as length53 } from "circuit-json";
7263
+ import { z as z67 } from "zod";
7264
+ import { length as length54 } from "circuit-json";
7203
7265
  var son_def = base_def.extend({
7204
- fn: z66.string(),
7205
- num_pins: z66.union([z66.literal(6), z66.literal(8)]).default(8),
7206
- w: z66.string().default("3mm"),
7207
- h: z66.string().default("3mm"),
7208
- p: z66.string().default("0.5mm"),
7209
- pl: z66.string().default("0.52mm"),
7210
- pw: z66.string().default("0.35mm"),
7211
- epw: z66.string().default("1.40mm"),
7212
- eph: z66.string().default("1.60mm"),
7213
- string: z66.string().optional(),
7214
- ep: z66.boolean().default(false)
7266
+ fn: z67.string(),
7267
+ num_pins: z67.union([z67.literal(6), z67.literal(8)]).default(8),
7268
+ w: z67.string().default("3mm"),
7269
+ h: z67.string().default("3mm"),
7270
+ p: z67.string().default("0.5mm"),
7271
+ pl: z67.string().default("0.52mm"),
7272
+ pw: z67.string().default("0.35mm"),
7273
+ epw: z67.string().default("1.40mm"),
7274
+ eph: z67.string().default("1.60mm"),
7275
+ string: z67.string().optional(),
7276
+ ep: z67.boolean().default(false)
7215
7277
  });
7216
7278
  var son = (raw_params) => {
7217
7279
  if (raw_params.string && raw_params.string.includes("_ep")) {
@@ -7223,13 +7285,13 @@ var son = (raw_params) => {
7223
7285
  ...raw_params,
7224
7286
  num_pins: numPins
7225
7287
  });
7226
- const w = length53.parse(parameters.w);
7227
- const h = length53.parse(parameters.h);
7228
- const p = length53.parse(parameters.p);
7229
- const pl = length53.parse(parameters.pl);
7230
- const pw = length53.parse(parameters.pw);
7231
- const epw = length53.parse(parameters.epw);
7232
- const eph = length53.parse(parameters.eph);
7288
+ const w = length54.parse(parameters.w);
7289
+ const h = length54.parse(parameters.h);
7290
+ const p = length54.parse(parameters.p);
7291
+ const pl = length54.parse(parameters.pl);
7292
+ const pw = length54.parse(parameters.pw);
7293
+ const epw = length54.parse(parameters.epw);
7294
+ const eph = length54.parse(parameters.eph);
7233
7295
  const pads = [];
7234
7296
  for (let i = 0; i < parameters.num_pins; i++) {
7235
7297
  const { x, y } = getSonPadCoord(parameters.num_pins, i + 1, w, p);
@@ -7307,24 +7369,24 @@ var getSonPadCoord = (num_pins, pn, w, p) => {
7307
7369
  const col = pn <= half ? -1 : 1;
7308
7370
  const row = (half - 1) / 2 - rowIndex;
7309
7371
  return {
7310
- x: col * length53.parse("1.4mm"),
7372
+ x: col * length54.parse("1.4mm"),
7311
7373
  y: row * p
7312
7374
  };
7313
7375
  };
7314
7376
 
7315
7377
  // src/fn/vson.ts
7316
- import { z as z67 } from "zod";
7317
- import { length as length54, distance as distance3 } from "circuit-json";
7378
+ import { z as z68 } from "zod";
7379
+ import { length as length55, distance as distance3 } from "circuit-json";
7318
7380
  var vson_def = base_def.extend({
7319
- fn: z67.string(),
7320
- num_pins: z67.number().optional().default(8),
7381
+ fn: z68.string(),
7382
+ num_pins: z68.number().optional().default(8),
7321
7383
  p: distance3.describe("pitch (distance between center of each pin)"),
7322
- w: length54.describe("width between vertical rows of pins"),
7384
+ w: length55.describe("width between vertical rows of pins"),
7323
7385
  grid: dim2d.describe("width and height of the border of the footprint"),
7324
7386
  ep: dim2d.default("0x0mm").describe("width and height of the central exposed thermal pad"),
7325
- epx: length54.default("0mm").describe("x offset of the center of the central exposed thermal pad"),
7326
- pinw: length54.describe("width of the pin pads"),
7327
- pinh: length54.describe("height of the pin pads")
7387
+ epx: length55.default("0mm").describe("x offset of the center of the central exposed thermal pad"),
7388
+ pinw: length55.describe("width of the pin pads"),
7389
+ pinh: length55.describe("height of the pin pads")
7328
7390
  });
7329
7391
  var vson = (raw_params) => {
7330
7392
  const parameters = vson_def.parse(raw_params);
@@ -7431,12 +7493,12 @@ var getSilkscreenPaths = (grid) => {
7431
7493
  };
7432
7494
 
7433
7495
  // src/fn/solderjumper.ts
7434
- import { length as length55 } from "circuit-json";
7496
+ import { length as length56 } from "circuit-json";
7435
7497
  var solderjumper = (params) => {
7436
7498
  const { num_pins, bridged, p = 2.54, pw = 1.5, ph = 1.5 } = params;
7437
- const padSpacing7 = length55.parse(p);
7438
- const padWidth = length55.parse(pw);
7439
- const padHeight = length55.parse(ph);
7499
+ const padSpacing7 = length56.parse(p);
7500
+ const padWidth = length56.parse(pw);
7501
+ const padHeight = length56.parse(ph);
7440
7502
  const traceWidth = Math.min(padHeight / 4, 0.5);
7441
7503
  const pads = [];
7442
7504
  for (let i = 0; i < num_pins; i++) {
@@ -7524,34 +7586,34 @@ var solderjumper = (params) => {
7524
7586
  };
7525
7587
 
7526
7588
  // src/fn/sot457.ts
7527
- import { z as z68 } from "zod";
7589
+ import { z as z69 } from "zod";
7528
7590
  var commonSchema = {
7529
- fn: z68.literal("sot457"),
7530
- num_pins: z68.literal(6).default(6),
7531
- pillh: z68.string().default("0.45mm"),
7532
- pillw: z68.string().default("1.45mm"),
7533
- pl: z68.string(),
7534
- pw: z68.string(),
7535
- p: z68.string(),
7536
- wave: z68.boolean().optional(),
7537
- reflow: z68.boolean().optional()
7591
+ fn: z69.literal("sot457"),
7592
+ num_pins: z69.literal(6).default(6),
7593
+ pillh: z69.string().default("0.45mm"),
7594
+ pillw: z69.string().default("1.45mm"),
7595
+ pl: z69.string(),
7596
+ pw: z69.string(),
7597
+ p: z69.string(),
7598
+ wave: z69.boolean().optional(),
7599
+ reflow: z69.boolean().optional()
7538
7600
  };
7539
7601
  var sot457DefSchema = base_def.extend({
7540
7602
  ...commonSchema,
7541
- h: z68.string().default("2.5mm"),
7542
- w: z68.string().default("2.7mm"),
7543
- pl: z68.string().default("0.8mm"),
7544
- pw: z68.string().default("0.55mm"),
7545
- p: z68.string().default("0.95mm")
7603
+ h: z69.string().default("2.5mm"),
7604
+ w: z69.string().default("2.7mm"),
7605
+ pl: z69.string().default("0.8mm"),
7606
+ pw: z69.string().default("0.55mm"),
7607
+ p: z69.string().default("0.95mm")
7546
7608
  });
7547
7609
  var sot457WaveSchema = base_def.extend({
7548
7610
  ...commonSchema,
7549
- h: z68.string().default("3mm"),
7550
- w: z68.string().default("4mm"),
7551
- pillr: z68.string().default("0.225mm"),
7552
- pl: z68.string().default("1.45mm"),
7553
- pw: z68.string().default("1.5mm"),
7554
- p: z68.string().default("1.475mm")
7611
+ h: z69.string().default("3mm"),
7612
+ w: z69.string().default("4mm"),
7613
+ pillr: z69.string().default("0.225mm"),
7614
+ pl: z69.string().default("1.45mm"),
7615
+ pw: z69.string().default("1.5mm"),
7616
+ p: z69.string().default("1.475mm")
7555
7617
  }).transform((data) => ({
7556
7618
  ...data,
7557
7619
  wave: data.wave ?? (data.reflow === void 0 ? true : !data.reflow),
@@ -7690,25 +7752,25 @@ var sot457 = (rawParams) => {
7690
7752
  };
7691
7753
 
7692
7754
  // src/fn/sot963.ts
7693
- import { z as z69 } from "zod";
7694
- import { length as length56 } from "circuit-json";
7755
+ import { z as z70 } from "zod";
7756
+ import { length as length57 } from "circuit-json";
7695
7757
  var sot963_def = base_def.extend({
7696
- fn: z69.string(),
7697
- num_pins: z69.literal(6).default(6),
7698
- w: z69.string().default("1.1mm"),
7699
- h: z69.string().default("1.45mm"),
7700
- p: z69.string().default("0.35mm"),
7701
- pl: z69.string().default("0.2mm"),
7702
- pw: z69.string().default("0.2mm"),
7703
- string: z69.string().optional()
7758
+ fn: z70.string(),
7759
+ num_pins: z70.literal(6).default(6),
7760
+ w: z70.string().default("1.1mm"),
7761
+ h: z70.string().default("1.45mm"),
7762
+ p: z70.string().default("0.35mm"),
7763
+ pl: z70.string().default("0.2mm"),
7764
+ pw: z70.string().default("0.2mm"),
7765
+ string: z70.string().optional()
7704
7766
  });
7705
7767
  var sot963 = (raw_params) => {
7706
7768
  const parameters = sot963_def.parse({ ...raw_params, fn: "sot963" });
7707
- const w = length56.parse(parameters.w);
7708
- const h = length56.parse(parameters.h);
7709
- const p = length56.parse(parameters.p);
7710
- const pl = length56.parse(parameters.pl);
7711
- const pw = length56.parse(parameters.pw);
7769
+ const w = length57.parse(parameters.w);
7770
+ const h = length57.parse(parameters.h);
7771
+ const p = length57.parse(parameters.p);
7772
+ const pl = length57.parse(parameters.pl);
7773
+ const pw = length57.parse(parameters.pw);
7712
7774
  const pads = [];
7713
7775
  for (let i = 0; i < 6; i++) {
7714
7776
  const { x, y } = getSot963PadCoord(i + 1, w, p, pl);
@@ -7771,19 +7833,19 @@ var getSot963PadCoord = (pn, w, p, pl) => {
7771
7833
  };
7772
7834
 
7773
7835
  // src/fn/potentiometer.ts
7774
- import { z as z70 } from "zod";
7836
+ import { z as z71 } from "zod";
7775
7837
  var potentiometer_def = base_def.extend({
7776
- fn: z70.string(),
7777
- num_pins: z70.union([z70.literal(3), z70.literal(2)]).default(3),
7778
- p: z70.string().default("3.8mm"),
7779
- id: z70.string().default("1.25mm"),
7780
- od: z70.string().default("2.35mm"),
7781
- ca: z70.string().default("14mm").describe(
7838
+ fn: z71.string(),
7839
+ num_pins: z71.union([z71.literal(3), z71.literal(2)]).default(3),
7840
+ p: z71.string().default("3.8mm"),
7841
+ id: z71.string().default("1.25mm"),
7842
+ od: z71.string().default("2.35mm"),
7843
+ ca: z71.string().default("14mm").describe(
7782
7844
  "Caliper axis (width or diameter of the potentiometer body or adjustment knob)"
7783
7845
  ),
7784
- w: z70.string().default("5.35mm"),
7785
- h: z70.string().default("4mm"),
7786
- string: z70.string().optional()
7846
+ w: z71.string().default("5.35mm"),
7847
+ h: z71.string().default("4mm"),
7848
+ string: z71.string().optional()
7787
7849
  });
7788
7850
  var potentiometer_acp = (parameters) => {
7789
7851
  const { p, id, od, h, ca } = parameters;
@@ -7850,15 +7912,15 @@ var potentiometer = (raw_params) => {
7850
7912
 
7851
7913
  // src/fn/electrolytic.ts
7852
7914
  import {
7853
- length as length57
7915
+ length as length58
7854
7916
  } from "circuit-json";
7855
- import { z as z71 } from "zod";
7917
+ import { z as z72 } from "zod";
7856
7918
  var electrolytic_def = base_def.extend({
7857
- fn: z71.string(),
7858
- p: length57.optional().default("7.5mm"),
7859
- id: length57.optional().default("1mm"),
7860
- od: length57.optional().default("2mm"),
7861
- d: length57.optional().default("10.5mm")
7919
+ fn: z72.string(),
7920
+ p: length58.optional().default("7.5mm"),
7921
+ id: length58.optional().default("1mm"),
7922
+ od: length58.optional().default("2mm"),
7923
+ d: length58.optional().default("10.5mm")
7862
7924
  });
7863
7925
  var generate_circle_arcs = (centerX, centerY, radius, cut, cutHeight) => {
7864
7926
  const topArc = [];
@@ -7965,22 +8027,22 @@ var electrolytic = (raw_params) => {
7965
8027
  };
7966
8028
 
7967
8029
  // src/fn/smbf.ts
7968
- import { z as z72 } from "zod";
7969
- import { length as length58 } from "circuit-json";
8030
+ import { z as z73 } from "zod";
8031
+ import { length as length59 } from "circuit-json";
7970
8032
  var smbf_def = base_def.extend({
7971
- fn: z72.string(),
7972
- num_pins: z72.literal(2).default(2),
7973
- w: z72.string().default("6.5mm"),
7974
- h: z72.string().default("3mm"),
7975
- pl: z72.string().default("1.75mm"),
7976
- pw: z72.string().default("2.40mm"),
7977
- p: z72.string().default("4.75mm")
8033
+ fn: z73.string(),
8034
+ num_pins: z73.literal(2).default(2),
8035
+ w: z73.string().default("6.5mm"),
8036
+ h: z73.string().default("3mm"),
8037
+ pl: z73.string().default("1.75mm"),
8038
+ pw: z73.string().default("2.40mm"),
8039
+ p: z73.string().default("4.75mm")
7978
8040
  });
7979
8041
  var smbf = (raw_params) => {
7980
8042
  const parameters = smbf_def.parse(raw_params);
7981
8043
  const silkscreenRefText = silkscreenRef(
7982
8044
  0,
7983
- length58.parse(parameters.h) - 0.5,
8045
+ length59.parse(parameters.h) - 0.5,
7984
8046
  0.3
7985
8047
  );
7986
8048
  const silkscreenLine = {
@@ -7989,20 +8051,20 @@ var smbf = (raw_params) => {
7989
8051
  pcb_component_id: "",
7990
8052
  route: [
7991
8053
  {
7992
- x: length58.parse(parameters.p) / 2,
7993
- y: length58.parse(parameters.h) / 2
8054
+ x: length59.parse(parameters.p) / 2,
8055
+ y: length59.parse(parameters.h) / 2
7994
8056
  },
7995
8057
  {
7996
- x: -length58.parse(parameters.w) / 2 - 0.3,
7997
- y: length58.parse(parameters.h) / 2
8058
+ x: -length59.parse(parameters.w) / 2 - 0.3,
8059
+ y: length59.parse(parameters.h) / 2
7998
8060
  },
7999
8061
  {
8000
- x: -length58.parse(parameters.w) / 2 - 0.3,
8001
- y: -length58.parse(parameters.h) / 2
8062
+ x: -length59.parse(parameters.w) / 2 - 0.3,
8063
+ y: -length59.parse(parameters.h) / 2
8002
8064
  },
8003
8065
  {
8004
- x: length58.parse(parameters.p) / 2,
8005
- y: -length58.parse(parameters.h) / 2
8066
+ x: length59.parse(parameters.p) / 2,
8067
+ y: -length59.parse(parameters.h) / 2
8006
8068
  }
8007
8069
  ],
8008
8070
  stroke_width: 0.1,
@@ -8044,16 +8106,16 @@ var smbfWithoutParsing = (parameters) => {
8044
8106
  };
8045
8107
 
8046
8108
  // src/fn/sot323.ts
8047
- import { z as z73 } from "zod";
8109
+ import { z as z74 } from "zod";
8048
8110
  var sot323_def = base_def.extend({
8049
- fn: z73.string(),
8050
- num_pins: z73.number().default(3),
8051
- w: z73.string().default("2.45mm"),
8052
- h: z73.string().default("2.40mm"),
8053
- pl: z73.string().default("0.92mm"),
8054
- pw: z73.string().default("0.45mm"),
8055
- p: z73.string().default("0.891mm"),
8056
- string: z73.string().optional()
8111
+ fn: z74.string(),
8112
+ num_pins: z74.number().default(3),
8113
+ w: z74.string().default("2.45mm"),
8114
+ h: z74.string().default("2.40mm"),
8115
+ pl: z74.string().default("0.92mm"),
8116
+ pw: z74.string().default("0.45mm"),
8117
+ p: z74.string().default("0.891mm"),
8118
+ string: z74.string().optional()
8057
8119
  });
8058
8120
  var sot323 = (raw_params) => {
8059
8121
  const match = raw_params.string?.match(/^sot323_(\d+)/);
@@ -8141,30 +8203,30 @@ var sot323_3 = (parameters) => {
8141
8203
  };
8142
8204
 
8143
8205
  // src/fn/smtpad.ts
8144
- import { z as z74 } from "zod";
8145
- import { length as length59 } from "circuit-json";
8146
- import { mm as mm14 } from "@tscircuit/mm";
8206
+ import { z as z75 } from "zod";
8207
+ import { length as length60 } from "circuit-json";
8208
+ import { mm as mm15 } from "@tscircuit/mm";
8147
8209
  var smtpad_def = base_def.extend({
8148
- fn: z74.string(),
8149
- circle: z74.boolean().optional(),
8150
- rect: z74.boolean().optional(),
8151
- square: z74.boolean().optional(),
8152
- pill: z74.boolean().optional(),
8153
- d: length59.optional(),
8154
- pd: length59.optional(),
8155
- diameter: length59.optional(),
8156
- r: length59.optional(),
8157
- pr: length59.optional(),
8158
- radius: length59.optional(),
8159
- w: length59.optional(),
8160
- pw: length59.optional(),
8161
- width: length59.optional(),
8162
- h: length59.optional(),
8163
- ph: length59.optional(),
8164
- height: length59.optional(),
8165
- s: length59.optional(),
8166
- size: length59.optional(),
8167
- string: z74.string().optional()
8210
+ fn: z75.string(),
8211
+ circle: z75.boolean().optional(),
8212
+ rect: z75.boolean().optional(),
8213
+ square: z75.boolean().optional(),
8214
+ pill: z75.boolean().optional(),
8215
+ d: length60.optional(),
8216
+ pd: length60.optional(),
8217
+ diameter: length60.optional(),
8218
+ r: length60.optional(),
8219
+ pr: length60.optional(),
8220
+ radius: length60.optional(),
8221
+ w: length60.optional(),
8222
+ pw: length60.optional(),
8223
+ width: length60.optional(),
8224
+ h: length60.optional(),
8225
+ ph: length60.optional(),
8226
+ height: length60.optional(),
8227
+ s: length60.optional(),
8228
+ size: length60.optional(),
8229
+ string: z75.string().optional()
8168
8230
  }).transform((v) => {
8169
8231
  let shape = "rect";
8170
8232
  if (v.circle) shape = "circle";
@@ -8175,27 +8237,27 @@ var smtpad_def = base_def.extend({
8175
8237
  let width;
8176
8238
  let height;
8177
8239
  if (shape === "circle") {
8178
- if (v.r !== void 0) radius = mm14(v.r);
8179
- else if (v.pr !== void 0) radius = mm14(v.pr);
8180
- else if (v.radius !== void 0) radius = mm14(v.radius);
8181
- else if (v.d !== void 0) radius = mm14(v.d) / 2;
8182
- else if (v.pd !== void 0) radius = mm14(v.pd) / 2;
8183
- else if (v.diameter !== void 0) radius = mm14(v.diameter) / 2;
8184
- else radius = mm14("1mm") / 2;
8240
+ if (v.r !== void 0) radius = mm15(v.r);
8241
+ else if (v.pr !== void 0) radius = mm15(v.pr);
8242
+ else if (v.radius !== void 0) radius = mm15(v.radius);
8243
+ else if (v.d !== void 0) radius = mm15(v.d) / 2;
8244
+ else if (v.pd !== void 0) radius = mm15(v.pd) / 2;
8245
+ else if (v.diameter !== void 0) radius = mm15(v.diameter) / 2;
8246
+ else radius = mm15("1mm") / 2;
8185
8247
  } else {
8186
- if (v.w !== void 0) width = mm14(v.w);
8187
- else if (v.pw !== void 0) width = mm14(v.pw);
8188
- else if (v.width !== void 0) width = mm14(v.width);
8189
- else if (v.s !== void 0) width = mm14(v.s);
8190
- else if (v.size !== void 0) width = mm14(v.size);
8191
- else width = mm14("1mm");
8192
- if (v.h !== void 0) height = mm14(v.h);
8193
- else if (v.ph !== void 0) height = mm14(v.ph);
8194
- else if (v.height !== void 0) height = mm14(v.height);
8248
+ if (v.w !== void 0) width = mm15(v.w);
8249
+ else if (v.pw !== void 0) width = mm15(v.pw);
8250
+ else if (v.width !== void 0) width = mm15(v.width);
8251
+ else if (v.s !== void 0) width = mm15(v.s);
8252
+ else if (v.size !== void 0) width = mm15(v.size);
8253
+ else width = mm15("1mm");
8254
+ if (v.h !== void 0) height = mm15(v.h);
8255
+ else if (v.ph !== void 0) height = mm15(v.ph);
8256
+ else if (v.height !== void 0) height = mm15(v.height);
8195
8257
  else if (shape === "square") height = width;
8196
8258
  else if (shape === "rect")
8197
8259
  height = width;
8198
- else height = mm14("1mm");
8260
+ else height = mm15("1mm");
8199
8261
  }
8200
8262
  return {
8201
8263
  fn: v.fn,
@@ -8230,28 +8292,28 @@ var smtpad = (raw_params) => {
8230
8292
  };
8231
8293
 
8232
8294
  // src/fn/platedhole.ts
8233
- import { z as z75 } from "zod";
8234
- import { length as length60 } from "circuit-json";
8235
- import { mm as mm15 } from "@tscircuit/mm";
8295
+ import { z as z76 } from "zod";
8296
+ import { length as length61 } from "circuit-json";
8297
+ import { mm as mm16 } from "@tscircuit/mm";
8236
8298
  var platedhole_def = base_def.extend({
8237
- fn: z75.string(),
8238
- d: length60.optional(),
8239
- hd: length60.optional(),
8240
- r: length60.optional(),
8241
- hr: length60.optional(),
8242
- pd: length60.optional(),
8243
- pr: length60.optional(),
8244
- squarepad: z75.boolean().optional().default(false)
8299
+ fn: z76.string(),
8300
+ d: length61.optional(),
8301
+ hd: length61.optional(),
8302
+ r: length61.optional(),
8303
+ hr: length61.optional(),
8304
+ pd: length61.optional(),
8305
+ pr: length61.optional(),
8306
+ squarepad: z76.boolean().optional().default(false)
8245
8307
  }).transform((v) => {
8246
8308
  let holeD;
8247
- if (v.d !== void 0) holeD = mm15(v.d);
8248
- else if (v.hd !== void 0) holeD = mm15(v.hd);
8249
- else if (v.r !== void 0) holeD = mm15(v.r) * 2;
8250
- else if (v.hr !== void 0) holeD = mm15(v.hr) * 2;
8251
- else holeD = mm15("1mm");
8309
+ if (v.d !== void 0) holeD = mm16(v.d);
8310
+ else if (v.hd !== void 0) holeD = mm16(v.hd);
8311
+ else if (v.r !== void 0) holeD = mm16(v.r) * 2;
8312
+ else if (v.hr !== void 0) holeD = mm16(v.hr) * 2;
8313
+ else holeD = mm16("1mm");
8252
8314
  let padD;
8253
- if (v.pd !== void 0) padD = mm15(v.pd);
8254
- else if (v.pr !== void 0) padD = mm15(v.pr) * 2;
8315
+ if (v.pd !== void 0) padD = mm16(v.pd);
8316
+ else if (v.pr !== void 0) padD = mm16(v.pr) * 2;
8255
8317
  else padD = holeD * (1.5 / 1);
8256
8318
  return {
8257
8319
  fn: v.fn,
@@ -8280,14 +8342,14 @@ var platedhole2 = (raw_params) => {
8280
8342
  };
8281
8343
 
8282
8344
  // src/fn/sot.ts
8283
- import { z as z76 } from "zod";
8345
+ import { z as z77 } from "zod";
8284
8346
  var sot_def = base_def.extend({
8285
- fn: z76.string(),
8286
- num_pins: z76.literal(6).default(6),
8287
- h: z76.string().default("1.6mm"),
8288
- pl: z76.string().default("1mm"),
8289
- pw: z76.string().default("0.7mm"),
8290
- p: z76.string().default("0.95mm")
8347
+ fn: z77.string(),
8348
+ num_pins: z77.literal(6).default(6),
8349
+ h: z77.string().default("1.6mm"),
8350
+ pl: z77.string().default("1mm"),
8351
+ pw: z77.string().default("0.7mm"),
8352
+ p: z77.string().default("0.95mm")
8291
8353
  });
8292
8354
  var sot = (raw_params) => {
8293
8355
  const parameters = sot_def.parse(raw_params);
@@ -8404,16 +8466,16 @@ var sotWithoutParsing = (parameters) => {
8404
8466
  };
8405
8467
 
8406
8468
  // src/fn/sot343.ts
8407
- import { z as z77 } from "zod";
8469
+ import { z as z78 } from "zod";
8408
8470
  var sot343_def = base_def.extend({
8409
- fn: z77.string(),
8410
- num_pins: z77.number().default(4),
8411
- w: z77.string().default("3.2mm"),
8412
- h: z77.string().default("2.6mm"),
8413
- pl: z77.string().default("1.05mm"),
8414
- pw: z77.string().default("0.45mm"),
8415
- p: z77.string().default("0.55mm"),
8416
- string: z77.string().optional()
8471
+ fn: z78.string(),
8472
+ num_pins: z78.number().default(4),
8473
+ w: z78.string().default("3.2mm"),
8474
+ h: z78.string().default("2.6mm"),
8475
+ pl: z78.string().default("1.05mm"),
8476
+ pw: z78.string().default("0.45mm"),
8477
+ p: z78.string().default("0.55mm"),
8478
+ string: z78.string().optional()
8417
8479
  });
8418
8480
  var sot343 = (raw_params) => {
8419
8481
  const match = raw_params.string?.match(/^sot343_(\d+)/);
@@ -8508,9 +8570,9 @@ var sot343_4 = (parameters) => {
8508
8570
  };
8509
8571
 
8510
8572
  // src/fn/m2host.ts
8511
- import { z as z78 } from "zod";
8573
+ import { z as z79 } from "zod";
8512
8574
  var m2host_def = base_def.extend({
8513
- fn: z78.string()
8575
+ fn: z79.string()
8514
8576
  });
8515
8577
  var m2host = (raw_params) => {
8516
8578
  const parameters = m2host_def.parse(raw_params);
@@ -8614,42 +8676,42 @@ var m2host = (raw_params) => {
8614
8676
  };
8615
8677
 
8616
8678
  // src/fn/mountedpcbmodule.ts
8617
- import { length as length61 } from "circuit-json";
8618
- import { z as z79 } from "zod";
8679
+ import { length as length62 } from "circuit-json";
8680
+ import { z as z80 } from "zod";
8619
8681
  var mountedpcbmodule_def = base_def.extend({
8620
- fn: z79.string(),
8621
- numPins: z79.number().optional().default(0),
8622
- rows: z79.union([z79.string(), z79.number()]).transform((val) => Number(val)).optional().default(1).describe("number of rows"),
8623
- p: length61.default("2.54mm").describe("pitch"),
8624
- id: length61.default("1.0mm").describe("inner diameter"),
8625
- od: length61.default("1.5mm").describe("outer diameter"),
8626
- male: z79.boolean().optional().describe("the module uses male headers"),
8627
- nopin: z79.boolean().optional().default(false).describe("omit pins rendering"),
8628
- female: z79.boolean().optional().describe("the module uses female headers"),
8629
- smd: z79.boolean().optional().describe("surface mount device"),
8630
- pinlabeltextalignleft: z79.boolean().optional().default(false),
8631
- pinlabeltextaligncenter: z79.boolean().optional().default(false),
8632
- pinlabeltextalignright: z79.boolean().optional().default(false),
8633
- pinlabelverticallyinverted: z79.boolean().optional().default(false),
8634
- pinlabelorthogonal: z79.boolean().optional().default(false),
8635
- nopinlabels: z79.boolean().optional().default(false).describe("omit silkscreen pin labels"),
8636
- doublesidedpinlabel: z79.boolean().optional().default(false).describe("add silkscreen pins in top and bottom layers"),
8637
- bottomsidepinlabel: z79.boolean().optional().default(false).describe(
8682
+ fn: z80.string(),
8683
+ numPins: z80.number().optional().default(0),
8684
+ rows: z80.union([z80.string(), z80.number()]).transform((val) => Number(val)).optional().default(1).describe("number of rows"),
8685
+ p: length62.default("2.54mm").describe("pitch"),
8686
+ id: length62.default("1.0mm").describe("inner diameter"),
8687
+ od: length62.default("1.5mm").describe("outer diameter"),
8688
+ male: z80.boolean().optional().describe("the module uses male headers"),
8689
+ nopin: z80.boolean().optional().default(false).describe("omit pins rendering"),
8690
+ female: z80.boolean().optional().describe("the module uses female headers"),
8691
+ smd: z80.boolean().optional().describe("surface mount device"),
8692
+ pinlabeltextalignleft: z80.boolean().optional().default(false),
8693
+ pinlabeltextaligncenter: z80.boolean().optional().default(false),
8694
+ pinlabeltextalignright: z80.boolean().optional().default(false),
8695
+ pinlabelverticallyinverted: z80.boolean().optional().default(false),
8696
+ pinlabelorthogonal: z80.boolean().optional().default(false),
8697
+ nopinlabels: z80.boolean().optional().default(false).describe("omit silkscreen pin labels"),
8698
+ doublesidedpinlabel: z80.boolean().optional().default(false).describe("add silkscreen pins in top and bottom layers"),
8699
+ bottomsidepinlabel: z80.boolean().optional().default(false).describe(
8638
8700
  "place the silkscreen reference text on the bottom layer instead of top"
8639
8701
  ),
8640
- pinRowSide: z79.enum(["left", "right", "top", "bottom"]).optional().default("left"),
8641
- pinrowleft: z79.boolean().optional().default(false),
8642
- pinrowright: z79.boolean().optional().default(false),
8643
- pinrowtop: z79.boolean().optional().default(false),
8644
- pinrowbottom: z79.boolean().optional().default(false),
8645
- pinrowleftpins: z79.union([z79.string(), z79.number()]).transform((val) => Number(val)).optional(),
8646
- pinrowrightpins: z79.union([z79.string(), z79.number()]).transform((val) => Number(val)).optional(),
8647
- pinrowtoppins: z79.union([z79.string(), z79.number()]).transform((val) => Number(val)).optional(),
8648
- pinrowbottompins: z79.union([z79.string(), z79.number()]).transform((val) => Number(val)).optional(),
8649
- width: length61.optional(),
8650
- height: length61.optional(),
8651
- pinRowHoleEdgeToEdgeDist: length61.default("2mm"),
8652
- holes: z79.union([z79.string(), z79.array(z79.string())]).optional().transform((val) => {
8702
+ pinRowSide: z80.enum(["left", "right", "top", "bottom"]).optional().default("left"),
8703
+ pinrowleft: z80.boolean().optional().default(false),
8704
+ pinrowright: z80.boolean().optional().default(false),
8705
+ pinrowtop: z80.boolean().optional().default(false),
8706
+ pinrowbottom: z80.boolean().optional().default(false),
8707
+ pinrowleftpins: z80.union([z80.string(), z80.number()]).transform((val) => Number(val)).optional(),
8708
+ pinrowrightpins: z80.union([z80.string(), z80.number()]).transform((val) => Number(val)).optional(),
8709
+ pinrowtoppins: z80.union([z80.string(), z80.number()]).transform((val) => Number(val)).optional(),
8710
+ pinrowbottompins: z80.union([z80.string(), z80.number()]).transform((val) => Number(val)).optional(),
8711
+ width: length62.optional(),
8712
+ height: length62.optional(),
8713
+ pinRowHoleEdgeToEdgeDist: length62.default("2mm"),
8714
+ holes: z80.union([z80.string(), z80.array(z80.string())]).optional().transform((val) => {
8653
8715
  if (!val) return val;
8654
8716
  if (Array.isArray(val)) return val;
8655
8717
  if (val.startsWith("(") && val.endsWith(")")) {
@@ -8657,23 +8719,23 @@ var mountedpcbmodule_def = base_def.extend({
8657
8719
  }
8658
8720
  return [val];
8659
8721
  }),
8660
- holeXDist: length61.optional(),
8661
- holeYDist: length61.optional(),
8662
- holeInset: length61.default("1mm"),
8663
- pinrow: z79.union([z79.string(), z79.number()]).optional(),
8664
- usbposition: z79.enum(["left", "right", "top", "bottom"]).optional().default("left"),
8665
- usbleft: z79.boolean().optional().default(false),
8666
- usbtop: z79.boolean().optional().default(false),
8667
- usbright: z79.boolean().optional().default(false),
8668
- usbbottom: z79.boolean().optional().default(false),
8669
- usbtype: z79.enum(["micro", "c"]).optional(),
8670
- usbmicro: z79.boolean().optional().default(false),
8671
- usbc: z79.boolean().optional().default(false),
8672
- screen: z79.boolean().optional().default(false).describe("add silkscreen outline for screen/display area"),
8673
- screenwidth: length61.optional(),
8674
- screenheight: length61.optional(),
8675
- screencenteroffsetx: length61.optional(),
8676
- screencenteroffsety: length61.optional()
8722
+ holeXDist: length62.optional(),
8723
+ holeYDist: length62.optional(),
8724
+ holeInset: length62.default("1mm"),
8725
+ pinrow: z80.union([z80.string(), z80.number()]).optional(),
8726
+ usbposition: z80.enum(["left", "right", "top", "bottom"]).optional().default("left"),
8727
+ usbleft: z80.boolean().optional().default(false),
8728
+ usbtop: z80.boolean().optional().default(false),
8729
+ usbright: z80.boolean().optional().default(false),
8730
+ usbbottom: z80.boolean().optional().default(false),
8731
+ usbtype: z80.enum(["micro", "c"]).optional(),
8732
+ usbmicro: z80.boolean().optional().default(false),
8733
+ usbc: z80.boolean().optional().default(false),
8734
+ screen: z80.boolean().optional().default(false).describe("add silkscreen outline for screen/display area"),
8735
+ screenwidth: length62.optional(),
8736
+ screenheight: length62.optional(),
8737
+ screencenteroffsetx: length62.optional(),
8738
+ screencenteroffsety: length62.optional()
8677
8739
  }).transform((data) => {
8678
8740
  const pinlabelAnchorSide = determinePinlabelAnchorSide(data);
8679
8741
  let pinRowSide = data.pinRowSide;
@@ -8765,7 +8827,7 @@ var mountedpcbmodule_def = base_def.extend({
8765
8827
  }).superRefine((data, ctx) => {
8766
8828
  if (data.male && data.female) {
8767
8829
  ctx.addIssue({
8768
- code: z79.ZodIssueCode.custom,
8830
+ code: z80.ZodIssueCode.custom,
8769
8831
  message: "'male' and 'female' cannot both be true; it should be male or female.",
8770
8832
  path: ["male", "female"]
8771
8833
  });
@@ -9108,16 +9170,16 @@ var mountedpcbmodule = (raw_params) => {
9108
9170
  };
9109
9171
 
9110
9172
  // src/fn/to92l.ts
9111
- import { z as z80 } from "zod";
9173
+ import { z as z81 } from "zod";
9112
9174
  var to92l_def = base_def.extend({
9113
- fn: z80.string(),
9114
- num_pins: z80.number().default(3),
9115
- inline: z80.boolean().default(false),
9116
- p: z80.string().default("1.27mm"),
9117
- id: z80.string().default("0.75mm"),
9118
- od: z80.string().default("1.3mm"),
9119
- w: z80.string().default("4.8mm"),
9120
- h: z80.string().default("4.0mm")
9175
+ fn: z81.string(),
9176
+ num_pins: z81.number().default(3),
9177
+ inline: z81.boolean().default(false),
9178
+ p: z81.string().default("1.27mm"),
9179
+ id: z81.string().default("0.75mm"),
9180
+ od: z81.string().default("1.3mm"),
9181
+ w: z81.string().default("4.8mm"),
9182
+ h: z81.string().default("4.0mm")
9121
9183
  });
9122
9184
  var to92l = (raw_params) => {
9123
9185
  const parameters = to92l_def.parse(raw_params);
@@ -9295,9 +9357,13 @@ function isNotNull(value) {
9295
9357
  }
9296
9358
 
9297
9359
  // src/footprinter.ts
9360
+ var normalizeDefinition = (def) => {
9361
+ return def.trim().replace(/^sot-223-(\d+)(?=_|$)/i, "sot223_$1").replace(/^to-220f-(\d+)(?=_|$)/i, "to220f_$1");
9362
+ };
9298
9363
  var string2 = (def) => {
9299
9364
  let fp2 = footprinter();
9300
- const modifiedDef = def.replace(/^((?:\d{4}|\d{5}))(?=$|_|x)/, "res$1").replace(/^zh(\d+)(?:$|_)/, "jst$1_zh");
9365
+ const normalizedDef = normalizeDefinition(def);
9366
+ const modifiedDef = normalizedDef.replace(/^((?:\d{4}|\d{5}))(?=$|_|x)/, "res$1").replace(/^zh(\d+)(?:$|_)/, "jst$1_zh");
9301
9367
  const def_parts = modifiedDef.split(/_(?!metric)/).map((s) => {
9302
9368
  const m = s.match(/([a-zA-Z]+)([\(\d\.\+\?].*)?/);
9303
9369
  if (!m) return null;
@@ -9310,7 +9376,7 @@ var string2 = (def) => {
9310
9376
  for (const { fn, v } of def_parts) {
9311
9377
  fp2 = fp2[fn](v);
9312
9378
  }
9313
- fp2.setString(def);
9379
+ fp2.setString(normalizedDef);
9314
9380
  return fp2;
9315
9381
  };
9316
9382
  var getFootprintNames = () => {