circuit-json 0.0.469 → 0.0.471
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/README.md +1 -0
- package/dist/index.d.mts +87 -2
- package/dist/index.mjs +434 -417
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -1
package/dist/index.mjs
CHANGED
|
@@ -3329,38 +3329,53 @@ var pcb_connector_not_in_accessible_orientation_warning = z154.object({
|
|
|
3329
3329
|
);
|
|
3330
3330
|
expectTypesMatch(true);
|
|
3331
3331
|
|
|
3332
|
-
// src/pcb/
|
|
3332
|
+
// src/pcb/pcb_component_missing_courtyard_warning.ts
|
|
3333
3333
|
import { z as z155 } from "zod";
|
|
3334
|
-
var
|
|
3335
|
-
type: z155.literal("
|
|
3334
|
+
var pcb_component_missing_courtyard_warning = z155.object({
|
|
3335
|
+
type: z155.literal("pcb_component_missing_courtyard_warning"),
|
|
3336
|
+
pcb_component_missing_courtyard_warning_id: getZodPrefixedIdWithDefault(
|
|
3337
|
+
"pcb_component_missing_courtyard_warning"
|
|
3338
|
+
),
|
|
3339
|
+
warning_type: z155.literal("pcb_component_missing_courtyard_warning").default("pcb_component_missing_courtyard_warning"),
|
|
3340
|
+
message: z155.string(),
|
|
3341
|
+
pcb_component_id: z155.string(),
|
|
3342
|
+
source_component_id: z155.string().optional(),
|
|
3343
|
+
subcircuit_id: z155.string().optional()
|
|
3344
|
+
}).describe("Warning emitted when a PCB component has no courtyard geometry");
|
|
3345
|
+
expectTypesMatch(true);
|
|
3346
|
+
|
|
3347
|
+
// src/pcb/supplier_footprint_mismatch_warning.ts
|
|
3348
|
+
import { z as z156 } from "zod";
|
|
3349
|
+
var supplier_footprint_mismatch_warning = z156.object({
|
|
3350
|
+
type: z156.literal("supplier_footprint_mismatch_warning"),
|
|
3336
3351
|
supplier_footprint_mismatch_warning_id: getZodPrefixedIdWithDefault(
|
|
3337
3352
|
"supplier_footprint_mismatch_warning"
|
|
3338
3353
|
),
|
|
3339
|
-
warning_type:
|
|
3340
|
-
message:
|
|
3341
|
-
source_component_id:
|
|
3342
|
-
pcb_component_id:
|
|
3343
|
-
pcb_group_id:
|
|
3344
|
-
subcircuit_id:
|
|
3354
|
+
warning_type: z156.literal("supplier_footprint_mismatch_warning").default("supplier_footprint_mismatch_warning"),
|
|
3355
|
+
message: z156.string(),
|
|
3356
|
+
source_component_id: z156.string(),
|
|
3357
|
+
pcb_component_id: z156.string().optional(),
|
|
3358
|
+
pcb_group_id: z156.string().optional(),
|
|
3359
|
+
subcircuit_id: z156.string().optional(),
|
|
3345
3360
|
supplier_name: supplier_name.optional(),
|
|
3346
|
-
supplier_part_number:
|
|
3347
|
-
supplier_footprint_url:
|
|
3348
|
-
footprint_copper_intersection_over_union:
|
|
3361
|
+
supplier_part_number: z156.string().optional(),
|
|
3362
|
+
supplier_footprint_url: z156.string().optional(),
|
|
3363
|
+
footprint_copper_intersection_over_union: z156.number()
|
|
3349
3364
|
}).describe(
|
|
3350
3365
|
"Warning emitted when a supplier part footprint does not match the expected footprint"
|
|
3351
3366
|
);
|
|
3352
3367
|
expectTypesMatch(true);
|
|
3353
3368
|
|
|
3354
3369
|
// src/pcb/pcb_breakout_point.ts
|
|
3355
|
-
import { z as
|
|
3356
|
-
var pcb_breakout_point =
|
|
3357
|
-
type:
|
|
3370
|
+
import { z as z157 } from "zod";
|
|
3371
|
+
var pcb_breakout_point = z157.object({
|
|
3372
|
+
type: z157.literal("pcb_breakout_point"),
|
|
3358
3373
|
pcb_breakout_point_id: getZodPrefixedIdWithDefault("pcb_breakout_point"),
|
|
3359
|
-
pcb_group_id:
|
|
3360
|
-
subcircuit_id:
|
|
3361
|
-
source_trace_id:
|
|
3362
|
-
source_port_id:
|
|
3363
|
-
source_net_id:
|
|
3374
|
+
pcb_group_id: z157.string(),
|
|
3375
|
+
subcircuit_id: z157.string().optional(),
|
|
3376
|
+
source_trace_id: z157.string().optional(),
|
|
3377
|
+
source_port_id: z157.string().optional(),
|
|
3378
|
+
source_net_id: z157.string().optional(),
|
|
3364
3379
|
x: distance,
|
|
3365
3380
|
y: distance
|
|
3366
3381
|
}).describe(
|
|
@@ -3369,61 +3384,61 @@ var pcb_breakout_point = z156.object({
|
|
|
3369
3384
|
expectTypesMatch(true);
|
|
3370
3385
|
|
|
3371
3386
|
// src/pcb/pcb_ground_plane.ts
|
|
3372
|
-
import { z as
|
|
3373
|
-
var pcb_ground_plane =
|
|
3374
|
-
type:
|
|
3387
|
+
import { z as z158 } from "zod";
|
|
3388
|
+
var pcb_ground_plane = z158.object({
|
|
3389
|
+
type: z158.literal("pcb_ground_plane"),
|
|
3375
3390
|
pcb_ground_plane_id: getZodPrefixedIdWithDefault("pcb_ground_plane"),
|
|
3376
|
-
source_pcb_ground_plane_id:
|
|
3377
|
-
source_net_id:
|
|
3378
|
-
pcb_group_id:
|
|
3379
|
-
subcircuit_id:
|
|
3391
|
+
source_pcb_ground_plane_id: z158.string(),
|
|
3392
|
+
source_net_id: z158.string(),
|
|
3393
|
+
pcb_group_id: z158.string().optional(),
|
|
3394
|
+
subcircuit_id: z158.string().optional()
|
|
3380
3395
|
}).describe("Defines a ground plane on the PCB");
|
|
3381
3396
|
expectTypesMatch(true);
|
|
3382
3397
|
|
|
3383
3398
|
// src/pcb/pcb_ground_plane_region.ts
|
|
3384
|
-
import { z as
|
|
3385
|
-
var pcb_ground_plane_region =
|
|
3386
|
-
type:
|
|
3399
|
+
import { z as z159 } from "zod";
|
|
3400
|
+
var pcb_ground_plane_region = z159.object({
|
|
3401
|
+
type: z159.literal("pcb_ground_plane_region"),
|
|
3387
3402
|
pcb_ground_plane_region_id: getZodPrefixedIdWithDefault(
|
|
3388
3403
|
"pcb_ground_plane_region"
|
|
3389
3404
|
),
|
|
3390
|
-
pcb_ground_plane_id:
|
|
3391
|
-
pcb_group_id:
|
|
3392
|
-
subcircuit_id:
|
|
3405
|
+
pcb_ground_plane_id: z159.string(),
|
|
3406
|
+
pcb_group_id: z159.string().optional(),
|
|
3407
|
+
subcircuit_id: z159.string().optional(),
|
|
3393
3408
|
layer: layer_ref,
|
|
3394
|
-
points:
|
|
3409
|
+
points: z159.array(point)
|
|
3395
3410
|
}).describe("Defines a polygon region of a ground plane");
|
|
3396
3411
|
expectTypesMatch(true);
|
|
3397
3412
|
|
|
3398
3413
|
// src/pcb/pcb_thermal_spoke.ts
|
|
3399
|
-
import { z as
|
|
3400
|
-
var pcb_thermal_spoke =
|
|
3401
|
-
type:
|
|
3414
|
+
import { z as z160 } from "zod";
|
|
3415
|
+
var pcb_thermal_spoke = z160.object({
|
|
3416
|
+
type: z160.literal("pcb_thermal_spoke"),
|
|
3402
3417
|
pcb_thermal_spoke_id: getZodPrefixedIdWithDefault("pcb_thermal_spoke"),
|
|
3403
|
-
pcb_ground_plane_id:
|
|
3404
|
-
shape:
|
|
3405
|
-
spoke_count:
|
|
3418
|
+
pcb_ground_plane_id: z160.string(),
|
|
3419
|
+
shape: z160.string(),
|
|
3420
|
+
spoke_count: z160.number(),
|
|
3406
3421
|
spoke_thickness: distance,
|
|
3407
3422
|
spoke_inner_diameter: distance,
|
|
3408
3423
|
spoke_outer_diameter: distance,
|
|
3409
|
-
pcb_plated_hole_id:
|
|
3410
|
-
subcircuit_id:
|
|
3424
|
+
pcb_plated_hole_id: z160.string().optional(),
|
|
3425
|
+
subcircuit_id: z160.string().optional()
|
|
3411
3426
|
}).describe("Pattern for connecting a ground plane to a plated hole");
|
|
3412
3427
|
expectTypesMatch(true);
|
|
3413
3428
|
|
|
3414
3429
|
// src/pcb/pcb_copper_pour.ts
|
|
3415
|
-
import { z as
|
|
3416
|
-
var pcb_copper_pour_base =
|
|
3417
|
-
type:
|
|
3430
|
+
import { z as z161 } from "zod";
|
|
3431
|
+
var pcb_copper_pour_base = z161.object({
|
|
3432
|
+
type: z161.literal("pcb_copper_pour"),
|
|
3418
3433
|
pcb_copper_pour_id: getZodPrefixedIdWithDefault("pcb_copper_pour"),
|
|
3419
|
-
pcb_group_id:
|
|
3420
|
-
subcircuit_id:
|
|
3434
|
+
pcb_group_id: z161.string().optional(),
|
|
3435
|
+
subcircuit_id: z161.string().optional(),
|
|
3421
3436
|
layer: layer_ref,
|
|
3422
|
-
source_net_id:
|
|
3423
|
-
covered_with_solder_mask:
|
|
3437
|
+
source_net_id: z161.string().optional(),
|
|
3438
|
+
covered_with_solder_mask: z161.boolean().optional().default(true)
|
|
3424
3439
|
});
|
|
3425
3440
|
var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
|
|
3426
|
-
shape:
|
|
3441
|
+
shape: z161.literal("rect"),
|
|
3427
3442
|
center: point,
|
|
3428
3443
|
width: length,
|
|
3429
3444
|
height: length,
|
|
@@ -3431,16 +3446,16 @@ var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
|
|
|
3431
3446
|
});
|
|
3432
3447
|
expectTypesMatch(true);
|
|
3433
3448
|
var pcb_copper_pour_brep = pcb_copper_pour_base.extend({
|
|
3434
|
-
shape:
|
|
3449
|
+
shape: z161.literal("brep"),
|
|
3435
3450
|
brep_shape
|
|
3436
3451
|
});
|
|
3437
3452
|
expectTypesMatch(true);
|
|
3438
3453
|
var pcb_copper_pour_polygon = pcb_copper_pour_base.extend({
|
|
3439
|
-
shape:
|
|
3440
|
-
points:
|
|
3454
|
+
shape: z161.literal("polygon"),
|
|
3455
|
+
points: z161.array(point)
|
|
3441
3456
|
});
|
|
3442
3457
|
expectTypesMatch(true);
|
|
3443
|
-
var pcb_copper_pour =
|
|
3458
|
+
var pcb_copper_pour = z161.discriminatedUnion("shape", [
|
|
3444
3459
|
pcb_copper_pour_rect,
|
|
3445
3460
|
pcb_copper_pour_brep,
|
|
3446
3461
|
pcb_copper_pour_polygon
|
|
@@ -3448,99 +3463,99 @@ var pcb_copper_pour = z160.discriminatedUnion("shape", [
|
|
|
3448
3463
|
expectTypesMatch(true);
|
|
3449
3464
|
|
|
3450
3465
|
// src/pcb/pcb_component_outside_board_error.ts
|
|
3451
|
-
import { z as
|
|
3466
|
+
import { z as z162 } from "zod";
|
|
3452
3467
|
var pcb_component_outside_board_error = base_circuit_json_error.extend({
|
|
3453
|
-
type:
|
|
3468
|
+
type: z162.literal("pcb_component_outside_board_error"),
|
|
3454
3469
|
pcb_component_outside_board_error_id: getZodPrefixedIdWithDefault(
|
|
3455
3470
|
"pcb_component_outside_board_error"
|
|
3456
3471
|
),
|
|
3457
|
-
error_type:
|
|
3458
|
-
pcb_component_id:
|
|
3459
|
-
pcb_board_id:
|
|
3472
|
+
error_type: z162.literal("pcb_component_outside_board_error").default("pcb_component_outside_board_error"),
|
|
3473
|
+
pcb_component_id: z162.string(),
|
|
3474
|
+
pcb_board_id: z162.string(),
|
|
3460
3475
|
component_center: point,
|
|
3461
|
-
component_bounds:
|
|
3462
|
-
min_x:
|
|
3463
|
-
max_x:
|
|
3464
|
-
min_y:
|
|
3465
|
-
max_y:
|
|
3476
|
+
component_bounds: z162.object({
|
|
3477
|
+
min_x: z162.number(),
|
|
3478
|
+
max_x: z162.number(),
|
|
3479
|
+
min_y: z162.number(),
|
|
3480
|
+
max_y: z162.number()
|
|
3466
3481
|
}),
|
|
3467
|
-
subcircuit_id:
|
|
3468
|
-
source_component_id:
|
|
3482
|
+
subcircuit_id: z162.string().optional(),
|
|
3483
|
+
source_component_id: z162.string().optional()
|
|
3469
3484
|
}).describe(
|
|
3470
3485
|
"Error emitted when a PCB component is placed outside the board boundaries"
|
|
3471
3486
|
);
|
|
3472
3487
|
expectTypesMatch(true);
|
|
3473
3488
|
|
|
3474
3489
|
// src/pcb/pcb_component_not_on_board_edge_error.ts
|
|
3475
|
-
import { z as
|
|
3490
|
+
import { z as z163 } from "zod";
|
|
3476
3491
|
var pcb_component_not_on_board_edge_error = base_circuit_json_error.extend({
|
|
3477
|
-
type:
|
|
3492
|
+
type: z163.literal("pcb_component_not_on_board_edge_error"),
|
|
3478
3493
|
pcb_component_not_on_board_edge_error_id: getZodPrefixedIdWithDefault(
|
|
3479
3494
|
"pcb_component_not_on_board_edge_error"
|
|
3480
3495
|
),
|
|
3481
|
-
error_type:
|
|
3482
|
-
pcb_component_id:
|
|
3483
|
-
pcb_board_id:
|
|
3496
|
+
error_type: z163.literal("pcb_component_not_on_board_edge_error").default("pcb_component_not_on_board_edge_error"),
|
|
3497
|
+
pcb_component_id: z163.string(),
|
|
3498
|
+
pcb_board_id: z163.string(),
|
|
3484
3499
|
component_center: point,
|
|
3485
|
-
pad_to_nearest_board_edge_distance:
|
|
3486
|
-
source_component_id:
|
|
3487
|
-
subcircuit_id:
|
|
3500
|
+
pad_to_nearest_board_edge_distance: z163.number(),
|
|
3501
|
+
source_component_id: z163.string().optional(),
|
|
3502
|
+
subcircuit_id: z163.string().optional()
|
|
3488
3503
|
}).describe(
|
|
3489
3504
|
"Error emitted when a component that must be placed on the board edge is centered away from the edge"
|
|
3490
3505
|
);
|
|
3491
3506
|
expectTypesMatch(true);
|
|
3492
3507
|
|
|
3493
3508
|
// src/pcb/pcb_component_invalid_layer_error.ts
|
|
3494
|
-
import { z as
|
|
3509
|
+
import { z as z164 } from "zod";
|
|
3495
3510
|
var pcb_component_invalid_layer_error = base_circuit_json_error.extend({
|
|
3496
|
-
type:
|
|
3511
|
+
type: z164.literal("pcb_component_invalid_layer_error"),
|
|
3497
3512
|
pcb_component_invalid_layer_error_id: getZodPrefixedIdWithDefault(
|
|
3498
3513
|
"pcb_component_invalid_layer_error"
|
|
3499
3514
|
),
|
|
3500
|
-
error_type:
|
|
3501
|
-
pcb_component_id:
|
|
3502
|
-
source_component_id:
|
|
3515
|
+
error_type: z164.literal("pcb_component_invalid_layer_error").default("pcb_component_invalid_layer_error"),
|
|
3516
|
+
pcb_component_id: z164.string().optional(),
|
|
3517
|
+
source_component_id: z164.string(),
|
|
3503
3518
|
layer: layer_ref,
|
|
3504
|
-
subcircuit_id:
|
|
3519
|
+
subcircuit_id: z164.string().optional()
|
|
3505
3520
|
}).describe(
|
|
3506
3521
|
"Error emitted when a component is placed on an invalid layer (components can only be on 'top' or 'bottom' layers)"
|
|
3507
3522
|
);
|
|
3508
3523
|
expectTypesMatch(true);
|
|
3509
3524
|
|
|
3510
3525
|
// src/pcb/pcb_via_clearance_error.ts
|
|
3511
|
-
import { z as
|
|
3526
|
+
import { z as z165 } from "zod";
|
|
3512
3527
|
var pcb_via_clearance_error = base_circuit_json_error.extend({
|
|
3513
|
-
type:
|
|
3528
|
+
type: z165.literal("pcb_via_clearance_error"),
|
|
3514
3529
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
3515
|
-
error_type:
|
|
3516
|
-
pcb_via_ids:
|
|
3530
|
+
error_type: z165.literal("pcb_via_clearance_error").default("pcb_via_clearance_error"),
|
|
3531
|
+
pcb_via_ids: z165.array(z165.string()).min(2),
|
|
3517
3532
|
minimum_clearance: distance.optional(),
|
|
3518
3533
|
actual_clearance: distance.optional(),
|
|
3519
|
-
pcb_center:
|
|
3520
|
-
x:
|
|
3521
|
-
y:
|
|
3534
|
+
pcb_center: z165.object({
|
|
3535
|
+
x: z165.number().optional(),
|
|
3536
|
+
y: z165.number().optional()
|
|
3522
3537
|
}).optional(),
|
|
3523
|
-
subcircuit_id:
|
|
3538
|
+
subcircuit_id: z165.string().optional()
|
|
3524
3539
|
}).describe("Error emitted when vias are closer than the allowed clearance");
|
|
3525
3540
|
expectTypesMatch(true);
|
|
3526
3541
|
|
|
3527
3542
|
// src/pcb/pcb_via_trace_clearance_error.ts
|
|
3528
|
-
import { z as
|
|
3543
|
+
import { z as z166 } from "zod";
|
|
3529
3544
|
var pcb_via_trace_clearance_error = base_circuit_json_error.extend({
|
|
3530
|
-
type:
|
|
3545
|
+
type: z166.literal("pcb_via_trace_clearance_error"),
|
|
3531
3546
|
pcb_via_trace_clearance_error_id: getZodPrefixedIdWithDefault(
|
|
3532
3547
|
"pcb_via_trace_clearance_error"
|
|
3533
3548
|
),
|
|
3534
|
-
error_type:
|
|
3535
|
-
pcb_via_id:
|
|
3536
|
-
pcb_trace_id:
|
|
3549
|
+
error_type: z166.literal("pcb_via_trace_clearance_error").default("pcb_via_trace_clearance_error"),
|
|
3550
|
+
pcb_via_id: z166.string(),
|
|
3551
|
+
pcb_trace_id: z166.string(),
|
|
3537
3552
|
minimum_clearance: distance.optional(),
|
|
3538
3553
|
actual_clearance: distance.optional(),
|
|
3539
|
-
center:
|
|
3540
|
-
x:
|
|
3541
|
-
y:
|
|
3554
|
+
center: z166.object({
|
|
3555
|
+
x: z166.number().optional(),
|
|
3556
|
+
y: z166.number().optional()
|
|
3542
3557
|
}).optional(),
|
|
3543
|
-
subcircuit_id:
|
|
3558
|
+
subcircuit_id: z166.string().optional()
|
|
3544
3559
|
}).describe(
|
|
3545
3560
|
"Error emitted when a via and trace are closer than the allowed clearance"
|
|
3546
3561
|
);
|
|
@@ -3549,41 +3564,41 @@ expectTypesMatch(
|
|
|
3549
3564
|
);
|
|
3550
3565
|
|
|
3551
3566
|
// src/pcb/pcb_pad_pad_clearance_error.ts
|
|
3552
|
-
import { z as
|
|
3567
|
+
import { z as z167 } from "zod";
|
|
3553
3568
|
var pcb_pad_pad_clearance_error = base_circuit_json_error.extend({
|
|
3554
|
-
type:
|
|
3569
|
+
type: z167.literal("pcb_pad_pad_clearance_error"),
|
|
3555
3570
|
pcb_pad_pad_clearance_error_id: getZodPrefixedIdWithDefault(
|
|
3556
3571
|
"pcb_pad_pad_clearance_error"
|
|
3557
3572
|
),
|
|
3558
|
-
error_type:
|
|
3559
|
-
pcb_pad_ids:
|
|
3573
|
+
error_type: z167.literal("pcb_pad_pad_clearance_error").default("pcb_pad_pad_clearance_error"),
|
|
3574
|
+
pcb_pad_ids: z167.array(z167.string()).min(2),
|
|
3560
3575
|
minimum_clearance: distance.optional(),
|
|
3561
3576
|
actual_clearance: distance.optional(),
|
|
3562
|
-
center:
|
|
3563
|
-
x:
|
|
3564
|
-
y:
|
|
3577
|
+
center: z167.object({
|
|
3578
|
+
x: z167.number().optional(),
|
|
3579
|
+
y: z167.number().optional()
|
|
3565
3580
|
}).optional(),
|
|
3566
|
-
subcircuit_id:
|
|
3581
|
+
subcircuit_id: z167.string().optional()
|
|
3567
3582
|
}).describe("Error emitted when pads are closer than the allowed clearance");
|
|
3568
3583
|
expectTypesMatch(true);
|
|
3569
3584
|
|
|
3570
3585
|
// src/pcb/pcb_pad_trace_clearance_error.ts
|
|
3571
|
-
import { z as
|
|
3586
|
+
import { z as z168 } from "zod";
|
|
3572
3587
|
var pcb_pad_trace_clearance_error = base_circuit_json_error.extend({
|
|
3573
|
-
type:
|
|
3588
|
+
type: z168.literal("pcb_pad_trace_clearance_error"),
|
|
3574
3589
|
pcb_pad_trace_clearance_error_id: getZodPrefixedIdWithDefault(
|
|
3575
3590
|
"pcb_pad_trace_clearance_error"
|
|
3576
3591
|
),
|
|
3577
|
-
error_type:
|
|
3578
|
-
pcb_pad_id:
|
|
3579
|
-
pcb_trace_id:
|
|
3592
|
+
error_type: z168.literal("pcb_pad_trace_clearance_error").default("pcb_pad_trace_clearance_error"),
|
|
3593
|
+
pcb_pad_id: z168.string(),
|
|
3594
|
+
pcb_trace_id: z168.string(),
|
|
3580
3595
|
minimum_clearance: distance.optional(),
|
|
3581
3596
|
actual_clearance: distance.optional(),
|
|
3582
|
-
center:
|
|
3583
|
-
x:
|
|
3584
|
-
y:
|
|
3597
|
+
center: z168.object({
|
|
3598
|
+
x: z168.number().optional(),
|
|
3599
|
+
y: z168.number().optional()
|
|
3585
3600
|
}).optional(),
|
|
3586
|
-
subcircuit_id:
|
|
3601
|
+
subcircuit_id: z168.string().optional()
|
|
3587
3602
|
}).describe(
|
|
3588
3603
|
"Error emitted when a pad and trace are closer than allowed clearance"
|
|
3589
3604
|
);
|
|
@@ -3592,89 +3607,89 @@ expectTypesMatch(
|
|
|
3592
3607
|
);
|
|
3593
3608
|
|
|
3594
3609
|
// src/pcb/pcb_courtyard_rect.ts
|
|
3595
|
-
import { z as
|
|
3596
|
-
var pcb_courtyard_rect =
|
|
3597
|
-
type:
|
|
3610
|
+
import { z as z169 } from "zod";
|
|
3611
|
+
var pcb_courtyard_rect = z169.object({
|
|
3612
|
+
type: z169.literal("pcb_courtyard_rect"),
|
|
3598
3613
|
pcb_courtyard_rect_id: getZodPrefixedIdWithDefault("pcb_courtyard_rect"),
|
|
3599
|
-
pcb_component_id:
|
|
3600
|
-
pcb_group_id:
|
|
3601
|
-
subcircuit_id:
|
|
3614
|
+
pcb_component_id: z169.string(),
|
|
3615
|
+
pcb_group_id: z169.string().optional(),
|
|
3616
|
+
subcircuit_id: z169.string().optional(),
|
|
3602
3617
|
center: point,
|
|
3603
3618
|
width: length,
|
|
3604
3619
|
height: length,
|
|
3605
3620
|
layer: visible_layer,
|
|
3606
3621
|
ccw_rotation: rotation.optional(),
|
|
3607
|
-
color:
|
|
3622
|
+
color: z169.string().optional()
|
|
3608
3623
|
}).describe("Defines a courtyard rectangle on the PCB");
|
|
3609
3624
|
expectTypesMatch(true);
|
|
3610
3625
|
|
|
3611
3626
|
// src/pcb/pcb_courtyard_outline.ts
|
|
3612
|
-
import { z as
|
|
3613
|
-
var pcb_courtyard_outline =
|
|
3614
|
-
type:
|
|
3627
|
+
import { z as z170 } from "zod";
|
|
3628
|
+
var pcb_courtyard_outline = z170.object({
|
|
3629
|
+
type: z170.literal("pcb_courtyard_outline"),
|
|
3615
3630
|
pcb_courtyard_outline_id: getZodPrefixedIdWithDefault(
|
|
3616
3631
|
"pcb_courtyard_outline"
|
|
3617
3632
|
),
|
|
3618
|
-
pcb_component_id:
|
|
3619
|
-
pcb_group_id:
|
|
3620
|
-
subcircuit_id:
|
|
3633
|
+
pcb_component_id: z170.string(),
|
|
3634
|
+
pcb_group_id: z170.string().optional(),
|
|
3635
|
+
subcircuit_id: z170.string().optional(),
|
|
3621
3636
|
layer: visible_layer,
|
|
3622
|
-
outline:
|
|
3637
|
+
outline: z170.array(point).min(2)
|
|
3623
3638
|
}).describe("Defines a courtyard outline on the PCB");
|
|
3624
3639
|
expectTypesMatch(true);
|
|
3625
3640
|
|
|
3626
3641
|
// src/pcb/pcb_courtyard_polygon.ts
|
|
3627
|
-
import { z as
|
|
3628
|
-
var pcb_courtyard_polygon =
|
|
3629
|
-
type:
|
|
3642
|
+
import { z as z171 } from "zod";
|
|
3643
|
+
var pcb_courtyard_polygon = z171.object({
|
|
3644
|
+
type: z171.literal("pcb_courtyard_polygon"),
|
|
3630
3645
|
pcb_courtyard_polygon_id: getZodPrefixedIdWithDefault(
|
|
3631
3646
|
"pcb_courtyard_polygon"
|
|
3632
3647
|
),
|
|
3633
|
-
pcb_component_id:
|
|
3634
|
-
pcb_group_id:
|
|
3635
|
-
subcircuit_id:
|
|
3648
|
+
pcb_component_id: z171.string(),
|
|
3649
|
+
pcb_group_id: z171.string().optional(),
|
|
3650
|
+
subcircuit_id: z171.string().optional(),
|
|
3636
3651
|
layer: visible_layer,
|
|
3637
|
-
points:
|
|
3638
|
-
color:
|
|
3652
|
+
points: z171.array(point).min(3),
|
|
3653
|
+
color: z171.string().optional()
|
|
3639
3654
|
}).describe("Defines a courtyard polygon on the PCB");
|
|
3640
3655
|
expectTypesMatch(true);
|
|
3641
3656
|
|
|
3642
3657
|
// src/pcb/pcb_courtyard_circle.ts
|
|
3643
|
-
import { z as
|
|
3644
|
-
var pcb_courtyard_circle =
|
|
3645
|
-
type:
|
|
3658
|
+
import { z as z172 } from "zod";
|
|
3659
|
+
var pcb_courtyard_circle = z172.object({
|
|
3660
|
+
type: z172.literal("pcb_courtyard_circle"),
|
|
3646
3661
|
pcb_courtyard_circle_id: getZodPrefixedIdWithDefault(
|
|
3647
3662
|
"pcb_courtyard_circle"
|
|
3648
3663
|
),
|
|
3649
|
-
pcb_component_id:
|
|
3650
|
-
pcb_group_id:
|
|
3651
|
-
subcircuit_id:
|
|
3664
|
+
pcb_component_id: z172.string(),
|
|
3665
|
+
pcb_group_id: z172.string().optional(),
|
|
3666
|
+
subcircuit_id: z172.string().optional(),
|
|
3652
3667
|
center: point,
|
|
3653
3668
|
radius: length,
|
|
3654
3669
|
layer: visible_layer,
|
|
3655
|
-
color:
|
|
3670
|
+
color: z172.string().optional()
|
|
3656
3671
|
}).describe("Defines a courtyard circle on the PCB");
|
|
3657
3672
|
expectTypesMatch(true);
|
|
3658
3673
|
|
|
3659
3674
|
// src/pcb/pcb_courtyard_pill.ts
|
|
3660
|
-
import { z as
|
|
3661
|
-
var pcb_courtyard_pill =
|
|
3662
|
-
type:
|
|
3675
|
+
import { z as z173 } from "zod";
|
|
3676
|
+
var pcb_courtyard_pill = z173.object({
|
|
3677
|
+
type: z173.literal("pcb_courtyard_pill"),
|
|
3663
3678
|
pcb_courtyard_pill_id: getZodPrefixedIdWithDefault("pcb_courtyard_pill"),
|
|
3664
|
-
pcb_component_id:
|
|
3665
|
-
pcb_group_id:
|
|
3666
|
-
subcircuit_id:
|
|
3679
|
+
pcb_component_id: z173.string(),
|
|
3680
|
+
pcb_group_id: z173.string().optional(),
|
|
3681
|
+
subcircuit_id: z173.string().optional(),
|
|
3667
3682
|
center: point,
|
|
3668
3683
|
width: length,
|
|
3669
3684
|
height: length,
|
|
3670
3685
|
radius: length,
|
|
3671
3686
|
layer: visible_layer,
|
|
3672
|
-
color:
|
|
3687
|
+
color: z173.string().optional()
|
|
3673
3688
|
}).describe("Defines a courtyard pill on the PCB");
|
|
3674
3689
|
expectTypesMatch(true);
|
|
3675
3690
|
|
|
3676
3691
|
// src/cad/cad_component.ts
|
|
3677
|
-
import { z as
|
|
3692
|
+
import { z as z174 } from "zod";
|
|
3678
3693
|
|
|
3679
3694
|
// src/cad/cad_model_conventions.ts
|
|
3680
3695
|
var cad_model_formats = [
|
|
@@ -3705,50 +3720,50 @@ var cadModelDefaultDirectionMap = {
|
|
|
3705
3720
|
};
|
|
3706
3721
|
|
|
3707
3722
|
// src/cad/cad_component.ts
|
|
3708
|
-
var cad_component =
|
|
3709
|
-
type:
|
|
3710
|
-
cad_component_id:
|
|
3711
|
-
pcb_component_id:
|
|
3712
|
-
source_component_id:
|
|
3723
|
+
var cad_component = z174.object({
|
|
3724
|
+
type: z174.literal("cad_component"),
|
|
3725
|
+
cad_component_id: z174.string(),
|
|
3726
|
+
pcb_component_id: z174.string(),
|
|
3727
|
+
source_component_id: z174.string(),
|
|
3713
3728
|
position: point3,
|
|
3714
3729
|
rotation: point3.optional(),
|
|
3715
3730
|
size: point3.optional(),
|
|
3716
3731
|
layer: layer_ref.optional(),
|
|
3717
|
-
subcircuit_id:
|
|
3732
|
+
subcircuit_id: z174.string().optional(),
|
|
3718
3733
|
// These are all ways to generate/load the 3d model
|
|
3719
|
-
footprinter_string:
|
|
3720
|
-
model_obj_url:
|
|
3721
|
-
model_stl_url:
|
|
3722
|
-
model_3mf_url:
|
|
3723
|
-
model_gltf_url:
|
|
3724
|
-
model_glb_url:
|
|
3725
|
-
model_step_url:
|
|
3726
|
-
model_wrl_url:
|
|
3734
|
+
footprinter_string: z174.string().optional(),
|
|
3735
|
+
model_obj_url: z174.string().optional(),
|
|
3736
|
+
model_stl_url: z174.string().optional(),
|
|
3737
|
+
model_3mf_url: z174.string().optional(),
|
|
3738
|
+
model_gltf_url: z174.string().optional(),
|
|
3739
|
+
model_glb_url: z174.string().optional(),
|
|
3740
|
+
model_step_url: z174.string().optional(),
|
|
3741
|
+
model_wrl_url: z174.string().optional(),
|
|
3727
3742
|
model_asset: asset.optional(),
|
|
3728
|
-
model_unit_to_mm_scale_factor:
|
|
3729
|
-
model_board_normal_direction:
|
|
3743
|
+
model_unit_to_mm_scale_factor: z174.number().optional(),
|
|
3744
|
+
model_board_normal_direction: z174.enum(cad_model_axis_directions).optional().describe(
|
|
3730
3745
|
`The direction in the model's coordinate space that is considered "up" or "coming out of the board surface"`
|
|
3731
3746
|
),
|
|
3732
3747
|
model_origin_position: point3.optional(),
|
|
3733
|
-
model_origin_alignment:
|
|
3748
|
+
model_origin_alignment: z174.enum([
|
|
3734
3749
|
"unknown",
|
|
3735
3750
|
"center",
|
|
3736
3751
|
"center_of_component_on_board_surface",
|
|
3737
3752
|
"bottom_center_of_component"
|
|
3738
3753
|
]).optional(),
|
|
3739
|
-
model_object_fit:
|
|
3740
|
-
model_jscad:
|
|
3741
|
-
show_as_translucent_model:
|
|
3742
|
-
show_as_bounding_box:
|
|
3743
|
-
show_hidden_edges:
|
|
3744
|
-
anchor_alignment:
|
|
3754
|
+
model_object_fit: z174.enum(["contain_within_bounds", "fill_bounds"]).optional().default("contain_within_bounds"),
|
|
3755
|
+
model_jscad: z174.any().optional(),
|
|
3756
|
+
show_as_translucent_model: z174.boolean().optional(),
|
|
3757
|
+
show_as_bounding_box: z174.boolean().optional(),
|
|
3758
|
+
show_hidden_edges: z174.boolean().optional(),
|
|
3759
|
+
anchor_alignment: z174.enum(["center", "center_of_component_on_board_surface"]).optional().default("center")
|
|
3745
3760
|
}).describe("Defines a component on the PCB");
|
|
3746
3761
|
expectTypesMatch(true);
|
|
3747
3762
|
|
|
3748
3763
|
// src/simulation/simulation_voltage_source.ts
|
|
3749
|
-
import { z as
|
|
3750
|
-
var wave_shape =
|
|
3751
|
-
var percentage =
|
|
3764
|
+
import { z as z175 } from "zod";
|
|
3765
|
+
var wave_shape = z175.enum(["sinewave", "square", "triangle", "sawtooth"]);
|
|
3766
|
+
var percentage = z175.union([z175.string(), z175.number()]).transform((val) => {
|
|
3752
3767
|
if (typeof val === "string") {
|
|
3753
3768
|
if (val.endsWith("%")) {
|
|
3754
3769
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -3757,32 +3772,32 @@ var percentage = z174.union([z174.string(), z174.number()]).transform((val) => {
|
|
|
3757
3772
|
}
|
|
3758
3773
|
return val;
|
|
3759
3774
|
}).pipe(
|
|
3760
|
-
|
|
3775
|
+
z175.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
3761
3776
|
);
|
|
3762
|
-
var simulation_dc_voltage_source =
|
|
3763
|
-
type:
|
|
3777
|
+
var simulation_dc_voltage_source = z175.object({
|
|
3778
|
+
type: z175.literal("simulation_voltage_source"),
|
|
3764
3779
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
3765
3780
|
"simulation_voltage_source"
|
|
3766
3781
|
),
|
|
3767
|
-
is_dc_source:
|
|
3768
|
-
positive_source_port_id:
|
|
3769
|
-
negative_source_port_id:
|
|
3770
|
-
positive_source_net_id:
|
|
3771
|
-
negative_source_net_id:
|
|
3782
|
+
is_dc_source: z175.literal(true).optional().default(true),
|
|
3783
|
+
positive_source_port_id: z175.string().optional(),
|
|
3784
|
+
negative_source_port_id: z175.string().optional(),
|
|
3785
|
+
positive_source_net_id: z175.string().optional(),
|
|
3786
|
+
negative_source_net_id: z175.string().optional(),
|
|
3772
3787
|
voltage,
|
|
3773
3788
|
ac_magnitude: voltage.optional(),
|
|
3774
3789
|
ac_phase: rotation.optional()
|
|
3775
3790
|
}).describe("Defines a DC voltage source for simulation");
|
|
3776
|
-
var simulation_ac_voltage_source =
|
|
3777
|
-
type:
|
|
3791
|
+
var simulation_ac_voltage_source = z175.object({
|
|
3792
|
+
type: z175.literal("simulation_voltage_source"),
|
|
3778
3793
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
3779
3794
|
"simulation_voltage_source"
|
|
3780
3795
|
),
|
|
3781
|
-
is_dc_source:
|
|
3782
|
-
terminal1_source_port_id:
|
|
3783
|
-
terminal2_source_port_id:
|
|
3784
|
-
terminal1_source_net_id:
|
|
3785
|
-
terminal2_source_net_id:
|
|
3796
|
+
is_dc_source: z175.literal(false),
|
|
3797
|
+
terminal1_source_port_id: z175.string().optional(),
|
|
3798
|
+
terminal2_source_port_id: z175.string().optional(),
|
|
3799
|
+
terminal1_source_net_id: z175.string().optional(),
|
|
3800
|
+
terminal2_source_net_id: z175.string().optional(),
|
|
3786
3801
|
voltage: voltage.optional(),
|
|
3787
3802
|
frequency: frequency.optional(),
|
|
3788
3803
|
peak_to_peak_voltage: voltage.optional(),
|
|
@@ -3797,14 +3812,14 @@ var simulation_ac_voltage_source = z174.object({
|
|
|
3797
3812
|
ac_magnitude: voltage.optional(),
|
|
3798
3813
|
ac_phase: rotation.optional()
|
|
3799
3814
|
}).describe("Defines an AC voltage source for simulation");
|
|
3800
|
-
var simulation_voltage_source =
|
|
3815
|
+
var simulation_voltage_source = z175.union([simulation_dc_voltage_source, simulation_ac_voltage_source]).describe("Defines a voltage source for simulation");
|
|
3801
3816
|
expectTypesMatch(true);
|
|
3802
3817
|
expectTypesMatch(true);
|
|
3803
3818
|
expectTypesMatch(true);
|
|
3804
3819
|
|
|
3805
3820
|
// src/simulation/simulation_current_source.ts
|
|
3806
|
-
import { z as
|
|
3807
|
-
var percentage2 =
|
|
3821
|
+
import { z as z176 } from "zod";
|
|
3822
|
+
var percentage2 = z176.union([z176.string(), z176.number()]).transform((val) => {
|
|
3808
3823
|
if (typeof val === "string") {
|
|
3809
3824
|
if (val.endsWith("%")) {
|
|
3810
3825
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -3813,32 +3828,32 @@ var percentage2 = z175.union([z175.string(), z175.number()]).transform((val) =>
|
|
|
3813
3828
|
}
|
|
3814
3829
|
return val;
|
|
3815
3830
|
}).pipe(
|
|
3816
|
-
|
|
3831
|
+
z176.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
3817
3832
|
);
|
|
3818
|
-
var simulation_dc_current_source =
|
|
3819
|
-
type:
|
|
3833
|
+
var simulation_dc_current_source = z176.object({
|
|
3834
|
+
type: z176.literal("simulation_current_source"),
|
|
3820
3835
|
simulation_current_source_id: getZodPrefixedIdWithDefault(
|
|
3821
3836
|
"simulation_current_source"
|
|
3822
3837
|
),
|
|
3823
|
-
is_dc_source:
|
|
3824
|
-
positive_source_port_id:
|
|
3825
|
-
negative_source_port_id:
|
|
3826
|
-
positive_source_net_id:
|
|
3827
|
-
negative_source_net_id:
|
|
3838
|
+
is_dc_source: z176.literal(true).optional().default(true),
|
|
3839
|
+
positive_source_port_id: z176.string().optional(),
|
|
3840
|
+
negative_source_port_id: z176.string().optional(),
|
|
3841
|
+
positive_source_net_id: z176.string().optional(),
|
|
3842
|
+
negative_source_net_id: z176.string().optional(),
|
|
3828
3843
|
current,
|
|
3829
3844
|
ac_magnitude: current.optional(),
|
|
3830
3845
|
ac_phase: rotation.optional()
|
|
3831
3846
|
}).describe("Defines a DC current source for simulation");
|
|
3832
|
-
var simulation_ac_current_source =
|
|
3833
|
-
type:
|
|
3847
|
+
var simulation_ac_current_source = z176.object({
|
|
3848
|
+
type: z176.literal("simulation_current_source"),
|
|
3834
3849
|
simulation_current_source_id: getZodPrefixedIdWithDefault(
|
|
3835
3850
|
"simulation_current_source"
|
|
3836
3851
|
),
|
|
3837
|
-
is_dc_source:
|
|
3838
|
-
terminal1_source_port_id:
|
|
3839
|
-
terminal2_source_port_id:
|
|
3840
|
-
terminal1_source_net_id:
|
|
3841
|
-
terminal2_source_net_id:
|
|
3852
|
+
is_dc_source: z176.literal(false),
|
|
3853
|
+
terminal1_source_port_id: z176.string().optional(),
|
|
3854
|
+
terminal2_source_port_id: z176.string().optional(),
|
|
3855
|
+
terminal1_source_net_id: z176.string().optional(),
|
|
3856
|
+
terminal2_source_net_id: z176.string().optional(),
|
|
3842
3857
|
current: current.optional(),
|
|
3843
3858
|
frequency: frequency.optional(),
|
|
3844
3859
|
peak_to_peak_current: current.optional(),
|
|
@@ -3848,58 +3863,58 @@ var simulation_ac_current_source = z175.object({
|
|
|
3848
3863
|
ac_magnitude: current.optional(),
|
|
3849
3864
|
ac_phase: rotation.optional()
|
|
3850
3865
|
}).describe("Defines an AC current source for simulation");
|
|
3851
|
-
var simulation_current_source =
|
|
3866
|
+
var simulation_current_source = z176.union([simulation_dc_current_source, simulation_ac_current_source]).describe("Defines a current source for simulation");
|
|
3852
3867
|
expectTypesMatch(true);
|
|
3853
3868
|
expectTypesMatch(true);
|
|
3854
3869
|
expectTypesMatch(true);
|
|
3855
3870
|
|
|
3856
3871
|
// src/simulation/simulation_experiment.ts
|
|
3857
|
-
import { z as
|
|
3872
|
+
import { z as z178 } from "zod";
|
|
3858
3873
|
|
|
3859
3874
|
// src/simulation/simulation_units.ts
|
|
3860
|
-
import { z as
|
|
3861
|
-
var simulation_dc_sweep_unit =
|
|
3875
|
+
import { z as z177 } from "zod";
|
|
3876
|
+
var simulation_dc_sweep_unit = z177.custom(
|
|
3862
3877
|
(dcSweepUnit) => dcSweepUnit === "V" || dcSweepUnit === "A"
|
|
3863
3878
|
);
|
|
3864
|
-
var simulation_parameter_unit =
|
|
3879
|
+
var simulation_parameter_unit = z177.custom(
|
|
3865
3880
|
(parameterUnit) => parameterUnit === "\u03A9" || parameterUnit === "F" || parameterUnit === "H" || parameterUnit === "V" || parameterUnit === "A"
|
|
3866
3881
|
);
|
|
3867
3882
|
|
|
3868
3883
|
// src/simulation/simulation_experiment.ts
|
|
3869
|
-
var experiment_type =
|
|
3870
|
-
|
|
3871
|
-
|
|
3872
|
-
|
|
3873
|
-
|
|
3884
|
+
var experiment_type = z178.union([
|
|
3885
|
+
z178.literal("spice_dc_sweep"),
|
|
3886
|
+
z178.literal("spice_dc_operating_point"),
|
|
3887
|
+
z178.literal("spice_transient_analysis"),
|
|
3888
|
+
z178.literal("spice_ac_analysis")
|
|
3874
3889
|
]);
|
|
3875
|
-
var spice_simulation_options =
|
|
3876
|
-
method:
|
|
3877
|
-
reltol:
|
|
3878
|
-
abstol:
|
|
3879
|
-
vntol:
|
|
3890
|
+
var spice_simulation_options = z178.object({
|
|
3891
|
+
method: z178.enum(["trap", "gear"]).optional(),
|
|
3892
|
+
reltol: z178.union([z178.number(), z178.string()]).optional(),
|
|
3893
|
+
abstol: z178.union([z178.number(), z178.string()]).optional(),
|
|
3894
|
+
vntol: z178.union([z178.number(), z178.string()]).optional()
|
|
3880
3895
|
}).describe("SPICE solver options for a simulation experiment");
|
|
3881
|
-
var simulation_experiment =
|
|
3882
|
-
type:
|
|
3896
|
+
var simulation_experiment = z178.object({
|
|
3897
|
+
type: z178.literal("simulation_experiment"),
|
|
3883
3898
|
simulation_experiment_id: getZodPrefixedIdWithDefault(
|
|
3884
3899
|
"simulation_experiment"
|
|
3885
3900
|
),
|
|
3886
|
-
name:
|
|
3901
|
+
name: z178.string(),
|
|
3887
3902
|
experiment_type,
|
|
3888
3903
|
time_per_step: duration_ms.optional(),
|
|
3889
3904
|
start_time_ms: ms.optional(),
|
|
3890
3905
|
end_time_ms: ms.optional(),
|
|
3891
3906
|
spice_options: spice_simulation_options.optional(),
|
|
3892
|
-
dc_sweep_voltage_source_id:
|
|
3893
|
-
dc_sweep_current_source_id:
|
|
3894
|
-
dc_sweep_start:
|
|
3895
|
-
dc_sweep_stop:
|
|
3896
|
-
dc_sweep_step:
|
|
3907
|
+
dc_sweep_voltage_source_id: z178.string().optional(),
|
|
3908
|
+
dc_sweep_current_source_id: z178.string().optional(),
|
|
3909
|
+
dc_sweep_start: z178.number().optional(),
|
|
3910
|
+
dc_sweep_stop: z178.number().optional(),
|
|
3911
|
+
dc_sweep_step: z178.number().refine((dcSweepStep) => dcSweepStep !== 0).optional(),
|
|
3897
3912
|
dc_sweep_unit: simulation_dc_sweep_unit.optional(),
|
|
3898
|
-
ac_sweep_type:
|
|
3899
|
-
ac_samples_per_interval:
|
|
3900
|
-
ac_sample_count:
|
|
3901
|
-
ac_start_frequency_hz:
|
|
3902
|
-
ac_stop_frequency_hz:
|
|
3913
|
+
ac_sweep_type: z178.enum(["linear", "decade", "octave"]).optional(),
|
|
3914
|
+
ac_samples_per_interval: z178.number().int().positive().optional(),
|
|
3915
|
+
ac_sample_count: z178.number().int().positive().optional(),
|
|
3916
|
+
ac_start_frequency_hz: z178.number().positive().optional(),
|
|
3917
|
+
ac_stop_frequency_hz: z178.number().positive().optional()
|
|
3903
3918
|
}).superRefine((experiment, context) => {
|
|
3904
3919
|
if (experiment.experiment_type === "spice_dc_sweep") {
|
|
3905
3920
|
const requiredFields = [
|
|
@@ -3911,7 +3926,7 @@ var simulation_experiment = z177.object({
|
|
|
3911
3926
|
for (const field of requiredFields) {
|
|
3912
3927
|
if (experiment[field] === void 0) {
|
|
3913
3928
|
context.addIssue({
|
|
3914
|
-
code:
|
|
3929
|
+
code: z178.ZodIssueCode.custom,
|
|
3915
3930
|
path: [field],
|
|
3916
3931
|
message: `${field} is required for a DC sweep`
|
|
3917
3932
|
});
|
|
@@ -3921,7 +3936,7 @@ var simulation_experiment = z177.object({
|
|
|
3921
3936
|
const hasCurrentSource = experiment.dc_sweep_current_source_id !== void 0;
|
|
3922
3937
|
if (hasVoltageSource === hasCurrentSource) {
|
|
3923
3938
|
context.addIssue({
|
|
3924
|
-
code:
|
|
3939
|
+
code: z178.ZodIssueCode.custom,
|
|
3925
3940
|
path: ["dc_sweep_voltage_source_id"],
|
|
3926
3941
|
message: "Exactly one DC sweep voltage or current source ID is required"
|
|
3927
3942
|
});
|
|
@@ -3930,35 +3945,35 @@ var simulation_experiment = z177.object({
|
|
|
3930
3945
|
if (experiment.experiment_type === "spice_ac_analysis") {
|
|
3931
3946
|
if (experiment.ac_sweep_type === void 0) {
|
|
3932
3947
|
context.addIssue({
|
|
3933
|
-
code:
|
|
3948
|
+
code: z178.ZodIssueCode.custom,
|
|
3934
3949
|
path: ["ac_sweep_type"],
|
|
3935
3950
|
message: "ac_sweep_type is required for an AC analysis"
|
|
3936
3951
|
});
|
|
3937
3952
|
}
|
|
3938
3953
|
if (experiment.ac_start_frequency_hz === void 0) {
|
|
3939
3954
|
context.addIssue({
|
|
3940
|
-
code:
|
|
3955
|
+
code: z178.ZodIssueCode.custom,
|
|
3941
3956
|
path: ["ac_start_frequency_hz"],
|
|
3942
3957
|
message: "ac_start_frequency_hz is required for an AC analysis"
|
|
3943
3958
|
});
|
|
3944
3959
|
}
|
|
3945
3960
|
if (experiment.ac_stop_frequency_hz === void 0) {
|
|
3946
3961
|
context.addIssue({
|
|
3947
|
-
code:
|
|
3962
|
+
code: z178.ZodIssueCode.custom,
|
|
3948
3963
|
path: ["ac_stop_frequency_hz"],
|
|
3949
3964
|
message: "ac_stop_frequency_hz is required for an AC analysis"
|
|
3950
3965
|
});
|
|
3951
3966
|
}
|
|
3952
3967
|
if (experiment.ac_sweep_type === "linear" && experiment.ac_sample_count === void 0) {
|
|
3953
3968
|
context.addIssue({
|
|
3954
|
-
code:
|
|
3969
|
+
code: z178.ZodIssueCode.custom,
|
|
3955
3970
|
path: ["ac_sample_count"],
|
|
3956
3971
|
message: "ac_sample_count is required for a linear AC analysis"
|
|
3957
3972
|
});
|
|
3958
3973
|
}
|
|
3959
3974
|
if ((experiment.ac_sweep_type === "decade" || experiment.ac_sweep_type === "octave") && experiment.ac_samples_per_interval === void 0) {
|
|
3960
3975
|
context.addIssue({
|
|
3961
|
-
code:
|
|
3976
|
+
code: z178.ZodIssueCode.custom,
|
|
3962
3977
|
path: ["ac_samples_per_interval"],
|
|
3963
3978
|
message: "ac_samples_per_interval is required for decade and octave AC analyses"
|
|
3964
3979
|
});
|
|
@@ -3968,87 +3983,87 @@ var simulation_experiment = z177.object({
|
|
|
3968
3983
|
expectTypesMatch(true);
|
|
3969
3984
|
|
|
3970
3985
|
// src/simulation/simulation_transient_voltage_graph.ts
|
|
3971
|
-
import { z as
|
|
3986
|
+
import { z as z180 } from "zod";
|
|
3972
3987
|
|
|
3973
3988
|
// src/simulation/simulation_parameter_sweep_coordinate.ts
|
|
3974
|
-
import { z as
|
|
3975
|
-
var simulation_parameter_sweep_coordinate =
|
|
3976
|
-
simulation_parameter_sweep_id:
|
|
3977
|
-
sweep_index:
|
|
3978
|
-
parameter_value:
|
|
3989
|
+
import { z as z179 } from "zod";
|
|
3990
|
+
var simulation_parameter_sweep_coordinate = z179.object({
|
|
3991
|
+
simulation_parameter_sweep_id: z179.string(),
|
|
3992
|
+
sweep_index: z179.number().int().nonnegative(),
|
|
3993
|
+
parameter_value: z179.number(),
|
|
3979
3994
|
parameter_unit: simulation_parameter_unit
|
|
3980
3995
|
});
|
|
3981
3996
|
expectTypesMatch(true);
|
|
3982
3997
|
|
|
3983
3998
|
// src/simulation/simulation_transient_voltage_graph.ts
|
|
3984
|
-
var simulation_transient_voltage_graph =
|
|
3985
|
-
type:
|
|
3999
|
+
var simulation_transient_voltage_graph = z180.object({
|
|
4000
|
+
type: z180.literal("simulation_transient_voltage_graph"),
|
|
3986
4001
|
simulation_transient_voltage_graph_id: getZodPrefixedIdWithDefault(
|
|
3987
4002
|
"simulation_transient_voltage_graph"
|
|
3988
4003
|
),
|
|
3989
|
-
simulation_experiment_id:
|
|
4004
|
+
simulation_experiment_id: z180.string(),
|
|
3990
4005
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
3991
|
-
timestamps_ms:
|
|
3992
|
-
voltage_levels:
|
|
3993
|
-
source_component_id:
|
|
3994
|
-
subcircuit_connectivity_map_key:
|
|
4006
|
+
timestamps_ms: z180.array(z180.number()).optional(),
|
|
4007
|
+
voltage_levels: z180.array(z180.number()),
|
|
4008
|
+
source_component_id: z180.string().optional(),
|
|
4009
|
+
subcircuit_connectivity_map_key: z180.string().optional(),
|
|
3995
4010
|
time_per_step: duration_ms,
|
|
3996
4011
|
start_time_ms: ms,
|
|
3997
4012
|
end_time_ms: ms,
|
|
3998
|
-
name:
|
|
3999
|
-
color:
|
|
4013
|
+
name: z180.string().optional(),
|
|
4014
|
+
color: z180.string().optional()
|
|
4000
4015
|
}).describe("Stores voltage measurements over time for a simulation");
|
|
4001
4016
|
expectTypesMatch(true);
|
|
4002
4017
|
|
|
4003
4018
|
// src/simulation/simulation_transient_current_graph.ts
|
|
4004
|
-
import { z as
|
|
4005
|
-
var simulation_transient_current_graph =
|
|
4006
|
-
type:
|
|
4019
|
+
import { z as z181 } from "zod";
|
|
4020
|
+
var simulation_transient_current_graph = z181.object({
|
|
4021
|
+
type: z181.literal("simulation_transient_current_graph"),
|
|
4007
4022
|
simulation_transient_current_graph_id: getZodPrefixedIdWithDefault(
|
|
4008
4023
|
"simulation_transient_current_graph"
|
|
4009
4024
|
),
|
|
4010
|
-
simulation_experiment_id:
|
|
4025
|
+
simulation_experiment_id: z181.string(),
|
|
4011
4026
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4012
|
-
timestamps_ms:
|
|
4013
|
-
current_levels:
|
|
4014
|
-
source_component_id:
|
|
4015
|
-
subcircuit_connectivity_map_key:
|
|
4027
|
+
timestamps_ms: z181.array(z181.number()).optional(),
|
|
4028
|
+
current_levels: z181.array(z181.number()),
|
|
4029
|
+
source_component_id: z181.string().optional(),
|
|
4030
|
+
subcircuit_connectivity_map_key: z181.string().optional(),
|
|
4016
4031
|
time_per_step: duration_ms,
|
|
4017
4032
|
start_time_ms: ms,
|
|
4018
4033
|
end_time_ms: ms,
|
|
4019
|
-
name:
|
|
4020
|
-
color:
|
|
4034
|
+
name: z181.string().optional(),
|
|
4035
|
+
color: z181.string().optional()
|
|
4021
4036
|
}).describe("Stores current measurements over time for a simulation");
|
|
4022
4037
|
expectTypesMatch(true);
|
|
4023
4038
|
|
|
4024
4039
|
// src/simulation/simulation_switch.ts
|
|
4025
|
-
import { z as
|
|
4026
|
-
var simulation_switch =
|
|
4027
|
-
type:
|
|
4040
|
+
import { z as z182 } from "zod";
|
|
4041
|
+
var simulation_switch = z182.object({
|
|
4042
|
+
type: z182.literal("simulation_switch"),
|
|
4028
4043
|
simulation_switch_id: getZodPrefixedIdWithDefault("simulation_switch"),
|
|
4029
|
-
source_component_id:
|
|
4044
|
+
source_component_id: z182.string().optional(),
|
|
4030
4045
|
closes_at: ms.optional(),
|
|
4031
4046
|
opens_at: ms.optional(),
|
|
4032
|
-
starts_closed:
|
|
4047
|
+
starts_closed: z182.boolean().optional(),
|
|
4033
4048
|
switching_frequency: frequency.optional()
|
|
4034
4049
|
}).describe("Defines a switch for simulation timing control");
|
|
4035
4050
|
expectTypesMatch(true);
|
|
4036
4051
|
|
|
4037
4052
|
// src/simulation/simulation_voltage_probe.ts
|
|
4038
|
-
import { z as
|
|
4039
|
-
var simulation_voltage_probe =
|
|
4040
|
-
type:
|
|
4053
|
+
import { z as z183 } from "zod";
|
|
4054
|
+
var simulation_voltage_probe = z183.object({
|
|
4055
|
+
type: z183.literal("simulation_voltage_probe"),
|
|
4041
4056
|
simulation_voltage_probe_id: getZodPrefixedIdWithDefault(
|
|
4042
4057
|
"simulation_voltage_probe"
|
|
4043
4058
|
),
|
|
4044
|
-
source_component_id:
|
|
4045
|
-
name:
|
|
4046
|
-
signal_input_source_port_id:
|
|
4047
|
-
signal_input_source_net_id:
|
|
4048
|
-
reference_input_source_port_id:
|
|
4049
|
-
reference_input_source_net_id:
|
|
4050
|
-
subcircuit_id:
|
|
4051
|
-
color:
|
|
4059
|
+
source_component_id: z183.string().optional(),
|
|
4060
|
+
name: z183.string().optional(),
|
|
4061
|
+
signal_input_source_port_id: z183.string().optional(),
|
|
4062
|
+
signal_input_source_net_id: z183.string().optional(),
|
|
4063
|
+
reference_input_source_port_id: z183.string().optional(),
|
|
4064
|
+
reference_input_source_net_id: z183.string().optional(),
|
|
4065
|
+
subcircuit_id: z183.string().optional(),
|
|
4066
|
+
color: z183.string().optional()
|
|
4052
4067
|
}).describe(
|
|
4053
4068
|
"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."
|
|
4054
4069
|
).superRefine((data, ctx) => {
|
|
@@ -4058,20 +4073,20 @@ var simulation_voltage_probe = z182.object({
|
|
|
4058
4073
|
const has_nets = !!data.signal_input_source_net_id || !!data.reference_input_source_net_id;
|
|
4059
4074
|
if (has_ports && has_nets) {
|
|
4060
4075
|
ctx.addIssue({
|
|
4061
|
-
code:
|
|
4076
|
+
code: z183.ZodIssueCode.custom,
|
|
4062
4077
|
message: "Cannot mix port and net connections in a differential probe."
|
|
4063
4078
|
});
|
|
4064
4079
|
} else if (has_ports) {
|
|
4065
4080
|
if (!data.signal_input_source_port_id || !data.reference_input_source_port_id) {
|
|
4066
4081
|
ctx.addIssue({
|
|
4067
|
-
code:
|
|
4082
|
+
code: z183.ZodIssueCode.custom,
|
|
4068
4083
|
message: "Differential port probe requires both signal_input_source_port_id and reference_input_source_port_id."
|
|
4069
4084
|
});
|
|
4070
4085
|
}
|
|
4071
4086
|
} else if (has_nets) {
|
|
4072
4087
|
if (!data.signal_input_source_net_id || !data.reference_input_source_net_id) {
|
|
4073
4088
|
ctx.addIssue({
|
|
4074
|
-
code:
|
|
4089
|
+
code: z183.ZodIssueCode.custom,
|
|
4075
4090
|
message: "Differential net probe requires both signal_input_source_net_id and reference_input_source_net_id."
|
|
4076
4091
|
});
|
|
4077
4092
|
}
|
|
@@ -4079,7 +4094,7 @@ var simulation_voltage_probe = z182.object({
|
|
|
4079
4094
|
} else {
|
|
4080
4095
|
if (!!data.signal_input_source_port_id === !!data.signal_input_source_net_id) {
|
|
4081
4096
|
ctx.addIssue({
|
|
4082
|
-
code:
|
|
4097
|
+
code: z183.ZodIssueCode.custom,
|
|
4083
4098
|
message: "A voltage probe must have exactly one of signal_input_source_port_id or signal_input_source_net_id."
|
|
4084
4099
|
});
|
|
4085
4100
|
}
|
|
@@ -4088,20 +4103,20 @@ var simulation_voltage_probe = z182.object({
|
|
|
4088
4103
|
expectTypesMatch(true);
|
|
4089
4104
|
|
|
4090
4105
|
// src/simulation/simulation_current_probe.ts
|
|
4091
|
-
import { z as
|
|
4092
|
-
var simulation_current_probe =
|
|
4093
|
-
type:
|
|
4106
|
+
import { z as z184 } from "zod";
|
|
4107
|
+
var simulation_current_probe = z184.object({
|
|
4108
|
+
type: z184.literal("simulation_current_probe"),
|
|
4094
4109
|
simulation_current_probe_id: getZodPrefixedIdWithDefault(
|
|
4095
4110
|
"simulation_current_probe"
|
|
4096
4111
|
),
|
|
4097
|
-
source_component_id:
|
|
4098
|
-
name:
|
|
4099
|
-
positive_source_port_id:
|
|
4100
|
-
negative_source_port_id:
|
|
4101
|
-
positive_source_net_id:
|
|
4102
|
-
negative_source_net_id:
|
|
4103
|
-
subcircuit_id:
|
|
4104
|
-
color:
|
|
4112
|
+
source_component_id: z184.string().optional(),
|
|
4113
|
+
name: z184.string().optional(),
|
|
4114
|
+
positive_source_port_id: z184.string().optional(),
|
|
4115
|
+
negative_source_port_id: z184.string().optional(),
|
|
4116
|
+
positive_source_net_id: z184.string().optional(),
|
|
4117
|
+
negative_source_net_id: z184.string().optional(),
|
|
4118
|
+
subcircuit_id: z184.string().optional(),
|
|
4119
|
+
color: z184.string().optional()
|
|
4105
4120
|
}).describe(
|
|
4106
4121
|
"Defines a current probe for simulation. It measures current flowing from the positive endpoint to the negative endpoint."
|
|
4107
4122
|
).superRefine((data, ctx) => {
|
|
@@ -4113,7 +4128,7 @@ var simulation_current_probe = z183.object({
|
|
|
4113
4128
|
const hasNets = hasPositiveNet || hasNegativeNet;
|
|
4114
4129
|
if (hasPorts && hasNets) {
|
|
4115
4130
|
ctx.addIssue({
|
|
4116
|
-
code:
|
|
4131
|
+
code: z184.ZodIssueCode.custom,
|
|
4117
4132
|
message: "Cannot mix port and net connections in a current probe."
|
|
4118
4133
|
});
|
|
4119
4134
|
return;
|
|
@@ -4121,7 +4136,7 @@ var simulation_current_probe = z183.object({
|
|
|
4121
4136
|
if (hasPorts) {
|
|
4122
4137
|
if (!hasPositivePort || !hasNegativePort) {
|
|
4123
4138
|
ctx.addIssue({
|
|
4124
|
-
code:
|
|
4139
|
+
code: z184.ZodIssueCode.custom,
|
|
4125
4140
|
message: "Current probe using source ports requires both positive_source_port_id and negative_source_port_id."
|
|
4126
4141
|
});
|
|
4127
4142
|
}
|
|
@@ -4130,71 +4145,71 @@ var simulation_current_probe = z183.object({
|
|
|
4130
4145
|
if (hasNets) {
|
|
4131
4146
|
if (!hasPositiveNet || !hasNegativeNet) {
|
|
4132
4147
|
ctx.addIssue({
|
|
4133
|
-
code:
|
|
4148
|
+
code: z184.ZodIssueCode.custom,
|
|
4134
4149
|
message: "Current probe using source nets requires both positive_source_net_id and negative_source_net_id."
|
|
4135
4150
|
});
|
|
4136
4151
|
}
|
|
4137
4152
|
return;
|
|
4138
4153
|
}
|
|
4139
4154
|
ctx.addIssue({
|
|
4140
|
-
code:
|
|
4155
|
+
code: z184.ZodIssueCode.custom,
|
|
4141
4156
|
message: "A current probe must have either positive/negative source port ids or positive/negative source net ids."
|
|
4142
4157
|
});
|
|
4143
4158
|
});
|
|
4144
4159
|
expectTypesMatch(true);
|
|
4145
4160
|
|
|
4146
4161
|
// src/simulation/simulation_unknown_experiment_error.ts
|
|
4147
|
-
import { z as
|
|
4162
|
+
import { z as z185 } from "zod";
|
|
4148
4163
|
var simulation_unknown_experiment_error = base_circuit_json_error.extend({
|
|
4149
|
-
type:
|
|
4164
|
+
type: z185.literal("simulation_unknown_experiment_error"),
|
|
4150
4165
|
simulation_unknown_experiment_error_id: getZodPrefixedIdWithDefault(
|
|
4151
4166
|
"simulation_unknown_experiment_error"
|
|
4152
4167
|
),
|
|
4153
|
-
error_type:
|
|
4154
|
-
simulation_experiment_id:
|
|
4155
|
-
subcircuit_id:
|
|
4168
|
+
error_type: z185.literal("simulation_unknown_experiment_error").default("simulation_unknown_experiment_error"),
|
|
4169
|
+
simulation_experiment_id: z185.string().optional(),
|
|
4170
|
+
subcircuit_id: z185.string().optional()
|
|
4156
4171
|
}).describe("An unknown error occurred during the simulation experiment.");
|
|
4157
4172
|
expectTypesMatch(true);
|
|
4158
4173
|
|
|
4159
4174
|
// src/simulation/simulation_parameter_sweep.ts
|
|
4160
|
-
import { z as
|
|
4161
|
-
var simulation_parameter_type =
|
|
4175
|
+
import { z as z186 } from "zod";
|
|
4176
|
+
var simulation_parameter_type = z186.enum([
|
|
4162
4177
|
"resistance",
|
|
4163
4178
|
"capacitance",
|
|
4164
4179
|
"inductance",
|
|
4165
4180
|
"voltage",
|
|
4166
4181
|
"current"
|
|
4167
4182
|
]);
|
|
4168
|
-
var simulation_parameter_sweep_base =
|
|
4169
|
-
type:
|
|
4183
|
+
var simulation_parameter_sweep_base = z186.object({
|
|
4184
|
+
type: z186.literal("simulation_parameter_sweep"),
|
|
4170
4185
|
simulation_parameter_sweep_id: getZodPrefixedIdWithDefault(
|
|
4171
4186
|
"simulation_parameter_sweep"
|
|
4172
4187
|
),
|
|
4173
|
-
simulation_experiment_id:
|
|
4174
|
-
name:
|
|
4175
|
-
parameter_values:
|
|
4188
|
+
simulation_experiment_id: z186.string(),
|
|
4189
|
+
name: z186.string().optional(),
|
|
4190
|
+
parameter_values: z186.array(z186.number()).min(1),
|
|
4176
4191
|
parameter_unit: simulation_parameter_unit
|
|
4177
4192
|
});
|
|
4178
|
-
var simulation_parameter_sweep =
|
|
4193
|
+
var simulation_parameter_sweep = z186.discriminatedUnion("parameter_type", [
|
|
4179
4194
|
simulation_parameter_sweep_base.extend({
|
|
4180
|
-
parameter_type:
|
|
4181
|
-
resistor_source_component_id:
|
|
4195
|
+
parameter_type: z186.literal("resistance"),
|
|
4196
|
+
resistor_source_component_id: z186.string()
|
|
4182
4197
|
}),
|
|
4183
4198
|
simulation_parameter_sweep_base.extend({
|
|
4184
|
-
parameter_type:
|
|
4185
|
-
capacitor_source_component_id:
|
|
4199
|
+
parameter_type: z186.literal("capacitance"),
|
|
4200
|
+
capacitor_source_component_id: z186.string()
|
|
4186
4201
|
}),
|
|
4187
4202
|
simulation_parameter_sweep_base.extend({
|
|
4188
|
-
parameter_type:
|
|
4189
|
-
inductor_source_component_id:
|
|
4203
|
+
parameter_type: z186.literal("inductance"),
|
|
4204
|
+
inductor_source_component_id: z186.string()
|
|
4190
4205
|
}),
|
|
4191
4206
|
simulation_parameter_sweep_base.extend({
|
|
4192
|
-
parameter_type:
|
|
4193
|
-
source_net_id:
|
|
4207
|
+
parameter_type: z186.literal("voltage"),
|
|
4208
|
+
source_net_id: z186.string()
|
|
4194
4209
|
}),
|
|
4195
4210
|
simulation_parameter_sweep_base.extend({
|
|
4196
|
-
parameter_type:
|
|
4197
|
-
current_source_component_id:
|
|
4211
|
+
parameter_type: z186.literal("current"),
|
|
4212
|
+
current_source_component_id: z186.string()
|
|
4198
4213
|
})
|
|
4199
4214
|
]).describe("Repeats a simulation experiment over component parameter values");
|
|
4200
4215
|
expectTypesMatch(
|
|
@@ -4202,52 +4217,52 @@ expectTypesMatch(
|
|
|
4202
4217
|
);
|
|
4203
4218
|
|
|
4204
4219
|
// src/simulation/simulation_dc_operating_point_voltage.ts
|
|
4205
|
-
import { z as
|
|
4206
|
-
var simulation_dc_operating_point_voltage =
|
|
4207
|
-
type:
|
|
4220
|
+
import { z as z187 } from "zod";
|
|
4221
|
+
var simulation_dc_operating_point_voltage = z187.object({
|
|
4222
|
+
type: z187.literal("simulation_dc_operating_point_voltage"),
|
|
4208
4223
|
simulation_dc_operating_point_voltage_id: getZodPrefixedIdWithDefault(
|
|
4209
4224
|
"simulation_dc_operating_point_voltage"
|
|
4210
4225
|
),
|
|
4211
|
-
simulation_experiment_id:
|
|
4226
|
+
simulation_experiment_id: z187.string(),
|
|
4212
4227
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4213
|
-
simulation_voltage_probe_id:
|
|
4214
|
-
voltage:
|
|
4215
|
-
name:
|
|
4216
|
-
color:
|
|
4228
|
+
simulation_voltage_probe_id: z187.string(),
|
|
4229
|
+
voltage: z187.number(),
|
|
4230
|
+
name: z187.string().optional(),
|
|
4231
|
+
color: z187.string().optional()
|
|
4217
4232
|
});
|
|
4218
4233
|
expectTypesMatch(true);
|
|
4219
4234
|
|
|
4220
4235
|
// src/simulation/simulation_dc_operating_point_current.ts
|
|
4221
|
-
import { z as
|
|
4222
|
-
var simulation_dc_operating_point_current =
|
|
4223
|
-
type:
|
|
4236
|
+
import { z as z188 } from "zod";
|
|
4237
|
+
var simulation_dc_operating_point_current = z188.object({
|
|
4238
|
+
type: z188.literal("simulation_dc_operating_point_current"),
|
|
4224
4239
|
simulation_dc_operating_point_current_id: getZodPrefixedIdWithDefault(
|
|
4225
4240
|
"simulation_dc_operating_point_current"
|
|
4226
4241
|
),
|
|
4227
|
-
simulation_experiment_id:
|
|
4242
|
+
simulation_experiment_id: z188.string(),
|
|
4228
4243
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4229
|
-
simulation_current_probe_id:
|
|
4230
|
-
current:
|
|
4231
|
-
name:
|
|
4232
|
-
color:
|
|
4244
|
+
simulation_current_probe_id: z188.string(),
|
|
4245
|
+
current: z188.number(),
|
|
4246
|
+
name: z188.string().optional(),
|
|
4247
|
+
color: z188.string().optional()
|
|
4233
4248
|
});
|
|
4234
4249
|
expectTypesMatch(true);
|
|
4235
4250
|
|
|
4236
4251
|
// src/simulation/simulation_dc_sweep_voltage_graph.ts
|
|
4237
|
-
import { z as
|
|
4238
|
-
var simulation_dc_sweep_voltage_graph =
|
|
4239
|
-
type:
|
|
4252
|
+
import { z as z189 } from "zod";
|
|
4253
|
+
var simulation_dc_sweep_voltage_graph = z189.object({
|
|
4254
|
+
type: z189.literal("simulation_dc_sweep_voltage_graph"),
|
|
4240
4255
|
simulation_dc_sweep_voltage_graph_id: getZodPrefixedIdWithDefault(
|
|
4241
4256
|
"simulation_dc_sweep_voltage_graph"
|
|
4242
4257
|
),
|
|
4243
|
-
simulation_experiment_id:
|
|
4258
|
+
simulation_experiment_id: z189.string(),
|
|
4244
4259
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4245
|
-
simulation_voltage_probe_id:
|
|
4246
|
-
sweep_values:
|
|
4260
|
+
simulation_voltage_probe_id: z189.string(),
|
|
4261
|
+
sweep_values: z189.array(z189.number()),
|
|
4247
4262
|
sweep_unit: simulation_dc_sweep_unit,
|
|
4248
|
-
voltage_levels:
|
|
4249
|
-
name:
|
|
4250
|
-
color:
|
|
4263
|
+
voltage_levels: z189.array(z189.number()),
|
|
4264
|
+
name: z189.string().optional(),
|
|
4265
|
+
color: z189.string().optional()
|
|
4251
4266
|
}).refine(
|
|
4252
4267
|
(graph) => graph.sweep_values.length === graph.voltage_levels.length,
|
|
4253
4268
|
{
|
|
@@ -4257,20 +4272,20 @@ var simulation_dc_sweep_voltage_graph = z188.object({
|
|
|
4257
4272
|
expectTypesMatch(true);
|
|
4258
4273
|
|
|
4259
4274
|
// src/simulation/simulation_dc_sweep_current_graph.ts
|
|
4260
|
-
import { z as
|
|
4261
|
-
var simulation_dc_sweep_current_graph =
|
|
4262
|
-
type:
|
|
4275
|
+
import { z as z190 } from "zod";
|
|
4276
|
+
var simulation_dc_sweep_current_graph = z190.object({
|
|
4277
|
+
type: z190.literal("simulation_dc_sweep_current_graph"),
|
|
4263
4278
|
simulation_dc_sweep_current_graph_id: getZodPrefixedIdWithDefault(
|
|
4264
4279
|
"simulation_dc_sweep_current_graph"
|
|
4265
4280
|
),
|
|
4266
|
-
simulation_experiment_id:
|
|
4281
|
+
simulation_experiment_id: z190.string(),
|
|
4267
4282
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4268
|
-
simulation_current_probe_id:
|
|
4269
|
-
sweep_values:
|
|
4283
|
+
simulation_current_probe_id: z190.string(),
|
|
4284
|
+
sweep_values: z190.array(z190.number()),
|
|
4270
4285
|
sweep_unit: simulation_dc_sweep_unit,
|
|
4271
|
-
current_levels:
|
|
4272
|
-
name:
|
|
4273
|
-
color:
|
|
4286
|
+
current_levels: z190.array(z190.number()),
|
|
4287
|
+
name: z190.string().optional(),
|
|
4288
|
+
color: z190.string().optional()
|
|
4274
4289
|
}).refine(
|
|
4275
4290
|
(graph) => graph.sweep_values.length === graph.current_levels.length,
|
|
4276
4291
|
{
|
|
@@ -4280,29 +4295,29 @@ var simulation_dc_sweep_current_graph = z189.object({
|
|
|
4280
4295
|
expectTypesMatch(true);
|
|
4281
4296
|
|
|
4282
4297
|
// src/simulation/simulation_ac_sweep_voltage_graph.ts
|
|
4283
|
-
import { z as
|
|
4298
|
+
import { z as z192 } from "zod";
|
|
4284
4299
|
|
|
4285
4300
|
// src/simulation/simulation_complex_sample.ts
|
|
4286
|
-
import { z as
|
|
4287
|
-
var simulation_complex_sample =
|
|
4288
|
-
re:
|
|
4289
|
-
im:
|
|
4301
|
+
import { z as z191 } from "zod";
|
|
4302
|
+
var simulation_complex_sample = z191.object({
|
|
4303
|
+
re: z191.number(),
|
|
4304
|
+
im: z191.number()
|
|
4290
4305
|
});
|
|
4291
4306
|
expectTypesMatch(true);
|
|
4292
4307
|
|
|
4293
4308
|
// src/simulation/simulation_ac_sweep_voltage_graph.ts
|
|
4294
|
-
var simulation_ac_sweep_voltage_graph =
|
|
4295
|
-
type:
|
|
4309
|
+
var simulation_ac_sweep_voltage_graph = z192.object({
|
|
4310
|
+
type: z192.literal("simulation_ac_sweep_voltage_graph"),
|
|
4296
4311
|
simulation_ac_sweep_voltage_graph_id: getZodPrefixedIdWithDefault(
|
|
4297
4312
|
"simulation_ac_sweep_voltage_graph"
|
|
4298
4313
|
),
|
|
4299
|
-
simulation_experiment_id:
|
|
4314
|
+
simulation_experiment_id: z192.string(),
|
|
4300
4315
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4301
|
-
simulation_voltage_probe_id:
|
|
4302
|
-
frequencies_hz:
|
|
4303
|
-
complex_voltages:
|
|
4304
|
-
name:
|
|
4305
|
-
color:
|
|
4316
|
+
simulation_voltage_probe_id: z192.string(),
|
|
4317
|
+
frequencies_hz: z192.array(z192.number()),
|
|
4318
|
+
complex_voltages: z192.array(simulation_complex_sample),
|
|
4319
|
+
name: z192.string().optional(),
|
|
4320
|
+
color: z192.string().optional()
|
|
4306
4321
|
}).refine(
|
|
4307
4322
|
(graph) => graph.frequencies_hz.length === graph.complex_voltages.length,
|
|
4308
4323
|
{
|
|
@@ -4312,19 +4327,19 @@ var simulation_ac_sweep_voltage_graph = z191.object({
|
|
|
4312
4327
|
expectTypesMatch(true);
|
|
4313
4328
|
|
|
4314
4329
|
// src/simulation/simulation_ac_sweep_current_graph.ts
|
|
4315
|
-
import { z as
|
|
4316
|
-
var simulation_ac_sweep_current_graph =
|
|
4317
|
-
type:
|
|
4330
|
+
import { z as z193 } from "zod";
|
|
4331
|
+
var simulation_ac_sweep_current_graph = z193.object({
|
|
4332
|
+
type: z193.literal("simulation_ac_sweep_current_graph"),
|
|
4318
4333
|
simulation_ac_sweep_current_graph_id: getZodPrefixedIdWithDefault(
|
|
4319
4334
|
"simulation_ac_sweep_current_graph"
|
|
4320
4335
|
),
|
|
4321
|
-
simulation_experiment_id:
|
|
4336
|
+
simulation_experiment_id: z193.string(),
|
|
4322
4337
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4323
|
-
simulation_current_probe_id:
|
|
4324
|
-
frequencies_hz:
|
|
4325
|
-
complex_currents:
|
|
4326
|
-
name:
|
|
4327
|
-
color:
|
|
4338
|
+
simulation_current_probe_id: z193.string(),
|
|
4339
|
+
frequencies_hz: z193.array(z193.number()),
|
|
4340
|
+
complex_currents: z193.array(simulation_complex_sample),
|
|
4341
|
+
name: z193.string().optional(),
|
|
4342
|
+
color: z193.string().optional()
|
|
4328
4343
|
}).refine(
|
|
4329
4344
|
(graph) => graph.frequencies_hz.length === graph.complex_currents.length,
|
|
4330
4345
|
{
|
|
@@ -4334,52 +4349,52 @@ var simulation_ac_sweep_current_graph = z192.object({
|
|
|
4334
4349
|
expectTypesMatch(true);
|
|
4335
4350
|
|
|
4336
4351
|
// src/simulation/simulation_op_amp.ts
|
|
4337
|
-
import { z as
|
|
4338
|
-
var simulation_op_amp =
|
|
4339
|
-
type:
|
|
4352
|
+
import { z as z194 } from "zod";
|
|
4353
|
+
var simulation_op_amp = z194.object({
|
|
4354
|
+
type: z194.literal("simulation_op_amp"),
|
|
4340
4355
|
simulation_op_amp_id: getZodPrefixedIdWithDefault("simulation_op_amp"),
|
|
4341
|
-
source_component_id:
|
|
4342
|
-
inverting_input_source_port_id:
|
|
4343
|
-
non_inverting_input_source_port_id:
|
|
4344
|
-
output_source_port_id:
|
|
4345
|
-
positive_supply_source_port_id:
|
|
4346
|
-
negative_supply_source_port_id:
|
|
4356
|
+
source_component_id: z194.string().optional(),
|
|
4357
|
+
inverting_input_source_port_id: z194.string(),
|
|
4358
|
+
non_inverting_input_source_port_id: z194.string(),
|
|
4359
|
+
output_source_port_id: z194.string(),
|
|
4360
|
+
positive_supply_source_port_id: z194.string(),
|
|
4361
|
+
negative_supply_source_port_id: z194.string()
|
|
4347
4362
|
}).describe("Defines a simple ideal operational amplifier for simulation");
|
|
4348
4363
|
expectTypesMatch(true);
|
|
4349
4364
|
|
|
4350
4365
|
// src/simulation/simulation_spice_subcircuit.ts
|
|
4351
|
-
import { z as
|
|
4352
|
-
var simulation_spice_subcircuit =
|
|
4353
|
-
type:
|
|
4366
|
+
import { z as z195 } from "zod";
|
|
4367
|
+
var simulation_spice_subcircuit = z195.object({
|
|
4368
|
+
type: z195.literal("simulation_spice_subcircuit"),
|
|
4354
4369
|
simulation_spice_subcircuit_id: getZodPrefixedIdWithDefault(
|
|
4355
4370
|
"simulation_spice_subcircuit"
|
|
4356
4371
|
),
|
|
4357
|
-
source_component_id:
|
|
4358
|
-
spice_pin_to_source_port_map:
|
|
4359
|
-
subcircuit_source:
|
|
4372
|
+
source_component_id: z195.string(),
|
|
4373
|
+
spice_pin_to_source_port_map: z195.record(z195.string(), z195.string()),
|
|
4374
|
+
subcircuit_source: z195.string()
|
|
4360
4375
|
}).describe("Defines a custom SPICE subcircuit model for simulation");
|
|
4361
4376
|
expectTypesMatch(
|
|
4362
4377
|
true
|
|
4363
4378
|
);
|
|
4364
4379
|
|
|
4365
4380
|
// src/simulation/simulation_oscilloscope_trace.ts
|
|
4366
|
-
import { z as
|
|
4381
|
+
import { z as z196 } from "zod";
|
|
4367
4382
|
var hasValue = (value) => value !== void 0;
|
|
4368
|
-
var simulation_oscilloscope_trace =
|
|
4369
|
-
type:
|
|
4383
|
+
var simulation_oscilloscope_trace = z196.object({
|
|
4384
|
+
type: z196.literal("simulation_oscilloscope_trace"),
|
|
4370
4385
|
simulation_oscilloscope_trace_id: getZodPrefixedIdWithDefault(
|
|
4371
4386
|
"simulation_oscilloscope_trace"
|
|
4372
4387
|
),
|
|
4373
|
-
simulation_transient_voltage_graph_id:
|
|
4374
|
-
simulation_transient_current_graph_id:
|
|
4375
|
-
simulation_voltage_probe_id:
|
|
4376
|
-
simulation_current_probe_id:
|
|
4377
|
-
display_name:
|
|
4378
|
-
color:
|
|
4379
|
-
display_center_value:
|
|
4380
|
-
display_center_offset_divs:
|
|
4381
|
-
volts_per_div:
|
|
4382
|
-
amps_per_div:
|
|
4388
|
+
simulation_transient_voltage_graph_id: z196.string().optional(),
|
|
4389
|
+
simulation_transient_current_graph_id: z196.string().optional(),
|
|
4390
|
+
simulation_voltage_probe_id: z196.string().optional(),
|
|
4391
|
+
simulation_current_probe_id: z196.string().optional(),
|
|
4392
|
+
display_name: z196.string().optional(),
|
|
4393
|
+
color: z196.string().optional(),
|
|
4394
|
+
display_center_value: z196.number().optional(),
|
|
4395
|
+
display_center_offset_divs: z196.number().optional(),
|
|
4396
|
+
volts_per_div: z196.number().positive().optional(),
|
|
4397
|
+
amps_per_div: z196.number().positive().optional()
|
|
4383
4398
|
}).describe(
|
|
4384
4399
|
"Defines how a simulation measurement is rendered as an oscilloscope-style trace."
|
|
4385
4400
|
).superRefine((data, ctx) => {
|
|
@@ -4393,19 +4408,19 @@ var simulation_oscilloscope_trace = z195.object({
|
|
|
4393
4408
|
].filter(hasValue).length;
|
|
4394
4409
|
if (voltageReferences + currentReferences !== 1) {
|
|
4395
4410
|
ctx.addIssue({
|
|
4396
|
-
code:
|
|
4411
|
+
code: z196.ZodIssueCode.custom,
|
|
4397
4412
|
message: "An oscilloscope trace must reference exactly one voltage graph, current graph, voltage probe, or current probe."
|
|
4398
4413
|
});
|
|
4399
4414
|
}
|
|
4400
4415
|
if (voltageReferences > 0 && data.amps_per_div !== void 0) {
|
|
4401
4416
|
ctx.addIssue({
|
|
4402
|
-
code:
|
|
4417
|
+
code: z196.ZodIssueCode.custom,
|
|
4403
4418
|
message: "Voltage oscilloscope traces must use volts_per_div, not amps_per_div."
|
|
4404
4419
|
});
|
|
4405
4420
|
}
|
|
4406
4421
|
if (currentReferences > 0 && data.volts_per_div !== void 0) {
|
|
4407
4422
|
ctx.addIssue({
|
|
4408
|
-
code:
|
|
4423
|
+
code: z196.ZodIssueCode.custom,
|
|
4409
4424
|
message: "Current oscilloscope traces must use amps_per_div, not volts_per_div."
|
|
4410
4425
|
});
|
|
4411
4426
|
}
|
|
@@ -4413,8 +4428,8 @@ var simulation_oscilloscope_trace = z195.object({
|
|
|
4413
4428
|
expectTypesMatch(true);
|
|
4414
4429
|
|
|
4415
4430
|
// src/any_circuit_element.ts
|
|
4416
|
-
import { z as
|
|
4417
|
-
var any_circuit_element =
|
|
4431
|
+
import { z as z197 } from "zod";
|
|
4432
|
+
var any_circuit_element = z197.union([
|
|
4418
4433
|
source_trace,
|
|
4419
4434
|
source_port,
|
|
4420
4435
|
source_component_internal_connection,
|
|
@@ -4465,6 +4480,7 @@ var any_circuit_element = z196.union([
|
|
|
4465
4480
|
circuit_json_footprint_load_error,
|
|
4466
4481
|
pcb_manual_edit_conflict_warning,
|
|
4467
4482
|
pcb_connector_not_in_accessible_orientation_warning,
|
|
4483
|
+
pcb_component_missing_courtyard_warning,
|
|
4468
4484
|
supplier_footprint_mismatch_warning,
|
|
4469
4485
|
pcb_plated_hole,
|
|
4470
4486
|
pcb_keepout,
|
|
@@ -4631,6 +4647,7 @@ export {
|
|
|
4631
4647
|
pcb_breakout_point,
|
|
4632
4648
|
pcb_component,
|
|
4633
4649
|
pcb_component_invalid_layer_error,
|
|
4650
|
+
pcb_component_missing_courtyard_warning,
|
|
4634
4651
|
pcb_component_not_on_board_edge_error,
|
|
4635
4652
|
pcb_component_outside_board_error,
|
|
4636
4653
|
pcb_connector_not_in_accessible_orientation_warning,
|