jscad-electronics 0.0.158 → 0.0.160

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
@@ -608,6 +608,7 @@ import {
608
608
  Cylinder as Cylinder3,
609
609
  ExtrudeLinear as ExtrudeLinear2,
610
610
  Polygon as Polygon2,
611
+ Rotate as Rotate3,
611
612
  Translate as Translate4
612
613
  } from "jscad-fiber";
613
614
  import { jsx as jsx13 } from "react/jsx-runtime";
@@ -617,8 +618,18 @@ var FootprintPad = ({
617
618
  isPin1
618
619
  }) => {
619
620
  const color = isPin1 ? [0, 255, 0] : [255, 0, 0];
620
- if (pad.shape === "rect") {
621
- return /* @__PURE__ */ jsx13(Colorize4, { color, children: /* @__PURE__ */ jsx13(Translate4, { offset: [pad.x, pad.y, -5e-3], children: /* @__PURE__ */ jsx13(Cuboid12, { size: [pad.width, pad.height, PAD_THICKNESS] }) }) });
621
+ if (pad.shape === "rect" || pad.shape === "rotated_rect") {
622
+ return /* @__PURE__ */ jsx13(Colorize4, { color, children: /* @__PURE__ */ jsx13(Translate4, { offset: [pad.x, pad.y, -5e-3], children: /* @__PURE__ */ jsx13(
623
+ Rotate3,
624
+ {
625
+ angles: [
626
+ 0,
627
+ 0,
628
+ pad.shape === "rotated_rect" ? pad.ccw_rotation * Math.PI / 180 : 0
629
+ ],
630
+ children: /* @__PURE__ */ jsx13(Cuboid12, { size: [pad.width, pad.height, PAD_THICKNESS] })
631
+ }
632
+ ) }) });
622
633
  }
623
634
  if (pad.shape === "circle") {
624
635
  const radius = pad.radius ?? pad.r ?? 0.25;
@@ -762,12 +773,12 @@ var ExtrudedPads = ({
762
773
  };
763
774
 
764
775
  // lib/Footprinter3d.tsx
765
- import { fp as fp5 } from "@tscircuit/footprinter";
776
+ import { fp as fp8 } from "@tscircuit/footprinter";
766
777
  import { mp } from "@tscircuit/modelprinter";
767
- import { Rotate as Rotate19, Translate as Translate39 } from "jscad-fiber";
778
+ import { Rotate as Rotate22, Translate as Translate41 } from "jscad-fiber";
768
779
 
769
780
  // lib/DualInlinePackage.tsx
770
- import { Polygon as Polygon3, ExtrudeLinear as ExtrudeLinear3, Rotate as Rotate3, Translate as Translate6 } from "jscad-fiber";
781
+ import { Polygon as Polygon3, ExtrudeLinear as ExtrudeLinear3, Rotate as Rotate4, Translate as Translate6 } from "jscad-fiber";
771
782
 
772
783
  // lib/utils/range.ts
773
784
  var range = (end) => Array.from({ length: end }, (_, i) => i);
@@ -862,7 +873,7 @@ var heightAboveSurface = 0.5;
862
873
  var DipPinLeg = ({ x, y, z }) => {
863
874
  const isRotated = x > 0;
864
875
  return /* @__PURE__ */ jsxs15(Fragment13, { children: [
865
- /* @__PURE__ */ jsx16(Translate6, { offset: { x: x + 0.25 / 2, y, z }, children: /* @__PURE__ */ jsx16(Rotate3, { rotation: ["-90deg", 0, "90deg"], children: /* @__PURE__ */ jsx16(ExtrudeLinear3, { height: 0.25, children: /* @__PURE__ */ jsx16(
876
+ /* @__PURE__ */ jsx16(Translate6, { offset: { x: x + 0.25 / 2, y, z }, children: /* @__PURE__ */ jsx16(Rotate4, { rotation: ["-90deg", 0, "90deg"], children: /* @__PURE__ */ jsx16(ExtrudeLinear3, { height: 0.25, children: /* @__PURE__ */ jsx16(
866
877
  Polygon3,
867
878
  {
868
879
  points: svgPathPoints.slice().reverse().map((p) => [p.x, p.y])
@@ -876,7 +887,7 @@ var DipPinLeg = ({ x, y, z }) => {
876
887
  y: y + (isRotated ? 1 : -1),
877
888
  z
878
889
  },
879
- children: /* @__PURE__ */ jsx16(Rotate3, { rotation: ["-90deg", "90deg", isRotated ? "180deg" : "0deg"], children: /* @__PURE__ */ jsx16(ExtrudeLinear3, { height: 2, children: /* @__PURE__ */ jsx16(
890
+ children: /* @__PURE__ */ jsx16(Rotate4, { rotation: ["-90deg", "90deg", isRotated ? "180deg" : "0deg"], children: /* @__PURE__ */ jsx16(ExtrudeLinear3, { height: 2, children: /* @__PURE__ */ jsx16(
880
891
  Polygon3,
881
892
  {
882
893
  points: getExpandedStroke(
@@ -934,7 +945,7 @@ import {
934
945
  Polygon as Polygon4,
935
946
  ExtrudeLinear as ExtrudeLinear4,
936
947
  Translate as Translate7,
937
- Rotate as Rotate4,
948
+ Rotate as Rotate5,
938
949
  Colorize as Colorize6
939
950
  } from "jscad-fiber";
940
951
  import { jsx as jsx17 } from "react/jsx-runtime";
@@ -963,7 +974,7 @@ var SmdChipLead = (props) => {
963
974
  const N = 15;
964
975
  const points = Array.from({ length: N }).map((_, i) => i / (N - 1) * bodyDistance).map((x) => [x, calculateSCurve(x, props)]);
965
976
  const polygon = getExpandedStroke(points, thickness);
966
- return /* @__PURE__ */ jsx17(Colorize6, { color: "#fff", children: /* @__PURE__ */ jsx17(Translate7, { offset: { z: 0, y: 0, x: 0, ...props.position }, children: /* @__PURE__ */ jsx17(Rotate4, { rotation: ["90deg", 0, rotation ?? 0], children: /* @__PURE__ */ jsx17(Translate7, { offset: { x: 0, y: 0, z: -width10 / 2 }, children: /* @__PURE__ */ jsx17(ExtrudeLinear4, { height: width10, children: /* @__PURE__ */ jsx17(Polygon4, { points: polygon.map((p) => [p.x, p.y]) }) }) }) }) }) });
977
+ return /* @__PURE__ */ jsx17(Colorize6, { color: "#fff", children: /* @__PURE__ */ jsx17(Translate7, { offset: { z: 0, y: 0, x: 0, ...props.position }, children: /* @__PURE__ */ jsx17(Rotate5, { rotation: ["90deg", 0, rotation ?? 0], children: /* @__PURE__ */ jsx17(Translate7, { offset: { x: 0, y: 0, z: -width10 / 2 }, children: /* @__PURE__ */ jsx17(ExtrudeLinear4, { height: width10, children: /* @__PURE__ */ jsx17(Polygon4, { points: polygon.map((p) => [p.x, p.y]) }) }) }) }) }) });
967
978
  };
968
979
 
969
980
  // lib/Tssop.tsx
@@ -1267,7 +1278,7 @@ var getLeadWidth = (pinCount, width10) => {
1267
1278
  };
1268
1279
 
1269
1280
  // lib/PinHeader.tsx
1270
- import { Colorize as Colorize7, Cuboid as Cuboid14, Hull as Hull4, Rotate as Rotate5, Translate as Translate8 } from "jscad-fiber";
1281
+ import { Colorize as Colorize7, Cuboid as Cuboid14, Hull as Hull4, Rotate as Rotate6, Translate as Translate8 } from "jscad-fiber";
1271
1282
  import { Fragment as Fragment17, jsx as jsx21, jsxs as jsxs19 } from "react/jsx-runtime";
1272
1283
  var PIN_METAL_COLOR = "#c0c0c0";
1273
1284
  var PinHeader = ({
@@ -1329,7 +1340,7 @@ var PinHeader = ({
1329
1340
  }
1330
1341
  )
1331
1342
  ] }) }),
1332
- /* @__PURE__ */ jsx21(Colorize7, { color: PIN_METAL_COLOR, children: /* @__PURE__ */ jsx21(Translate8, { y: rightangle ? -3.9 : 0, z: rightangle ? 1 : 0, children: /* @__PURE__ */ jsx21(Rotate5, { rotation: rightangle ? [-Math.PI / 2, 0, 0] : [0, 0, 0], children: /* @__PURE__ */ jsxs19(Hull4, { children: [
1343
+ /* @__PURE__ */ jsx21(Colorize7, { color: PIN_METAL_COLOR, children: /* @__PURE__ */ jsx21(Translate8, { y: rightangle ? -3.9 : 0, z: rightangle ? 1 : 0, children: /* @__PURE__ */ jsx21(Rotate6, { rotation: rightangle ? [-Math.PI / 2, 0, 0] : [0, 0, 0], children: /* @__PURE__ */ jsxs19(Hull4, { children: [
1333
1344
  /* @__PURE__ */ jsx21(
1334
1345
  Cuboid14,
1335
1346
  {
@@ -1955,7 +1966,7 @@ import {
1955
1966
  Cylinder as Cylinder5,
1956
1967
  ExtrudeLinear as ExtrudeLinear5,
1957
1968
  Polygon as Polygon5,
1958
- Rotate as Rotate6,
1969
+ Rotate as Rotate7,
1959
1970
  RoundedCuboid,
1960
1971
  Translate as Translate9
1961
1972
  } from "jscad-fiber";
@@ -2129,7 +2140,7 @@ var PushButtonLeg = (props) => {
2129
2140
  y: position?.y || 0,
2130
2141
  z: position?.z || 0
2131
2142
  },
2132
- children: /* @__PURE__ */ jsx29(Rotate6, { rotation: [0, 55, rotation], children: /* @__PURE__ */ jsx29(ExtrudeLinear5, { height: width10, children: /* @__PURE__ */ jsx29(Polygon5, { points: polygon.map((p) => [p.y, p.x]) }) }) })
2143
+ children: /* @__PURE__ */ jsx29(Rotate7, { rotation: [0, 55, rotation], children: /* @__PURE__ */ jsx29(ExtrudeLinear5, { height: width10, children: /* @__PURE__ */ jsx29(Polygon5, { points: polygon.map((p) => [p.y, p.x]) }) }) })
2133
2144
  }
2134
2145
  ) });
2135
2146
  };
@@ -3640,7 +3651,7 @@ import {
3640
3651
  Colorize as Colorize24,
3641
3652
  Cylinder as Cylinder7,
3642
3653
  RoundedCylinder as RoundedCylinder2,
3643
- Rotate as Rotate7,
3654
+ Rotate as Rotate8,
3644
3655
  RoundedCuboid as RoundedCuboid2
3645
3656
  } from "jscad-fiber";
3646
3657
  import { Fragment as Fragment47, jsx as jsx51, jsxs as jsxs47 } from "react/jsx-runtime";
@@ -3653,7 +3664,7 @@ var MicroMELF = ({
3653
3664
  }) => {
3654
3665
  const padLength = 0.2;
3655
3666
  return /* @__PURE__ */ jsxs47(Fragment47, { children: [
3656
- /* @__PURE__ */ jsx51(Colorize24, { color, children: /* @__PURE__ */ jsxs47(Rotate7, { rotation: [0, "90deg", 0], children: [
3667
+ /* @__PURE__ */ jsx51(Colorize24, { color, children: /* @__PURE__ */ jsxs47(Rotate8, { rotation: [0, "90deg", 0], children: [
3657
3668
  /* @__PURE__ */ jsx51(
3658
3669
  RoundedCuboid2,
3659
3670
  {
@@ -3671,7 +3682,7 @@ var MicroMELF = ({
3671
3682
  }
3672
3683
  )
3673
3684
  ] }) }),
3674
- /* @__PURE__ */ jsx51(Colorize24, { color: cathodeIdentification, children: /* @__PURE__ */ jsx51(Rotate7, { rotation: [0, "90deg", 0], children: /* @__PURE__ */ jsx51(
3685
+ /* @__PURE__ */ jsx51(Colorize24, { color: cathodeIdentification, children: /* @__PURE__ */ jsx51(Rotate8, { rotation: [0, "90deg", 0], children: /* @__PURE__ */ jsx51(
3675
3686
  RoundedCuboid2,
3676
3687
  {
3677
3688
  size: [bodyDiameter * 1.01, bodyDiameter * 1.01, bodyLength10 / 3],
@@ -3679,7 +3690,7 @@ var MicroMELF = ({
3679
3690
  center: [-bodyDiameter / 2, 0, -bodyLength10 / 4 + 0.1]
3680
3691
  }
3681
3692
  ) }) }),
3682
- /* @__PURE__ */ jsx51(Colorize24, { color: contactColor, children: /* @__PURE__ */ jsx51(Rotate7, { rotation: [0, "90deg", 0], children: /* @__PURE__ */ jsx51(
3693
+ /* @__PURE__ */ jsx51(Colorize24, { color: contactColor, children: /* @__PURE__ */ jsx51(Rotate8, { rotation: [0, "90deg", 0], children: /* @__PURE__ */ jsx51(
3683
3694
  RoundedCylinder2,
3684
3695
  {
3685
3696
  height: padLength,
@@ -3688,7 +3699,7 @@ var MicroMELF = ({
3688
3699
  center: [-bodyDiameter / 2, 0, -bodyLength10 / 2]
3689
3700
  }
3690
3701
  ) }) }),
3691
- /* @__PURE__ */ jsx51(Colorize24, { color: contactColor, children: /* @__PURE__ */ jsx51(Rotate7, { rotation: [0, "90deg", 0], children: /* @__PURE__ */ jsx51(
3702
+ /* @__PURE__ */ jsx51(Colorize24, { color: contactColor, children: /* @__PURE__ */ jsx51(Rotate8, { rotation: [0, "90deg", 0], children: /* @__PURE__ */ jsx51(
3692
3703
  RoundedCylinder2,
3693
3704
  {
3694
3705
  height: padLength,
@@ -3701,7 +3712,7 @@ var MicroMELF = ({
3701
3712
  };
3702
3713
 
3703
3714
  // lib/MINIMELF.tsx
3704
- import { Colorize as Colorize25, RoundedCylinder as RoundedCylinder3, Rotate as Rotate8 } from "jscad-fiber";
3715
+ import { Colorize as Colorize25, RoundedCylinder as RoundedCylinder3, Rotate as Rotate9 } from "jscad-fiber";
3705
3716
  import { Fragment as Fragment48, jsx as jsx52, jsxs as jsxs48 } from "react/jsx-runtime";
3706
3717
  var MINIMELF = ({
3707
3718
  bodyLength: bodyLength10 = 3.5,
@@ -3711,7 +3722,7 @@ var MINIMELF = ({
3711
3722
  }) => {
3712
3723
  const padLength = 0.5;
3713
3724
  return /* @__PURE__ */ jsxs48(Fragment48, { children: [
3714
- /* @__PURE__ */ jsx52(Colorize25, { color, children: /* @__PURE__ */ jsx52(Rotate8, { rotation: [0, "90deg", 0], children: /* @__PURE__ */ jsx52(
3725
+ /* @__PURE__ */ jsx52(Colorize25, { color, children: /* @__PURE__ */ jsx52(Rotate9, { rotation: [0, "90deg", 0], children: /* @__PURE__ */ jsx52(
3715
3726
  RoundedCylinder3,
3716
3727
  {
3717
3728
  height: bodyLength10,
@@ -3720,7 +3731,7 @@ var MINIMELF = ({
3720
3731
  center: [-bodyDiameter / 2, 0, 0]
3721
3732
  }
3722
3733
  ) }) }),
3723
- /* @__PURE__ */ jsx52(Colorize25, { color: contactColor, children: /* @__PURE__ */ jsx52(Rotate8, { rotation: [0, "90deg", 0], children: /* @__PURE__ */ jsx52(
3734
+ /* @__PURE__ */ jsx52(Colorize25, { color: contactColor, children: /* @__PURE__ */ jsx52(Rotate9, { rotation: [0, "90deg", 0], children: /* @__PURE__ */ jsx52(
3724
3735
  RoundedCylinder3,
3725
3736
  {
3726
3737
  height: padLength,
@@ -3729,7 +3740,7 @@ var MINIMELF = ({
3729
3740
  center: [-bodyDiameter / 2, 0, -bodyLength10 / 2]
3730
3741
  }
3731
3742
  ) }) }),
3732
- /* @__PURE__ */ jsx52(Colorize25, { color: contactColor, children: /* @__PURE__ */ jsx52(Rotate8, { rotation: [0, "90deg", 0], children: /* @__PURE__ */ jsx52(
3743
+ /* @__PURE__ */ jsx52(Colorize25, { color: contactColor, children: /* @__PURE__ */ jsx52(Rotate9, { rotation: [0, "90deg", 0], children: /* @__PURE__ */ jsx52(
3733
3744
  RoundedCylinder3,
3734
3745
  {
3735
3746
  height: padLength,
@@ -3742,7 +3753,7 @@ var MINIMELF = ({
3742
3753
  };
3743
3754
 
3744
3755
  // lib/MELF.tsx
3745
- import { Colorize as Colorize26, RoundedCylinder as RoundedCylinder4, Rotate as Rotate9 } from "jscad-fiber";
3756
+ import { Colorize as Colorize26, RoundedCylinder as RoundedCylinder4, Rotate as Rotate10 } from "jscad-fiber";
3746
3757
  import { Fragment as Fragment49, jsx as jsx53, jsxs as jsxs49 } from "react/jsx-runtime";
3747
3758
  var MELF = ({
3748
3759
  bodyLength: bodyLength10 = 3.9,
@@ -3752,7 +3763,7 @@ var MELF = ({
3752
3763
  }) => {
3753
3764
  const padLength = 0.55;
3754
3765
  return /* @__PURE__ */ jsxs49(Fragment49, { children: [
3755
- /* @__PURE__ */ jsx53(Colorize26, { color, children: /* @__PURE__ */ jsx53(Rotate9, { rotation: [0, "90deg", 0], children: /* @__PURE__ */ jsx53(
3766
+ /* @__PURE__ */ jsx53(Colorize26, { color, children: /* @__PURE__ */ jsx53(Rotate10, { rotation: [0, "90deg", 0], children: /* @__PURE__ */ jsx53(
3756
3767
  RoundedCylinder4,
3757
3768
  {
3758
3769
  height: bodyLength10,
@@ -3761,7 +3772,7 @@ var MELF = ({
3761
3772
  center: [-bodyDiameter / 2, 0, 0]
3762
3773
  }
3763
3774
  ) }) }),
3764
- /* @__PURE__ */ jsx53(Colorize26, { color: contactColor, children: /* @__PURE__ */ jsx53(Rotate9, { rotation: [0, "90deg", 0], children: /* @__PURE__ */ jsx53(
3775
+ /* @__PURE__ */ jsx53(Colorize26, { color: contactColor, children: /* @__PURE__ */ jsx53(Rotate10, { rotation: [0, "90deg", 0], children: /* @__PURE__ */ jsx53(
3765
3776
  RoundedCylinder4,
3766
3777
  {
3767
3778
  height: padLength,
@@ -3770,7 +3781,7 @@ var MELF = ({
3770
3781
  center: [-bodyDiameter / 2, 0, -bodyLength10 / 2]
3771
3782
  }
3772
3783
  ) }) }),
3773
- /* @__PURE__ */ jsx53(Colorize26, { color: contactColor, children: /* @__PURE__ */ jsx53(Rotate9, { rotation: [0, "90deg", 0], children: /* @__PURE__ */ jsx53(
3784
+ /* @__PURE__ */ jsx53(Colorize26, { color: contactColor, children: /* @__PURE__ */ jsx53(Rotate10, { rotation: [0, "90deg", 0], children: /* @__PURE__ */ jsx53(
3774
3785
  RoundedCylinder4,
3775
3786
  {
3776
3787
  height: padLength,
@@ -3925,7 +3936,7 @@ import {
3925
3936
  Colorize as Colorize27,
3926
3937
  Cuboid as Cuboid34,
3927
3938
  Cylinder as Cylinder8,
3928
- Rotate as Rotate10,
3939
+ Rotate as Rotate11,
3929
3940
  Subtract as Subtract4,
3930
3941
  Translate as Translate22
3931
3942
  } from "jscad-fiber";
@@ -3975,7 +3986,7 @@ var TO220 = ({
3975
3986
  center: [centerX, tabY, bodyTop + tabHeight / 2]
3976
3987
  }
3977
3988
  ),
3978
- /* @__PURE__ */ jsx56(Rotate10, { rotation: ["90deg", 0, 0], children: /* @__PURE__ */ jsx56(Translate22, { center: [centerX, holeZ, -tabY], children: /* @__PURE__ */ jsx56(
3989
+ /* @__PURE__ */ jsx56(Rotate11, { rotation: ["90deg", 0, 0], children: /* @__PURE__ */ jsx56(Translate22, { center: [centerX, holeZ, -tabY], children: /* @__PURE__ */ jsx56(
3979
3990
  Cylinder8,
3980
3991
  {
3981
3992
  radius: mountingHoleDiameter / 2,
@@ -4665,7 +4676,7 @@ var SOD323FL = () => {
4665
4676
  };
4666
4677
 
4667
4678
  // lib/AxialCapacitor.tsx
4668
- import { Colorize as Colorize32, Cylinder as Cylinder10, Rotate as Rotate11, Sphere as Sphere2, Translate as Translate27 } from "jscad-fiber";
4679
+ import { Colorize as Colorize32, Cylinder as Cylinder10, Rotate as Rotate12, Sphere as Sphere2, Translate as Translate27 } from "jscad-fiber";
4669
4680
  import { Fragment as Fragment61, jsx as jsx65, jsxs as jsxs61 } from "react/jsx-runtime";
4670
4681
  var AxialCapacitor = ({ pitch = 10 }) => {
4671
4682
  const heightToCenterOfCapacitor = 0.5 + 4 / 2;
@@ -4678,7 +4689,7 @@ var AxialCapacitor = ({ pitch = 10 }) => {
4678
4689
  center: [-pitch / 2, 0, heightToCenterOfCapacitor]
4679
4690
  }
4680
4691
  ),
4681
- /* @__PURE__ */ jsx65(Translate27, { x: -2.5, y: 0, z: heightToCenterOfCapacitor, children: /* @__PURE__ */ jsxs61(Rotate11, { rotation: [0, Math.PI / 2, 0], children: [
4692
+ /* @__PURE__ */ jsx65(Translate27, { x: -2.5, y: 0, z: heightToCenterOfCapacitor, children: /* @__PURE__ */ jsxs61(Rotate12, { rotation: [0, Math.PI / 2, 0], children: [
4682
4693
  /* @__PURE__ */ jsx65(
4683
4694
  Cylinder10,
4684
4695
  {
@@ -5170,7 +5181,7 @@ import {
5170
5181
  Colorize as Colorize37,
5171
5182
  Cuboid as Cuboid45,
5172
5183
  Cylinder as Cylinder13,
5173
- Rotate as Rotate12,
5184
+ Rotate as Rotate13,
5174
5185
  Subtract as Subtract9,
5175
5186
  Translate as Translate30
5176
5187
  } from "jscad-fiber";
@@ -5191,7 +5202,7 @@ var JSTZH1_5mm = ({
5191
5202
  const bodyWidth = (numPins - 1) * pitch + 4;
5192
5203
  const startX = -((numPins - 1) * pitch) / 2;
5193
5204
  return /* @__PURE__ */ jsxs66(Fragment65, { children: [
5194
- /* @__PURE__ */ jsx70(Translate30, { offset: [0, 0, bodyHeight], children: /* @__PURE__ */ jsx70(Rotate12, { angles: [Math.PI, 0, 0], children: /* @__PURE__ */ jsx70(Colorize37, { color: bodyColor, children: /* @__PURE__ */ jsxs66(Subtract9, { children: [
5205
+ /* @__PURE__ */ jsx70(Translate30, { offset: [0, 0, bodyHeight], children: /* @__PURE__ */ jsx70(Rotate13, { angles: [Math.PI, 0, 0], children: /* @__PURE__ */ jsx70(Colorize37, { color: bodyColor, children: /* @__PURE__ */ jsxs66(Subtract9, { children: [
5195
5206
  /* @__PURE__ */ jsx70(
5196
5207
  Cuboid45,
5197
5208
  {
@@ -5329,7 +5340,7 @@ import {
5329
5340
  Colorize as Colorize38,
5330
5341
  Cuboid as Cuboid46,
5331
5342
  Cylinder as Cylinder14,
5332
- Rotate as Rotate13,
5343
+ Rotate as Rotate14,
5333
5344
  Subtract as Subtract10,
5334
5345
  Translate as Translate31
5335
5346
  } from "jscad-fiber";
@@ -5358,7 +5369,7 @@ var JSTPH2_0mm = ({
5358
5369
  const topReliefWidth = 0.8;
5359
5370
  const topReliefDepth = 0.65;
5360
5371
  return /* @__PURE__ */ jsxs67(Fragment66, { children: [
5361
- /* @__PURE__ */ jsx71(Translate31, { offset: [0, 0, bodyHeight], children: /* @__PURE__ */ jsx71(Rotate13, { angles: [Math.PI, 0, 0], children: /* @__PURE__ */ jsx71(Colorize38, { color: bodyColor, children: /* @__PURE__ */ jsxs67(Subtract10, { children: [
5372
+ /* @__PURE__ */ jsx71(Translate31, { offset: [0, 0, bodyHeight], children: /* @__PURE__ */ jsx71(Rotate14, { angles: [Math.PI, 0, 0], children: /* @__PURE__ */ jsx71(Colorize38, { color: bodyColor, children: /* @__PURE__ */ jsxs67(Subtract10, { children: [
5362
5373
  /* @__PURE__ */ jsx71(
5363
5374
  Cuboid46,
5364
5375
  {
@@ -5443,7 +5454,7 @@ var JSTPH2_0mm = ({
5443
5454
  center: [-bodyWidth / 2, 0, topReliefDepth / 2]
5444
5455
  }
5445
5456
  ),
5446
- /* @__PURE__ */ jsx71(Translate31, { offset: [-bodyWidth / 2, 0, topReliefDepth], children: /* @__PURE__ */ jsx71(Rotate13, { angles: [0, Math.PI / 2, 0], children: /* @__PURE__ */ jsx71(
5457
+ /* @__PURE__ */ jsx71(Translate31, { offset: [-bodyWidth / 2, 0, topReliefDepth], children: /* @__PURE__ */ jsx71(Rotate14, { angles: [0, Math.PI / 2, 0], children: /* @__PURE__ */ jsx71(
5447
5458
  Cylinder14,
5448
5459
  {
5449
5460
  height: wallThickness * 3,
@@ -5457,7 +5468,7 @@ var JSTPH2_0mm = ({
5457
5468
  center: [bodyWidth / 2, 0, topReliefDepth / 2]
5458
5469
  }
5459
5470
  ),
5460
- /* @__PURE__ */ jsx71(Translate31, { offset: [bodyWidth / 2, 0, topReliefDepth], children: /* @__PURE__ */ jsx71(Rotate13, { angles: [0, Math.PI / 2, 0], children: /* @__PURE__ */ jsx71(
5471
+ /* @__PURE__ */ jsx71(Translate31, { offset: [bodyWidth / 2, 0, topReliefDepth], children: /* @__PURE__ */ jsx71(Rotate14, { angles: [0, Math.PI / 2, 0], children: /* @__PURE__ */ jsx71(
5461
5472
  Cylinder14,
5462
5473
  {
5463
5474
  height: wallThickness * 3,
@@ -5512,17 +5523,148 @@ var JSTPH2_0mm = ({
5512
5523
  ] });
5513
5524
  };
5514
5525
 
5526
+ // lib/JSTXH2_5mm.tsx
5527
+ import { Colorize as Colorize39, Cuboid as Cuboid47, Subtract as Subtract11, Translate as Translate32 } from "jscad-fiber";
5528
+ import { fp as fp3 } from "@tscircuit/footprinter";
5529
+ import { Fragment as Fragment67, jsx as jsx72, jsxs as jsxs68 } from "react/jsx-runtime";
5530
+ var JSTXH2_5mm = ({
5531
+ numPins = 4,
5532
+ showPins = true,
5533
+ showFootprint = true,
5534
+ bodyColor = "#f8fafc",
5535
+ // Natural white PA 66 nylon housing per spec
5536
+ pinColor = "#635959"
5537
+ // Tin-plated metallic gray posts
5538
+ }) => {
5539
+ const pitch = 2.5;
5540
+ const bodyHeight = 7;
5541
+ const bodyDepth = 5.75;
5542
+ const wallThickness = 0.85;
5543
+ const floorThickness = 1.65;
5544
+ const hollowHeight = bodyHeight - floorThickness;
5545
+ const pinLength = 8.75;
5546
+ const bodyWidth = (numPins - 1) * pitch + 4.9;
5547
+ const startX = -((numPins - 1) * pitch) / 2;
5548
+ const keySlotWidth = 0.8;
5549
+ const keySlotDepth = wallThickness + 0.2;
5550
+ const keySlotHeight = 3.5;
5551
+ const keySlotX = bodyWidth / 2 - 1.3;
5552
+ const lockNotchWidth = Math.min(
5553
+ bodyWidth - 3.4,
5554
+ Math.max(3, (numPins - 1) * pitch * 0.4 + 2.2)
5555
+ );
5556
+ const lockNotchHeight = 2.4;
5557
+ return /* @__PURE__ */ jsxs68(Fragment67, { children: [
5558
+ /* @__PURE__ */ jsx72(Translate32, { offset: [0, 0, bodyHeight / 2], children: /* @__PURE__ */ jsx72(Colorize39, { color: bodyColor, children: /* @__PURE__ */ jsxs68(Subtract11, { children: [
5559
+ /* @__PURE__ */ jsx72(Cuboid47, { size: [bodyWidth, bodyDepth, bodyHeight] }),
5560
+ /* @__PURE__ */ jsx72(Translate32, { offset: [0, 0, (bodyHeight - hollowHeight) / 2 + 0.1], children: /* @__PURE__ */ jsx72(
5561
+ Cuboid47,
5562
+ {
5563
+ size: [
5564
+ bodyWidth - wallThickness * 2,
5565
+ bodyDepth - wallThickness * 2,
5566
+ hollowHeight + 0.2
5567
+ ]
5568
+ }
5569
+ ) }),
5570
+ /* @__PURE__ */ jsx72(
5571
+ Translate32,
5572
+ {
5573
+ offset: [
5574
+ 0,
5575
+ -bodyDepth / 2 + wallThickness / 2,
5576
+ bodyHeight / 2 - lockNotchHeight / 2 + 0.1
5577
+ ],
5578
+ children: /* @__PURE__ */ jsx72(
5579
+ Cuboid47,
5580
+ {
5581
+ size: [
5582
+ lockNotchWidth,
5583
+ wallThickness + 0.2,
5584
+ lockNotchHeight + 0.2
5585
+ ]
5586
+ }
5587
+ )
5588
+ }
5589
+ ),
5590
+ /* @__PURE__ */ jsx72(
5591
+ Translate32,
5592
+ {
5593
+ offset: [
5594
+ -keySlotX,
5595
+ -bodyDepth / 2 + wallThickness / 2,
5596
+ bodyHeight / 2 - keySlotHeight / 2 + 0.1
5597
+ ],
5598
+ children: /* @__PURE__ */ jsx72(
5599
+ Cuboid47,
5600
+ {
5601
+ size: [keySlotWidth, keySlotDepth, keySlotHeight + 0.2]
5602
+ }
5603
+ )
5604
+ }
5605
+ ),
5606
+ /* @__PURE__ */ jsx72(
5607
+ Translate32,
5608
+ {
5609
+ offset: [
5610
+ keySlotX,
5611
+ -bodyDepth / 2 + wallThickness / 2,
5612
+ bodyHeight / 2 - keySlotHeight / 2 + 0.1
5613
+ ],
5614
+ children: /* @__PURE__ */ jsx72(
5615
+ Cuboid47,
5616
+ {
5617
+ size: [keySlotWidth, keySlotDepth, keySlotHeight + 0.2]
5618
+ }
5619
+ )
5620
+ }
5621
+ ),
5622
+ Array.from({ length: numPins }).map((_, i) => /* @__PURE__ */ jsx72(
5623
+ Translate32,
5624
+ {
5625
+ offset: [
5626
+ startX + i * pitch,
5627
+ -bodyDepth / 2 + 0.3,
5628
+ -bodyHeight / 2 + 0.25
5629
+ ],
5630
+ children: /* @__PURE__ */ jsx72(Cuboid47, { size: [1, 0.8, 0.5] })
5631
+ },
5632
+ `vent_${i}`
5633
+ ))
5634
+ ] }) }) }),
5635
+ showPins && Array.from({ length: numPins }).map((_, i) => /* @__PURE__ */ jsx72(Colorize39, { color: pinColor, children: /* @__PURE__ */ jsx72(Translate32, { offset: [startX + i * pitch, 0, pinLength / 2 - 3.4], children: /* @__PURE__ */ jsx72(Cuboid47, { size: [0.64, 0.64, pinLength] }) }) }, i)),
5636
+ showFootprint && (() => {
5637
+ try {
5638
+ const circuitJson = fp3.string(`jst${numPins}_xh`).circuitJson();
5639
+ const platedHoles = circuitJson.filter(
5640
+ (e) => e.type === "pcb_plated_hole"
5641
+ );
5642
+ return platedHoles.map((hole, i) => /* @__PURE__ */ jsx72(
5643
+ FootprintPlatedHole,
5644
+ {
5645
+ hole,
5646
+ isPin1: i === 0
5647
+ },
5648
+ `footprint_${i}`
5649
+ ));
5650
+ } catch {
5651
+ return null;
5652
+ }
5653
+ })()
5654
+ ] });
5655
+ };
5656
+
5515
5657
  // lib/FPC.tsx
5516
5658
  import {
5517
- Colorize as Colorize39,
5518
- Cuboid as Cuboid47,
5659
+ Colorize as Colorize40,
5660
+ Cuboid as Cuboid48,
5519
5661
  Cylinder as Cylinder15,
5520
- Rotate as Rotate14,
5662
+ Rotate as Rotate15,
5521
5663
  RoundedCuboid as RoundedCuboid3,
5522
- Subtract as Subtract11,
5523
- Translate as Translate32
5664
+ Subtract as Subtract12,
5665
+ Translate as Translate33
5524
5666
  } from "jscad-fiber";
5525
- import { Fragment as Fragment67, jsx as jsx72, jsxs as jsxs68 } from "react/jsx-runtime";
5667
+ import { Fragment as Fragment68, jsx as jsx73, jsxs as jsxs69 } from "react/jsx-runtime";
5526
5668
  var HOUSING_COLOR = "#303339";
5527
5669
  var HOUSING_SHADOW = "#1f2227";
5528
5670
  var ACTUATOR_COLOR = "#eee8d8";
@@ -5609,9 +5751,9 @@ var FPC = ({
5609
5751
  const clipCapX = bodyWidth / 2 - 0.23;
5610
5752
  const sideBossX = bodyWidth / 2 - 0.32;
5611
5753
  const sideBossWidth = 0.68;
5612
- return /* @__PURE__ */ jsxs68(Fragment67, { children: [
5613
- [-1, 1].map((direction) => /* @__PURE__ */ jsx72(
5614
- Cuboid47,
5754
+ return /* @__PURE__ */ jsxs69(Fragment68, { children: [
5755
+ [-1, 1].map((direction) => /* @__PURE__ */ jsx73(
5756
+ Cuboid48,
5615
5757
  {
5616
5758
  color: TIN_COLOR,
5617
5759
  center: [direction * endClipX, mountY, 0.07],
@@ -5619,8 +5761,8 @@ var FPC = ({
5619
5761
  },
5620
5762
  `mount-pad:${direction}`
5621
5763
  )),
5622
- contactRows.map((contact) => /* @__PURE__ */ jsx72(
5623
- Cuboid47,
5764
+ contactRows.map((contact) => /* @__PURE__ */ jsx73(
5765
+ Cuboid48,
5624
5766
  {
5625
5767
  color: TIN_COLOR,
5626
5768
  center: [contact.x, terminalCenterY, 0.065],
@@ -5628,7 +5770,7 @@ var FPC = ({
5628
5770
  },
5629
5771
  `terminal:${contact.index}`
5630
5772
  )),
5631
- /* @__PURE__ */ jsx72(
5773
+ /* @__PURE__ */ jsx73(
5632
5774
  RoundedCuboid3,
5633
5775
  {
5634
5776
  color: HOUSING_SHADOW,
@@ -5637,8 +5779,8 @@ var FPC = ({
5637
5779
  roundRadius: 0.1
5638
5780
  }
5639
5781
  ),
5640
- /* @__PURE__ */ jsx72(Colorize39, { color: HOUSING_COLOR, children: /* @__PURE__ */ jsxs68(Subtract11, { children: [
5641
- /* @__PURE__ */ jsx72(
5782
+ /* @__PURE__ */ jsx73(Colorize40, { color: HOUSING_COLOR, children: /* @__PURE__ */ jsxs69(Subtract12, { children: [
5783
+ /* @__PURE__ */ jsx73(
5642
5784
  RoundedCuboid3,
5643
5785
  {
5644
5786
  center: [0, housingCenterY, housingBaseHeight + housingHeight / 2],
@@ -5646,22 +5788,22 @@ var FPC = ({
5646
5788
  roundRadius: 0.14
5647
5789
  }
5648
5790
  ),
5649
- /* @__PURE__ */ jsx72(
5650
- Cuboid47,
5791
+ /* @__PURE__ */ jsx73(
5792
+ Cuboid48,
5651
5793
  {
5652
5794
  center: [0, throatCenterY, throatCenterZ],
5653
5795
  size: [openingWidth, throatDepth, throatHeight]
5654
5796
  }
5655
5797
  ),
5656
- /* @__PURE__ */ jsx72(
5657
- Cuboid47,
5798
+ /* @__PURE__ */ jsx73(
5799
+ Cuboid48,
5658
5800
  {
5659
5801
  center: [0, actuatorCenterY, overallHeight - actuatorHeight * 0.72],
5660
5802
  size: [actuatorWidth - 0.32, actuatorDepth - 0.16, actuatorHeight]
5661
5803
  }
5662
5804
  )
5663
5805
  ] }) }),
5664
- contactRows.map((contact) => /* @__PURE__ */ jsx72(
5806
+ contactRows.map((contact) => /* @__PURE__ */ jsx73(
5665
5807
  RoundedCuboid3,
5666
5808
  {
5667
5809
  color: TIN_HIGHLIGHT,
@@ -5671,8 +5813,8 @@ var FPC = ({
5671
5813
  },
5672
5814
  `spring:${contact.index}`
5673
5815
  )),
5674
- contactRows.map((contact) => /* @__PURE__ */ jsx72(
5675
- Cuboid47,
5816
+ contactRows.map((contact) => /* @__PURE__ */ jsx73(
5817
+ Cuboid48,
5676
5818
  {
5677
5819
  color: TIN_COLOR,
5678
5820
  center: [
@@ -5684,8 +5826,8 @@ var FPC = ({
5684
5826
  },
5685
5827
  `terminal-rise:${contact.index}`
5686
5828
  )),
5687
- /* @__PURE__ */ jsx72(
5688
- Cuboid47,
5829
+ /* @__PURE__ */ jsx73(
5830
+ Cuboid48,
5689
5831
  {
5690
5832
  color: HOUSING_SHADOW,
5691
5833
  center: [
@@ -5696,7 +5838,7 @@ var FPC = ({
5696
5838
  size: [openingWidth + 0.18, 0.16, 0.8]
5697
5839
  }
5698
5840
  ),
5699
- /* @__PURE__ */ jsx72(
5841
+ /* @__PURE__ */ jsx73(
5700
5842
  RoundedCuboid3,
5701
5843
  {
5702
5844
  color: ACTUATOR_COLOR,
@@ -5705,8 +5847,8 @@ var FPC = ({
5705
5847
  roundRadius: 0.11
5706
5848
  }
5707
5849
  ),
5708
- /* @__PURE__ */ jsx72(
5709
- Cuboid47,
5850
+ /* @__PURE__ */ jsx73(
5851
+ Cuboid48,
5710
5852
  {
5711
5853
  color: ACTUATOR_HIGHLIGHT,
5712
5854
  center: [
@@ -5717,7 +5859,7 @@ var FPC = ({
5717
5859
  size: [actuatorWidth - 0.36, 0.24, 0.07]
5718
5860
  }
5719
5861
  ),
5720
- [-1, 1].map((direction) => /* @__PURE__ */ jsx72(
5862
+ [-1, 1].map((direction) => /* @__PURE__ */ jsx73(
5721
5863
  RoundedCuboid3,
5722
5864
  {
5723
5865
  color: ACTUATOR_COLOR,
@@ -5727,13 +5869,13 @@ var FPC = ({
5727
5869
  },
5728
5870
  `actuator-ear:${direction}`
5729
5871
  )),
5730
- [-1, 1].map((direction) => /* @__PURE__ */ jsx72(
5731
- Translate32,
5872
+ [-1, 1].map((direction) => /* @__PURE__ */ jsx73(
5873
+ Translate33,
5732
5874
  {
5733
5875
  x: direction * sideBossX,
5734
5876
  y: hingeY,
5735
5877
  z: hingeZ,
5736
- children: /* @__PURE__ */ jsx72(Rotate14, { rotation: [0, Math.PI / 2, 0], children: /* @__PURE__ */ jsx72(
5878
+ children: /* @__PURE__ */ jsx73(Rotate15, { rotation: [0, Math.PI / 2, 0], children: /* @__PURE__ */ jsx73(
5737
5879
  Cylinder15,
5738
5880
  {
5739
5881
  color: ACTUATOR_HIGHLIGHT,
@@ -5744,7 +5886,7 @@ var FPC = ({
5744
5886
  },
5745
5887
  `hinge:${direction}`
5746
5888
  )),
5747
- [-1, 1].map((direction) => /* @__PURE__ */ jsx72(
5889
+ [-1, 1].map((direction) => /* @__PURE__ */ jsx73(
5748
5890
  RoundedCuboid3,
5749
5891
  {
5750
5892
  color: HOLD_DOWN_COLOR,
@@ -5754,7 +5896,7 @@ var FPC = ({
5754
5896
  },
5755
5897
  `hold-down-wall:${direction}`
5756
5898
  )),
5757
- [-1, 1].map((direction) => /* @__PURE__ */ jsx72(
5899
+ [-1, 1].map((direction) => /* @__PURE__ */ jsx73(
5758
5900
  RoundedCuboid3,
5759
5901
  {
5760
5902
  color: HOLD_DOWN_HIGHLIGHT,
@@ -5764,16 +5906,16 @@ var FPC = ({
5764
5906
  },
5765
5907
  `hold-down-cap:${direction}`
5766
5908
  )),
5767
- /* @__PURE__ */ jsx72(
5768
- Cuboid47,
5909
+ /* @__PURE__ */ jsx73(
5910
+ Cuboid48,
5769
5911
  {
5770
5912
  color: HOUSING_SHADOW,
5771
5913
  center: [0, housingCenterY, 0.025],
5772
5914
  size: [openingWidth + 0.7, housingDepth * 0.58, 0.05]
5773
5915
  }
5774
5916
  ),
5775
- /* @__PURE__ */ jsx72(
5776
- Cuboid47,
5917
+ /* @__PURE__ */ jsx73(
5918
+ Cuboid48,
5777
5919
  {
5778
5920
  color: HOUSING_SHADOW,
5779
5921
  center: [
@@ -5788,8 +5930,8 @@ var FPC = ({
5788
5930
  };
5789
5931
 
5790
5932
  // lib/SmdPinHeader.tsx
5791
- import { Colorize as Colorize40, Cuboid as Cuboid48, Hull as Hull24, Translate as Translate33 } from "jscad-fiber";
5792
- import { Fragment as Fragment68, jsx as jsx73, jsxs as jsxs69 } from "react/jsx-runtime";
5933
+ import { Colorize as Colorize41, Cuboid as Cuboid49, Hull as Hull24, Translate as Translate34 } from "jscad-fiber";
5934
+ import { Fragment as Fragment69, jsx as jsx74, jsxs as jsxs70 } from "react/jsx-runtime";
5793
5935
  var SmdPinHeader = ({
5794
5936
  numberOfPins,
5795
5937
  pitch = 2.54,
@@ -5804,52 +5946,52 @@ var SmdPinHeader = ({
5804
5946
  const bodyTop = standoffHeight + bodyHeight;
5805
5947
  const tailLength = tailSpan / 2;
5806
5948
  const tipChamferHeight = pinThickness * 0.35;
5807
- return /* @__PURE__ */ jsx73(Fragment68, { children: Array.from({ length: numberOfPins }, (_, index) => {
5949
+ return /* @__PURE__ */ jsx74(Fragment69, { children: Array.from({ length: numberOfPins }, (_, index) => {
5808
5950
  const x = xStart + index * pitch;
5809
5951
  const tailDirection = index % 2 === 0 ? 1 : -1;
5810
5952
  const postBodyLength = matingPinLength - tipChamferHeight;
5811
5953
  const verticalTailLength = standoffHeight - pinThickness / 2;
5812
- return /* @__PURE__ */ jsxs69(Translate33, { x, children: [
5813
- /* @__PURE__ */ jsx73(
5814
- Cuboid48,
5954
+ return /* @__PURE__ */ jsxs70(Translate34, { x, children: [
5955
+ /* @__PURE__ */ jsx74(
5956
+ Cuboid49,
5815
5957
  {
5816
5958
  color: "#222",
5817
5959
  size: [pitch, bodyWidth, bodyHeight],
5818
5960
  center: [0, 0, standoffHeight + bodyHeight / 2]
5819
5961
  }
5820
5962
  ),
5821
- /* @__PURE__ */ jsxs69(Colorize40, { color: "#d4af37", children: [
5822
- /* @__PURE__ */ jsx73(
5823
- Cuboid48,
5963
+ /* @__PURE__ */ jsxs70(Colorize41, { color: "#d4af37", children: [
5964
+ /* @__PURE__ */ jsx74(
5965
+ Cuboid49,
5824
5966
  {
5825
5967
  size: [pinThickness, tailLength, pinThickness],
5826
5968
  center: [0, tailDirection * (tailLength / 2), pinThickness / 2]
5827
5969
  }
5828
5970
  ),
5829
- /* @__PURE__ */ jsx73(
5830
- Cuboid48,
5971
+ /* @__PURE__ */ jsx74(
5972
+ Cuboid49,
5831
5973
  {
5832
5974
  size: [pinThickness, pinThickness, verticalTailLength],
5833
5975
  center: [0, 0, pinThickness / 2 + verticalTailLength / 2]
5834
5976
  }
5835
5977
  ),
5836
- /* @__PURE__ */ jsx73(
5837
- Cuboid48,
5978
+ /* @__PURE__ */ jsx74(
5979
+ Cuboid49,
5838
5980
  {
5839
5981
  size: [pinThickness, pinThickness, postBodyLength],
5840
5982
  center: [0, 0, bodyTop + postBodyLength / 2]
5841
5983
  }
5842
5984
  ),
5843
- /* @__PURE__ */ jsxs69(Hull24, { children: [
5844
- /* @__PURE__ */ jsx73(
5845
- Cuboid48,
5985
+ /* @__PURE__ */ jsxs70(Hull24, { children: [
5986
+ /* @__PURE__ */ jsx74(
5987
+ Cuboid49,
5846
5988
  {
5847
5989
  size: [pinThickness, pinThickness, 0.01],
5848
5990
  center: [0, 0, bodyTop + postBodyLength]
5849
5991
  }
5850
5992
  ),
5851
- /* @__PURE__ */ jsx73(
5852
- Cuboid48,
5993
+ /* @__PURE__ */ jsx74(
5994
+ Cuboid49,
5853
5995
  {
5854
5996
  size: [pinThickness * 0.65, pinThickness * 0.65, 0.01],
5855
5997
  center: [0, 0, bodyTop + matingPinLength]
@@ -5865,9 +6007,9 @@ var SmdPinHeader = ({
5865
6007
  import { mm } from "@tscircuit/mm";
5866
6008
 
5867
6009
  // lib/utils/getPlatedHoleCenters.ts
5868
- import { fp as fp3 } from "@tscircuit/footprinter";
6010
+ import { fp as fp4 } from "@tscircuit/footprinter";
5869
6011
  var getPlatedHoleCenters = (footprint) => {
5870
- const elements = fp3.string(footprint).circuitJson();
6012
+ const elements = fp4.string(footprint).circuitJson();
5871
6013
  return elements.filter(
5872
6014
  (element) => element.type === "pcb_plated_hole" && Number.isFinite(element.x) && Number.isFinite(element.y)
5873
6015
  ).map((element) => ({
@@ -5878,9 +6020,9 @@ var getPlatedHoleCenters = (footprint) => {
5878
6020
  };
5879
6021
 
5880
6022
  // lib/utils/getSmtPadRects.ts
5881
- import { fp as fp4 } from "@tscircuit/footprinter";
6023
+ import { fp as fp5 } from "@tscircuit/footprinter";
5882
6024
  var getSmtPadRects = (footprint) => {
5883
- const elements = fp4.string(footprint).circuitJson();
6025
+ const elements = fp5.string(footprint).circuitJson();
5884
6026
  return elements.filter(
5885
6027
  (element) => element.type === "pcb_smtpad" && element.shape === "rect" && Number.isFinite(element.x) && Number.isFinite(element.y)
5886
6028
  ).map((element) => ({
@@ -5893,7 +6035,7 @@ var getSmtPadRects = (footprint) => {
5893
6035
  };
5894
6036
 
5895
6037
  // lib/GullWingBody.tsx
5896
- import { Fragment as Fragment69, jsx as jsx74, jsxs as jsxs70 } from "react/jsx-runtime";
6038
+ import { Fragment as Fragment70, jsx as jsx75, jsxs as jsxs71 } from "react/jsx-runtime";
5897
6039
  var GullWingBody = ({
5898
6040
  bodyWidth,
5899
6041
  bodyLength: bodyLength10,
@@ -5905,8 +6047,8 @@ var GullWingBody = ({
5905
6047
  const centerX = pads.reduce((sum, pad) => sum + pad.x, 0) / (pads.length || 1);
5906
6048
  const centerY = pads.reduce((sum, pad) => sum + pad.y, 0) / (pads.length || 1);
5907
6049
  const leadHeight = bodyHeight * leadHeightRatio;
5908
- return /* @__PURE__ */ jsxs70(Fragment69, { children: [
5909
- /* @__PURE__ */ jsx74(
6050
+ return /* @__PURE__ */ jsxs71(Fragment70, { children: [
6051
+ /* @__PURE__ */ jsx75(
5910
6052
  ChipBody,
5911
6053
  {
5912
6054
  center: { x: centerX, y: centerY, z: 0 },
@@ -5922,7 +6064,7 @@ var GullWingBody = ({
5922
6064
  const outerX = pad.x + side * padWidth / 2;
5923
6065
  const run = Math.max(Math.abs(outerX - centerX) - bodyWidth / 2, 0.1);
5924
6066
  const overlap = Math.min(0.15, bodyWidth * 0.15);
5925
- return /* @__PURE__ */ jsx74(
6067
+ return /* @__PURE__ */ jsx75(
5926
6068
  SmdChipLead,
5927
6069
  {
5928
6070
  rotation: side > 0 ? Math.PI : 0,
@@ -5944,8 +6086,8 @@ var GullWingBody = ({
5944
6086
  };
5945
6087
 
5946
6088
  // lib/ParametricChip.tsx
5947
- import { Cuboid as Cuboid49 } from "jscad-fiber";
5948
- import { Fragment as Fragment70, jsx as jsx75, jsxs as jsxs71 } from "react/jsx-runtime";
6089
+ import { Cuboid as Cuboid50 } from "jscad-fiber";
6090
+ import { Fragment as Fragment71, jsx as jsx76, jsxs as jsxs72 } from "react/jsx-runtime";
5949
6091
  var ParametricChip = ({
5950
6092
  padPitch,
5951
6093
  padHeight,
@@ -5956,25 +6098,25 @@ var ParametricChip = ({
5956
6098
  const height10 = width10;
5957
6099
  const terminatorWidth9 = fullLength10 * 0.2;
5958
6100
  const bodyLength10 = fullLength10 - terminatorWidth9 * 2;
5959
- return /* @__PURE__ */ jsxs71(Fragment70, { children: [
5960
- /* @__PURE__ */ jsx75(
5961
- Cuboid49,
6101
+ return /* @__PURE__ */ jsxs72(Fragment71, { children: [
6102
+ /* @__PURE__ */ jsx76(
6103
+ Cuboid50,
5962
6104
  {
5963
6105
  size: [bodyLength10, width10, height10],
5964
6106
  offset: [0, 0, height10 / 2],
5965
6107
  color
5966
6108
  }
5967
6109
  ),
5968
- /* @__PURE__ */ jsx75(
5969
- Cuboid49,
6110
+ /* @__PURE__ */ jsx76(
6111
+ Cuboid50,
5970
6112
  {
5971
6113
  size: [terminatorWidth9, height10, width10],
5972
6114
  offset: [fullLength10 / 2 - terminatorWidth9 / 2, 0, height10 / 2],
5973
6115
  color: "#ccc"
5974
6116
  }
5975
6117
  ),
5976
- /* @__PURE__ */ jsx75(
5977
- Cuboid49,
6118
+ /* @__PURE__ */ jsx76(
6119
+ Cuboid50,
5978
6120
  {
5979
6121
  size: [terminatorWidth9, height10, width10],
5980
6122
  offset: [-fullLength10 / 2 + terminatorWidth9 / 2, 0, height10 / 2],
@@ -5986,14 +6128,14 @@ var ParametricChip = ({
5986
6128
 
5987
6129
  // lib/Led5050.tsx
5988
6130
  import {
5989
- Colorize as Colorize41,
5990
- Cuboid as Cuboid50,
6131
+ Colorize as Colorize42,
6132
+ Cuboid as Cuboid51,
5991
6133
  Cylinder as Cylinder16,
5992
- Rotate as Rotate15,
5993
- Subtract as Subtract12,
5994
- Translate as Translate34
6134
+ Rotate as Rotate16,
6135
+ Subtract as Subtract13,
6136
+ Translate as Translate35
5995
6137
  } from "jscad-fiber";
5996
- import { Fragment as Fragment71, jsx as jsx76, jsxs as jsxs72 } from "react/jsx-runtime";
6138
+ import { Fragment as Fragment72, jsx as jsx77, jsxs as jsxs73 } from "react/jsx-runtime";
5997
6139
  var Led5050 = ({
5998
6140
  color = "#ffff00",
5999
6141
  bodyColor = "#ffffff",
@@ -6014,10 +6156,10 @@ var Led5050 = ({
6014
6156
  const cornerCutDepth = 0.3;
6015
6157
  const leadYPositions = [-1.7, 0, 1.7];
6016
6158
  const leadSides = [-1, 1];
6017
- return /* @__PURE__ */ jsxs72(Fragment71, { children: [
6159
+ return /* @__PURE__ */ jsxs73(Fragment72, { children: [
6018
6160
  leadYPositions.flatMap(
6019
- (y) => leadSides.map((side) => /* @__PURE__ */ jsx76(
6020
- Cuboid50,
6161
+ (y) => leadSides.map((side) => /* @__PURE__ */ jsx77(
6162
+ Cuboid51,
6021
6163
  {
6022
6164
  color: leadColor,
6023
6165
  size: [leadLength, leadWidth, leadThickness],
@@ -6026,8 +6168,8 @@ var Led5050 = ({
6026
6168
  `${side}-${y}`
6027
6169
  ))
6028
6170
  ),
6029
- /* @__PURE__ */ jsx76(Colorize41, { color: bodyColor, children: /* @__PURE__ */ jsxs72(Subtract12, { children: [
6030
- /* @__PURE__ */ jsx76(
6171
+ /* @__PURE__ */ jsx77(Colorize42, { color: bodyColor, children: /* @__PURE__ */ jsxs73(Subtract13, { children: [
6172
+ /* @__PURE__ */ jsx77(
6031
6173
  ChipBody,
6032
6174
  {
6033
6175
  width: bodySize,
@@ -6041,7 +6183,7 @@ var Led5050 = ({
6041
6183
  includeNotch: false
6042
6184
  }
6043
6185
  ),
6044
- /* @__PURE__ */ jsx76(
6186
+ /* @__PURE__ */ jsx77(
6045
6187
  Cylinder16,
6046
6188
  {
6047
6189
  radius: lensRadius,
@@ -6049,19 +6191,19 @@ var Led5050 = ({
6049
6191
  center: [0, 0, bodyTop - lensHeight / 2]
6050
6192
  }
6051
6193
  ),
6052
- /* @__PURE__ */ jsx76(
6053
- Translate34,
6194
+ /* @__PURE__ */ jsx77(
6195
+ Translate35,
6054
6196
  {
6055
6197
  offset: [
6056
6198
  -bodySize / 2,
6057
6199
  bodySize / 2,
6058
6200
  bodyTop - cornerCutDepth / 2 + 5e-3
6059
6201
  ],
6060
- children: /* @__PURE__ */ jsx76(Rotate15, { rotation: [0, 0, Math.PI / 4], children: /* @__PURE__ */ jsx76(Cuboid50, { size: [0.9, 0.9, cornerCutDepth + 0.01] }) })
6202
+ children: /* @__PURE__ */ jsx77(Rotate16, { rotation: [0, 0, Math.PI / 4], children: /* @__PURE__ */ jsx77(Cuboid51, { size: [0.9, 0.9, cornerCutDepth + 0.01] }) })
6061
6203
  }
6062
6204
  )
6063
6205
  ] }) }),
6064
- /* @__PURE__ */ jsx76(
6206
+ /* @__PURE__ */ jsx77(
6065
6207
  Cylinder16,
6066
6208
  {
6067
6209
  color,
@@ -6074,8 +6216,8 @@ var Led5050 = ({
6074
6216
  };
6075
6217
 
6076
6218
  // lib/Led2835.tsx
6077
- import { Colorize as Colorize42, Cuboid as Cuboid51 } from "jscad-fiber";
6078
- import { Fragment as Fragment72, jsx as jsx77, jsxs as jsxs73 } from "react/jsx-runtime";
6219
+ import { Colorize as Colorize43, Cuboid as Cuboid52 } from "jscad-fiber";
6220
+ import { Fragment as Fragment73, jsx as jsx78, jsxs as jsxs74 } from "react/jsx-runtime";
6079
6221
  var Led2835 = ({
6080
6222
  bodyWidth = 3.5,
6081
6223
  bodyLength: bodyLength10 = 2.8,
@@ -6094,26 +6236,26 @@ var Led2835 = ({
6094
6236
  const bodyCenterX = (pad1X + pad2X) / 2;
6095
6237
  const lensWidth = bodyWidth * 0.55;
6096
6238
  const lensLength = bodyLength10 * 0.55;
6097
- return /* @__PURE__ */ jsxs73(Fragment72, { children: [
6239
+ return /* @__PURE__ */ jsxs74(Fragment73, { children: [
6098
6240
  [
6099
6241
  { x: pad1X, w: pad1Width, key: "pad-1" },
6100
6242
  { x: pad2X, w: pad2Width, key: "pad-2" }
6101
- ].map(({ x, w, key }) => /* @__PURE__ */ jsx77(Colorize42, { color: padColor, children: /* @__PURE__ */ jsx77(
6102
- Cuboid51,
6243
+ ].map(({ x, w, key }) => /* @__PURE__ */ jsx78(Colorize43, { color: padColor, children: /* @__PURE__ */ jsx78(
6244
+ Cuboid52,
6103
6245
  {
6104
6246
  size: [w, padLength, padThickness],
6105
6247
  center: [x, 0, padThickness / 2]
6106
6248
  }
6107
6249
  ) }, key)),
6108
- /* @__PURE__ */ jsx77(Colorize42, { color: bodyColor, children: /* @__PURE__ */ jsx77(
6109
- Cuboid51,
6250
+ /* @__PURE__ */ jsx78(Colorize43, { color: bodyColor, children: /* @__PURE__ */ jsx78(
6251
+ Cuboid52,
6110
6252
  {
6111
6253
  size: [bodyWidth, bodyLength10, bodyHeight],
6112
6254
  center: [bodyCenterX, 0, padThickness + bodyHeight / 2]
6113
6255
  }
6114
6256
  ) }),
6115
- /* @__PURE__ */ jsx77(Colorize42, { color, children: /* @__PURE__ */ jsx77(
6116
- Cuboid51,
6257
+ /* @__PURE__ */ jsx78(Colorize43, { color, children: /* @__PURE__ */ jsx78(
6258
+ Cuboid52,
6117
6259
  {
6118
6260
  size: [lensWidth, lensLength, lensHeight],
6119
6261
  center: [
@@ -6128,15 +6270,15 @@ var Led2835 = ({
6128
6270
 
6129
6271
  // lib/RJ45.tsx
6130
6272
  import {
6131
- Colorize as Colorize43,
6132
- Cuboid as Cuboid52,
6273
+ Colorize as Colorize44,
6274
+ Cuboid as Cuboid53,
6133
6275
  Cylinder as Cylinder17,
6134
- Rotate as Rotate16,
6276
+ Rotate as Rotate17,
6135
6277
  RoundedCuboid as RoundedCuboid4,
6136
- Subtract as Subtract13,
6137
- Translate as Translate35
6278
+ Subtract as Subtract14,
6279
+ Translate as Translate36
6138
6280
  } from "jscad-fiber";
6139
- import { Fragment as Fragment73, jsx as jsx78, jsxs as jsxs74 } from "react/jsx-runtime";
6281
+ import { Fragment as Fragment74, jsx as jsx79, jsxs as jsxs75 } from "react/jsx-runtime";
6140
6282
  var range2 = (length) => Array.from({ length }, (_, index) => index);
6141
6283
  var RJ45 = ({
6142
6284
  bodyWidth = 16.26,
@@ -6194,18 +6336,18 @@ var RJ45 = ({
6194
6336
  const contactY = frontY - frontDirection * Math.max(cavityDepth * 0.48, 1.2);
6195
6337
  const contactZ = openingCenterZ + openingHeight * 0.18;
6196
6338
  const frontLipY = frontY + frontDirection * shellThickness * 0.2;
6197
- return /* @__PURE__ */ jsxs74(Fragment73, { children: [
6198
- /* @__PURE__ */ jsxs74(Colorize43, { color: shellColor, children: [
6199
- /* @__PURE__ */ jsxs74(Subtract13, { children: [
6200
- /* @__PURE__ */ jsx78(
6201
- Cuboid52,
6339
+ return /* @__PURE__ */ jsxs75(Fragment74, { children: [
6340
+ /* @__PURE__ */ jsxs75(Colorize44, { color: shellColor, children: [
6341
+ /* @__PURE__ */ jsxs75(Subtract14, { children: [
6342
+ /* @__PURE__ */ jsx79(
6343
+ Cuboid53,
6202
6344
  {
6203
6345
  center: [0, bodyCenterY, bodyHeight / 2],
6204
6346
  size: [bodyWidth, bodyDepth, bodyHeight]
6205
6347
  }
6206
6348
  ),
6207
- /* @__PURE__ */ jsx78(
6208
- Cuboid52,
6349
+ /* @__PURE__ */ jsx79(
6350
+ Cuboid53,
6209
6351
  {
6210
6352
  center: [0, cavityCenterY, openingCenterZ],
6211
6353
  size: [
@@ -6216,15 +6358,15 @@ var RJ45 = ({
6216
6358
  }
6217
6359
  )
6218
6360
  ] }),
6219
- /* @__PURE__ */ jsx78(
6220
- Cuboid52,
6361
+ /* @__PURE__ */ jsx79(
6362
+ Cuboid53,
6221
6363
  {
6222
6364
  center: [0, frontLipY, 0.72],
6223
6365
  size: [openingWidth + 0.5, shellThickness * 1.25, 1.05]
6224
6366
  }
6225
6367
  ),
6226
- [-1, 1].map((direction) => /* @__PURE__ */ jsx78(
6227
- Cuboid52,
6368
+ [-1, 1].map((direction) => /* @__PURE__ */ jsx79(
6369
+ Cuboid53,
6228
6370
  {
6229
6371
  center: [direction * shieldPinX, shieldPinY, 0.25],
6230
6372
  size: [
@@ -6235,8 +6377,8 @@ var RJ45 = ({
6235
6377
  },
6236
6378
  `shield-tab:${direction}`
6237
6379
  )),
6238
- [-1, 1].map((direction) => /* @__PURE__ */ jsx78(
6239
- Cuboid52,
6380
+ [-1, 1].map((direction) => /* @__PURE__ */ jsx79(
6381
+ Cuboid53,
6240
6382
  {
6241
6383
  center: [
6242
6384
  direction * bodyWidth * 0.24,
@@ -6248,9 +6390,9 @@ var RJ45 = ({
6248
6390
  `top-seam:${direction}`
6249
6391
  ))
6250
6392
  ] }),
6251
- /* @__PURE__ */ jsxs74(Colorize43, { color: housingColor, children: [
6252
- /* @__PURE__ */ jsxs74(Subtract13, { children: [
6253
- /* @__PURE__ */ jsx78(
6393
+ /* @__PURE__ */ jsxs75(Colorize44, { color: housingColor, children: [
6394
+ /* @__PURE__ */ jsxs75(Subtract14, { children: [
6395
+ /* @__PURE__ */ jsx79(
6254
6396
  RoundedCuboid4,
6255
6397
  {
6256
6398
  center: [0, cavityCenterY, openingCenterZ],
@@ -6262,8 +6404,8 @@ var RJ45 = ({
6262
6404
  roundRadius: 0.22
6263
6405
  }
6264
6406
  ),
6265
- /* @__PURE__ */ jsx78(
6266
- Cuboid52,
6407
+ /* @__PURE__ */ jsx79(
6408
+ Cuboid53,
6267
6409
  {
6268
6410
  center: [
6269
6411
  0,
@@ -6278,14 +6420,14 @@ var RJ45 = ({
6278
6420
  }
6279
6421
  )
6280
6422
  ] }),
6281
- /* @__PURE__ */ jsx78(
6282
- Cuboid52,
6423
+ /* @__PURE__ */ jsx79(
6424
+ Cuboid53,
6283
6425
  {
6284
6426
  center: [0, backWallY, openingCenterZ],
6285
6427
  size: [openingWidth - 1.15, shellThickness, openingHeight - 1.25]
6286
6428
  }
6287
6429
  ),
6288
- /* @__PURE__ */ jsx78(
6430
+ /* @__PURE__ */ jsx79(
6289
6431
  RoundedCuboid4,
6290
6432
  {
6291
6433
  center: [0, frontY - frontDirection * cavityDepth * 0.28, 1.55],
@@ -6293,7 +6435,7 @@ var RJ45 = ({
6293
6435
  roundRadius: 0.16
6294
6436
  }
6295
6437
  ),
6296
- [-1, 1].map((direction) => /* @__PURE__ */ jsx78(
6438
+ [-1, 1].map((direction) => /* @__PURE__ */ jsx79(
6297
6439
  Cylinder17,
6298
6440
  {
6299
6441
  center: [direction * locatorHoleX, locatorHoleY, -0.25],
@@ -6303,8 +6445,8 @@ var RJ45 = ({
6303
6445
  `locator:${direction}`
6304
6446
  ))
6305
6447
  ] }),
6306
- /* @__PURE__ */ jsxs74(Colorize43, { color: contactColor, children: [
6307
- signalPinPositions.map(({ x, y }, index) => /* @__PURE__ */ jsx78(
6448
+ /* @__PURE__ */ jsxs75(Colorize44, { color: contactColor, children: [
6449
+ signalPinPositions.map(({ x, y }, index) => /* @__PURE__ */ jsx79(
6308
6450
  Cylinder17,
6309
6451
  {
6310
6452
  center: [x, y, 0.15],
@@ -6313,15 +6455,15 @@ var RJ45 = ({
6313
6455
  },
6314
6456
  `signal-lead:${index}`
6315
6457
  )),
6316
- range2(8).map((index) => /* @__PURE__ */ jsx78(
6317
- Translate35,
6458
+ range2(8).map((index) => /* @__PURE__ */ jsx79(
6459
+ Translate36,
6318
6460
  {
6319
6461
  offset: [
6320
6462
  (index - 3.5) * contactPitch,
6321
6463
  contactY,
6322
6464
  contactZ + (index % 2 === 0 ? 0.03 : -0.03)
6323
6465
  ],
6324
- children: /* @__PURE__ */ jsx78(Rotate16, { rotation: [frontDirection * 0.2, 0, 0], children: /* @__PURE__ */ jsx78(
6466
+ children: /* @__PURE__ */ jsx79(Rotate17, { rotation: [frontDirection * 0.2, 0, 0], children: /* @__PURE__ */ jsx79(
6325
6467
  RoundedCuboid4,
6326
6468
  {
6327
6469
  size: [Math.max(contactPitch * 0.28, 0.28), 3.25, 0.16],
@@ -6331,7 +6473,7 @@ var RJ45 = ({
6331
6473
  },
6332
6474
  `socket-contact:${index}`
6333
6475
  )),
6334
- ledPins && ledPinPositions.map((x, index) => /* @__PURE__ */ jsx78(
6476
+ ledPins && ledPinPositions.map((x, index) => /* @__PURE__ */ jsx79(
6335
6477
  Cylinder17,
6336
6478
  {
6337
6479
  center: [x, ledPinY, 0.15],
@@ -6341,8 +6483,8 @@ var RJ45 = ({
6341
6483
  `led-lead:${index}`
6342
6484
  ))
6343
6485
  ] }),
6344
- ledPins && /* @__PURE__ */ jsxs74(Fragment73, { children: [
6345
- /* @__PURE__ */ jsx78(
6486
+ ledPins && /* @__PURE__ */ jsxs75(Fragment74, { children: [
6487
+ /* @__PURE__ */ jsx79(
6346
6488
  RoundedCuboid4,
6347
6489
  {
6348
6490
  color: "#73b744",
@@ -6355,7 +6497,7 @@ var RJ45 = ({
6355
6497
  roundRadius: 0.18
6356
6498
  }
6357
6499
  ),
6358
- /* @__PURE__ */ jsx78(
6500
+ /* @__PURE__ */ jsx79(
6359
6501
  RoundedCuboid4,
6360
6502
  {
6361
6503
  color: "#e0aa35",
@@ -6373,8 +6515,8 @@ var RJ45 = ({
6373
6515
  };
6374
6516
 
6375
6517
  // lib/DPAK.tsx
6376
- import { Colorize as Colorize44, Cuboid as Cuboid53, Hull as Hull25 } from "jscad-fiber";
6377
- import { Fragment as Fragment74, jsx as jsx79, jsxs as jsxs75 } from "react/jsx-runtime";
6518
+ import { Colorize as Colorize45, Cuboid as Cuboid54, Hull as Hull25 } from "jscad-fiber";
6519
+ import { Fragment as Fragment75, jsx as jsx80, jsxs as jsxs76 } from "react/jsx-runtime";
6378
6520
  var DPAK = ({
6379
6521
  bodyWidth = 6.1,
6380
6522
  bodyLength: bodyLength10 = 6.5,
@@ -6396,25 +6538,25 @@ var DPAK = ({
6396
6538
  const bodyFrontX = bodyCenterX - bodyWidth / 2;
6397
6539
  const leadZ = tabThickness / 2;
6398
6540
  const leadThickness = 0.4;
6399
- return /* @__PURE__ */ jsxs75(Fragment74, { children: [
6400
- /* @__PURE__ */ jsx79(Colorize44, { color: tabColor, children: /* @__PURE__ */ jsx79(
6401
- Cuboid53,
6541
+ return /* @__PURE__ */ jsxs76(Fragment75, { children: [
6542
+ /* @__PURE__ */ jsx80(Colorize45, { color: tabColor, children: /* @__PURE__ */ jsx80(
6543
+ Cuboid54,
6402
6544
  {
6403
6545
  size: [tabWidth, tabLength, tabThickness],
6404
6546
  center: [tabCenterX, 0, tabThickness / 2]
6405
6547
  }
6406
6548
  ) }),
6407
- /* @__PURE__ */ jsx79(Colorize44, { color, children: /* @__PURE__ */ jsx79(
6408
- Cuboid53,
6549
+ /* @__PURE__ */ jsx80(Colorize45, { color, children: /* @__PURE__ */ jsx80(
6550
+ Cuboid54,
6409
6551
  {
6410
6552
  size: [bodyWidth, bodyLength10, bodyHeight],
6411
6553
  center: [bodyCenterX, 0, tabThickness + bodyHeight / 2]
6412
6554
  }
6413
6555
  ) }),
6414
6556
  [-1, 1].map((side) => {
6415
- return /* @__PURE__ */ jsxs75(Colorize44, { color: leadColor, children: [
6416
- /* @__PURE__ */ jsx79(
6417
- Cuboid53,
6557
+ return /* @__PURE__ */ jsxs76(Colorize45, { color: leadColor, children: [
6558
+ /* @__PURE__ */ jsx80(
6559
+ Cuboid54,
6418
6560
  {
6419
6561
  size: [leadContactLength, leadWidth, leadThickness],
6420
6562
  center: [
@@ -6424,9 +6566,9 @@ var DPAK = ({
6424
6566
  ]
6425
6567
  }
6426
6568
  ),
6427
- /* @__PURE__ */ jsxs75(Hull25, { children: [
6428
- /* @__PURE__ */ jsx79(
6429
- Cuboid53,
6569
+ /* @__PURE__ */ jsxs76(Hull25, { children: [
6570
+ /* @__PURE__ */ jsx80(
6571
+ Cuboid54,
6430
6572
  {
6431
6573
  size: [0.1, leadWidth, leadThickness],
6432
6574
  center: [
@@ -6436,8 +6578,8 @@ var DPAK = ({
6436
6578
  ]
6437
6579
  }
6438
6580
  ),
6439
- /* @__PURE__ */ jsx79(
6440
- Cuboid53,
6581
+ /* @__PURE__ */ jsx80(
6582
+ Cuboid54,
6441
6583
  {
6442
6584
  size: [0.1, leadWidth, leadThickness],
6443
6585
  center: [bodyFrontX, side * pitch, leadZ + tabThickness / 2]
@@ -6451,13 +6593,13 @@ var DPAK = ({
6451
6593
 
6452
6594
  // lib/ElectrolyticCapacitor.tsx
6453
6595
  import {
6454
- Colorize as Colorize45,
6455
- Cuboid as Cuboid54,
6596
+ Colorize as Colorize46,
6597
+ Cuboid as Cuboid55,
6456
6598
  Cylinder as Cylinder18,
6457
6599
  RoundedCylinder as RoundedCylinder5,
6458
- Subtract as Subtract14
6600
+ Subtract as Subtract15
6459
6601
  } from "jscad-fiber";
6460
- import { Fragment as Fragment75, jsx as jsx80, jsxs as jsxs76 } from "react/jsx-runtime";
6602
+ import { Fragment as Fragment76, jsx as jsx81, jsxs as jsxs77 } from "react/jsx-runtime";
6461
6603
  var ElectrolyticCapacitor = ({
6462
6604
  diameter = 6.3,
6463
6605
  heightToDiameterRatio = 1.4,
@@ -6475,8 +6617,8 @@ var ElectrolyticCapacitor = ({
6475
6617
  const canTop = canBottom + canHeight;
6476
6618
  const grooveWidth = Math.max(diameter * 0.06, 0.2);
6477
6619
  const grooveDepth = 0.3;
6478
- return /* @__PURE__ */ jsxs76(Fragment75, { children: [
6479
- /* @__PURE__ */ jsx80(Colorize45, { color: baseColor, children: /* @__PURE__ */ jsx80(
6620
+ return /* @__PURE__ */ jsxs77(Fragment76, { children: [
6621
+ /* @__PURE__ */ jsx81(Colorize46, { color: baseColor, children: /* @__PURE__ */ jsx81(
6480
6622
  Cylinder18,
6481
6623
  {
6482
6624
  radius: radius - 0.05,
@@ -6484,8 +6626,8 @@ var ElectrolyticCapacitor = ({
6484
6626
  center: [0, 0, baseHeight / 2]
6485
6627
  }
6486
6628
  ) }),
6487
- /* @__PURE__ */ jsx80(Colorize45, { color: sleeveColor, children: /* @__PURE__ */ jsxs76(Subtract14, { children: [
6488
- /* @__PURE__ */ jsx80(
6629
+ /* @__PURE__ */ jsx81(Colorize46, { color: sleeveColor, children: /* @__PURE__ */ jsxs77(Subtract15, { children: [
6630
+ /* @__PURE__ */ jsx81(
6489
6631
  RoundedCylinder5,
6490
6632
  {
6491
6633
  radius,
@@ -6494,22 +6636,22 @@ var ElectrolyticCapacitor = ({
6494
6636
  center: [0, 0, canBottom + canHeight / 2]
6495
6637
  }
6496
6638
  ),
6497
- /* @__PURE__ */ jsx80(
6498
- Cuboid54,
6639
+ /* @__PURE__ */ jsx81(
6640
+ Cuboid55,
6499
6641
  {
6500
6642
  size: [diameter, grooveWidth, grooveDepth * 2],
6501
6643
  center: [0, 0, canTop]
6502
6644
  }
6503
6645
  ),
6504
- /* @__PURE__ */ jsx80(
6505
- Cuboid54,
6646
+ /* @__PURE__ */ jsx81(
6647
+ Cuboid55,
6506
6648
  {
6507
6649
  size: [grooveWidth, diameter, grooveDepth * 2],
6508
6650
  center: [0, 0, canTop]
6509
6651
  }
6510
6652
  )
6511
6653
  ] }) }),
6512
- [-1, 1].map((side) => /* @__PURE__ */ jsx80(Colorize45, { color: "#c0c0c0", children: /* @__PURE__ */ jsx80(
6654
+ [-1, 1].map((side) => /* @__PURE__ */ jsx81(Colorize46, { color: "#c0c0c0", children: /* @__PURE__ */ jsx81(
6513
6655
  Cylinder18,
6514
6656
  {
6515
6657
  radius: leadDiameter / 2,
@@ -6521,8 +6663,8 @@ var ElectrolyticCapacitor = ({
6521
6663
  };
6522
6664
 
6523
6665
  // lib/Potentiometer.tsx
6524
- import { Colorize as Colorize46, Cuboid as Cuboid55, Cylinder as Cylinder19, Subtract as Subtract15 } from "jscad-fiber";
6525
- import { Fragment as Fragment76, jsx as jsx81, jsxs as jsxs77 } from "react/jsx-runtime";
6666
+ import { Colorize as Colorize47, Cuboid as Cuboid56, Cylinder as Cylinder19, Subtract as Subtract16 } from "jscad-fiber";
6667
+ import { Fragment as Fragment77, jsx as jsx82, jsxs as jsxs78 } from "react/jsx-runtime";
6526
6668
  var Potentiometer = ({
6527
6669
  bodyWidth = 5.35,
6528
6670
  bodyLength: bodyLength10 = 14,
@@ -6540,16 +6682,16 @@ var Potentiometer = ({
6540
6682
  const adjusterHeight = 0.8;
6541
6683
  const adjusterZ = bodyHeight + adjusterHeight / 2;
6542
6684
  const slotWidth = Math.max(adjusterDiameter * 0.16, 0.3);
6543
- return /* @__PURE__ */ jsxs77(Fragment76, { children: [
6544
- /* @__PURE__ */ jsx81(Colorize46, { color: bodyColor, children: /* @__PURE__ */ jsx81(
6545
- Cuboid55,
6685
+ return /* @__PURE__ */ jsxs78(Fragment77, { children: [
6686
+ /* @__PURE__ */ jsx82(Colorize47, { color: bodyColor, children: /* @__PURE__ */ jsx82(
6687
+ Cuboid56,
6546
6688
  {
6547
6689
  size: [bodyWidth, bodyLength10, bodyHeight],
6548
6690
  center: [bodyCenterX, 0, bodyHeight / 2]
6549
6691
  }
6550
6692
  ) }),
6551
- /* @__PURE__ */ jsx81(Colorize46, { color: adjusterColor, children: /* @__PURE__ */ jsxs77(Subtract15, { children: [
6552
- /* @__PURE__ */ jsx81(
6693
+ /* @__PURE__ */ jsx82(Colorize47, { color: adjusterColor, children: /* @__PURE__ */ jsxs78(Subtract16, { children: [
6694
+ /* @__PURE__ */ jsx82(
6553
6695
  Cylinder19,
6554
6696
  {
6555
6697
  radius: adjusterDiameter / 2,
@@ -6557,15 +6699,15 @@ var Potentiometer = ({
6557
6699
  center: [bodyCenterX, 0, adjusterZ]
6558
6700
  }
6559
6701
  ),
6560
- /* @__PURE__ */ jsx81(
6561
- Cuboid55,
6702
+ /* @__PURE__ */ jsx82(
6703
+ Cuboid56,
6562
6704
  {
6563
6705
  size: [adjusterDiameter, slotWidth, adjusterHeight * 0.6],
6564
6706
  center: [bodyCenterX, 0, adjusterZ + adjusterHeight / 2]
6565
6707
  }
6566
6708
  )
6567
6709
  ] }) }),
6568
- shaftHeight > 0 && shaftDiameter > 0 ? /* @__PURE__ */ jsx81(Colorize46, { color: adjusterColor, children: /* @__PURE__ */ jsx81(
6710
+ shaftHeight > 0 && shaftDiameter > 0 ? /* @__PURE__ */ jsx82(Colorize47, { color: adjusterColor, children: /* @__PURE__ */ jsx82(
6569
6711
  Cylinder19,
6570
6712
  {
6571
6713
  radius: shaftDiameter / 2,
@@ -6573,7 +6715,7 @@ var Potentiometer = ({
6573
6715
  center: [bodyCenterX, 0, bodyHeight + shaftHeight / 2]
6574
6716
  }
6575
6717
  ) }) : null,
6576
- leads.map((lead) => /* @__PURE__ */ jsx81(Colorize46, { color: "#c0c0c0", children: /* @__PURE__ */ jsx81(
6718
+ leads.map((lead) => /* @__PURE__ */ jsx82(Colorize47, { color: "#c0c0c0", children: /* @__PURE__ */ jsx82(
6577
6719
  Cylinder19,
6578
6720
  {
6579
6721
  radius: leadDiameter / 2,
@@ -6585,8 +6727,8 @@ var Potentiometer = ({
6585
6727
  };
6586
6728
 
6587
6729
  // lib/SmdPushButton.tsx
6588
- import { Colorize as Colorize47, Cuboid as Cuboid56, Cylinder as Cylinder20 } from "jscad-fiber";
6589
- import { Fragment as Fragment77, jsx as jsx82, jsxs as jsxs78 } from "react/jsx-runtime";
6730
+ import { Colorize as Colorize48, Cuboid as Cuboid57, Cylinder as Cylinder20 } from "jscad-fiber";
6731
+ import { Fragment as Fragment78, jsx as jsx83, jsxs as jsxs79 } from "react/jsx-runtime";
6590
6732
  var SmdPushButton = ({
6591
6733
  bodyWidth = 2.9,
6592
6734
  bodyLength: bodyLength10 = 3,
@@ -6602,15 +6744,15 @@ var SmdPushButton = ({
6602
6744
  leadColor = "#cccccc"
6603
6745
  }) => {
6604
6746
  const leadThickness = 0.15;
6605
- return /* @__PURE__ */ jsxs78(Fragment77, { children: [
6606
- /* @__PURE__ */ jsx82(Colorize47, { color: bodyColor, children: /* @__PURE__ */ jsx82(
6607
- Cuboid56,
6747
+ return /* @__PURE__ */ jsxs79(Fragment78, { children: [
6748
+ /* @__PURE__ */ jsx83(Colorize48, { color: bodyColor, children: /* @__PURE__ */ jsx83(
6749
+ Cuboid57,
6608
6750
  {
6609
6751
  size: [bodyWidth, bodyLength10, bodyHeight],
6610
6752
  center: [0, 0, bodyHeight / 2]
6611
6753
  }
6612
6754
  ) }),
6613
- /* @__PURE__ */ jsx82(Colorize47, { color: actuatorColor, children: /* @__PURE__ */ jsx82(
6755
+ /* @__PURE__ */ jsx83(Colorize48, { color: actuatorColor, children: /* @__PURE__ */ jsx83(
6614
6756
  Cylinder20,
6615
6757
  {
6616
6758
  radius: actuatorDiameter / 2,
@@ -6619,8 +6761,8 @@ var SmdPushButton = ({
6619
6761
  }
6620
6762
  ) }),
6621
6763
  [-1, 1].flatMap(
6622
- (sx) => [-1, 1].map((sy) => /* @__PURE__ */ jsx82(Colorize47, { color: leadColor, children: /* @__PURE__ */ jsx82(
6623
- Cuboid56,
6764
+ (sx) => [-1, 1].map((sy) => /* @__PURE__ */ jsx83(Colorize48, { color: leadColor, children: /* @__PURE__ */ jsx83(
6765
+ Cuboid57,
6624
6766
  {
6625
6767
  size: [padWidth, padLength, leadThickness],
6626
6768
  center: [
@@ -6635,8 +6777,8 @@ var SmdPushButton = ({
6635
6777
  };
6636
6778
 
6637
6779
  // lib/SOT-563.tsx
6638
- import { Cuboid as Cuboid57, Translate as Translate37, Rotate as Rotate17, Colorize as Colorize48 } from "jscad-fiber";
6639
- import { Fragment as Fragment78, jsx as jsx83, jsxs as jsxs79 } from "react/jsx-runtime";
6780
+ import { Cuboid as Cuboid58, Translate as Translate38, Rotate as Rotate18, Colorize as Colorize49 } from "jscad-fiber";
6781
+ import { Fragment as Fragment79, jsx as jsx84, jsxs as jsxs80 } from "react/jsx-runtime";
6640
6782
  var SOT563 = ({ fullWidth = 1.94, fullLength: fullLength10 = 1.6 }) => {
6641
6783
  const bodyWidth = 1.2;
6642
6784
  const bodyLength10 = 1.6;
@@ -6646,28 +6788,28 @@ var SOT563 = ({ fullWidth = 1.94, fullLength: fullLength10 = 1.6 }) => {
6646
6788
  const leadHeight = 0.13;
6647
6789
  const leadSpacing = 0.5;
6648
6790
  const bodyZOffset = -0.4;
6649
- return /* @__PURE__ */ jsxs79(Fragment78, { children: [
6650
- /* @__PURE__ */ jsx83(Rotate17, { rotation: [45 * Math.PI, 0, 0], children: /* @__PURE__ */ jsx83(Translate37, { center: [0, 0, bodyZOffset], children: /* @__PURE__ */ jsx83(Colorize48, { color: "grey", children: /* @__PURE__ */ jsx83(Cuboid57, { size: [bodyWidth, bodyLength10, bodyHeight] }) }) }) }),
6791
+ return /* @__PURE__ */ jsxs80(Fragment79, { children: [
6792
+ /* @__PURE__ */ jsx84(Rotate18, { rotation: [45 * Math.PI, 0, 0], children: /* @__PURE__ */ jsx84(Translate38, { center: [0, 0, bodyZOffset], children: /* @__PURE__ */ jsx84(Colorize49, { color: "grey", children: /* @__PURE__ */ jsx84(Cuboid58, { size: [bodyWidth, bodyLength10, bodyHeight] }) }) }) }),
6651
6793
  [-1, 0, 1].flatMap((yOffset, index) => [
6652
6794
  // Left lead
6653
- /* @__PURE__ */ jsx83(
6654
- Translate37,
6795
+ /* @__PURE__ */ jsx84(
6796
+ Translate38,
6655
6797
  {
6656
6798
  center: [
6657
6799
  -bodyWidth / 2 - 0.03,
6658
6800
  yOffset * leadSpacing,
6659
6801
  leadHeight / 2
6660
6802
  ],
6661
- children: /* @__PURE__ */ jsx83(Cuboid57, { size: [leadLength, leadWidth, leadHeight] })
6803
+ children: /* @__PURE__ */ jsx84(Cuboid58, { size: [leadLength, leadWidth, leadHeight] })
6662
6804
  },
6663
6805
  `left-${index}`
6664
6806
  ),
6665
6807
  // Right lead
6666
- /* @__PURE__ */ jsx83(
6667
- Translate37,
6808
+ /* @__PURE__ */ jsx84(
6809
+ Translate38,
6668
6810
  {
6669
6811
  center: [bodyWidth / 2 + 0.03, yOffset * leadSpacing, leadHeight / 2],
6670
- children: /* @__PURE__ */ jsx83(Cuboid57, { size: [leadLength, leadWidth, leadHeight] })
6812
+ children: /* @__PURE__ */ jsx84(Cuboid58, { size: [leadLength, leadWidth, leadHeight] })
6671
6813
  },
6672
6814
  `right-${index}`
6673
6815
  )
@@ -6675,10 +6817,176 @@ var SOT563 = ({ fullWidth = 1.94, fullLength: fullLength10 = 1.6 }) => {
6675
6817
  ] });
6676
6818
  };
6677
6819
 
6820
+ // lib/UsbCMidmount.tsx
6821
+ import { fp as fp6 } from "@tscircuit/footprinter";
6822
+ import {
6823
+ Colorize as Colorize50,
6824
+ Cuboid as Cuboid59,
6825
+ Cylinder as Cylinder21,
6826
+ Hull as Hull26,
6827
+ Rotate as Rotate19,
6828
+ Subtract as Subtract17,
6829
+ Translate as Translate39
6830
+ } from "jscad-fiber";
6831
+ import { jsx as jsx85, jsxs as jsxs81 } from "react/jsx-runtime";
6832
+ var Capsule = ({
6833
+ width: width10,
6834
+ height: height10,
6835
+ depth
6836
+ }) => /* @__PURE__ */ jsx85(Hull26, { children: [-1, 1].map((side) => /* @__PURE__ */ jsx85(Translate39, { offset: [side * (width10 - height10) / 2, 0, 0], children: /* @__PURE__ */ jsx85(Rotate19, { rotation: [Math.PI / 2, 0, 0], children: /* @__PURE__ */ jsx85(Cylinder21, { radius: height10 / 2, height: depth }) }) }, side)) });
6837
+ var UsbCMidmount = ({
6838
+ footprint = "usbcmidmount16"
6839
+ }) => {
6840
+ const canonical = footprint.replace(/_pin1location\([^)]*\)/g, "");
6841
+ const params = fp6.string(canonical).json();
6842
+ const elements = fp6.string(canonical).circuitJson();
6843
+ const pads = elements.filter(
6844
+ (e) => e.type === "pcb_smtpad" && e.shape === "rect"
6845
+ );
6846
+ const slots = elements.filter((e) => e.type === "pcb_plated_hole");
6847
+ const holes = elements.filter((e) => e.type === "pcb_hole");
6848
+ const target = fp6.string(footprint).circuitJson().find((e) => e.type === "pcb_plated_hole");
6849
+ const first = slots[0];
6850
+ const angle = first && target && "x" in target ? Math.atan2(target.y, target.x) - Math.atan2(first.y, first.x) : 0;
6851
+ const width10 = 8.94, height10 = 3.2, wall = 0.22;
6852
+ const back = params.rowy + 0.23, front = -params.bodybottom;
6853
+ const depth = back - front, centerY = (back + front) / 2, centerZ = 1.65;
6854
+ if (!Number.isFinite(depth) || depth < 3 || slots.length !== 4)
6855
+ throw new Error(
6856
+ "UsbCMidmount requires four mounting slots and a positive body depth"
6857
+ );
6858
+ const tabBottom = -0.9, tabTop = centerZ + 0.1;
6859
+ return /* @__PURE__ */ jsxs81(Rotate19, { rotation: [0, 0, angle], children: [
6860
+ /* @__PURE__ */ jsx85(Colorize50, { color: "#b8bdc4", children: /* @__PURE__ */ jsx85(Translate39, { offset: [0, centerY, centerZ], children: /* @__PURE__ */ jsxs81(Subtract17, { children: [
6861
+ /* @__PURE__ */ jsx85(Capsule, { width: width10, height: height10, depth }),
6862
+ /* @__PURE__ */ jsx85(
6863
+ Capsule,
6864
+ {
6865
+ width: width10 - wall * 2,
6866
+ height: height10 - wall * 2,
6867
+ depth: depth + 0.2
6868
+ }
6869
+ )
6870
+ ] }) }) }),
6871
+ /* @__PURE__ */ jsxs81(Colorize50, { color: "#242529", children: [
6872
+ /* @__PURE__ */ jsx85(
6873
+ Cuboid59,
6874
+ {
6875
+ size: [6.65, depth - 1.1, 0.7],
6876
+ center: [0, centerY + 0.3, centerZ]
6877
+ }
6878
+ ),
6879
+ /* @__PURE__ */ jsx85(Cuboid59, { size: [7.6, 1, 2.45], center: [0, back - 0.65, centerZ] }),
6880
+ holes.map(
6881
+ (hole, i) => "x" in hole && "hole_diameter" in hole ? /* @__PURE__ */ jsx85(
6882
+ Cylinder21,
6883
+ {
6884
+ radius: hole.hole_diameter * 0.42,
6885
+ height: 0.8,
6886
+ center: [hole.x, hole.y, -0.3]
6887
+ },
6888
+ i
6889
+ ) : null
6890
+ )
6891
+ ] }),
6892
+ /* @__PURE__ */ jsxs81(Colorize50, { color: "#d3ad57", children: [
6893
+ [-1, 1].flatMap(
6894
+ (side) => [-2.75, -2.25, -1.25, -0.25, 0.25, 1.25, 2.25, 2.75].map((x) => /* @__PURE__ */ jsx85(
6895
+ Cuboid59,
6896
+ {
6897
+ size: [0.24, depth - 2, 0.04],
6898
+ center: [x, centerY + 0.1, centerZ + side * 0.365]
6899
+ },
6900
+ `${side}-${x}`
6901
+ ))
6902
+ ),
6903
+ pads.map((pad, i) => /* @__PURE__ */ jsx85(
6904
+ Cuboid59,
6905
+ {
6906
+ size: [
6907
+ Math.min(pad.width * 0.7, 0.35),
6908
+ pad.height * 0.8 + 0.35,
6909
+ 0.15
6910
+ ],
6911
+ center: [pad.x, pad.y - 0.175, 0.075]
6912
+ },
6913
+ i
6914
+ ))
6915
+ ] }),
6916
+ /* @__PURE__ */ jsx85(Colorize50, { color: "#b8bdc4", children: slots.map((slot, i) => /* @__PURE__ */ jsx85(
6917
+ Cuboid59,
6918
+ {
6919
+ size: [
6920
+ 0.4,
6921
+ "hole_height" in slot ? Math.max(0.3, slot.hole_height - 0.2) : 1,
6922
+ tabTop - tabBottom
6923
+ ],
6924
+ center: [slot.x, slot.y, (tabTop + tabBottom) / 2]
6925
+ },
6926
+ i
6927
+ )) })
6928
+ ] });
6929
+ };
6930
+
6931
+ // lib/SOT143.tsx
6932
+ import { fp as fp7 } from "@tscircuit/footprinter";
6933
+ import { Rotate as Rotate20 } from "jscad-fiber";
6934
+ import { jsx as jsx86, jsxs as jsxs82 } from "react/jsx-runtime";
6935
+ var getPads = (footprint) => fp7.string(footprint).circuitJson().filter(
6936
+ (element) => element.type === "pcb_smtpad" && (element.shape === "rect" || element.shape === "rotated_rect")
6937
+ ).map((pad) => ({ x: pad.x, y: pad.y, pin: pad.port_hints?.[0] }));
6938
+ var SOT143 = ({ footprint = "sot143" }) => {
6939
+ const pads = getPads(footprint);
6940
+ if (pads.length !== 4) throw new Error("SOT143 requires four signal pads");
6941
+ const canonical = getPads("sot143");
6942
+ const options = fp7.string(footprint).json();
6943
+ const origin = canonical[1];
6944
+ const target = pads.find((pad) => pad.pin === "2");
6945
+ const angle = options.pin1location ? Math.round(
6946
+ (Math.atan2(target.y, target.x) - Math.atan2(origin.y, origin.x)) / (Math.PI / 2)
6947
+ ) * (Math.PI / 2) : 0;
6948
+ const local = pads.map((pad) => ({
6949
+ ...pad,
6950
+ x: pad.x * Math.cos(angle) + pad.y * Math.sin(angle),
6951
+ y: -pad.x * Math.sin(angle) + pad.y * Math.cos(angle)
6952
+ }));
6953
+ return /* @__PURE__ */ jsxs82(Rotate20, { rotation: [0, 0, angle], children: [
6954
+ /* @__PURE__ */ jsx86(
6955
+ ChipBody,
6956
+ {
6957
+ width: 2.9,
6958
+ length: 1.3,
6959
+ height: 0.95,
6960
+ heightAboveSurface: 0.05,
6961
+ center: { x: 0, y: 0, z: 0 },
6962
+ includeNotch: false,
6963
+ taperRatio: 0.06
6964
+ }
6965
+ ),
6966
+ local.map((pad) => {
6967
+ const side = pad.y < 0 ? -1 : 1;
6968
+ const leadWidth = pad.pin === "1" ? 0.83 : 0.43;
6969
+ return /* @__PURE__ */ jsx86(
6970
+ SmdChipLead,
6971
+ {
6972
+ width: leadWidth,
6973
+ thickness: 0.12,
6974
+ height: 0.45,
6975
+ padContactLength: 0.3,
6976
+ bodyDistance: 0.6,
6977
+ rotation: side < 0 ? Math.PI / 2 : -Math.PI / 2,
6978
+ position: { x: pad.x, y: side * 1.15, z: 0.06 }
6979
+ },
6980
+ pad.pin
6981
+ );
6982
+ })
6983
+ ] });
6984
+ };
6985
+
6678
6986
  // lib/FlexScreen.tsx
6679
- import { Colorize as Colorize49, Rotate as Rotate18, RoundedCuboid as RoundedCuboid5, Translate as Translate38 } from "jscad-fiber";
6680
- import { Fragment as Fragment79 } from "react";
6681
- import { Fragment as Fragment80, jsx as jsx84, jsxs as jsxs80 } from "react/jsx-runtime";
6987
+ import { Colorize as Colorize51, Rotate as Rotate21, RoundedCuboid as RoundedCuboid5, Translate as Translate40 } from "jscad-fiber";
6988
+ import { Fragment as Fragment80 } from "react";
6989
+ import { Fragment as Fragment81, jsx as jsx87, jsxs as jsxs83 } from "react/jsx-runtime";
6682
6990
  var DEFAULT_ASPECT_RATIO = 16 / 9;
6683
6991
  var DEFAULT_DIAGONAL = 40;
6684
6992
  var EPSILON = 1e-6;
@@ -6908,7 +7216,7 @@ var CableStrip = ({
6908
7216
  acrossOffset = 0,
6909
7217
  normalOffset = 0,
6910
7218
  overlap = 0.03
6911
- }) => /* @__PURE__ */ jsx84(Colorize49, { color, children: points.slice(1).map((point, index) => {
7219
+ }) => /* @__PURE__ */ jsx87(Colorize51, { color, children: points.slice(1).map((point, index) => {
6912
7220
  const previous = points[index];
6913
7221
  const dx = point[0] - previous[0];
6914
7222
  const dy = point[1] - previous[1];
@@ -6926,7 +7234,7 @@ var CableStrip = ({
6926
7234
  1e-3,
6927
7235
  Math.min(width10, thickness, segmentLength) / 2 - 1e-3
6928
7236
  );
6929
- return /* @__PURE__ */ jsx84(Translate38, { offset: midpoint, children: /* @__PURE__ */ jsx84(Rotate18, { rotation: [pitch, 0, yaw], children: /* @__PURE__ */ jsx84(
7237
+ return /* @__PURE__ */ jsx87(Translate40, { offset: midpoint, children: /* @__PURE__ */ jsx87(Rotate21, { rotation: [pitch, 0, yaw], children: /* @__PURE__ */ jsx87(
6930
7238
  RoundedCuboid5,
6931
7239
  {
6932
7240
  size: [width10, segmentLength + overlap, thickness],
@@ -7135,8 +7443,8 @@ var FlexScreen = (props) => {
7135
7443
  );
7136
7444
  const conductorNormalOffset = (flexCableThickness + conductorThickness) / 2;
7137
7445
  const stiffenerNormalOffset = -(flexCableThickness + stiffenerThickness) / 2;
7138
- const assembly = /* @__PURE__ */ jsxs80(Fragment80, { children: [
7139
- showFlexCable && /* @__PURE__ */ jsx84(
7446
+ const assembly = /* @__PURE__ */ jsxs83(Fragment81, { children: [
7447
+ showFlexCable && /* @__PURE__ */ jsx87(
7140
7448
  CableStrip,
7141
7449
  {
7142
7450
  points: path,
@@ -7145,8 +7453,8 @@ var FlexScreen = (props) => {
7145
7453
  color: flexCableColor
7146
7454
  }
7147
7455
  ),
7148
- showFlexCable && showStiffeners && resolvedStiffenerLength > EPSILON && /* @__PURE__ */ jsxs80(Fragment80, { children: [
7149
- /* @__PURE__ */ jsx84(
7456
+ showFlexCable && showStiffeners && resolvedStiffenerLength > EPSILON && /* @__PURE__ */ jsxs83(Fragment81, { children: [
7457
+ /* @__PURE__ */ jsx87(
7150
7458
  CableStrip,
7151
7459
  {
7152
7460
  points: startStiffener,
@@ -7156,7 +7464,7 @@ var FlexScreen = (props) => {
7156
7464
  normalOffset: stiffenerNormalOffset
7157
7465
  }
7158
7466
  ),
7159
- /* @__PURE__ */ jsx84(
7467
+ /* @__PURE__ */ jsx87(
7160
7468
  CableStrip,
7161
7469
  {
7162
7470
  points: endStiffener,
@@ -7167,8 +7475,8 @@ var FlexScreen = (props) => {
7167
7475
  }
7168
7476
  )
7169
7477
  ] }),
7170
- showFlexCable && showConductors && contactLength > EPSILON && conductorOffsets.map((acrossOffset, index) => /* @__PURE__ */ jsxs80(Fragment79, { children: [
7171
- /* @__PURE__ */ jsx84(
7478
+ showFlexCable && showConductors && contactLength > EPSILON && conductorOffsets.map((acrossOffset, index) => /* @__PURE__ */ jsxs83(Fragment80, { children: [
7479
+ /* @__PURE__ */ jsx87(
7172
7480
  CableStrip,
7173
7481
  {
7174
7482
  points: startContacts,
@@ -7179,7 +7487,7 @@ var FlexScreen = (props) => {
7179
7487
  normalOffset: conductorNormalOffset
7180
7488
  }
7181
7489
  ),
7182
- /* @__PURE__ */ jsx84(
7490
+ /* @__PURE__ */ jsx87(
7183
7491
  CableStrip,
7184
7492
  {
7185
7493
  points: endContacts,
@@ -7191,7 +7499,7 @@ var FlexScreen = (props) => {
7191
7499
  }
7192
7500
  )
7193
7501
  ] }, `conductor:${index}`)),
7194
- showScreen && /* @__PURE__ */ jsx84(Translate38, { offset: screenCenter, children: /* @__PURE__ */ jsx84(Rotate18, { rotation: screenRotation ?? presetScreenRotation, children: /* @__PURE__ */ jsx84(
7502
+ showScreen && /* @__PURE__ */ jsx87(Translate40, { offset: screenCenter, children: /* @__PURE__ */ jsx87(Rotate21, { rotation: screenRotation ?? presetScreenRotation, children: /* @__PURE__ */ jsx87(
7195
7503
  Screen,
7196
7504
  {
7197
7505
  width: size.width,
@@ -7206,21 +7514,21 @@ var FlexScreen = (props) => {
7206
7514
  }
7207
7515
  ) }) })
7208
7516
  ] });
7209
- return /* @__PURE__ */ jsx84(
7210
- Translate38,
7517
+ return /* @__PURE__ */ jsx87(
7518
+ Translate40,
7211
7519
  {
7212
7520
  offset: {
7213
7521
  x: offset?.x ?? 0,
7214
7522
  y: offset?.y ?? 0,
7215
7523
  z: offset?.z ?? 0
7216
7524
  },
7217
- children: /* @__PURE__ */ jsx84(Translate38, { offset: start, children: /* @__PURE__ */ jsx84(Rotate18, { rotation, children: /* @__PURE__ */ jsx84(Translate38, { offset: [-start[0], -start[1], -start[2]], children: assembly }) }) })
7525
+ children: /* @__PURE__ */ jsx87(Translate40, { offset: start, children: /* @__PURE__ */ jsx87(Rotate21, { rotation, children: /* @__PURE__ */ jsx87(Translate40, { offset: [-start[0], -start[1], -start[2]], children: assembly }) }) })
7218
7526
  }
7219
7527
  );
7220
7528
  };
7221
7529
 
7222
7530
  // lib/Footprinter3d.tsx
7223
- import { Fragment as Fragment81, jsx as jsx85 } from "react/jsx-runtime";
7531
+ import { Fragment as Fragment82, jsx as jsx88 } from "react/jsx-runtime";
7224
7532
  var Footprinter3d = ({ footprint }) => {
7225
7533
  const modelFn = mp.string(footprint.split("_", 1)[0]).params().fn;
7226
7534
  if (mp.getModelNames().includes(modelFn)) {
@@ -7228,7 +7536,7 @@ var Footprinter3d = ({ footprint }) => {
7228
7536
  switch (model.fn) {
7229
7537
  case "flexscreen": {
7230
7538
  const { fn: _, ...flexScreenProps } = model;
7231
- return /* @__PURE__ */ jsx85(FlexScreen, { ...flexScreenProps });
7539
+ return /* @__PURE__ */ jsx88(FlexScreen, { ...flexScreenProps });
7232
7540
  }
7233
7541
  }
7234
7542
  }
@@ -7241,8 +7549,12 @@ var Footprinter3d = ({ footprint }) => {
7241
7549
  const pinMatch = footprint.match(/jstph2_0mm(\d+)?/);
7242
7550
  const numPins = pinMatch && pinMatch[1] ? pinMatch[1] : "2";
7243
7551
  normalizedFootprint = `jst${numPins}_ph`;
7552
+ } else if (footprint.startsWith("jstxh2_5mm")) {
7553
+ const pinMatch = footprint.match(/jstxh2_5mm(\d+)?/);
7554
+ const numPins = pinMatch && pinMatch[1] ? pinMatch[1] : "2";
7555
+ normalizedFootprint = `jst${numPins}_xh`;
7244
7556
  }
7245
- const fpJson = fp5.string(normalizedFootprint).json();
7557
+ const fpJson = fp8.string(normalizedFootprint).json();
7246
7558
  const colorMatch = footprint.match(/_color\(([^)]+)\)/);
7247
7559
  const color = colorMatch ? colorMatch[1] : void 0;
7248
7560
  const dim = (value, fallback) => {
@@ -7252,7 +7564,7 @@ var Footprinter3d = ({ footprint }) => {
7252
7564
  };
7253
7565
  switch (fpJson.fn) {
7254
7566
  case "crystal":
7255
- return /* @__PURE__ */ jsx85(
7567
+ return /* @__PURE__ */ jsx88(
7256
7568
  Crystal,
7257
7569
  {
7258
7570
  horizontalPadPitch: fpJson.px,
@@ -7262,11 +7574,11 @@ var Footprinter3d = ({ footprint }) => {
7262
7574
  }
7263
7575
  );
7264
7576
  case "dip":
7265
- return /* @__PURE__ */ jsx85(Dip, { numPins: fpJson.num_pins, pitch: fpJson.p, bodyWidth: fpJson.w });
7577
+ return /* @__PURE__ */ jsx88(Dip, { numPins: fpJson.num_pins, pitch: fpJson.p, bodyWidth: fpJson.w });
7266
7578
  case "axial":
7267
- return /* @__PURE__ */ jsx85(AxialCapacitor, { pitch: fpJson.p });
7579
+ return /* @__PURE__ */ jsx88(AxialCapacitor, { pitch: fpJson.p });
7268
7580
  case "tssop":
7269
- return /* @__PURE__ */ jsx85(
7581
+ return /* @__PURE__ */ jsx88(
7270
7582
  Tssop,
7271
7583
  {
7272
7584
  pinCount: fpJson.num_pins,
@@ -7277,7 +7589,7 @@ var Footprinter3d = ({ footprint }) => {
7277
7589
  }
7278
7590
  );
7279
7591
  case "msop":
7280
- return /* @__PURE__ */ jsx85(
7592
+ return /* @__PURE__ */ jsx88(
7281
7593
  MSOP,
7282
7594
  {
7283
7595
  pinCount: fpJson.num_pins,
@@ -7288,7 +7600,7 @@ var Footprinter3d = ({ footprint }) => {
7288
7600
  }
7289
7601
  );
7290
7602
  case "vssop":
7291
- return /* @__PURE__ */ jsx85(
7603
+ return /* @__PURE__ */ jsx88(
7292
7604
  VSSOP,
7293
7605
  {
7294
7606
  pinCount: fpJson.num_pins,
@@ -7300,7 +7612,7 @@ var Footprinter3d = ({ footprint }) => {
7300
7612
  }
7301
7613
  );
7302
7614
  case "qfp":
7303
- return /* @__PURE__ */ jsx85(
7615
+ return /* @__PURE__ */ jsx88(
7304
7616
  QFP,
7305
7617
  {
7306
7618
  pinCount: fpJson.num_pins,
@@ -7311,12 +7623,12 @@ var Footprinter3d = ({ footprint }) => {
7311
7623
  }
7312
7624
  );
7313
7625
  case "tqfp":
7314
- return /* @__PURE__ */ jsx85(tqfp_default, {});
7626
+ return /* @__PURE__ */ jsx88(tqfp_default, {});
7315
7627
  case "lqfp":
7316
- return /* @__PURE__ */ jsx85(LQFP, { pinCount: fpJson.num_pins });
7628
+ return /* @__PURE__ */ jsx88(LQFP, { pinCount: fpJson.num_pins });
7317
7629
  case "qfn": {
7318
7630
  const hasThermalPad = typeof fpJson.thermalpad?.x === "number" && typeof fpJson.thermalpad?.y === "number";
7319
- return /* @__PURE__ */ jsx85(
7631
+ return /* @__PURE__ */ jsx88(
7320
7632
  qfn_default,
7321
7633
  {
7322
7634
  num_pins: fpJson.num_pins,
@@ -7334,7 +7646,7 @@ var Footprinter3d = ({ footprint }) => {
7334
7646
  }
7335
7647
  case "dfn": {
7336
7648
  const hasThermalPad = typeof fpJson.thermalpad?.x === "number" && typeof fpJson.thermalpad?.y === "number";
7337
- return /* @__PURE__ */ jsx85(
7649
+ return /* @__PURE__ */ jsx88(
7338
7650
  DFN,
7339
7651
  {
7340
7652
  num_pins: fpJson.num_pins,
@@ -7354,7 +7666,7 @@ var Footprinter3d = ({ footprint }) => {
7354
7666
  const rowsMatch = footprint.match(/_rows(\d+)/);
7355
7667
  const rows = rowsMatch && rowsMatch[1] ? parseInt(rowsMatch[1], 10) : 1;
7356
7668
  if (fpJson.male)
7357
- return /* @__PURE__ */ jsx85(
7669
+ return /* @__PURE__ */ jsx88(
7358
7670
  PinRow,
7359
7671
  {
7360
7672
  numberOfPins: fpJson.num_pins,
@@ -7366,7 +7678,7 @@ var Footprinter3d = ({ footprint }) => {
7366
7678
  }
7367
7679
  );
7368
7680
  if (fpJson.female)
7369
- return /* @__PURE__ */ jsx85(
7681
+ return /* @__PURE__ */ jsx88(
7370
7682
  FemaleHeaderRow,
7371
7683
  {
7372
7684
  numberOfPins: fpJson.num_pins,
@@ -7376,7 +7688,7 @@ var Footprinter3d = ({ footprint }) => {
7376
7688
  );
7377
7689
  }
7378
7690
  case "smdpinheader":
7379
- return /* @__PURE__ */ jsx85(
7691
+ return /* @__PURE__ */ jsx88(
7380
7692
  SmdPinHeader,
7381
7693
  {
7382
7694
  numberOfPins: fpJson.num_pins,
@@ -7385,44 +7697,44 @@ var Footprinter3d = ({ footprint }) => {
7385
7697
  }
7386
7698
  );
7387
7699
  case "led5050":
7388
- return /* @__PURE__ */ jsx85(Led5050, { color });
7700
+ return /* @__PURE__ */ jsx88(Led5050, { color });
7389
7701
  case "cap": {
7390
7702
  switch (fpJson.imperial) {
7391
7703
  case "0402":
7392
- return /* @__PURE__ */ jsx85(A0402, { color: "#856c4d" });
7704
+ return /* @__PURE__ */ jsx88(A0402, { color: "#856c4d" });
7393
7705
  case "0603":
7394
- return /* @__PURE__ */ jsx85(A0603, { color: "#856c4d" });
7706
+ return /* @__PURE__ */ jsx88(A0603, { color: "#856c4d" });
7395
7707
  case "0805":
7396
- return /* @__PURE__ */ jsx85(A0805, { color: "#856c4d" });
7708
+ return /* @__PURE__ */ jsx88(A0805, { color: "#856c4d" });
7397
7709
  case "0201":
7398
- return /* @__PURE__ */ jsx85(A0201, { color: "#856c4d" });
7710
+ return /* @__PURE__ */ jsx88(A0201, { color: "#856c4d" });
7399
7711
  case "01005":
7400
- return /* @__PURE__ */ jsx85(A01005, { color: "#856c4d" });
7712
+ return /* @__PURE__ */ jsx88(A01005, { color: "#856c4d" });
7401
7713
  case "1206":
7402
- return /* @__PURE__ */ jsx85(A1206, { color: "#856c4d" });
7714
+ return /* @__PURE__ */ jsx88(A1206, { color: "#856c4d" });
7403
7715
  case "1210":
7404
- return /* @__PURE__ */ jsx85(A1210, { color: "#856c4d" });
7716
+ return /* @__PURE__ */ jsx88(A1210, { color: "#856c4d" });
7405
7717
  case "2010":
7406
- return /* @__PURE__ */ jsx85(A2010, { color: "#856c4d" });
7718
+ return /* @__PURE__ */ jsx88(A2010, { color: "#856c4d" });
7407
7719
  case "2512":
7408
- return /* @__PURE__ */ jsx85(A2512, { color: "#856c4d" });
7720
+ return /* @__PURE__ */ jsx88(A2512, { color: "#856c4d" });
7409
7721
  }
7410
7722
  break;
7411
7723
  }
7412
7724
  case "sot23":
7413
7725
  switch (fpJson.num_pins) {
7414
7726
  case 3:
7415
- return /* @__PURE__ */ jsx85(SOT233P, { color });
7727
+ return /* @__PURE__ */ jsx88(SOT233P, { color });
7416
7728
  case 5:
7417
- return /* @__PURE__ */ jsx85(SOT_235_default, {});
7729
+ return /* @__PURE__ */ jsx88(SOT_235_default, {});
7418
7730
  }
7419
7731
  break;
7420
7732
  case "sot25":
7421
- return /* @__PURE__ */ jsx85(SOT_235_default, {});
7733
+ return /* @__PURE__ */ jsx88(SOT_235_default, {});
7422
7734
  case "sot":
7423
7735
  case "sot343": {
7424
7736
  const isSc70 = fpJson.fn === "sot343";
7425
- return /* @__PURE__ */ jsx85(
7737
+ return /* @__PURE__ */ jsx88(
7426
7738
  GullWingBody,
7427
7739
  {
7428
7740
  pads: getSmtPadRects(normalizedFootprint),
@@ -7433,10 +7745,10 @@ var Footprinter3d = ({ footprint }) => {
7433
7745
  );
7434
7746
  }
7435
7747
  case "sot563":
7436
- return /* @__PURE__ */ jsx85(SOT563, {});
7748
+ return /* @__PURE__ */ jsx88(SOT563, {});
7437
7749
  case "sot89": {
7438
7750
  const padSpan = dim(fpJson.w, 4.2);
7439
- return /* @__PURE__ */ jsx85(
7751
+ return /* @__PURE__ */ jsx88(
7440
7752
  SOT223,
7441
7753
  {
7442
7754
  fullWidth: padSpan,
@@ -7451,25 +7763,29 @@ var Footprinter3d = ({ footprint }) => {
7451
7763
  );
7452
7764
  }
7453
7765
  case "sot457":
7454
- return /* @__PURE__ */ jsx85(SOT457, {});
7766
+ return /* @__PURE__ */ jsx88(SOT457, {});
7767
+ case "usbcmidmount":
7768
+ return /* @__PURE__ */ jsx88(UsbCMidmount, { footprint: normalizedFootprint });
7769
+ case "sot143":
7770
+ return /* @__PURE__ */ jsx88(SOT143, { footprint: normalizedFootprint });
7455
7771
  case "sot223":
7456
- return /* @__PURE__ */ jsx85(SOT223, {});
7772
+ return /* @__PURE__ */ jsx88(SOT223, {});
7457
7773
  case "sot23w":
7458
- return /* @__PURE__ */ jsx85(SOT23W, {});
7774
+ return /* @__PURE__ */ jsx88(SOT23W, {});
7459
7775
  case "sot323":
7460
- return /* @__PURE__ */ jsx85(SOT323, {});
7776
+ return /* @__PURE__ */ jsx88(SOT323, {});
7461
7777
  case "sod323f":
7462
- return /* @__PURE__ */ jsx85(SOD323F, {});
7778
+ return /* @__PURE__ */ jsx88(SOD323F, {});
7463
7779
  case "sod323fl":
7464
- return /* @__PURE__ */ jsx85(SOD323FL, {});
7780
+ return /* @__PURE__ */ jsx88(SOD323FL, {});
7465
7781
  case "sot363":
7466
- return /* @__PURE__ */ jsx85(SOT_363_default, {});
7782
+ return /* @__PURE__ */ jsx88(SOT_363_default, {});
7467
7783
  case "sot886":
7468
- return /* @__PURE__ */ jsx85(SOT886, {});
7784
+ return /* @__PURE__ */ jsx88(SOT886, {});
7469
7785
  case "sot963":
7470
- return /* @__PURE__ */ jsx85(SOT963, {});
7786
+ return /* @__PURE__ */ jsx88(SOT963, {});
7471
7787
  case "pushbutton":
7472
- return /* @__PURE__ */ jsx85(
7788
+ return /* @__PURE__ */ jsx88(
7473
7789
  PushButton,
7474
7790
  {
7475
7791
  width: fpJson.w,
@@ -7479,14 +7795,17 @@ var Footprinter3d = ({ footprint }) => {
7479
7795
  );
7480
7796
  case "jst":
7481
7797
  if (fpJson.zh) {
7482
- return /* @__PURE__ */ jsx85(JSTZH1_5mm, { numPins: fpJson.num_pins });
7798
+ return /* @__PURE__ */ jsx88(JSTZH1_5mm, { numPins: fpJson.num_pins });
7483
7799
  }
7484
7800
  if (fpJson.ph) {
7485
- return /* @__PURE__ */ jsx85(JSTPH2_0mm, { numPins: fpJson.num_pins });
7801
+ return /* @__PURE__ */ jsx88(JSTPH2_0mm, { numPins: fpJson.num_pins });
7802
+ }
7803
+ if (fpJson.xh) {
7804
+ return /* @__PURE__ */ jsx88(JSTXH2_5mm, { numPins: fpJson.num_pins });
7486
7805
  }
7487
7806
  break;
7488
7807
  case "fpc":
7489
- return /* @__PURE__ */ jsx85(
7808
+ return /* @__PURE__ */ jsx88(
7490
7809
  FPC,
7491
7810
  {
7492
7811
  pinCount: fpJson.num_pins,
@@ -7506,7 +7825,7 @@ var Footprinter3d = ({ footprint }) => {
7506
7825
  }
7507
7826
  );
7508
7827
  case "rj45":
7509
- return /* @__PURE__ */ jsx85(
7828
+ return /* @__PURE__ */ jsx88(
7510
7829
  RJ45,
7511
7830
  {
7512
7831
  bodyWidth: fpJson.w,
@@ -7532,7 +7851,7 @@ var Footprinter3d = ({ footprint }) => {
7532
7851
  case "soic":
7533
7852
  case "sop8":
7534
7853
  case "ssop":
7535
- return /* @__PURE__ */ jsx85(
7854
+ return /* @__PURE__ */ jsx88(
7536
7855
  SOIC,
7537
7856
  {
7538
7857
  pinCount: fpJson.num_pins,
@@ -7556,7 +7875,7 @@ var Footprinter3d = ({ footprint }) => {
7556
7875
  );
7557
7876
  const distinct = (values) => new Set(values.map((value) => value.toFixed(3))).size;
7558
7877
  const rowsAlongY = signalPads.length > 2 && distinct(signalPads.map((pad) => pad.y)) === 2 && distinct(signalPads.map((pad) => pad.x)) > 2;
7559
- const dfn = /* @__PURE__ */ jsx85(
7878
+ const dfn = /* @__PURE__ */ jsx88(
7560
7879
  DFN,
7561
7880
  {
7562
7881
  num_pins: fpJson.num_pins,
@@ -7571,13 +7890,13 @@ var Footprinter3d = ({ footprint }) => {
7571
7890
  } : void 0
7572
7891
  }
7573
7892
  );
7574
- return rowsAlongY ? /* @__PURE__ */ jsx85(Rotate19, { rotation: [0, 0, "90deg"], children: dfn }) : dfn;
7893
+ return rowsAlongY ? /* @__PURE__ */ jsx88(Rotate22, { rotation: [0, 0, "90deg"], children: dfn }) : dfn;
7575
7894
  }
7576
7895
  case "mlp":
7577
7896
  case "lga":
7578
7897
  case "quad": {
7579
7898
  if (fpJson.legsoutside) {
7580
- return /* @__PURE__ */ jsx85(
7899
+ return /* @__PURE__ */ jsx88(
7581
7900
  QFP,
7582
7901
  {
7583
7902
  pinCount: fpJson.num_pins,
@@ -7588,7 +7907,7 @@ var Footprinter3d = ({ footprint }) => {
7588
7907
  }
7589
7908
  );
7590
7909
  }
7591
- return /* @__PURE__ */ jsx85(
7910
+ return /* @__PURE__ */ jsx88(
7592
7911
  qfn_default,
7593
7912
  {
7594
7913
  num_pins: fpJson.num_pins,
@@ -7604,7 +7923,7 @@ var Footprinter3d = ({ footprint }) => {
7604
7923
  const pitch = dim(fpJson.p, 0.8);
7605
7924
  const columns = fpJson.grid?.x ?? 8;
7606
7925
  const rows = fpJson.grid?.y ?? 8;
7607
- return /* @__PURE__ */ jsx85(
7926
+ return /* @__PURE__ */ jsx88(
7608
7927
  BGA,
7609
7928
  {
7610
7929
  ballPitch: pitch,
@@ -7617,43 +7936,43 @@ var Footprinter3d = ({ footprint }) => {
7617
7936
  );
7618
7937
  }
7619
7938
  case "sod523":
7620
- return /* @__PURE__ */ jsx85(SOD523, {});
7939
+ return /* @__PURE__ */ jsx88(SOD523, {});
7621
7940
  case "sod723":
7622
- return /* @__PURE__ */ jsx85(SOD723_default, {});
7941
+ return /* @__PURE__ */ jsx88(SOD723_default, {});
7623
7942
  case "sod882":
7624
- return /* @__PURE__ */ jsx85(SOD882, {});
7943
+ return /* @__PURE__ */ jsx88(SOD882, {});
7625
7944
  case "sma":
7626
- return /* @__PURE__ */ jsx85(SMA, {});
7945
+ return /* @__PURE__ */ jsx88(SMA, {});
7627
7946
  case "smb":
7628
- return /* @__PURE__ */ jsx85(SMB, {});
7947
+ return /* @__PURE__ */ jsx88(SMB, {});
7629
7948
  case "smc":
7630
- return /* @__PURE__ */ jsx85(SMC, {});
7949
+ return /* @__PURE__ */ jsx88(SMC, {});
7631
7950
  case "smf":
7632
- return /* @__PURE__ */ jsx85(SMF, {});
7951
+ return /* @__PURE__ */ jsx88(SMF, {});
7633
7952
  case "sod123":
7634
- return /* @__PURE__ */ jsx85(SOD123, {});
7953
+ return /* @__PURE__ */ jsx88(SOD123, {});
7635
7954
  case "sod123f":
7636
- return /* @__PURE__ */ jsx85(SOD123F, {});
7955
+ return /* @__PURE__ */ jsx88(SOD123F, {});
7637
7956
  case "sod123fl":
7638
- return /* @__PURE__ */ jsx85(SOD123FL, {});
7957
+ return /* @__PURE__ */ jsx88(SOD123FL, {});
7639
7958
  case "sod123w":
7640
- return /* @__PURE__ */ jsx85(SOD123W, {});
7959
+ return /* @__PURE__ */ jsx88(SOD123W, {});
7641
7960
  case "sod110":
7642
- return /* @__PURE__ */ jsx85(SOD123W, { bodyWidth: 2.1, bodyLength: 1.4 });
7961
+ return /* @__PURE__ */ jsx88(SOD123W, { bodyWidth: 2.1, bodyLength: 1.4 });
7643
7962
  case "sod128":
7644
- return /* @__PURE__ */ jsx85(SOD128, {});
7963
+ return /* @__PURE__ */ jsx88(SOD128, {});
7645
7964
  case "sod323":
7646
- return /* @__PURE__ */ jsx85(SOD323, {});
7965
+ return /* @__PURE__ */ jsx88(SOD323, {});
7647
7966
  case "sod323w":
7648
- return /* @__PURE__ */ jsx85(SOD323, {});
7967
+ return /* @__PURE__ */ jsx88(SOD323, {});
7649
7968
  case "sod80":
7650
- return /* @__PURE__ */ jsx85(MINIMELF, {});
7969
+ return /* @__PURE__ */ jsx88(MINIMELF, {});
7651
7970
  case "sod882d":
7652
- return /* @__PURE__ */ jsx85(SOD882, {});
7971
+ return /* @__PURE__ */ jsx88(SOD882, {});
7653
7972
  case "smbf":
7654
- return /* @__PURE__ */ jsx85(SMB, {});
7973
+ return /* @__PURE__ */ jsx88(SMB, {});
7655
7974
  case "led2835":
7656
- return /* @__PURE__ */ jsx85(
7975
+ return /* @__PURE__ */ jsx88(
7657
7976
  Led2835,
7658
7977
  {
7659
7978
  color,
@@ -7671,10 +7990,10 @@ var Footprinter3d = ({ footprint }) => {
7671
7990
  const pitch = dim(fpJson.p, 2.5);
7672
7991
  const namedDiameter = footprint.match(/_d([\d.]+)/);
7673
7992
  const diameter = fpJson.d !== void 0 ? dim(fpJson.d, pitch * 2) : namedDiameter ? Number(namedDiameter[1]) : pitch * 2;
7674
- return /* @__PURE__ */ jsx85(ElectrolyticCapacitor, { diameter, leadPitch: pitch });
7993
+ return /* @__PURE__ */ jsx88(ElectrolyticCapacitor, { diameter, leadPitch: pitch });
7675
7994
  }
7676
7995
  case "potentiometer":
7677
- return /* @__PURE__ */ jsx85(
7996
+ return /* @__PURE__ */ jsx88(
7678
7997
  Potentiometer,
7679
7998
  {
7680
7999
  bodyWidth: dim(fpJson.w, 5.35),
@@ -7684,7 +8003,7 @@ var Footprinter3d = ({ footprint }) => {
7684
8003
  }
7685
8004
  );
7686
8005
  case "smdpushbutton":
7687
- return /* @__PURE__ */ jsx85(
8006
+ return /* @__PURE__ */ jsx88(
7688
8007
  SmdPushButton,
7689
8008
  {
7690
8009
  padSpanX: dim(fpJson.px, 4.2),
@@ -7700,20 +8019,20 @@ var Footprinter3d = ({ footprint }) => {
7700
8019
  { x: -halfWidth, pins: fpJson.left ?? 0, key: "left" },
7701
8020
  { x: halfWidth, pins: fpJson.right ?? 0, key: "right" }
7702
8021
  ];
7703
- return /* @__PURE__ */ jsx85(Fragment81, { children: sides.filter(({ pins }) => pins > 0).map(({ x, pins, key }) => /* @__PURE__ */ jsx85(Translate39, { center: [x, 0, 0], children: /* @__PURE__ */ jsx85(Rotate19, { rotation: [0, 0, "90deg"], children: /* @__PURE__ */ jsx85(PinRow, { numberOfPins: pins, pitch }) }) }, key)) });
8022
+ return /* @__PURE__ */ jsx88(Fragment82, { children: sides.filter(({ pins }) => pins > 0).map(({ x, pins, key }) => /* @__PURE__ */ jsx88(Translate41, { center: [x, 0, 0], children: /* @__PURE__ */ jsx88(Rotate22, { rotation: [0, 0, "90deg"], children: /* @__PURE__ */ jsx88(PinRow, { numberOfPins: pins, pitch }) }) }, key)) });
7704
8023
  }
7705
8024
  case "sod923":
7706
- return /* @__PURE__ */ jsx85(SOD923, {});
8025
+ return /* @__PURE__ */ jsx88(SOD923, {});
7707
8026
  case "hc49":
7708
- return /* @__PURE__ */ jsx85(HC49, {});
8027
+ return /* @__PURE__ */ jsx88(HC49, {});
7709
8028
  case "micromelf":
7710
- return /* @__PURE__ */ jsx85(MicroMELF, {});
8029
+ return /* @__PURE__ */ jsx88(MicroMELF, {});
7711
8030
  case "minimelf":
7712
- return /* @__PURE__ */ jsx85(MINIMELF, {});
8031
+ return /* @__PURE__ */ jsx88(MINIMELF, {});
7713
8032
  case "melf":
7714
- return /* @__PURE__ */ jsx85(MELF, {});
8033
+ return /* @__PURE__ */ jsx88(MELF, {});
7715
8034
  case "ms012":
7716
- return /* @__PURE__ */ jsx85(
8035
+ return /* @__PURE__ */ jsx88(
7717
8036
  MS012,
7718
8037
  {
7719
8038
  pinCount: fpJson.num_pins,
@@ -7723,7 +8042,7 @@ var Footprinter3d = ({ footprint }) => {
7723
8042
  }
7724
8043
  );
7725
8044
  case "ms013":
7726
- return /* @__PURE__ */ jsx85(
8045
+ return /* @__PURE__ */ jsx88(
7727
8046
  MS013,
7728
8047
  {
7729
8048
  pinCount: fpJson.num_pins,
@@ -7733,19 +8052,19 @@ var Footprinter3d = ({ footprint }) => {
7733
8052
  }
7734
8053
  );
7735
8054
  case "sot723":
7736
- return /* @__PURE__ */ jsx85(SOT723, {});
8055
+ return /* @__PURE__ */ jsx88(SOT723, {});
7737
8056
  case "to220":
7738
- return /* @__PURE__ */ jsx85(TO220, { leads: getPlatedHoleCenters(normalizedFootprint) });
8057
+ return /* @__PURE__ */ jsx88(TO220, { leads: getPlatedHoleCenters(normalizedFootprint) });
7739
8058
  case "to220f":
7740
- return /* @__PURE__ */ jsx85(TO220, { mouldedTab: true, leads: getPlatedHoleCenters(normalizedFootprint) });
8059
+ return /* @__PURE__ */ jsx88(TO220, { mouldedTab: true, leads: getPlatedHoleCenters(normalizedFootprint) });
7741
8060
  case "to92":
7742
- return /* @__PURE__ */ jsx85(TO92, { leads: getPlatedHoleCenters(normalizedFootprint) });
8061
+ return /* @__PURE__ */ jsx88(TO92, { leads: getPlatedHoleCenters(normalizedFootprint) });
7743
8062
  case "to92l":
7744
8063
  case "to92s": {
7745
8064
  const across = dim(fpJson.w, 4.8);
7746
8065
  const along = dim(fpJson.h, 4);
7747
8066
  const diameter = Math.max(across, along);
7748
- return /* @__PURE__ */ jsx85(
8067
+ return /* @__PURE__ */ jsx88(
7749
8068
  TO92,
7750
8069
  {
7751
8070
  bodyDiameter: diameter,
@@ -7764,7 +8083,7 @@ var Footprinter3d = ({ footprint }) => {
7764
8083
  dim(fpJson.tabh, isD2Pak ? 10 : 5.8),
7765
8084
  isD2Pak ? 10 : 6.5
7766
8085
  );
7767
- return /* @__PURE__ */ jsx85(
8086
+ return /* @__PURE__ */ jsx88(
7768
8087
  DPAK,
7769
8088
  {
7770
8089
  bodyWidth: tabWidth,
@@ -7781,7 +8100,7 @@ var Footprinter3d = ({ footprint }) => {
7781
8100
  }
7782
8101
  case "stampboard":
7783
8102
  case "stampreceiver":
7784
- return /* @__PURE__ */ jsx85(
8103
+ return /* @__PURE__ */ jsx88(
7785
8104
  StampBoard,
7786
8105
  {
7787
8106
  bodyWidth: fpJson.w,
@@ -7805,7 +8124,7 @@ var Footprinter3d = ({ footprint }) => {
7805
8124
  const pinRow = fpJson.pinrow;
7806
8125
  const pinRowHoleEdgeToEdgeDist = fpJson.pinRowHoleEdgeToEdgeDist;
7807
8126
  const holes = Array.isArray(fpJson.holes) ? fpJson.holes : [];
7808
- return /* @__PURE__ */ jsx85(
8127
+ return /* @__PURE__ */ jsx88(
7809
8128
  MountedPcbModule,
7810
8129
  {
7811
8130
  numPins: pinRow,
@@ -7832,29 +8151,29 @@ var Footprinter3d = ({ footprint }) => {
7832
8151
  }
7833
8152
  switch (fpJson.imperial) {
7834
8153
  case "0402":
7835
- return /* @__PURE__ */ jsx85(A0402, { color });
8154
+ return /* @__PURE__ */ jsx88(A0402, { color });
7836
8155
  case "0603":
7837
- return /* @__PURE__ */ jsx85(A0603, { color });
8156
+ return /* @__PURE__ */ jsx88(A0603, { color });
7838
8157
  case "0805":
7839
- return /* @__PURE__ */ jsx85(A0805, { color });
8158
+ return /* @__PURE__ */ jsx88(A0805, { color });
7840
8159
  case "0201":
7841
- return /* @__PURE__ */ jsx85(A0201, { color });
8160
+ return /* @__PURE__ */ jsx88(A0201, { color });
7842
8161
  case "01005":
7843
- return /* @__PURE__ */ jsx85(A01005, { color });
8162
+ return /* @__PURE__ */ jsx88(A01005, { color });
7844
8163
  case "1206":
7845
- return /* @__PURE__ */ jsx85(A1206, { color });
8164
+ return /* @__PURE__ */ jsx88(A1206, { color });
7846
8165
  case "1210":
7847
- return /* @__PURE__ */ jsx85(A1210, { color });
8166
+ return /* @__PURE__ */ jsx88(A1210, { color });
7848
8167
  case "2010":
7849
- return /* @__PURE__ */ jsx85(A2010, { color });
8168
+ return /* @__PURE__ */ jsx88(A2010, { color });
7850
8169
  case "2512":
7851
- return /* @__PURE__ */ jsx85(A2512, { color });
8170
+ return /* @__PURE__ */ jsx88(A2512, { color });
7852
8171
  }
7853
8172
  if ((fpJson.fn === "res" || fpJson.fn === "cap") && fpJson.p !== void 0 && fpJson.ph !== void 0) {
7854
8173
  const padPitch = mm(fpJson.p);
7855
8174
  const padHeight = mm(fpJson.ph);
7856
8175
  if (Number.isFinite(padPitch) && Number.isFinite(padHeight)) {
7857
- return /* @__PURE__ */ jsx85(
8176
+ return /* @__PURE__ */ jsx88(
7858
8177
  ParametricChip,
7859
8178
  {
7860
8179
  padPitch,
@@ -7895,6 +8214,7 @@ export {
7895
8214
  GullWingBody,
7896
8215
  HC49,
7897
8216
  JSTPH2_0mm,
8217
+ JSTXH2_5mm,
7898
8218
  JSTZH1_5mm,
7899
8219
  LQFP,
7900
8220
  Led2835,
@@ -7928,6 +8248,7 @@ export {
7928
8248
  SOD723,
7929
8249
  SOD882,
7930
8250
  SOD923,
8251
+ SOT143,
7931
8252
  SOT223,
7932
8253
  SOT233P,
7933
8254
  SOT23W,
@@ -7947,6 +8268,7 @@ export {
7947
8268
  TO92,
7948
8269
  TQFP,
7949
8270
  Tssop,
8271
+ UsbCMidmount,
7950
8272
  VSSOP,
7951
8273
  resolveFlexScreenSize
7952
8274
  };