jscad-electronics 0.0.142 → 0.0.143

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
@@ -5312,17 +5312,106 @@ var SmdPinHeader = ({
5312
5312
  }) });
5313
5313
  };
5314
5314
 
5315
- // lib/RJ45.tsx
5315
+ // lib/Led5050.tsx
5316
5316
  import {
5317
5317
  Colorize as Colorize39,
5318
5318
  Cuboid as Cuboid47,
5319
5319
  Cylinder as Cylinder13,
5320
5320
  Rotate as Rotate14,
5321
- RoundedCuboid as RoundedCuboid4,
5322
5321
  Subtract as Subtract11,
5323
5322
  Translate as Translate33
5324
5323
  } from "jscad-fiber";
5325
5324
  import { Fragment as Fragment64, jsx as jsx70, jsxs as jsxs66 } from "react/jsx-runtime";
5325
+ var Led5050 = ({
5326
+ color = "#ffff00",
5327
+ bodyColor = "#ffffff",
5328
+ leadColor = "#dedede"
5329
+ }) => {
5330
+ const bodySize = 5;
5331
+ const leadSpan = 5.4;
5332
+ const bodyBottom = 0.2;
5333
+ const bodyHeight = 1.3;
5334
+ const bodyTop = bodyBottom + bodyHeight;
5335
+ const leadLength = 1.4;
5336
+ const leadWidth = 1;
5337
+ const leadThickness = 0.2;
5338
+ const leadCenterX = leadSpan / 2 - leadLength / 2;
5339
+ const lensRadius = 2;
5340
+ const lensHeight = 0.25;
5341
+ const lensTop = 1.55;
5342
+ const cornerCutDepth = 0.3;
5343
+ const leadYPositions = [-1.7, 0, 1.7];
5344
+ const leadSides = [-1, 1];
5345
+ return /* @__PURE__ */ jsxs66(Fragment64, { children: [
5346
+ leadYPositions.flatMap(
5347
+ (y) => leadSides.map((side) => /* @__PURE__ */ jsx70(
5348
+ Cuboid47,
5349
+ {
5350
+ color: leadColor,
5351
+ size: [leadLength, leadWidth, leadThickness],
5352
+ center: [side * leadCenterX, y, leadThickness / 2]
5353
+ },
5354
+ `${side}-${y}`
5355
+ ))
5356
+ ),
5357
+ /* @__PURE__ */ jsx70(Colorize39, { color: bodyColor, children: /* @__PURE__ */ jsxs66(Subtract11, { children: [
5358
+ /* @__PURE__ */ jsx70(
5359
+ ChipBody,
5360
+ {
5361
+ width: bodySize,
5362
+ length: bodySize,
5363
+ height: bodyHeight,
5364
+ heightAboveSurface: bodyBottom,
5365
+ center: { x: 0, y: 0, z: 0 },
5366
+ color: bodyColor,
5367
+ taperRatio: 0.036,
5368
+ straightHeightRatio: 0.01,
5369
+ includeNotch: false
5370
+ }
5371
+ ),
5372
+ /* @__PURE__ */ jsx70(
5373
+ Cylinder13,
5374
+ {
5375
+ radius: lensRadius,
5376
+ height: lensHeight,
5377
+ center: [0, 0, bodyTop - lensHeight / 2]
5378
+ }
5379
+ ),
5380
+ /* @__PURE__ */ jsx70(
5381
+ Translate33,
5382
+ {
5383
+ offset: [
5384
+ -bodySize / 2,
5385
+ bodySize / 2,
5386
+ bodyTop - cornerCutDepth / 2 + 5e-3
5387
+ ],
5388
+ children: /* @__PURE__ */ jsx70(Rotate14, { rotation: [0, 0, Math.PI / 4], children: /* @__PURE__ */ jsx70(Cuboid47, { size: [0.9, 0.9, cornerCutDepth + 0.01] }) })
5389
+ }
5390
+ )
5391
+ ] }) }),
5392
+ /* @__PURE__ */ jsx70(
5393
+ Cylinder13,
5394
+ {
5395
+ color,
5396
+ radius: lensRadius,
5397
+ height: lensHeight,
5398
+ center: [0, 0, lensTop - lensHeight / 2]
5399
+ }
5400
+ )
5401
+ ] });
5402
+ };
5403
+
5404
+ // lib/RJ45.tsx
5405
+ import {
5406
+ Colorize as Colorize40,
5407
+ Cuboid as Cuboid48,
5408
+ Cylinder as Cylinder14,
5409
+ Rotate as Rotate15,
5410
+ RoundedCuboid as RoundedCuboid4,
5411
+ Subtract as Subtract12,
5412
+ Translate as Translate34
5413
+ } from "jscad-fiber";
5414
+ import { Fragment as Fragment65, jsx as jsx71, jsxs as jsxs67 } from "react/jsx-runtime";
5326
5415
  var range2 = (length) => Array.from({ length }, (_, index) => index);
5327
5416
  var RJ45 = ({
5328
5417
  bodyWidth = 16.26,
@@ -5380,18 +5469,18 @@ var RJ45 = ({
5380
5469
  const contactY = frontY - frontDirection * Math.max(cavityDepth * 0.48, 1.2);
5381
5470
  const contactZ = openingCenterZ + openingHeight * 0.18;
5382
5471
  const frontLipY = frontY + frontDirection * shellThickness * 0.2;
5383
- return /* @__PURE__ */ jsxs66(Fragment64, { children: [
5384
- /* @__PURE__ */ jsxs66(Colorize39, { color: shellColor, children: [
5385
- /* @__PURE__ */ jsxs66(Subtract11, { children: [
5386
- /* @__PURE__ */ jsx70(
5387
- Cuboid47,
5472
+ return /* @__PURE__ */ jsxs67(Fragment65, { children: [
5473
+ /* @__PURE__ */ jsxs67(Colorize40, { color: shellColor, children: [
5474
+ /* @__PURE__ */ jsxs67(Subtract12, { children: [
5475
+ /* @__PURE__ */ jsx71(
5476
+ Cuboid48,
5388
5477
  {
5389
5478
  center: [0, bodyCenterY, bodyHeight / 2],
5390
5479
  size: [bodyWidth, bodyDepth, bodyHeight]
5391
5480
  }
5392
5481
  ),
5393
- /* @__PURE__ */ jsx70(
5394
- Cuboid47,
5482
+ /* @__PURE__ */ jsx71(
5483
+ Cuboid48,
5395
5484
  {
5396
5485
  center: [0, cavityCenterY, openingCenterZ],
5397
5486
  size: [
@@ -5402,15 +5491,15 @@ var RJ45 = ({
5402
5491
  }
5403
5492
  )
5404
5493
  ] }),
5405
- /* @__PURE__ */ jsx70(
5406
- Cuboid47,
5494
+ /* @__PURE__ */ jsx71(
5495
+ Cuboid48,
5407
5496
  {
5408
5497
  center: [0, frontLipY, 0.72],
5409
5498
  size: [openingWidth + 0.5, shellThickness * 1.25, 1.05]
5410
5499
  }
5411
5500
  ),
5412
- [-1, 1].map((direction) => /* @__PURE__ */ jsx70(
5413
- Cuboid47,
5501
+ [-1, 1].map((direction) => /* @__PURE__ */ jsx71(
5502
+ Cuboid48,
5414
5503
  {
5415
5504
  center: [direction * shieldPinX, shieldPinY, 0.25],
5416
5505
  size: [
@@ -5421,8 +5510,8 @@ var RJ45 = ({
5421
5510
  },
5422
5511
  `shield-tab:${direction}`
5423
5512
  )),
5424
- [-1, 1].map((direction) => /* @__PURE__ */ jsx70(
5425
- Cuboid47,
5513
+ [-1, 1].map((direction) => /* @__PURE__ */ jsx71(
5514
+ Cuboid48,
5426
5515
  {
5427
5516
  center: [
5428
5517
  direction * bodyWidth * 0.24,
@@ -5434,9 +5523,9 @@ var RJ45 = ({
5434
5523
  `top-seam:${direction}`
5435
5524
  ))
5436
5525
  ] }),
5437
- /* @__PURE__ */ jsxs66(Colorize39, { color: housingColor, children: [
5438
- /* @__PURE__ */ jsxs66(Subtract11, { children: [
5439
- /* @__PURE__ */ jsx70(
5526
+ /* @__PURE__ */ jsxs67(Colorize40, { color: housingColor, children: [
5527
+ /* @__PURE__ */ jsxs67(Subtract12, { children: [
5528
+ /* @__PURE__ */ jsx71(
5440
5529
  RoundedCuboid4,
5441
5530
  {
5442
5531
  center: [0, cavityCenterY, openingCenterZ],
@@ -5448,8 +5537,8 @@ var RJ45 = ({
5448
5537
  roundRadius: 0.22
5449
5538
  }
5450
5539
  ),
5451
- /* @__PURE__ */ jsx70(
5452
- Cuboid47,
5540
+ /* @__PURE__ */ jsx71(
5541
+ Cuboid48,
5453
5542
  {
5454
5543
  center: [
5455
5544
  0,
@@ -5464,14 +5553,14 @@ var RJ45 = ({
5464
5553
  }
5465
5554
  )
5466
5555
  ] }),
5467
- /* @__PURE__ */ jsx70(
5468
- Cuboid47,
5556
+ /* @__PURE__ */ jsx71(
5557
+ Cuboid48,
5469
5558
  {
5470
5559
  center: [0, backWallY, openingCenterZ],
5471
5560
  size: [openingWidth - 1.15, shellThickness, openingHeight - 1.25]
5472
5561
  }
5473
5562
  ),
5474
- /* @__PURE__ */ jsx70(
5563
+ /* @__PURE__ */ jsx71(
5475
5564
  RoundedCuboid4,
5476
5565
  {
5477
5566
  center: [0, frontY - frontDirection * cavityDepth * 0.28, 1.55],
@@ -5479,8 +5568,8 @@ var RJ45 = ({
5479
5568
  roundRadius: 0.16
5480
5569
  }
5481
5570
  ),
5482
- [-1, 1].map((direction) => /* @__PURE__ */ jsx70(
5483
- Cylinder13,
5571
+ [-1, 1].map((direction) => /* @__PURE__ */ jsx71(
5572
+ Cylinder14,
5484
5573
  {
5485
5574
  center: [direction * locatorHoleX, locatorHoleY, -0.25],
5486
5575
  radius: Math.max(locatorHoleDiameter * 0.41, 0.65),
@@ -5489,9 +5578,9 @@ var RJ45 = ({
5489
5578
  `locator:${direction}`
5490
5579
  ))
5491
5580
  ] }),
5492
- /* @__PURE__ */ jsxs66(Colorize39, { color: contactColor, children: [
5493
- signalPinPositions.map(({ x, y }, index) => /* @__PURE__ */ jsx70(
5494
- Cylinder13,
5581
+ /* @__PURE__ */ jsxs67(Colorize40, { color: contactColor, children: [
5582
+ signalPinPositions.map(({ x, y }, index) => /* @__PURE__ */ jsx71(
5583
+ Cylinder14,
5495
5584
  {
5496
5585
  center: [x, y, 0.15],
5497
5586
  radius: signalLeadRadius,
@@ -5499,15 +5588,15 @@ var RJ45 = ({
5499
5588
  },
5500
5589
  `signal-lead:${index}`
5501
5590
  )),
5502
- range2(8).map((index) => /* @__PURE__ */ jsx70(
5503
- Translate33,
5591
+ range2(8).map((index) => /* @__PURE__ */ jsx71(
5592
+ Translate34,
5504
5593
  {
5505
5594
  offset: [
5506
5595
  (index - 3.5) * contactPitch,
5507
5596
  contactY,
5508
5597
  contactZ + (index % 2 === 0 ? 0.03 : -0.03)
5509
5598
  ],
5510
- children: /* @__PURE__ */ jsx70(Rotate14, { rotation: [frontDirection * 0.2, 0, 0], children: /* @__PURE__ */ jsx70(
5599
+ children: /* @__PURE__ */ jsx71(Rotate15, { rotation: [frontDirection * 0.2, 0, 0], children: /* @__PURE__ */ jsx71(
5511
5600
  RoundedCuboid4,
5512
5601
  {
5513
5602
  size: [Math.max(contactPitch * 0.28, 0.28), 3.25, 0.16],
@@ -5517,8 +5606,8 @@ var RJ45 = ({
5517
5606
  },
5518
5607
  `socket-contact:${index}`
5519
5608
  )),
5520
- ledPins && ledPinPositions.map((x, index) => /* @__PURE__ */ jsx70(
5521
- Cylinder13,
5609
+ ledPins && ledPinPositions.map((x, index) => /* @__PURE__ */ jsx71(
5610
+ Cylinder14,
5522
5611
  {
5523
5612
  center: [x, ledPinY, 0.15],
5524
5613
  radius: signalLeadRadius,
@@ -5527,8 +5616,8 @@ var RJ45 = ({
5527
5616
  `led-lead:${index}`
5528
5617
  ))
5529
5618
  ] }),
5530
- ledPins && /* @__PURE__ */ jsxs66(Fragment64, { children: [
5531
- /* @__PURE__ */ jsx70(
5619
+ ledPins && /* @__PURE__ */ jsxs67(Fragment65, { children: [
5620
+ /* @__PURE__ */ jsx71(
5532
5621
  RoundedCuboid4,
5533
5622
  {
5534
5623
  color: "#73b744",
@@ -5541,7 +5630,7 @@ var RJ45 = ({
5541
5630
  roundRadius: 0.18
5542
5631
  }
5543
5632
  ),
5544
- /* @__PURE__ */ jsx70(
5633
+ /* @__PURE__ */ jsx71(
5545
5634
  RoundedCuboid4,
5546
5635
  {
5547
5636
  color: "#e0aa35",
@@ -5559,7 +5648,7 @@ var RJ45 = ({
5559
5648
  };
5560
5649
 
5561
5650
  // lib/Footprinter3d.tsx
5562
- import { jsx as jsx71 } from "react/jsx-runtime";
5651
+ import { jsx as jsx72 } from "react/jsx-runtime";
5563
5652
  var Footprinter3d = ({ footprint }) => {
5564
5653
  let normalizedFootprint = footprint;
5565
5654
  if (footprint.startsWith("jstzh1_5mm")) {
@@ -5568,13 +5657,15 @@ var Footprinter3d = ({ footprint }) => {
5568
5657
  normalizedFootprint = `zh${numPins}`;
5569
5658
  }
5570
5659
  const fpJson = fp3.string(normalizedFootprint).json();
5660
+ const colorMatch = footprint.match(/_color\(([^)]+)\)/);
5661
+ const color = colorMatch ? colorMatch[1] : void 0;
5571
5662
  switch (fpJson.fn) {
5572
5663
  case "dip":
5573
- return /* @__PURE__ */ jsx71(Dip, { numPins: fpJson.num_pins, pitch: fpJson.p, bodyWidth: fpJson.w });
5664
+ return /* @__PURE__ */ jsx72(Dip, { numPins: fpJson.num_pins, pitch: fpJson.p, bodyWidth: fpJson.w });
5574
5665
  case "axial":
5575
- return /* @__PURE__ */ jsx71(AxialCapacitor, { pitch: fpJson.p });
5666
+ return /* @__PURE__ */ jsx72(AxialCapacitor, { pitch: fpJson.p });
5576
5667
  case "tssop":
5577
- return /* @__PURE__ */ jsx71(
5668
+ return /* @__PURE__ */ jsx72(
5578
5669
  Tssop,
5579
5670
  {
5580
5671
  pinCount: fpJson.num_pins,
@@ -5585,7 +5676,7 @@ var Footprinter3d = ({ footprint }) => {
5585
5676
  }
5586
5677
  );
5587
5678
  case "msop":
5588
- return /* @__PURE__ */ jsx71(
5679
+ return /* @__PURE__ */ jsx72(
5589
5680
  MSOP,
5590
5681
  {
5591
5682
  pinCount: fpJson.num_pins,
@@ -5596,7 +5687,7 @@ var Footprinter3d = ({ footprint }) => {
5596
5687
  }
5597
5688
  );
5598
5689
  case "vssop":
5599
- return /* @__PURE__ */ jsx71(
5690
+ return /* @__PURE__ */ jsx72(
5600
5691
  VSSOP,
5601
5692
  {
5602
5693
  pinCount: fpJson.num_pins,
@@ -5608,7 +5699,7 @@ var Footprinter3d = ({ footprint }) => {
5608
5699
  }
5609
5700
  );
5610
5701
  case "qfp":
5611
- return /* @__PURE__ */ jsx71(
5702
+ return /* @__PURE__ */ jsx72(
5612
5703
  QFP,
5613
5704
  {
5614
5705
  pinCount: fpJson.num_pins,
@@ -5619,12 +5710,12 @@ var Footprinter3d = ({ footprint }) => {
5619
5710
  }
5620
5711
  );
5621
5712
  case "tqfp":
5622
- return /* @__PURE__ */ jsx71(tqfp_default, {});
5713
+ return /* @__PURE__ */ jsx72(tqfp_default, {});
5623
5714
  case "lqfp":
5624
- return /* @__PURE__ */ jsx71(LQFP, { pinCount: fpJson.num_pins });
5715
+ return /* @__PURE__ */ jsx72(LQFP, { pinCount: fpJson.num_pins });
5625
5716
  case "qfn": {
5626
5717
  const hasThermalPad = typeof fpJson.thermalpad?.x === "number" && typeof fpJson.thermalpad?.y === "number";
5627
- return /* @__PURE__ */ jsx71(
5718
+ return /* @__PURE__ */ jsx72(
5628
5719
  qfn_default,
5629
5720
  {
5630
5721
  num_pins: fpJson.num_pins,
@@ -5642,7 +5733,7 @@ var Footprinter3d = ({ footprint }) => {
5642
5733
  }
5643
5734
  case "dfn": {
5644
5735
  const hasThermalPad = typeof fpJson.thermalpad?.x === "number" && typeof fpJson.thermalpad?.y === "number";
5645
- return /* @__PURE__ */ jsx71(
5736
+ return /* @__PURE__ */ jsx72(
5646
5737
  DFN,
5647
5738
  {
5648
5739
  num_pins: fpJson.num_pins,
@@ -5662,7 +5753,7 @@ var Footprinter3d = ({ footprint }) => {
5662
5753
  const rowsMatch = footprint.match(/_rows(\d+)/);
5663
5754
  const rows = rowsMatch && rowsMatch[1] ? parseInt(rowsMatch[1], 10) : 1;
5664
5755
  if (fpJson.male)
5665
- return /* @__PURE__ */ jsx71(
5756
+ return /* @__PURE__ */ jsx72(
5666
5757
  PinRow,
5667
5758
  {
5668
5759
  numberOfPins: fpJson.num_pins,
@@ -5675,7 +5766,7 @@ var Footprinter3d = ({ footprint }) => {
5675
5766
  }
5676
5767
  );
5677
5768
  if (fpJson.female)
5678
- return /* @__PURE__ */ jsx71(
5769
+ return /* @__PURE__ */ jsx72(
5679
5770
  FemaleHeaderRow,
5680
5771
  {
5681
5772
  numberOfPins: fpJson.num_pins,
@@ -5685,7 +5776,7 @@ var Footprinter3d = ({ footprint }) => {
5685
5776
  );
5686
5777
  }
5687
5778
  case "smdpinheader":
5688
- return /* @__PURE__ */ jsx71(
5779
+ return /* @__PURE__ */ jsx72(
5689
5780
  SmdPinHeader,
5690
5781
  {
5691
5782
  numberOfPins: fpJson.num_pins,
@@ -5693,50 +5784,52 @@ var Footprinter3d = ({ footprint }) => {
5693
5784
  bodyWidth: fpJson.bh
5694
5785
  }
5695
5786
  );
5787
+ case "led5050":
5788
+ return /* @__PURE__ */ jsx72(Led5050, { color });
5696
5789
  case "cap": {
5697
5790
  switch (fpJson.imperial) {
5698
5791
  case "0402":
5699
- return /* @__PURE__ */ jsx71(A0402, { color: "#856c4d" });
5792
+ return /* @__PURE__ */ jsx72(A0402, { color: "#856c4d" });
5700
5793
  case "0603":
5701
- return /* @__PURE__ */ jsx71(A0603, { color: "#856c4d" });
5794
+ return /* @__PURE__ */ jsx72(A0603, { color: "#856c4d" });
5702
5795
  case "0805":
5703
- return /* @__PURE__ */ jsx71(A0805, { color: "#856c4d" });
5796
+ return /* @__PURE__ */ jsx72(A0805, { color: "#856c4d" });
5704
5797
  case "0201":
5705
- return /* @__PURE__ */ jsx71(A0201, { color: "#856c4d" });
5798
+ return /* @__PURE__ */ jsx72(A0201, { color: "#856c4d" });
5706
5799
  case "01005":
5707
- return /* @__PURE__ */ jsx71(A01005, { color: "#856c4d" });
5800
+ return /* @__PURE__ */ jsx72(A01005, { color: "#856c4d" });
5708
5801
  case "1206":
5709
- return /* @__PURE__ */ jsx71(A1206, { color: "#856c4d" });
5802
+ return /* @__PURE__ */ jsx72(A1206, { color: "#856c4d" });
5710
5803
  case "1210":
5711
- return /* @__PURE__ */ jsx71(A1210, { color: "#856c4d" });
5804
+ return /* @__PURE__ */ jsx72(A1210, { color: "#856c4d" });
5712
5805
  case "2010":
5713
- return /* @__PURE__ */ jsx71(A2010, { color: "#856c4d" });
5806
+ return /* @__PURE__ */ jsx72(A2010, { color: "#856c4d" });
5714
5807
  case "2512":
5715
- return /* @__PURE__ */ jsx71(A2512, { color: "#856c4d" });
5808
+ return /* @__PURE__ */ jsx72(A2512, { color: "#856c4d" });
5716
5809
  }
5717
5810
  }
5718
5811
  case "sot235":
5719
- return /* @__PURE__ */ jsx71(SOT_235_default, {});
5812
+ return /* @__PURE__ */ jsx72(SOT_235_default, {});
5720
5813
  case "sot457":
5721
- return /* @__PURE__ */ jsx71(SOT457, {});
5814
+ return /* @__PURE__ */ jsx72(SOT457, {});
5722
5815
  case "sot223":
5723
- return /* @__PURE__ */ jsx71(SOT223, {});
5816
+ return /* @__PURE__ */ jsx72(SOT223, {});
5724
5817
  case "sot23w":
5725
- return /* @__PURE__ */ jsx71(SOT23W, {});
5818
+ return /* @__PURE__ */ jsx72(SOT23W, {});
5726
5819
  case "sot323":
5727
- return /* @__PURE__ */ jsx71(SOT323, {});
5820
+ return /* @__PURE__ */ jsx72(SOT323, {});
5728
5821
  case "sod323f":
5729
- return /* @__PURE__ */ jsx71(SOD323F, {});
5822
+ return /* @__PURE__ */ jsx72(SOD323F, {});
5730
5823
  case "sod323fl":
5731
- return /* @__PURE__ */ jsx71(SOD323FL, {});
5824
+ return /* @__PURE__ */ jsx72(SOD323FL, {});
5732
5825
  case "sot363":
5733
- return /* @__PURE__ */ jsx71(SOT_363_default, {});
5826
+ return /* @__PURE__ */ jsx72(SOT_363_default, {});
5734
5827
  case "sot886":
5735
- return /* @__PURE__ */ jsx71(SOT886, {});
5828
+ return /* @__PURE__ */ jsx72(SOT886, {});
5736
5829
  case "sot963":
5737
- return /* @__PURE__ */ jsx71(SOT963, {});
5830
+ return /* @__PURE__ */ jsx72(SOT963, {});
5738
5831
  case "pushbutton":
5739
- return /* @__PURE__ */ jsx71(
5832
+ return /* @__PURE__ */ jsx72(
5740
5833
  PushButton,
5741
5834
  {
5742
5835
  width: fpJson.w,
@@ -5746,11 +5839,11 @@ var Footprinter3d = ({ footprint }) => {
5746
5839
  );
5747
5840
  case "jst":
5748
5841
  if (fpJson.zh) {
5749
- return /* @__PURE__ */ jsx71(JSTZH1_5mm, { numPins: fpJson.num_pins });
5842
+ return /* @__PURE__ */ jsx72(JSTZH1_5mm, { numPins: fpJson.num_pins });
5750
5843
  }
5751
5844
  break;
5752
5845
  case "fpc":
5753
- return /* @__PURE__ */ jsx71(
5846
+ return /* @__PURE__ */ jsx72(
5754
5847
  FPC,
5755
5848
  {
5756
5849
  pinCount: fpJson.num_pins,
@@ -5770,7 +5863,7 @@ var Footprinter3d = ({ footprint }) => {
5770
5863
  }
5771
5864
  );
5772
5865
  case "rj45":
5773
- return /* @__PURE__ */ jsx71(
5866
+ return /* @__PURE__ */ jsx72(
5774
5867
  RJ45,
5775
5868
  {
5776
5869
  bodyWidth: fpJson.w,
@@ -5794,7 +5887,7 @@ var Footprinter3d = ({ footprint }) => {
5794
5887
  }
5795
5888
  );
5796
5889
  case "soic":
5797
- return /* @__PURE__ */ jsx71(
5890
+ return /* @__PURE__ */ jsx72(
5798
5891
  SOIC,
5799
5892
  {
5800
5893
  pinCount: fpJson.num_pins,
@@ -5805,41 +5898,41 @@ var Footprinter3d = ({ footprint }) => {
5805
5898
  }
5806
5899
  );
5807
5900
  case "sod523":
5808
- return /* @__PURE__ */ jsx71(SOD523, {});
5901
+ return /* @__PURE__ */ jsx72(SOD523, {});
5809
5902
  case "sod723":
5810
- return /* @__PURE__ */ jsx71(SOD723_default, {});
5903
+ return /* @__PURE__ */ jsx72(SOD723_default, {});
5811
5904
  case "sod882":
5812
- return /* @__PURE__ */ jsx71(SOD882, {});
5905
+ return /* @__PURE__ */ jsx72(SOD882, {});
5813
5906
  case "sma":
5814
- return /* @__PURE__ */ jsx71(SMA, {});
5907
+ return /* @__PURE__ */ jsx72(SMA, {});
5815
5908
  case "smb":
5816
- return /* @__PURE__ */ jsx71(SMB, {});
5909
+ return /* @__PURE__ */ jsx72(SMB, {});
5817
5910
  case "smc":
5818
- return /* @__PURE__ */ jsx71(SMC, {});
5911
+ return /* @__PURE__ */ jsx72(SMC, {});
5819
5912
  case "smf":
5820
- return /* @__PURE__ */ jsx71(SMF, {});
5913
+ return /* @__PURE__ */ jsx72(SMF, {});
5821
5914
  case "sod123f":
5822
- return /* @__PURE__ */ jsx71(SOD123F, {});
5915
+ return /* @__PURE__ */ jsx72(SOD123F, {});
5823
5916
  case "sod123fl":
5824
- return /* @__PURE__ */ jsx71(SOD123FL, {});
5917
+ return /* @__PURE__ */ jsx72(SOD123FL, {});
5825
5918
  case "sod123w":
5826
- return /* @__PURE__ */ jsx71(SOD123W, {});
5919
+ return /* @__PURE__ */ jsx72(SOD123W, {});
5827
5920
  case "sod128":
5828
- return /* @__PURE__ */ jsx71(SOD128, {});
5921
+ return /* @__PURE__ */ jsx72(SOD128, {});
5829
5922
  case "sod323":
5830
- return /* @__PURE__ */ jsx71(SOD323, {});
5923
+ return /* @__PURE__ */ jsx72(SOD323, {});
5831
5924
  case "sod923":
5832
- return /* @__PURE__ */ jsx71(SOD923, {});
5925
+ return /* @__PURE__ */ jsx72(SOD923, {});
5833
5926
  case "hc49":
5834
- return /* @__PURE__ */ jsx71(HC49, {});
5927
+ return /* @__PURE__ */ jsx72(HC49, {});
5835
5928
  case "micromelf":
5836
- return /* @__PURE__ */ jsx71(MicroMELF, {});
5929
+ return /* @__PURE__ */ jsx72(MicroMELF, {});
5837
5930
  case "minimelf":
5838
- return /* @__PURE__ */ jsx71(MINIMELF, {});
5931
+ return /* @__PURE__ */ jsx72(MINIMELF, {});
5839
5932
  case "melf":
5840
- return /* @__PURE__ */ jsx71(MELF, {});
5933
+ return /* @__PURE__ */ jsx72(MELF, {});
5841
5934
  case "ms012":
5842
- return /* @__PURE__ */ jsx71(
5935
+ return /* @__PURE__ */ jsx72(
5843
5936
  MS012,
5844
5937
  {
5845
5938
  pinCount: fpJson.num_pins,
@@ -5849,7 +5942,7 @@ var Footprinter3d = ({ footprint }) => {
5849
5942
  }
5850
5943
  );
5851
5944
  case "ms013":
5852
- return /* @__PURE__ */ jsx71(
5945
+ return /* @__PURE__ */ jsx72(
5853
5946
  MS013,
5854
5947
  {
5855
5948
  pinCount: fpJson.num_pins,
@@ -5859,14 +5952,14 @@ var Footprinter3d = ({ footprint }) => {
5859
5952
  }
5860
5953
  );
5861
5954
  case "sot723":
5862
- return /* @__PURE__ */ jsx71(SOT723, {});
5955
+ return /* @__PURE__ */ jsx72(SOT723, {});
5863
5956
  case "to220":
5864
- return /* @__PURE__ */ jsx71(TO220, {});
5957
+ return /* @__PURE__ */ jsx72(TO220, {});
5865
5958
  case "to92":
5866
- return /* @__PURE__ */ jsx71(TO92, {});
5959
+ return /* @__PURE__ */ jsx72(TO92, {});
5867
5960
  case "stampboard":
5868
5961
  case "stampreceiver":
5869
- return /* @__PURE__ */ jsx71(
5962
+ return /* @__PURE__ */ jsx72(
5870
5963
  StampBoard,
5871
5964
  {
5872
5965
  bodyWidth: fpJson.w,
@@ -5890,7 +5983,7 @@ var Footprinter3d = ({ footprint }) => {
5890
5983
  const pinRow = fpJson.pinrow;
5891
5984
  const pinRowHoleEdgeToEdgeDist = fpJson.pinRowHoleEdgeToEdgeDist;
5892
5985
  const holes = Array.isArray(fpJson.holes) ? fpJson.holes : [];
5893
- return /* @__PURE__ */ jsx71(
5986
+ return /* @__PURE__ */ jsx72(
5894
5987
  MountedPcbModule,
5895
5988
  {
5896
5989
  numPins: pinRow,
@@ -5915,33 +6008,31 @@ var Footprinter3d = ({ footprint }) => {
5915
6008
  );
5916
6009
  }
5917
6010
  }
5918
- const colorMatch = footprint.match(/_color\(([^)]+)\)/);
5919
- const color = colorMatch ? colorMatch[1] : void 0;
5920
6011
  switch (fpJson.imperial) {
5921
6012
  case "0402":
5922
- return /* @__PURE__ */ jsx71(A0402, { color });
6013
+ return /* @__PURE__ */ jsx72(A0402, { color });
5923
6014
  case "0603":
5924
- return /* @__PURE__ */ jsx71(A0603, { color });
6015
+ return /* @__PURE__ */ jsx72(A0603, { color });
5925
6016
  case "0805":
5926
- return /* @__PURE__ */ jsx71(A0805, { color });
6017
+ return /* @__PURE__ */ jsx72(A0805, { color });
5927
6018
  case "0201":
5928
- return /* @__PURE__ */ jsx71(A0201, { color });
6019
+ return /* @__PURE__ */ jsx72(A0201, { color });
5929
6020
  case "01005":
5930
- return /* @__PURE__ */ jsx71(A01005, { color });
6021
+ return /* @__PURE__ */ jsx72(A01005, { color });
5931
6022
  case "1206":
5932
- return /* @__PURE__ */ jsx71(A1206, { color });
6023
+ return /* @__PURE__ */ jsx72(A1206, { color });
5933
6024
  case "1210":
5934
- return /* @__PURE__ */ jsx71(A1210, { color });
6025
+ return /* @__PURE__ */ jsx72(A1210, { color });
5935
6026
  case "2010":
5936
- return /* @__PURE__ */ jsx71(A2010, { color });
6027
+ return /* @__PURE__ */ jsx72(A2010, { color });
5937
6028
  case "2512":
5938
- return /* @__PURE__ */ jsx71(A2512, { color });
6029
+ return /* @__PURE__ */ jsx72(A2512, { color });
5939
6030
  }
5940
6031
  return null;
5941
6032
  };
5942
6033
 
5943
6034
  // lib/SOT-23-3P.tsx
5944
- import { Fragment as Fragment65, jsx as jsx72, jsxs as jsxs67 } from "react/jsx-runtime";
6035
+ import { Fragment as Fragment66, jsx as jsx73, jsxs as jsxs68 } from "react/jsx-runtime";
5945
6036
  var SOT233P = ({ fullWidth = 2.9, fullLength: fullLength10 = 2.8 }) => {
5946
6037
  const bodyWidth = 1.3;
5947
6038
  const bodyLength10 = 2.9;
@@ -5952,8 +6043,8 @@ var SOT233P = ({ fullWidth = 2.9, fullLength: fullLength10 = 2.8 }) => {
5952
6043
  const padContactLength = 0.4;
5953
6044
  const padThickness = leadThickness / 2;
5954
6045
  const extendedBodyDistance = (fullWidth - bodyWidth) / 2 + 0.3;
5955
- return /* @__PURE__ */ jsxs67(Fragment65, { children: [
5956
- /* @__PURE__ */ jsx72(
6046
+ return /* @__PURE__ */ jsxs68(Fragment66, { children: [
6047
+ /* @__PURE__ */ jsx73(
5957
6048
  SmdChipLead,
5958
6049
  {
5959
6050
  rotation: Math.PI,
@@ -5970,7 +6061,7 @@ var SOT233P = ({ fullWidth = 2.9, fullLength: fullLength10 = 2.8 }) => {
5970
6061
  },
5971
6062
  1
5972
6063
  ),
5973
- /* @__PURE__ */ jsx72(
6064
+ /* @__PURE__ */ jsx73(
5974
6065
  SmdChipLead,
5975
6066
  {
5976
6067
  rotation: Math.PI,
@@ -5987,7 +6078,7 @@ var SOT233P = ({ fullWidth = 2.9, fullLength: fullLength10 = 2.8 }) => {
5987
6078
  },
5988
6079
  2
5989
6080
  ),
5990
- /* @__PURE__ */ jsx72(
6081
+ /* @__PURE__ */ jsx73(
5991
6082
  SmdChipLead,
5992
6083
  {
5993
6084
  position: {
@@ -6003,7 +6094,7 @@ var SOT233P = ({ fullWidth = 2.9, fullLength: fullLength10 = 2.8 }) => {
6003
6094
  },
6004
6095
  3
6005
6096
  ),
6006
- /* @__PURE__ */ jsx72(
6097
+ /* @__PURE__ */ jsx73(
6007
6098
  ChipBody,
6008
6099
  {
6009
6100
  center: { x: 0, y: 0, z: 0 },
@@ -6016,8 +6107,8 @@ var SOT233P = ({ fullWidth = 2.9, fullLength: fullLength10 = 2.8 }) => {
6016
6107
  };
6017
6108
 
6018
6109
  // lib/SOT-563.tsx
6019
- import { Cuboid as Cuboid48, Translate as Translate34, Rotate as Rotate15, Colorize as Colorize40 } from "jscad-fiber";
6020
- import { Fragment as Fragment66, jsx as jsx73, jsxs as jsxs68 } from "react/jsx-runtime";
6110
+ import { Cuboid as Cuboid49, Translate as Translate35, Rotate as Rotate16, Colorize as Colorize41 } from "jscad-fiber";
6111
+ import { Fragment as Fragment67, jsx as jsx74, jsxs as jsxs69 } from "react/jsx-runtime";
6021
6112
  var SOT563 = ({ fullWidth = 1.94, fullLength: fullLength10 = 1.6 }) => {
6022
6113
  const bodyWidth = 1.2;
6023
6114
  const bodyLength10 = 1.6;
@@ -6027,28 +6118,28 @@ var SOT563 = ({ fullWidth = 1.94, fullLength: fullLength10 = 1.6 }) => {
6027
6118
  const leadHeight = 0.13;
6028
6119
  const leadSpacing = 0.5;
6029
6120
  const bodyZOffset = -0.4;
6030
- return /* @__PURE__ */ jsxs68(Fragment66, { children: [
6031
- /* @__PURE__ */ jsx73(Rotate15, { rotation: [45 * Math.PI, 0, 0], children: /* @__PURE__ */ jsx73(Translate34, { center: [0, 0, bodyZOffset], children: /* @__PURE__ */ jsx73(Colorize40, { color: "grey", children: /* @__PURE__ */ jsx73(Cuboid48, { size: [bodyWidth, bodyLength10, bodyHeight] }) }) }) }),
6121
+ return /* @__PURE__ */ jsxs69(Fragment67, { children: [
6122
+ /* @__PURE__ */ jsx74(Rotate16, { rotation: [45 * Math.PI, 0, 0], children: /* @__PURE__ */ jsx74(Translate35, { center: [0, 0, bodyZOffset], children: /* @__PURE__ */ jsx74(Colorize41, { color: "grey", children: /* @__PURE__ */ jsx74(Cuboid49, { size: [bodyWidth, bodyLength10, bodyHeight] }) }) }) }),
6032
6123
  [-1, 0, 1].flatMap((yOffset, index) => [
6033
6124
  // Left lead
6034
- /* @__PURE__ */ jsx73(
6035
- Translate34,
6125
+ /* @__PURE__ */ jsx74(
6126
+ Translate35,
6036
6127
  {
6037
6128
  center: [
6038
6129
  -bodyWidth / 2 - 0.03,
6039
6130
  yOffset * leadSpacing,
6040
6131
  leadHeight / 2
6041
6132
  ],
6042
- children: /* @__PURE__ */ jsx73(Cuboid48, { size: [leadLength, leadWidth, leadHeight] })
6133
+ children: /* @__PURE__ */ jsx74(Cuboid49, { size: [leadLength, leadWidth, leadHeight] })
6043
6134
  },
6044
6135
  `left-${index}`
6045
6136
  ),
6046
6137
  // Right lead
6047
- /* @__PURE__ */ jsx73(
6048
- Translate34,
6138
+ /* @__PURE__ */ jsx74(
6139
+ Translate35,
6049
6140
  {
6050
6141
  center: [bodyWidth / 2 + 0.03, yOffset * leadSpacing, leadHeight / 2],
6051
- children: /* @__PURE__ */ jsx73(Cuboid48, { size: [leadLength, leadWidth, leadHeight] })
6142
+ children: /* @__PURE__ */ jsx74(Cuboid49, { size: [leadLength, leadWidth, leadHeight] })
6052
6143
  },
6053
6144
  `right-${index}`
6054
6145
  )
@@ -6057,7 +6148,7 @@ var SOT563 = ({ fullWidth = 1.94, fullLength: fullLength10 = 1.6 }) => {
6057
6148
  };
6058
6149
 
6059
6150
  // lib/sod-123.tsx
6060
- import { Fragment as Fragment67, jsx as jsx74, jsxs as jsxs69 } from "react/jsx-runtime";
6151
+ import { Fragment as Fragment68, jsx as jsx75, jsxs as jsxs70 } from "react/jsx-runtime";
6061
6152
  var SOD123 = ({ fullWidth = 3.8, fullLength: fullLength10 = 1.6 }) => {
6062
6153
  const bodyWidth = 2.9;
6063
6154
  const bodyLength10 = 1.3;
@@ -6068,8 +6159,8 @@ var SOD123 = ({ fullWidth = 3.8, fullLength: fullLength10 = 1.6 }) => {
6068
6159
  const padContactLength = 0.4;
6069
6160
  const padThickness = leadThickness / 2;
6070
6161
  const bodyDistance = (fullWidth - bodyWidth) / 2;
6071
- return /* @__PURE__ */ jsxs69(Fragment67, { children: [
6072
- /* @__PURE__ */ jsx74(
6162
+ return /* @__PURE__ */ jsxs70(Fragment68, { children: [
6163
+ /* @__PURE__ */ jsx75(
6073
6164
  SmdChipLead,
6074
6165
  {
6075
6166
  position: {
@@ -6085,7 +6176,7 @@ var SOD123 = ({ fullWidth = 3.8, fullLength: fullLength10 = 1.6 }) => {
6085
6176
  },
6086
6177
  1
6087
6178
  ),
6088
- /* @__PURE__ */ jsx74(
6179
+ /* @__PURE__ */ jsx75(
6089
6180
  SmdChipLead,
6090
6181
  {
6091
6182
  rotation: Math.PI,
@@ -6102,7 +6193,7 @@ var SOD123 = ({ fullWidth = 3.8, fullLength: fullLength10 = 1.6 }) => {
6102
6193
  },
6103
6194
  2
6104
6195
  ),
6105
- /* @__PURE__ */ jsx74(
6196
+ /* @__PURE__ */ jsx75(
6106
6197
  ChipBody,
6107
6198
  {
6108
6199
  center: { x: 0, y: 0, z: 0 },
@@ -6138,6 +6229,7 @@ export {
6138
6229
  HC49,
6139
6230
  JSTZH1_5mm,
6140
6231
  LQFP,
6232
+ Led5050,
6141
6233
  MELF,
6142
6234
  MINIMELF,
6143
6235
  MS012,