jscad-electronics 0.0.164 → 0.0.165

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
@@ -962,9 +962,9 @@ var TantalumCapacitor = ({
962
962
  };
963
963
 
964
964
  // lib/Footprinter3d.tsx
965
- import { fp as fp12 } from "@tscircuit/footprinter";
965
+ import { fp as fp14 } from "@tscircuit/footprinter";
966
966
  import { mp } from "@tscircuit/modelprinter";
967
- import { Rotate as Rotate26, Translate as Translate45 } from "jscad-fiber";
967
+ import { Rotate as Rotate28, Translate as Translate45 } from "jscad-fiber";
968
968
 
969
969
  // lib/DualInlinePackage.tsx
970
970
  import { Polygon as Polygon3, ExtrudeLinear as ExtrudeLinear3, Rotate as Rotate8, Translate as Translate10 } from "jscad-fiber";
@@ -5843,17 +5843,120 @@ var JSTXH2_5mm = ({
5843
5843
  ] });
5844
5844
  };
5845
5845
 
5846
+ // lib/JstSh.tsx
5847
+ import { fp as fp8 } from "@tscircuit/footprinter";
5848
+ import { mm } from "@tscircuit/mm";
5849
+ import { Colorize as Colorize43, Cuboid as Cuboid51, Rotate as Rotate19, Subtract as Subtract12, Union as Union22 } from "jscad-fiber";
5850
+ import { jsx as jsx77, jsxs as jsxs73 } from "react/jsx-runtime";
5851
+ function isJstShFootprint(footprint) {
5852
+ const p = fp8.string(footprint).json();
5853
+ if (p.fn !== "jst") return false;
5854
+ return Boolean(
5855
+ p.sh || p.smd && Math.abs(mm(p.p) - 1) < 0.01 && Math.abs(mm(p.mpx ?? 0) - (p.num_pins - 1 + 2.6)) < 0.15 && Math.abs(mm(p.mpy ?? 0) - 2.525) < 0.15
5856
+ );
5857
+ }
5858
+ var JstSh = ({ footprint = "jst6_sh" }) => {
5859
+ if (!isJstShFootprint(footprint))
5860
+ throw new Error(
5861
+ "JstSh requires a named SH or matching 1mm SH top-entry footprint"
5862
+ );
5863
+ const canonical = footprint.replace(/_pin1location\([^)]*\)/g, "");
5864
+ const params = fp8.string(canonical).json();
5865
+ const pads = fp8.string(canonical).circuitJson().filter((e) => e.type === "pcb_smtpad" && e.shape === "rect");
5866
+ const target = fp8.string(footprint).circuitJson().filter(
5867
+ (e) => e.type === "pcb_smtpad" && (e.shape === "rect" || e.shape === "rotated_rect")
5868
+ );
5869
+ const n = params.num_pins;
5870
+ if (!Number.isInteger(n) || n < 2 || n > 20 || pads.length !== n + 2)
5871
+ throw new Error("JstSh requires 2\u201320 contacts and two hold-down pads");
5872
+ const signals = pads.slice(0, n), mounts = pads.slice(n);
5873
+ const angle = Math.atan2(target[1].y - target[0].y, target[1].x - target[0].x) - Math.atan2(pads[1].y - pads[0].y, pads[1].x - pads[0].x);
5874
+ const x = signals.reduce((sum, p) => sum + p.x, 0) / n, rowY = signals[0].y;
5875
+ const direction = mounts[0].y > rowY ? 1 : -1;
5876
+ const y = rowY + direction * 1.8, width10 = n + 2, depth = 2.9, height10 = 4.2;
5877
+ const pinY = y - direction * 0.25;
5878
+ return /* @__PURE__ */ jsxs73(Rotate19, { rotation: [0, 0, angle], children: [
5879
+ /* @__PURE__ */ jsx77(Colorize43, { color: "#e4e1d6", children: /* @__PURE__ */ jsxs73(Subtract12, { children: [
5880
+ /* @__PURE__ */ jsx77(
5881
+ Cuboid51,
5882
+ {
5883
+ size: [width10, depth, height10],
5884
+ center: [x, y, height10 / 2 + 0.05]
5885
+ }
5886
+ ),
5887
+ /* @__PURE__ */ jsx77(
5888
+ Cuboid51,
5889
+ {
5890
+ size: [width10 - 1.3, 1.8, height10],
5891
+ center: [x, y, height10 / 2 + 0.8]
5892
+ }
5893
+ ),
5894
+ mounts.map((pad, i) => /* @__PURE__ */ jsx77(
5895
+ Cuboid51,
5896
+ {
5897
+ size: [0.7, pad.height * 0.8, 1.5],
5898
+ center: [pad.x, pad.y, 0.75]
5899
+ },
5900
+ `recess-${i}`
5901
+ )),
5902
+ [-1, 1].map((side) => /* @__PURE__ */ jsx77(
5903
+ Cuboid51,
5904
+ {
5905
+ size: [0.55, 0.6, 1],
5906
+ center: [
5907
+ x + side * (width10 / 2 - 0.9),
5908
+ y + direction * depth / 2,
5909
+ 4
5910
+ ]
5911
+ },
5912
+ side
5913
+ ))
5914
+ ] }) }),
5915
+ /* @__PURE__ */ jsxs73(Colorize43, { color: "#c6c7c9", children: [
5916
+ signals.map((pad, i) => {
5917
+ const tailY = pad.y - direction * pad.height * 0.4;
5918
+ return /* @__PURE__ */ jsxs73(Union22, { children: [
5919
+ /* @__PURE__ */ jsx77(
5920
+ Cuboid51,
5921
+ {
5922
+ size: [0.2, Math.abs(pinY - tailY) + 0.1, 0.2],
5923
+ center: [pad.x, (pinY + tailY) / 2, 0.1]
5924
+ }
5925
+ ),
5926
+ /* @__PURE__ */ jsx77(Cuboid51, { size: [0.2, 0.2, 3.45], center: [pad.x, pinY, 1.725] })
5927
+ ] }, i);
5928
+ }),
5929
+ mounts.map((pad, i) => /* @__PURE__ */ jsxs73(Union22, { children: [
5930
+ /* @__PURE__ */ jsx77(
5931
+ Cuboid51,
5932
+ {
5933
+ size: [0.7, pad.height * 0.75, 0.2],
5934
+ center: [pad.x, pad.y, 0.1]
5935
+ }
5936
+ ),
5937
+ /* @__PURE__ */ jsx77(
5938
+ Cuboid51,
5939
+ {
5940
+ size: [0.2, pad.height * 0.6, 1.35],
5941
+ center: [pad.x, pad.y, 0.675]
5942
+ }
5943
+ )
5944
+ ] }, `mount-${i}`))
5945
+ ] })
5946
+ ] });
5947
+ };
5948
+
5846
5949
  // lib/FPC.tsx
5847
5950
  import {
5848
- Colorize as Colorize43,
5849
- Cuboid as Cuboid51,
5951
+ Colorize as Colorize44,
5952
+ Cuboid as Cuboid52,
5850
5953
  Cylinder as Cylinder16,
5851
- Rotate as Rotate19,
5954
+ Rotate as Rotate20,
5852
5955
  RoundedCuboid as RoundedCuboid4,
5853
- Subtract as Subtract12,
5956
+ Subtract as Subtract13,
5854
5957
  Translate as Translate37
5855
5958
  } from "jscad-fiber";
5856
- import { Fragment as Fragment68, jsx as jsx77, jsxs as jsxs73 } from "react/jsx-runtime";
5959
+ import { Fragment as Fragment68, jsx as jsx78, jsxs as jsxs74 } from "react/jsx-runtime";
5857
5960
  var HOUSING_COLOR = "#303339";
5858
5961
  var HOUSING_SHADOW = "#1f2227";
5859
5962
  var ACTUATOR_COLOR = "#eee8d8";
@@ -5940,9 +6043,9 @@ var FPC = ({
5940
6043
  const clipCapX = bodyWidth / 2 - 0.23;
5941
6044
  const sideBossX = bodyWidth / 2 - 0.32;
5942
6045
  const sideBossWidth = 0.68;
5943
- return /* @__PURE__ */ jsxs73(Fragment68, { children: [
5944
- [-1, 1].map((direction) => /* @__PURE__ */ jsx77(
5945
- Cuboid51,
6046
+ return /* @__PURE__ */ jsxs74(Fragment68, { children: [
6047
+ [-1, 1].map((direction) => /* @__PURE__ */ jsx78(
6048
+ Cuboid52,
5946
6049
  {
5947
6050
  color: TIN_COLOR,
5948
6051
  center: [direction * endClipX, mountY, 0.07],
@@ -5950,8 +6053,8 @@ var FPC = ({
5950
6053
  },
5951
6054
  `mount-pad:${direction}`
5952
6055
  )),
5953
- contactRows.map((contact) => /* @__PURE__ */ jsx77(
5954
- Cuboid51,
6056
+ contactRows.map((contact) => /* @__PURE__ */ jsx78(
6057
+ Cuboid52,
5955
6058
  {
5956
6059
  color: TIN_COLOR,
5957
6060
  center: [contact.x, terminalCenterY, 0.065],
@@ -5959,7 +6062,7 @@ var FPC = ({
5959
6062
  },
5960
6063
  `terminal:${contact.index}`
5961
6064
  )),
5962
- /* @__PURE__ */ jsx77(
6065
+ /* @__PURE__ */ jsx78(
5963
6066
  RoundedCuboid4,
5964
6067
  {
5965
6068
  color: HOUSING_SHADOW,
@@ -5968,8 +6071,8 @@ var FPC = ({
5968
6071
  roundRadius: 0.1
5969
6072
  }
5970
6073
  ),
5971
- /* @__PURE__ */ jsx77(Colorize43, { color: HOUSING_COLOR, children: /* @__PURE__ */ jsxs73(Subtract12, { children: [
5972
- /* @__PURE__ */ jsx77(
6074
+ /* @__PURE__ */ jsx78(Colorize44, { color: HOUSING_COLOR, children: /* @__PURE__ */ jsxs74(Subtract13, { children: [
6075
+ /* @__PURE__ */ jsx78(
5973
6076
  RoundedCuboid4,
5974
6077
  {
5975
6078
  center: [0, housingCenterY, housingBaseHeight + housingHeight / 2],
@@ -5977,22 +6080,22 @@ var FPC = ({
5977
6080
  roundRadius: 0.14
5978
6081
  }
5979
6082
  ),
5980
- /* @__PURE__ */ jsx77(
5981
- Cuboid51,
6083
+ /* @__PURE__ */ jsx78(
6084
+ Cuboid52,
5982
6085
  {
5983
6086
  center: [0, throatCenterY, throatCenterZ],
5984
6087
  size: [openingWidth, throatDepth, throatHeight]
5985
6088
  }
5986
6089
  ),
5987
- /* @__PURE__ */ jsx77(
5988
- Cuboid51,
6090
+ /* @__PURE__ */ jsx78(
6091
+ Cuboid52,
5989
6092
  {
5990
6093
  center: [0, actuatorCenterY, overallHeight - actuatorHeight * 0.72],
5991
6094
  size: [actuatorWidth - 0.32, actuatorDepth - 0.16, actuatorHeight]
5992
6095
  }
5993
6096
  )
5994
6097
  ] }) }),
5995
- contactRows.map((contact) => /* @__PURE__ */ jsx77(
6098
+ contactRows.map((contact) => /* @__PURE__ */ jsx78(
5996
6099
  RoundedCuboid4,
5997
6100
  {
5998
6101
  color: TIN_HIGHLIGHT,
@@ -6002,8 +6105,8 @@ var FPC = ({
6002
6105
  },
6003
6106
  `spring:${contact.index}`
6004
6107
  )),
6005
- contactRows.map((contact) => /* @__PURE__ */ jsx77(
6006
- Cuboid51,
6108
+ contactRows.map((contact) => /* @__PURE__ */ jsx78(
6109
+ Cuboid52,
6007
6110
  {
6008
6111
  color: TIN_COLOR,
6009
6112
  center: [
@@ -6015,8 +6118,8 @@ var FPC = ({
6015
6118
  },
6016
6119
  `terminal-rise:${contact.index}`
6017
6120
  )),
6018
- /* @__PURE__ */ jsx77(
6019
- Cuboid51,
6121
+ /* @__PURE__ */ jsx78(
6122
+ Cuboid52,
6020
6123
  {
6021
6124
  color: HOUSING_SHADOW,
6022
6125
  center: [
@@ -6027,7 +6130,7 @@ var FPC = ({
6027
6130
  size: [openingWidth + 0.18, 0.16, 0.8]
6028
6131
  }
6029
6132
  ),
6030
- /* @__PURE__ */ jsx77(
6133
+ /* @__PURE__ */ jsx78(
6031
6134
  RoundedCuboid4,
6032
6135
  {
6033
6136
  color: ACTUATOR_COLOR,
@@ -6036,8 +6139,8 @@ var FPC = ({
6036
6139
  roundRadius: 0.11
6037
6140
  }
6038
6141
  ),
6039
- /* @__PURE__ */ jsx77(
6040
- Cuboid51,
6142
+ /* @__PURE__ */ jsx78(
6143
+ Cuboid52,
6041
6144
  {
6042
6145
  color: ACTUATOR_HIGHLIGHT,
6043
6146
  center: [
@@ -6048,7 +6151,7 @@ var FPC = ({
6048
6151
  size: [actuatorWidth - 0.36, 0.24, 0.07]
6049
6152
  }
6050
6153
  ),
6051
- [-1, 1].map((direction) => /* @__PURE__ */ jsx77(
6154
+ [-1, 1].map((direction) => /* @__PURE__ */ jsx78(
6052
6155
  RoundedCuboid4,
6053
6156
  {
6054
6157
  color: ACTUATOR_COLOR,
@@ -6058,13 +6161,13 @@ var FPC = ({
6058
6161
  },
6059
6162
  `actuator-ear:${direction}`
6060
6163
  )),
6061
- [-1, 1].map((direction) => /* @__PURE__ */ jsx77(
6164
+ [-1, 1].map((direction) => /* @__PURE__ */ jsx78(
6062
6165
  Translate37,
6063
6166
  {
6064
6167
  x: direction * sideBossX,
6065
6168
  y: hingeY,
6066
6169
  z: hingeZ,
6067
- children: /* @__PURE__ */ jsx77(Rotate19, { rotation: [0, Math.PI / 2, 0], children: /* @__PURE__ */ jsx77(
6170
+ children: /* @__PURE__ */ jsx78(Rotate20, { rotation: [0, Math.PI / 2, 0], children: /* @__PURE__ */ jsx78(
6068
6171
  Cylinder16,
6069
6172
  {
6070
6173
  color: ACTUATOR_HIGHLIGHT,
@@ -6075,7 +6178,7 @@ var FPC = ({
6075
6178
  },
6076
6179
  `hinge:${direction}`
6077
6180
  )),
6078
- [-1, 1].map((direction) => /* @__PURE__ */ jsx77(
6181
+ [-1, 1].map((direction) => /* @__PURE__ */ jsx78(
6079
6182
  RoundedCuboid4,
6080
6183
  {
6081
6184
  color: HOLD_DOWN_COLOR,
@@ -6085,7 +6188,7 @@ var FPC = ({
6085
6188
  },
6086
6189
  `hold-down-wall:${direction}`
6087
6190
  )),
6088
- [-1, 1].map((direction) => /* @__PURE__ */ jsx77(
6191
+ [-1, 1].map((direction) => /* @__PURE__ */ jsx78(
6089
6192
  RoundedCuboid4,
6090
6193
  {
6091
6194
  color: HOLD_DOWN_HIGHLIGHT,
@@ -6095,16 +6198,16 @@ var FPC = ({
6095
6198
  },
6096
6199
  `hold-down-cap:${direction}`
6097
6200
  )),
6098
- /* @__PURE__ */ jsx77(
6099
- Cuboid51,
6201
+ /* @__PURE__ */ jsx78(
6202
+ Cuboid52,
6100
6203
  {
6101
6204
  color: HOUSING_SHADOW,
6102
6205
  center: [0, housingCenterY, 0.025],
6103
6206
  size: [openingWidth + 0.7, housingDepth * 0.58, 0.05]
6104
6207
  }
6105
6208
  ),
6106
- /* @__PURE__ */ jsx77(
6107
- Cuboid51,
6209
+ /* @__PURE__ */ jsx78(
6210
+ Cuboid52,
6108
6211
  {
6109
6212
  color: HOUSING_SHADOW,
6110
6213
  center: [
@@ -6119,8 +6222,8 @@ var FPC = ({
6119
6222
  };
6120
6223
 
6121
6224
  // lib/SmdPinHeader.tsx
6122
- import { Colorize as Colorize44, Cuboid as Cuboid52, Hull as Hull25, Translate as Translate38 } from "jscad-fiber";
6123
- import { Fragment as Fragment69, jsx as jsx78, jsxs as jsxs74 } from "react/jsx-runtime";
6225
+ import { Colorize as Colorize45, Cuboid as Cuboid53, Hull as Hull25, Translate as Translate38 } from "jscad-fiber";
6226
+ import { Fragment as Fragment69, jsx as jsx79, jsxs as jsxs75 } from "react/jsx-runtime";
6124
6227
  var SmdPinHeader = ({
6125
6228
  numberOfPins,
6126
6229
  pitch = 2.54,
@@ -6135,52 +6238,52 @@ var SmdPinHeader = ({
6135
6238
  const bodyTop = standoffHeight + bodyHeight;
6136
6239
  const tailLength = tailSpan / 2;
6137
6240
  const tipChamferHeight = pinThickness * 0.35;
6138
- return /* @__PURE__ */ jsx78(Fragment69, { children: Array.from({ length: numberOfPins }, (_, index) => {
6241
+ return /* @__PURE__ */ jsx79(Fragment69, { children: Array.from({ length: numberOfPins }, (_, index) => {
6139
6242
  const x = xStart + index * pitch;
6140
6243
  const tailDirection = index % 2 === 0 ? 1 : -1;
6141
6244
  const postBodyLength = matingPinLength - tipChamferHeight;
6142
6245
  const verticalTailLength = standoffHeight - pinThickness / 2;
6143
- return /* @__PURE__ */ jsxs74(Translate38, { x, children: [
6144
- /* @__PURE__ */ jsx78(
6145
- Cuboid52,
6246
+ return /* @__PURE__ */ jsxs75(Translate38, { x, children: [
6247
+ /* @__PURE__ */ jsx79(
6248
+ Cuboid53,
6146
6249
  {
6147
6250
  color: "#222",
6148
6251
  size: [pitch, bodyWidth, bodyHeight],
6149
6252
  center: [0, 0, standoffHeight + bodyHeight / 2]
6150
6253
  }
6151
6254
  ),
6152
- /* @__PURE__ */ jsxs74(Colorize44, { color: "#d4af37", children: [
6153
- /* @__PURE__ */ jsx78(
6154
- Cuboid52,
6255
+ /* @__PURE__ */ jsxs75(Colorize45, { color: "#d4af37", children: [
6256
+ /* @__PURE__ */ jsx79(
6257
+ Cuboid53,
6155
6258
  {
6156
6259
  size: [pinThickness, tailLength, pinThickness],
6157
6260
  center: [0, tailDirection * (tailLength / 2), pinThickness / 2]
6158
6261
  }
6159
6262
  ),
6160
- /* @__PURE__ */ jsx78(
6161
- Cuboid52,
6263
+ /* @__PURE__ */ jsx79(
6264
+ Cuboid53,
6162
6265
  {
6163
6266
  size: [pinThickness, pinThickness, verticalTailLength],
6164
6267
  center: [0, 0, pinThickness / 2 + verticalTailLength / 2]
6165
6268
  }
6166
6269
  ),
6167
- /* @__PURE__ */ jsx78(
6168
- Cuboid52,
6270
+ /* @__PURE__ */ jsx79(
6271
+ Cuboid53,
6169
6272
  {
6170
6273
  size: [pinThickness, pinThickness, postBodyLength],
6171
6274
  center: [0, 0, bodyTop + postBodyLength / 2]
6172
6275
  }
6173
6276
  ),
6174
- /* @__PURE__ */ jsxs74(Hull25, { children: [
6175
- /* @__PURE__ */ jsx78(
6176
- Cuboid52,
6277
+ /* @__PURE__ */ jsxs75(Hull25, { children: [
6278
+ /* @__PURE__ */ jsx79(
6279
+ Cuboid53,
6177
6280
  {
6178
6281
  size: [pinThickness, pinThickness, 0.01],
6179
6282
  center: [0, 0, bodyTop + postBodyLength]
6180
6283
  }
6181
6284
  ),
6182
- /* @__PURE__ */ jsx78(
6183
- Cuboid52,
6285
+ /* @__PURE__ */ jsx79(
6286
+ Cuboid53,
6184
6287
  {
6185
6288
  size: [pinThickness * 0.65, pinThickness * 0.65, 0.01],
6186
6289
  center: [0, 0, bodyTop + matingPinLength]
@@ -6193,12 +6296,12 @@ var SmdPinHeader = ({
6193
6296
  };
6194
6297
 
6195
6298
  // lib/Footprinter3d.tsx
6196
- import { mm } from "@tscircuit/mm";
6299
+ import { mm as mm2 } from "@tscircuit/mm";
6197
6300
 
6198
6301
  // lib/utils/getPlatedHoleCenters.ts
6199
- import { fp as fp8 } from "@tscircuit/footprinter";
6302
+ import { fp as fp9 } from "@tscircuit/footprinter";
6200
6303
  var getPlatedHoleCenters = (footprint) => {
6201
- const elements = fp8.string(footprint).circuitJson();
6304
+ const elements = fp9.string(footprint).circuitJson();
6202
6305
  return elements.filter(
6203
6306
  (element) => element.type === "pcb_plated_hole" && Number.isFinite(element.x) && Number.isFinite(element.y)
6204
6307
  ).map((element) => ({
@@ -6209,9 +6312,9 @@ var getPlatedHoleCenters = (footprint) => {
6209
6312
  };
6210
6313
 
6211
6314
  // lib/utils/getSmtPadRects.ts
6212
- import { fp as fp9 } from "@tscircuit/footprinter";
6315
+ import { fp as fp10 } from "@tscircuit/footprinter";
6213
6316
  var getSmtPadRects = (footprint) => {
6214
- const elements = fp9.string(footprint).circuitJson();
6317
+ const elements = fp10.string(footprint).circuitJson();
6215
6318
  return elements.filter(
6216
6319
  (element) => element.type === "pcb_smtpad" && element.shape === "rect" && Number.isFinite(element.x) && Number.isFinite(element.y)
6217
6320
  ).map((element) => ({
@@ -6224,7 +6327,7 @@ var getSmtPadRects = (footprint) => {
6224
6327
  };
6225
6328
 
6226
6329
  // lib/GullWingBody.tsx
6227
- import { Fragment as Fragment70, jsx as jsx79, jsxs as jsxs75 } from "react/jsx-runtime";
6330
+ import { Fragment as Fragment70, jsx as jsx80, jsxs as jsxs76 } from "react/jsx-runtime";
6228
6331
  var GullWingBody = ({
6229
6332
  bodyWidth,
6230
6333
  bodyLength: bodyLength10,
@@ -6236,8 +6339,8 @@ var GullWingBody = ({
6236
6339
  const centerX = pads.reduce((sum, pad) => sum + pad.x, 0) / (pads.length || 1);
6237
6340
  const centerY = pads.reduce((sum, pad) => sum + pad.y, 0) / (pads.length || 1);
6238
6341
  const leadHeight = bodyHeight * leadHeightRatio;
6239
- return /* @__PURE__ */ jsxs75(Fragment70, { children: [
6240
- /* @__PURE__ */ jsx79(
6342
+ return /* @__PURE__ */ jsxs76(Fragment70, { children: [
6343
+ /* @__PURE__ */ jsx80(
6241
6344
  ChipBody,
6242
6345
  {
6243
6346
  center: { x: centerX, y: centerY, z: 0 },
@@ -6253,7 +6356,7 @@ var GullWingBody = ({
6253
6356
  const outerX = pad.x + side * padWidth / 2;
6254
6357
  const run = Math.max(Math.abs(outerX - centerX) - bodyWidth / 2, 0.1);
6255
6358
  const overlap = Math.min(0.15, bodyWidth * 0.15);
6256
- return /* @__PURE__ */ jsx79(
6359
+ return /* @__PURE__ */ jsx80(
6257
6360
  SmdChipLead,
6258
6361
  {
6259
6362
  rotation: side > 0 ? Math.PI : 0,
@@ -6275,8 +6378,8 @@ var GullWingBody = ({
6275
6378
  };
6276
6379
 
6277
6380
  // lib/ParametricChip.tsx
6278
- import { Cuboid as Cuboid53 } from "jscad-fiber";
6279
- import { Fragment as Fragment71, jsx as jsx80, jsxs as jsxs76 } from "react/jsx-runtime";
6381
+ import { Cuboid as Cuboid54 } from "jscad-fiber";
6382
+ import { Fragment as Fragment71, jsx as jsx81, jsxs as jsxs77 } from "react/jsx-runtime";
6280
6383
  var ParametricChip = ({
6281
6384
  padPitch,
6282
6385
  padHeight,
@@ -6287,25 +6390,25 @@ var ParametricChip = ({
6287
6390
  const height10 = width10;
6288
6391
  const terminatorWidth9 = fullLength10 * 0.2;
6289
6392
  const bodyLength10 = fullLength10 - terminatorWidth9 * 2;
6290
- return /* @__PURE__ */ jsxs76(Fragment71, { children: [
6291
- /* @__PURE__ */ jsx80(
6292
- Cuboid53,
6393
+ return /* @__PURE__ */ jsxs77(Fragment71, { children: [
6394
+ /* @__PURE__ */ jsx81(
6395
+ Cuboid54,
6293
6396
  {
6294
6397
  size: [bodyLength10, width10, height10],
6295
6398
  offset: [0, 0, height10 / 2],
6296
6399
  color
6297
6400
  }
6298
6401
  ),
6299
- /* @__PURE__ */ jsx80(
6300
- Cuboid53,
6402
+ /* @__PURE__ */ jsx81(
6403
+ Cuboid54,
6301
6404
  {
6302
6405
  size: [terminatorWidth9, height10, width10],
6303
6406
  offset: [fullLength10 / 2 - terminatorWidth9 / 2, 0, height10 / 2],
6304
6407
  color: "#ccc"
6305
6408
  }
6306
6409
  ),
6307
- /* @__PURE__ */ jsx80(
6308
- Cuboid53,
6410
+ /* @__PURE__ */ jsx81(
6411
+ Cuboid54,
6309
6412
  {
6310
6413
  size: [terminatorWidth9, height10, width10],
6311
6414
  offset: [-fullLength10 / 2 + terminatorWidth9 / 2, 0, height10 / 2],
@@ -6317,14 +6420,14 @@ var ParametricChip = ({
6317
6420
 
6318
6421
  // lib/Led5050.tsx
6319
6422
  import {
6320
- Colorize as Colorize45,
6321
- Cuboid as Cuboid54,
6423
+ Colorize as Colorize46,
6424
+ Cuboid as Cuboid55,
6322
6425
  Cylinder as Cylinder17,
6323
- Rotate as Rotate20,
6324
- Subtract as Subtract13,
6426
+ Rotate as Rotate21,
6427
+ Subtract as Subtract14,
6325
6428
  Translate as Translate39
6326
6429
  } from "jscad-fiber";
6327
- import { Fragment as Fragment72, jsx as jsx81, jsxs as jsxs77 } from "react/jsx-runtime";
6430
+ import { Fragment as Fragment72, jsx as jsx82, jsxs as jsxs78 } from "react/jsx-runtime";
6328
6431
  var Led5050 = ({
6329
6432
  color = "#ffff00",
6330
6433
  bodyColor = "#ffffff",
@@ -6345,10 +6448,10 @@ var Led5050 = ({
6345
6448
  const cornerCutDepth = 0.3;
6346
6449
  const leadYPositions = [-1.7, 0, 1.7];
6347
6450
  const leadSides = [-1, 1];
6348
- return /* @__PURE__ */ jsxs77(Fragment72, { children: [
6451
+ return /* @__PURE__ */ jsxs78(Fragment72, { children: [
6349
6452
  leadYPositions.flatMap(
6350
- (y) => leadSides.map((side) => /* @__PURE__ */ jsx81(
6351
- Cuboid54,
6453
+ (y) => leadSides.map((side) => /* @__PURE__ */ jsx82(
6454
+ Cuboid55,
6352
6455
  {
6353
6456
  color: leadColor,
6354
6457
  size: [leadLength, leadWidth, leadThickness],
@@ -6357,8 +6460,8 @@ var Led5050 = ({
6357
6460
  `${side}-${y}`
6358
6461
  ))
6359
6462
  ),
6360
- /* @__PURE__ */ jsx81(Colorize45, { color: bodyColor, children: /* @__PURE__ */ jsxs77(Subtract13, { children: [
6361
- /* @__PURE__ */ jsx81(
6463
+ /* @__PURE__ */ jsx82(Colorize46, { color: bodyColor, children: /* @__PURE__ */ jsxs78(Subtract14, { children: [
6464
+ /* @__PURE__ */ jsx82(
6362
6465
  ChipBody,
6363
6466
  {
6364
6467
  width: bodySize,
@@ -6372,7 +6475,7 @@ var Led5050 = ({
6372
6475
  includeNotch: false
6373
6476
  }
6374
6477
  ),
6375
- /* @__PURE__ */ jsx81(
6478
+ /* @__PURE__ */ jsx82(
6376
6479
  Cylinder17,
6377
6480
  {
6378
6481
  radius: lensRadius,
@@ -6380,7 +6483,7 @@ var Led5050 = ({
6380
6483
  center: [0, 0, bodyTop - lensHeight / 2]
6381
6484
  }
6382
6485
  ),
6383
- /* @__PURE__ */ jsx81(
6486
+ /* @__PURE__ */ jsx82(
6384
6487
  Translate39,
6385
6488
  {
6386
6489
  offset: [
@@ -6388,11 +6491,11 @@ var Led5050 = ({
6388
6491
  bodySize / 2,
6389
6492
  bodyTop - cornerCutDepth / 2 + 5e-3
6390
6493
  ],
6391
- children: /* @__PURE__ */ jsx81(Rotate20, { rotation: [0, 0, Math.PI / 4], children: /* @__PURE__ */ jsx81(Cuboid54, { size: [0.9, 0.9, cornerCutDepth + 0.01] }) })
6494
+ children: /* @__PURE__ */ jsx82(Rotate21, { rotation: [0, 0, Math.PI / 4], children: /* @__PURE__ */ jsx82(Cuboid55, { size: [0.9, 0.9, cornerCutDepth + 0.01] }) })
6392
6495
  }
6393
6496
  )
6394
6497
  ] }) }),
6395
- /* @__PURE__ */ jsx81(
6498
+ /* @__PURE__ */ jsx82(
6396
6499
  Cylinder17,
6397
6500
  {
6398
6501
  color,
@@ -6405,8 +6508,8 @@ var Led5050 = ({
6405
6508
  };
6406
6509
 
6407
6510
  // lib/Led2835.tsx
6408
- import { Colorize as Colorize46, Cuboid as Cuboid55 } from "jscad-fiber";
6409
- import { Fragment as Fragment73, jsx as jsx82, jsxs as jsxs78 } from "react/jsx-runtime";
6511
+ import { Colorize as Colorize47, Cuboid as Cuboid56 } from "jscad-fiber";
6512
+ import { Fragment as Fragment73, jsx as jsx83, jsxs as jsxs79 } from "react/jsx-runtime";
6410
6513
  var Led2835 = ({
6411
6514
  bodyWidth = 3.5,
6412
6515
  bodyLength: bodyLength10 = 2.8,
@@ -6425,26 +6528,26 @@ var Led2835 = ({
6425
6528
  const bodyCenterX = (pad1X + pad2X) / 2;
6426
6529
  const lensWidth = bodyWidth * 0.55;
6427
6530
  const lensLength = bodyLength10 * 0.55;
6428
- return /* @__PURE__ */ jsxs78(Fragment73, { children: [
6531
+ return /* @__PURE__ */ jsxs79(Fragment73, { children: [
6429
6532
  [
6430
6533
  { x: pad1X, w: pad1Width, key: "pad-1" },
6431
6534
  { x: pad2X, w: pad2Width, key: "pad-2" }
6432
- ].map(({ x, w, key }) => /* @__PURE__ */ jsx82(Colorize46, { color: padColor, children: /* @__PURE__ */ jsx82(
6433
- Cuboid55,
6535
+ ].map(({ x, w, key }) => /* @__PURE__ */ jsx83(Colorize47, { color: padColor, children: /* @__PURE__ */ jsx83(
6536
+ Cuboid56,
6434
6537
  {
6435
6538
  size: [w, padLength, padThickness],
6436
6539
  center: [x, 0, padThickness / 2]
6437
6540
  }
6438
6541
  ) }, key)),
6439
- /* @__PURE__ */ jsx82(Colorize46, { color: bodyColor, children: /* @__PURE__ */ jsx82(
6440
- Cuboid55,
6542
+ /* @__PURE__ */ jsx83(Colorize47, { color: bodyColor, children: /* @__PURE__ */ jsx83(
6543
+ Cuboid56,
6441
6544
  {
6442
6545
  size: [bodyWidth, bodyLength10, bodyHeight],
6443
6546
  center: [bodyCenterX, 0, padThickness + bodyHeight / 2]
6444
6547
  }
6445
6548
  ) }),
6446
- /* @__PURE__ */ jsx82(Colorize46, { color, children: /* @__PURE__ */ jsx82(
6447
- Cuboid55,
6549
+ /* @__PURE__ */ jsx83(Colorize47, { color, children: /* @__PURE__ */ jsx83(
6550
+ Cuboid56,
6448
6551
  {
6449
6552
  size: [lensWidth, lensLength, lensHeight],
6450
6553
  center: [
@@ -6459,15 +6562,15 @@ var Led2835 = ({
6459
6562
 
6460
6563
  // lib/RJ45.tsx
6461
6564
  import {
6462
- Colorize as Colorize47,
6463
- Cuboid as Cuboid56,
6565
+ Colorize as Colorize48,
6566
+ Cuboid as Cuboid57,
6464
6567
  Cylinder as Cylinder18,
6465
- Rotate as Rotate21,
6568
+ Rotate as Rotate22,
6466
6569
  RoundedCuboid as RoundedCuboid5,
6467
- Subtract as Subtract14,
6570
+ Subtract as Subtract15,
6468
6571
  Translate as Translate40
6469
6572
  } from "jscad-fiber";
6470
- import { Fragment as Fragment74, jsx as jsx83, jsxs as jsxs79 } from "react/jsx-runtime";
6573
+ import { Fragment as Fragment74, jsx as jsx84, jsxs as jsxs80 } from "react/jsx-runtime";
6471
6574
  var range2 = (length) => Array.from({ length }, (_, index) => index);
6472
6575
  var RJ45 = ({
6473
6576
  bodyWidth = 16.26,
@@ -6525,18 +6628,18 @@ var RJ45 = ({
6525
6628
  const contactY = frontY - frontDirection * Math.max(cavityDepth * 0.48, 1.2);
6526
6629
  const contactZ = openingCenterZ + openingHeight * 0.18;
6527
6630
  const frontLipY = frontY + frontDirection * shellThickness * 0.2;
6528
- return /* @__PURE__ */ jsxs79(Fragment74, { children: [
6529
- /* @__PURE__ */ jsxs79(Colorize47, { color: shellColor, children: [
6530
- /* @__PURE__ */ jsxs79(Subtract14, { children: [
6531
- /* @__PURE__ */ jsx83(
6532
- Cuboid56,
6631
+ return /* @__PURE__ */ jsxs80(Fragment74, { children: [
6632
+ /* @__PURE__ */ jsxs80(Colorize48, { color: shellColor, children: [
6633
+ /* @__PURE__ */ jsxs80(Subtract15, { children: [
6634
+ /* @__PURE__ */ jsx84(
6635
+ Cuboid57,
6533
6636
  {
6534
6637
  center: [0, bodyCenterY, bodyHeight / 2],
6535
6638
  size: [bodyWidth, bodyDepth, bodyHeight]
6536
6639
  }
6537
6640
  ),
6538
- /* @__PURE__ */ jsx83(
6539
- Cuboid56,
6641
+ /* @__PURE__ */ jsx84(
6642
+ Cuboid57,
6540
6643
  {
6541
6644
  center: [0, cavityCenterY, openingCenterZ],
6542
6645
  size: [
@@ -6547,15 +6650,15 @@ var RJ45 = ({
6547
6650
  }
6548
6651
  )
6549
6652
  ] }),
6550
- /* @__PURE__ */ jsx83(
6551
- Cuboid56,
6653
+ /* @__PURE__ */ jsx84(
6654
+ Cuboid57,
6552
6655
  {
6553
6656
  center: [0, frontLipY, 0.72],
6554
6657
  size: [openingWidth + 0.5, shellThickness * 1.25, 1.05]
6555
6658
  }
6556
6659
  ),
6557
- [-1, 1].map((direction) => /* @__PURE__ */ jsx83(
6558
- Cuboid56,
6660
+ [-1, 1].map((direction) => /* @__PURE__ */ jsx84(
6661
+ Cuboid57,
6559
6662
  {
6560
6663
  center: [direction * shieldPinX, shieldPinY, 0.25],
6561
6664
  size: [
@@ -6566,8 +6669,8 @@ var RJ45 = ({
6566
6669
  },
6567
6670
  `shield-tab:${direction}`
6568
6671
  )),
6569
- [-1, 1].map((direction) => /* @__PURE__ */ jsx83(
6570
- Cuboid56,
6672
+ [-1, 1].map((direction) => /* @__PURE__ */ jsx84(
6673
+ Cuboid57,
6571
6674
  {
6572
6675
  center: [
6573
6676
  direction * bodyWidth * 0.24,
@@ -6579,9 +6682,9 @@ var RJ45 = ({
6579
6682
  `top-seam:${direction}`
6580
6683
  ))
6581
6684
  ] }),
6582
- /* @__PURE__ */ jsxs79(Colorize47, { color: housingColor, children: [
6583
- /* @__PURE__ */ jsxs79(Subtract14, { children: [
6584
- /* @__PURE__ */ jsx83(
6685
+ /* @__PURE__ */ jsxs80(Colorize48, { color: housingColor, children: [
6686
+ /* @__PURE__ */ jsxs80(Subtract15, { children: [
6687
+ /* @__PURE__ */ jsx84(
6585
6688
  RoundedCuboid5,
6586
6689
  {
6587
6690
  center: [0, cavityCenterY, openingCenterZ],
@@ -6593,8 +6696,8 @@ var RJ45 = ({
6593
6696
  roundRadius: 0.22
6594
6697
  }
6595
6698
  ),
6596
- /* @__PURE__ */ jsx83(
6597
- Cuboid56,
6699
+ /* @__PURE__ */ jsx84(
6700
+ Cuboid57,
6598
6701
  {
6599
6702
  center: [
6600
6703
  0,
@@ -6609,14 +6712,14 @@ var RJ45 = ({
6609
6712
  }
6610
6713
  )
6611
6714
  ] }),
6612
- /* @__PURE__ */ jsx83(
6613
- Cuboid56,
6715
+ /* @__PURE__ */ jsx84(
6716
+ Cuboid57,
6614
6717
  {
6615
6718
  center: [0, backWallY, openingCenterZ],
6616
6719
  size: [openingWidth - 1.15, shellThickness, openingHeight - 1.25]
6617
6720
  }
6618
6721
  ),
6619
- /* @__PURE__ */ jsx83(
6722
+ /* @__PURE__ */ jsx84(
6620
6723
  RoundedCuboid5,
6621
6724
  {
6622
6725
  center: [0, frontY - frontDirection * cavityDepth * 0.28, 1.55],
@@ -6624,7 +6727,7 @@ var RJ45 = ({
6624
6727
  roundRadius: 0.16
6625
6728
  }
6626
6729
  ),
6627
- [-1, 1].map((direction) => /* @__PURE__ */ jsx83(
6730
+ [-1, 1].map((direction) => /* @__PURE__ */ jsx84(
6628
6731
  Cylinder18,
6629
6732
  {
6630
6733
  center: [direction * locatorHoleX, locatorHoleY, -0.25],
@@ -6634,8 +6737,8 @@ var RJ45 = ({
6634
6737
  `locator:${direction}`
6635
6738
  ))
6636
6739
  ] }),
6637
- /* @__PURE__ */ jsxs79(Colorize47, { color: contactColor, children: [
6638
- signalPinPositions.map(({ x, y }, index) => /* @__PURE__ */ jsx83(
6740
+ /* @__PURE__ */ jsxs80(Colorize48, { color: contactColor, children: [
6741
+ signalPinPositions.map(({ x, y }, index) => /* @__PURE__ */ jsx84(
6639
6742
  Cylinder18,
6640
6743
  {
6641
6744
  center: [x, y, 0.15],
@@ -6644,7 +6747,7 @@ var RJ45 = ({
6644
6747
  },
6645
6748
  `signal-lead:${index}`
6646
6749
  )),
6647
- range2(8).map((index) => /* @__PURE__ */ jsx83(
6750
+ range2(8).map((index) => /* @__PURE__ */ jsx84(
6648
6751
  Translate40,
6649
6752
  {
6650
6753
  offset: [
@@ -6652,7 +6755,7 @@ var RJ45 = ({
6652
6755
  contactY,
6653
6756
  contactZ + (index % 2 === 0 ? 0.03 : -0.03)
6654
6757
  ],
6655
- children: /* @__PURE__ */ jsx83(Rotate21, { rotation: [frontDirection * 0.2, 0, 0], children: /* @__PURE__ */ jsx83(
6758
+ children: /* @__PURE__ */ jsx84(Rotate22, { rotation: [frontDirection * 0.2, 0, 0], children: /* @__PURE__ */ jsx84(
6656
6759
  RoundedCuboid5,
6657
6760
  {
6658
6761
  size: [Math.max(contactPitch * 0.28, 0.28), 3.25, 0.16],
@@ -6662,7 +6765,7 @@ var RJ45 = ({
6662
6765
  },
6663
6766
  `socket-contact:${index}`
6664
6767
  )),
6665
- ledPins && ledPinPositions.map((x, index) => /* @__PURE__ */ jsx83(
6768
+ ledPins && ledPinPositions.map((x, index) => /* @__PURE__ */ jsx84(
6666
6769
  Cylinder18,
6667
6770
  {
6668
6771
  center: [x, ledPinY, 0.15],
@@ -6672,8 +6775,8 @@ var RJ45 = ({
6672
6775
  `led-lead:${index}`
6673
6776
  ))
6674
6777
  ] }),
6675
- ledPins && /* @__PURE__ */ jsxs79(Fragment74, { children: [
6676
- /* @__PURE__ */ jsx83(
6778
+ ledPins && /* @__PURE__ */ jsxs80(Fragment74, { children: [
6779
+ /* @__PURE__ */ jsx84(
6677
6780
  RoundedCuboid5,
6678
6781
  {
6679
6782
  color: "#73b744",
@@ -6686,7 +6789,7 @@ var RJ45 = ({
6686
6789
  roundRadius: 0.18
6687
6790
  }
6688
6791
  ),
6689
- /* @__PURE__ */ jsx83(
6792
+ /* @__PURE__ */ jsx84(
6690
6793
  RoundedCuboid5,
6691
6794
  {
6692
6795
  color: "#e0aa35",
@@ -6704,8 +6807,8 @@ var RJ45 = ({
6704
6807
  };
6705
6808
 
6706
6809
  // lib/DPAK.tsx
6707
- import { Colorize as Colorize48, Cuboid as Cuboid57, Hull as Hull26 } from "jscad-fiber";
6708
- import { Fragment as Fragment75, jsx as jsx84, jsxs as jsxs80 } from "react/jsx-runtime";
6810
+ import { Colorize as Colorize49, Cuboid as Cuboid58, Hull as Hull26 } from "jscad-fiber";
6811
+ import { Fragment as Fragment75, jsx as jsx85, jsxs as jsxs81 } from "react/jsx-runtime";
6709
6812
  var DPAK = ({
6710
6813
  bodyWidth = 6.1,
6711
6814
  bodyLength: bodyLength10 = 6.5,
@@ -6727,25 +6830,25 @@ var DPAK = ({
6727
6830
  const bodyFrontX = bodyCenterX - bodyWidth / 2;
6728
6831
  const leadZ = tabThickness / 2;
6729
6832
  const leadThickness = 0.4;
6730
- return /* @__PURE__ */ jsxs80(Fragment75, { children: [
6731
- /* @__PURE__ */ jsx84(Colorize48, { color: tabColor, children: /* @__PURE__ */ jsx84(
6732
- Cuboid57,
6833
+ return /* @__PURE__ */ jsxs81(Fragment75, { children: [
6834
+ /* @__PURE__ */ jsx85(Colorize49, { color: tabColor, children: /* @__PURE__ */ jsx85(
6835
+ Cuboid58,
6733
6836
  {
6734
6837
  size: [tabWidth, tabLength, tabThickness],
6735
6838
  center: [tabCenterX, 0, tabThickness / 2]
6736
6839
  }
6737
6840
  ) }),
6738
- /* @__PURE__ */ jsx84(Colorize48, { color, children: /* @__PURE__ */ jsx84(
6739
- Cuboid57,
6841
+ /* @__PURE__ */ jsx85(Colorize49, { color, children: /* @__PURE__ */ jsx85(
6842
+ Cuboid58,
6740
6843
  {
6741
6844
  size: [bodyWidth, bodyLength10, bodyHeight],
6742
6845
  center: [bodyCenterX, 0, tabThickness + bodyHeight / 2]
6743
6846
  }
6744
6847
  ) }),
6745
6848
  [-1, 1].map((side) => {
6746
- return /* @__PURE__ */ jsxs80(Colorize48, { color: leadColor, children: [
6747
- /* @__PURE__ */ jsx84(
6748
- Cuboid57,
6849
+ return /* @__PURE__ */ jsxs81(Colorize49, { color: leadColor, children: [
6850
+ /* @__PURE__ */ jsx85(
6851
+ Cuboid58,
6749
6852
  {
6750
6853
  size: [leadContactLength, leadWidth, leadThickness],
6751
6854
  center: [
@@ -6755,9 +6858,9 @@ var DPAK = ({
6755
6858
  ]
6756
6859
  }
6757
6860
  ),
6758
- /* @__PURE__ */ jsxs80(Hull26, { children: [
6759
- /* @__PURE__ */ jsx84(
6760
- Cuboid57,
6861
+ /* @__PURE__ */ jsxs81(Hull26, { children: [
6862
+ /* @__PURE__ */ jsx85(
6863
+ Cuboid58,
6761
6864
  {
6762
6865
  size: [0.1, leadWidth, leadThickness],
6763
6866
  center: [
@@ -6767,8 +6870,8 @@ var DPAK = ({
6767
6870
  ]
6768
6871
  }
6769
6872
  ),
6770
- /* @__PURE__ */ jsx84(
6771
- Cuboid57,
6873
+ /* @__PURE__ */ jsx85(
6874
+ Cuboid58,
6772
6875
  {
6773
6876
  size: [0.1, leadWidth, leadThickness],
6774
6877
  center: [bodyFrontX, side * pitch, leadZ + tabThickness / 2]
@@ -6782,13 +6885,13 @@ var DPAK = ({
6782
6885
 
6783
6886
  // lib/ElectrolyticCapacitor.tsx
6784
6887
  import {
6785
- Colorize as Colorize49,
6786
- Cuboid as Cuboid58,
6888
+ Colorize as Colorize50,
6889
+ Cuboid as Cuboid59,
6787
6890
  Cylinder as Cylinder19,
6788
6891
  RoundedCylinder as RoundedCylinder5,
6789
- Subtract as Subtract15
6892
+ Subtract as Subtract16
6790
6893
  } from "jscad-fiber";
6791
- import { Fragment as Fragment76, jsx as jsx85, jsxs as jsxs81 } from "react/jsx-runtime";
6894
+ import { Fragment as Fragment76, jsx as jsx86, jsxs as jsxs82 } from "react/jsx-runtime";
6792
6895
  var ElectrolyticCapacitor = ({
6793
6896
  diameter = 6.3,
6794
6897
  heightToDiameterRatio = 1.4,
@@ -6806,8 +6909,8 @@ var ElectrolyticCapacitor = ({
6806
6909
  const canTop = canBottom + canHeight;
6807
6910
  const grooveWidth = Math.max(diameter * 0.06, 0.2);
6808
6911
  const grooveDepth = 0.3;
6809
- return /* @__PURE__ */ jsxs81(Fragment76, { children: [
6810
- /* @__PURE__ */ jsx85(Colorize49, { color: baseColor, children: /* @__PURE__ */ jsx85(
6912
+ return /* @__PURE__ */ jsxs82(Fragment76, { children: [
6913
+ /* @__PURE__ */ jsx86(Colorize50, { color: baseColor, children: /* @__PURE__ */ jsx86(
6811
6914
  Cylinder19,
6812
6915
  {
6813
6916
  radius: radius - 0.05,
@@ -6815,8 +6918,8 @@ var ElectrolyticCapacitor = ({
6815
6918
  center: [0, 0, baseHeight / 2]
6816
6919
  }
6817
6920
  ) }),
6818
- /* @__PURE__ */ jsx85(Colorize49, { color: sleeveColor, children: /* @__PURE__ */ jsxs81(Subtract15, { children: [
6819
- /* @__PURE__ */ jsx85(
6921
+ /* @__PURE__ */ jsx86(Colorize50, { color: sleeveColor, children: /* @__PURE__ */ jsxs82(Subtract16, { children: [
6922
+ /* @__PURE__ */ jsx86(
6820
6923
  RoundedCylinder5,
6821
6924
  {
6822
6925
  radius,
@@ -6825,22 +6928,22 @@ var ElectrolyticCapacitor = ({
6825
6928
  center: [0, 0, canBottom + canHeight / 2]
6826
6929
  }
6827
6930
  ),
6828
- /* @__PURE__ */ jsx85(
6829
- Cuboid58,
6931
+ /* @__PURE__ */ jsx86(
6932
+ Cuboid59,
6830
6933
  {
6831
6934
  size: [diameter, grooveWidth, grooveDepth * 2],
6832
6935
  center: [0, 0, canTop]
6833
6936
  }
6834
6937
  ),
6835
- /* @__PURE__ */ jsx85(
6836
- Cuboid58,
6938
+ /* @__PURE__ */ jsx86(
6939
+ Cuboid59,
6837
6940
  {
6838
6941
  size: [grooveWidth, diameter, grooveDepth * 2],
6839
6942
  center: [0, 0, canTop]
6840
6943
  }
6841
6944
  )
6842
6945
  ] }) }),
6843
- [-1, 1].map((side) => /* @__PURE__ */ jsx85(Colorize49, { color: "#c0c0c0", children: /* @__PURE__ */ jsx85(
6946
+ [-1, 1].map((side) => /* @__PURE__ */ jsx86(Colorize50, { color: "#c0c0c0", children: /* @__PURE__ */ jsx86(
6844
6947
  Cylinder19,
6845
6948
  {
6846
6949
  radius: leadDiameter / 2,
@@ -6852,8 +6955,8 @@ var ElectrolyticCapacitor = ({
6852
6955
  };
6853
6956
 
6854
6957
  // lib/Potentiometer.tsx
6855
- import { Colorize as Colorize50, Cuboid as Cuboid59, Cylinder as Cylinder20, Subtract as Subtract16 } from "jscad-fiber";
6856
- import { Fragment as Fragment77, jsx as jsx86, jsxs as jsxs82 } from "react/jsx-runtime";
6958
+ import { Colorize as Colorize51, Cuboid as Cuboid60, Cylinder as Cylinder20, Subtract as Subtract17 } from "jscad-fiber";
6959
+ import { Fragment as Fragment77, jsx as jsx87, jsxs as jsxs83 } from "react/jsx-runtime";
6857
6960
  var Potentiometer = ({
6858
6961
  bodyWidth = 5.35,
6859
6962
  bodyLength: bodyLength10 = 14,
@@ -6871,16 +6974,16 @@ var Potentiometer = ({
6871
6974
  const adjusterHeight = 0.8;
6872
6975
  const adjusterZ = bodyHeight + adjusterHeight / 2;
6873
6976
  const slotWidth = Math.max(adjusterDiameter * 0.16, 0.3);
6874
- return /* @__PURE__ */ jsxs82(Fragment77, { children: [
6875
- /* @__PURE__ */ jsx86(Colorize50, { color: bodyColor, children: /* @__PURE__ */ jsx86(
6876
- Cuboid59,
6977
+ return /* @__PURE__ */ jsxs83(Fragment77, { children: [
6978
+ /* @__PURE__ */ jsx87(Colorize51, { color: bodyColor, children: /* @__PURE__ */ jsx87(
6979
+ Cuboid60,
6877
6980
  {
6878
6981
  size: [bodyWidth, bodyLength10, bodyHeight],
6879
6982
  center: [bodyCenterX, 0, bodyHeight / 2]
6880
6983
  }
6881
6984
  ) }),
6882
- /* @__PURE__ */ jsx86(Colorize50, { color: adjusterColor, children: /* @__PURE__ */ jsxs82(Subtract16, { children: [
6883
- /* @__PURE__ */ jsx86(
6985
+ /* @__PURE__ */ jsx87(Colorize51, { color: adjusterColor, children: /* @__PURE__ */ jsxs83(Subtract17, { children: [
6986
+ /* @__PURE__ */ jsx87(
6884
6987
  Cylinder20,
6885
6988
  {
6886
6989
  radius: adjusterDiameter / 2,
@@ -6888,15 +6991,15 @@ var Potentiometer = ({
6888
6991
  center: [bodyCenterX, 0, adjusterZ]
6889
6992
  }
6890
6993
  ),
6891
- /* @__PURE__ */ jsx86(
6892
- Cuboid59,
6994
+ /* @__PURE__ */ jsx87(
6995
+ Cuboid60,
6893
6996
  {
6894
6997
  size: [adjusterDiameter, slotWidth, adjusterHeight * 0.6],
6895
6998
  center: [bodyCenterX, 0, adjusterZ + adjusterHeight / 2]
6896
6999
  }
6897
7000
  )
6898
7001
  ] }) }),
6899
- shaftHeight > 0 && shaftDiameter > 0 ? /* @__PURE__ */ jsx86(Colorize50, { color: adjusterColor, children: /* @__PURE__ */ jsx86(
7002
+ shaftHeight > 0 && shaftDiameter > 0 ? /* @__PURE__ */ jsx87(Colorize51, { color: adjusterColor, children: /* @__PURE__ */ jsx87(
6900
7003
  Cylinder20,
6901
7004
  {
6902
7005
  radius: shaftDiameter / 2,
@@ -6904,7 +7007,7 @@ var Potentiometer = ({
6904
7007
  center: [bodyCenterX, 0, bodyHeight + shaftHeight / 2]
6905
7008
  }
6906
7009
  ) }) : null,
6907
- leads.map((lead) => /* @__PURE__ */ jsx86(Colorize50, { color: "#c0c0c0", children: /* @__PURE__ */ jsx86(
7010
+ leads.map((lead) => /* @__PURE__ */ jsx87(Colorize51, { color: "#c0c0c0", children: /* @__PURE__ */ jsx87(
6908
7011
  Cylinder20,
6909
7012
  {
6910
7013
  radius: leadDiameter / 2,
@@ -6916,8 +7019,8 @@ var Potentiometer = ({
6916
7019
  };
6917
7020
 
6918
7021
  // lib/SmdPushButton.tsx
6919
- import { Colorize as Colorize51, Cuboid as Cuboid60, Cylinder as Cylinder21 } from "jscad-fiber";
6920
- import { Fragment as Fragment78, jsx as jsx87, jsxs as jsxs83 } from "react/jsx-runtime";
7022
+ import { Colorize as Colorize52, Cuboid as Cuboid61, Cylinder as Cylinder21 } from "jscad-fiber";
7023
+ import { Fragment as Fragment78, jsx as jsx88, jsxs as jsxs84 } from "react/jsx-runtime";
6921
7024
  var SmdPushButton = ({
6922
7025
  bodyWidth = 2.9,
6923
7026
  bodyLength: bodyLength10 = 3,
@@ -6933,15 +7036,15 @@ var SmdPushButton = ({
6933
7036
  leadColor = "#cccccc"
6934
7037
  }) => {
6935
7038
  const leadThickness = 0.15;
6936
- return /* @__PURE__ */ jsxs83(Fragment78, { children: [
6937
- /* @__PURE__ */ jsx87(Colorize51, { color: bodyColor, children: /* @__PURE__ */ jsx87(
6938
- Cuboid60,
7039
+ return /* @__PURE__ */ jsxs84(Fragment78, { children: [
7040
+ /* @__PURE__ */ jsx88(Colorize52, { color: bodyColor, children: /* @__PURE__ */ jsx88(
7041
+ Cuboid61,
6939
7042
  {
6940
7043
  size: [bodyWidth, bodyLength10, bodyHeight],
6941
7044
  center: [0, 0, bodyHeight / 2]
6942
7045
  }
6943
7046
  ) }),
6944
- /* @__PURE__ */ jsx87(Colorize51, { color: actuatorColor, children: /* @__PURE__ */ jsx87(
7047
+ /* @__PURE__ */ jsx88(Colorize52, { color: actuatorColor, children: /* @__PURE__ */ jsx88(
6945
7048
  Cylinder21,
6946
7049
  {
6947
7050
  radius: actuatorDiameter / 2,
@@ -6950,8 +7053,8 @@ var SmdPushButton = ({
6950
7053
  }
6951
7054
  ) }),
6952
7055
  [-1, 1].flatMap(
6953
- (sx) => [-1, 1].map((sy) => /* @__PURE__ */ jsx87(Colorize51, { color: leadColor, children: /* @__PURE__ */ jsx87(
6954
- Cuboid60,
7056
+ (sx) => [-1, 1].map((sy) => /* @__PURE__ */ jsx88(Colorize52, { color: leadColor, children: /* @__PURE__ */ jsx88(
7057
+ Cuboid61,
6955
7058
  {
6956
7059
  size: [padWidth, padLength, leadThickness],
6957
7060
  center: [
@@ -6965,9 +7068,89 @@ var SmdPushButton = ({
6965
7068
  ] });
6966
7069
  };
6967
7070
 
7071
+ // lib/SmdSlideSwitch.tsx
7072
+ import { fp as fp11 } from "@tscircuit/footprinter";
7073
+ import { Colorize as Colorize53, Cuboid as Cuboid62, Cylinder as Cylinder22, Rotate as Rotate23, Subtract as Subtract18 } from "jscad-fiber";
7074
+ import { jsx as jsx89, jsxs as jsxs85 } from "react/jsx-runtime";
7075
+ var SmdSlideSwitch = ({
7076
+ footprint = "smdslideswitch7",
7077
+ position = 0
7078
+ }) => {
7079
+ const canonical = footprint.replace(/_pin1location\([^)]*\)/g, "");
7080
+ const params = fp11.string(canonical).json();
7081
+ const elements = fp11.string(canonical).circuitJson();
7082
+ const pads = elements.filter(
7083
+ (e) => e.type === "pcb_smtpad" && e.shape === "rect"
7084
+ );
7085
+ const target = fp11.string(footprint).circuitJson().filter(
7086
+ (e) => e.type === "pcb_smtpad" && (e.shape === "rect" || e.shape === "rotated_rect")
7087
+ );
7088
+ if (pads.length < 7 || !Number.isFinite(params.mpx) || params.mpx < 3)
7089
+ throw new Error("SmdSlideSwitch needs signal pads and four mounting pads");
7090
+ const angle = Math.atan2(target[1].y - target[0].y, target[1].x - target[0].x) - Math.atan2(pads[1].y - pads[0].y, pads[1].x - pads[0].x);
7091
+ const width10 = params.mpx - 0.5, depth = 2.7, height10 = params.mpx > 6 ? 1.5 : 1.4, y = params.mounty;
7092
+ return /* @__PURE__ */ jsxs85(Rotate23, { rotation: [0, 0, angle], children: [
7093
+ /* @__PURE__ */ jsx89(Colorize53, { color: "#aeb4ba", children: /* @__PURE__ */ jsxs85(Subtract18, { children: [
7094
+ /* @__PURE__ */ jsx89(Cuboid62, { size: [width10, depth, height10], center: [0, y, height10 / 2] }),
7095
+ /* @__PURE__ */ jsx89(
7096
+ Cuboid62,
7097
+ {
7098
+ size: [width10 - 0.3, depth - 0.3, height10],
7099
+ center: [0, y, height10 / 2 - 0.15]
7100
+ }
7101
+ ),
7102
+ /* @__PURE__ */ jsx89(Cuboid62, { size: [2.7, 0.5, 0.9], center: [0, y - depth / 2, 0.65] })
7103
+ ] }) }),
7104
+ /* @__PURE__ */ jsxs85(Colorize53, { color: "#28292c", children: [
7105
+ /* @__PURE__ */ jsx89(
7106
+ Cuboid62,
7107
+ {
7108
+ size: [width10 - 0.32, depth - 0.32, 0.35],
7109
+ center: [0, y, 0.175]
7110
+ }
7111
+ ),
7112
+ /* @__PURE__ */ jsx89(
7113
+ Cuboid62,
7114
+ {
7115
+ size: [1, 2.25, 0.65],
7116
+ center: [position === 0 ? -0.5 : 0.5, y - 1.5, 0.65]
7117
+ }
7118
+ ),
7119
+ elements.filter((e) => e.type === "pcb_hole").map(
7120
+ (hole, i) => "hole_diameter" in hole && "x" in hole ? /* @__PURE__ */ jsx89(
7121
+ Cylinder22,
7122
+ {
7123
+ radius: hole.hole_diameter * 0.42,
7124
+ height: 0.6,
7125
+ center: [hole.x, hole.y, -0.2]
7126
+ },
7127
+ i
7128
+ ) : null
7129
+ )
7130
+ ] }),
7131
+ /* @__PURE__ */ jsx89(Colorize53, { color: "#c6c7c9", children: pads.map((pad, i) => {
7132
+ const signal = i < pads.length - 4;
7133
+ const outerY = pad.y + pad.height * 0.4;
7134
+ const innerY = Math.min(pad.y - pad.height * 0.4, y + depth / 2 - 0.2);
7135
+ return /* @__PURE__ */ jsx89(
7136
+ Cuboid62,
7137
+ {
7138
+ size: [
7139
+ pad.width * 0.8,
7140
+ signal ? outerY - innerY : pad.height * 0.8,
7141
+ 0.18
7142
+ ],
7143
+ center: [pad.x, signal ? (outerY + innerY) / 2 : pad.y, 0.09]
7144
+ },
7145
+ i
7146
+ );
7147
+ }) })
7148
+ ] });
7149
+ };
7150
+
6968
7151
  // lib/SOT-563.tsx
6969
- import { Cuboid as Cuboid61, Translate as Translate42, Rotate as Rotate22, Colorize as Colorize52 } from "jscad-fiber";
6970
- import { Fragment as Fragment79, jsx as jsx88, jsxs as jsxs84 } from "react/jsx-runtime";
7152
+ import { Cuboid as Cuboid63, Translate as Translate42, Rotate as Rotate24, Colorize as Colorize54 } from "jscad-fiber";
7153
+ import { Fragment as Fragment79, jsx as jsx90, jsxs as jsxs86 } from "react/jsx-runtime";
6971
7154
  var SOT563 = ({ fullWidth = 1.94, fullLength: fullLength10 = 1.6 }) => {
6972
7155
  const bodyWidth = 1.2;
6973
7156
  const bodyLength10 = 1.6;
@@ -6977,11 +7160,11 @@ var SOT563 = ({ fullWidth = 1.94, fullLength: fullLength10 = 1.6 }) => {
6977
7160
  const leadHeight = 0.13;
6978
7161
  const leadSpacing = 0.5;
6979
7162
  const bodyZOffset = -0.4;
6980
- return /* @__PURE__ */ jsxs84(Fragment79, { children: [
6981
- /* @__PURE__ */ jsx88(Rotate22, { rotation: [45 * Math.PI, 0, 0], children: /* @__PURE__ */ jsx88(Translate42, { center: [0, 0, bodyZOffset], children: /* @__PURE__ */ jsx88(Colorize52, { color: "grey", children: /* @__PURE__ */ jsx88(Cuboid61, { size: [bodyWidth, bodyLength10, bodyHeight] }) }) }) }),
7163
+ return /* @__PURE__ */ jsxs86(Fragment79, { children: [
7164
+ /* @__PURE__ */ jsx90(Rotate24, { rotation: [45 * Math.PI, 0, 0], children: /* @__PURE__ */ jsx90(Translate42, { center: [0, 0, bodyZOffset], children: /* @__PURE__ */ jsx90(Colorize54, { color: "grey", children: /* @__PURE__ */ jsx90(Cuboid63, { size: [bodyWidth, bodyLength10, bodyHeight] }) }) }) }),
6982
7165
  [-1, 0, 1].flatMap((yOffset, index) => [
6983
7166
  // Left lead
6984
- /* @__PURE__ */ jsx88(
7167
+ /* @__PURE__ */ jsx90(
6985
7168
  Translate42,
6986
7169
  {
6987
7170
  center: [
@@ -6989,16 +7172,16 @@ var SOT563 = ({ fullWidth = 1.94, fullLength: fullLength10 = 1.6 }) => {
6989
7172
  yOffset * leadSpacing,
6990
7173
  leadHeight / 2
6991
7174
  ],
6992
- children: /* @__PURE__ */ jsx88(Cuboid61, { size: [leadLength, leadWidth, leadHeight] })
7175
+ children: /* @__PURE__ */ jsx90(Cuboid63, { size: [leadLength, leadWidth, leadHeight] })
6993
7176
  },
6994
7177
  `left-${index}`
6995
7178
  ),
6996
7179
  // Right lead
6997
- /* @__PURE__ */ jsx88(
7180
+ /* @__PURE__ */ jsx90(
6998
7181
  Translate42,
6999
7182
  {
7000
7183
  center: [bodyWidth / 2 + 0.03, yOffset * leadSpacing, leadHeight / 2],
7001
- children: /* @__PURE__ */ jsx88(Cuboid61, { size: [leadLength, leadWidth, leadHeight] })
7184
+ children: /* @__PURE__ */ jsx90(Cuboid63, { size: [leadLength, leadWidth, leadHeight] })
7002
7185
  },
7003
7186
  `right-${index}`
7004
7187
  )
@@ -7007,34 +7190,34 @@ var SOT563 = ({ fullWidth = 1.94, fullLength: fullLength10 = 1.6 }) => {
7007
7190
  };
7008
7191
 
7009
7192
  // lib/UsbCMidmount.tsx
7010
- import { fp as fp10 } from "@tscircuit/footprinter";
7193
+ import { fp as fp12 } from "@tscircuit/footprinter";
7011
7194
  import {
7012
- Colorize as Colorize53,
7013
- Cuboid as Cuboid62,
7014
- Cylinder as Cylinder22,
7195
+ Colorize as Colorize55,
7196
+ Cuboid as Cuboid64,
7197
+ Cylinder as Cylinder23,
7015
7198
  Hull as Hull27,
7016
- Rotate as Rotate23,
7017
- Subtract as Subtract17,
7199
+ Rotate as Rotate25,
7200
+ Subtract as Subtract19,
7018
7201
  Translate as Translate43
7019
7202
  } from "jscad-fiber";
7020
- import { jsx as jsx89, jsxs as jsxs85 } from "react/jsx-runtime";
7203
+ import { jsx as jsx91, jsxs as jsxs87 } from "react/jsx-runtime";
7021
7204
  var Capsule = ({
7022
7205
  width: width10,
7023
7206
  height: height10,
7024
7207
  depth
7025
- }) => /* @__PURE__ */ jsx89(Hull27, { children: [-1, 1].map((side) => /* @__PURE__ */ jsx89(Translate43, { offset: [side * (width10 - height10) / 2, 0, 0], children: /* @__PURE__ */ jsx89(Rotate23, { rotation: [Math.PI / 2, 0, 0], children: /* @__PURE__ */ jsx89(Cylinder22, { radius: height10 / 2, height: depth }) }) }, side)) });
7208
+ }) => /* @__PURE__ */ jsx91(Hull27, { children: [-1, 1].map((side) => /* @__PURE__ */ jsx91(Translate43, { offset: [side * (width10 - height10) / 2, 0, 0], children: /* @__PURE__ */ jsx91(Rotate25, { rotation: [Math.PI / 2, 0, 0], children: /* @__PURE__ */ jsx91(Cylinder23, { radius: height10 / 2, height: depth }) }) }, side)) });
7026
7209
  var UsbCMidmount = ({
7027
7210
  footprint = "usbcmidmount16"
7028
7211
  }) => {
7029
7212
  const canonical = footprint.replace(/_pin1location\([^)]*\)/g, "");
7030
- const params = fp10.string(canonical).json();
7031
- const elements = fp10.string(canonical).circuitJson();
7213
+ const params = fp12.string(canonical).json();
7214
+ const elements = fp12.string(canonical).circuitJson();
7032
7215
  const pads = elements.filter(
7033
7216
  (e) => e.type === "pcb_smtpad" && e.shape === "rect"
7034
7217
  );
7035
7218
  const slots = elements.filter((e) => e.type === "pcb_plated_hole");
7036
7219
  const holes = elements.filter((e) => e.type === "pcb_hole");
7037
- const target = fp10.string(footprint).circuitJson().find((e) => e.type === "pcb_plated_hole");
7220
+ const target = fp12.string(footprint).circuitJson().find((e) => e.type === "pcb_plated_hole");
7038
7221
  const first = slots[0];
7039
7222
  const angle = first && target && "x" in target ? Math.atan2(target.y, target.x) - Math.atan2(first.y, first.x) : 0;
7040
7223
  const width10 = 8.94, height10 = 3.2, wall = 0.22;
@@ -7045,10 +7228,10 @@ var UsbCMidmount = ({
7045
7228
  "UsbCMidmount requires four mounting slots and a positive body depth"
7046
7229
  );
7047
7230
  const tabBottom = -0.9, tabTop = centerZ + 0.1;
7048
- return /* @__PURE__ */ jsxs85(Rotate23, { rotation: [0, 0, angle], children: [
7049
- /* @__PURE__ */ jsx89(Colorize53, { color: "#b8bdc4", children: /* @__PURE__ */ jsx89(Translate43, { offset: [0, centerY, centerZ], children: /* @__PURE__ */ jsxs85(Subtract17, { children: [
7050
- /* @__PURE__ */ jsx89(Capsule, { width: width10, height: height10, depth }),
7051
- /* @__PURE__ */ jsx89(
7231
+ return /* @__PURE__ */ jsxs87(Rotate25, { rotation: [0, 0, angle], children: [
7232
+ /* @__PURE__ */ jsx91(Colorize55, { color: "#b8bdc4", children: /* @__PURE__ */ jsx91(Translate43, { offset: [0, centerY, centerZ], children: /* @__PURE__ */ jsxs87(Subtract19, { children: [
7233
+ /* @__PURE__ */ jsx91(Capsule, { width: width10, height: height10, depth }),
7234
+ /* @__PURE__ */ jsx91(
7052
7235
  Capsule,
7053
7236
  {
7054
7237
  width: width10 - wall * 2,
@@ -7057,18 +7240,18 @@ var UsbCMidmount = ({
7057
7240
  }
7058
7241
  )
7059
7242
  ] }) }) }),
7060
- /* @__PURE__ */ jsxs85(Colorize53, { color: "#242529", children: [
7061
- /* @__PURE__ */ jsx89(
7062
- Cuboid62,
7243
+ /* @__PURE__ */ jsxs87(Colorize55, { color: "#242529", children: [
7244
+ /* @__PURE__ */ jsx91(
7245
+ Cuboid64,
7063
7246
  {
7064
7247
  size: [6.65, depth - 1.1, 0.7],
7065
7248
  center: [0, centerY + 0.3, centerZ]
7066
7249
  }
7067
7250
  ),
7068
- /* @__PURE__ */ jsx89(Cuboid62, { size: [7.6, 1, 2.45], center: [0, back - 0.65, centerZ] }),
7251
+ /* @__PURE__ */ jsx91(Cuboid64, { size: [7.6, 1, 2.45], center: [0, back - 0.65, centerZ] }),
7069
7252
  holes.map(
7070
- (hole, i) => "x" in hole && "hole_diameter" in hole ? /* @__PURE__ */ jsx89(
7071
- Cylinder22,
7253
+ (hole, i) => "x" in hole && "hole_diameter" in hole ? /* @__PURE__ */ jsx91(
7254
+ Cylinder23,
7072
7255
  {
7073
7256
  radius: hole.hole_diameter * 0.42,
7074
7257
  height: 0.8,
@@ -7078,10 +7261,10 @@ var UsbCMidmount = ({
7078
7261
  ) : null
7079
7262
  )
7080
7263
  ] }),
7081
- /* @__PURE__ */ jsxs85(Colorize53, { color: "#d3ad57", children: [
7264
+ /* @__PURE__ */ jsxs87(Colorize55, { color: "#d3ad57", children: [
7082
7265
  [-1, 1].flatMap(
7083
- (side) => [-2.75, -2.25, -1.25, -0.25, 0.25, 1.25, 2.25, 2.75].map((x) => /* @__PURE__ */ jsx89(
7084
- Cuboid62,
7266
+ (side) => [-2.75, -2.25, -1.25, -0.25, 0.25, 1.25, 2.25, 2.75].map((x) => /* @__PURE__ */ jsx91(
7267
+ Cuboid64,
7085
7268
  {
7086
7269
  size: [0.24, depth - 2, 0.04],
7087
7270
  center: [x, centerY + 0.1, centerZ + side * 0.365]
@@ -7089,8 +7272,8 @@ var UsbCMidmount = ({
7089
7272
  `${side}-${x}`
7090
7273
  ))
7091
7274
  ),
7092
- pads.map((pad, i) => /* @__PURE__ */ jsx89(
7093
- Cuboid62,
7275
+ pads.map((pad, i) => /* @__PURE__ */ jsx91(
7276
+ Cuboid64,
7094
7277
  {
7095
7278
  size: [
7096
7279
  Math.min(pad.width * 0.7, 0.35),
@@ -7102,8 +7285,8 @@ var UsbCMidmount = ({
7102
7285
  i
7103
7286
  ))
7104
7287
  ] }),
7105
- /* @__PURE__ */ jsx89(Colorize53, { color: "#b8bdc4", children: slots.map((slot, i) => /* @__PURE__ */ jsx89(
7106
- Cuboid62,
7288
+ /* @__PURE__ */ jsx91(Colorize55, { color: "#b8bdc4", children: slots.map((slot, i) => /* @__PURE__ */ jsx91(
7289
+ Cuboid64,
7107
7290
  {
7108
7291
  size: [
7109
7292
  0.4,
@@ -7118,17 +7301,17 @@ var UsbCMidmount = ({
7118
7301
  };
7119
7302
 
7120
7303
  // lib/SOT143.tsx
7121
- import { fp as fp11 } from "@tscircuit/footprinter";
7122
- import { Rotate as Rotate24 } from "jscad-fiber";
7123
- import { jsx as jsx90, jsxs as jsxs86 } from "react/jsx-runtime";
7124
- var getPads = (footprint) => fp11.string(footprint).circuitJson().filter(
7304
+ import { fp as fp13 } from "@tscircuit/footprinter";
7305
+ import { Rotate as Rotate26 } from "jscad-fiber";
7306
+ import { jsx as jsx92, jsxs as jsxs88 } from "react/jsx-runtime";
7307
+ var getPads = (footprint) => fp13.string(footprint).circuitJson().filter(
7125
7308
  (element) => element.type === "pcb_smtpad" && (element.shape === "rect" || element.shape === "rotated_rect")
7126
7309
  ).map((pad) => ({ x: pad.x, y: pad.y, pin: pad.port_hints?.[0] }));
7127
7310
  var SOT143 = ({ footprint = "sot143" }) => {
7128
7311
  const pads = getPads(footprint);
7129
7312
  if (pads.length !== 4) throw new Error("SOT143 requires four signal pads");
7130
7313
  const canonical = getPads("sot143");
7131
- const options = fp11.string(footprint).json();
7314
+ const options = fp13.string(footprint).json();
7132
7315
  const origin = canonical[1];
7133
7316
  const target = pads.find((pad) => pad.pin === "2");
7134
7317
  const angle = options.pin1location ? Math.round(
@@ -7139,8 +7322,8 @@ var SOT143 = ({ footprint = "sot143" }) => {
7139
7322
  x: pad.x * Math.cos(angle) + pad.y * Math.sin(angle),
7140
7323
  y: -pad.x * Math.sin(angle) + pad.y * Math.cos(angle)
7141
7324
  }));
7142
- return /* @__PURE__ */ jsxs86(Rotate24, { rotation: [0, 0, angle], children: [
7143
- /* @__PURE__ */ jsx90(
7325
+ return /* @__PURE__ */ jsxs88(Rotate26, { rotation: [0, 0, angle], children: [
7326
+ /* @__PURE__ */ jsx92(
7144
7327
  ChipBody,
7145
7328
  {
7146
7329
  width: 2.9,
@@ -7155,7 +7338,7 @@ var SOT143 = ({ footprint = "sot143" }) => {
7155
7338
  local.map((pad) => {
7156
7339
  const side = pad.y < 0 ? -1 : 1;
7157
7340
  const leadWidth = pad.pin === "1" ? 0.83 : 0.43;
7158
- return /* @__PURE__ */ jsx90(
7341
+ return /* @__PURE__ */ jsx92(
7159
7342
  SmdChipLead,
7160
7343
  {
7161
7344
  width: leadWidth,
@@ -7173,9 +7356,9 @@ var SOT143 = ({ footprint = "sot143" }) => {
7173
7356
  };
7174
7357
 
7175
7358
  // lib/FlexScreen.tsx
7176
- import { Colorize as Colorize54, Rotate as Rotate25, RoundedCuboid as RoundedCuboid6, Translate as Translate44 } from "jscad-fiber";
7359
+ import { Colorize as Colorize56, Rotate as Rotate27, RoundedCuboid as RoundedCuboid6, Translate as Translate44 } from "jscad-fiber";
7177
7360
  import { Fragment as Fragment80 } from "react";
7178
- import { Fragment as Fragment81, jsx as jsx91, jsxs as jsxs87 } from "react/jsx-runtime";
7361
+ import { Fragment as Fragment81, jsx as jsx93, jsxs as jsxs89 } from "react/jsx-runtime";
7179
7362
  var DEFAULT_ASPECT_RATIO = 16 / 9;
7180
7363
  var DEFAULT_DIAGONAL = 40;
7181
7364
  var EPSILON = 1e-6;
@@ -7405,7 +7588,7 @@ var CableStrip = ({
7405
7588
  acrossOffset = 0,
7406
7589
  normalOffset = 0,
7407
7590
  overlap = 0.03
7408
- }) => /* @__PURE__ */ jsx91(Colorize54, { color, children: points.slice(1).map((point, index) => {
7591
+ }) => /* @__PURE__ */ jsx93(Colorize56, { color, children: points.slice(1).map((point, index) => {
7409
7592
  const previous = points[index];
7410
7593
  const dx = point[0] - previous[0];
7411
7594
  const dy = point[1] - previous[1];
@@ -7423,7 +7606,7 @@ var CableStrip = ({
7423
7606
  1e-3,
7424
7607
  Math.min(width10, thickness, segmentLength) / 2 - 1e-3
7425
7608
  );
7426
- return /* @__PURE__ */ jsx91(Translate44, { offset: midpoint, children: /* @__PURE__ */ jsx91(Rotate25, { rotation: [pitch, 0, yaw], children: /* @__PURE__ */ jsx91(
7609
+ return /* @__PURE__ */ jsx93(Translate44, { offset: midpoint, children: /* @__PURE__ */ jsx93(Rotate27, { rotation: [pitch, 0, yaw], children: /* @__PURE__ */ jsx93(
7427
7610
  RoundedCuboid6,
7428
7611
  {
7429
7612
  size: [width10, segmentLength + overlap, thickness],
@@ -7632,8 +7815,8 @@ var FlexScreen = (props) => {
7632
7815
  );
7633
7816
  const conductorNormalOffset = (flexCableThickness + conductorThickness) / 2;
7634
7817
  const stiffenerNormalOffset = -(flexCableThickness + stiffenerThickness) / 2;
7635
- const assembly = /* @__PURE__ */ jsxs87(Fragment81, { children: [
7636
- showFlexCable && /* @__PURE__ */ jsx91(
7818
+ const assembly = /* @__PURE__ */ jsxs89(Fragment81, { children: [
7819
+ showFlexCable && /* @__PURE__ */ jsx93(
7637
7820
  CableStrip,
7638
7821
  {
7639
7822
  points: path,
@@ -7642,8 +7825,8 @@ var FlexScreen = (props) => {
7642
7825
  color: flexCableColor
7643
7826
  }
7644
7827
  ),
7645
- showFlexCable && showStiffeners && resolvedStiffenerLength > EPSILON && /* @__PURE__ */ jsxs87(Fragment81, { children: [
7646
- /* @__PURE__ */ jsx91(
7828
+ showFlexCable && showStiffeners && resolvedStiffenerLength > EPSILON && /* @__PURE__ */ jsxs89(Fragment81, { children: [
7829
+ /* @__PURE__ */ jsx93(
7647
7830
  CableStrip,
7648
7831
  {
7649
7832
  points: startStiffener,
@@ -7653,7 +7836,7 @@ var FlexScreen = (props) => {
7653
7836
  normalOffset: stiffenerNormalOffset
7654
7837
  }
7655
7838
  ),
7656
- /* @__PURE__ */ jsx91(
7839
+ /* @__PURE__ */ jsx93(
7657
7840
  CableStrip,
7658
7841
  {
7659
7842
  points: endStiffener,
@@ -7664,8 +7847,8 @@ var FlexScreen = (props) => {
7664
7847
  }
7665
7848
  )
7666
7849
  ] }),
7667
- showFlexCable && showConductors && contactLength > EPSILON && conductorOffsets.map((acrossOffset, index) => /* @__PURE__ */ jsxs87(Fragment80, { children: [
7668
- /* @__PURE__ */ jsx91(
7850
+ showFlexCable && showConductors && contactLength > EPSILON && conductorOffsets.map((acrossOffset, index) => /* @__PURE__ */ jsxs89(Fragment80, { children: [
7851
+ /* @__PURE__ */ jsx93(
7669
7852
  CableStrip,
7670
7853
  {
7671
7854
  points: startContacts,
@@ -7676,7 +7859,7 @@ var FlexScreen = (props) => {
7676
7859
  normalOffset: conductorNormalOffset
7677
7860
  }
7678
7861
  ),
7679
- /* @__PURE__ */ jsx91(
7862
+ /* @__PURE__ */ jsx93(
7680
7863
  CableStrip,
7681
7864
  {
7682
7865
  points: endContacts,
@@ -7688,7 +7871,7 @@ var FlexScreen = (props) => {
7688
7871
  }
7689
7872
  )
7690
7873
  ] }, `conductor:${index}`)),
7691
- showScreen && /* @__PURE__ */ jsx91(Translate44, { offset: screenCenter, children: /* @__PURE__ */ jsx91(Rotate25, { rotation: screenRotation ?? presetScreenRotation, children: /* @__PURE__ */ jsx91(
7874
+ showScreen && /* @__PURE__ */ jsx93(Translate44, { offset: screenCenter, children: /* @__PURE__ */ jsx93(Rotate27, { rotation: screenRotation ?? presetScreenRotation, children: /* @__PURE__ */ jsx93(
7692
7875
  Screen,
7693
7876
  {
7694
7877
  width: size.width,
@@ -7703,7 +7886,7 @@ var FlexScreen = (props) => {
7703
7886
  }
7704
7887
  ) }) })
7705
7888
  ] });
7706
- return /* @__PURE__ */ jsx91(
7889
+ return /* @__PURE__ */ jsx93(
7707
7890
  Translate44,
7708
7891
  {
7709
7892
  offset: {
@@ -7711,21 +7894,21 @@ var FlexScreen = (props) => {
7711
7894
  y: offset?.y ?? 0,
7712
7895
  z: offset?.z ?? 0
7713
7896
  },
7714
- children: /* @__PURE__ */ jsx91(Translate44, { offset: start, children: /* @__PURE__ */ jsx91(Rotate25, { rotation, children: /* @__PURE__ */ jsx91(Translate44, { offset: [-start[0], -start[1], -start[2]], children: assembly }) }) })
7897
+ children: /* @__PURE__ */ jsx93(Translate44, { offset: start, children: /* @__PURE__ */ jsx93(Rotate27, { rotation, children: /* @__PURE__ */ jsx93(Translate44, { offset: [-start[0], -start[1], -start[2]], children: assembly }) }) })
7715
7898
  }
7716
7899
  );
7717
7900
  };
7718
7901
 
7719
7902
  // lib/Footprinter3d.tsx
7720
- import { Fragment as Fragment82, jsx as jsx92 } from "react/jsx-runtime";
7903
+ import { Fragment as Fragment82, jsx as jsx94 } from "react/jsx-runtime";
7721
7904
  var Footprinter3d = ({ footprint }) => {
7722
7905
  if (/(?:^|_)antennaRFANT5220110A0T(?:_|$)/.test(footprint))
7723
- return /* @__PURE__ */ jsx92(CeramicChipAntenna, { footprint });
7906
+ return /* @__PURE__ */ jsx94(CeramicChipAntenna, { footprint });
7724
7907
  const melfResistor = footprint.match(
7725
7908
  /(?:^|_)melfresistor(0102|0204|0207)(?:_|$)/
7726
7909
  );
7727
7910
  if (melfResistor)
7728
- return /* @__PURE__ */ jsx92(
7911
+ return /* @__PURE__ */ jsx94(
7729
7912
  MelfResistor,
7730
7913
  {
7731
7914
  footprint,
@@ -7734,7 +7917,7 @@ var Footprinter3d = ({ footprint }) => {
7734
7917
  );
7735
7918
  const tantalum = footprint.match(/(?:^|_)tantalum([ABCD])(?:_|$)/);
7736
7919
  if (tantalum)
7737
- return /* @__PURE__ */ jsx92(
7920
+ return /* @__PURE__ */ jsx94(
7738
7921
  TantalumCapacitor,
7739
7922
  {
7740
7923
  footprint,
@@ -7745,7 +7928,7 @@ var Footprinter3d = ({ footprint }) => {
7745
7928
  /(?:^|_)crystal2(FC135|FC12M|FC1610AN|NX3225GD)(?:_|$)/
7746
7929
  );
7747
7930
  if (crystal2)
7748
- return /* @__PURE__ */ jsx92(
7931
+ return /* @__PURE__ */ jsx94(
7749
7932
  TwoPadCrystal,
7750
7933
  {
7751
7934
  footprint,
@@ -7758,7 +7941,7 @@ var Footprinter3d = ({ footprint }) => {
7758
7941
  switch (model.fn) {
7759
7942
  case "flexscreen": {
7760
7943
  const { fn: _, ...flexScreenProps } = model;
7761
- return /* @__PURE__ */ jsx92(FlexScreen, { ...flexScreenProps });
7944
+ return /* @__PURE__ */ jsx94(FlexScreen, { ...flexScreenProps });
7762
7945
  }
7763
7946
  }
7764
7947
  }
@@ -7776,17 +7959,17 @@ var Footprinter3d = ({ footprint }) => {
7776
7959
  const numPins = pinMatch && pinMatch[1] ? pinMatch[1] : "2";
7777
7960
  normalizedFootprint = `jst${numPins}_xh`;
7778
7961
  }
7779
- const fpJson = fp12.string(normalizedFootprint).json();
7962
+ const fpJson = fp14.string(normalizedFootprint).json();
7780
7963
  const colorMatch = footprint.match(/_color\(([^)]+)\)/);
7781
7964
  const color = colorMatch ? colorMatch[1] : void 0;
7782
7965
  const dim = (value, fallback) => {
7783
7966
  if (value === void 0 || value === null) return fallback;
7784
- const parsed = mm(value);
7967
+ const parsed = mm2(value);
7785
7968
  return Number.isFinite(parsed) ? parsed : fallback;
7786
7969
  };
7787
7970
  switch (fpJson.fn) {
7788
7971
  case "crystal":
7789
- return /* @__PURE__ */ jsx92(
7972
+ return /* @__PURE__ */ jsx94(
7790
7973
  Crystal,
7791
7974
  {
7792
7975
  horizontalPadPitch: fpJson.px,
@@ -7796,11 +7979,11 @@ var Footprinter3d = ({ footprint }) => {
7796
7979
  }
7797
7980
  );
7798
7981
  case "dip":
7799
- return /* @__PURE__ */ jsx92(Dip, { numPins: fpJson.num_pins, pitch: fpJson.p, bodyWidth: fpJson.w });
7982
+ return /* @__PURE__ */ jsx94(Dip, { numPins: fpJson.num_pins, pitch: fpJson.p, bodyWidth: fpJson.w });
7800
7983
  case "axial":
7801
- return /* @__PURE__ */ jsx92(AxialCapacitor, { pitch: fpJson.p });
7984
+ return /* @__PURE__ */ jsx94(AxialCapacitor, { pitch: fpJson.p });
7802
7985
  case "tssop":
7803
- return /* @__PURE__ */ jsx92(
7986
+ return /* @__PURE__ */ jsx94(
7804
7987
  Tssop,
7805
7988
  {
7806
7989
  pinCount: fpJson.num_pins,
@@ -7811,7 +7994,7 @@ var Footprinter3d = ({ footprint }) => {
7811
7994
  }
7812
7995
  );
7813
7996
  case "msop":
7814
- return /* @__PURE__ */ jsx92(
7997
+ return /* @__PURE__ */ jsx94(
7815
7998
  MSOP,
7816
7999
  {
7817
8000
  pinCount: fpJson.num_pins,
@@ -7822,7 +8005,7 @@ var Footprinter3d = ({ footprint }) => {
7822
8005
  }
7823
8006
  );
7824
8007
  case "vssop":
7825
- return /* @__PURE__ */ jsx92(
8008
+ return /* @__PURE__ */ jsx94(
7826
8009
  VSSOP,
7827
8010
  {
7828
8011
  pinCount: fpJson.num_pins,
@@ -7834,7 +8017,7 @@ var Footprinter3d = ({ footprint }) => {
7834
8017
  }
7835
8018
  );
7836
8019
  case "qfp":
7837
- return /* @__PURE__ */ jsx92(
8020
+ return /* @__PURE__ */ jsx94(
7838
8021
  QFP,
7839
8022
  {
7840
8023
  pinCount: fpJson.num_pins,
@@ -7845,12 +8028,12 @@ var Footprinter3d = ({ footprint }) => {
7845
8028
  }
7846
8029
  );
7847
8030
  case "tqfp":
7848
- return /* @__PURE__ */ jsx92(tqfp_default, {});
8031
+ return /* @__PURE__ */ jsx94(tqfp_default, {});
7849
8032
  case "lqfp":
7850
- return /* @__PURE__ */ jsx92(LQFP, { pinCount: fpJson.num_pins });
8033
+ return /* @__PURE__ */ jsx94(LQFP, { pinCount: fpJson.num_pins });
7851
8034
  case "qfn": {
7852
8035
  const hasThermalPad = typeof fpJson.thermalpad?.x === "number" && typeof fpJson.thermalpad?.y === "number";
7853
- return /* @__PURE__ */ jsx92(
8036
+ return /* @__PURE__ */ jsx94(
7854
8037
  qfn_default,
7855
8038
  {
7856
8039
  num_pins: fpJson.num_pins,
@@ -7868,7 +8051,7 @@ var Footprinter3d = ({ footprint }) => {
7868
8051
  }
7869
8052
  case "dfn": {
7870
8053
  const hasThermalPad = typeof fpJson.thermalpad?.x === "number" && typeof fpJson.thermalpad?.y === "number";
7871
- return /* @__PURE__ */ jsx92(
8054
+ return /* @__PURE__ */ jsx94(
7872
8055
  DFN,
7873
8056
  {
7874
8057
  num_pins: fpJson.num_pins,
@@ -7888,7 +8071,7 @@ var Footprinter3d = ({ footprint }) => {
7888
8071
  const rowsMatch = footprint.match(/_rows(\d+)/);
7889
8072
  const rows = rowsMatch && rowsMatch[1] ? parseInt(rowsMatch[1], 10) : 1;
7890
8073
  if (fpJson.male)
7891
- return /* @__PURE__ */ jsx92(
8074
+ return /* @__PURE__ */ jsx94(
7892
8075
  PinRow,
7893
8076
  {
7894
8077
  numberOfPins: fpJson.num_pins,
@@ -7900,7 +8083,7 @@ var Footprinter3d = ({ footprint }) => {
7900
8083
  }
7901
8084
  );
7902
8085
  if (fpJson.female)
7903
- return /* @__PURE__ */ jsx92(
8086
+ return /* @__PURE__ */ jsx94(
7904
8087
  FemaleHeaderRow,
7905
8088
  {
7906
8089
  numberOfPins: fpJson.num_pins,
@@ -7910,7 +8093,7 @@ var Footprinter3d = ({ footprint }) => {
7910
8093
  );
7911
8094
  }
7912
8095
  case "smdpinheader":
7913
- return /* @__PURE__ */ jsx92(
8096
+ return /* @__PURE__ */ jsx94(
7914
8097
  SmdPinHeader,
7915
8098
  {
7916
8099
  numberOfPins: fpJson.num_pins,
@@ -7919,44 +8102,44 @@ var Footprinter3d = ({ footprint }) => {
7919
8102
  }
7920
8103
  );
7921
8104
  case "led5050":
7922
- return /* @__PURE__ */ jsx92(Led5050, { color });
8105
+ return /* @__PURE__ */ jsx94(Led5050, { color });
7923
8106
  case "cap": {
7924
8107
  switch (fpJson.imperial) {
7925
8108
  case "0402":
7926
- return /* @__PURE__ */ jsx92(A0402, { color: "#856c4d" });
8109
+ return /* @__PURE__ */ jsx94(A0402, { color: "#856c4d" });
7927
8110
  case "0603":
7928
- return /* @__PURE__ */ jsx92(A0603, { color: "#856c4d" });
8111
+ return /* @__PURE__ */ jsx94(A0603, { color: "#856c4d" });
7929
8112
  case "0805":
7930
- return /* @__PURE__ */ jsx92(A0805, { color: "#856c4d" });
8113
+ return /* @__PURE__ */ jsx94(A0805, { color: "#856c4d" });
7931
8114
  case "0201":
7932
- return /* @__PURE__ */ jsx92(A0201, { color: "#856c4d" });
8115
+ return /* @__PURE__ */ jsx94(A0201, { color: "#856c4d" });
7933
8116
  case "01005":
7934
- return /* @__PURE__ */ jsx92(A01005, { color: "#856c4d" });
8117
+ return /* @__PURE__ */ jsx94(A01005, { color: "#856c4d" });
7935
8118
  case "1206":
7936
- return /* @__PURE__ */ jsx92(A1206, { color: "#856c4d" });
8119
+ return /* @__PURE__ */ jsx94(A1206, { color: "#856c4d" });
7937
8120
  case "1210":
7938
- return /* @__PURE__ */ jsx92(A1210, { color: "#856c4d" });
8121
+ return /* @__PURE__ */ jsx94(A1210, { color: "#856c4d" });
7939
8122
  case "2010":
7940
- return /* @__PURE__ */ jsx92(A2010, { color: "#856c4d" });
8123
+ return /* @__PURE__ */ jsx94(A2010, { color: "#856c4d" });
7941
8124
  case "2512":
7942
- return /* @__PURE__ */ jsx92(A2512, { color: "#856c4d" });
8125
+ return /* @__PURE__ */ jsx94(A2512, { color: "#856c4d" });
7943
8126
  }
7944
8127
  break;
7945
8128
  }
7946
8129
  case "sot23":
7947
8130
  switch (fpJson.num_pins) {
7948
8131
  case 3:
7949
- return /* @__PURE__ */ jsx92(SOT233P, { color });
8132
+ return /* @__PURE__ */ jsx94(SOT233P, { color });
7950
8133
  case 5:
7951
- return /* @__PURE__ */ jsx92(SOT_235_default, {});
8134
+ return /* @__PURE__ */ jsx94(SOT_235_default, {});
7952
8135
  }
7953
8136
  break;
7954
8137
  case "sot25":
7955
- return /* @__PURE__ */ jsx92(SOT_235_default, {});
8138
+ return /* @__PURE__ */ jsx94(SOT_235_default, {});
7956
8139
  case "sot":
7957
8140
  case "sot343": {
7958
8141
  const isSc70 = fpJson.fn === "sot343";
7959
- return /* @__PURE__ */ jsx92(
8142
+ return /* @__PURE__ */ jsx94(
7960
8143
  GullWingBody,
7961
8144
  {
7962
8145
  pads: getSmtPadRects(normalizedFootprint),
@@ -7967,10 +8150,10 @@ var Footprinter3d = ({ footprint }) => {
7967
8150
  );
7968
8151
  }
7969
8152
  case "sot563":
7970
- return /* @__PURE__ */ jsx92(SOT563, {});
8153
+ return /* @__PURE__ */ jsx94(SOT563, {});
7971
8154
  case "sot89": {
7972
8155
  const padSpan = dim(fpJson.w, 4.2);
7973
- return /* @__PURE__ */ jsx92(
8156
+ return /* @__PURE__ */ jsx94(
7974
8157
  SOT223,
7975
8158
  {
7976
8159
  fullWidth: padSpan,
@@ -7985,29 +8168,31 @@ var Footprinter3d = ({ footprint }) => {
7985
8168
  );
7986
8169
  }
7987
8170
  case "sot457":
7988
- return /* @__PURE__ */ jsx92(SOT457, {});
8171
+ return /* @__PURE__ */ jsx94(SOT457, {});
8172
+ case "smdslideswitch":
8173
+ return /* @__PURE__ */ jsx94(SmdSlideSwitch, { footprint: normalizedFootprint });
7989
8174
  case "usbcmidmount":
7990
- return /* @__PURE__ */ jsx92(UsbCMidmount, { footprint: normalizedFootprint });
8175
+ return /* @__PURE__ */ jsx94(UsbCMidmount, { footprint: normalizedFootprint });
7991
8176
  case "sot143":
7992
- return /* @__PURE__ */ jsx92(SOT143, { footprint: normalizedFootprint });
8177
+ return /* @__PURE__ */ jsx94(SOT143, { footprint: normalizedFootprint });
7993
8178
  case "sot223":
7994
- return /* @__PURE__ */ jsx92(SOT223, {});
8179
+ return /* @__PURE__ */ jsx94(SOT223, {});
7995
8180
  case "sot23w":
7996
- return /* @__PURE__ */ jsx92(SOT23W, {});
8181
+ return /* @__PURE__ */ jsx94(SOT23W, {});
7997
8182
  case "sot323":
7998
- return /* @__PURE__ */ jsx92(SOT323, {});
8183
+ return /* @__PURE__ */ jsx94(SOT323, {});
7999
8184
  case "sod323f":
8000
- return /* @__PURE__ */ jsx92(SOD323F, {});
8185
+ return /* @__PURE__ */ jsx94(SOD323F, {});
8001
8186
  case "sod323fl":
8002
- return /* @__PURE__ */ jsx92(SOD323FL, {});
8187
+ return /* @__PURE__ */ jsx94(SOD323FL, {});
8003
8188
  case "sot363":
8004
- return /* @__PURE__ */ jsx92(SOT_363_default, {});
8189
+ return /* @__PURE__ */ jsx94(SOT_363_default, {});
8005
8190
  case "sot886":
8006
- return /* @__PURE__ */ jsx92(SOT886, {});
8191
+ return /* @__PURE__ */ jsx94(SOT886, {});
8007
8192
  case "sot963":
8008
- return /* @__PURE__ */ jsx92(SOT963, {});
8193
+ return /* @__PURE__ */ jsx94(SOT963, {});
8009
8194
  case "pushbutton":
8010
- return /* @__PURE__ */ jsx92(
8195
+ return /* @__PURE__ */ jsx94(
8011
8196
  PushButton,
8012
8197
  {
8013
8198
  width: fpJson.w,
@@ -8016,18 +8201,21 @@ var Footprinter3d = ({ footprint }) => {
8016
8201
  }
8017
8202
  );
8018
8203
  case "jst":
8204
+ if (isJstShFootprint(normalizedFootprint)) {
8205
+ return /* @__PURE__ */ jsx94(JstSh, { footprint: normalizedFootprint });
8206
+ }
8019
8207
  if (fpJson.zh) {
8020
- return /* @__PURE__ */ jsx92(JSTZH1_5mm, { numPins: fpJson.num_pins });
8208
+ return /* @__PURE__ */ jsx94(JSTZH1_5mm, { numPins: fpJson.num_pins });
8021
8209
  }
8022
8210
  if (fpJson.ph) {
8023
- return /* @__PURE__ */ jsx92(JSTPH2_0mm, { numPins: fpJson.num_pins });
8211
+ return /* @__PURE__ */ jsx94(JSTPH2_0mm, { numPins: fpJson.num_pins });
8024
8212
  }
8025
8213
  if (fpJson.xh) {
8026
- return /* @__PURE__ */ jsx92(JSTXH2_5mm, { numPins: fpJson.num_pins });
8214
+ return /* @__PURE__ */ jsx94(JSTXH2_5mm, { numPins: fpJson.num_pins });
8027
8215
  }
8028
8216
  break;
8029
8217
  case "fpc":
8030
- return /* @__PURE__ */ jsx92(
8218
+ return /* @__PURE__ */ jsx94(
8031
8219
  FPC,
8032
8220
  {
8033
8221
  pinCount: fpJson.num_pins,
@@ -8047,7 +8235,7 @@ var Footprinter3d = ({ footprint }) => {
8047
8235
  }
8048
8236
  );
8049
8237
  case "rj45":
8050
- return /* @__PURE__ */ jsx92(
8238
+ return /* @__PURE__ */ jsx94(
8051
8239
  RJ45,
8052
8240
  {
8053
8241
  bodyWidth: fpJson.w,
@@ -8073,7 +8261,7 @@ var Footprinter3d = ({ footprint }) => {
8073
8261
  case "soic":
8074
8262
  case "sop8":
8075
8263
  case "ssop":
8076
- return /* @__PURE__ */ jsx92(
8264
+ return /* @__PURE__ */ jsx94(
8077
8265
  SOIC,
8078
8266
  {
8079
8267
  pinCount: fpJson.num_pins,
@@ -8097,7 +8285,7 @@ var Footprinter3d = ({ footprint }) => {
8097
8285
  );
8098
8286
  const distinct = (values) => new Set(values.map((value) => value.toFixed(3))).size;
8099
8287
  const rowsAlongY = signalPads.length > 2 && distinct(signalPads.map((pad) => pad.y)) === 2 && distinct(signalPads.map((pad) => pad.x)) > 2;
8100
- const dfn = /* @__PURE__ */ jsx92(
8288
+ const dfn = /* @__PURE__ */ jsx94(
8101
8289
  DFN,
8102
8290
  {
8103
8291
  num_pins: fpJson.num_pins,
@@ -8112,13 +8300,13 @@ var Footprinter3d = ({ footprint }) => {
8112
8300
  } : void 0
8113
8301
  }
8114
8302
  );
8115
- return rowsAlongY ? /* @__PURE__ */ jsx92(Rotate26, { rotation: [0, 0, "90deg"], children: dfn }) : dfn;
8303
+ return rowsAlongY ? /* @__PURE__ */ jsx94(Rotate28, { rotation: [0, 0, "90deg"], children: dfn }) : dfn;
8116
8304
  }
8117
8305
  case "mlp":
8118
8306
  case "lga":
8119
8307
  case "quad": {
8120
8308
  if (fpJson.legsoutside) {
8121
- return /* @__PURE__ */ jsx92(
8309
+ return /* @__PURE__ */ jsx94(
8122
8310
  QFP,
8123
8311
  {
8124
8312
  pinCount: fpJson.num_pins,
@@ -8129,7 +8317,7 @@ var Footprinter3d = ({ footprint }) => {
8129
8317
  }
8130
8318
  );
8131
8319
  }
8132
- return /* @__PURE__ */ jsx92(
8320
+ return /* @__PURE__ */ jsx94(
8133
8321
  qfn_default,
8134
8322
  {
8135
8323
  num_pins: fpJson.num_pins,
@@ -8145,7 +8333,7 @@ var Footprinter3d = ({ footprint }) => {
8145
8333
  const pitch = dim(fpJson.p, 0.8);
8146
8334
  const columns = fpJson.grid?.x ?? 8;
8147
8335
  const rows = fpJson.grid?.y ?? 8;
8148
- return /* @__PURE__ */ jsx92(
8336
+ return /* @__PURE__ */ jsx94(
8149
8337
  BGA,
8150
8338
  {
8151
8339
  ballPitch: pitch,
@@ -8158,43 +8346,43 @@ var Footprinter3d = ({ footprint }) => {
8158
8346
  );
8159
8347
  }
8160
8348
  case "sod523":
8161
- return /* @__PURE__ */ jsx92(SOD523, {});
8349
+ return /* @__PURE__ */ jsx94(SOD523, {});
8162
8350
  case "sod723":
8163
- return /* @__PURE__ */ jsx92(SOD723_default, {});
8351
+ return /* @__PURE__ */ jsx94(SOD723_default, {});
8164
8352
  case "sod882":
8165
- return /* @__PURE__ */ jsx92(SOD882, {});
8353
+ return /* @__PURE__ */ jsx94(SOD882, {});
8166
8354
  case "sma":
8167
- return /* @__PURE__ */ jsx92(SMA, {});
8355
+ return /* @__PURE__ */ jsx94(SMA, {});
8168
8356
  case "smb":
8169
- return /* @__PURE__ */ jsx92(SMB, {});
8357
+ return /* @__PURE__ */ jsx94(SMB, {});
8170
8358
  case "smc":
8171
- return /* @__PURE__ */ jsx92(SMC, {});
8359
+ return /* @__PURE__ */ jsx94(SMC, {});
8172
8360
  case "smf":
8173
- return /* @__PURE__ */ jsx92(SMF, {});
8361
+ return /* @__PURE__ */ jsx94(SMF, {});
8174
8362
  case "sod123":
8175
- return /* @__PURE__ */ jsx92(SOD123, {});
8363
+ return /* @__PURE__ */ jsx94(SOD123, {});
8176
8364
  case "sod123f":
8177
- return /* @__PURE__ */ jsx92(SOD123F, {});
8365
+ return /* @__PURE__ */ jsx94(SOD123F, {});
8178
8366
  case "sod123fl":
8179
- return /* @__PURE__ */ jsx92(SOD123FL, {});
8367
+ return /* @__PURE__ */ jsx94(SOD123FL, {});
8180
8368
  case "sod123w":
8181
- return /* @__PURE__ */ jsx92(SOD123W, {});
8369
+ return /* @__PURE__ */ jsx94(SOD123W, {});
8182
8370
  case "sod110":
8183
- return /* @__PURE__ */ jsx92(SOD123W, { bodyWidth: 2.1, bodyLength: 1.4 });
8371
+ return /* @__PURE__ */ jsx94(SOD123W, { bodyWidth: 2.1, bodyLength: 1.4 });
8184
8372
  case "sod128":
8185
- return /* @__PURE__ */ jsx92(SOD128, {});
8373
+ return /* @__PURE__ */ jsx94(SOD128, {});
8186
8374
  case "sod323":
8187
- return /* @__PURE__ */ jsx92(SOD323, {});
8375
+ return /* @__PURE__ */ jsx94(SOD323, {});
8188
8376
  case "sod323w":
8189
- return /* @__PURE__ */ jsx92(SOD323, {});
8377
+ return /* @__PURE__ */ jsx94(SOD323, {});
8190
8378
  case "sod80":
8191
- return /* @__PURE__ */ jsx92(MINIMELF, {});
8379
+ return /* @__PURE__ */ jsx94(MINIMELF, {});
8192
8380
  case "sod882d":
8193
- return /* @__PURE__ */ jsx92(SOD882, {});
8381
+ return /* @__PURE__ */ jsx94(SOD882, {});
8194
8382
  case "smbf":
8195
- return /* @__PURE__ */ jsx92(SMB, {});
8383
+ return /* @__PURE__ */ jsx94(SMB, {});
8196
8384
  case "led2835":
8197
- return /* @__PURE__ */ jsx92(
8385
+ return /* @__PURE__ */ jsx94(
8198
8386
  Led2835,
8199
8387
  {
8200
8388
  color,
@@ -8212,10 +8400,10 @@ var Footprinter3d = ({ footprint }) => {
8212
8400
  const pitch = dim(fpJson.p, 2.5);
8213
8401
  const namedDiameter = footprint.match(/_d([\d.]+)/);
8214
8402
  const diameter = fpJson.d !== void 0 ? dim(fpJson.d, pitch * 2) : namedDiameter ? Number(namedDiameter[1]) : pitch * 2;
8215
- return /* @__PURE__ */ jsx92(ElectrolyticCapacitor, { diameter, leadPitch: pitch });
8403
+ return /* @__PURE__ */ jsx94(ElectrolyticCapacitor, { diameter, leadPitch: pitch });
8216
8404
  }
8217
8405
  case "potentiometer":
8218
- return /* @__PURE__ */ jsx92(
8406
+ return /* @__PURE__ */ jsx94(
8219
8407
  Potentiometer,
8220
8408
  {
8221
8409
  bodyWidth: dim(fpJson.w, 5.35),
@@ -8225,7 +8413,7 @@ var Footprinter3d = ({ footprint }) => {
8225
8413
  }
8226
8414
  );
8227
8415
  case "smdpushbutton":
8228
- return /* @__PURE__ */ jsx92(
8416
+ return /* @__PURE__ */ jsx94(
8229
8417
  SmdPushButton,
8230
8418
  {
8231
8419
  padSpanX: dim(fpJson.px, 4.2),
@@ -8241,20 +8429,20 @@ var Footprinter3d = ({ footprint }) => {
8241
8429
  { x: -halfWidth, pins: fpJson.left ?? 0, key: "left" },
8242
8430
  { x: halfWidth, pins: fpJson.right ?? 0, key: "right" }
8243
8431
  ];
8244
- return /* @__PURE__ */ jsx92(Fragment82, { children: sides.filter(({ pins }) => pins > 0).map(({ x, pins, key }) => /* @__PURE__ */ jsx92(Translate45, { center: [x, 0, 0], children: /* @__PURE__ */ jsx92(Rotate26, { rotation: [0, 0, "90deg"], children: /* @__PURE__ */ jsx92(PinRow, { numberOfPins: pins, pitch }) }) }, key)) });
8432
+ return /* @__PURE__ */ jsx94(Fragment82, { children: sides.filter(({ pins }) => pins > 0).map(({ x, pins, key }) => /* @__PURE__ */ jsx94(Translate45, { center: [x, 0, 0], children: /* @__PURE__ */ jsx94(Rotate28, { rotation: [0, 0, "90deg"], children: /* @__PURE__ */ jsx94(PinRow, { numberOfPins: pins, pitch }) }) }, key)) });
8245
8433
  }
8246
8434
  case "sod923":
8247
- return /* @__PURE__ */ jsx92(SOD923, {});
8435
+ return /* @__PURE__ */ jsx94(SOD923, {});
8248
8436
  case "hc49":
8249
- return /* @__PURE__ */ jsx92(HC49, {});
8437
+ return /* @__PURE__ */ jsx94(HC49, {});
8250
8438
  case "micromelf":
8251
- return /* @__PURE__ */ jsx92(MicroMELF, {});
8439
+ return /* @__PURE__ */ jsx94(MicroMELF, {});
8252
8440
  case "minimelf":
8253
- return /* @__PURE__ */ jsx92(MINIMELF, {});
8441
+ return /* @__PURE__ */ jsx94(MINIMELF, {});
8254
8442
  case "melf":
8255
- return /* @__PURE__ */ jsx92(MELF, {});
8443
+ return /* @__PURE__ */ jsx94(MELF, {});
8256
8444
  case "ms012":
8257
- return /* @__PURE__ */ jsx92(
8445
+ return /* @__PURE__ */ jsx94(
8258
8446
  MS012,
8259
8447
  {
8260
8448
  pinCount: fpJson.num_pins,
@@ -8264,7 +8452,7 @@ var Footprinter3d = ({ footprint }) => {
8264
8452
  }
8265
8453
  );
8266
8454
  case "ms013":
8267
- return /* @__PURE__ */ jsx92(
8455
+ return /* @__PURE__ */ jsx94(
8268
8456
  MS013,
8269
8457
  {
8270
8458
  pinCount: fpJson.num_pins,
@@ -8274,19 +8462,19 @@ var Footprinter3d = ({ footprint }) => {
8274
8462
  }
8275
8463
  );
8276
8464
  case "sot723":
8277
- return /* @__PURE__ */ jsx92(SOT723, {});
8465
+ return /* @__PURE__ */ jsx94(SOT723, {});
8278
8466
  case "to220":
8279
- return /* @__PURE__ */ jsx92(TO220, { leads: getPlatedHoleCenters(normalizedFootprint) });
8467
+ return /* @__PURE__ */ jsx94(TO220, { leads: getPlatedHoleCenters(normalizedFootprint) });
8280
8468
  case "to220f":
8281
- return /* @__PURE__ */ jsx92(TO220, { mouldedTab: true, leads: getPlatedHoleCenters(normalizedFootprint) });
8469
+ return /* @__PURE__ */ jsx94(TO220, { mouldedTab: true, leads: getPlatedHoleCenters(normalizedFootprint) });
8282
8470
  case "to92":
8283
- return /* @__PURE__ */ jsx92(TO92, { leads: getPlatedHoleCenters(normalizedFootprint) });
8471
+ return /* @__PURE__ */ jsx94(TO92, { leads: getPlatedHoleCenters(normalizedFootprint) });
8284
8472
  case "to92l":
8285
8473
  case "to92s": {
8286
8474
  const across = dim(fpJson.w, 4.8);
8287
8475
  const along = dim(fpJson.h, 4);
8288
8476
  const diameter = Math.max(across, along);
8289
- return /* @__PURE__ */ jsx92(
8477
+ return /* @__PURE__ */ jsx94(
8290
8478
  TO92,
8291
8479
  {
8292
8480
  bodyDiameter: diameter,
@@ -8305,7 +8493,7 @@ var Footprinter3d = ({ footprint }) => {
8305
8493
  dim(fpJson.tabh, isD2Pak ? 10 : 5.8),
8306
8494
  isD2Pak ? 10 : 6.5
8307
8495
  );
8308
- return /* @__PURE__ */ jsx92(
8496
+ return /* @__PURE__ */ jsx94(
8309
8497
  DPAK,
8310
8498
  {
8311
8499
  bodyWidth: tabWidth,
@@ -8322,7 +8510,7 @@ var Footprinter3d = ({ footprint }) => {
8322
8510
  }
8323
8511
  case "stampboard":
8324
8512
  case "stampreceiver":
8325
- return /* @__PURE__ */ jsx92(
8513
+ return /* @__PURE__ */ jsx94(
8326
8514
  StampBoard,
8327
8515
  {
8328
8516
  bodyWidth: fpJson.w,
@@ -8346,7 +8534,7 @@ var Footprinter3d = ({ footprint }) => {
8346
8534
  const pinRow = fpJson.pinrow;
8347
8535
  const pinRowHoleEdgeToEdgeDist = fpJson.pinRowHoleEdgeToEdgeDist;
8348
8536
  const holes = Array.isArray(fpJson.holes) ? fpJson.holes : [];
8349
- return /* @__PURE__ */ jsx92(
8537
+ return /* @__PURE__ */ jsx94(
8350
8538
  MountedPcbModule,
8351
8539
  {
8352
8540
  numPins: pinRow,
@@ -8373,29 +8561,29 @@ var Footprinter3d = ({ footprint }) => {
8373
8561
  }
8374
8562
  switch (fpJson.imperial) {
8375
8563
  case "0402":
8376
- return /* @__PURE__ */ jsx92(A0402, { color });
8564
+ return /* @__PURE__ */ jsx94(A0402, { color });
8377
8565
  case "0603":
8378
- return /* @__PURE__ */ jsx92(A0603, { color });
8566
+ return /* @__PURE__ */ jsx94(A0603, { color });
8379
8567
  case "0805":
8380
- return /* @__PURE__ */ jsx92(A0805, { color });
8568
+ return /* @__PURE__ */ jsx94(A0805, { color });
8381
8569
  case "0201":
8382
- return /* @__PURE__ */ jsx92(A0201, { color });
8570
+ return /* @__PURE__ */ jsx94(A0201, { color });
8383
8571
  case "01005":
8384
- return /* @__PURE__ */ jsx92(A01005, { color });
8572
+ return /* @__PURE__ */ jsx94(A01005, { color });
8385
8573
  case "1206":
8386
- return /* @__PURE__ */ jsx92(A1206, { color });
8574
+ return /* @__PURE__ */ jsx94(A1206, { color });
8387
8575
  case "1210":
8388
- return /* @__PURE__ */ jsx92(A1210, { color });
8576
+ return /* @__PURE__ */ jsx94(A1210, { color });
8389
8577
  case "2010":
8390
- return /* @__PURE__ */ jsx92(A2010, { color });
8578
+ return /* @__PURE__ */ jsx94(A2010, { color });
8391
8579
  case "2512":
8392
- return /* @__PURE__ */ jsx92(A2512, { color });
8580
+ return /* @__PURE__ */ jsx94(A2512, { color });
8393
8581
  }
8394
8582
  if ((fpJson.fn === "res" || fpJson.fn === "cap") && fpJson.p !== void 0 && fpJson.ph !== void 0) {
8395
- const padPitch = mm(fpJson.p);
8396
- const padHeight = mm(fpJson.ph);
8583
+ const padPitch = mm2(fpJson.p);
8584
+ const padHeight = mm2(fpJson.ph);
8397
8585
  if (Number.isFinite(padPitch) && Number.isFinite(padHeight)) {
8398
- return /* @__PURE__ */ jsx92(
8586
+ return /* @__PURE__ */ jsx94(
8399
8587
  ParametricChip,
8400
8588
  {
8401
8589
  padPitch,
@@ -8439,6 +8627,7 @@ export {
8439
8627
  JSTPH2_0mm,
8440
8628
  JSTXH2_5mm,
8441
8629
  JSTZH1_5mm,
8630
+ JstSh,
8442
8631
  LQFP,
8443
8632
  Led2835,
8444
8633
  Led5050,
@@ -8487,6 +8676,7 @@ export {
8487
8676
  SmdChipLead,
8488
8677
  SmdPinHeader,
8489
8678
  SmdPushButton,
8679
+ SmdSlideSwitch,
8490
8680
  StampBoard,
8491
8681
  TO220,
8492
8682
  TO92,
@@ -8496,6 +8686,7 @@ export {
8496
8686
  TwoPadCrystal,
8497
8687
  UsbCMidmount,
8498
8688
  VSSOP,
8689
+ isJstShFootprint,
8499
8690
  melfResistorSizes,
8500
8691
  resolveFlexScreenSize,
8501
8692
  tantalumCases,