jscad-electronics 0.0.154 → 0.0.155

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.d.ts CHANGED
@@ -262,12 +262,11 @@ interface SOD123Props {
262
262
  */
263
263
  declare const SOD123: ({ fullWidth, fullLength, }?: SOD123Props) => react_jsx_runtime.JSX.Element;
264
264
 
265
- declare const PinRow: ({ numberOfPins, pitch, longSidePinLength, invert, faceup, rows, smd, rightangle, }: {
265
+ declare const PinRow: ({ numberOfPins, pitch, longSidePinLength, invert, rows, smd, rightangle, }: {
266
266
  numberOfPins: number;
267
267
  pitch?: number;
268
268
  longSidePinLength?: number;
269
269
  invert?: boolean;
270
- faceup?: boolean;
271
270
  rows?: number;
272
271
  smd?: boolean;
273
272
  rightangle?: boolean;
@@ -278,7 +277,7 @@ interface AxialCapacitorProps {
278
277
  }
279
278
  declare const AxialCapacitor: ({ pitch }: AxialCapacitorProps) => react_jsx_runtime.JSX.Element;
280
279
 
281
- declare const PinHeader: ({ x, y, pinThickness, shortSidePinLength, longSidePinLength, bodyHeight, bodyLength, bodyWidth, flipZ, faceup, smd, rightangle, }: {
280
+ declare const PinHeader: ({ x, y, pinThickness, shortSidePinLength, longSidePinLength, bodyHeight, bodyLength, bodyWidth, flipZ, smd, rightangle, }: {
282
281
  x: number;
283
282
  y: number;
284
283
  pinThickness: number;
@@ -288,7 +287,6 @@ declare const PinHeader: ({ x, y, pinThickness, shortSidePinLength, longSidePinL
288
287
  bodyLength?: number;
289
288
  bodyWidth?: number;
290
289
  flipZ: (z: number) => number;
291
- faceup?: boolean;
292
290
  smd?: boolean;
293
291
  rightangle?: boolean;
294
292
  }) => react_jsx_runtime.JSX.Element;
package/dist/index.js CHANGED
@@ -1274,7 +1274,6 @@ var PinHeader = ({
1274
1274
  bodyLength: bodyLength10 = 2.54,
1275
1275
  bodyWidth = 2.54,
1276
1276
  flipZ,
1277
- faceup,
1278
1277
  smd,
1279
1278
  rightangle
1280
1279
  }) => {
@@ -1287,7 +1286,7 @@ var PinHeader = ({
1287
1286
  center: [x, y, flipZ(bodyHeight / 2)]
1288
1287
  }
1289
1288
  ) }),
1290
- !faceup && /* @__PURE__ */ jsx21(Colorize7, { color: PIN_METAL_COLOR, children: smd ? /* @__PURE__ */ jsx21(
1289
+ /* @__PURE__ */ jsx21(Colorize7, { color: PIN_METAL_COLOR, children: smd ? /* @__PURE__ */ jsx21(
1291
1290
  SmdChipLead,
1292
1291
  {
1293
1292
  rotation: -Math.PI / 2,
@@ -1356,7 +1355,6 @@ var PinRow = ({
1356
1355
  pitch = 2.54,
1357
1356
  longSidePinLength = 6,
1358
1357
  invert,
1359
- faceup,
1360
1358
  rows = 1,
1361
1359
  smd,
1362
1360
  rightangle
@@ -1367,8 +1365,9 @@ var PinRow = ({
1367
1365
  const rowSpacing = 2.54;
1368
1366
  const shortSidePinLength = 3;
1369
1367
  const xoff = -((pinsPerRow - 1) / 2) * pitch;
1370
- const zOffset = !smd && !rightangle ? -bodyHeight - 1.6 : 0;
1371
- const flipZ = (z) => (invert || faceup ? -z + bodyHeight : z) + zOffset;
1368
+ const throughHole = !smd && !rightangle;
1369
+ const flipped = throughHole ? !invert : Boolean(invert);
1370
+ const flipZ = (z) => flipped ? -z + bodyHeight : z;
1372
1371
  return /* @__PURE__ */ jsx22(Fragment18, { children: Array.from({ length: numberOfPins }, (_, i) => {
1373
1372
  const row = Math.floor(i / pinsPerRow);
1374
1373
  const col = i % pinsPerRow;
@@ -1384,7 +1383,6 @@ var PinRow = ({
1384
1383
  longSidePinLength,
1385
1384
  bodyHeight,
1386
1385
  flipZ,
1387
- faceup,
1388
1386
  smd,
1389
1387
  rightangle
1390
1388
  },
@@ -6802,7 +6800,6 @@ var Footprinter3d = ({ footprint }) => {
6802
6800
  numberOfPins: fpJson.num_pins,
6803
6801
  pitch: fpJson.p,
6804
6802
  invert: fpJson.invert,
6805
- faceup: fpJson.faceup,
6806
6803
  rows,
6807
6804
  smd: fpJson.smd || fpJson.surface_mount,
6808
6805
  rightangle: fpJson.rightangle