@tscircuit/footprinter 0.0.43 → 0.0.44

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.cjs CHANGED
@@ -217,8 +217,8 @@ var require_lodash10 = __commonJS({
217
217
  if (typeof end == "undefined") {
218
218
  end = array ? array.length : 0;
219
219
  }
220
- var index = -1, length5 = end - start || 0, result = Array(length5 < 0 ? 0 : length5);
221
- while (++index < length5) {
220
+ var index = -1, length6 = end - start || 0, result = Array(length6 < 0 ? 0 : length6);
221
+ while (++index < length6) {
222
222
  result[index] = array[start + index];
223
223
  }
224
224
  return result;
@@ -451,8 +451,8 @@ var require_lodash18 = __commonJS({
451
451
  if (!objectTypes[typeof iterable])
452
452
  return result;
453
453
  callback = callback && typeof thisArg == "undefined" ? callback : baseCreateCallback(callback, thisArg, 3);
454
- var ownIndex = -1, ownProps = objectTypes[typeof iterable] && keys(iterable), length5 = ownProps ? ownProps.length : 0;
455
- while (++ownIndex < length5) {
454
+ var ownIndex = -1, ownProps = objectTypes[typeof iterable] && keys(iterable), length6 = ownProps ? ownProps.length : 0;
455
+ while (++ownIndex < length6) {
456
456
  index = ownProps[ownIndex];
457
457
  if (callback(iterable[index], index, collection) === false)
458
458
  return result;
@@ -470,10 +470,10 @@ var require_lodash19 = __commonJS({
470
470
  var baseCreateCallback = require_lodash17();
471
471
  var forOwn = require_lodash18();
472
472
  function forEach(collection, callback, thisArg) {
473
- var index = -1, length5 = collection ? collection.length : 0;
473
+ var index = -1, length6 = collection ? collection.length : 0;
474
474
  callback = callback && typeof thisArg == "undefined" ? callback : baseCreateCallback(callback, thisArg, 3);
475
- if (typeof length5 == "number") {
476
- while (++index < length5) {
475
+ if (typeof length6 == "number") {
476
+ while (++index < length6) {
477
477
  if (callback(collection[index], index, collection) === false) {
478
478
  break;
479
479
  }
@@ -2568,7 +2568,7 @@ var require_dist = __commonJS({
2568
2568
  inductance: () => inductance,
2569
2569
  layer_ref: () => layer_ref,
2570
2570
  layer_string: () => layer_string,
2571
- length: () => length5,
2571
+ length: () => length6,
2572
2572
  pcb_board: () => pcb_board,
2573
2573
  pcb_component: () => pcb_component,
2574
2574
  pcb_hole: () => pcb_hole,
@@ -2705,16 +2705,16 @@ var require_dist = __commonJS({
2705
2705
  };
2706
2706
  }
2707
2707
  };
2708
- var import_zod9 = require("zod");
2709
- var resistance = import_zod9.z.string().or(import_zod9.z.number()).transform((v) => parseAndConvertSiUnit(v).value);
2710
- var capacitance = import_zod9.z.string().or(import_zod9.z.number()).transform((v) => parseAndConvertSiUnit(v).value);
2711
- var inductance = import_zod9.z.string().or(import_zod9.z.number()).transform((v) => parseAndConvertSiUnit(v).value);
2712
- var voltage = import_zod9.z.string().or(import_zod9.z.number()).transform((v) => parseAndConvertSiUnit(v).value);
2713
- var length5 = import_zod9.z.string().or(import_zod9.z.number()).transform((v) => parseAndConvertSiUnit(v).value);
2714
- var distance2 = length5;
2715
- var current = import_zod9.z.string().or(import_zod9.z.number()).transform((v) => parseAndConvertSiUnit(v).value);
2716
- var time = import_zod9.z.string().or(import_zod9.z.number()).transform((v) => parseAndConvertSiUnit(v).value);
2717
- var rotation = import_zod9.z.string().or(import_zod9.z.number()).transform((v) => parseAndConvertSiUnit(v).value);
2708
+ var import_zod10 = require("zod");
2709
+ var resistance = import_zod10.z.string().or(import_zod10.z.number()).transform((v) => parseAndConvertSiUnit(v).value);
2710
+ var capacitance = import_zod10.z.string().or(import_zod10.z.number()).transform((v) => parseAndConvertSiUnit(v).value);
2711
+ var inductance = import_zod10.z.string().or(import_zod10.z.number()).transform((v) => parseAndConvertSiUnit(v).value);
2712
+ var voltage = import_zod10.z.string().or(import_zod10.z.number()).transform((v) => parseAndConvertSiUnit(v).value);
2713
+ var length6 = import_zod10.z.string().or(import_zod10.z.number()).transform((v) => parseAndConvertSiUnit(v).value);
2714
+ var distance2 = length6;
2715
+ var current = import_zod10.z.string().or(import_zod10.z.number()).transform((v) => parseAndConvertSiUnit(v).value);
2716
+ var time = import_zod10.z.string().or(import_zod10.z.number()).transform((v) => parseAndConvertSiUnit(v).value);
2717
+ var rotation = import_zod10.z.string().or(import_zod10.z.number()).transform((v) => parseAndConvertSiUnit(v).value);
2718
2718
  var import_zod22 = require("zod");
2719
2719
  var point = import_zod22.z.object({
2720
2720
  x: distance2,
@@ -2762,9 +2762,9 @@ var require_dist = __commonJS({
2762
2762
  var source_simple_ground = source_component_base.extend({
2763
2763
  ftype: import_zod92.z.literal("simple_ground")
2764
2764
  });
2765
- var import_zod10 = require("zod");
2765
+ var import_zod102 = require("zod");
2766
2766
  var source_simple_bug = source_component_base.extend({
2767
- ftype: import_zod10.z.literal("simple_bug")
2767
+ ftype: import_zod102.z.literal("simple_bug")
2768
2768
  });
2769
2769
  var import_zod11 = require("zod");
2770
2770
  var source_simple_inductor = source_component_base.extend({
@@ -2989,8 +2989,8 @@ var require_dist = __commonJS({
2989
2989
  center: point,
2990
2990
  layer: layer_ref,
2991
2991
  rotation,
2992
- width: length5,
2993
- height: length5
2992
+ width: length6,
2993
+ height: length6
2994
2994
  }).describe("Defines a component on the PCB");
2995
2995
  var import_zod322 = require("zod");
2996
2996
  var pcb_hole = import_zod322.z.object({
@@ -3121,8 +3121,8 @@ var require_dist = __commonJS({
3121
3121
  var import_zod41 = require("zod");
3122
3122
  var pcb_board = import_zod41.z.object({
3123
3123
  type: import_zod41.z.literal("pcb_board"),
3124
- width: length5,
3125
- height: length5,
3124
+ width: length6,
3125
+ height: length6,
3126
3126
  center: point
3127
3127
  }).describe("Defines the board outline of the PCB");
3128
3128
  var import_zod422 = require("zod");
@@ -3230,6 +3230,7 @@ __export(fn_exports, {
3230
3230
  dip: () => dip,
3231
3231
  led: () => led,
3232
3232
  mlp: () => mlp,
3233
+ pinrow: () => pinrow,
3233
3234
  qfn: () => qfn,
3234
3235
  qfp: () => qfp,
3235
3236
  quad: () => quad,
@@ -4188,6 +4189,27 @@ var dfn = (raw_params) => {
4188
4189
  return [...pads, ...silkscreenPaths];
4189
4190
  };
4190
4191
 
4192
+ // src/fn/pinrow.ts
4193
+ var import_zod9 = require("zod");
4194
+ var import_soup5 = __toESM(require_dist(), 1);
4195
+ var pinrow_def = import_zod9.z.object({
4196
+ num_pins: import_zod9.z.number(),
4197
+ p: import_soup5.length.default("0.1in").describe("pitch"),
4198
+ id: import_soup5.length.default("1.0mm").describe("inner diameter"),
4199
+ od: import_soup5.length.default("1.2mm").describe("outer diameter")
4200
+ });
4201
+ var pinrow = (raw_params) => {
4202
+ const params = pinrow_def.parse(raw_params);
4203
+ const { p, id, od } = params;
4204
+ const holes = [];
4205
+ const ns = params.num_pins - 1;
4206
+ const xoff = -(ns / 2) * p;
4207
+ for (let i = 0; i < params.num_pins; i++) {
4208
+ holes.push(platedhole(i + 1, xoff + i * p, 0, id, od));
4209
+ }
4210
+ return holes;
4211
+ };
4212
+
4191
4213
  // src/helpers/is-not-null.ts
4192
4214
  function isNotNull(value) {
4193
4215
  return value !== null;