jscad-electronics 0.0.107 → 0.0.108

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
@@ -669,10 +669,12 @@ var DipPinLeg = ({ x, y, z }) => {
669
669
  var Dip = ({
670
670
  numPins = 8,
671
671
  pitch = 2.54,
672
- bodyWidth = 6.4
672
+ bodyWidth = 6.4,
673
+ rowSpacing
673
674
  }) => {
674
675
  const numPinsOnEachSide = Math.floor(numPins / 2);
675
- const crossBodyPinWidth = bodyWidth + 1;
676
+ const pinRowSpacing = rowSpacing ?? (bodyWidth >= 7 ? bodyWidth : bodyWidth + 1.22);
677
+ const chipBodyWidth = bodyWidth >= 7 ? pinRowSpacing - 1.22 : bodyWidth;
676
678
  return /* @__PURE__ */ jsxs14(Fragment12, { children: [
677
679
  range(numPins).map((i) => {
678
680
  const yRow = i % numPinsOnEachSide;
@@ -680,7 +682,7 @@ var Dip = ({
680
682
  return /* @__PURE__ */ jsx15(
681
683
  DipPinLeg,
682
684
  {
683
- x: xRow * crossBodyPinWidth / 2,
685
+ x: xRow * pinRowSpacing / 2,
684
686
  y: yRow * pitch - (numPinsOnEachSide - 1) / 2 * pitch,
685
687
  z: DIP_PIN_HEIGHT / 2 + heightAboveSurface
686
688
  },
@@ -690,7 +692,7 @@ var Dip = ({
690
692
  /* @__PURE__ */ jsx15(
691
693
  ChipBody,
692
694
  {
693
- width: bodyWidth,
695
+ width: chipBodyWidth,
694
696
  length: numPinsOnEachSide * pitch + 0.5,
695
697
  height: DIP_PIN_HEIGHT - heightAboveSurface,
696
698
  heightAboveSurface,