jscad-electronics 0.0.149 → 0.0.151

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
@@ -349,7 +349,7 @@ var BGA = ({
349
349
  }) => {
350
350
  const bodyHeight = packageHeight - standoffHeight;
351
351
  const bodyOffset = standoffHeight + bodyHeight / 2;
352
- const ballOffset = -standoffHeight / 2;
352
+ const ballOffset = Math.max(standoffHeight / 2, ballDiameter / 2);
353
353
  const ballsSoup = footprintString ? fp.string(footprintString).circuitJson() : null;
354
354
  return /* @__PURE__ */ jsxs10(Fragment10, { children: [
355
355
  /* @__PURE__ */ jsx10(Translate2, { z: bodyOffset, children: /* @__PURE__ */ jsx10(Colorize, { color: "#555", children: /* @__PURE__ */ jsx10(Cuboid10, { size: [packageWidth, packageLength, bodyHeight] }) }) }),
@@ -757,7 +757,8 @@ var ExtrudedPads = ({
757
757
  };
758
758
 
759
759
  // lib/Footprinter3d.tsx
760
- import { fp as fp3 } from "@tscircuit/footprinter";
760
+ import { fp as fp5 } from "@tscircuit/footprinter";
761
+ import { Rotate as Rotate18, Translate as Translate38 } from "jscad-fiber";
761
762
 
762
763
  // lib/DualInlinePackage.tsx
763
764
  import { Polygon as Polygon3, ExtrudeLinear as ExtrudeLinear3, Rotate as Rotate3, Translate as Translate6 } from "jscad-fiber";
@@ -2457,8 +2458,8 @@ var SMA = () => {
2457
2458
  import { Cuboid as Cuboid21, Colorize as Colorize14, Union as Union7, Hull as Hull9, Translate as Translate13 } from "jscad-fiber";
2458
2459
  import { Fragment as Fragment31, jsx as jsx35, jsxs as jsxs31 } from "react/jsx-runtime";
2459
2460
  var SMB = () => {
2460
- const bodyWidth = 4.4;
2461
- const bodyLength10 = 3.4;
2461
+ const bodyWidth = 4.6;
2462
+ const bodyLength10 = 4;
2462
2463
  const bodyHeight = 2.3;
2463
2464
  const padWidth = 1.45;
2464
2465
  const padThickness = 0.12;
@@ -2748,12 +2749,14 @@ var SOD123FL = () => {
2748
2749
  // lib/sod-123W.tsx
2749
2750
  import { Colorize as Colorize19, Cuboid as Cuboid26, Hull as Hull14, Translate as Translate18, Union as Union12 } from "jscad-fiber";
2750
2751
  import { Fragment as Fragment36, jsx as jsx40, jsxs as jsxs36 } from "react/jsx-runtime";
2751
- var SOD123W = () => {
2752
- const fullWidth = 2.6;
2753
- const bodyLength10 = 1.7;
2754
- const bodyHeight = 1;
2755
- const padWidth = 0.9;
2756
- const padLength = 0.9;
2752
+ var SOD123W = ({
2753
+ bodyWidth = 2.6,
2754
+ bodyLength: bodyLength10 = 1.7,
2755
+ bodyHeight = 1
2756
+ } = {}) => {
2757
+ const fullWidth = bodyWidth;
2758
+ const padWidth = bodyLength10 * 0.53;
2759
+ const padLength = bodyWidth * 0.35;
2757
2760
  const padThickness = 0.2;
2758
2761
  const leftPadCenterX = -(fullWidth / 2 - 0.075);
2759
2762
  const rightPadCenterX = fullWidth / 2 - 0.075;
@@ -3022,17 +3025,19 @@ var SOD923 = () => {
3022
3025
 
3023
3026
  // lib/SOT-223.tsx
3024
3027
  import { Fragment as Fragment40, jsx as jsx44, jsxs as jsxs40 } from "react/jsx-runtime";
3025
- var SOT223 = () => {
3026
- const fullWidth = 6.6;
3027
- const bodyWidth = 3.5;
3028
- const bodyLength10 = 6.5;
3029
- const bodyHeight = 1.7;
3030
- const leadWidth = 0.7;
3031
- const leftLeadWidth = 3;
3028
+ var SOT223 = ({
3029
+ fullWidth = 6.6,
3030
+ bodyWidth = 3.5,
3031
+ bodyLength: bodyLength10 = 6.5,
3032
+ bodyHeight = 1.7,
3033
+ leadWidth = 0.7,
3034
+ tabLeadWidth = 3,
3035
+ padPitch = 2.3,
3036
+ leadHeight = 0.75
3037
+ } = {}) => {
3038
+ const leftLeadWidth = tabLeadWidth;
3032
3039
  const leadThickness = 0.25;
3033
- const leadHeight = 0.75;
3034
3040
  const padContactLength = 0.5;
3035
- const padPitch = 2.3;
3036
3041
  const extendedBodyDistance = fullWidth - bodyWidth;
3037
3042
  return /* @__PURE__ */ jsxs40(Fragment40, { children: [
3038
3043
  /* @__PURE__ */ jsx44(
@@ -3914,85 +3919,73 @@ var MS013 = ({
3914
3919
  import {
3915
3920
  Colorize as Colorize27,
3916
3921
  Cuboid as Cuboid34,
3917
- Hull as Hull19,
3918
- Rotate as Rotate10,
3919
- Translate as Translate22,
3920
3922
  Cylinder as Cylinder7,
3921
- Subtract as Subtract4
3923
+ Rotate as Rotate10,
3924
+ Subtract as Subtract4,
3925
+ Translate as Translate22
3922
3926
  } from "jscad-fiber";
3923
3927
  import { Fragment as Fragment52, jsx as jsx56, jsxs as jsxs52 } from "react/jsx-runtime";
3924
- var TO220 = () => {
3925
- const fullLength10 = 20;
3926
- const bodyLength10 = 9.9;
3927
- const bodyHeight = 4.5;
3928
- const zOffset = 1;
3929
- const padWidth = 9.9;
3930
- const padLength = 6.5;
3931
- const padThickness = 1.3;
3932
- const padHoleDiameter = 3;
3933
- const prongWidth = 0.81;
3934
- const prongLength = 16;
3935
- const prongHeight = 0.5;
3936
- const prongPitch = 2.7;
3937
- const bodyWidth = padWidth;
3938
- const bodyFrontX = fullLength10 - bodyLength10 / 2;
3939
- const bodyBackX = fullLength10 + bodyLength10 / 2;
3940
- const prongCenterX = bodyFrontX - prongLength / 2;
3941
- const padCenterX = bodyBackX + padLength / 2;
3942
- return /* @__PURE__ */ jsx56(Translate22, { center: [0, 0, zOffset], children: /* @__PURE__ */ jsxs52(Fragment52, { children: [
3943
- /* @__PURE__ */ jsxs52(Rotate10, { rotation: [0, 55, -55], children: [
3944
- /* @__PURE__ */ jsxs52(Subtract4, { children: [
3945
- /* @__PURE__ */ jsx56(
3946
- Cuboid34,
3947
- {
3948
- color: "#ccc",
3949
- size: [padLength + 0.1, padWidth, padThickness],
3950
- center: [padCenterX, 0, padThickness - 2]
3951
- }
3952
- ),
3953
- /* @__PURE__ */ jsx56(
3954
- Cylinder7,
3955
- {
3956
- color: "black",
3957
- center: [padCenterX, 0, padThickness - 2],
3958
- radius: padHoleDiameter / 2,
3959
- height: padThickness * 1.2
3960
- }
3961
- )
3962
- ] }),
3963
- /* @__PURE__ */ jsx56(Colorize27, { color: "#222", children: /* @__PURE__ */ jsx56(
3964
- ChipBody,
3928
+ var TO220_DEFAULT_LEADS = [
3929
+ { x: -2.54, y: -1 },
3930
+ { x: 0, y: -1 },
3931
+ { x: 2.54, y: -1 }
3932
+ ];
3933
+ var TO220 = ({
3934
+ mouldedTab = false,
3935
+ leads = TO220_DEFAULT_LEADS,
3936
+ bodyWidth = 10,
3937
+ bodyThickness = 4.5,
3938
+ bodyHeight = 9.2,
3939
+ tabHeight = 6.4,
3940
+ tabThickness = 1.4,
3941
+ mountingHoleDiameter = 3.6,
3942
+ standoff = 3,
3943
+ leadLength = 3,
3944
+ bodyColor = "#222",
3945
+ tabColor = "#ccc",
3946
+ leadColor = "#d4b106"
3947
+ } = {}) => {
3948
+ const centerX = leads.reduce((sum, lead) => sum + lead.x, 0) / leads.length;
3949
+ const centerY = leads.reduce((sum, lead) => sum + lead.y, 0) / leads.length;
3950
+ const bodyBottom = standoff;
3951
+ const bodyTop = bodyBottom + bodyHeight;
3952
+ const tabTop = bodyTop + tabHeight;
3953
+ const tabY = centerY + (bodyThickness - tabThickness) / 2;
3954
+ const holeZ = tabTop - Math.max(mountingHoleDiameter * 0.8, 2.6);
3955
+ const leadWidth = 0.8;
3956
+ const leadThickness = 0.5;
3957
+ return /* @__PURE__ */ jsxs52(Fragment52, { children: [
3958
+ /* @__PURE__ */ jsx56(Colorize27, { color: bodyColor, children: /* @__PURE__ */ jsx56(
3959
+ Cuboid34,
3960
+ {
3961
+ size: [bodyWidth, bodyThickness, bodyHeight],
3962
+ center: [centerX, centerY, bodyBottom + bodyHeight / 2]
3963
+ }
3964
+ ) }),
3965
+ /* @__PURE__ */ jsx56(Colorize27, { color: mouldedTab ? bodyColor : tabColor, children: /* @__PURE__ */ jsxs52(Subtract4, { children: [
3966
+ /* @__PURE__ */ jsx56(
3967
+ Cuboid34,
3965
3968
  {
3966
- width: bodyWidth,
3967
- length: bodyLength10,
3968
- height: bodyHeight,
3969
- center: { x: fullLength10, y: 0, z: -2.4 },
3970
- includeNotch: false,
3971
- straightHeightRatio: 0.3,
3972
- taperRatio: 0.04,
3973
- heightAboveSurface: 1
3969
+ size: [bodyWidth, tabThickness, tabHeight],
3970
+ center: [centerX, tabY, bodyTop + tabHeight / 2]
3974
3971
  }
3975
- ) })
3976
- ] }),
3977
- /* @__PURE__ */ jsx56(Rotate10, { rotation: [0, 55, 55], children: Array.from({ length: 3 }).map((_, i) => {
3978
- const x = prongCenterX;
3979
- const y = (i - 1) * prongPitch;
3980
- const z = -prongHeight - 0.6;
3981
- return /* @__PURE__ */ jsxs52(Colorize27, { color: "gold", children: [
3982
- /* @__PURE__ */ jsxs52(Hull19, { children: [
3983
- /* @__PURE__ */ jsx56(Translate22, { center: [bodyFrontX - bodyHeight / 2 + 0.1, y, z], children: /* @__PURE__ */ jsx56(Cuboid34, { size: [bodyHeight, prongWidth + 1, prongHeight] }) }),
3984
- /* @__PURE__ */ jsx56(
3985
- Translate22,
3986
- {
3987
- center: [bodyFrontX - bodyHeight / 2 - 1 + 0.1, y, z],
3988
- children: /* @__PURE__ */ jsx56(Cuboid34, { size: [bodyHeight, prongWidth, prongHeight] })
3989
- }
3990
- )
3991
- ] }),
3992
- /* @__PURE__ */ jsx56(Translate22, { center: [x, y, z], children: /* @__PURE__ */ jsx56(Cuboid34, { size: [prongLength + 0.1, prongWidth, prongHeight] }) })
3993
- ] }, `prong-${i}`);
3994
- }) })
3995
- ] }) });
3972
+ ),
3973
+ /* @__PURE__ */ jsx56(Rotate10, { rotation: ["90deg", 0, 0], children: /* @__PURE__ */ jsx56(Translate22, { center: [centerX, holeZ, -tabY], children: /* @__PURE__ */ jsx56(
3974
+ Cylinder7,
3975
+ {
3976
+ radius: mountingHoleDiameter / 2,
3977
+ height: tabThickness * 3
3978
+ }
3979
+ ) }) })
3980
+ ] }) }),
3981
+ leads.map((lead) => /* @__PURE__ */ jsx56(Colorize27, { color: leadColor, children: /* @__PURE__ */ jsx56(
3982
+ Cuboid34,
3983
+ {
3984
+ size: [leadWidth, leadThickness, standoff + leadLength],
3985
+ center: [lead.x, lead.y, (standoff - leadLength) / 2]
3986
+ }
3987
+ ) }, `lead-${lead.x}-${lead.y}`))
3988
+ ] });
3996
3989
  };
3997
3990
 
3998
3991
  // lib/SOT-457.tsx
@@ -4196,50 +4189,106 @@ var SOT963 = () => {
4196
4189
  import {
4197
4190
  Colorize as Colorize28,
4198
4191
  Cuboid as Cuboid36,
4199
- Hull as Hull20,
4192
+ Hull as Hull19,
4200
4193
  Translate as Translate23,
4201
4194
  Cylinder as Cylinder8,
4202
4195
  Subtract as Subtract5
4203
4196
  } from "jscad-fiber";
4204
- import { jsx as jsx59, jsxs as jsxs55 } from "react/jsx-runtime";
4205
- var TO92 = () => {
4206
- const bodyRadius = 2.4;
4207
- const bodyHeight = 4.5;
4208
- const flatCut = 1.1;
4197
+ import { Fragment as Fragment55, jsx as jsx59, jsxs as jsxs55 } from "react/jsx-runtime";
4198
+ var TO92_DEFAULT_LEADS = [
4199
+ { x: -1.27, y: 0.98 },
4200
+ { x: 0, y: 2.25 },
4201
+ { x: 1.27, y: 0.98 }
4202
+ ];
4203
+ var splitOuterLeads = (leads) => {
4204
+ let outer = [leads[0], leads[leads.length - 1]];
4205
+ let best = -1;
4206
+ for (let i = 0; i < leads.length; i++) {
4207
+ for (let j = i + 1; j < leads.length; j++) {
4208
+ const separation = Math.hypot(
4209
+ leads[i].x - leads[j].x,
4210
+ leads[i].y - leads[j].y
4211
+ );
4212
+ if (separation > best) {
4213
+ best = separation;
4214
+ outer = [leads[i], leads[j]];
4215
+ }
4216
+ }
4217
+ }
4218
+ return { outer, separation: best };
4219
+ };
4220
+ var TO92 = ({
4221
+ bodyDiameter = 4.8,
4222
+ bodyHeight = 4.5,
4223
+ flatCut = 1.1,
4224
+ leads = TO92_DEFAULT_LEADS,
4225
+ standoff = 1.5,
4226
+ leadLength = 3,
4227
+ bodyColor = "#222"
4228
+ } = {}) => {
4229
+ const bodyRadius = bodyDiameter / 2;
4209
4230
  const legWidth = 0.4;
4210
4231
  const legThickness = 0.25;
4211
- const bodyZ = bodyHeight / 2;
4212
- const bodyColor = "#222";
4213
- const leadLength = 0.43;
4214
- const leadTipSize = [leadLength, legWidth, 1.32];
4215
- const leadSmallSize = [
4216
- leadLength,
4232
+ const { outer, separation } = splitOuterLeads(leads);
4233
+ const [first, last] = outer;
4234
+ const bodyCenter = {
4235
+ x: (first.x + last.x) / 2,
4236
+ y: (first.y + last.y) / 2
4237
+ };
4238
+ const axisLength = Math.max(separation, 1e-3);
4239
+ const axis = {
4240
+ x: (last.x - first.x) / axisLength,
4241
+ y: (last.y - first.y) / axisLength
4242
+ };
4243
+ const exitPitch = separation / 2;
4244
+ const exitFor = (index) => {
4245
+ const offset = (index - (leads.length - 1) / 2) * exitPitch;
4246
+ return {
4247
+ x: bodyCenter.x + axis.x * offset,
4248
+ y: bodyCenter.y + axis.y * offset
4249
+ };
4250
+ };
4251
+ const leadSize = [
4252
+ legThickness,
4217
4253
  legWidth,
4218
4254
  legThickness
4219
4255
  ];
4220
- const leadTipPos1 = [0, 0, -0.66];
4221
- const leadMidPosA = [0, 0, -1.32];
4222
- const leadMidPosB = [0, 1.28, -2.72];
4223
- const leadTipPos2 = [0, 1.28, -8.9];
4224
- const sideLeadZ = -7.5;
4225
- return /* @__PURE__ */ jsxs55(Translate23, { center: [0, 1, 10.5], children: [
4256
+ return /* @__PURE__ */ jsxs55(Fragment55, { children: [
4226
4257
  /* @__PURE__ */ jsx59(Colorize28, { color: bodyColor, children: /* @__PURE__ */ jsxs55(Subtract5, { children: [
4227
- /* @__PURE__ */ jsx59(Translate23, { center: [0, 0, bodyZ], children: /* @__PURE__ */ jsx59(Cylinder8, { radius: bodyRadius, height: bodyHeight }) }),
4228
- /* @__PURE__ */ jsx59(Translate23, { center: [0, -(bodyRadius - flatCut / 2), bodyZ], children: /* @__PURE__ */ jsx59(Cuboid36, { size: [bodyRadius * 2, flatCut, bodyHeight + 0.2] }) })
4258
+ /* @__PURE__ */ jsx59(
4259
+ Translate23,
4260
+ {
4261
+ center: [bodyCenter.x, bodyCenter.y, standoff + bodyHeight / 2],
4262
+ children: /* @__PURE__ */ jsx59(Cylinder8, { radius: bodyRadius, height: bodyHeight })
4263
+ }
4264
+ ),
4265
+ /* @__PURE__ */ jsx59(
4266
+ Translate23,
4267
+ {
4268
+ center: [
4269
+ bodyCenter.x,
4270
+ bodyCenter.y - (bodyRadius - flatCut / 2),
4271
+ standoff + bodyHeight / 2
4272
+ ],
4273
+ children: /* @__PURE__ */ jsx59(Cuboid36, { size: [bodyRadius * 2, flatCut, bodyHeight + 0.2] })
4274
+ }
4275
+ )
4229
4276
  ] }) }),
4230
- /* @__PURE__ */ jsx59(Translate23, { center: leadTipPos1, children: /* @__PURE__ */ jsx59(Cuboid36, { size: leadTipSize }) }),
4231
- /* @__PURE__ */ jsxs55(Hull20, { children: [
4232
- /* @__PURE__ */ jsx59(Translate23, { center: leadMidPosA, children: /* @__PURE__ */ jsx59(Cuboid36, { size: leadSmallSize }) }),
4233
- /* @__PURE__ */ jsx59(Translate23, { center: leadMidPosB, children: /* @__PURE__ */ jsx59(Cuboid36, { size: leadSmallSize }) })
4234
- ] }),
4235
- /* @__PURE__ */ jsx59(Translate23, { center: leadTipPos2, children: /* @__PURE__ */ jsx59(Cuboid36, { size: [leadLength, legWidth, 12.2] }) }),
4236
- /* @__PURE__ */ jsx59(Translate23, { center: [1.3, 0, sideLeadZ], children: /* @__PURE__ */ jsx59(Cuboid36, { size: [leadLength, legWidth, 15] }) }),
4237
- /* @__PURE__ */ jsx59(Translate23, { center: [-1.3, 0, sideLeadZ], children: /* @__PURE__ */ jsx59(Cuboid36, { size: [leadLength, legWidth, 15] }) })
4277
+ leads.map((lead, index) => {
4278
+ const exit = exitFor(index);
4279
+ return /* @__PURE__ */ jsxs55(Translate23, { center: [0, 0, 0], children: [
4280
+ /* @__PURE__ */ jsxs55(Hull19, { children: [
4281
+ /* @__PURE__ */ jsx59(Translate23, { center: [lead.x, lead.y, 0], children: /* @__PURE__ */ jsx59(Cuboid36, { size: leadSize }) }),
4282
+ /* @__PURE__ */ jsx59(Translate23, { center: [exit.x, exit.y, standoff], children: /* @__PURE__ */ jsx59(Cuboid36, { size: leadSize }) })
4283
+ ] }),
4284
+ /* @__PURE__ */ jsx59(Translate23, { center: [lead.x, lead.y, -leadLength / 2], children: /* @__PURE__ */ jsx59(Cuboid36, { size: [legThickness, legWidth, leadLength] }) })
4285
+ ] }, `lead-${lead.x}-${lead.y}`);
4286
+ })
4238
4287
  ] });
4239
4288
  };
4240
4289
 
4241
4290
  // lib/SOT-363.tsx
4242
- import { Fragment as Fragment55, jsx as jsx60, jsxs as jsxs56 } from "react/jsx-runtime";
4291
+ import { Fragment as Fragment56, jsx as jsx60, jsxs as jsxs56 } from "react/jsx-runtime";
4243
4292
  var SOT363 = () => {
4244
4293
  const fullWidth = 2;
4245
4294
  const bodyWidth = 1.25;
@@ -4250,7 +4299,7 @@ var SOT363 = () => {
4250
4299
  const leadHeight = 0.85;
4251
4300
  const padContactLength = 0.3;
4252
4301
  const extendedBodyDistance = fullWidth - bodyWidth;
4253
- return /* @__PURE__ */ jsxs56(Fragment55, { children: [
4302
+ return /* @__PURE__ */ jsxs56(Fragment56, { children: [
4254
4303
  /* @__PURE__ */ jsx60(
4255
4304
  SmdChipLead,
4256
4305
  {
@@ -4372,7 +4421,7 @@ var SOT_363_default = SOT363;
4372
4421
 
4373
4422
  // lib/SOT-886.tsx
4374
4423
  import { Cuboid as Cuboid37 } from "jscad-fiber";
4375
- import { Fragment as Fragment56, jsx as jsx61, jsxs as jsxs57 } from "react/jsx-runtime";
4424
+ import { Fragment as Fragment57, jsx as jsx61, jsxs as jsxs57 } from "react/jsx-runtime";
4376
4425
  var SOT886 = () => {
4377
4426
  const bodyWidth = 1;
4378
4427
  const bodyLength10 = 1.45;
@@ -4383,7 +4432,7 @@ var SOT886 = () => {
4383
4432
  const pitch = 0.5;
4384
4433
  const pinsPerSide = 3;
4385
4434
  const pinSpan = pitch * (pinsPerSide - 1);
4386
- return /* @__PURE__ */ jsxs57(Fragment56, { children: [
4435
+ return /* @__PURE__ */ jsxs57(Fragment57, { children: [
4387
4436
  /* @__PURE__ */ jsx61(
4388
4437
  ChipBody,
4389
4438
  {
@@ -4432,11 +4481,11 @@ var SOT886 = () => {
4432
4481
 
4433
4482
  // lib/sod-323.tsx
4434
4483
  import { Colorize as Colorize29, Cuboid as Cuboid38 } from "jscad-fiber";
4435
- import { Fragment as Fragment57, jsx as jsx62, jsxs as jsxs58 } from "react/jsx-runtime";
4484
+ import { Fragment as Fragment58, jsx as jsx62, jsxs as jsxs58 } from "react/jsx-runtime";
4436
4485
  var SOD323 = () => {
4437
4486
  const fullWidth = 2.5;
4438
- const bodyLength10 = 1.25;
4439
- const bodyWidth = 1.7;
4487
+ const bodyLength10 = 1.4;
4488
+ const bodyWidth = 1.8;
4440
4489
  const bodyHeight = 0.95;
4441
4490
  const leadWidth = 0.3;
4442
4491
  const leadThickness = 0.175;
@@ -4444,7 +4493,7 @@ var SOD323 = () => {
4444
4493
  const padCenterX = bodyWidth / 2;
4445
4494
  const bodyDistance = 0.45;
4446
4495
  const leadHeight = 0.7;
4447
- return /* @__PURE__ */ jsxs58(Fragment57, { children: [
4496
+ return /* @__PURE__ */ jsxs58(Fragment58, { children: [
4448
4497
  /* @__PURE__ */ jsx62(
4449
4498
  SmdChipLead,
4450
4499
  {
@@ -4503,8 +4552,8 @@ var SOD323 = () => {
4503
4552
  };
4504
4553
 
4505
4554
  // lib/sod-323F.tsx
4506
- import { Colorize as Colorize30, Cuboid as Cuboid39, Hull as Hull22, Translate as Translate25, Union as Union17 } from "jscad-fiber";
4507
- import { Fragment as Fragment58, jsx as jsx63, jsxs as jsxs59 } from "react/jsx-runtime";
4555
+ import { Colorize as Colorize30, Cuboid as Cuboid39, Hull as Hull21, Translate as Translate25, Union as Union17 } from "jscad-fiber";
4556
+ import { Fragment as Fragment59, jsx as jsx63, jsxs as jsxs59 } from "react/jsx-runtime";
4508
4557
  var SOD323F = () => {
4509
4558
  const fullWidth = 1.7;
4510
4559
  const bodyLength10 = 1.25;
@@ -4516,7 +4565,7 @@ var SOD323F = () => {
4516
4565
  const rightPadCenterX = fullWidth / 2 + padLength / 2;
4517
4566
  const taperOffset = 0.2;
4518
4567
  const straightHeight = padThickness;
4519
- return /* @__PURE__ */ jsxs59(Fragment58, { children: [
4568
+ return /* @__PURE__ */ jsxs59(Fragment59, { children: [
4520
4569
  /* @__PURE__ */ jsx63(
4521
4570
  Cuboid39,
4522
4571
  {
@@ -4535,7 +4584,7 @@ var SOD323F = () => {
4535
4584
  ),
4536
4585
  /* @__PURE__ */ jsx63(Colorize30, { color: "#222", children: /* @__PURE__ */ jsxs59(Union17, { children: [
4537
4586
  /* @__PURE__ */ jsx63(Translate25, { z: straightHeight / 2, children: /* @__PURE__ */ jsx63(Cuboid39, { size: [fullWidth, bodyLength10, straightHeight] }) }),
4538
- /* @__PURE__ */ jsxs59(Hull22, { children: [
4587
+ /* @__PURE__ */ jsxs59(Hull21, { children: [
4539
4588
  /* @__PURE__ */ jsx63(Translate25, { z: straightHeight, children: /* @__PURE__ */ jsx63(Cuboid39, { size: [fullWidth, bodyLength10, 0.01] }) }),
4540
4589
  /* @__PURE__ */ jsx63(Translate25, { z: bodyHeight, children: /* @__PURE__ */ jsx63(
4541
4590
  Cuboid39,
@@ -4558,7 +4607,7 @@ var SOD323F = () => {
4558
4607
 
4559
4608
  // lib/sod-323FL.tsx
4560
4609
  import { Colorize as Colorize31, Cuboid as Cuboid40 } from "jscad-fiber";
4561
- import { Fragment as Fragment59, jsx as jsx64, jsxs as jsxs60 } from "react/jsx-runtime";
4610
+ import { Fragment as Fragment60, jsx as jsx64, jsxs as jsxs60 } from "react/jsx-runtime";
4562
4611
  var SOD323FL = () => {
4563
4612
  const fullWidth = 1.775;
4564
4613
  const bodyLength10 = 1.25;
@@ -4569,7 +4618,7 @@ var SOD323FL = () => {
4569
4618
  const leftPadCenterX = -fullWidth / 2 - padLength / 2 + 0.04;
4570
4619
  const rightPadCenterX = fullWidth / 2 + padLength / 2 - 0.04;
4571
4620
  const taperOffset = 0.2;
4572
- return /* @__PURE__ */ jsxs60(Fragment59, { children: [
4621
+ return /* @__PURE__ */ jsxs60(Fragment60, { children: [
4573
4622
  /* @__PURE__ */ jsx64(
4574
4623
  Cuboid40,
4575
4624
  {
@@ -4612,10 +4661,10 @@ var SOD323FL = () => {
4612
4661
 
4613
4662
  // lib/AxialCapacitor.tsx
4614
4663
  import { Colorize as Colorize32, Cylinder as Cylinder9, Rotate as Rotate11, Sphere as Sphere2, Translate as Translate27 } from "jscad-fiber";
4615
- import { Fragment as Fragment60, jsx as jsx65, jsxs as jsxs61 } from "react/jsx-runtime";
4664
+ import { Fragment as Fragment61, jsx as jsx65, jsxs as jsxs61 } from "react/jsx-runtime";
4616
4665
  var AxialCapacitor = ({ pitch = 10 }) => {
4617
4666
  const heightToCenterOfCapacitor = 0.5 + 4 / 2;
4618
- return /* @__PURE__ */ jsxs61(Fragment60, { children: [
4667
+ return /* @__PURE__ */ jsxs61(Fragment61, { children: [
4619
4668
  /* @__PURE__ */ jsx65(Cylinder9, { height: 4, radius: 0.5, center: [-pitch / 2, 0, 0.5] }),
4620
4669
  /* @__PURE__ */ jsx65(
4621
4670
  Sphere2,
@@ -4649,7 +4698,7 @@ var AxialCapacitor = ({ pitch = 10 }) => {
4649
4698
 
4650
4699
  // lib/stampboard.tsx
4651
4700
  import { Colorize as Colorize33, Cuboid as Cuboid41, Cylinder as Cylinder10, Subtract as Subtract6, Union as Union19 } from "jscad-fiber";
4652
- import { Fragment as Fragment61, jsx as jsx66, jsxs as jsxs62 } from "react/jsx-runtime";
4701
+ import { Fragment as Fragment62, jsx as jsx66, jsxs as jsxs62 } from "react/jsx-runtime";
4653
4702
  var StampBoard = ({
4654
4703
  bodyWidth = 21,
4655
4704
  boardThickness = 0.5,
@@ -4782,7 +4831,7 @@ var StampBoard = ({
4782
4831
  },
4783
4832
  index
4784
4833
  ));
4785
- return /* @__PURE__ */ jsxs62(Fragment61, { children: [
4834
+ return /* @__PURE__ */ jsxs62(Fragment62, { children: [
4786
4835
  boardBody,
4787
4836
  /* @__PURE__ */ jsx66(Colorize33, { color: "#FFD700", children: innerHoles ? /* @__PURE__ */ jsxs62(Subtract6, { children: [
4788
4837
  /* @__PURE__ */ jsx66(Union19, { children: pads.map((pad, index) => /* @__PURE__ */ jsx66(
@@ -4867,7 +4916,7 @@ var Screen = ({
4867
4916
  var Display = Screen;
4868
4917
 
4869
4918
  // lib/MountedPcbModule.tsx
4870
- import { Fragment as Fragment62, jsx as jsx68, jsxs as jsxs64 } from "react/jsx-runtime";
4919
+ import { Fragment as Fragment63, jsx as jsx68, jsxs as jsxs64 } from "react/jsx-runtime";
4871
4920
  var MountedPcbModule = ({
4872
4921
  numPins = 5,
4873
4922
  rows = 1,
@@ -5035,7 +5084,7 @@ var MountedPcbModule = ({
5035
5084
  },
5036
5085
  `female-pin-3d-${index}`
5037
5086
  ));
5038
- return /* @__PURE__ */ jsxs64(Fragment62, { children: [
5087
+ return /* @__PURE__ */ jsxs64(Fragment63, { children: [
5039
5088
  boardBody,
5040
5089
  platedHoles,
5041
5090
  !female && !nopin && headerPins,
@@ -5056,8 +5105,8 @@ var MountedPcbModule = ({
5056
5105
  };
5057
5106
 
5058
5107
  // lib/SOD723.tsx
5059
- import { Colorize as Colorize36, Cuboid as Cuboid44, Hull as Hull24, Translate as Translate29, Union as Union20 } from "jscad-fiber";
5060
- import { Fragment as Fragment63, jsx as jsx69, jsxs as jsxs65 } from "react/jsx-runtime";
5108
+ import { Colorize as Colorize36, Cuboid as Cuboid44, Hull as Hull23, Translate as Translate29, Union as Union20 } from "jscad-fiber";
5109
+ import { Fragment as Fragment64, jsx as jsx69, jsxs as jsxs65 } from "react/jsx-runtime";
5061
5110
  var SOD723 = () => {
5062
5111
  const fullWidth = 1.4;
5063
5112
  const bodyLength10 = 0.6;
@@ -5070,7 +5119,7 @@ var SOD723 = () => {
5070
5119
  const rightPadCenterX = bodyWidth / 2 - padLength / 2 + 0.15;
5071
5120
  const taperOffset = 0.2;
5072
5121
  const straightHeight = bodyHeight * 0.24;
5073
- return /* @__PURE__ */ jsxs65(Fragment63, { children: [
5122
+ return /* @__PURE__ */ jsxs65(Fragment64, { children: [
5074
5123
  /* @__PURE__ */ jsx69(
5075
5124
  Cuboid44,
5076
5125
  {
@@ -5089,7 +5138,7 @@ var SOD723 = () => {
5089
5138
  ),
5090
5139
  /* @__PURE__ */ jsx69(Colorize36, { color: "#222", children: /* @__PURE__ */ jsxs65(Union20, { children: [
5091
5140
  /* @__PURE__ */ jsx69(Translate29, { z: straightHeight / 2, children: /* @__PURE__ */ jsx69(Cuboid44, { size: [bodyWidth, bodyLength10, straightHeight] }) }),
5092
- /* @__PURE__ */ jsxs65(Hull24, { children: [
5141
+ /* @__PURE__ */ jsxs65(Hull23, { children: [
5093
5142
  /* @__PURE__ */ jsx69(Translate29, { z: straightHeight, children: /* @__PURE__ */ jsx69(Cuboid44, { size: [bodyWidth, bodyLength10, 0.01] }) }),
5094
5143
  /* @__PURE__ */ jsx69(Translate29, { z: bodyHeight, children: /* @__PURE__ */ jsx69(
5095
5144
  Cuboid44,
@@ -5120,7 +5169,7 @@ import {
5120
5169
  Subtract as Subtract9,
5121
5170
  Translate as Translate30
5122
5171
  } from "jscad-fiber";
5123
- import { Fragment as Fragment64, jsx as jsx70, jsxs as jsxs66 } from "react/jsx-runtime";
5172
+ import { Fragment as Fragment65, jsx as jsx70, jsxs as jsxs66 } from "react/jsx-runtime";
5124
5173
  var JSTZH1_5mm = ({
5125
5174
  numPins = 7,
5126
5175
  showPins = true,
@@ -5136,7 +5185,7 @@ var JSTZH1_5mm = ({
5136
5185
  const pinLength = 6;
5137
5186
  const bodyWidth = (numPins - 1) * pitch + 4;
5138
5187
  const startX = -((numPins - 1) * pitch) / 2;
5139
- return /* @__PURE__ */ jsxs66(Fragment64, { children: [
5188
+ return /* @__PURE__ */ jsxs66(Fragment65, { children: [
5140
5189
  /* @__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: [
5141
5190
  /* @__PURE__ */ jsx70(
5142
5191
  Cuboid45,
@@ -5270,17 +5319,205 @@ var JSTZH1_5mm = ({
5270
5319
  ] });
5271
5320
  };
5272
5321
 
5273
- // lib/FPC.tsx
5322
+ // lib/JSTPH2_0mm.tsx
5274
5323
  import {
5275
5324
  Colorize as Colorize38,
5276
5325
  Cuboid as Cuboid46,
5277
5326
  Cylinder as Cylinder13,
5278
5327
  Rotate as Rotate13,
5279
- RoundedCuboid as RoundedCuboid3,
5280
5328
  Subtract as Subtract10,
5281
5329
  Translate as Translate31
5282
5330
  } from "jscad-fiber";
5283
- import { Fragment as Fragment65, jsx as jsx71, jsxs as jsxs67 } from "react/jsx-runtime";
5331
+ import { Fragment as Fragment66, jsx as jsx71, jsxs as jsxs67 } from "react/jsx-runtime";
5332
+ var JSTPH2_0mm = ({
5333
+ numPins = 2,
5334
+ showPins = true,
5335
+ showFootprint = true,
5336
+ bodyColor = "#f5f5f5",
5337
+ pinColor = "#635959"
5338
+ }) => {
5339
+ const pitch = 2;
5340
+ const bodyHeight = 6;
5341
+ const bodyDepth = 4.5;
5342
+ const wallThickness = 0.5;
5343
+ const hollowHeight = bodyHeight * 0.6;
5344
+ const pinTailLength = 3.4;
5345
+ const pinTop = 5.5;
5346
+ const pinThickness = 0.5;
5347
+ const pinLength = pinTailLength + pinTop;
5348
+ const bodyWidth = (numPins - 1) * pitch + 3.9;
5349
+ const startX = -((numPins - 1) * pitch) / 2;
5350
+ const latchWindowWidth = 1;
5351
+ const latchWindowHeight = 1.8;
5352
+ const latchWindowInset = 0.7;
5353
+ const topReliefWidth = 0.8;
5354
+ const topReliefDepth = 0.65;
5355
+ return /* @__PURE__ */ jsxs67(Fragment66, { children: [
5356
+ /* @__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: [
5357
+ /* @__PURE__ */ jsx71(
5358
+ Cuboid46,
5359
+ {
5360
+ size: [bodyWidth, bodyDepth, bodyHeight],
5361
+ center: [0, 0, bodyHeight / 2]
5362
+ }
5363
+ ),
5364
+ /* @__PURE__ */ jsx71(
5365
+ Cuboid46,
5366
+ {
5367
+ size: [
5368
+ bodyWidth - wallThickness * 2,
5369
+ bodyDepth - wallThickness * 2,
5370
+ hollowHeight
5371
+ ],
5372
+ center: [0, 0, hollowHeight / 2]
5373
+ }
5374
+ ),
5375
+ /* @__PURE__ */ jsx71(
5376
+ Cuboid46,
5377
+ {
5378
+ size: [bodyWidth, bodyDepth / 3, hollowHeight],
5379
+ center: [0, 0, hollowHeight / 6]
5380
+ }
5381
+ ),
5382
+ /* @__PURE__ */ jsx71(
5383
+ Cuboid46,
5384
+ {
5385
+ size: [
5386
+ bodyWidth - wallThickness * 2,
5387
+ wallThickness / 2,
5388
+ hollowHeight
5389
+ ],
5390
+ center: [
5391
+ 0,
5392
+ bodyDepth / 2 - wallThickness / 4,
5393
+ hollowHeight / 2
5394
+ ]
5395
+ }
5396
+ ),
5397
+ /* @__PURE__ */ jsx71(
5398
+ Cuboid46,
5399
+ {
5400
+ size: [
5401
+ bodyWidth - wallThickness * 2,
5402
+ wallThickness / 2,
5403
+ hollowHeight
5404
+ ],
5405
+ center: [
5406
+ 0,
5407
+ -bodyDepth / 2 + wallThickness / 4,
5408
+ hollowHeight / 2
5409
+ ]
5410
+ }
5411
+ ),
5412
+ /* @__PURE__ */ jsx71(
5413
+ Cuboid46,
5414
+ {
5415
+ size: [
5416
+ latchWindowWidth,
5417
+ bodyDepth + wallThickness,
5418
+ latchWindowHeight
5419
+ ],
5420
+ center: [-bodyWidth / 2 + latchWindowInset, 0, bodyHeight / 2]
5421
+ }
5422
+ ),
5423
+ /* @__PURE__ */ jsx71(
5424
+ Cuboid46,
5425
+ {
5426
+ size: [
5427
+ latchWindowWidth,
5428
+ bodyDepth + wallThickness,
5429
+ latchWindowHeight
5430
+ ],
5431
+ center: [bodyWidth / 2 - latchWindowInset, 0, bodyHeight / 2]
5432
+ }
5433
+ ),
5434
+ /* @__PURE__ */ jsx71(
5435
+ Cuboid46,
5436
+ {
5437
+ size: [wallThickness * 3, topReliefWidth, topReliefDepth],
5438
+ center: [-bodyWidth / 2, 0, topReliefDepth / 2]
5439
+ }
5440
+ ),
5441
+ /* @__PURE__ */ jsx71(Translate31, { offset: [-bodyWidth / 2, 0, topReliefDepth], children: /* @__PURE__ */ jsx71(Rotate13, { angles: [0, Math.PI / 2, 0], children: /* @__PURE__ */ jsx71(
5442
+ Cylinder13,
5443
+ {
5444
+ height: wallThickness * 3,
5445
+ radius: topReliefWidth / 2
5446
+ }
5447
+ ) }) }),
5448
+ /* @__PURE__ */ jsx71(
5449
+ Cuboid46,
5450
+ {
5451
+ size: [wallThickness * 3, topReliefWidth, topReliefDepth],
5452
+ center: [bodyWidth / 2, 0, topReliefDepth / 2]
5453
+ }
5454
+ ),
5455
+ /* @__PURE__ */ jsx71(Translate31, { offset: [bodyWidth / 2, 0, topReliefDepth], children: /* @__PURE__ */ jsx71(Rotate13, { angles: [0, Math.PI / 2, 0], children: /* @__PURE__ */ jsx71(
5456
+ Cylinder13,
5457
+ {
5458
+ height: wallThickness * 3,
5459
+ radius: topReliefWidth / 2
5460
+ }
5461
+ ) }) })
5462
+ ] }) }) }) }),
5463
+ showPins && Array.from({ length: numPins }).map((_, i) => /* @__PURE__ */ jsx71(Colorize38, { color: pinColor, children: /* @__PURE__ */ jsx71(
5464
+ Cuboid46,
5465
+ {
5466
+ size: [pinThickness, pinThickness, pinLength],
5467
+ center: [startX + i * pitch, 0, (pinTop - pinTailLength) / 2]
5468
+ }
5469
+ ) }, i)),
5470
+ showFootprint && Array.from({ length: numPins }).map((_, i) => {
5471
+ const isPin1 = i === 0;
5472
+ const hole = isPin1 ? {
5473
+ type: "pcb_plated_hole",
5474
+ pcb_plated_hole_id: `jstph_${i}`,
5475
+ shape: "circular_hole_with_rect_pad",
5476
+ x: startX + i * pitch,
5477
+ y: 0,
5478
+ hole_diameter: 0.73,
5479
+ rect_pad_width: 1.2,
5480
+ rect_pad_height: 1.2,
5481
+ hole_shape: "circle",
5482
+ pad_shape: "rect",
5483
+ layers: ["top", "bottom"],
5484
+ port_hints: [`${i + 1}`]
5485
+ } : {
5486
+ type: "pcb_plated_hole",
5487
+ pcb_plated_hole_id: `jstph_${i}`,
5488
+ shape: "pill",
5489
+ x: startX + i * pitch,
5490
+ y: 0,
5491
+ hole_height: 0.73,
5492
+ hole_width: 0.73,
5493
+ outer_height: 1.2,
5494
+ outer_width: 1.2,
5495
+ layers: ["top", "bottom"],
5496
+ port_hints: [`${i + 1}`]
5497
+ };
5498
+ return /* @__PURE__ */ jsx71(
5499
+ FootprintPlatedHole,
5500
+ {
5501
+ hole,
5502
+ isPin1
5503
+ },
5504
+ `footprint_${i}`
5505
+ );
5506
+ })
5507
+ ] });
5508
+ };
5509
+
5510
+ // lib/FPC.tsx
5511
+ import {
5512
+ Colorize as Colorize39,
5513
+ Cuboid as Cuboid47,
5514
+ Cylinder as Cylinder14,
5515
+ Rotate as Rotate14,
5516
+ RoundedCuboid as RoundedCuboid3,
5517
+ Subtract as Subtract11,
5518
+ Translate as Translate32
5519
+ } from "jscad-fiber";
5520
+ import { Fragment as Fragment67, jsx as jsx72, jsxs as jsxs68 } from "react/jsx-runtime";
5284
5521
  var HOUSING_COLOR = "#303339";
5285
5522
  var HOUSING_SHADOW = "#1f2227";
5286
5523
  var ACTUATOR_COLOR = "#eee8d8";
@@ -5367,9 +5604,9 @@ var FPC = ({
5367
5604
  const clipCapX = bodyWidth / 2 - 0.23;
5368
5605
  const sideBossX = bodyWidth / 2 - 0.32;
5369
5606
  const sideBossWidth = 0.68;
5370
- return /* @__PURE__ */ jsxs67(Fragment65, { children: [
5371
- [-1, 1].map((direction) => /* @__PURE__ */ jsx71(
5372
- Cuboid46,
5607
+ return /* @__PURE__ */ jsxs68(Fragment67, { children: [
5608
+ [-1, 1].map((direction) => /* @__PURE__ */ jsx72(
5609
+ Cuboid47,
5373
5610
  {
5374
5611
  color: TIN_COLOR,
5375
5612
  center: [direction * endClipX, mountY, 0.07],
@@ -5377,8 +5614,8 @@ var FPC = ({
5377
5614
  },
5378
5615
  `mount-pad:${direction}`
5379
5616
  )),
5380
- contactRows.map((contact) => /* @__PURE__ */ jsx71(
5381
- Cuboid46,
5617
+ contactRows.map((contact) => /* @__PURE__ */ jsx72(
5618
+ Cuboid47,
5382
5619
  {
5383
5620
  color: TIN_COLOR,
5384
5621
  center: [contact.x, terminalCenterY, 0.065],
@@ -5386,7 +5623,7 @@ var FPC = ({
5386
5623
  },
5387
5624
  `terminal:${contact.index}`
5388
5625
  )),
5389
- /* @__PURE__ */ jsx71(
5626
+ /* @__PURE__ */ jsx72(
5390
5627
  RoundedCuboid3,
5391
5628
  {
5392
5629
  color: HOUSING_SHADOW,
@@ -5395,8 +5632,8 @@ var FPC = ({
5395
5632
  roundRadius: 0.1
5396
5633
  }
5397
5634
  ),
5398
- /* @__PURE__ */ jsx71(Colorize38, { color: HOUSING_COLOR, children: /* @__PURE__ */ jsxs67(Subtract10, { children: [
5399
- /* @__PURE__ */ jsx71(
5635
+ /* @__PURE__ */ jsx72(Colorize39, { color: HOUSING_COLOR, children: /* @__PURE__ */ jsxs68(Subtract11, { children: [
5636
+ /* @__PURE__ */ jsx72(
5400
5637
  RoundedCuboid3,
5401
5638
  {
5402
5639
  center: [0, housingCenterY, housingBaseHeight + housingHeight / 2],
@@ -5404,22 +5641,22 @@ var FPC = ({
5404
5641
  roundRadius: 0.14
5405
5642
  }
5406
5643
  ),
5407
- /* @__PURE__ */ jsx71(
5408
- Cuboid46,
5644
+ /* @__PURE__ */ jsx72(
5645
+ Cuboid47,
5409
5646
  {
5410
5647
  center: [0, throatCenterY, throatCenterZ],
5411
5648
  size: [openingWidth, throatDepth, throatHeight]
5412
5649
  }
5413
5650
  ),
5414
- /* @__PURE__ */ jsx71(
5415
- Cuboid46,
5651
+ /* @__PURE__ */ jsx72(
5652
+ Cuboid47,
5416
5653
  {
5417
5654
  center: [0, actuatorCenterY, overallHeight - actuatorHeight * 0.72],
5418
5655
  size: [actuatorWidth - 0.32, actuatorDepth - 0.16, actuatorHeight]
5419
5656
  }
5420
5657
  )
5421
5658
  ] }) }),
5422
- contactRows.map((contact) => /* @__PURE__ */ jsx71(
5659
+ contactRows.map((contact) => /* @__PURE__ */ jsx72(
5423
5660
  RoundedCuboid3,
5424
5661
  {
5425
5662
  color: TIN_HIGHLIGHT,
@@ -5429,8 +5666,8 @@ var FPC = ({
5429
5666
  },
5430
5667
  `spring:${contact.index}`
5431
5668
  )),
5432
- contactRows.map((contact) => /* @__PURE__ */ jsx71(
5433
- Cuboid46,
5669
+ contactRows.map((contact) => /* @__PURE__ */ jsx72(
5670
+ Cuboid47,
5434
5671
  {
5435
5672
  color: TIN_COLOR,
5436
5673
  center: [
@@ -5442,8 +5679,8 @@ var FPC = ({
5442
5679
  },
5443
5680
  `terminal-rise:${contact.index}`
5444
5681
  )),
5445
- /* @__PURE__ */ jsx71(
5446
- Cuboid46,
5682
+ /* @__PURE__ */ jsx72(
5683
+ Cuboid47,
5447
5684
  {
5448
5685
  color: HOUSING_SHADOW,
5449
5686
  center: [
@@ -5454,7 +5691,7 @@ var FPC = ({
5454
5691
  size: [openingWidth + 0.18, 0.16, 0.8]
5455
5692
  }
5456
5693
  ),
5457
- /* @__PURE__ */ jsx71(
5694
+ /* @__PURE__ */ jsx72(
5458
5695
  RoundedCuboid3,
5459
5696
  {
5460
5697
  color: ACTUATOR_COLOR,
@@ -5463,8 +5700,8 @@ var FPC = ({
5463
5700
  roundRadius: 0.11
5464
5701
  }
5465
5702
  ),
5466
- /* @__PURE__ */ jsx71(
5467
- Cuboid46,
5703
+ /* @__PURE__ */ jsx72(
5704
+ Cuboid47,
5468
5705
  {
5469
5706
  color: ACTUATOR_HIGHLIGHT,
5470
5707
  center: [
@@ -5475,7 +5712,7 @@ var FPC = ({
5475
5712
  size: [actuatorWidth - 0.36, 0.24, 0.07]
5476
5713
  }
5477
5714
  ),
5478
- [-1, 1].map((direction) => /* @__PURE__ */ jsx71(
5715
+ [-1, 1].map((direction) => /* @__PURE__ */ jsx72(
5479
5716
  RoundedCuboid3,
5480
5717
  {
5481
5718
  color: ACTUATOR_COLOR,
@@ -5485,14 +5722,14 @@ var FPC = ({
5485
5722
  },
5486
5723
  `actuator-ear:${direction}`
5487
5724
  )),
5488
- [-1, 1].map((direction) => /* @__PURE__ */ jsx71(
5489
- Translate31,
5725
+ [-1, 1].map((direction) => /* @__PURE__ */ jsx72(
5726
+ Translate32,
5490
5727
  {
5491
5728
  x: direction * sideBossX,
5492
5729
  y: hingeY,
5493
5730
  z: hingeZ,
5494
- children: /* @__PURE__ */ jsx71(Rotate13, { rotation: [0, Math.PI / 2, 0], children: /* @__PURE__ */ jsx71(
5495
- Cylinder13,
5731
+ children: /* @__PURE__ */ jsx72(Rotate14, { rotation: [0, Math.PI / 2, 0], children: /* @__PURE__ */ jsx72(
5732
+ Cylinder14,
5496
5733
  {
5497
5734
  color: ACTUATOR_HIGHLIGHT,
5498
5735
  height: sideBossWidth + 0.12,
@@ -5502,7 +5739,7 @@ var FPC = ({
5502
5739
  },
5503
5740
  `hinge:${direction}`
5504
5741
  )),
5505
- [-1, 1].map((direction) => /* @__PURE__ */ jsx71(
5742
+ [-1, 1].map((direction) => /* @__PURE__ */ jsx72(
5506
5743
  RoundedCuboid3,
5507
5744
  {
5508
5745
  color: HOLD_DOWN_COLOR,
@@ -5512,7 +5749,7 @@ var FPC = ({
5512
5749
  },
5513
5750
  `hold-down-wall:${direction}`
5514
5751
  )),
5515
- [-1, 1].map((direction) => /* @__PURE__ */ jsx71(
5752
+ [-1, 1].map((direction) => /* @__PURE__ */ jsx72(
5516
5753
  RoundedCuboid3,
5517
5754
  {
5518
5755
  color: HOLD_DOWN_HIGHLIGHT,
@@ -5522,16 +5759,16 @@ var FPC = ({
5522
5759
  },
5523
5760
  `hold-down-cap:${direction}`
5524
5761
  )),
5525
- /* @__PURE__ */ jsx71(
5526
- Cuboid46,
5762
+ /* @__PURE__ */ jsx72(
5763
+ Cuboid47,
5527
5764
  {
5528
5765
  color: HOUSING_SHADOW,
5529
5766
  center: [0, housingCenterY, 0.025],
5530
5767
  size: [openingWidth + 0.7, housingDepth * 0.58, 0.05]
5531
5768
  }
5532
5769
  ),
5533
- /* @__PURE__ */ jsx71(
5534
- Cuboid46,
5770
+ /* @__PURE__ */ jsx72(
5771
+ Cuboid47,
5535
5772
  {
5536
5773
  color: HOUSING_SHADOW,
5537
5774
  center: [
@@ -5546,8 +5783,8 @@ var FPC = ({
5546
5783
  };
5547
5784
 
5548
5785
  // lib/SmdPinHeader.tsx
5549
- import { Colorize as Colorize39, Cuboid as Cuboid47, Hull as Hull25, Translate as Translate32 } from "jscad-fiber";
5550
- import { Fragment as Fragment66, jsx as jsx72, jsxs as jsxs68 } from "react/jsx-runtime";
5786
+ import { Colorize as Colorize40, Cuboid as Cuboid48, Hull as Hull24, Translate as Translate33 } from "jscad-fiber";
5787
+ import { Fragment as Fragment68, jsx as jsx73, jsxs as jsxs69 } from "react/jsx-runtime";
5551
5788
  var SmdPinHeader = ({
5552
5789
  numberOfPins,
5553
5790
  pitch = 2.54,
@@ -5562,52 +5799,52 @@ var SmdPinHeader = ({
5562
5799
  const bodyTop = standoffHeight + bodyHeight;
5563
5800
  const tailLength = tailSpan / 2;
5564
5801
  const tipChamferHeight = pinThickness * 0.35;
5565
- return /* @__PURE__ */ jsx72(Fragment66, { children: Array.from({ length: numberOfPins }, (_, index) => {
5802
+ return /* @__PURE__ */ jsx73(Fragment68, { children: Array.from({ length: numberOfPins }, (_, index) => {
5566
5803
  const x = xStart + index * pitch;
5567
5804
  const tailDirection = index % 2 === 0 ? 1 : -1;
5568
5805
  const postBodyLength = matingPinLength - tipChamferHeight;
5569
5806
  const verticalTailLength = standoffHeight - pinThickness / 2;
5570
- return /* @__PURE__ */ jsxs68(Translate32, { x, children: [
5571
- /* @__PURE__ */ jsx72(
5572
- Cuboid47,
5807
+ return /* @__PURE__ */ jsxs69(Translate33, { x, children: [
5808
+ /* @__PURE__ */ jsx73(
5809
+ Cuboid48,
5573
5810
  {
5574
5811
  color: "#222",
5575
5812
  size: [pitch, bodyWidth, bodyHeight],
5576
5813
  center: [0, 0, standoffHeight + bodyHeight / 2]
5577
5814
  }
5578
5815
  ),
5579
- /* @__PURE__ */ jsxs68(Colorize39, { color: "#d4af37", children: [
5580
- /* @__PURE__ */ jsx72(
5581
- Cuboid47,
5816
+ /* @__PURE__ */ jsxs69(Colorize40, { color: "#d4af37", children: [
5817
+ /* @__PURE__ */ jsx73(
5818
+ Cuboid48,
5582
5819
  {
5583
5820
  size: [pinThickness, tailLength, pinThickness],
5584
5821
  center: [0, tailDirection * (tailLength / 2), pinThickness / 2]
5585
5822
  }
5586
5823
  ),
5587
- /* @__PURE__ */ jsx72(
5588
- Cuboid47,
5824
+ /* @__PURE__ */ jsx73(
5825
+ Cuboid48,
5589
5826
  {
5590
5827
  size: [pinThickness, pinThickness, verticalTailLength],
5591
5828
  center: [0, 0, pinThickness / 2 + verticalTailLength / 2]
5592
5829
  }
5593
5830
  ),
5594
- /* @__PURE__ */ jsx72(
5595
- Cuboid47,
5831
+ /* @__PURE__ */ jsx73(
5832
+ Cuboid48,
5596
5833
  {
5597
5834
  size: [pinThickness, pinThickness, postBodyLength],
5598
5835
  center: [0, 0, bodyTop + postBodyLength / 2]
5599
5836
  }
5600
5837
  ),
5601
- /* @__PURE__ */ jsxs68(Hull25, { children: [
5602
- /* @__PURE__ */ jsx72(
5603
- Cuboid47,
5838
+ /* @__PURE__ */ jsxs69(Hull24, { children: [
5839
+ /* @__PURE__ */ jsx73(
5840
+ Cuboid48,
5604
5841
  {
5605
5842
  size: [pinThickness, pinThickness, 0.01],
5606
5843
  center: [0, 0, bodyTop + postBodyLength]
5607
5844
  }
5608
5845
  ),
5609
- /* @__PURE__ */ jsx72(
5610
- Cuboid47,
5846
+ /* @__PURE__ */ jsx73(
5847
+ Cuboid48,
5611
5848
  {
5612
5849
  size: [pinThickness * 0.65, pinThickness * 0.65, 0.01],
5613
5850
  center: [0, 0, bodyTop + matingPinLength]
@@ -5622,9 +5859,88 @@ var SmdPinHeader = ({
5622
5859
  // lib/Footprinter3d.tsx
5623
5860
  import { mm } from "@tscircuit/mm";
5624
5861
 
5862
+ // lib/utils/getPlatedHoleCenters.ts
5863
+ import { fp as fp3 } from "@tscircuit/footprinter";
5864
+ var getPlatedHoleCenters = (footprint) => {
5865
+ const elements = fp3.string(footprint).circuitJson();
5866
+ return elements.filter(
5867
+ (element) => element.type === "pcb_plated_hole" && Number.isFinite(element.x) && Number.isFinite(element.y)
5868
+ ).map((element) => ({
5869
+ x: element.x,
5870
+ y: element.y,
5871
+ pin: element.port_hints?.[0]
5872
+ }));
5873
+ };
5874
+
5875
+ // lib/utils/getSmtPadRects.ts
5876
+ import { fp as fp4 } from "@tscircuit/footprinter";
5877
+ var getSmtPadRects = (footprint) => {
5878
+ const elements = fp4.string(footprint).circuitJson();
5879
+ return elements.filter(
5880
+ (element) => element.type === "pcb_smtpad" && element.shape === "rect" && Number.isFinite(element.x) && Number.isFinite(element.y)
5881
+ ).map((element) => ({
5882
+ x: element.x,
5883
+ y: element.y,
5884
+ width: element.width ?? 0.4,
5885
+ height: element.height ?? 0.4,
5886
+ pin: element.port_hints?.[0]
5887
+ }));
5888
+ };
5889
+
5890
+ // lib/GullWingBody.tsx
5891
+ import { Fragment as Fragment69, jsx as jsx74, jsxs as jsxs70 } from "react/jsx-runtime";
5892
+ var GullWingBody = ({
5893
+ bodyWidth,
5894
+ bodyLength: bodyLength10,
5895
+ bodyHeight = 1,
5896
+ pads,
5897
+ leadThickness = 0.15,
5898
+ leadHeightRatio = 0.75
5899
+ }) => {
5900
+ const centerX = pads.reduce((sum, pad) => sum + pad.x, 0) / (pads.length || 1);
5901
+ const centerY = pads.reduce((sum, pad) => sum + pad.y, 0) / (pads.length || 1);
5902
+ const leadHeight = bodyHeight * leadHeightRatio;
5903
+ return /* @__PURE__ */ jsxs70(Fragment69, { children: [
5904
+ /* @__PURE__ */ jsx74(
5905
+ ChipBody,
5906
+ {
5907
+ center: { x: centerX, y: centerY, z: 0 },
5908
+ width: bodyWidth,
5909
+ length: bodyLength10,
5910
+ height: bodyHeight
5911
+ }
5912
+ ),
5913
+ pads.map((pad) => {
5914
+ const padWidth = pad.width ?? 0.4;
5915
+ const padLength = pad.height ?? 0.4;
5916
+ const side = pad.x >= centerX ? 1 : -1;
5917
+ const outerX = pad.x + side * padWidth / 2;
5918
+ const run = Math.max(Math.abs(outerX - centerX) - bodyWidth / 2, 0.1);
5919
+ const overlap = Math.min(0.15, bodyWidth * 0.15);
5920
+ return /* @__PURE__ */ jsx74(
5921
+ SmdChipLead,
5922
+ {
5923
+ rotation: side > 0 ? Math.PI : 0,
5924
+ position: {
5925
+ x: outerX,
5926
+ y: pad.y,
5927
+ z: leadThickness / 2
5928
+ },
5929
+ width: padLength,
5930
+ thickness: leadThickness,
5931
+ padContactLength: padWidth * 0.6,
5932
+ bodyDistance: run + overlap,
5933
+ height: leadHeight
5934
+ },
5935
+ `lead-${pad.x}-${pad.y}`
5936
+ );
5937
+ })
5938
+ ] });
5939
+ };
5940
+
5625
5941
  // lib/ParametricChip.tsx
5626
- import { Cuboid as Cuboid48 } from "jscad-fiber";
5627
- import { Fragment as Fragment67, jsx as jsx73, jsxs as jsxs69 } from "react/jsx-runtime";
5942
+ import { Cuboid as Cuboid49 } from "jscad-fiber";
5943
+ import { Fragment as Fragment70, jsx as jsx75, jsxs as jsxs71 } from "react/jsx-runtime";
5628
5944
  var ParametricChip = ({
5629
5945
  padPitch,
5630
5946
  padHeight,
@@ -5635,25 +5951,25 @@ var ParametricChip = ({
5635
5951
  const height10 = width10;
5636
5952
  const terminatorWidth9 = fullLength10 * 0.2;
5637
5953
  const bodyLength10 = fullLength10 - terminatorWidth9 * 2;
5638
- return /* @__PURE__ */ jsxs69(Fragment67, { children: [
5639
- /* @__PURE__ */ jsx73(
5640
- Cuboid48,
5954
+ return /* @__PURE__ */ jsxs71(Fragment70, { children: [
5955
+ /* @__PURE__ */ jsx75(
5956
+ Cuboid49,
5641
5957
  {
5642
5958
  size: [bodyLength10, width10, height10],
5643
5959
  offset: [0, 0, height10 / 2],
5644
5960
  color
5645
5961
  }
5646
5962
  ),
5647
- /* @__PURE__ */ jsx73(
5648
- Cuboid48,
5963
+ /* @__PURE__ */ jsx75(
5964
+ Cuboid49,
5649
5965
  {
5650
5966
  size: [terminatorWidth9, height10, width10],
5651
5967
  offset: [fullLength10 / 2 - terminatorWidth9 / 2, 0, height10 / 2],
5652
5968
  color: "#ccc"
5653
5969
  }
5654
5970
  ),
5655
- /* @__PURE__ */ jsx73(
5656
- Cuboid48,
5971
+ /* @__PURE__ */ jsx75(
5972
+ Cuboid49,
5657
5973
  {
5658
5974
  size: [terminatorWidth9, height10, width10],
5659
5975
  offset: [-fullLength10 / 2 + terminatorWidth9 / 2, 0, height10 / 2],
@@ -5665,14 +5981,14 @@ var ParametricChip = ({
5665
5981
 
5666
5982
  // lib/Led5050.tsx
5667
5983
  import {
5668
- Colorize as Colorize40,
5669
- Cuboid as Cuboid49,
5670
- Cylinder as Cylinder14,
5671
- Rotate as Rotate14,
5672
- Subtract as Subtract11,
5673
- Translate as Translate33
5984
+ Colorize as Colorize41,
5985
+ Cuboid as Cuboid50,
5986
+ Cylinder as Cylinder15,
5987
+ Rotate as Rotate15,
5988
+ Subtract as Subtract12,
5989
+ Translate as Translate34
5674
5990
  } from "jscad-fiber";
5675
- import { Fragment as Fragment68, jsx as jsx74, jsxs as jsxs70 } from "react/jsx-runtime";
5991
+ import { Fragment as Fragment71, jsx as jsx76, jsxs as jsxs72 } from "react/jsx-runtime";
5676
5992
  var Led5050 = ({
5677
5993
  color = "#ffff00",
5678
5994
  bodyColor = "#ffffff",
@@ -5693,10 +6009,10 @@ var Led5050 = ({
5693
6009
  const cornerCutDepth = 0.3;
5694
6010
  const leadYPositions = [-1.7, 0, 1.7];
5695
6011
  const leadSides = [-1, 1];
5696
- return /* @__PURE__ */ jsxs70(Fragment68, { children: [
6012
+ return /* @__PURE__ */ jsxs72(Fragment71, { children: [
5697
6013
  leadYPositions.flatMap(
5698
- (y) => leadSides.map((side) => /* @__PURE__ */ jsx74(
5699
- Cuboid49,
6014
+ (y) => leadSides.map((side) => /* @__PURE__ */ jsx76(
6015
+ Cuboid50,
5700
6016
  {
5701
6017
  color: leadColor,
5702
6018
  size: [leadLength, leadWidth, leadThickness],
@@ -5705,8 +6021,8 @@ var Led5050 = ({
5705
6021
  `${side}-${y}`
5706
6022
  ))
5707
6023
  ),
5708
- /* @__PURE__ */ jsx74(Colorize40, { color: bodyColor, children: /* @__PURE__ */ jsxs70(Subtract11, { children: [
5709
- /* @__PURE__ */ jsx74(
6024
+ /* @__PURE__ */ jsx76(Colorize41, { color: bodyColor, children: /* @__PURE__ */ jsxs72(Subtract12, { children: [
6025
+ /* @__PURE__ */ jsx76(
5710
6026
  ChipBody,
5711
6027
  {
5712
6028
  width: bodySize,
@@ -5720,28 +6036,28 @@ var Led5050 = ({
5720
6036
  includeNotch: false
5721
6037
  }
5722
6038
  ),
5723
- /* @__PURE__ */ jsx74(
5724
- Cylinder14,
6039
+ /* @__PURE__ */ jsx76(
6040
+ Cylinder15,
5725
6041
  {
5726
6042
  radius: lensRadius,
5727
6043
  height: lensHeight,
5728
6044
  center: [0, 0, bodyTop - lensHeight / 2]
5729
6045
  }
5730
6046
  ),
5731
- /* @__PURE__ */ jsx74(
5732
- Translate33,
6047
+ /* @__PURE__ */ jsx76(
6048
+ Translate34,
5733
6049
  {
5734
6050
  offset: [
5735
6051
  -bodySize / 2,
5736
6052
  bodySize / 2,
5737
6053
  bodyTop - cornerCutDepth / 2 + 5e-3
5738
6054
  ],
5739
- children: /* @__PURE__ */ jsx74(Rotate14, { rotation: [0, 0, Math.PI / 4], children: /* @__PURE__ */ jsx74(Cuboid49, { size: [0.9, 0.9, cornerCutDepth + 0.01] }) })
6055
+ children: /* @__PURE__ */ jsx76(Rotate15, { rotation: [0, 0, Math.PI / 4], children: /* @__PURE__ */ jsx76(Cuboid50, { size: [0.9, 0.9, cornerCutDepth + 0.01] }) })
5740
6056
  }
5741
6057
  )
5742
6058
  ] }) }),
5743
- /* @__PURE__ */ jsx74(
5744
- Cylinder14,
6059
+ /* @__PURE__ */ jsx76(
6060
+ Cylinder15,
5745
6061
  {
5746
6062
  color,
5747
6063
  radius: lensRadius,
@@ -5752,17 +6068,70 @@ var Led5050 = ({
5752
6068
  ] });
5753
6069
  };
5754
6070
 
6071
+ // lib/Led2835.tsx
6072
+ import { Colorize as Colorize42, Cuboid as Cuboid51 } from "jscad-fiber";
6073
+ import { Fragment as Fragment72, jsx as jsx77, jsxs as jsxs73 } from "react/jsx-runtime";
6074
+ var Led2835 = ({
6075
+ bodyWidth = 3.5,
6076
+ bodyLength: bodyLength10 = 2.8,
6077
+ bodyHeight = 0.8,
6078
+ color = "#ffe08a",
6079
+ bodyColor = "#f2f2f2",
6080
+ padColor = "#cccccc",
6081
+ pad1X = -0.9,
6082
+ pad1Width = 2.2,
6083
+ pad2X = 1.375,
6084
+ pad2Width = 1.25,
6085
+ padLength = 2.2
6086
+ } = {}) => {
6087
+ const padThickness = 0.1;
6088
+ const lensHeight = 0.15;
6089
+ const bodyCenterX = (pad1X + pad2X) / 2;
6090
+ const lensWidth = bodyWidth * 0.55;
6091
+ const lensLength = bodyLength10 * 0.55;
6092
+ return /* @__PURE__ */ jsxs73(Fragment72, { children: [
6093
+ [
6094
+ { x: pad1X, w: pad1Width, key: "pad-1" },
6095
+ { x: pad2X, w: pad2Width, key: "pad-2" }
6096
+ ].map(({ x, w, key }) => /* @__PURE__ */ jsx77(Colorize42, { color: padColor, children: /* @__PURE__ */ jsx77(
6097
+ Cuboid51,
6098
+ {
6099
+ size: [w, padLength, padThickness],
6100
+ center: [x, 0, padThickness / 2]
6101
+ }
6102
+ ) }, key)),
6103
+ /* @__PURE__ */ jsx77(Colorize42, { color: bodyColor, children: /* @__PURE__ */ jsx77(
6104
+ Cuboid51,
6105
+ {
6106
+ size: [bodyWidth, bodyLength10, bodyHeight],
6107
+ center: [bodyCenterX, 0, padThickness + bodyHeight / 2]
6108
+ }
6109
+ ) }),
6110
+ /* @__PURE__ */ jsx77(Colorize42, { color, children: /* @__PURE__ */ jsx77(
6111
+ Cuboid51,
6112
+ {
6113
+ size: [lensWidth, lensLength, lensHeight],
6114
+ center: [
6115
+ bodyCenterX,
6116
+ 0,
6117
+ padThickness + bodyHeight + lensHeight / 2 - 0.05
6118
+ ]
6119
+ }
6120
+ ) })
6121
+ ] });
6122
+ };
6123
+
5755
6124
  // lib/RJ45.tsx
5756
6125
  import {
5757
- Colorize as Colorize41,
5758
- Cuboid as Cuboid50,
5759
- Cylinder as Cylinder15,
5760
- Rotate as Rotate15,
6126
+ Colorize as Colorize43,
6127
+ Cuboid as Cuboid52,
6128
+ Cylinder as Cylinder16,
6129
+ Rotate as Rotate16,
5761
6130
  RoundedCuboid as RoundedCuboid4,
5762
- Subtract as Subtract12,
5763
- Translate as Translate34
6131
+ Subtract as Subtract13,
6132
+ Translate as Translate35
5764
6133
  } from "jscad-fiber";
5765
- import { Fragment as Fragment69, jsx as jsx75, jsxs as jsxs71 } from "react/jsx-runtime";
6134
+ import { Fragment as Fragment73, jsx as jsx78, jsxs as jsxs74 } from "react/jsx-runtime";
5766
6135
  var range2 = (length) => Array.from({ length }, (_, index) => index);
5767
6136
  var RJ45 = ({
5768
6137
  bodyWidth = 16.26,
@@ -5820,18 +6189,18 @@ var RJ45 = ({
5820
6189
  const contactY = frontY - frontDirection * Math.max(cavityDepth * 0.48, 1.2);
5821
6190
  const contactZ = openingCenterZ + openingHeight * 0.18;
5822
6191
  const frontLipY = frontY + frontDirection * shellThickness * 0.2;
5823
- return /* @__PURE__ */ jsxs71(Fragment69, { children: [
5824
- /* @__PURE__ */ jsxs71(Colorize41, { color: shellColor, children: [
5825
- /* @__PURE__ */ jsxs71(Subtract12, { children: [
5826
- /* @__PURE__ */ jsx75(
5827
- Cuboid50,
6192
+ return /* @__PURE__ */ jsxs74(Fragment73, { children: [
6193
+ /* @__PURE__ */ jsxs74(Colorize43, { color: shellColor, children: [
6194
+ /* @__PURE__ */ jsxs74(Subtract13, { children: [
6195
+ /* @__PURE__ */ jsx78(
6196
+ Cuboid52,
5828
6197
  {
5829
6198
  center: [0, bodyCenterY, bodyHeight / 2],
5830
6199
  size: [bodyWidth, bodyDepth, bodyHeight]
5831
6200
  }
5832
6201
  ),
5833
- /* @__PURE__ */ jsx75(
5834
- Cuboid50,
6202
+ /* @__PURE__ */ jsx78(
6203
+ Cuboid52,
5835
6204
  {
5836
6205
  center: [0, cavityCenterY, openingCenterZ],
5837
6206
  size: [
@@ -5842,15 +6211,15 @@ var RJ45 = ({
5842
6211
  }
5843
6212
  )
5844
6213
  ] }),
5845
- /* @__PURE__ */ jsx75(
5846
- Cuboid50,
6214
+ /* @__PURE__ */ jsx78(
6215
+ Cuboid52,
5847
6216
  {
5848
6217
  center: [0, frontLipY, 0.72],
5849
6218
  size: [openingWidth + 0.5, shellThickness * 1.25, 1.05]
5850
6219
  }
5851
6220
  ),
5852
- [-1, 1].map((direction) => /* @__PURE__ */ jsx75(
5853
- Cuboid50,
6221
+ [-1, 1].map((direction) => /* @__PURE__ */ jsx78(
6222
+ Cuboid52,
5854
6223
  {
5855
6224
  center: [direction * shieldPinX, shieldPinY, 0.25],
5856
6225
  size: [
@@ -5861,8 +6230,8 @@ var RJ45 = ({
5861
6230
  },
5862
6231
  `shield-tab:${direction}`
5863
6232
  )),
5864
- [-1, 1].map((direction) => /* @__PURE__ */ jsx75(
5865
- Cuboid50,
6233
+ [-1, 1].map((direction) => /* @__PURE__ */ jsx78(
6234
+ Cuboid52,
5866
6235
  {
5867
6236
  center: [
5868
6237
  direction * bodyWidth * 0.24,
@@ -5874,9 +6243,9 @@ var RJ45 = ({
5874
6243
  `top-seam:${direction}`
5875
6244
  ))
5876
6245
  ] }),
5877
- /* @__PURE__ */ jsxs71(Colorize41, { color: housingColor, children: [
5878
- /* @__PURE__ */ jsxs71(Subtract12, { children: [
5879
- /* @__PURE__ */ jsx75(
6246
+ /* @__PURE__ */ jsxs74(Colorize43, { color: housingColor, children: [
6247
+ /* @__PURE__ */ jsxs74(Subtract13, { children: [
6248
+ /* @__PURE__ */ jsx78(
5880
6249
  RoundedCuboid4,
5881
6250
  {
5882
6251
  center: [0, cavityCenterY, openingCenterZ],
@@ -5888,8 +6257,8 @@ var RJ45 = ({
5888
6257
  roundRadius: 0.22
5889
6258
  }
5890
6259
  ),
5891
- /* @__PURE__ */ jsx75(
5892
- Cuboid50,
6260
+ /* @__PURE__ */ jsx78(
6261
+ Cuboid52,
5893
6262
  {
5894
6263
  center: [
5895
6264
  0,
@@ -5904,14 +6273,14 @@ var RJ45 = ({
5904
6273
  }
5905
6274
  )
5906
6275
  ] }),
5907
- /* @__PURE__ */ jsx75(
5908
- Cuboid50,
6276
+ /* @__PURE__ */ jsx78(
6277
+ Cuboid52,
5909
6278
  {
5910
6279
  center: [0, backWallY, openingCenterZ],
5911
6280
  size: [openingWidth - 1.15, shellThickness, openingHeight - 1.25]
5912
6281
  }
5913
6282
  ),
5914
- /* @__PURE__ */ jsx75(
6283
+ /* @__PURE__ */ jsx78(
5915
6284
  RoundedCuboid4,
5916
6285
  {
5917
6286
  center: [0, frontY - frontDirection * cavityDepth * 0.28, 1.55],
@@ -5919,8 +6288,8 @@ var RJ45 = ({
5919
6288
  roundRadius: 0.16
5920
6289
  }
5921
6290
  ),
5922
- [-1, 1].map((direction) => /* @__PURE__ */ jsx75(
5923
- Cylinder15,
6291
+ [-1, 1].map((direction) => /* @__PURE__ */ jsx78(
6292
+ Cylinder16,
5924
6293
  {
5925
6294
  center: [direction * locatorHoleX, locatorHoleY, -0.25],
5926
6295
  radius: Math.max(locatorHoleDiameter * 0.41, 0.65),
@@ -5929,9 +6298,9 @@ var RJ45 = ({
5929
6298
  `locator:${direction}`
5930
6299
  ))
5931
6300
  ] }),
5932
- /* @__PURE__ */ jsxs71(Colorize41, { color: contactColor, children: [
5933
- signalPinPositions.map(({ x, y }, index) => /* @__PURE__ */ jsx75(
5934
- Cylinder15,
6301
+ /* @__PURE__ */ jsxs74(Colorize43, { color: contactColor, children: [
6302
+ signalPinPositions.map(({ x, y }, index) => /* @__PURE__ */ jsx78(
6303
+ Cylinder16,
5935
6304
  {
5936
6305
  center: [x, y, 0.15],
5937
6306
  radius: signalLeadRadius,
@@ -5939,15 +6308,15 @@ var RJ45 = ({
5939
6308
  },
5940
6309
  `signal-lead:${index}`
5941
6310
  )),
5942
- range2(8).map((index) => /* @__PURE__ */ jsx75(
5943
- Translate34,
6311
+ range2(8).map((index) => /* @__PURE__ */ jsx78(
6312
+ Translate35,
5944
6313
  {
5945
6314
  offset: [
5946
6315
  (index - 3.5) * contactPitch,
5947
6316
  contactY,
5948
6317
  contactZ + (index % 2 === 0 ? 0.03 : -0.03)
5949
6318
  ],
5950
- children: /* @__PURE__ */ jsx75(Rotate15, { rotation: [frontDirection * 0.2, 0, 0], children: /* @__PURE__ */ jsx75(
6319
+ children: /* @__PURE__ */ jsx78(Rotate16, { rotation: [frontDirection * 0.2, 0, 0], children: /* @__PURE__ */ jsx78(
5951
6320
  RoundedCuboid4,
5952
6321
  {
5953
6322
  size: [Math.max(contactPitch * 0.28, 0.28), 3.25, 0.16],
@@ -5957,8 +6326,8 @@ var RJ45 = ({
5957
6326
  },
5958
6327
  `socket-contact:${index}`
5959
6328
  )),
5960
- ledPins && ledPinPositions.map((x, index) => /* @__PURE__ */ jsx75(
5961
- Cylinder15,
6329
+ ledPins && ledPinPositions.map((x, index) => /* @__PURE__ */ jsx78(
6330
+ Cylinder16,
5962
6331
  {
5963
6332
  center: [x, ledPinY, 0.15],
5964
6333
  radius: signalLeadRadius,
@@ -5967,8 +6336,8 @@ var RJ45 = ({
5967
6336
  `led-lead:${index}`
5968
6337
  ))
5969
6338
  ] }),
5970
- ledPins && /* @__PURE__ */ jsxs71(Fragment69, { children: [
5971
- /* @__PURE__ */ jsx75(
6339
+ ledPins && /* @__PURE__ */ jsxs74(Fragment73, { children: [
6340
+ /* @__PURE__ */ jsx78(
5972
6341
  RoundedCuboid4,
5973
6342
  {
5974
6343
  color: "#73b744",
@@ -5981,7 +6350,7 @@ var RJ45 = ({
5981
6350
  roundRadius: 0.18
5982
6351
  }
5983
6352
  ),
5984
- /* @__PURE__ */ jsx75(
6353
+ /* @__PURE__ */ jsx78(
5985
6354
  RoundedCuboid4,
5986
6355
  {
5987
6356
  color: "#e0aa35",
@@ -5998,21 +6367,333 @@ var RJ45 = ({
5998
6367
  ] });
5999
6368
  };
6000
6369
 
6370
+ // lib/DPAK.tsx
6371
+ import { Colorize as Colorize44, Cuboid as Cuboid53, Hull as Hull25 } from "jscad-fiber";
6372
+ import { Fragment as Fragment74, jsx as jsx79, jsxs as jsxs75 } from "react/jsx-runtime";
6373
+ var DPAK = ({
6374
+ bodyWidth = 6.1,
6375
+ bodyLength: bodyLength10 = 6.5,
6376
+ bodyHeight = 2.3,
6377
+ tabWidth = 6.2,
6378
+ tabLength = 5.8,
6379
+ span = 6.85,
6380
+ pitch = 2.29,
6381
+ leadWidth = 0.9,
6382
+ leadContactLength = 1.5,
6383
+ color = "#222",
6384
+ tabColor = "#cccccc",
6385
+ leadColor = "#cccccc"
6386
+ }) => {
6387
+ const tabThickness = 0.5;
6388
+ const tabCenterX = span / 2;
6389
+ const leadPadX = -span / 2;
6390
+ const bodyCenterX = tabCenterX + (tabWidth - bodyWidth) / 2;
6391
+ const bodyFrontX = bodyCenterX - bodyWidth / 2;
6392
+ const leadZ = tabThickness / 2;
6393
+ const leadThickness = 0.4;
6394
+ return /* @__PURE__ */ jsxs75(Fragment74, { children: [
6395
+ /* @__PURE__ */ jsx79(Colorize44, { color: tabColor, children: /* @__PURE__ */ jsx79(
6396
+ Cuboid53,
6397
+ {
6398
+ size: [tabWidth, tabLength, tabThickness],
6399
+ center: [tabCenterX, 0, tabThickness / 2]
6400
+ }
6401
+ ) }),
6402
+ /* @__PURE__ */ jsx79(Colorize44, { color, children: /* @__PURE__ */ jsx79(
6403
+ Cuboid53,
6404
+ {
6405
+ size: [bodyWidth, bodyLength10, bodyHeight],
6406
+ center: [bodyCenterX, 0, tabThickness + bodyHeight / 2]
6407
+ }
6408
+ ) }),
6409
+ [-1, 1].map((side) => {
6410
+ return /* @__PURE__ */ jsxs75(Colorize44, { color: leadColor, children: [
6411
+ /* @__PURE__ */ jsx79(
6412
+ Cuboid53,
6413
+ {
6414
+ size: [leadContactLength, leadWidth, leadThickness],
6415
+ center: [
6416
+ leadPadX + leadContactLength / 2,
6417
+ side * pitch,
6418
+ leadThickness / 2
6419
+ ]
6420
+ }
6421
+ ),
6422
+ /* @__PURE__ */ jsxs75(Hull25, { children: [
6423
+ /* @__PURE__ */ jsx79(
6424
+ Cuboid53,
6425
+ {
6426
+ size: [0.1, leadWidth, leadThickness],
6427
+ center: [
6428
+ leadPadX + leadContactLength,
6429
+ side * pitch,
6430
+ leadThickness / 2
6431
+ ]
6432
+ }
6433
+ ),
6434
+ /* @__PURE__ */ jsx79(
6435
+ Cuboid53,
6436
+ {
6437
+ size: [0.1, leadWidth, leadThickness],
6438
+ center: [bodyFrontX, side * pitch, leadZ + tabThickness / 2]
6439
+ }
6440
+ )
6441
+ ] })
6442
+ ] }, `lead-${side}`);
6443
+ })
6444
+ ] });
6445
+ };
6446
+
6447
+ // lib/ElectrolyticCapacitor.tsx
6448
+ import {
6449
+ Colorize as Colorize45,
6450
+ Cuboid as Cuboid54,
6451
+ Cylinder as Cylinder17,
6452
+ RoundedCylinder as RoundedCylinder5,
6453
+ Subtract as Subtract14
6454
+ } from "jscad-fiber";
6455
+ import { Fragment as Fragment75, jsx as jsx80, jsxs as jsxs76 } from "react/jsx-runtime";
6456
+ var ElectrolyticCapacitor = ({
6457
+ diameter = 6.3,
6458
+ heightToDiameterRatio = 1.4,
6459
+ height: height10 = diameter * heightToDiameterRatio,
6460
+ leadPitch = 2.5,
6461
+ leadDiameter = 0.6,
6462
+ leadLength = 3,
6463
+ sleeveColor = "#1b2a6b",
6464
+ baseColor = "#1a1a1a"
6465
+ }) => {
6466
+ const radius = diameter / 2;
6467
+ const baseHeight = Math.min(1, diameter * 0.12);
6468
+ const canHeight = Math.max(height10 - baseHeight, 0.1);
6469
+ const canBottom = baseHeight;
6470
+ const canTop = canBottom + canHeight;
6471
+ const grooveWidth = Math.max(diameter * 0.06, 0.2);
6472
+ const grooveDepth = 0.3;
6473
+ return /* @__PURE__ */ jsxs76(Fragment75, { children: [
6474
+ /* @__PURE__ */ jsx80(Colorize45, { color: baseColor, children: /* @__PURE__ */ jsx80(
6475
+ Cylinder17,
6476
+ {
6477
+ radius: radius - 0.05,
6478
+ height: baseHeight,
6479
+ center: [0, 0, baseHeight / 2]
6480
+ }
6481
+ ) }),
6482
+ /* @__PURE__ */ jsx80(Colorize45, { color: sleeveColor, children: /* @__PURE__ */ jsxs76(Subtract14, { children: [
6483
+ /* @__PURE__ */ jsx80(
6484
+ RoundedCylinder5,
6485
+ {
6486
+ radius,
6487
+ height: canHeight,
6488
+ roundRadius: Math.min(0.3, radius * 0.15),
6489
+ center: [0, 0, canBottom + canHeight / 2]
6490
+ }
6491
+ ),
6492
+ /* @__PURE__ */ jsx80(
6493
+ Cuboid54,
6494
+ {
6495
+ size: [diameter, grooveWidth, grooveDepth * 2],
6496
+ center: [0, 0, canTop]
6497
+ }
6498
+ ),
6499
+ /* @__PURE__ */ jsx80(
6500
+ Cuboid54,
6501
+ {
6502
+ size: [grooveWidth, diameter, grooveDepth * 2],
6503
+ center: [0, 0, canTop]
6504
+ }
6505
+ )
6506
+ ] }) }),
6507
+ [-1, 1].map((side) => /* @__PURE__ */ jsx80(Colorize45, { color: "#c0c0c0", children: /* @__PURE__ */ jsx80(
6508
+ Cylinder17,
6509
+ {
6510
+ radius: leadDiameter / 2,
6511
+ height: leadLength + baseHeight,
6512
+ center: [side * leadPitch / 2, 0, (baseHeight - leadLength) / 2]
6513
+ }
6514
+ ) }, `lead-${side}`))
6515
+ ] });
6516
+ };
6517
+
6518
+ // lib/Potentiometer.tsx
6519
+ import { Colorize as Colorize46, Cuboid as Cuboid55, Cylinder as Cylinder18, Subtract as Subtract15 } from "jscad-fiber";
6520
+ import { Fragment as Fragment76, jsx as jsx81, jsxs as jsxs77 } from "react/jsx-runtime";
6521
+ var Potentiometer = ({
6522
+ bodyWidth = 5.35,
6523
+ bodyLength: bodyLength10 = 14,
6524
+ bodyHeight = 4,
6525
+ bodyCenterX = bodyWidth / 2,
6526
+ adjusterDiameter = Math.min(bodyWidth, bodyLength10) * 0.55,
6527
+ shaftDiameter = 0,
6528
+ shaftHeight = 0,
6529
+ leads = [],
6530
+ leadDiameter = 0.6,
6531
+ leadLength = 3,
6532
+ bodyColor = "#1f4fa3",
6533
+ adjusterColor = "#d8d8d8"
6534
+ }) => {
6535
+ const adjusterHeight = 0.8;
6536
+ const adjusterZ = bodyHeight + adjusterHeight / 2;
6537
+ const slotWidth = Math.max(adjusterDiameter * 0.16, 0.3);
6538
+ return /* @__PURE__ */ jsxs77(Fragment76, { children: [
6539
+ /* @__PURE__ */ jsx81(Colorize46, { color: bodyColor, children: /* @__PURE__ */ jsx81(
6540
+ Cuboid55,
6541
+ {
6542
+ size: [bodyWidth, bodyLength10, bodyHeight],
6543
+ center: [bodyCenterX, 0, bodyHeight / 2]
6544
+ }
6545
+ ) }),
6546
+ /* @__PURE__ */ jsx81(Colorize46, { color: adjusterColor, children: /* @__PURE__ */ jsxs77(Subtract15, { children: [
6547
+ /* @__PURE__ */ jsx81(
6548
+ Cylinder18,
6549
+ {
6550
+ radius: adjusterDiameter / 2,
6551
+ height: adjusterHeight,
6552
+ center: [bodyCenterX, 0, adjusterZ]
6553
+ }
6554
+ ),
6555
+ /* @__PURE__ */ jsx81(
6556
+ Cuboid55,
6557
+ {
6558
+ size: [adjusterDiameter, slotWidth, adjusterHeight * 0.6],
6559
+ center: [bodyCenterX, 0, adjusterZ + adjusterHeight / 2]
6560
+ }
6561
+ )
6562
+ ] }) }),
6563
+ shaftHeight > 0 && shaftDiameter > 0 ? /* @__PURE__ */ jsx81(Colorize46, { color: adjusterColor, children: /* @__PURE__ */ jsx81(
6564
+ Cylinder18,
6565
+ {
6566
+ radius: shaftDiameter / 2,
6567
+ height: shaftHeight,
6568
+ center: [bodyCenterX, 0, bodyHeight + shaftHeight / 2]
6569
+ }
6570
+ ) }) : null,
6571
+ leads.map((lead) => /* @__PURE__ */ jsx81(Colorize46, { color: "#c0c0c0", children: /* @__PURE__ */ jsx81(
6572
+ Cylinder18,
6573
+ {
6574
+ radius: leadDiameter / 2,
6575
+ height: bodyHeight / 2 + leadLength,
6576
+ center: [lead.x, lead.y, (bodyHeight / 2 - leadLength) / 2]
6577
+ }
6578
+ ) }, `lead-${lead.x}-${lead.y}`))
6579
+ ] });
6580
+ };
6581
+
6582
+ // lib/SmdPushButton.tsx
6583
+ import { Colorize as Colorize47, Cuboid as Cuboid56, Cylinder as Cylinder19 } from "jscad-fiber";
6584
+ import { Fragment as Fragment77, jsx as jsx82, jsxs as jsxs78 } from "react/jsx-runtime";
6585
+ var SmdPushButton = ({
6586
+ bodyWidth = 2.9,
6587
+ bodyLength: bodyLength10 = 3,
6588
+ bodyHeight = 1.4,
6589
+ actuatorDiameter = 1.5,
6590
+ actuatorHeight = 0.5,
6591
+ padSpanX = 4.2,
6592
+ padSpanY = 2.15,
6593
+ padWidth = 1.05,
6594
+ padLength = 0.7,
6595
+ bodyColor = "#2b2b2b",
6596
+ actuatorColor = "#d9d9d9",
6597
+ leadColor = "#cccccc"
6598
+ }) => {
6599
+ const leadThickness = 0.15;
6600
+ return /* @__PURE__ */ jsxs78(Fragment77, { children: [
6601
+ /* @__PURE__ */ jsx82(Colorize47, { color: bodyColor, children: /* @__PURE__ */ jsx82(
6602
+ Cuboid56,
6603
+ {
6604
+ size: [bodyWidth, bodyLength10, bodyHeight],
6605
+ center: [0, 0, bodyHeight / 2]
6606
+ }
6607
+ ) }),
6608
+ /* @__PURE__ */ jsx82(Colorize47, { color: actuatorColor, children: /* @__PURE__ */ jsx82(
6609
+ Cylinder19,
6610
+ {
6611
+ radius: actuatorDiameter / 2,
6612
+ height: actuatorHeight,
6613
+ center: [0, 0, bodyHeight + actuatorHeight / 2]
6614
+ }
6615
+ ) }),
6616
+ [-1, 1].flatMap(
6617
+ (sx) => [-1, 1].map((sy) => /* @__PURE__ */ jsx82(Colorize47, { color: leadColor, children: /* @__PURE__ */ jsx82(
6618
+ Cuboid56,
6619
+ {
6620
+ size: [padWidth, padLength, leadThickness],
6621
+ center: [
6622
+ sx * padSpanX / 2,
6623
+ sy * padSpanY / 2,
6624
+ leadThickness / 2
6625
+ ]
6626
+ }
6627
+ ) }, `lead-${sx}-${sy}`))
6628
+ )
6629
+ ] });
6630
+ };
6631
+
6632
+ // lib/SOT-563.tsx
6633
+ import { Cuboid as Cuboid57, Translate as Translate37, Rotate as Rotate17, Colorize as Colorize48 } from "jscad-fiber";
6634
+ import { Fragment as Fragment78, jsx as jsx83, jsxs as jsxs79 } from "react/jsx-runtime";
6635
+ var SOT563 = ({ fullWidth = 1.94, fullLength: fullLength10 = 1.6 }) => {
6636
+ const bodyWidth = 1.2;
6637
+ const bodyLength10 = 1.6;
6638
+ const bodyHeight = 0.55;
6639
+ const leadWidth = 0.3;
6640
+ const leadLength = 0.67;
6641
+ const leadHeight = 0.13;
6642
+ const leadSpacing = 0.5;
6643
+ const bodyZOffset = -0.4;
6644
+ return /* @__PURE__ */ jsxs79(Fragment78, { children: [
6645
+ /* @__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] }) }) }) }),
6646
+ [-1, 0, 1].flatMap((yOffset, index) => [
6647
+ // Left lead
6648
+ /* @__PURE__ */ jsx83(
6649
+ Translate37,
6650
+ {
6651
+ center: [
6652
+ -bodyWidth / 2 - 0.03,
6653
+ yOffset * leadSpacing,
6654
+ leadHeight / 2
6655
+ ],
6656
+ children: /* @__PURE__ */ jsx83(Cuboid57, { size: [leadLength, leadWidth, leadHeight] })
6657
+ },
6658
+ `left-${index}`
6659
+ ),
6660
+ // Right lead
6661
+ /* @__PURE__ */ jsx83(
6662
+ Translate37,
6663
+ {
6664
+ center: [bodyWidth / 2 + 0.03, yOffset * leadSpacing, leadHeight / 2],
6665
+ children: /* @__PURE__ */ jsx83(Cuboid57, { size: [leadLength, leadWidth, leadHeight] })
6666
+ },
6667
+ `right-${index}`
6668
+ )
6669
+ ])
6670
+ ] });
6671
+ };
6672
+
6001
6673
  // lib/Footprinter3d.tsx
6002
- import { jsx as jsx76 } from "react/jsx-runtime";
6674
+ import { Fragment as Fragment79, jsx as jsx84 } from "react/jsx-runtime";
6003
6675
  var Footprinter3d = ({ footprint }) => {
6004
6676
  let normalizedFootprint = footprint;
6005
6677
  if (footprint.startsWith("jstzh1_5mm")) {
6006
6678
  const pinMatch = footprint.match(/jstzh1_5mm(\d+)?/);
6007
6679
  const numPins = pinMatch && pinMatch[1] ? pinMatch[1] : "7";
6008
6680
  normalizedFootprint = `zh${numPins}`;
6681
+ } else if (footprint.startsWith("jstph2_0mm")) {
6682
+ const pinMatch = footprint.match(/jstph2_0mm(\d+)?/);
6683
+ const numPins = pinMatch && pinMatch[1] ? pinMatch[1] : "2";
6684
+ normalizedFootprint = `jst${numPins}_ph`;
6009
6685
  }
6010
- const fpJson = fp3.string(normalizedFootprint).json();
6686
+ const fpJson = fp5.string(normalizedFootprint).json();
6011
6687
  const colorMatch = footprint.match(/_color\(([^)]+)\)/);
6012
6688
  const color = colorMatch ? colorMatch[1] : void 0;
6689
+ const dim = (value, fallback) => {
6690
+ if (value === void 0 || value === null) return fallback;
6691
+ const parsed = mm(value);
6692
+ return Number.isFinite(parsed) ? parsed : fallback;
6693
+ };
6013
6694
  switch (fpJson.fn) {
6014
6695
  case "crystal":
6015
- return /* @__PURE__ */ jsx76(
6696
+ return /* @__PURE__ */ jsx84(
6016
6697
  Crystal,
6017
6698
  {
6018
6699
  horizontalPadPitch: fpJson.px,
@@ -6022,11 +6703,11 @@ var Footprinter3d = ({ footprint }) => {
6022
6703
  }
6023
6704
  );
6024
6705
  case "dip":
6025
- return /* @__PURE__ */ jsx76(Dip, { numPins: fpJson.num_pins, pitch: fpJson.p, bodyWidth: fpJson.w });
6706
+ return /* @__PURE__ */ jsx84(Dip, { numPins: fpJson.num_pins, pitch: fpJson.p, bodyWidth: fpJson.w });
6026
6707
  case "axial":
6027
- return /* @__PURE__ */ jsx76(AxialCapacitor, { pitch: fpJson.p });
6708
+ return /* @__PURE__ */ jsx84(AxialCapacitor, { pitch: fpJson.p });
6028
6709
  case "tssop":
6029
- return /* @__PURE__ */ jsx76(
6710
+ return /* @__PURE__ */ jsx84(
6030
6711
  Tssop,
6031
6712
  {
6032
6713
  pinCount: fpJson.num_pins,
@@ -6037,7 +6718,7 @@ var Footprinter3d = ({ footprint }) => {
6037
6718
  }
6038
6719
  );
6039
6720
  case "msop":
6040
- return /* @__PURE__ */ jsx76(
6721
+ return /* @__PURE__ */ jsx84(
6041
6722
  MSOP,
6042
6723
  {
6043
6724
  pinCount: fpJson.num_pins,
@@ -6048,7 +6729,7 @@ var Footprinter3d = ({ footprint }) => {
6048
6729
  }
6049
6730
  );
6050
6731
  case "vssop":
6051
- return /* @__PURE__ */ jsx76(
6732
+ return /* @__PURE__ */ jsx84(
6052
6733
  VSSOP,
6053
6734
  {
6054
6735
  pinCount: fpJson.num_pins,
@@ -6060,7 +6741,7 @@ var Footprinter3d = ({ footprint }) => {
6060
6741
  }
6061
6742
  );
6062
6743
  case "qfp":
6063
- return /* @__PURE__ */ jsx76(
6744
+ return /* @__PURE__ */ jsx84(
6064
6745
  QFP,
6065
6746
  {
6066
6747
  pinCount: fpJson.num_pins,
@@ -6071,12 +6752,12 @@ var Footprinter3d = ({ footprint }) => {
6071
6752
  }
6072
6753
  );
6073
6754
  case "tqfp":
6074
- return /* @__PURE__ */ jsx76(tqfp_default, {});
6755
+ return /* @__PURE__ */ jsx84(tqfp_default, {});
6075
6756
  case "lqfp":
6076
- return /* @__PURE__ */ jsx76(LQFP, { pinCount: fpJson.num_pins });
6757
+ return /* @__PURE__ */ jsx84(LQFP, { pinCount: fpJson.num_pins });
6077
6758
  case "qfn": {
6078
6759
  const hasThermalPad = typeof fpJson.thermalpad?.x === "number" && typeof fpJson.thermalpad?.y === "number";
6079
- return /* @__PURE__ */ jsx76(
6760
+ return /* @__PURE__ */ jsx84(
6080
6761
  qfn_default,
6081
6762
  {
6082
6763
  num_pins: fpJson.num_pins,
@@ -6094,7 +6775,7 @@ var Footprinter3d = ({ footprint }) => {
6094
6775
  }
6095
6776
  case "dfn": {
6096
6777
  const hasThermalPad = typeof fpJson.thermalpad?.x === "number" && typeof fpJson.thermalpad?.y === "number";
6097
- return /* @__PURE__ */ jsx76(
6778
+ return /* @__PURE__ */ jsx84(
6098
6779
  DFN,
6099
6780
  {
6100
6781
  num_pins: fpJson.num_pins,
@@ -6114,7 +6795,7 @@ var Footprinter3d = ({ footprint }) => {
6114
6795
  const rowsMatch = footprint.match(/_rows(\d+)/);
6115
6796
  const rows = rowsMatch && rowsMatch[1] ? parseInt(rowsMatch[1], 10) : 1;
6116
6797
  if (fpJson.male)
6117
- return /* @__PURE__ */ jsx76(
6798
+ return /* @__PURE__ */ jsx84(
6118
6799
  PinRow,
6119
6800
  {
6120
6801
  numberOfPins: fpJson.num_pins,
@@ -6127,7 +6808,7 @@ var Footprinter3d = ({ footprint }) => {
6127
6808
  }
6128
6809
  );
6129
6810
  if (fpJson.female)
6130
- return /* @__PURE__ */ jsx76(
6811
+ return /* @__PURE__ */ jsx84(
6131
6812
  FemaleHeaderRow,
6132
6813
  {
6133
6814
  numberOfPins: fpJson.num_pins,
@@ -6137,7 +6818,7 @@ var Footprinter3d = ({ footprint }) => {
6137
6818
  );
6138
6819
  }
6139
6820
  case "smdpinheader":
6140
- return /* @__PURE__ */ jsx76(
6821
+ return /* @__PURE__ */ jsx84(
6141
6822
  SmdPinHeader,
6142
6823
  {
6143
6824
  numberOfPins: fpJson.num_pins,
@@ -6146,58 +6827,91 @@ var Footprinter3d = ({ footprint }) => {
6146
6827
  }
6147
6828
  );
6148
6829
  case "led5050":
6149
- return /* @__PURE__ */ jsx76(Led5050, { color });
6830
+ return /* @__PURE__ */ jsx84(Led5050, { color });
6150
6831
  case "cap": {
6151
6832
  switch (fpJson.imperial) {
6152
6833
  case "0402":
6153
- return /* @__PURE__ */ jsx76(A0402, { color: "#856c4d" });
6834
+ return /* @__PURE__ */ jsx84(A0402, { color: "#856c4d" });
6154
6835
  case "0603":
6155
- return /* @__PURE__ */ jsx76(A0603, { color: "#856c4d" });
6836
+ return /* @__PURE__ */ jsx84(A0603, { color: "#856c4d" });
6156
6837
  case "0805":
6157
- return /* @__PURE__ */ jsx76(A0805, { color: "#856c4d" });
6838
+ return /* @__PURE__ */ jsx84(A0805, { color: "#856c4d" });
6158
6839
  case "0201":
6159
- return /* @__PURE__ */ jsx76(A0201, { color: "#856c4d" });
6840
+ return /* @__PURE__ */ jsx84(A0201, { color: "#856c4d" });
6160
6841
  case "01005":
6161
- return /* @__PURE__ */ jsx76(A01005, { color: "#856c4d" });
6842
+ return /* @__PURE__ */ jsx84(A01005, { color: "#856c4d" });
6162
6843
  case "1206":
6163
- return /* @__PURE__ */ jsx76(A1206, { color: "#856c4d" });
6844
+ return /* @__PURE__ */ jsx84(A1206, { color: "#856c4d" });
6164
6845
  case "1210":
6165
- return /* @__PURE__ */ jsx76(A1210, { color: "#856c4d" });
6846
+ return /* @__PURE__ */ jsx84(A1210, { color: "#856c4d" });
6166
6847
  case "2010":
6167
- return /* @__PURE__ */ jsx76(A2010, { color: "#856c4d" });
6848
+ return /* @__PURE__ */ jsx84(A2010, { color: "#856c4d" });
6168
6849
  case "2512":
6169
- return /* @__PURE__ */ jsx76(A2512, { color: "#856c4d" });
6850
+ return /* @__PURE__ */ jsx84(A2512, { color: "#856c4d" });
6170
6851
  }
6171
6852
  break;
6172
6853
  }
6173
6854
  case "sot23":
6174
6855
  switch (fpJson.num_pins) {
6175
6856
  case 3:
6176
- return /* @__PURE__ */ jsx76(SOT233P, { color });
6857
+ return /* @__PURE__ */ jsx84(SOT233P, { color });
6177
6858
  case 5:
6178
- return /* @__PURE__ */ jsx76(SOT_235_default, {});
6859
+ return /* @__PURE__ */ jsx84(SOT_235_default, {});
6179
6860
  }
6180
6861
  break;
6862
+ case "sot25":
6863
+ return /* @__PURE__ */ jsx84(SOT_235_default, {});
6864
+ case "sot":
6865
+ case "sot343": {
6866
+ const isSc70 = fpJson.fn === "sot343";
6867
+ return /* @__PURE__ */ jsx84(
6868
+ GullWingBody,
6869
+ {
6870
+ pads: getSmtPadRects(normalizedFootprint),
6871
+ bodyWidth: isSc70 ? 1.25 : 1.6,
6872
+ bodyLength: isSc70 ? 2 : 2.9,
6873
+ bodyHeight: isSc70 ? 1.1 : 1.3
6874
+ }
6875
+ );
6876
+ }
6877
+ case "sot563":
6878
+ return /* @__PURE__ */ jsx84(SOT563, {});
6879
+ case "sot89": {
6880
+ const padSpan = dim(fpJson.w, 4.2);
6881
+ return /* @__PURE__ */ jsx84(
6882
+ SOT223,
6883
+ {
6884
+ fullWidth: padSpan,
6885
+ bodyWidth: padSpan * 0.6,
6886
+ bodyLength: dim(fpJson.h, 4.8) * 0.94,
6887
+ bodyHeight: 1.5,
6888
+ leadWidth: dim(fpJson.pw, 0.48),
6889
+ tabLeadWidth: dim(fpJson.pw, 0.48) * 2,
6890
+ padPitch: dim(fpJson.p, 1.5),
6891
+ leadHeight: 0.66
6892
+ }
6893
+ );
6894
+ }
6181
6895
  case "sot457":
6182
- return /* @__PURE__ */ jsx76(SOT457, {});
6896
+ return /* @__PURE__ */ jsx84(SOT457, {});
6183
6897
  case "sot223":
6184
- return /* @__PURE__ */ jsx76(SOT223, {});
6898
+ return /* @__PURE__ */ jsx84(SOT223, {});
6185
6899
  case "sot23w":
6186
- return /* @__PURE__ */ jsx76(SOT23W, {});
6900
+ return /* @__PURE__ */ jsx84(SOT23W, {});
6187
6901
  case "sot323":
6188
- return /* @__PURE__ */ jsx76(SOT323, {});
6902
+ return /* @__PURE__ */ jsx84(SOT323, {});
6189
6903
  case "sod323f":
6190
- return /* @__PURE__ */ jsx76(SOD323F, {});
6904
+ return /* @__PURE__ */ jsx84(SOD323F, {});
6191
6905
  case "sod323fl":
6192
- return /* @__PURE__ */ jsx76(SOD323FL, {});
6906
+ return /* @__PURE__ */ jsx84(SOD323FL, {});
6193
6907
  case "sot363":
6194
- return /* @__PURE__ */ jsx76(SOT_363_default, {});
6908
+ return /* @__PURE__ */ jsx84(SOT_363_default, {});
6195
6909
  case "sot886":
6196
- return /* @__PURE__ */ jsx76(SOT886, {});
6910
+ return /* @__PURE__ */ jsx84(SOT886, {});
6197
6911
  case "sot963":
6198
- return /* @__PURE__ */ jsx76(SOT963, {});
6912
+ return /* @__PURE__ */ jsx84(SOT963, {});
6199
6913
  case "pushbutton":
6200
- return /* @__PURE__ */ jsx76(
6914
+ return /* @__PURE__ */ jsx84(
6201
6915
  PushButton,
6202
6916
  {
6203
6917
  width: fpJson.w,
@@ -6207,11 +6921,14 @@ var Footprinter3d = ({ footprint }) => {
6207
6921
  );
6208
6922
  case "jst":
6209
6923
  if (fpJson.zh) {
6210
- return /* @__PURE__ */ jsx76(JSTZH1_5mm, { numPins: fpJson.num_pins });
6924
+ return /* @__PURE__ */ jsx84(JSTZH1_5mm, { numPins: fpJson.num_pins });
6925
+ }
6926
+ if (fpJson.ph) {
6927
+ return /* @__PURE__ */ jsx84(JSTPH2_0mm, { numPins: fpJson.num_pins });
6211
6928
  }
6212
6929
  break;
6213
6930
  case "fpc":
6214
- return /* @__PURE__ */ jsx76(
6931
+ return /* @__PURE__ */ jsx84(
6215
6932
  FPC,
6216
6933
  {
6217
6934
  pinCount: fpJson.num_pins,
@@ -6231,7 +6948,7 @@ var Footprinter3d = ({ footprint }) => {
6231
6948
  }
6232
6949
  );
6233
6950
  case "rj45":
6234
- return /* @__PURE__ */ jsx76(
6951
+ return /* @__PURE__ */ jsx84(
6235
6952
  RJ45,
6236
6953
  {
6237
6954
  bodyWidth: fpJson.w,
@@ -6255,7 +6972,9 @@ var Footprinter3d = ({ footprint }) => {
6255
6972
  }
6256
6973
  );
6257
6974
  case "soic":
6258
- return /* @__PURE__ */ jsx76(
6975
+ case "sop8":
6976
+ case "ssop":
6977
+ return /* @__PURE__ */ jsx84(
6259
6978
  SOIC,
6260
6979
  {
6261
6980
  pinCount: fpJson.num_pins,
@@ -6265,44 +6984,178 @@ var Footprinter3d = ({ footprint }) => {
6265
6984
  bodyWidth: fpJson.w
6266
6985
  }
6267
6986
  );
6987
+ case "son":
6988
+ case "wson":
6989
+ case "vson": {
6990
+ const bodyWidth = fpJson.fn === "vson" ? dim(fpJson.grid?.x, 3) : dim(fpJson.w, 3);
6991
+ const bodyLength10 = fpJson.fn === "vson" ? dim(fpJson.grid?.y, 3) : dim(fpJson.h, 3);
6992
+ const thermalPadWidth = dim(fpJson.epw, 0);
6993
+ const thermalPadLength = dim(fpJson.eph, 0);
6994
+ const padLength = fpJson.pl !== void 0 ? dim(fpJson.pl, 0) : void 0;
6995
+ const padWidth = fpJson.pw !== void 0 ? dim(fpJson.pw, 0) : void 0;
6996
+ const signalPads = getSmtPadRects(normalizedFootprint).filter(
6997
+ (pad) => Number(pad.pin ?? 0) <= fpJson.num_pins
6998
+ );
6999
+ const distinct = (values) => new Set(values.map((value) => value.toFixed(3))).size;
7000
+ const rowsAlongY = signalPads.length > 2 && distinct(signalPads.map((pad) => pad.y)) === 2 && distinct(signalPads.map((pad) => pad.x)) > 2;
7001
+ const dfn = /* @__PURE__ */ jsx84(
7002
+ DFN,
7003
+ {
7004
+ num_pins: fpJson.num_pins,
7005
+ bodyWidth: rowsAlongY ? bodyLength10 : bodyWidth,
7006
+ bodyLength: rowsAlongY ? bodyWidth : bodyLength10,
7007
+ pitch: dim(fpJson.p, 0.5),
7008
+ padLength,
7009
+ padWidth,
7010
+ thermalPadSize: fpJson.ep && thermalPadWidth > 0 && thermalPadLength > 0 ? {
7011
+ width: rowsAlongY ? thermalPadLength : thermalPadWidth,
7012
+ length: rowsAlongY ? thermalPadWidth : thermalPadLength
7013
+ } : void 0
7014
+ }
7015
+ );
7016
+ return rowsAlongY ? /* @__PURE__ */ jsx84(Rotate18, { rotation: [0, 0, "90deg"], children: dfn }) : dfn;
7017
+ }
7018
+ case "mlp":
7019
+ case "lga":
7020
+ case "quad": {
7021
+ if (fpJson.legsoutside) {
7022
+ return /* @__PURE__ */ jsx84(
7023
+ QFP,
7024
+ {
7025
+ pinCount: fpJson.num_pins,
7026
+ pitch: dim(fpJson.p, 0.5),
7027
+ leadWidth: dim(fpJson.pw, 0.25),
7028
+ padContactLength: dim(fpJson.pl, 0.25),
7029
+ bodyWidth: dim(fpJson.w, 6)
7030
+ }
7031
+ );
7032
+ }
7033
+ return /* @__PURE__ */ jsx84(
7034
+ qfn_default,
7035
+ {
7036
+ num_pins: fpJson.num_pins,
7037
+ bodyWidth: dim(fpJson.w, 6),
7038
+ bodyLength: dim(fpJson.h, 6),
7039
+ pitch: dim(fpJson.p, 0.5),
7040
+ padLength: dim(fpJson.pl, 0.25),
7041
+ padWidth: dim(fpJson.pw, 0.25)
7042
+ }
7043
+ );
7044
+ }
7045
+ case "bga": {
7046
+ const pitch = dim(fpJson.p, 0.8);
7047
+ const columns = fpJson.grid?.x ?? 8;
7048
+ const rows = fpJson.grid?.y ?? 8;
7049
+ return /* @__PURE__ */ jsx84(
7050
+ BGA,
7051
+ {
7052
+ ballPitch: pitch,
7053
+ ballColumns: columns,
7054
+ ballRows: rows,
7055
+ ballDiameter: pitch * 0.625,
7056
+ packageWidth: columns * pitch,
7057
+ packageLength: rows * pitch
7058
+ }
7059
+ );
7060
+ }
6268
7061
  case "sod523":
6269
- return /* @__PURE__ */ jsx76(SOD523, {});
7062
+ return /* @__PURE__ */ jsx84(SOD523, {});
6270
7063
  case "sod723":
6271
- return /* @__PURE__ */ jsx76(SOD723_default, {});
7064
+ return /* @__PURE__ */ jsx84(SOD723_default, {});
6272
7065
  case "sod882":
6273
- return /* @__PURE__ */ jsx76(SOD882, {});
7066
+ return /* @__PURE__ */ jsx84(SOD882, {});
6274
7067
  case "sma":
6275
- return /* @__PURE__ */ jsx76(SMA, {});
7068
+ return /* @__PURE__ */ jsx84(SMA, {});
6276
7069
  case "smb":
6277
- return /* @__PURE__ */ jsx76(SMB, {});
7070
+ return /* @__PURE__ */ jsx84(SMB, {});
6278
7071
  case "smc":
6279
- return /* @__PURE__ */ jsx76(SMC, {});
7072
+ return /* @__PURE__ */ jsx84(SMC, {});
6280
7073
  case "smf":
6281
- return /* @__PURE__ */ jsx76(SMF, {});
7074
+ return /* @__PURE__ */ jsx84(SMF, {});
6282
7075
  case "sod123":
6283
- return /* @__PURE__ */ jsx76(SOD123, {});
7076
+ return /* @__PURE__ */ jsx84(SOD123, {});
6284
7077
  case "sod123f":
6285
- return /* @__PURE__ */ jsx76(SOD123F, {});
7078
+ return /* @__PURE__ */ jsx84(SOD123F, {});
6286
7079
  case "sod123fl":
6287
- return /* @__PURE__ */ jsx76(SOD123FL, {});
7080
+ return /* @__PURE__ */ jsx84(SOD123FL, {});
6288
7081
  case "sod123w":
6289
- return /* @__PURE__ */ jsx76(SOD123W, {});
7082
+ return /* @__PURE__ */ jsx84(SOD123W, {});
7083
+ case "sod110":
7084
+ return /* @__PURE__ */ jsx84(SOD123W, { bodyWidth: 2.1, bodyLength: 1.4 });
6290
7085
  case "sod128":
6291
- return /* @__PURE__ */ jsx76(SOD128, {});
7086
+ return /* @__PURE__ */ jsx84(SOD128, {});
6292
7087
  case "sod323":
6293
- return /* @__PURE__ */ jsx76(SOD323, {});
7088
+ return /* @__PURE__ */ jsx84(SOD323, {});
7089
+ case "sod323w":
7090
+ return /* @__PURE__ */ jsx84(SOD323, {});
7091
+ case "sod80":
7092
+ return /* @__PURE__ */ jsx84(MINIMELF, {});
7093
+ case "sod882d":
7094
+ return /* @__PURE__ */ jsx84(SOD882, {});
7095
+ case "smbf":
7096
+ return /* @__PURE__ */ jsx84(SMB, {});
7097
+ case "led2835":
7098
+ return /* @__PURE__ */ jsx84(
7099
+ Led2835,
7100
+ {
7101
+ color,
7102
+ bodyWidth: dim(fpJson.w, 3.5),
7103
+ bodyLength: dim(fpJson.h, 2.8),
7104
+ pad1X: dim(fpJson.p1x, -0.9),
7105
+ pad1Width: dim(fpJson.p1w, 2.2),
7106
+ pad2X: dim(fpJson.p2x, 1.375),
7107
+ pad2Width: dim(fpJson.p2w, 1.25),
7108
+ padLength: dim(fpJson.ph, 2.2)
7109
+ }
7110
+ );
7111
+ case "electrolytic":
7112
+ case "radial": {
7113
+ const pitch = dim(fpJson.p, 2.5);
7114
+ const namedDiameter = footprint.match(/_d([\d.]+)/);
7115
+ const diameter = fpJson.d !== void 0 ? dim(fpJson.d, pitch * 2) : namedDiameter ? Number(namedDiameter[1]) : pitch * 2;
7116
+ return /* @__PURE__ */ jsx84(ElectrolyticCapacitor, { diameter, leadPitch: pitch });
7117
+ }
7118
+ case "potentiometer":
7119
+ return /* @__PURE__ */ jsx84(
7120
+ Potentiometer,
7121
+ {
7122
+ bodyWidth: dim(fpJson.w, 5.35),
7123
+ bodyLength: dim(fpJson.ca, 14),
7124
+ bodyHeight: dim(fpJson.h, 4),
7125
+ leads: getPlatedHoleCenters(normalizedFootprint)
7126
+ }
7127
+ );
7128
+ case "smdpushbutton":
7129
+ return /* @__PURE__ */ jsx84(
7130
+ SmdPushButton,
7131
+ {
7132
+ padSpanX: dim(fpJson.px, 4.2),
7133
+ padSpanY: dim(fpJson.py, 2.15),
7134
+ padWidth: dim(fpJson.pw, 1.05),
7135
+ padLength: dim(fpJson.ph, 0.7)
7136
+ }
7137
+ );
7138
+ case "breakoutheaders": {
7139
+ const pitch = dim(fpJson.p, 2.54);
7140
+ const halfWidth = dim(fpJson.w, 10) / 2;
7141
+ const sides = [
7142
+ { x: -halfWidth, pins: fpJson.left ?? 0, key: "left" },
7143
+ { x: halfWidth, pins: fpJson.right ?? 0, key: "right" }
7144
+ ];
7145
+ return /* @__PURE__ */ jsx84(Fragment79, { children: sides.filter(({ pins }) => pins > 0).map(({ x, pins, key }) => /* @__PURE__ */ jsx84(Translate38, { center: [x, 0, 0], children: /* @__PURE__ */ jsx84(Rotate18, { rotation: [0, 0, "90deg"], children: /* @__PURE__ */ jsx84(PinRow, { numberOfPins: pins, pitch }) }) }, key)) });
7146
+ }
6294
7147
  case "sod923":
6295
- return /* @__PURE__ */ jsx76(SOD923, {});
7148
+ return /* @__PURE__ */ jsx84(SOD923, {});
6296
7149
  case "hc49":
6297
- return /* @__PURE__ */ jsx76(HC49, {});
7150
+ return /* @__PURE__ */ jsx84(HC49, {});
6298
7151
  case "micromelf":
6299
- return /* @__PURE__ */ jsx76(MicroMELF, {});
7152
+ return /* @__PURE__ */ jsx84(MicroMELF, {});
6300
7153
  case "minimelf":
6301
- return /* @__PURE__ */ jsx76(MINIMELF, {});
7154
+ return /* @__PURE__ */ jsx84(MINIMELF, {});
6302
7155
  case "melf":
6303
- return /* @__PURE__ */ jsx76(MELF, {});
7156
+ return /* @__PURE__ */ jsx84(MELF, {});
6304
7157
  case "ms012":
6305
- return /* @__PURE__ */ jsx76(
7158
+ return /* @__PURE__ */ jsx84(
6306
7159
  MS012,
6307
7160
  {
6308
7161
  pinCount: fpJson.num_pins,
@@ -6312,7 +7165,7 @@ var Footprinter3d = ({ footprint }) => {
6312
7165
  }
6313
7166
  );
6314
7167
  case "ms013":
6315
- return /* @__PURE__ */ jsx76(
7168
+ return /* @__PURE__ */ jsx84(
6316
7169
  MS013,
6317
7170
  {
6318
7171
  pinCount: fpJson.num_pins,
@@ -6322,14 +7175,55 @@ var Footprinter3d = ({ footprint }) => {
6322
7175
  }
6323
7176
  );
6324
7177
  case "sot723":
6325
- return /* @__PURE__ */ jsx76(SOT723, {});
7178
+ return /* @__PURE__ */ jsx84(SOT723, {});
6326
7179
  case "to220":
6327
- return /* @__PURE__ */ jsx76(TO220, {});
7180
+ return /* @__PURE__ */ jsx84(TO220, { leads: getPlatedHoleCenters(normalizedFootprint) });
7181
+ case "to220f":
7182
+ return /* @__PURE__ */ jsx84(TO220, { mouldedTab: true, leads: getPlatedHoleCenters(normalizedFootprint) });
6328
7183
  case "to92":
6329
- return /* @__PURE__ */ jsx76(TO92, {});
7184
+ return /* @__PURE__ */ jsx84(TO92, { leads: getPlatedHoleCenters(normalizedFootprint) });
7185
+ case "to92l":
7186
+ case "to92s": {
7187
+ const across = dim(fpJson.w, 4.8);
7188
+ const along = dim(fpJson.h, 4);
7189
+ const diameter = Math.max(across, along);
7190
+ return /* @__PURE__ */ jsx84(
7191
+ TO92,
7192
+ {
7193
+ bodyDiameter: diameter,
7194
+ flatCut: Math.max(diameter - Math.min(across, along), 0.4),
7195
+ leads: getPlatedHoleCenters(normalizedFootprint)
7196
+ }
7197
+ );
7198
+ }
7199
+ case "to252":
7200
+ case "dpak":
7201
+ case "to263":
7202
+ case "d2pak": {
7203
+ const isD2Pak = fpJson.fn === "to263" || fpJson.fn === "d2pak";
7204
+ const tabWidth = dim(fpJson.tabw, isD2Pak ? 8.38 : 6.2);
7205
+ const tabLength = Math.min(
7206
+ dim(fpJson.tabh, isD2Pak ? 10 : 5.8),
7207
+ isD2Pak ? 10 : 6.5
7208
+ );
7209
+ return /* @__PURE__ */ jsx84(
7210
+ DPAK,
7211
+ {
7212
+ bodyWidth: tabWidth,
7213
+ bodyLength: dim(fpJson.w, isD2Pak ? 10.1 : 6.6),
7214
+ bodyHeight: isD2Pak ? 4.4 : 2.3,
7215
+ tabWidth,
7216
+ tabLength,
7217
+ span: dim(fpJson.span, isD2Pak ? 10.21 : 6.85),
7218
+ pitch: dim(fpJson.p, isD2Pak ? 2.54 : 2.29),
7219
+ leadWidth: dim(fpJson.pw, 1.5),
7220
+ leadContactLength: dim(fpJson.pl, 3)
7221
+ }
7222
+ );
7223
+ }
6330
7224
  case "stampboard":
6331
7225
  case "stampreceiver":
6332
- return /* @__PURE__ */ jsx76(
7226
+ return /* @__PURE__ */ jsx84(
6333
7227
  StampBoard,
6334
7228
  {
6335
7229
  bodyWidth: fpJson.w,
@@ -6353,7 +7247,7 @@ var Footprinter3d = ({ footprint }) => {
6353
7247
  const pinRow = fpJson.pinrow;
6354
7248
  const pinRowHoleEdgeToEdgeDist = fpJson.pinRowHoleEdgeToEdgeDist;
6355
7249
  const holes = Array.isArray(fpJson.holes) ? fpJson.holes : [];
6356
- return /* @__PURE__ */ jsx76(
7250
+ return /* @__PURE__ */ jsx84(
6357
7251
  MountedPcbModule,
6358
7252
  {
6359
7253
  numPins: pinRow,
@@ -6380,29 +7274,29 @@ var Footprinter3d = ({ footprint }) => {
6380
7274
  }
6381
7275
  switch (fpJson.imperial) {
6382
7276
  case "0402":
6383
- return /* @__PURE__ */ jsx76(A0402, { color });
7277
+ return /* @__PURE__ */ jsx84(A0402, { color });
6384
7278
  case "0603":
6385
- return /* @__PURE__ */ jsx76(A0603, { color });
7279
+ return /* @__PURE__ */ jsx84(A0603, { color });
6386
7280
  case "0805":
6387
- return /* @__PURE__ */ jsx76(A0805, { color });
7281
+ return /* @__PURE__ */ jsx84(A0805, { color });
6388
7282
  case "0201":
6389
- return /* @__PURE__ */ jsx76(A0201, { color });
7283
+ return /* @__PURE__ */ jsx84(A0201, { color });
6390
7284
  case "01005":
6391
- return /* @__PURE__ */ jsx76(A01005, { color });
7285
+ return /* @__PURE__ */ jsx84(A01005, { color });
6392
7286
  case "1206":
6393
- return /* @__PURE__ */ jsx76(A1206, { color });
7287
+ return /* @__PURE__ */ jsx84(A1206, { color });
6394
7288
  case "1210":
6395
- return /* @__PURE__ */ jsx76(A1210, { color });
7289
+ return /* @__PURE__ */ jsx84(A1210, { color });
6396
7290
  case "2010":
6397
- return /* @__PURE__ */ jsx76(A2010, { color });
7291
+ return /* @__PURE__ */ jsx84(A2010, { color });
6398
7292
  case "2512":
6399
- return /* @__PURE__ */ jsx76(A2512, { color });
7293
+ return /* @__PURE__ */ jsx84(A2512, { color });
6400
7294
  }
6401
7295
  if ((fpJson.fn === "res" || fpJson.fn === "cap") && fpJson.p !== void 0 && fpJson.ph !== void 0) {
6402
7296
  const padPitch = mm(fpJson.p);
6403
7297
  const padHeight = mm(fpJson.ph);
6404
7298
  if (Number.isFinite(padPitch) && Number.isFinite(padHeight)) {
6405
- return /* @__PURE__ */ jsx76(
7299
+ return /* @__PURE__ */ jsx84(
6406
7300
  ParametricChip,
6407
7301
  {
6408
7302
  padPitch,
@@ -6414,47 +7308,6 @@ var Footprinter3d = ({ footprint }) => {
6414
7308
  }
6415
7309
  return null;
6416
7310
  };
6417
-
6418
- // lib/SOT-563.tsx
6419
- import { Cuboid as Cuboid51, Translate as Translate35, Rotate as Rotate16, Colorize as Colorize42 } from "jscad-fiber";
6420
- import { Fragment as Fragment70, jsx as jsx77, jsxs as jsxs72 } from "react/jsx-runtime";
6421
- var SOT563 = ({ fullWidth = 1.94, fullLength: fullLength10 = 1.6 }) => {
6422
- const bodyWidth = 1.2;
6423
- const bodyLength10 = 1.6;
6424
- const bodyHeight = 0.55;
6425
- const leadWidth = 0.3;
6426
- const leadLength = 0.67;
6427
- const leadHeight = 0.13;
6428
- const leadSpacing = 0.5;
6429
- const bodyZOffset = -0.4;
6430
- return /* @__PURE__ */ jsxs72(Fragment70, { children: [
6431
- /* @__PURE__ */ jsx77(Rotate16, { rotation: [45 * Math.PI, 0, 0], children: /* @__PURE__ */ jsx77(Translate35, { center: [0, 0, bodyZOffset], children: /* @__PURE__ */ jsx77(Colorize42, { color: "grey", children: /* @__PURE__ */ jsx77(Cuboid51, { size: [bodyWidth, bodyLength10, bodyHeight] }) }) }) }),
6432
- [-1, 0, 1].flatMap((yOffset, index) => [
6433
- // Left lead
6434
- /* @__PURE__ */ jsx77(
6435
- Translate35,
6436
- {
6437
- center: [
6438
- -bodyWidth / 2 - 0.03,
6439
- yOffset * leadSpacing,
6440
- leadHeight / 2
6441
- ],
6442
- children: /* @__PURE__ */ jsx77(Cuboid51, { size: [leadLength, leadWidth, leadHeight] })
6443
- },
6444
- `left-${index}`
6445
- ),
6446
- // Right lead
6447
- /* @__PURE__ */ jsx77(
6448
- Translate35,
6449
- {
6450
- center: [bodyWidth / 2 + 0.03, yOffset * leadSpacing, leadHeight / 2],
6451
- children: /* @__PURE__ */ jsx77(Cuboid51, { size: [leadLength, leadWidth, leadHeight] })
6452
- },
6453
- `right-${index}`
6454
- )
6455
- ])
6456
- ] });
6457
- };
6458
7311
  export {
6459
7312
  A01005,
6460
7313
  A0201,
@@ -6470,7 +7323,9 @@ export {
6470
7323
  ChipBody,
6471
7324
  Crystal,
6472
7325
  DFN,
7326
+ DPAK,
6473
7327
  Display,
7328
+ ElectrolyticCapacitor,
6474
7329
  ExtrudedPads,
6475
7330
  FPC,
6476
7331
  FemaleHeader,
@@ -6478,9 +7333,12 @@ export {
6478
7333
  FootprintPad,
6479
7334
  FootprintPlatedHole,
6480
7335
  Footprinter3d,
7336
+ GullWingBody,
6481
7337
  HC49,
7338
+ JSTPH2_0mm,
6482
7339
  JSTZH1_5mm,
6483
7340
  LQFP,
7341
+ Led2835,
6484
7342
  Led5050,
6485
7343
  MELF,
6486
7344
  MINIMELF,
@@ -6491,6 +7349,7 @@ export {
6491
7349
  MountedPcbModule,
6492
7350
  PinHeader,
6493
7351
  PinRow,
7352
+ Potentiometer,
6494
7353
  QFN,
6495
7354
  QFP,
6496
7355
  RJ45,
@@ -6523,6 +7382,7 @@ export {
6523
7382
  Screen,
6524
7383
  SmdChipLead,
6525
7384
  SmdPinHeader,
7385
+ SmdPushButton,
6526
7386
  StampBoard,
6527
7387
  TO220,
6528
7388
  TO92,