@tscircuit/footprinter 0.0.164 → 0.0.166

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
@@ -62,6 +62,7 @@ __export(fn_exports, {
62
62
  sot23: () => sot23,
63
63
  sot23w: () => sot23w,
64
64
  sot363: () => sot363,
65
+ sot457: () => sot457,
65
66
  sot563: () => sot563,
66
67
  sot723: () => sot723,
67
68
  sot89: () => sot89,
@@ -2903,11 +2904,19 @@ var pad = (params) => {
2903
2904
  };
2904
2905
 
2905
2906
  // src/fn/to92.ts
2906
- import {
2907
- length as length15
2908
- } from "circuit-json";
2909
2907
  import { z as z21 } from "zod";
2910
- var generate_semicircle = (centerX, centerY, radius) => {
2908
+ var to92_def = z21.object({
2909
+ fn: z21.string(),
2910
+ num_pins: z21.union([z21.literal(3), z21.literal(2)]).default(3),
2911
+ p: z21.string().default("1.27mm"),
2912
+ id: z21.string().default("0.72mm"),
2913
+ od: z21.string().default("0.95mm"),
2914
+ w: z21.string().default("4.5mm"),
2915
+ h: z21.string().default("4.5mm"),
2916
+ inline: z21.boolean().default(false),
2917
+ string: z21.string().optional()
2918
+ });
2919
+ var generateSemicircle = (centerX, centerY, radius) => {
2911
2920
  return Array.from({ length: 25 }, (_, i) => {
2912
2921
  const theta = i / 24 * Math.PI;
2913
2922
  return {
@@ -2916,30 +2925,43 @@ var generate_semicircle = (centerX, centerY, radius) => {
2916
2925
  };
2917
2926
  });
2918
2927
  };
2919
- var to92_def = z21.object({
2920
- fn: z21.string(),
2921
- p: length15.optional().default("1.27mm"),
2922
- id: length15.optional().default("0.72mm"),
2923
- od: length15.optional().default(".95mm"),
2924
- w: length15.optional().default("4.5mm"),
2925
- h: length15.optional().default("4.5mm"),
2926
- inline: z21.boolean().optional().default(false)
2927
- });
2928
+ var to92_2 = (parameters) => {
2929
+ const { p, id, od, h } = parameters;
2930
+ const holeY = Number.parseFloat(h) / 2;
2931
+ const padSpacing = Number.parseFloat(p);
2932
+ return [
2933
+ platedhole(1, -padSpacing, holeY - padSpacing, id, od),
2934
+ platedhole(2, padSpacing, holeY - padSpacing, id, od)
2935
+ ];
2936
+ };
2928
2937
  var to92 = (raw_params) => {
2929
- const parameters = to92_def.parse(raw_params);
2938
+ const match = raw_params.string?.match(/^to92_(\d+)/);
2939
+ const numPins = match ? Number.parseInt(match[1], 10) : 3;
2940
+ const parameters = to92_def.parse({
2941
+ ...raw_params,
2942
+ num_pins: numPins
2943
+ });
2930
2944
  const { p, id, od, w, h, inline } = parameters;
2931
- const radius = w / 2;
2932
- const holeY = h / 2;
2933
- const plated_holes = inline ? [
2934
- platedhole(1, -p, holeY - p, id, od),
2935
- platedhole(2, 0, holeY - p, id, od),
2936
- platedhole(3, p, holeY - p, id, od)
2937
- ] : [
2938
- platedhole(1, 0, holeY, id, od),
2939
- platedhole(2, -p, holeY - p, id, od),
2940
- platedhole(3, p, holeY - p, id, od)
2941
- ];
2942
- const semicircle = generate_semicircle(0, h / 2, radius);
2945
+ const holeY = Number.parseFloat(h) / 2;
2946
+ const padSpacing = Number.parseFloat(p);
2947
+ let platedHoles = [];
2948
+ if (parameters.num_pins === 3) {
2949
+ platedHoles = inline ? [
2950
+ platedhole(1, -padSpacing, holeY - padSpacing, id, od),
2951
+ platedhole(2, 0, holeY - padSpacing, id, od),
2952
+ platedhole(3, padSpacing, holeY - padSpacing, id, od)
2953
+ ] : [
2954
+ platedhole(1, 0, holeY, id, od),
2955
+ platedhole(2, -padSpacing, holeY - padSpacing, id, od),
2956
+ platedhole(3, padSpacing, holeY - padSpacing, id, od)
2957
+ ];
2958
+ } else if (parameters.num_pins === 2) {
2959
+ platedHoles = to92_2(parameters);
2960
+ } else {
2961
+ throw new Error("Invalid number of pins for TO-92");
2962
+ }
2963
+ const radius = Number.parseFloat(w) / 2;
2964
+ const semicircle = generateSemicircle(0, holeY, radius);
2943
2965
  const silkscreenBody = {
2944
2966
  type: "pcb_silkscreen_path",
2945
2967
  layer: "top",
@@ -2953,10 +2975,10 @@ var to92 = (raw_params) => {
2953
2975
  stroke_width: 0.1,
2954
2976
  pcb_silkscreen_path_id: ""
2955
2977
  };
2956
- const silkscreenRefText = silkscreenRef(0, h / 2 + 1, 0.5);
2978
+ const silkscreenRefText = silkscreenRef(0, holeY + 1, 0.5);
2957
2979
  return {
2958
2980
  circuitJson: [
2959
- ...plated_holes,
2981
+ ...platedHoles,
2960
2982
  silkscreenBody,
2961
2983
  silkscreenRefText
2962
2984
  ],
@@ -2966,7 +2988,7 @@ var to92 = (raw_params) => {
2966
2988
 
2967
2989
  // src/fn/sod523.ts
2968
2990
  import { z as z22 } from "zod";
2969
- import { length as length16 } from "circuit-json";
2991
+ import { length as length15 } from "circuit-json";
2970
2992
  var sod_def2 = z22.object({
2971
2993
  fn: z22.string(),
2972
2994
  num_pins: z22.literal(2).default(2),
@@ -2980,7 +3002,7 @@ var sod523 = (raw_params) => {
2980
3002
  const parameters = sod_def2.parse(raw_params);
2981
3003
  const silkscreenRefText = silkscreenRef(
2982
3004
  0,
2983
- length16.parse(parameters.h),
3005
+ length15.parse(parameters.h),
2984
3006
  0.3
2985
3007
  );
2986
3008
  const silkscreenLine = {
@@ -2989,20 +3011,20 @@ var sod523 = (raw_params) => {
2989
3011
  pcb_component_id: "",
2990
3012
  route: [
2991
3013
  {
2992
- x: length16.parse(parameters.p) / 2,
2993
- y: length16.parse(parameters.h) / 2
3014
+ x: length15.parse(parameters.p) / 2,
3015
+ y: length15.parse(parameters.h) / 2
2994
3016
  },
2995
3017
  {
2996
- x: -length16.parse(parameters.w) / 2 - 0.2,
2997
- y: length16.parse(parameters.h) / 2
3018
+ x: -length15.parse(parameters.w) / 2 - 0.2,
3019
+ y: length15.parse(parameters.h) / 2
2998
3020
  },
2999
3021
  {
3000
- x: -length16.parse(parameters.w) / 2 - 0.2,
3001
- y: -length16.parse(parameters.h) / 2
3022
+ x: -length15.parse(parameters.w) / 2 - 0.2,
3023
+ y: -length15.parse(parameters.h) / 2
3002
3024
  },
3003
3025
  {
3004
- x: length16.parse(parameters.p) / 2,
3005
- y: -length16.parse(parameters.h) / 2
3026
+ x: length15.parse(parameters.p) / 2,
3027
+ y: -length15.parse(parameters.h) / 2
3006
3028
  }
3007
3029
  ],
3008
3030
  stroke_width: 0.1,
@@ -3091,7 +3113,7 @@ var sop8 = (raw_params) => {
3091
3113
 
3092
3114
  // src/fn/sod80.ts
3093
3115
  import { z as z23 } from "zod";
3094
- import { length as length17 } from "circuit-json";
3116
+ import { length as length16 } from "circuit-json";
3095
3117
  var sod80_def = z23.object({
3096
3118
  fn: z23.string(),
3097
3119
  num_pins: z23.literal(2).default(2),
@@ -3105,7 +3127,7 @@ var sod80 = (raw_params) => {
3105
3127
  const parameters = sod80_def.parse(raw_params);
3106
3128
  const silkscreenRefText = silkscreenRef(
3107
3129
  0,
3108
- length17.parse(parameters.h) / 2 + 1,
3130
+ length16.parse(parameters.h) / 2 + 1,
3109
3131
  0.3
3110
3132
  );
3111
3133
  const silkscreenLine = {
@@ -3114,20 +3136,20 @@ var sod80 = (raw_params) => {
3114
3136
  pcb_component_id: "",
3115
3137
  route: [
3116
3138
  {
3117
- x: length17.parse(parameters.p) / 2 + 0.5,
3118
- y: length17.parse(parameters.h) / 2 + 0.5
3139
+ x: length16.parse(parameters.p) / 2 + 0.5,
3140
+ y: length16.parse(parameters.h) / 2 + 0.5
3119
3141
  },
3120
3142
  {
3121
- x: -length17.parse(parameters.w) / 2 - 0.5,
3122
- y: length17.parse(parameters.h) / 2 + 0.5
3143
+ x: -length16.parse(parameters.w) / 2 - 0.5,
3144
+ y: length16.parse(parameters.h) / 2 + 0.5
3123
3145
  },
3124
3146
  {
3125
- x: -length17.parse(parameters.w) / 2 - 0.5,
3126
- y: -length17.parse(parameters.h) / 2 - 0.5
3147
+ x: -length16.parse(parameters.w) / 2 - 0.5,
3148
+ y: -length16.parse(parameters.h) / 2 - 0.5
3127
3149
  },
3128
3150
  {
3129
- x: length17.parse(parameters.p) / 2 + 0.5,
3130
- y: -length17.parse(parameters.h) / 2 - 0.5
3151
+ x: length16.parse(parameters.p) / 2 + 0.5,
3152
+ y: -length16.parse(parameters.h) / 2 - 0.5
3131
3153
  }
3132
3154
  ],
3133
3155
  stroke_width: 0.1,
@@ -3167,7 +3189,7 @@ var sod80WithoutParsing = (parameters) => {
3167
3189
 
3168
3190
  // src/fn/sod123w.ts
3169
3191
  import { z as z24 } from "zod";
3170
- import { length as length18 } from "circuit-json";
3192
+ import { length as length17 } from "circuit-json";
3171
3193
  var sod_def3 = z24.object({
3172
3194
  fn: z24.string(),
3173
3195
  num_pins: z24.literal(2).default(2),
@@ -3181,7 +3203,7 @@ var sod123w = (raw_params) => {
3181
3203
  const parameters = sod_def3.parse(raw_params);
3182
3204
  const silkscreenRefText = silkscreenRef(
3183
3205
  0,
3184
- length18.parse(parameters.h) - 0.5,
3206
+ length17.parse(parameters.h) - 0.5,
3185
3207
  0.3
3186
3208
  );
3187
3209
  const silkscreenLine = {
@@ -3190,20 +3212,20 @@ var sod123w = (raw_params) => {
3190
3212
  pcb_component_id: "",
3191
3213
  route: [
3192
3214
  {
3193
- x: length18.parse(parameters.p) / 2,
3194
- y: length18.parse(parameters.h) / 2
3215
+ x: length17.parse(parameters.p) / 2,
3216
+ y: length17.parse(parameters.h) / 2
3195
3217
  },
3196
3218
  {
3197
- x: -length18.parse(parameters.w) / 2 - 0.2,
3198
- y: length18.parse(parameters.h) / 2
3219
+ x: -length17.parse(parameters.w) / 2 - 0.2,
3220
+ y: length17.parse(parameters.h) / 2
3199
3221
  },
3200
3222
  {
3201
- x: -length18.parse(parameters.w) / 2 - 0.2,
3202
- y: -length18.parse(parameters.h) / 2
3223
+ x: -length17.parse(parameters.w) / 2 - 0.2,
3224
+ y: -length17.parse(parameters.h) / 2
3203
3225
  },
3204
3226
  {
3205
- x: length18.parse(parameters.p) / 2,
3206
- y: -length18.parse(parameters.h) / 2
3227
+ x: length17.parse(parameters.p) / 2,
3228
+ y: -length17.parse(parameters.h) / 2
3207
3229
  }
3208
3230
  ],
3209
3231
  stroke_width: 0.1,
@@ -3246,7 +3268,7 @@ var sodWithoutParsing3 = (parameters) => {
3246
3268
 
3247
3269
  // src/fn/sod323.ts
3248
3270
  import { z as z25 } from "zod";
3249
- import { length as length19 } from "circuit-json";
3271
+ import { length as length18 } from "circuit-json";
3250
3272
  var sod_def4 = z25.object({
3251
3273
  fn: z25.string(),
3252
3274
  num_pins: z25.literal(2).default(2),
@@ -3260,7 +3282,7 @@ var sod323 = (raw_params) => {
3260
3282
  const parameters = sod_def4.parse(raw_params);
3261
3283
  const silkscreenRefText = silkscreenRef(
3262
3284
  0,
3263
- length19.parse(parameters.h) - 0.5,
3285
+ length18.parse(parameters.h) - 0.5,
3264
3286
  0.3
3265
3287
  );
3266
3288
  const silkscreenLine = {
@@ -3269,20 +3291,20 @@ var sod323 = (raw_params) => {
3269
3291
  pcb_component_id: "",
3270
3292
  route: [
3271
3293
  {
3272
- x: length19.parse(parameters.p) / 2,
3273
- y: length19.parse(parameters.h) / 2
3294
+ x: length18.parse(parameters.p) / 2,
3295
+ y: length18.parse(parameters.h) / 2
3274
3296
  },
3275
3297
  {
3276
- x: -length19.parse(parameters.w) / 2,
3277
- y: length19.parse(parameters.h) / 2
3298
+ x: -length18.parse(parameters.w) / 2,
3299
+ y: length18.parse(parameters.h) / 2
3278
3300
  },
3279
3301
  {
3280
- x: -length19.parse(parameters.w) / 2,
3281
- y: -length19.parse(parameters.h) / 2
3302
+ x: -length18.parse(parameters.w) / 2,
3303
+ y: -length18.parse(parameters.h) / 2
3282
3304
  },
3283
3305
  {
3284
- x: length19.parse(parameters.p) / 2,
3285
- y: -length19.parse(parameters.h) / 2
3306
+ x: length18.parse(parameters.p) / 2,
3307
+ y: -length18.parse(parameters.h) / 2
3286
3308
  }
3287
3309
  ],
3288
3310
  stroke_width: 0.1,
@@ -3325,7 +3347,7 @@ var sodWithoutParsing4 = (parameters) => {
3325
3347
 
3326
3348
  // src/fn/sod923.ts
3327
3349
  import { z as z26 } from "zod";
3328
- import { length as length20 } from "circuit-json";
3350
+ import { length as length19 } from "circuit-json";
3329
3351
  var sod_def5 = z26.object({
3330
3352
  fn: z26.string(),
3331
3353
  num_pins: z26.literal(2).default(2),
@@ -3339,7 +3361,7 @@ var sod923 = (raw_params) => {
3339
3361
  const parameters = sod_def5.parse(raw_params);
3340
3362
  const silkscreenRefText = silkscreenRef(
3341
3363
  0,
3342
- length20.parse(parameters.h),
3364
+ length19.parse(parameters.h),
3343
3365
  0.3
3344
3366
  );
3345
3367
  const silkscreenLine = {
@@ -3348,20 +3370,20 @@ var sod923 = (raw_params) => {
3348
3370
  pcb_component_id: "",
3349
3371
  route: [
3350
3372
  {
3351
- x: length20.parse(parameters.p) / 2 + 0.15,
3352
- y: length20.parse(parameters.h) / 2
3373
+ x: length19.parse(parameters.p) / 2 + 0.15,
3374
+ y: length19.parse(parameters.h) / 2
3353
3375
  },
3354
3376
  {
3355
- x: -length20.parse(parameters.w) / 2 - 0.4,
3356
- y: length20.parse(parameters.h) / 2
3377
+ x: -length19.parse(parameters.w) / 2 - 0.4,
3378
+ y: length19.parse(parameters.h) / 2
3357
3379
  },
3358
3380
  {
3359
- x: -length20.parse(parameters.w) / 2 - 0.4,
3360
- y: -length20.parse(parameters.h) / 2
3381
+ x: -length19.parse(parameters.w) / 2 - 0.4,
3382
+ y: -length19.parse(parameters.h) / 2
3361
3383
  },
3362
3384
  {
3363
- x: length20.parse(parameters.p) / 2 + 0.15,
3364
- y: -length20.parse(parameters.h) / 2
3385
+ x: length19.parse(parameters.p) / 2 + 0.15,
3386
+ y: -length19.parse(parameters.h) / 2
3365
3387
  }
3366
3388
  ],
3367
3389
  stroke_width: 0.1,
@@ -3405,7 +3427,7 @@ var sodWithoutParsing5 = (parameters) => {
3405
3427
 
3406
3428
  // src/fn/sod882.ts
3407
3429
  import { z as z27 } from "zod";
3408
- import { length as length21 } from "circuit-json";
3430
+ import { length as length20 } from "circuit-json";
3409
3431
  var sod_def6 = z27.object({
3410
3432
  fn: z27.string(),
3411
3433
  num_pins: z27.literal(2).default(2),
@@ -3419,7 +3441,7 @@ var sod882 = (raw_params) => {
3419
3441
  const parameters = sod_def6.parse(raw_params);
3420
3442
  const silkscreenRefText = silkscreenRef(
3421
3443
  0,
3422
- length21.parse(parameters.h) + 0.1,
3444
+ length20.parse(parameters.h) + 0.1,
3423
3445
  0.3
3424
3446
  );
3425
3447
  const silkscreenLine = {
@@ -3428,20 +3450,20 @@ var sod882 = (raw_params) => {
3428
3450
  pcb_component_id: "",
3429
3451
  route: [
3430
3452
  {
3431
- x: length21.parse(parameters.p) / 2 + 0.2,
3432
- y: length21.parse(parameters.h) / 2 + 0.2
3453
+ x: length20.parse(parameters.p) / 2 + 0.2,
3454
+ y: length20.parse(parameters.h) / 2 + 0.2
3433
3455
  },
3434
3456
  {
3435
- x: -length21.parse(parameters.w) / 2 - 0.2,
3436
- y: length21.parse(parameters.h) / 2 + 0.2
3457
+ x: -length20.parse(parameters.w) / 2 - 0.2,
3458
+ y: length20.parse(parameters.h) / 2 + 0.2
3437
3459
  },
3438
3460
  {
3439
- x: -length21.parse(parameters.w) / 2 - 0.2,
3440
- y: -length21.parse(parameters.h) / 2 - 0.2
3461
+ x: -length20.parse(parameters.w) / 2 - 0.2,
3462
+ y: -length20.parse(parameters.h) / 2 - 0.2
3441
3463
  },
3442
3464
  {
3443
- x: length21.parse(parameters.p) / 2 + 0.2,
3444
- y: -length21.parse(parameters.h) / 2 - 0.2
3465
+ x: length20.parse(parameters.p) / 2 + 0.2,
3466
+ y: -length20.parse(parameters.h) / 2 - 0.2
3445
3467
  }
3446
3468
  ],
3447
3469
  stroke_width: 0.1,
@@ -3485,7 +3507,7 @@ var sodWithoutParsing6 = (parameters) => {
3485
3507
 
3486
3508
  // src/fn/sod323f.ts
3487
3509
  import { z as z28 } from "zod";
3488
- import { length as length22 } from "circuit-json";
3510
+ import { length as length21 } from "circuit-json";
3489
3511
  var sod_def7 = z28.object({
3490
3512
  fn: z28.string(),
3491
3513
  num_pins: z28.literal(2).default(2),
@@ -3499,7 +3521,7 @@ var sod323f = (raw_params) => {
3499
3521
  const parameters = sod_def7.parse(raw_params);
3500
3522
  const silkscreenRefText = silkscreenRef(
3501
3523
  0,
3502
- length22.parse(parameters.h),
3524
+ length21.parse(parameters.h),
3503
3525
  0.3
3504
3526
  );
3505
3527
  const silkscreenLine = {
@@ -3508,20 +3530,20 @@ var sod323f = (raw_params) => {
3508
3530
  pcb_component_id: "",
3509
3531
  route: [
3510
3532
  {
3511
- x: length22.parse(parameters.pad_spacing) / 2,
3512
- y: length22.parse(parameters.h) / 2
3533
+ x: length21.parse(parameters.pad_spacing) / 2,
3534
+ y: length21.parse(parameters.h) / 2
3513
3535
  },
3514
3536
  {
3515
- x: -length22.parse(parameters.w) / 2 - 0.2,
3516
- y: length22.parse(parameters.h) / 2
3537
+ x: -length21.parse(parameters.w) / 2 - 0.2,
3538
+ y: length21.parse(parameters.h) / 2
3517
3539
  },
3518
3540
  {
3519
- x: -length22.parse(parameters.w) / 2 - 0.2,
3520
- y: -length22.parse(parameters.h) / 2
3541
+ x: -length21.parse(parameters.w) / 2 - 0.2,
3542
+ y: -length21.parse(parameters.h) / 2
3521
3543
  },
3522
3544
  {
3523
- x: length22.parse(parameters.pad_spacing) / 2,
3524
- y: -length22.parse(parameters.h) / 2
3545
+ x: length21.parse(parameters.pad_spacing) / 2,
3546
+ y: -length21.parse(parameters.h) / 2
3525
3547
  }
3526
3548
  ],
3527
3549
  stroke_width: 0.1,
@@ -3565,7 +3587,7 @@ var sodWithoutParsing7 = (parameters) => {
3565
3587
 
3566
3588
  // src/fn/sod123f.ts
3567
3589
  import { z as z29 } from "zod";
3568
- import { length as length23 } from "circuit-json";
3590
+ import { length as length22 } from "circuit-json";
3569
3591
  var sod_def8 = z29.object({
3570
3592
  fn: z29.string(),
3571
3593
  num_pins: z29.literal(2).default(2),
@@ -3579,7 +3601,7 @@ var sod123f = (raw_params) => {
3579
3601
  const parameters = sod_def8.parse(raw_params);
3580
3602
  const silkscreenRefText = silkscreenRef(
3581
3603
  0,
3582
- length23.parse(parameters.h),
3604
+ length22.parse(parameters.h),
3583
3605
  0.3
3584
3606
  );
3585
3607
  const silkscreenLine = {
@@ -3588,20 +3610,20 @@ var sod123f = (raw_params) => {
3588
3610
  pcb_component_id: "",
3589
3611
  route: [
3590
3612
  {
3591
- x: length23.parse(parameters.p) / 2,
3592
- y: length23.parse(parameters.h) / 2
3613
+ x: length22.parse(parameters.p) / 2,
3614
+ y: length22.parse(parameters.h) / 2
3593
3615
  },
3594
3616
  {
3595
- x: -length23.parse(parameters.w) / 2 - 0.2,
3596
- y: length23.parse(parameters.h) / 2
3617
+ x: -length22.parse(parameters.w) / 2 - 0.2,
3618
+ y: length22.parse(parameters.h) / 2
3597
3619
  },
3598
3620
  {
3599
- x: -length23.parse(parameters.w) / 2 - 0.2,
3600
- y: -length23.parse(parameters.h) / 2
3621
+ x: -length22.parse(parameters.w) / 2 - 0.2,
3622
+ y: -length22.parse(parameters.h) / 2
3601
3623
  },
3602
3624
  {
3603
- x: length23.parse(parameters.p) / 2,
3604
- y: -length23.parse(parameters.h) / 2
3625
+ x: length22.parse(parameters.p) / 2,
3626
+ y: -length22.parse(parameters.h) / 2
3605
3627
  }
3606
3628
  ],
3607
3629
  stroke_width: 0.1,
@@ -3645,7 +3667,7 @@ var sodWithoutParsing8 = (parameters) => {
3645
3667
 
3646
3668
  // src/fn/sod123fl.ts
3647
3669
  import { z as z30 } from "zod";
3648
- import { length as length24 } from "circuit-json";
3670
+ import { length as length23 } from "circuit-json";
3649
3671
  var sod123FL_def = z30.object({
3650
3672
  fn: z30.string(),
3651
3673
  num_pins: z30.literal(2).default(2),
@@ -3659,7 +3681,7 @@ var sod123fl = (raw_params) => {
3659
3681
  const parameters = sod123FL_def.parse(raw_params);
3660
3682
  const silkscreenRefText = silkscreenRef(
3661
3683
  0,
3662
- length24.parse(parameters.h),
3684
+ length23.parse(parameters.h),
3663
3685
  0.3
3664
3686
  );
3665
3687
  const silkscreenLine = {
@@ -3668,20 +3690,20 @@ var sod123fl = (raw_params) => {
3668
3690
  pcb_component_id: "",
3669
3691
  route: [
3670
3692
  {
3671
- x: length24.parse(parameters.p) / 2,
3672
- y: length24.parse(parameters.h) / 2
3693
+ x: length23.parse(parameters.p) / 2,
3694
+ y: length23.parse(parameters.h) / 2
3673
3695
  },
3674
3696
  {
3675
- x: -length24.parse(parameters.w) / 2 - 0.2,
3676
- y: length24.parse(parameters.h) / 2
3697
+ x: -length23.parse(parameters.w) / 2 - 0.2,
3698
+ y: length23.parse(parameters.h) / 2
3677
3699
  },
3678
3700
  {
3679
- x: -length24.parse(parameters.w) / 2 - 0.2,
3680
- y: -length24.parse(parameters.h) / 2
3701
+ x: -length23.parse(parameters.w) / 2 - 0.2,
3702
+ y: -length23.parse(parameters.h) / 2
3681
3703
  },
3682
3704
  {
3683
- x: length24.parse(parameters.p) / 2,
3684
- y: -length24.parse(parameters.h) / 2
3705
+ x: length23.parse(parameters.p) / 2,
3706
+ y: -length23.parse(parameters.h) / 2
3685
3707
  }
3686
3708
  ],
3687
3709
  stroke_width: 0.1,
@@ -3725,7 +3747,7 @@ var sodWithoutParsing9 = (parameters) => {
3725
3747
 
3726
3748
  // src/fn/sod723.ts
3727
3749
  import { z as z31 } from "zod";
3728
- import { length as length25 } from "circuit-json";
3750
+ import { length as length24 } from "circuit-json";
3729
3751
  var sod_def9 = z31.object({
3730
3752
  fn: z31.string(),
3731
3753
  num_pins: z31.literal(2).default(2),
@@ -3739,7 +3761,7 @@ var sod723 = (raw_params) => {
3739
3761
  const parameters = sod_def9.parse(raw_params);
3740
3762
  const silkscreenRefText = silkscreenRef(
3741
3763
  0,
3742
- length25.parse(parameters.h),
3764
+ length24.parse(parameters.h),
3743
3765
  0.3
3744
3766
  );
3745
3767
  const silkscreenLine = {
@@ -3748,20 +3770,20 @@ var sod723 = (raw_params) => {
3748
3770
  pcb_component_id: "",
3749
3771
  route: [
3750
3772
  {
3751
- x: length25.parse(parameters.p) / 2,
3752
- y: length25.parse(parameters.h) / 2
3773
+ x: length24.parse(parameters.p) / 2,
3774
+ y: length24.parse(parameters.h) / 2
3753
3775
  },
3754
3776
  {
3755
- x: -length25.parse(parameters.w) / 2 - 0.1,
3756
- y: length25.parse(parameters.h) / 2
3777
+ x: -length24.parse(parameters.w) / 2 - 0.1,
3778
+ y: length24.parse(parameters.h) / 2
3757
3779
  },
3758
3780
  {
3759
- x: -length25.parse(parameters.w) / 2 - 0.1,
3760
- y: -length25.parse(parameters.h) / 2
3781
+ x: -length24.parse(parameters.w) / 2 - 0.1,
3782
+ y: -length24.parse(parameters.h) / 2
3761
3783
  },
3762
3784
  {
3763
- x: length25.parse(parameters.p) / 2,
3764
- y: -length25.parse(parameters.h) / 2
3785
+ x: length24.parse(parameters.p) / 2,
3786
+ y: -length24.parse(parameters.h) / 2
3765
3787
  }
3766
3788
  ],
3767
3789
  stroke_width: 0.1,
@@ -3805,7 +3827,7 @@ var sodWithoutParsing10 = (parameters) => {
3805
3827
 
3806
3828
  // src/fn/sod128.ts
3807
3829
  import { z as z32 } from "zod";
3808
- import { length as length26 } from "circuit-json";
3830
+ import { length as length25 } from "circuit-json";
3809
3831
  var sod_def10 = z32.object({
3810
3832
  fn: z32.string(),
3811
3833
  num_pins: z32.literal(2).default(2),
@@ -3819,7 +3841,7 @@ var sod128 = (raw_params) => {
3819
3841
  const parameters = sod_def10.parse(raw_params);
3820
3842
  const silkscreenRefText = silkscreenRef(
3821
3843
  0,
3822
- length26.parse(parameters.h) / 2 + 0.4,
3844
+ length25.parse(parameters.h) / 2 + 0.4,
3823
3845
  0.3
3824
3846
  );
3825
3847
  const silkscreenLine = {
@@ -3828,20 +3850,20 @@ var sod128 = (raw_params) => {
3828
3850
  pcb_component_id: "",
3829
3851
  route: [
3830
3852
  {
3831
- x: length26.parse(parameters.p) / 2,
3832
- y: length26.parse(parameters.h) / 2
3853
+ x: length25.parse(parameters.p) / 2,
3854
+ y: length25.parse(parameters.h) / 2
3833
3855
  },
3834
3856
  {
3835
- x: -length26.parse(parameters.w) / 2 - 0.2,
3836
- y: length26.parse(parameters.h) / 2
3857
+ x: -length25.parse(parameters.w) / 2 - 0.2,
3858
+ y: length25.parse(parameters.h) / 2
3837
3859
  },
3838
3860
  {
3839
- x: -length26.parse(parameters.w) / 2 - 0.2,
3840
- y: -length26.parse(parameters.h) / 2
3861
+ x: -length25.parse(parameters.w) / 2 - 0.2,
3862
+ y: -length25.parse(parameters.h) / 2
3841
3863
  },
3842
3864
  {
3843
- x: length26.parse(parameters.p) / 2,
3844
- y: -length26.parse(parameters.h) / 2
3865
+ x: length25.parse(parameters.p) / 2,
3866
+ y: -length25.parse(parameters.h) / 2
3845
3867
  }
3846
3868
  ],
3847
3869
  stroke_width: 0.1,
@@ -3899,12 +3921,12 @@ var sot89_3 = (parameters) => {
3899
3921
  const pads = [];
3900
3922
  const padGap = Number.parseFloat(parameters.p);
3901
3923
  const padWidth = Number.parseFloat(parameters.pw);
3902
- const length45 = Number.parseFloat(parameters.w);
3924
+ const length44 = Number.parseFloat(parameters.w);
3903
3925
  const padHeight = Number.parseFloat(parameters.pl);
3904
3926
  pads.push(
3905
- rectpad(1, -length45 / 2, padGap, padHeight, padWidth),
3906
- rectpad(2, -length45 / 2 + (1.5 - 1.3) / 2, 0, 1.5, padWidth),
3907
- rectpad(3, -length45 / 2, -padGap, padHeight, padWidth)
3927
+ rectpad(1, -length44 / 2, padGap, padHeight, padWidth),
3928
+ rectpad(2, -length44 / 2 + (1.5 - 1.3) / 2, 0, 1.5, padWidth),
3929
+ rectpad(3, -length44 / 2, -padGap, padHeight, padWidth)
3908
3930
  );
3909
3931
  const silkscreenRefText = silkscreenRef(0, 0, 0.3);
3910
3932
  const width = Number.parseFloat(parameters.w) / 2 - 1;
@@ -3944,7 +3966,7 @@ var sot89_5 = (parameters) => {
3944
3966
  const pads = [];
3945
3967
  const padGap = Number.parseFloat(parameters.p);
3946
3968
  const padWidth = Number.parseFloat(parameters.pw);
3947
- const length45 = Number.parseFloat(parameters.w);
3969
+ const length44 = Number.parseFloat(parameters.w);
3948
3970
  pads.push(
3949
3971
  rectpad(1, -1.85, -1.5, 1.5, 0.7),
3950
3972
  rectpad(2, -1.85, 1.5, 1.5, 0.7),
@@ -4012,16 +4034,16 @@ var sot89 = (raw_params) => {
4012
4034
 
4013
4035
  // src/fn/to220.ts
4014
4036
  import {
4015
- length as length27
4037
+ length as length26
4016
4038
  } from "circuit-json";
4017
4039
  import { z as z34 } from "zod";
4018
4040
  var to220_def = z34.object({
4019
4041
  fn: z34.string(),
4020
- p: length27.optional().default("5.0mm"),
4021
- id: length27.optional().default("1.0mm"),
4022
- od: length27.optional().default("1.9mm"),
4023
- w: length27.optional().default("13mm"),
4024
- h: length27.optional().default("7mm"),
4042
+ p: length26.optional().default("5.0mm"),
4043
+ id: length26.optional().default("1.0mm"),
4044
+ od: length26.optional().default("1.9mm"),
4045
+ w: length26.optional().default("13mm"),
4046
+ h: length26.optional().default("7mm"),
4025
4047
  num_pins: z34.number().optional(),
4026
4048
  string: z34.string().optional()
4027
4049
  });
@@ -4104,7 +4126,7 @@ var to220 = (raw_params) => {
4104
4126
 
4105
4127
  // src/fn/minimelf.ts
4106
4128
  import { z as z35 } from "zod";
4107
- import { length as length28 } from "circuit-json";
4129
+ import { length as length27 } from "circuit-json";
4108
4130
  var minimelf_def = z35.object({
4109
4131
  fn: z35.string(),
4110
4132
  num_pins: z35.literal(2).default(2),
@@ -4118,7 +4140,7 @@ var minimelf = (raw_params) => {
4118
4140
  const parameters = minimelf_def.parse(raw_params);
4119
4141
  const silkscreenRefText = silkscreenRef(
4120
4142
  0,
4121
- length28.parse(parameters.h) / 2 + 0.4,
4143
+ length27.parse(parameters.h) / 2 + 0.4,
4122
4144
  0.3
4123
4145
  );
4124
4146
  const silkscreenLine = {
@@ -4127,20 +4149,20 @@ var minimelf = (raw_params) => {
4127
4149
  pcb_component_id: "",
4128
4150
  route: [
4129
4151
  {
4130
- x: length28.parse(parameters.p) / 2,
4131
- y: length28.parse(parameters.h) / 2
4152
+ x: length27.parse(parameters.p) / 2,
4153
+ y: length27.parse(parameters.h) / 2
4132
4154
  },
4133
4155
  {
4134
- x: -length28.parse(parameters.w) / 2,
4135
- y: length28.parse(parameters.h) / 2
4156
+ x: -length27.parse(parameters.w) / 2,
4157
+ y: length27.parse(parameters.h) / 2
4136
4158
  },
4137
4159
  {
4138
- x: -length28.parse(parameters.w) / 2,
4139
- y: -length28.parse(parameters.h) / 2
4160
+ x: -length27.parse(parameters.w) / 2,
4161
+ y: -length27.parse(parameters.h) / 2
4140
4162
  },
4141
4163
  {
4142
- x: length28.parse(parameters.p) / 2,
4143
- y: -length28.parse(parameters.h) / 2
4164
+ x: length27.parse(parameters.p) / 2,
4165
+ y: -length27.parse(parameters.h) / 2
4144
4166
  }
4145
4167
  ],
4146
4168
  stroke_width: 0.1,
@@ -4180,7 +4202,7 @@ var miniMelfWithoutParsing = (parameters) => {
4180
4202
 
4181
4203
  // src/fn/sod882d.ts
4182
4204
  import { z as z36 } from "zod";
4183
- import { length as length29 } from "circuit-json";
4205
+ import { length as length28 } from "circuit-json";
4184
4206
  var sod_def11 = z36.object({
4185
4207
  fn: z36.string(),
4186
4208
  num_pins: z36.literal(2).default(2),
@@ -4194,7 +4216,7 @@ var sod882d = (raw_params) => {
4194
4216
  const parameters = sod_def11.parse(raw_params);
4195
4217
  const silkscreenRefText = silkscreenRef(
4196
4218
  0,
4197
- length29.parse(parameters.h) + 0.1,
4219
+ length28.parse(parameters.h) + 0.1,
4198
4220
  0.3
4199
4221
  );
4200
4222
  const silkscreenLine = {
@@ -4203,20 +4225,20 @@ var sod882d = (raw_params) => {
4203
4225
  pcb_component_id: "",
4204
4226
  route: [
4205
4227
  {
4206
- x: length29.parse(parameters.p) / 2 + 0.1,
4207
- y: length29.parse(parameters.h) / 2
4228
+ x: length28.parse(parameters.p) / 2 + 0.1,
4229
+ y: length28.parse(parameters.h) / 2
4208
4230
  },
4209
4231
  {
4210
- x: -length29.parse(parameters.w) / 2,
4211
- y: length29.parse(parameters.h) / 2
4232
+ x: -length28.parse(parameters.w) / 2,
4233
+ y: length28.parse(parameters.h) / 2
4212
4234
  },
4213
4235
  {
4214
- x: -length29.parse(parameters.w) / 2,
4215
- y: -length29.parse(parameters.h) / 2
4236
+ x: -length28.parse(parameters.w) / 2,
4237
+ y: -length28.parse(parameters.h) / 2
4216
4238
  },
4217
4239
  {
4218
- x: length29.parse(parameters.p) / 2 + 0.1,
4219
- y: -length29.parse(parameters.h) / 2
4240
+ x: length28.parse(parameters.p) / 2 + 0.1,
4241
+ y: -length28.parse(parameters.h) / 2
4220
4242
  }
4221
4243
  ],
4222
4244
  stroke_width: 0.1,
@@ -4260,7 +4282,7 @@ var sodWithoutParsing12 = (parameters) => {
4260
4282
 
4261
4283
  // src/fn/melf.ts
4262
4284
  import { z as z37 } from "zod";
4263
- import { length as length30 } from "circuit-json";
4285
+ import { length as length29 } from "circuit-json";
4264
4286
  var melf_def = z37.object({
4265
4287
  fn: z37.string(),
4266
4288
  num_pins: z37.literal(2).default(2),
@@ -4274,7 +4296,7 @@ var melf = (raw_params) => {
4274
4296
  const parameters = melf_def.parse(raw_params);
4275
4297
  const silkscreenRefText = silkscreenRef(
4276
4298
  0,
4277
- length30.parse(parameters.h),
4299
+ length29.parse(parameters.h),
4278
4300
  0.3
4279
4301
  );
4280
4302
  const silkscreenLine = {
@@ -4283,20 +4305,20 @@ var melf = (raw_params) => {
4283
4305
  pcb_component_id: "",
4284
4306
  route: [
4285
4307
  {
4286
- x: length30.parse(parameters.p) / 2,
4287
- y: length30.parse(parameters.h) / 2
4308
+ x: length29.parse(parameters.p) / 2,
4309
+ y: length29.parse(parameters.h) / 2
4288
4310
  },
4289
4311
  {
4290
- x: -length30.parse(parameters.w) / 2,
4291
- y: length30.parse(parameters.h) / 2
4312
+ x: -length29.parse(parameters.w) / 2,
4313
+ y: length29.parse(parameters.h) / 2
4292
4314
  },
4293
4315
  {
4294
- x: -length30.parse(parameters.w) / 2,
4295
- y: -length30.parse(parameters.h) / 2
4316
+ x: -length29.parse(parameters.w) / 2,
4317
+ y: -length29.parse(parameters.h) / 2
4296
4318
  },
4297
4319
  {
4298
- x: length30.parse(parameters.p) / 2,
4299
- y: -length30.parse(parameters.h) / 2
4320
+ x: length29.parse(parameters.p) / 2,
4321
+ y: -length29.parse(parameters.h) / 2
4300
4322
  }
4301
4323
  ],
4302
4324
  stroke_width: 0.1,
@@ -4340,7 +4362,7 @@ var melfWithoutParsing = (parameters) => {
4340
4362
 
4341
4363
  // src/fn/micromelf.ts
4342
4364
  import { z as z38 } from "zod";
4343
- import { length as length31 } from "circuit-json";
4365
+ import { length as length30 } from "circuit-json";
4344
4366
  var micromelf_def = z38.object({
4345
4367
  fn: z38.string(),
4346
4368
  num_pins: z38.literal(2).default(2),
@@ -4354,7 +4376,7 @@ var micromelf = (raw_params) => {
4354
4376
  const parameters = micromelf_def.parse(raw_params);
4355
4377
  const silkscreenRefText = silkscreenRef(
4356
4378
  0,
4357
- length31.parse(parameters.h),
4379
+ length30.parse(parameters.h),
4358
4380
  0.3
4359
4381
  );
4360
4382
  const silkscreenLine = {
@@ -4363,20 +4385,20 @@ var micromelf = (raw_params) => {
4363
4385
  pcb_component_id: "",
4364
4386
  route: [
4365
4387
  {
4366
- x: length31.parse(parameters.p) / 2,
4367
- y: length31.parse(parameters.h) / 2
4388
+ x: length30.parse(parameters.p) / 2,
4389
+ y: length30.parse(parameters.h) / 2
4368
4390
  },
4369
4391
  {
4370
- x: -length31.parse(parameters.w) / 2 - 0.1,
4371
- y: length31.parse(parameters.h) / 2
4392
+ x: -length30.parse(parameters.w) / 2 - 0.1,
4393
+ y: length30.parse(parameters.h) / 2
4372
4394
  },
4373
4395
  {
4374
- x: -length31.parse(parameters.w) / 2 - 0.1,
4375
- y: -length31.parse(parameters.h) / 2
4396
+ x: -length30.parse(parameters.w) / 2 - 0.1,
4397
+ y: -length30.parse(parameters.h) / 2
4376
4398
  },
4377
4399
  {
4378
- x: length31.parse(parameters.p) / 2,
4379
- y: -length31.parse(parameters.h) / 2
4400
+ x: length30.parse(parameters.p) / 2,
4401
+ y: -length30.parse(parameters.h) / 2
4380
4402
  }
4381
4403
  ],
4382
4404
  stroke_width: 0.1,
@@ -4420,7 +4442,7 @@ var microMelfWithoutParsing = (parameters) => {
4420
4442
 
4421
4443
  // src/fn/sma.ts
4422
4444
  import { z as z39 } from "zod";
4423
- import { length as length32 } from "circuit-json";
4445
+ import { length as length31 } from "circuit-json";
4424
4446
  var sma_def = z39.object({
4425
4447
  fn: z39.string(),
4426
4448
  num_pins: z39.literal(2).default(2),
@@ -4434,7 +4456,7 @@ var sma = (raw_params) => {
4434
4456
  const parameters = sma_def.parse(raw_params);
4435
4457
  const silkscreenRefText = silkscreenRef(
4436
4458
  0,
4437
- length32.parse(parameters.h) / 2 + 0.5,
4459
+ length31.parse(parameters.h) / 2 + 0.5,
4438
4460
  0.3
4439
4461
  );
4440
4462
  const silkscreenLine = {
@@ -4443,20 +4465,20 @@ var sma = (raw_params) => {
4443
4465
  pcb_component_id: "",
4444
4466
  route: [
4445
4467
  {
4446
- x: length32.parse(parameters.p) / 2,
4447
- y: length32.parse(parameters.h) / 2
4468
+ x: length31.parse(parameters.p) / 2,
4469
+ y: length31.parse(parameters.h) / 2
4448
4470
  },
4449
4471
  {
4450
- x: -length32.parse(parameters.w) / 2 - 0.5,
4451
- y: length32.parse(parameters.h) / 2
4472
+ x: -length31.parse(parameters.w) / 2 - 0.5,
4473
+ y: length31.parse(parameters.h) / 2
4452
4474
  },
4453
4475
  {
4454
- x: -length32.parse(parameters.w) / 2 - 0.5,
4455
- y: -length32.parse(parameters.h) / 2
4476
+ x: -length31.parse(parameters.w) / 2 - 0.5,
4477
+ y: -length31.parse(parameters.h) / 2
4456
4478
  },
4457
4479
  {
4458
- x: length32.parse(parameters.p) / 2,
4459
- y: -length32.parse(parameters.h) / 2
4480
+ x: length31.parse(parameters.p) / 2,
4481
+ y: -length31.parse(parameters.h) / 2
4460
4482
  }
4461
4483
  ],
4462
4484
  stroke_width: 0.1,
@@ -4499,7 +4521,7 @@ var smaWithoutParsing = (parameters) => {
4499
4521
 
4500
4522
  // src/fn/smf.ts
4501
4523
  import { z as z40 } from "zod";
4502
- import { length as length33 } from "circuit-json";
4524
+ import { length as length32 } from "circuit-json";
4503
4525
  var smf_def = z40.object({
4504
4526
  fn: z40.string(),
4505
4527
  num_pins: z40.literal(2).default(2),
@@ -4513,7 +4535,7 @@ var smf = (raw_params) => {
4513
4535
  const parameters = smf_def.parse(raw_params);
4514
4536
  const silkscreenRefText = silkscreenRef(
4515
4537
  0,
4516
- length33.parse(parameters.h) - 0.5,
4538
+ length32.parse(parameters.h) - 0.5,
4517
4539
  0.3
4518
4540
  );
4519
4541
  const silkscreenLine = {
@@ -4522,20 +4544,20 @@ var smf = (raw_params) => {
4522
4544
  pcb_component_id: "",
4523
4545
  route: [
4524
4546
  {
4525
- x: length33.parse(parameters.p) / 2,
4526
- y: length33.parse(parameters.h) / 2
4547
+ x: length32.parse(parameters.p) / 2,
4548
+ y: length32.parse(parameters.h) / 2
4527
4549
  },
4528
4550
  {
4529
- x: -length33.parse(parameters.w) / 2,
4530
- y: length33.parse(parameters.h) / 2
4551
+ x: -length32.parse(parameters.w) / 2,
4552
+ y: length32.parse(parameters.h) / 2
4531
4553
  },
4532
4554
  {
4533
- x: -length33.parse(parameters.w) / 2,
4534
- y: -length33.parse(parameters.h) / 2
4555
+ x: -length32.parse(parameters.w) / 2,
4556
+ y: -length32.parse(parameters.h) / 2
4535
4557
  },
4536
4558
  {
4537
- x: length33.parse(parameters.p) / 2,
4538
- y: -length33.parse(parameters.h) / 2
4559
+ x: length32.parse(parameters.p) / 2,
4560
+ y: -length32.parse(parameters.h) / 2
4539
4561
  }
4540
4562
  ],
4541
4563
  stroke_width: 0.1,
@@ -4579,7 +4601,7 @@ var smfWithoutParsing = (parameters) => {
4579
4601
 
4580
4602
  // src/fn/smb.ts
4581
4603
  import { z as z41 } from "zod";
4582
- import { length as length34 } from "circuit-json";
4604
+ import { length as length33 } from "circuit-json";
4583
4605
  var smb_def = z41.object({
4584
4606
  fn: z41.string(),
4585
4607
  num_pins: z41.literal(2).default(2),
@@ -4593,7 +4615,7 @@ var smb = (raw_params) => {
4593
4615
  const parameters = smb_def.parse(raw_params);
4594
4616
  const silkscreenRefText = silkscreenRef(
4595
4617
  0,
4596
- length34.parse(parameters.h) / 2 + 0.5,
4618
+ length33.parse(parameters.h) / 2 + 0.5,
4597
4619
  0.3
4598
4620
  );
4599
4621
  const silkscreenLine = {
@@ -4602,20 +4624,20 @@ var smb = (raw_params) => {
4602
4624
  pcb_component_id: "",
4603
4625
  route: [
4604
4626
  {
4605
- x: length34.parse(parameters.p) / 2,
4606
- y: length34.parse(parameters.h) / 2
4627
+ x: length33.parse(parameters.p) / 2,
4628
+ y: length33.parse(parameters.h) / 2
4607
4629
  },
4608
4630
  {
4609
- x: -length34.parse(parameters.w) / 2 - 0.1,
4610
- y: length34.parse(parameters.h) / 2
4631
+ x: -length33.parse(parameters.w) / 2 - 0.1,
4632
+ y: length33.parse(parameters.h) / 2
4611
4633
  },
4612
4634
  {
4613
- x: -length34.parse(parameters.w) / 2 - 0.1,
4614
- y: -length34.parse(parameters.h) / 2
4635
+ x: -length33.parse(parameters.w) / 2 - 0.1,
4636
+ y: -length33.parse(parameters.h) / 2
4615
4637
  },
4616
4638
  {
4617
- x: length34.parse(parameters.p) / 2,
4618
- y: -length34.parse(parameters.h) / 2
4639
+ x: length33.parse(parameters.p) / 2,
4640
+ y: -length33.parse(parameters.h) / 2
4619
4641
  }
4620
4642
  ],
4621
4643
  stroke_width: 0.1,
@@ -4659,7 +4681,7 @@ var smbWithoutParsing = (parameters) => {
4659
4681
 
4660
4682
  // src/fn/smc.ts
4661
4683
  import { z as z42 } from "zod";
4662
- import { length as length35 } from "circuit-json";
4684
+ import { length as length34 } from "circuit-json";
4663
4685
  var smc_def = z42.object({
4664
4686
  fn: z42.string(),
4665
4687
  num_pins: z42.literal(2).default(2),
@@ -4678,20 +4700,20 @@ var smc = (raw_params) => {
4678
4700
  pcb_component_id: "",
4679
4701
  route: [
4680
4702
  {
4681
- x: length35.parse(parameters.p) / 2,
4682
- y: length35.parse(parameters.h) / 2 - 0.8
4703
+ x: length34.parse(parameters.p) / 2,
4704
+ y: length34.parse(parameters.h) / 2 - 0.8
4683
4705
  },
4684
4706
  {
4685
- x: -length35.parse(parameters.w) / 2 - 0.8,
4686
- y: length35.parse(parameters.h) / 2 - 0.8
4707
+ x: -length34.parse(parameters.w) / 2 - 0.8,
4708
+ y: length34.parse(parameters.h) / 2 - 0.8
4687
4709
  },
4688
4710
  {
4689
- x: -length35.parse(parameters.w) / 2 - 0.8,
4690
- y: -length35.parse(parameters.h) / 2 + 0.8
4711
+ x: -length34.parse(parameters.w) / 2 - 0.8,
4712
+ y: -length34.parse(parameters.h) / 2 + 0.8
4691
4713
  },
4692
4714
  {
4693
- x: length35.parse(parameters.p) / 2,
4694
- y: -length35.parse(parameters.h) / 2 + 0.8
4715
+ x: length34.parse(parameters.p) / 2,
4716
+ y: -length34.parse(parameters.h) / 2 + 0.8
4695
4717
  }
4696
4718
  ],
4697
4719
  stroke_width: 0.1,
@@ -5161,17 +5183,17 @@ var to92s = (raw_params) => {
5161
5183
 
5162
5184
  // src/fn/jst.ts
5163
5185
  import {
5164
- length as length36
5186
+ length as length35
5165
5187
  } from "circuit-json";
5166
5188
  import { z as z46 } from "zod";
5167
5189
  var jst_def = z46.object({
5168
5190
  fn: z46.string(),
5169
- p: length36.optional().default("2.2mm"),
5170
- id: length36.optional().default("0.70mm"),
5171
- pw: length36.optional().default("1.20mm"),
5172
- pl: length36.optional().default("1.20mm"),
5173
- w: length36.optional().default("6mm"),
5174
- h: length36.optional().default("5mm")
5191
+ p: length35.optional().default("2.2mm"),
5192
+ id: length35.optional().default("0.70mm"),
5193
+ pw: length35.optional().default("1.20mm"),
5194
+ pl: length35.optional().default("1.20mm"),
5195
+ w: length35.optional().default("6mm"),
5196
+ h: length35.optional().default("5mm")
5175
5197
  });
5176
5198
  var jst = (raw_params) => {
5177
5199
  const parameters = jst_def.parse(raw_params);
@@ -5208,7 +5230,7 @@ var jst = (raw_params) => {
5208
5230
 
5209
5231
  // src/fn/sod110.ts
5210
5232
  import { z as z47 } from "zod";
5211
- import { length as length37 } from "circuit-json";
5233
+ import { length as length36 } from "circuit-json";
5212
5234
  var sod_def12 = z47.object({
5213
5235
  fn: z47.string(),
5214
5236
  num_pins: z47.literal(2).default(2),
@@ -5222,7 +5244,7 @@ var sod110 = (raw_params) => {
5222
5244
  const parameters = sod_def12.parse(raw_params);
5223
5245
  const silkscreenRefText = silkscreenRef(
5224
5246
  0,
5225
- length37.parse(parameters.h) / 2 + 0.5,
5247
+ length36.parse(parameters.h) / 2 + 0.5,
5226
5248
  0.3
5227
5249
  );
5228
5250
  const silkscreenLine = {
@@ -5231,20 +5253,20 @@ var sod110 = (raw_params) => {
5231
5253
  pcb_component_id: "",
5232
5254
  route: [
5233
5255
  {
5234
- x: length37.parse(parameters.p) / 2,
5235
- y: length37.parse(parameters.h) / 2
5256
+ x: length36.parse(parameters.p) / 2,
5257
+ y: length36.parse(parameters.h) / 2
5236
5258
  },
5237
5259
  {
5238
- x: -length37.parse(parameters.w) / 2,
5239
- y: length37.parse(parameters.h) / 2
5260
+ x: -length36.parse(parameters.w) / 2,
5261
+ y: length36.parse(parameters.h) / 2
5240
5262
  },
5241
5263
  {
5242
- x: -length37.parse(parameters.w) / 2,
5243
- y: -length37.parse(parameters.h) / 2
5264
+ x: -length36.parse(parameters.w) / 2,
5265
+ y: -length36.parse(parameters.h) / 2
5244
5266
  },
5245
5267
  {
5246
- x: length37.parse(parameters.p) / 2,
5247
- y: -length37.parse(parameters.h) / 2
5268
+ x: length36.parse(parameters.p) / 2,
5269
+ y: -length36.parse(parameters.h) / 2
5248
5270
  }
5249
5271
  ],
5250
5272
  stroke_width: 0.1,
@@ -5287,7 +5309,7 @@ var sodWithoutParsing13 = (parameters) => {
5287
5309
 
5288
5310
  // src/fn/vssop.ts
5289
5311
  import { z as z48 } from "zod";
5290
- import { length as length38 } from "circuit-json";
5312
+ import { length as length37 } from "circuit-json";
5291
5313
  var getDefaultValues = (num_pins) => {
5292
5314
  switch (num_pins) {
5293
5315
  case 8:
@@ -5329,11 +5351,11 @@ var vssop_def = z48.object({
5329
5351
  var vssop = (raw_params) => {
5330
5352
  const parameters = vssop_def.parse(raw_params);
5331
5353
  const defaults = getDefaultValues(parameters.num_pins);
5332
- const w = length38.parse(parameters.w || defaults.w);
5333
- const h = length38.parse(parameters.h || defaults.h);
5334
- const p = length38.parse(parameters.p || defaults.p);
5335
- const pl = length38.parse(parameters.pl || defaults.pl);
5336
- const pw = length38.parse(parameters.pw || defaults.pw);
5354
+ const w = length37.parse(parameters.w || defaults.w);
5355
+ const h = length37.parse(parameters.h || defaults.h);
5356
+ const p = length37.parse(parameters.p || defaults.p);
5357
+ const pl = length37.parse(parameters.pl || defaults.pl);
5358
+ const pw = length37.parse(parameters.pw || defaults.pw);
5337
5359
  const pads = [];
5338
5360
  for (let i = 0; i < parameters.num_pins; i++) {
5339
5361
  const { x, y } = getVssopPadCoord(parameters.num_pins, i + 1, w, p);
@@ -5408,14 +5430,14 @@ var getVssopPadCoord = (pinCount, pn, w, p) => {
5408
5430
  const col = pn <= half ? -1 : 1;
5409
5431
  const row = (half - 1) / 2 - rowIndex;
5410
5432
  return {
5411
- x: col * length38.parse(pinCount === 8 ? "1.8mm" : "2.2mm"),
5433
+ x: col * length37.parse(pinCount === 8 ? "1.8mm" : "2.2mm"),
5412
5434
  y: row * p
5413
5435
  };
5414
5436
  };
5415
5437
 
5416
5438
  // src/fn/msop.ts
5417
5439
  import { z as z49 } from "zod";
5418
- import { length as length39 } from "circuit-json";
5440
+ import { length as length38 } from "circuit-json";
5419
5441
  var getDefaultValues2 = (num_pins) => {
5420
5442
  switch (num_pins) {
5421
5443
  case 10:
@@ -5468,18 +5490,18 @@ var getMsopCoords = (pinCount, pn, w, p) => {
5468
5490
  const col = pn <= half ? -1 : 1;
5469
5491
  const row = (half - 1) / 2 - rowIndex;
5470
5492
  return {
5471
- x: col * length39.parse("2mm"),
5493
+ x: col * length38.parse("2mm"),
5472
5494
  y: row * p
5473
5495
  };
5474
5496
  };
5475
5497
  var msop = (raw_params) => {
5476
5498
  const parameters = msop_def.parse(raw_params);
5477
5499
  const defaults = getDefaultValues2(parameters.num_pins);
5478
- const w = length39.parse(parameters.w || defaults.w);
5479
- const h = length39.parse(parameters.h || defaults.h);
5480
- const p = length39.parse(parameters.p || defaults.p);
5481
- const pl = length39.parse(parameters.pl || defaults.pl);
5482
- const pw = length39.parse(parameters.pw || defaults.pw);
5500
+ const w = length38.parse(parameters.w || defaults.w);
5501
+ const h = length38.parse(parameters.h || defaults.h);
5502
+ const p = length38.parse(parameters.p || defaults.p);
5503
+ const pl = length38.parse(parameters.pl || defaults.pl);
5504
+ const pw = length38.parse(parameters.pw || defaults.pw);
5483
5505
  const pads = [];
5484
5506
  for (let i = 0; i < parameters.num_pins; i++) {
5485
5507
  const { x, y } = getMsopCoords(parameters.num_pins, i + 1, w, p);
@@ -5551,7 +5573,7 @@ var msop = (raw_params) => {
5551
5573
 
5552
5574
  // src/fn/sod323w.ts
5553
5575
  import { z as z50 } from "zod";
5554
- import { length as length40 } from "circuit-json";
5576
+ import { length as length39 } from "circuit-json";
5555
5577
  var sod323w_def = z50.object({
5556
5578
  fn: z50.string(),
5557
5579
  num_pins: z50.literal(2).default(2),
@@ -5565,7 +5587,7 @@ var sod323w = (raw_params) => {
5565
5587
  const parameters = sod323w_def.parse(raw_params);
5566
5588
  const silkscreenRefText = silkscreenRef(
5567
5589
  0,
5568
- length40.parse(parameters.h),
5590
+ length39.parse(parameters.h),
5569
5591
  0.3
5570
5592
  );
5571
5593
  const silkscreenLine = {
@@ -5574,20 +5596,20 @@ var sod323w = (raw_params) => {
5574
5596
  pcb_component_id: "",
5575
5597
  route: [
5576
5598
  {
5577
- x: length40.parse(parameters.pad_spacing) / 2,
5578
- y: length40.parse(parameters.h) / 2
5599
+ x: length39.parse(parameters.pad_spacing) / 2,
5600
+ y: length39.parse(parameters.h) / 2
5579
5601
  },
5580
5602
  {
5581
- x: -length40.parse(parameters.w) / 2 - 0.2,
5582
- y: length40.parse(parameters.h) / 2
5603
+ x: -length39.parse(parameters.w) / 2 - 0.2,
5604
+ y: length39.parse(parameters.h) / 2
5583
5605
  },
5584
5606
  {
5585
- x: -length40.parse(parameters.w) / 2 - 0.2,
5586
- y: -length40.parse(parameters.h) / 2
5607
+ x: -length39.parse(parameters.w) / 2 - 0.2,
5608
+ y: -length39.parse(parameters.h) / 2
5587
5609
  },
5588
5610
  {
5589
- x: length40.parse(parameters.pad_spacing) / 2,
5590
- y: -length40.parse(parameters.h) / 2
5611
+ x: length39.parse(parameters.pad_spacing) / 2,
5612
+ y: -length39.parse(parameters.h) / 2
5591
5613
  }
5592
5614
  ],
5593
5615
  stroke_width: 0.1,
@@ -5631,7 +5653,7 @@ var sodWithoutParsing14 = (parameters) => {
5631
5653
 
5632
5654
  // src/fn/sod323fl.ts
5633
5655
  import { z as z51 } from "zod";
5634
- import { length as length41 } from "circuit-json";
5656
+ import { length as length40 } from "circuit-json";
5635
5657
  var sod323FL_def = z51.object({
5636
5658
  fn: z51.string(),
5637
5659
  num_pins: z51.literal(2).default(2),
@@ -5645,7 +5667,7 @@ var sod323fl = (raw_params) => {
5645
5667
  const parameters = sod323FL_def.parse(raw_params);
5646
5668
  const silkscreenRefText = silkscreenRef(
5647
5669
  0,
5648
- length41.parse(parameters.h),
5670
+ length40.parse(parameters.h),
5649
5671
  0.3
5650
5672
  );
5651
5673
  const silkscreenLine = {
@@ -5654,20 +5676,20 @@ var sod323fl = (raw_params) => {
5654
5676
  pcb_component_id: "",
5655
5677
  route: [
5656
5678
  {
5657
- x: length41.parse(parameters.pad_spacing) / 2,
5658
- y: length41.parse(parameters.h) / 2
5679
+ x: length40.parse(parameters.pad_spacing) / 2,
5680
+ y: length40.parse(parameters.h) / 2
5659
5681
  },
5660
5682
  {
5661
- x: -length41.parse(parameters.w) / 2 - 0.2,
5662
- y: length41.parse(parameters.h) / 2
5683
+ x: -length40.parse(parameters.w) / 2 - 0.2,
5684
+ y: length40.parse(parameters.h) / 2
5663
5685
  },
5664
5686
  {
5665
- x: -length41.parse(parameters.w) / 2 - 0.2,
5666
- y: -length41.parse(parameters.h) / 2
5687
+ x: -length40.parse(parameters.w) / 2 - 0.2,
5688
+ y: -length40.parse(parameters.h) / 2
5667
5689
  },
5668
5690
  {
5669
- x: length41.parse(parameters.pad_spacing) / 2,
5670
- y: -length41.parse(parameters.h) / 2
5691
+ x: length40.parse(parameters.pad_spacing) / 2,
5692
+ y: -length40.parse(parameters.h) / 2
5671
5693
  }
5672
5694
  ],
5673
5695
  stroke_width: 0.1,
@@ -5711,7 +5733,7 @@ var sodWithoutParsing15 = (parameters) => {
5711
5733
 
5712
5734
  // src/fn/son.ts
5713
5735
  import { z as z52 } from "zod";
5714
- import { length as length42 } from "circuit-json";
5736
+ import { length as length41 } from "circuit-json";
5715
5737
  var son_def = z52.object({
5716
5738
  fn: z52.string(),
5717
5739
  num_pins: z52.literal(8).default(8),
@@ -5730,13 +5752,13 @@ var son = (raw_params) => {
5730
5752
  raw_params.ep = true;
5731
5753
  }
5732
5754
  const parameters = son_def.parse(raw_params);
5733
- const w = length42.parse(parameters.w);
5734
- const h = length42.parse(parameters.h);
5735
- const p = length42.parse(parameters.p);
5736
- const pl = length42.parse(parameters.pl);
5737
- const pw = length42.parse(parameters.pw);
5738
- const epw = length42.parse(parameters.epw);
5739
- const eph = length42.parse(parameters.eph);
5755
+ const w = length41.parse(parameters.w);
5756
+ const h = length41.parse(parameters.h);
5757
+ const p = length41.parse(parameters.p);
5758
+ const pl = length41.parse(parameters.pl);
5759
+ const pw = length41.parse(parameters.pw);
5760
+ const epw = length41.parse(parameters.epw);
5761
+ const eph = length41.parse(parameters.eph);
5740
5762
  const pads = [];
5741
5763
  for (let i = 0; i < parameters.num_pins; i++) {
5742
5764
  const { x, y } = getSonPadCoord(parameters.num_pins, i + 1, w, p);
@@ -5814,18 +5836,18 @@ var getSonPadCoord = (num_pins, pn, w, p) => {
5814
5836
  const col = pn <= half ? -1 : 1;
5815
5837
  const row = (half - 1) / 2 - rowIndex;
5816
5838
  return {
5817
- x: col * length42.parse("1.4mm"),
5839
+ x: col * length41.parse("1.4mm"),
5818
5840
  y: row * p
5819
5841
  };
5820
5842
  };
5821
5843
 
5822
5844
  // src/fn/solderjumper.ts
5823
- import { length as length43 } from "circuit-json";
5845
+ import { length as length42 } from "circuit-json";
5824
5846
  var solderjumper = (params) => {
5825
5847
  const { num_pins, bridged, p = 2.54, pw = 1.5, ph = 1.5 } = params;
5826
- const padSpacing = length43.parse(p);
5827
- const padWidth = length43.parse(pw);
5828
- const padHeight = length43.parse(ph);
5848
+ const padSpacing = length42.parse(p);
5849
+ const padWidth = length42.parse(pw);
5850
+ const padHeight = length42.parse(ph);
5829
5851
  const traceWidth = Math.min(padHeight / 4, 0.5);
5830
5852
  const pads = [];
5831
5853
  for (let i = 0; i < num_pins; i++) {
@@ -5912,20 +5934,204 @@ var solderjumper = (params) => {
5912
5934
  };
5913
5935
  };
5914
5936
 
5915
- // src/fn/potentiometer.ts
5937
+ // src/fn/sot457.ts
5916
5938
  import { z as z53 } from "zod";
5917
- var potentiometer_def = z53.object({
5918
- fn: z53.string(),
5919
- num_pins: z53.union([z53.literal(3), z53.literal(2)]).default(3),
5920
- p: z53.string().default("3.8mm"),
5921
- id: z53.string().default("1.25mm"),
5922
- od: z53.string().default("2.35mm"),
5923
- ca: z53.string().default("14mm").describe(
5939
+
5940
+ // src/helpers/pillpad.ts
5941
+ var pillpad = (pn, x, y, w, h) => {
5942
+ return {
5943
+ type: "pcb_smtpad",
5944
+ x,
5945
+ y,
5946
+ width: w,
5947
+ height: h,
5948
+ radius: h / 2,
5949
+ layer: "top",
5950
+ shape: "pill",
5951
+ pcb_smtpad_id: "",
5952
+ port_hints: Array.isArray(pn) ? pn.map((item) => item.toString()) : [pn.toString()]
5953
+ };
5954
+ };
5955
+
5956
+ // src/fn/sot457.ts
5957
+ var commonSchema = {
5958
+ fn: z53.literal("sot457"),
5959
+ num_pins: z53.literal(6).default(6),
5960
+ pillh: z53.string().default("0.45mm"),
5961
+ pillw: z53.string().default("1.45mm"),
5962
+ pl: z53.string(),
5963
+ pw: z53.string(),
5964
+ p: z53.string(),
5965
+ wave: z53.boolean().optional(),
5966
+ reflow: z53.boolean().optional()
5967
+ };
5968
+ var sot457DefSchema = z53.object({
5969
+ ...commonSchema,
5970
+ h: z53.string().default("2.5mm"),
5971
+ w: z53.string().default("2.7mm"),
5972
+ pl: z53.string().default("0.8mm"),
5973
+ pw: z53.string().default("0.55mm"),
5974
+ p: z53.string().default("0.95mm")
5975
+ });
5976
+ var sot457WaveSchema = z53.object({
5977
+ ...commonSchema,
5978
+ h: z53.string().default("3mm"),
5979
+ w: z53.string().default("4mm"),
5980
+ pillr: z53.string().default("0.225mm"),
5981
+ pl: z53.string().default("1.45mm"),
5982
+ pw: z53.string().default("1.5mm"),
5983
+ p: z53.string().default("1.475mm")
5984
+ }).transform((data) => ({
5985
+ ...data,
5986
+ wave: data.wave ?? (data.reflow === void 0 ? true : !data.reflow),
5987
+ reflow: data.reflow ?? (data.wave === void 0 ? false : !data.wave)
5988
+ }));
5989
+ var parseDimension = (value) => {
5990
+ return Number.parseFloat(value.replace("mm", ""));
5991
+ };
5992
+ var getCcwSot457Coords = ({
5993
+ pitch,
5994
+ width,
5995
+ pinNumber
5996
+ }) => {
5997
+ const offset = 0.1;
5998
+ const coords = {
5999
+ 1: { x: -width / 2 - offset, y: pitch },
6000
+ 2: { x: -width / 2 - offset, y: 0 },
6001
+ 3: { x: -width / 2 - offset, y: -pitch },
6002
+ 4: { x: width / 2 + offset, y: -pitch },
6003
+ 5: { x: width / 2 + offset, y: 0 },
6004
+ 6: { x: width / 2 + offset, y: pitch }
6005
+ };
6006
+ const coord = coords[pinNumber];
6007
+ if (!coord) {
6008
+ throw new Error(`Invalid pin number: ${pinNumber}`);
6009
+ }
6010
+ return coord;
6011
+ };
6012
+ var generateSot457Elements = (params) => {
6013
+ const pads = [];
6014
+ const pitch = parseDimension(params.p);
6015
+ const padLength = parseDimension(params.pl);
6016
+ const padWidth = parseDimension(params.pw);
6017
+ const width = parseDimension(params.w);
6018
+ const height = parseDimension(params.h);
6019
+ if (params.wave) {
6020
+ const pinConfigs = {
6021
+ 1: ({ padWidth: padWidth2, padHeight }) => rectpad(1, -pitch, pitch, padHeight, padWidth2),
6022
+ 2: ({ padWidth: padWidth2, padHeight }) => rectpad(2, -pitch, -pitch, padHeight, padWidth2),
6023
+ 3: ({ padWidth: padWidth2, padHeight }) => pillpad(
6024
+ 3,
6025
+ -pitch,
6026
+ 0,
6027
+ parseDimension(params.pillw),
6028
+ parseDimension(params.pillh)
6029
+ ),
6030
+ 4: ({ padWidth: padWidth2, padHeight }) => pillpad(
6031
+ 4,
6032
+ pitch,
6033
+ 0,
6034
+ parseDimension(params.pillw),
6035
+ parseDimension(params.pillh)
6036
+ ),
6037
+ 5: ({ padWidth: padWidth2, padHeight }) => rectpad(5, pitch, pitch, padHeight, padWidth2),
6038
+ 6: ({ padWidth: padWidth2, padHeight }) => rectpad(6, pitch, -pitch, padHeight, padWidth2)
6039
+ };
6040
+ for (let i = 1; i <= params.num_pins; i++) {
6041
+ const config = pinConfigs[i];
6042
+ if (config) {
6043
+ pads.push(config({ padWidth: padLength, padHeight: padWidth }));
6044
+ }
6045
+ }
6046
+ } else {
6047
+ for (let i = 1; i <= params.num_pins; i++) {
6048
+ const { x, y } = getCcwSot457Coords({ pitch, width, pinNumber: i });
6049
+ pads.push(rectpad(i, x, y, padLength, padWidth));
6050
+ }
6051
+ }
6052
+ const silkscreenPath1 = {
6053
+ type: "pcb_silkscreen_path",
6054
+ layer: "top",
6055
+ pcb_component_id: "",
6056
+ pcb_silkscreen_path_id: "silkscreen_path_1",
6057
+ route: [
6058
+ { x: -width / 3, y: height / 2 + pitch / 1.3 },
6059
+ { x: width / 3, y: height / 2 + pitch / 1.3 }
6060
+ ],
6061
+ stroke_width: 0.05
6062
+ };
6063
+ const silkscreenPath2 = {
6064
+ type: "pcb_silkscreen_path",
6065
+ layer: "top",
6066
+ pcb_component_id: "",
6067
+ pcb_silkscreen_path_id: "silkscreen_path_2",
6068
+ route: [
6069
+ { x: -width / 3, y: -height / 2 - pitch / 1.3 },
6070
+ { x: width / 3, y: -height / 2 - pitch / 1.3 }
6071
+ ],
6072
+ stroke_width: 0.05
6073
+ };
6074
+ const silkscreenRefText = silkscreenRef(0, height + 0.5, 0.3);
6075
+ const pin1Position = getCcwSot457Coords({ pitch, width, pinNumber: 1 });
6076
+ const triangleHeight = params.wave ? 1 : 0.5;
6077
+ const triangleWidth = params.wave ? 0.7 : 0.3;
6078
+ pin1Position.x -= params.wave ? padWidth : padWidth * 1.7;
6079
+ const pin1Indicator = {
6080
+ type: "pcb_silkscreen_path",
6081
+ layer: "top",
6082
+ pcb_component_id: "",
6083
+ pcb_silkscreen_path_id: "pin1_indicator",
6084
+ route: [
6085
+ { x: pin1Position.x + triangleHeight / 2, y: pin1Position.y },
6086
+ {
6087
+ x: pin1Position.x - triangleHeight / 2,
6088
+ y: pin1Position.y + triangleWidth / 2
6089
+ },
6090
+ {
6091
+ x: pin1Position.x - triangleHeight / 2,
6092
+ y: pin1Position.y - triangleWidth / 2
6093
+ },
6094
+ { x: pin1Position.x + triangleHeight / 2, y: pin1Position.y }
6095
+ ],
6096
+ stroke_width: 0.05
6097
+ };
6098
+ return [
6099
+ silkscreenRefText,
6100
+ silkscreenPath1,
6101
+ silkscreenPath2,
6102
+ pin1Indicator,
6103
+ ...pads
6104
+ ];
6105
+ };
6106
+ var sot457 = (rawParams) => {
6107
+ if (rawParams.wave) {
6108
+ const parameters2 = sot457WaveSchema.parse({ ...rawParams, fn: "sot457" });
6109
+ return {
6110
+ circuitJson: generateSot457Elements(parameters2),
6111
+ parameters: parameters2
6112
+ };
6113
+ }
6114
+ const parameters = sot457DefSchema.parse(rawParams);
6115
+ return {
6116
+ circuitJson: generateSot457Elements(parameters),
6117
+ parameters
6118
+ };
6119
+ };
6120
+
6121
+ // src/fn/potentiometer.ts
6122
+ import { z as z54 } from "zod";
6123
+ var potentiometer_def = z54.object({
6124
+ fn: z54.string(),
6125
+ num_pins: z54.union([z54.literal(3), z54.literal(2)]).default(3),
6126
+ p: z54.string().default("3.8mm"),
6127
+ id: z54.string().default("1.25mm"),
6128
+ od: z54.string().default("2.35mm"),
6129
+ ca: z54.string().default("14mm").describe(
5924
6130
  "Caliper axis (width or diameter of the potentiometer body or adjustment knob)"
5925
6131
  ),
5926
- w: z53.string().default("5.35mm"),
5927
- h: z53.string().default("4mm"),
5928
- string: z53.string().optional()
6132
+ w: z54.string().default("5.35mm"),
6133
+ h: z54.string().default("4mm"),
6134
+ string: z54.string().optional()
5929
6135
  });
5930
6136
  var potentiometer_acp = (parameters) => {
5931
6137
  const { p, id, od, h, ca } = parameters;
@@ -5992,15 +6198,15 @@ var potentiometer = (raw_params) => {
5992
6198
 
5993
6199
  // src/fn/electrolytic.ts
5994
6200
  import {
5995
- length as length44
6201
+ length as length43
5996
6202
  } from "circuit-json";
5997
- import { z as z54 } from "zod";
5998
- var electrolytic_def = z54.object({
5999
- fn: z54.string(),
6000
- p: length44.optional().default("7.5mm"),
6001
- id: length44.optional().default("1mm"),
6002
- od: length44.optional().default("2mm"),
6003
- d: length44.optional().default("10.5mm")
6203
+ import { z as z55 } from "zod";
6204
+ var electrolytic_def = z55.object({
6205
+ fn: z55.string(),
6206
+ p: length43.optional().default("7.5mm"),
6207
+ id: length43.optional().default("1mm"),
6208
+ od: length43.optional().default("2mm"),
6209
+ d: length43.optional().default("10.5mm")
6004
6210
  });
6005
6211
  var generate_circle_arcs = (centerX, centerY, radius, cut, cutHeight) => {
6006
6212
  const topArc = [];