@tscircuit/footprinter 0.0.164 → 0.0.165

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