circuit-json 0.0.414 → 0.0.415

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.mjs CHANGED
@@ -3302,15 +3302,16 @@ var pcb_via_clearance_error = base_circuit_json_error.extend({
3302
3302
  }).describe("Error emitted when vias are closer than the allowed clearance");
3303
3303
  expectTypesMatch(true);
3304
3304
 
3305
- // src/pcb/pcb_pad_pad_clearance_error.ts
3305
+ // src/pcb/pcb_via_trace_clearance_error.ts
3306
3306
  import { z as z150 } from "zod";
3307
- var pcb_pad_pad_clearance_error = base_circuit_json_error.extend({
3308
- type: z150.literal("pcb_pad_pad_clearance_error"),
3309
- pcb_pad_pad_clearance_error_id: getZodPrefixedIdWithDefault(
3310
- "pcb_pad_pad_clearance_error"
3307
+ var pcb_via_trace_clearance_error = base_circuit_json_error.extend({
3308
+ type: z150.literal("pcb_via_trace_clearance_error"),
3309
+ pcb_via_trace_clearance_error_id: getZodPrefixedIdWithDefault(
3310
+ "pcb_via_trace_clearance_error"
3311
3311
  ),
3312
- error_type: z150.literal("pcb_pad_pad_clearance_error").default("pcb_pad_pad_clearance_error"),
3313
- pcb_pad_ids: z150.array(z150.string()).min(2),
3312
+ error_type: z150.literal("pcb_via_trace_clearance_error").default("pcb_via_trace_clearance_error"),
3313
+ pcb_via_id: z150.string(),
3314
+ pcb_trace_id: z150.string(),
3314
3315
  minimum_clearance: distance.optional(),
3315
3316
  actual_clearance: distance.optional(),
3316
3317
  center: z150.object({
@@ -3318,26 +3319,49 @@ var pcb_pad_pad_clearance_error = base_circuit_json_error.extend({
3318
3319
  y: z150.number().optional()
3319
3320
  }).optional(),
3320
3321
  subcircuit_id: z150.string().optional()
3322
+ }).describe(
3323
+ "Error emitted when a via and trace are closer than the allowed clearance"
3324
+ );
3325
+ expectTypesMatch(
3326
+ true
3327
+ );
3328
+
3329
+ // src/pcb/pcb_pad_pad_clearance_error.ts
3330
+ import { z as z151 } from "zod";
3331
+ var pcb_pad_pad_clearance_error = base_circuit_json_error.extend({
3332
+ type: z151.literal("pcb_pad_pad_clearance_error"),
3333
+ pcb_pad_pad_clearance_error_id: getZodPrefixedIdWithDefault(
3334
+ "pcb_pad_pad_clearance_error"
3335
+ ),
3336
+ error_type: z151.literal("pcb_pad_pad_clearance_error").default("pcb_pad_pad_clearance_error"),
3337
+ pcb_pad_ids: z151.array(z151.string()).min(2),
3338
+ minimum_clearance: distance.optional(),
3339
+ actual_clearance: distance.optional(),
3340
+ center: z151.object({
3341
+ x: z151.number().optional(),
3342
+ y: z151.number().optional()
3343
+ }).optional(),
3344
+ subcircuit_id: z151.string().optional()
3321
3345
  }).describe("Error emitted when pads are closer than the allowed clearance");
3322
3346
  expectTypesMatch(true);
3323
3347
 
3324
3348
  // src/pcb/pcb_pad_trace_clearance_error.ts
3325
- import { z as z151 } from "zod";
3349
+ import { z as z152 } from "zod";
3326
3350
  var pcb_pad_trace_clearance_error = base_circuit_json_error.extend({
3327
- type: z151.literal("pcb_pad_trace_clearance_error"),
3351
+ type: z152.literal("pcb_pad_trace_clearance_error"),
3328
3352
  pcb_pad_trace_clearance_error_id: getZodPrefixedIdWithDefault(
3329
3353
  "pcb_pad_trace_clearance_error"
3330
3354
  ),
3331
- error_type: z151.literal("pcb_pad_trace_clearance_error").default("pcb_pad_trace_clearance_error"),
3332
- pcb_pad_id: z151.string(),
3333
- pcb_trace_id: z151.string(),
3355
+ error_type: z152.literal("pcb_pad_trace_clearance_error").default("pcb_pad_trace_clearance_error"),
3356
+ pcb_pad_id: z152.string(),
3357
+ pcb_trace_id: z152.string(),
3334
3358
  minimum_clearance: distance.optional(),
3335
3359
  actual_clearance: distance.optional(),
3336
- center: z151.object({
3337
- x: z151.number().optional(),
3338
- y: z151.number().optional()
3360
+ center: z152.object({
3361
+ x: z152.number().optional(),
3362
+ y: z152.number().optional()
3339
3363
  }).optional(),
3340
- subcircuit_id: z151.string().optional()
3364
+ subcircuit_id: z152.string().optional()
3341
3365
  }).describe(
3342
3366
  "Error emitted when a pad and trace are closer than allowed clearance"
3343
3367
  );
@@ -3346,72 +3370,72 @@ expectTypesMatch(
3346
3370
  );
3347
3371
 
3348
3372
  // src/pcb/pcb_courtyard_rect.ts
3349
- import { z as z152 } from "zod";
3350
- var pcb_courtyard_rect = z152.object({
3351
- type: z152.literal("pcb_courtyard_rect"),
3373
+ import { z as z153 } from "zod";
3374
+ var pcb_courtyard_rect = z153.object({
3375
+ type: z153.literal("pcb_courtyard_rect"),
3352
3376
  pcb_courtyard_rect_id: getZodPrefixedIdWithDefault("pcb_courtyard_rect"),
3353
- pcb_component_id: z152.string(),
3354
- pcb_group_id: z152.string().optional(),
3355
- subcircuit_id: z152.string().optional(),
3377
+ pcb_component_id: z153.string(),
3378
+ pcb_group_id: z153.string().optional(),
3379
+ subcircuit_id: z153.string().optional(),
3356
3380
  center: point,
3357
3381
  width: length,
3358
3382
  height: length,
3359
3383
  layer: visible_layer,
3360
3384
  ccw_rotation: rotation.optional(),
3361
- color: z152.string().optional()
3385
+ color: z153.string().optional()
3362
3386
  }).describe("Defines a courtyard rectangle on the PCB");
3363
3387
  expectTypesMatch(true);
3364
3388
 
3365
3389
  // src/pcb/pcb_courtyard_outline.ts
3366
- import { z as z153 } from "zod";
3367
- var pcb_courtyard_outline = z153.object({
3368
- type: z153.literal("pcb_courtyard_outline"),
3390
+ import { z as z154 } from "zod";
3391
+ var pcb_courtyard_outline = z154.object({
3392
+ type: z154.literal("pcb_courtyard_outline"),
3369
3393
  pcb_courtyard_outline_id: getZodPrefixedIdWithDefault(
3370
3394
  "pcb_courtyard_outline"
3371
3395
  ),
3372
- pcb_component_id: z153.string(),
3373
- pcb_group_id: z153.string().optional(),
3374
- subcircuit_id: z153.string().optional(),
3396
+ pcb_component_id: z154.string(),
3397
+ pcb_group_id: z154.string().optional(),
3398
+ subcircuit_id: z154.string().optional(),
3375
3399
  layer: visible_layer,
3376
- outline: z153.array(point).min(2)
3400
+ outline: z154.array(point).min(2)
3377
3401
  }).describe("Defines a courtyard outline on the PCB");
3378
3402
  expectTypesMatch(true);
3379
3403
 
3380
3404
  // src/pcb/pcb_courtyard_polygon.ts
3381
- import { z as z154 } from "zod";
3382
- var pcb_courtyard_polygon = z154.object({
3383
- type: z154.literal("pcb_courtyard_polygon"),
3405
+ import { z as z155 } from "zod";
3406
+ var pcb_courtyard_polygon = z155.object({
3407
+ type: z155.literal("pcb_courtyard_polygon"),
3384
3408
  pcb_courtyard_polygon_id: getZodPrefixedIdWithDefault(
3385
3409
  "pcb_courtyard_polygon"
3386
3410
  ),
3387
- pcb_component_id: z154.string(),
3388
- pcb_group_id: z154.string().optional(),
3389
- subcircuit_id: z154.string().optional(),
3411
+ pcb_component_id: z155.string(),
3412
+ pcb_group_id: z155.string().optional(),
3413
+ subcircuit_id: z155.string().optional(),
3390
3414
  layer: visible_layer,
3391
- points: z154.array(point).min(3),
3392
- color: z154.string().optional()
3415
+ points: z155.array(point).min(3),
3416
+ color: z155.string().optional()
3393
3417
  }).describe("Defines a courtyard polygon on the PCB");
3394
3418
  expectTypesMatch(true);
3395
3419
 
3396
3420
  // src/pcb/pcb_courtyard_circle.ts
3397
- import { z as z155 } from "zod";
3398
- var pcb_courtyard_circle = z155.object({
3399
- type: z155.literal("pcb_courtyard_circle"),
3421
+ import { z as z156 } from "zod";
3422
+ var pcb_courtyard_circle = z156.object({
3423
+ type: z156.literal("pcb_courtyard_circle"),
3400
3424
  pcb_courtyard_circle_id: getZodPrefixedIdWithDefault(
3401
3425
  "pcb_courtyard_circle"
3402
3426
  ),
3403
- pcb_component_id: z155.string(),
3404
- pcb_group_id: z155.string().optional(),
3405
- subcircuit_id: z155.string().optional(),
3427
+ pcb_component_id: z156.string(),
3428
+ pcb_group_id: z156.string().optional(),
3429
+ subcircuit_id: z156.string().optional(),
3406
3430
  center: point,
3407
3431
  radius: length,
3408
3432
  layer: visible_layer,
3409
- color: z155.string().optional()
3433
+ color: z156.string().optional()
3410
3434
  }).describe("Defines a courtyard circle on the PCB");
3411
3435
  expectTypesMatch(true);
3412
3436
 
3413
3437
  // src/cad/cad_component.ts
3414
- import { z as z156 } from "zod";
3438
+ import { z as z157 } from "zod";
3415
3439
 
3416
3440
  // src/cad/cad_model_conventions.ts
3417
3441
  var cad_model_formats = [
@@ -3442,48 +3466,48 @@ var cadModelDefaultDirectionMap = {
3442
3466
  };
3443
3467
 
3444
3468
  // src/cad/cad_component.ts
3445
- var cad_component = z156.object({
3446
- type: z156.literal("cad_component"),
3447
- cad_component_id: z156.string(),
3448
- pcb_component_id: z156.string(),
3449
- source_component_id: z156.string(),
3469
+ var cad_component = z157.object({
3470
+ type: z157.literal("cad_component"),
3471
+ cad_component_id: z157.string(),
3472
+ pcb_component_id: z157.string(),
3473
+ source_component_id: z157.string(),
3450
3474
  position: point3,
3451
3475
  rotation: point3.optional(),
3452
3476
  size: point3.optional(),
3453
3477
  layer: layer_ref.optional(),
3454
- subcircuit_id: z156.string().optional(),
3478
+ subcircuit_id: z157.string().optional(),
3455
3479
  // These are all ways to generate/load the 3d model
3456
- footprinter_string: z156.string().optional(),
3457
- model_obj_url: z156.string().optional(),
3458
- model_stl_url: z156.string().optional(),
3459
- model_3mf_url: z156.string().optional(),
3460
- model_gltf_url: z156.string().optional(),
3461
- model_glb_url: z156.string().optional(),
3462
- model_step_url: z156.string().optional(),
3463
- model_wrl_url: z156.string().optional(),
3480
+ footprinter_string: z157.string().optional(),
3481
+ model_obj_url: z157.string().optional(),
3482
+ model_stl_url: z157.string().optional(),
3483
+ model_3mf_url: z157.string().optional(),
3484
+ model_gltf_url: z157.string().optional(),
3485
+ model_glb_url: z157.string().optional(),
3486
+ model_step_url: z157.string().optional(),
3487
+ model_wrl_url: z157.string().optional(),
3464
3488
  model_asset: asset.optional(),
3465
- model_unit_to_mm_scale_factor: z156.number().optional(),
3466
- model_board_normal_direction: z156.enum(cad_model_axis_directions).optional().describe(
3489
+ model_unit_to_mm_scale_factor: z157.number().optional(),
3490
+ model_board_normal_direction: z157.enum(cad_model_axis_directions).optional().describe(
3467
3491
  `The direction in the model's coordinate space that is considered "up" or "coming out of the board surface"`
3468
3492
  ),
3469
3493
  model_origin_position: point3.optional(),
3470
- model_origin_alignment: z156.enum([
3494
+ model_origin_alignment: z157.enum([
3471
3495
  "unknown",
3472
3496
  "center",
3473
3497
  "center_of_component_on_board_surface",
3474
3498
  "bottom_center_of_component"
3475
3499
  ]).optional(),
3476
- model_object_fit: z156.enum(["contain_within_bounds", "fill_bounds"]).optional().default("contain_within_bounds"),
3477
- model_jscad: z156.any().optional(),
3478
- show_as_translucent_model: z156.boolean().optional(),
3479
- anchor_alignment: z156.enum(["center", "center_of_component_on_board_surface"]).optional().default("center")
3500
+ model_object_fit: z157.enum(["contain_within_bounds", "fill_bounds"]).optional().default("contain_within_bounds"),
3501
+ model_jscad: z157.any().optional(),
3502
+ show_as_translucent_model: z157.boolean().optional(),
3503
+ anchor_alignment: z157.enum(["center", "center_of_component_on_board_surface"]).optional().default("center")
3480
3504
  }).describe("Defines a component on the PCB");
3481
3505
  expectTypesMatch(true);
3482
3506
 
3483
3507
  // src/simulation/simulation_voltage_source.ts
3484
- import { z as z157 } from "zod";
3485
- var wave_shape = z157.enum(["sinewave", "square", "triangle", "sawtooth"]);
3486
- var percentage = z157.union([z157.string(), z157.number()]).transform((val) => {
3508
+ import { z as z158 } from "zod";
3509
+ var wave_shape = z158.enum(["sinewave", "square", "triangle", "sawtooth"]);
3510
+ var percentage = z158.union([z158.string(), z158.number()]).transform((val) => {
3487
3511
  if (typeof val === "string") {
3488
3512
  if (val.endsWith("%")) {
3489
3513
  return parseFloat(val.slice(0, -1)) / 100;
@@ -3492,30 +3516,30 @@ var percentage = z157.union([z157.string(), z157.number()]).transform((val) => {
3492
3516
  }
3493
3517
  return val;
3494
3518
  }).pipe(
3495
- z157.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
3519
+ z158.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
3496
3520
  );
3497
- var simulation_dc_voltage_source = z157.object({
3498
- type: z157.literal("simulation_voltage_source"),
3521
+ var simulation_dc_voltage_source = z158.object({
3522
+ type: z158.literal("simulation_voltage_source"),
3499
3523
  simulation_voltage_source_id: getZodPrefixedIdWithDefault(
3500
3524
  "simulation_voltage_source"
3501
3525
  ),
3502
- is_dc_source: z157.literal(true).optional().default(true),
3503
- positive_source_port_id: z157.string().optional(),
3504
- negative_source_port_id: z157.string().optional(),
3505
- positive_source_net_id: z157.string().optional(),
3506
- negative_source_net_id: z157.string().optional(),
3526
+ is_dc_source: z158.literal(true).optional().default(true),
3527
+ positive_source_port_id: z158.string().optional(),
3528
+ negative_source_port_id: z158.string().optional(),
3529
+ positive_source_net_id: z158.string().optional(),
3530
+ negative_source_net_id: z158.string().optional(),
3507
3531
  voltage
3508
3532
  }).describe("Defines a DC voltage source for simulation");
3509
- var simulation_ac_voltage_source = z157.object({
3510
- type: z157.literal("simulation_voltage_source"),
3533
+ var simulation_ac_voltage_source = z158.object({
3534
+ type: z158.literal("simulation_voltage_source"),
3511
3535
  simulation_voltage_source_id: getZodPrefixedIdWithDefault(
3512
3536
  "simulation_voltage_source"
3513
3537
  ),
3514
- is_dc_source: z157.literal(false),
3515
- terminal1_source_port_id: z157.string().optional(),
3516
- terminal2_source_port_id: z157.string().optional(),
3517
- terminal1_source_net_id: z157.string().optional(),
3518
- terminal2_source_net_id: z157.string().optional(),
3538
+ is_dc_source: z158.literal(false),
3539
+ terminal1_source_port_id: z158.string().optional(),
3540
+ terminal2_source_port_id: z158.string().optional(),
3541
+ terminal1_source_net_id: z158.string().optional(),
3542
+ terminal2_source_net_id: z158.string().optional(),
3519
3543
  voltage: voltage.optional(),
3520
3544
  frequency: frequency.optional(),
3521
3545
  peak_to_peak_voltage: voltage.optional(),
@@ -3523,14 +3547,14 @@ var simulation_ac_voltage_source = z157.object({
3523
3547
  phase: rotation.optional(),
3524
3548
  duty_cycle: percentage.optional()
3525
3549
  }).describe("Defines an AC voltage source for simulation");
3526
- var simulation_voltage_source = z157.union([simulation_dc_voltage_source, simulation_ac_voltage_source]).describe("Defines a voltage source for simulation");
3550
+ var simulation_voltage_source = z158.union([simulation_dc_voltage_source, simulation_ac_voltage_source]).describe("Defines a voltage source for simulation");
3527
3551
  expectTypesMatch(true);
3528
3552
  expectTypesMatch(true);
3529
3553
  expectTypesMatch(true);
3530
3554
 
3531
3555
  // src/simulation/simulation_current_source.ts
3532
- import { z as z158 } from "zod";
3533
- var percentage2 = z158.union([z158.string(), z158.number()]).transform((val) => {
3556
+ import { z as z159 } from "zod";
3557
+ var percentage2 = z159.union([z159.string(), z159.number()]).transform((val) => {
3534
3558
  if (typeof val === "string") {
3535
3559
  if (val.endsWith("%")) {
3536
3560
  return parseFloat(val.slice(0, -1)) / 100;
@@ -3539,30 +3563,30 @@ var percentage2 = z158.union([z158.string(), z158.number()]).transform((val) =>
3539
3563
  }
3540
3564
  return val;
3541
3565
  }).pipe(
3542
- z158.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
3566
+ z159.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
3543
3567
  );
3544
- var simulation_dc_current_source = z158.object({
3545
- type: z158.literal("simulation_current_source"),
3568
+ var simulation_dc_current_source = z159.object({
3569
+ type: z159.literal("simulation_current_source"),
3546
3570
  simulation_current_source_id: getZodPrefixedIdWithDefault(
3547
3571
  "simulation_current_source"
3548
3572
  ),
3549
- is_dc_source: z158.literal(true).optional().default(true),
3550
- positive_source_port_id: z158.string().optional(),
3551
- negative_source_port_id: z158.string().optional(),
3552
- positive_source_net_id: z158.string().optional(),
3553
- negative_source_net_id: z158.string().optional(),
3573
+ is_dc_source: z159.literal(true).optional().default(true),
3574
+ positive_source_port_id: z159.string().optional(),
3575
+ negative_source_port_id: z159.string().optional(),
3576
+ positive_source_net_id: z159.string().optional(),
3577
+ negative_source_net_id: z159.string().optional(),
3554
3578
  current
3555
3579
  }).describe("Defines a DC current source for simulation");
3556
- var simulation_ac_current_source = z158.object({
3557
- type: z158.literal("simulation_current_source"),
3580
+ var simulation_ac_current_source = z159.object({
3581
+ type: z159.literal("simulation_current_source"),
3558
3582
  simulation_current_source_id: getZodPrefixedIdWithDefault(
3559
3583
  "simulation_current_source"
3560
3584
  ),
3561
- is_dc_source: z158.literal(false),
3562
- terminal1_source_port_id: z158.string().optional(),
3563
- terminal2_source_port_id: z158.string().optional(),
3564
- terminal1_source_net_id: z158.string().optional(),
3565
- terminal2_source_net_id: z158.string().optional(),
3585
+ is_dc_source: z159.literal(false),
3586
+ terminal1_source_port_id: z159.string().optional(),
3587
+ terminal2_source_port_id: z159.string().optional(),
3588
+ terminal1_source_net_id: z159.string().optional(),
3589
+ terminal2_source_net_id: z159.string().optional(),
3566
3590
  current: current.optional(),
3567
3591
  frequency: frequency.optional(),
3568
3592
  peak_to_peak_current: current.optional(),
@@ -3570,25 +3594,25 @@ var simulation_ac_current_source = z158.object({
3570
3594
  phase: rotation.optional(),
3571
3595
  duty_cycle: percentage2.optional()
3572
3596
  }).describe("Defines an AC current source for simulation");
3573
- var simulation_current_source = z158.union([simulation_dc_current_source, simulation_ac_current_source]).describe("Defines a current source for simulation");
3597
+ var simulation_current_source = z159.union([simulation_dc_current_source, simulation_ac_current_source]).describe("Defines a current source for simulation");
3574
3598
  expectTypesMatch(true);
3575
3599
  expectTypesMatch(true);
3576
3600
  expectTypesMatch(true);
3577
3601
 
3578
3602
  // src/simulation/simulation_experiment.ts
3579
- import { z as z159 } from "zod";
3580
- var experiment_type = z159.union([
3581
- z159.literal("spice_dc_sweep"),
3582
- z159.literal("spice_dc_operating_point"),
3583
- z159.literal("spice_transient_analysis"),
3584
- z159.literal("spice_ac_analysis")
3603
+ import { z as z160 } from "zod";
3604
+ var experiment_type = z160.union([
3605
+ z160.literal("spice_dc_sweep"),
3606
+ z160.literal("spice_dc_operating_point"),
3607
+ z160.literal("spice_transient_analysis"),
3608
+ z160.literal("spice_ac_analysis")
3585
3609
  ]);
3586
- var simulation_experiment = z159.object({
3587
- type: z159.literal("simulation_experiment"),
3610
+ var simulation_experiment = z160.object({
3611
+ type: z160.literal("simulation_experiment"),
3588
3612
  simulation_experiment_id: getZodPrefixedIdWithDefault(
3589
3613
  "simulation_experiment"
3590
3614
  ),
3591
- name: z159.string(),
3615
+ name: z160.string(),
3592
3616
  experiment_type,
3593
3617
  time_per_step: duration_ms.optional(),
3594
3618
  start_time_ms: ms.optional(),
@@ -3597,53 +3621,53 @@ var simulation_experiment = z159.object({
3597
3621
  expectTypesMatch(true);
3598
3622
 
3599
3623
  // src/simulation/simulation_transient_voltage_graph.ts
3600
- import { z as z160 } from "zod";
3601
- var simulation_transient_voltage_graph = z160.object({
3602
- type: z160.literal("simulation_transient_voltage_graph"),
3624
+ import { z as z161 } from "zod";
3625
+ var simulation_transient_voltage_graph = z161.object({
3626
+ type: z161.literal("simulation_transient_voltage_graph"),
3603
3627
  simulation_transient_voltage_graph_id: getZodPrefixedIdWithDefault(
3604
3628
  "simulation_transient_voltage_graph"
3605
3629
  ),
3606
- simulation_experiment_id: z160.string(),
3607
- timestamps_ms: z160.array(z160.number()).optional(),
3608
- voltage_levels: z160.array(z160.number()),
3609
- source_component_id: z160.string().optional(),
3610
- subcircuit_connectivity_map_key: z160.string().optional(),
3630
+ simulation_experiment_id: z161.string(),
3631
+ timestamps_ms: z161.array(z161.number()).optional(),
3632
+ voltage_levels: z161.array(z161.number()),
3633
+ source_component_id: z161.string().optional(),
3634
+ subcircuit_connectivity_map_key: z161.string().optional(),
3611
3635
  time_per_step: duration_ms,
3612
3636
  start_time_ms: ms,
3613
3637
  end_time_ms: ms,
3614
- name: z160.string().optional(),
3615
- color: z160.string().optional()
3638
+ name: z161.string().optional(),
3639
+ color: z161.string().optional()
3616
3640
  }).describe("Stores voltage measurements over time for a simulation");
3617
3641
  expectTypesMatch(true);
3618
3642
 
3619
3643
  // src/simulation/simulation_switch.ts
3620
- import { z as z161 } from "zod";
3621
- var simulation_switch = z161.object({
3622
- type: z161.literal("simulation_switch"),
3644
+ import { z as z162 } from "zod";
3645
+ var simulation_switch = z162.object({
3646
+ type: z162.literal("simulation_switch"),
3623
3647
  simulation_switch_id: getZodPrefixedIdWithDefault("simulation_switch"),
3624
- source_component_id: z161.string().optional(),
3648
+ source_component_id: z162.string().optional(),
3625
3649
  closes_at: ms.optional(),
3626
3650
  opens_at: ms.optional(),
3627
- starts_closed: z161.boolean().optional(),
3651
+ starts_closed: z162.boolean().optional(),
3628
3652
  switching_frequency: frequency.optional()
3629
3653
  }).describe("Defines a switch for simulation timing control");
3630
3654
  expectTypesMatch(true);
3631
3655
 
3632
3656
  // src/simulation/simulation_voltage_probe.ts
3633
- import { z as z162 } from "zod";
3634
- var simulation_voltage_probe = z162.object({
3635
- type: z162.literal("simulation_voltage_probe"),
3657
+ import { z as z163 } from "zod";
3658
+ var simulation_voltage_probe = z163.object({
3659
+ type: z163.literal("simulation_voltage_probe"),
3636
3660
  simulation_voltage_probe_id: getZodPrefixedIdWithDefault(
3637
3661
  "simulation_voltage_probe"
3638
3662
  ),
3639
- source_component_id: z162.string().optional(),
3640
- name: z162.string().optional(),
3641
- signal_input_source_port_id: z162.string().optional(),
3642
- signal_input_source_net_id: z162.string().optional(),
3643
- reference_input_source_port_id: z162.string().optional(),
3644
- reference_input_source_net_id: z162.string().optional(),
3645
- subcircuit_id: z162.string().optional(),
3646
- color: z162.string().optional()
3663
+ source_component_id: z163.string().optional(),
3664
+ name: z163.string().optional(),
3665
+ signal_input_source_port_id: z163.string().optional(),
3666
+ signal_input_source_net_id: z163.string().optional(),
3667
+ reference_input_source_port_id: z163.string().optional(),
3668
+ reference_input_source_net_id: z163.string().optional(),
3669
+ subcircuit_id: z163.string().optional(),
3670
+ color: z163.string().optional()
3647
3671
  }).describe(
3648
3672
  "Defines a voltage probe for simulation. If a reference input is not provided, it measures against ground. If a reference input is provided, it measures the differential voltage between two points."
3649
3673
  ).superRefine((data, ctx) => {
@@ -3653,20 +3677,20 @@ var simulation_voltage_probe = z162.object({
3653
3677
  const has_nets = !!data.signal_input_source_net_id || !!data.reference_input_source_net_id;
3654
3678
  if (has_ports && has_nets) {
3655
3679
  ctx.addIssue({
3656
- code: z162.ZodIssueCode.custom,
3680
+ code: z163.ZodIssueCode.custom,
3657
3681
  message: "Cannot mix port and net connections in a differential probe."
3658
3682
  });
3659
3683
  } else if (has_ports) {
3660
3684
  if (!data.signal_input_source_port_id || !data.reference_input_source_port_id) {
3661
3685
  ctx.addIssue({
3662
- code: z162.ZodIssueCode.custom,
3686
+ code: z163.ZodIssueCode.custom,
3663
3687
  message: "Differential port probe requires both signal_input_source_port_id and reference_input_source_port_id."
3664
3688
  });
3665
3689
  }
3666
3690
  } else if (has_nets) {
3667
3691
  if (!data.signal_input_source_net_id || !data.reference_input_source_net_id) {
3668
3692
  ctx.addIssue({
3669
- code: z162.ZodIssueCode.custom,
3693
+ code: z163.ZodIssueCode.custom,
3670
3694
  message: "Differential net probe requires both signal_input_source_net_id and reference_input_source_net_id."
3671
3695
  });
3672
3696
  }
@@ -3674,7 +3698,7 @@ var simulation_voltage_probe = z162.object({
3674
3698
  } else {
3675
3699
  if (!!data.signal_input_source_port_id === !!data.signal_input_source_net_id) {
3676
3700
  ctx.addIssue({
3677
- code: z162.ZodIssueCode.custom,
3701
+ code: z163.ZodIssueCode.custom,
3678
3702
  message: "A voltage probe must have exactly one of signal_input_source_port_id or signal_input_source_net_id."
3679
3703
  });
3680
3704
  }
@@ -3683,35 +3707,35 @@ var simulation_voltage_probe = z162.object({
3683
3707
  expectTypesMatch(true);
3684
3708
 
3685
3709
  // src/simulation/simulation_unknown_experiment_error.ts
3686
- import { z as z163 } from "zod";
3710
+ import { z as z164 } from "zod";
3687
3711
  var simulation_unknown_experiment_error = base_circuit_json_error.extend({
3688
- type: z163.literal("simulation_unknown_experiment_error"),
3712
+ type: z164.literal("simulation_unknown_experiment_error"),
3689
3713
  simulation_unknown_experiment_error_id: getZodPrefixedIdWithDefault(
3690
3714
  "simulation_unknown_experiment_error"
3691
3715
  ),
3692
- error_type: z163.literal("simulation_unknown_experiment_error").default("simulation_unknown_experiment_error"),
3693
- simulation_experiment_id: z163.string().optional(),
3694
- subcircuit_id: z163.string().optional()
3716
+ error_type: z164.literal("simulation_unknown_experiment_error").default("simulation_unknown_experiment_error"),
3717
+ simulation_experiment_id: z164.string().optional(),
3718
+ subcircuit_id: z164.string().optional()
3695
3719
  }).describe("An unknown error occurred during the simulation experiment.");
3696
3720
  expectTypesMatch(true);
3697
3721
 
3698
3722
  // src/simulation/simulation_op_amp.ts
3699
- import { z as z164 } from "zod";
3700
- var simulation_op_amp = z164.object({
3701
- type: z164.literal("simulation_op_amp"),
3723
+ import { z as z165 } from "zod";
3724
+ var simulation_op_amp = z165.object({
3725
+ type: z165.literal("simulation_op_amp"),
3702
3726
  simulation_op_amp_id: getZodPrefixedIdWithDefault("simulation_op_amp"),
3703
- source_component_id: z164.string().optional(),
3704
- inverting_input_source_port_id: z164.string(),
3705
- non_inverting_input_source_port_id: z164.string(),
3706
- output_source_port_id: z164.string(),
3707
- positive_supply_source_port_id: z164.string(),
3708
- negative_supply_source_port_id: z164.string()
3727
+ source_component_id: z165.string().optional(),
3728
+ inverting_input_source_port_id: z165.string(),
3729
+ non_inverting_input_source_port_id: z165.string(),
3730
+ output_source_port_id: z165.string(),
3731
+ positive_supply_source_port_id: z165.string(),
3732
+ negative_supply_source_port_id: z165.string()
3709
3733
  }).describe("Defines a simple ideal operational amplifier for simulation");
3710
3734
  expectTypesMatch(true);
3711
3735
 
3712
3736
  // src/any_circuit_element.ts
3713
- import { z as z165 } from "zod";
3714
- var any_circuit_element = z165.union([
3737
+ import { z as z166 } from "zod";
3738
+ var any_circuit_element = z166.union([
3715
3739
  source_trace,
3716
3740
  source_port,
3717
3741
  source_component_internal_connection,
@@ -3787,6 +3811,7 @@ var any_circuit_element = z165.union([
3787
3811
  pcb_port_not_matched_error,
3788
3812
  pcb_port_not_connected_error,
3789
3813
  pcb_via_clearance_error,
3814
+ pcb_via_trace_clearance_error,
3790
3815
  pcb_pad_pad_clearance_error,
3791
3816
  pcb_pad_trace_clearance_error,
3792
3817
  pcb_fabrication_note_path,
@@ -3973,6 +3998,7 @@ export {
3973
3998
  pcb_trace_warning,
3974
3999
  pcb_via,
3975
4000
  pcb_via_clearance_error,
4001
+ pcb_via_trace_clearance_error,
3976
4002
  point,
3977
4003
  point3,
3978
4004
  point_with_bulge,