@tscircuit/footprinter 0.0.297 → 0.0.298

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
@@ -502,14 +502,13 @@ var passive = (params) => {
502
502
  silkscreenLine,
503
503
  silkscreenRefText
504
504
  ];
505
- } else {
506
- return [
507
- rectpad(["1", "left"], -p / 2, 0, pw, ph),
508
- rectpad(["2", "right"], p / 2, 0, pw, ph),
509
- silkscreenLine,
510
- silkscreenRefText
511
- ];
512
505
  }
506
+ return [
507
+ rectpad(["1", "left"], -p / 2, 0, pw, ph),
508
+ rectpad(["2", "right"], p / 2, 0, pw, ph),
509
+ silkscreenLine,
510
+ silkscreenRefText
511
+ ];
513
512
  };
514
513
 
515
514
  // src/fn/diode.ts
@@ -8387,10 +8386,10 @@ var applyOrigin = (elements, origin) => {
8387
8386
  (el) => el.type === "pcb_smtpad" || el.type === "pcb_plated_hole" || el.type === "pcb_thtpad"
8388
8387
  );
8389
8388
  if (pads.length === 0) return elements;
8390
- let minX = Infinity;
8391
- let maxX = -Infinity;
8392
- let minY = Infinity;
8393
- let maxY = -Infinity;
8389
+ let minX = Number.POSITIVE_INFINITY;
8390
+ let maxX = Number.NEGATIVE_INFINITY;
8391
+ let minY = Number.POSITIVE_INFINITY;
8392
+ let maxY = Number.NEGATIVE_INFINITY;
8394
8393
  const updateBounds = (x, y, w = 0, h = 0) => {
8395
8394
  const left = x - w / 2;
8396
8395
  const right = x + w / 2;
@@ -8445,11 +8444,12 @@ var applyOrigin = (elements, origin) => {
8445
8444
  dx = maxX;
8446
8445
  dy = (minY + maxY) / 2;
8447
8446
  break;
8448
- case "pin1":
8447
+ case "pin1": {
8449
8448
  const pin1 = pads.find((p) => p.port_hints?.[0] === "1") || pads[0];
8450
8449
  dx = pin1.x;
8451
8450
  dy = pin1.y;
8452
8451
  break;
8452
+ }
8453
8453
  }
8454
8454
  if (dx === 0 && dy === 0) return elements;
8455
8455
  for (const el of elements) {