@tscircuit/footprinter 0.0.231 → 0.0.233

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
@@ -7109,10 +7109,12 @@ var m2host = (raw_params) => {
7109
7109
  const pn = i + 1;
7110
7110
  if (pn >= 24 && pn <= 31) continue;
7111
7111
  const y = startY - i * halfPitch;
7112
- const x = i % 2 === 0 ? 0 : -rowOffset / 2;
7113
- const padLengthWithOffset = padLength + (i % 2 === 0 ? 0 : 0.25);
7112
+ const isBottomLayer = pn % 2 === 0;
7113
+ const padLengthWithOffset = padLength + (isBottomLayer ? 0.25 : 0);
7114
+ const rightEdgeOffset = 0.5;
7115
+ const x = rightEdgeOffset - padLengthWithOffset / 2;
7114
7116
  const pad2 = rectpad(pn, x, y, padLengthWithOffset, padWidth);
7115
- pad2.layer = pn % 2 === 0 ? "bottom" : "top";
7117
+ pad2.layer = isBottomLayer ? "bottom" : "top";
7116
7118
  pads.push(pad2);
7117
7119
  }
7118
7120
  const cutoutWidth = 46 * 0.0254;
@@ -7195,7 +7197,7 @@ var m2host = (raw_params) => {
7195
7197
 
7196
7198
  // src/helpers/is-not-null.ts
7197
7199
  function isNotNull(value) {
7198
- return value !== null;
7200
+ return value !== null && value !== void 0;
7199
7201
  }
7200
7202
 
7201
7203
  // src/helpers/apply-origin.ts
@@ -7297,8 +7299,9 @@ var string2 = (def) => {
7297
7299
  const modifiedDef = def.replace(/^((?:\d{4}|\d{5}))(?=$|_)/, "res$1");
7298
7300
  const def_parts = modifiedDef.split(/_(?!metric)/).map((s) => {
7299
7301
  const m = s.match(/([a-z]+)([\(\d\.\+\?].*)?/);
7300
- const [_, fn, v] = m ?? [];
7301
- if (v?.includes("?")) return null;
7302
+ if (!m) return null;
7303
+ const [, fn, v] = m;
7304
+ if (!fn || v?.includes("?")) return null;
7302
7305
  return { fn, v };
7303
7306
  }).filter(isNotNull);
7304
7307
  for (const { fn, v } of def_parts) {