circuit-json 0.0.488 → 0.0.489
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 +36 -0
- package/dist/index.d.mts +104 -2
- package/dist/index.mjs +425 -405
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -3491,16 +3491,34 @@ var supplier_footprint_mismatch_warning = z161.object({
|
|
|
3491
3491
|
);
|
|
3492
3492
|
expectTypesMatch(true);
|
|
3493
3493
|
|
|
3494
|
-
// src/pcb/
|
|
3494
|
+
// src/pcb/pcb_fabricator_extra_charge_warning.ts
|
|
3495
3495
|
import { z as z162 } from "zod";
|
|
3496
|
-
var
|
|
3497
|
-
type: z162.literal("
|
|
3496
|
+
var pcb_fabricator_extra_charge_warning = z162.object({
|
|
3497
|
+
type: z162.literal("pcb_fabricator_extra_charge_warning"),
|
|
3498
|
+
pcb_fabricator_extra_charge_warning_id: getZodPrefixedIdWithDefault(
|
|
3499
|
+
"pcb_fabricator_extra_charge_warning"
|
|
3500
|
+
),
|
|
3501
|
+
warning_type: z162.literal("pcb_fabricator_extra_charge_warning").default("pcb_fabricator_extra_charge_warning"),
|
|
3502
|
+
message: z162.string(),
|
|
3503
|
+
fabricator_preset: z162.string(),
|
|
3504
|
+
pcb_board_id: z162.string().optional(),
|
|
3505
|
+
pcb_via_ids: z162.array(z162.string()).optional(),
|
|
3506
|
+
subcircuit_id: z162.string().optional()
|
|
3507
|
+
}).describe(
|
|
3508
|
+
"Warning that a design feature incurs an extra charge for the selected fabricator preset, such as via hole diameters below 0.3 mm with JLCPCB economy or standard presets."
|
|
3509
|
+
);
|
|
3510
|
+
expectTypesMatch(true);
|
|
3511
|
+
|
|
3512
|
+
// src/pcb/pcb_breakout_point.ts
|
|
3513
|
+
import { z as z163 } from "zod";
|
|
3514
|
+
var pcb_breakout_point = z163.object({
|
|
3515
|
+
type: z163.literal("pcb_breakout_point"),
|
|
3498
3516
|
pcb_breakout_point_id: getZodPrefixedIdWithDefault("pcb_breakout_point"),
|
|
3499
|
-
pcb_group_id:
|
|
3500
|
-
subcircuit_id:
|
|
3501
|
-
source_trace_id:
|
|
3502
|
-
source_port_id:
|
|
3503
|
-
source_net_id:
|
|
3517
|
+
pcb_group_id: z163.string(),
|
|
3518
|
+
subcircuit_id: z163.string().optional(),
|
|
3519
|
+
source_trace_id: z163.string().optional(),
|
|
3520
|
+
source_port_id: z163.string().optional(),
|
|
3521
|
+
source_net_id: z163.string().optional(),
|
|
3504
3522
|
layer: layer_ref.optional(),
|
|
3505
3523
|
x: distance,
|
|
3506
3524
|
y: distance
|
|
@@ -3510,61 +3528,61 @@ var pcb_breakout_point = z162.object({
|
|
|
3510
3528
|
expectTypesMatch(true);
|
|
3511
3529
|
|
|
3512
3530
|
// src/pcb/pcb_ground_plane.ts
|
|
3513
|
-
import { z as
|
|
3514
|
-
var pcb_ground_plane =
|
|
3515
|
-
type:
|
|
3531
|
+
import { z as z164 } from "zod";
|
|
3532
|
+
var pcb_ground_plane = z164.object({
|
|
3533
|
+
type: z164.literal("pcb_ground_plane"),
|
|
3516
3534
|
pcb_ground_plane_id: getZodPrefixedIdWithDefault("pcb_ground_plane"),
|
|
3517
|
-
source_pcb_ground_plane_id:
|
|
3518
|
-
source_net_id:
|
|
3519
|
-
pcb_group_id:
|
|
3520
|
-
subcircuit_id:
|
|
3535
|
+
source_pcb_ground_plane_id: z164.string(),
|
|
3536
|
+
source_net_id: z164.string(),
|
|
3537
|
+
pcb_group_id: z164.string().optional(),
|
|
3538
|
+
subcircuit_id: z164.string().optional()
|
|
3521
3539
|
}).describe("Defines a ground plane on the PCB");
|
|
3522
3540
|
expectTypesMatch(true);
|
|
3523
3541
|
|
|
3524
3542
|
// src/pcb/pcb_ground_plane_region.ts
|
|
3525
|
-
import { z as
|
|
3526
|
-
var pcb_ground_plane_region =
|
|
3527
|
-
type:
|
|
3543
|
+
import { z as z165 } from "zod";
|
|
3544
|
+
var pcb_ground_plane_region = z165.object({
|
|
3545
|
+
type: z165.literal("pcb_ground_plane_region"),
|
|
3528
3546
|
pcb_ground_plane_region_id: getZodPrefixedIdWithDefault(
|
|
3529
3547
|
"pcb_ground_plane_region"
|
|
3530
3548
|
),
|
|
3531
|
-
pcb_ground_plane_id:
|
|
3532
|
-
pcb_group_id:
|
|
3533
|
-
subcircuit_id:
|
|
3549
|
+
pcb_ground_plane_id: z165.string(),
|
|
3550
|
+
pcb_group_id: z165.string().optional(),
|
|
3551
|
+
subcircuit_id: z165.string().optional(),
|
|
3534
3552
|
layer: layer_ref,
|
|
3535
|
-
points:
|
|
3553
|
+
points: z165.array(point)
|
|
3536
3554
|
}).describe("Defines a polygon region of a ground plane");
|
|
3537
3555
|
expectTypesMatch(true);
|
|
3538
3556
|
|
|
3539
3557
|
// src/pcb/pcb_thermal_spoke.ts
|
|
3540
|
-
import { z as
|
|
3541
|
-
var pcb_thermal_spoke =
|
|
3542
|
-
type:
|
|
3558
|
+
import { z as z166 } from "zod";
|
|
3559
|
+
var pcb_thermal_spoke = z166.object({
|
|
3560
|
+
type: z166.literal("pcb_thermal_spoke"),
|
|
3543
3561
|
pcb_thermal_spoke_id: getZodPrefixedIdWithDefault("pcb_thermal_spoke"),
|
|
3544
|
-
pcb_ground_plane_id:
|
|
3545
|
-
shape:
|
|
3546
|
-
spoke_count:
|
|
3562
|
+
pcb_ground_plane_id: z166.string(),
|
|
3563
|
+
shape: z166.string(),
|
|
3564
|
+
spoke_count: z166.number(),
|
|
3547
3565
|
spoke_thickness: distance,
|
|
3548
3566
|
spoke_inner_diameter: distance,
|
|
3549
3567
|
spoke_outer_diameter: distance,
|
|
3550
|
-
pcb_plated_hole_id:
|
|
3551
|
-
subcircuit_id:
|
|
3568
|
+
pcb_plated_hole_id: z166.string().optional(),
|
|
3569
|
+
subcircuit_id: z166.string().optional()
|
|
3552
3570
|
}).describe("Pattern for connecting a ground plane to a plated hole");
|
|
3553
3571
|
expectTypesMatch(true);
|
|
3554
3572
|
|
|
3555
3573
|
// src/pcb/pcb_copper_pour.ts
|
|
3556
|
-
import { z as
|
|
3557
|
-
var pcb_copper_pour_base =
|
|
3558
|
-
type:
|
|
3574
|
+
import { z as z167 } from "zod";
|
|
3575
|
+
var pcb_copper_pour_base = z167.object({
|
|
3576
|
+
type: z167.literal("pcb_copper_pour"),
|
|
3559
3577
|
pcb_copper_pour_id: getZodPrefixedIdWithDefault("pcb_copper_pour"),
|
|
3560
|
-
pcb_group_id:
|
|
3561
|
-
subcircuit_id:
|
|
3578
|
+
pcb_group_id: z167.string().optional(),
|
|
3579
|
+
subcircuit_id: z167.string().optional(),
|
|
3562
3580
|
layer: layer_ref,
|
|
3563
|
-
source_net_id:
|
|
3564
|
-
covered_with_solder_mask:
|
|
3581
|
+
source_net_id: z167.string().optional(),
|
|
3582
|
+
covered_with_solder_mask: z167.boolean().optional().default(true)
|
|
3565
3583
|
});
|
|
3566
3584
|
var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
|
|
3567
|
-
shape:
|
|
3585
|
+
shape: z167.literal("rect"),
|
|
3568
3586
|
center: point,
|
|
3569
3587
|
width: length,
|
|
3570
3588
|
height: length,
|
|
@@ -3572,16 +3590,16 @@ var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
|
|
|
3572
3590
|
});
|
|
3573
3591
|
expectTypesMatch(true);
|
|
3574
3592
|
var pcb_copper_pour_brep = pcb_copper_pour_base.extend({
|
|
3575
|
-
shape:
|
|
3593
|
+
shape: z167.literal("brep"),
|
|
3576
3594
|
brep_shape
|
|
3577
3595
|
});
|
|
3578
3596
|
expectTypesMatch(true);
|
|
3579
3597
|
var pcb_copper_pour_polygon = pcb_copper_pour_base.extend({
|
|
3580
|
-
shape:
|
|
3581
|
-
points:
|
|
3598
|
+
shape: z167.literal("polygon"),
|
|
3599
|
+
points: z167.array(point)
|
|
3582
3600
|
});
|
|
3583
3601
|
expectTypesMatch(true);
|
|
3584
|
-
var pcb_copper_pour =
|
|
3602
|
+
var pcb_copper_pour = z167.discriminatedUnion("shape", [
|
|
3585
3603
|
pcb_copper_pour_rect,
|
|
3586
3604
|
pcb_copper_pour_brep,
|
|
3587
3605
|
pcb_copper_pour_polygon
|
|
@@ -3589,99 +3607,99 @@ var pcb_copper_pour = z166.discriminatedUnion("shape", [
|
|
|
3589
3607
|
expectTypesMatch(true);
|
|
3590
3608
|
|
|
3591
3609
|
// src/pcb/pcb_component_outside_board_error.ts
|
|
3592
|
-
import { z as
|
|
3610
|
+
import { z as z168 } from "zod";
|
|
3593
3611
|
var pcb_component_outside_board_error = base_circuit_json_error.extend({
|
|
3594
|
-
type:
|
|
3612
|
+
type: z168.literal("pcb_component_outside_board_error"),
|
|
3595
3613
|
pcb_component_outside_board_error_id: getZodPrefixedIdWithDefault(
|
|
3596
3614
|
"pcb_component_outside_board_error"
|
|
3597
3615
|
),
|
|
3598
|
-
error_type:
|
|
3599
|
-
pcb_component_id:
|
|
3600
|
-
pcb_board_id:
|
|
3616
|
+
error_type: z168.literal("pcb_component_outside_board_error").default("pcb_component_outside_board_error"),
|
|
3617
|
+
pcb_component_id: z168.string(),
|
|
3618
|
+
pcb_board_id: z168.string(),
|
|
3601
3619
|
component_center: point,
|
|
3602
|
-
component_bounds:
|
|
3603
|
-
min_x:
|
|
3604
|
-
max_x:
|
|
3605
|
-
min_y:
|
|
3606
|
-
max_y:
|
|
3620
|
+
component_bounds: z168.object({
|
|
3621
|
+
min_x: z168.number(),
|
|
3622
|
+
max_x: z168.number(),
|
|
3623
|
+
min_y: z168.number(),
|
|
3624
|
+
max_y: z168.number()
|
|
3607
3625
|
}),
|
|
3608
|
-
subcircuit_id:
|
|
3609
|
-
source_component_id:
|
|
3626
|
+
subcircuit_id: z168.string().optional(),
|
|
3627
|
+
source_component_id: z168.string().optional()
|
|
3610
3628
|
}).describe(
|
|
3611
3629
|
"Error emitted when a PCB component is placed outside the board boundaries"
|
|
3612
3630
|
);
|
|
3613
3631
|
expectTypesMatch(true);
|
|
3614
3632
|
|
|
3615
3633
|
// src/pcb/pcb_component_not_on_board_edge_error.ts
|
|
3616
|
-
import { z as
|
|
3634
|
+
import { z as z169 } from "zod";
|
|
3617
3635
|
var pcb_component_not_on_board_edge_error = base_circuit_json_error.extend({
|
|
3618
|
-
type:
|
|
3636
|
+
type: z169.literal("pcb_component_not_on_board_edge_error"),
|
|
3619
3637
|
pcb_component_not_on_board_edge_error_id: getZodPrefixedIdWithDefault(
|
|
3620
3638
|
"pcb_component_not_on_board_edge_error"
|
|
3621
3639
|
),
|
|
3622
|
-
error_type:
|
|
3623
|
-
pcb_component_id:
|
|
3624
|
-
pcb_board_id:
|
|
3640
|
+
error_type: z169.literal("pcb_component_not_on_board_edge_error").default("pcb_component_not_on_board_edge_error"),
|
|
3641
|
+
pcb_component_id: z169.string(),
|
|
3642
|
+
pcb_board_id: z169.string(),
|
|
3625
3643
|
component_center: point,
|
|
3626
|
-
pad_to_nearest_board_edge_distance:
|
|
3627
|
-
source_component_id:
|
|
3628
|
-
subcircuit_id:
|
|
3644
|
+
pad_to_nearest_board_edge_distance: z169.number(),
|
|
3645
|
+
source_component_id: z169.string().optional(),
|
|
3646
|
+
subcircuit_id: z169.string().optional()
|
|
3629
3647
|
}).describe(
|
|
3630
3648
|
"Error emitted when a component that must be placed on the board edge is centered away from the edge"
|
|
3631
3649
|
);
|
|
3632
3650
|
expectTypesMatch(true);
|
|
3633
3651
|
|
|
3634
3652
|
// src/pcb/pcb_component_invalid_layer_error.ts
|
|
3635
|
-
import { z as
|
|
3653
|
+
import { z as z170 } from "zod";
|
|
3636
3654
|
var pcb_component_invalid_layer_error = base_circuit_json_error.extend({
|
|
3637
|
-
type:
|
|
3655
|
+
type: z170.literal("pcb_component_invalid_layer_error"),
|
|
3638
3656
|
pcb_component_invalid_layer_error_id: getZodPrefixedIdWithDefault(
|
|
3639
3657
|
"pcb_component_invalid_layer_error"
|
|
3640
3658
|
),
|
|
3641
|
-
error_type:
|
|
3642
|
-
pcb_component_id:
|
|
3643
|
-
source_component_id:
|
|
3659
|
+
error_type: z170.literal("pcb_component_invalid_layer_error").default("pcb_component_invalid_layer_error"),
|
|
3660
|
+
pcb_component_id: z170.string().optional(),
|
|
3661
|
+
source_component_id: z170.string(),
|
|
3644
3662
|
layer: layer_ref,
|
|
3645
|
-
subcircuit_id:
|
|
3663
|
+
subcircuit_id: z170.string().optional()
|
|
3646
3664
|
}).describe(
|
|
3647
3665
|
"Error emitted when a component is placed on an invalid layer (components can only be on 'top' or 'bottom' layers)"
|
|
3648
3666
|
);
|
|
3649
3667
|
expectTypesMatch(true);
|
|
3650
3668
|
|
|
3651
3669
|
// src/pcb/pcb_via_clearance_error.ts
|
|
3652
|
-
import { z as
|
|
3670
|
+
import { z as z171 } from "zod";
|
|
3653
3671
|
var pcb_via_clearance_error = base_circuit_json_error.extend({
|
|
3654
|
-
type:
|
|
3672
|
+
type: z171.literal("pcb_via_clearance_error"),
|
|
3655
3673
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
3656
|
-
error_type:
|
|
3657
|
-
pcb_via_ids:
|
|
3674
|
+
error_type: z171.literal("pcb_via_clearance_error").default("pcb_via_clearance_error"),
|
|
3675
|
+
pcb_via_ids: z171.array(z171.string()).min(2),
|
|
3658
3676
|
minimum_clearance: distance.optional(),
|
|
3659
3677
|
actual_clearance: distance.optional(),
|
|
3660
|
-
pcb_center:
|
|
3661
|
-
x:
|
|
3662
|
-
y:
|
|
3678
|
+
pcb_center: z171.object({
|
|
3679
|
+
x: z171.number().optional(),
|
|
3680
|
+
y: z171.number().optional()
|
|
3663
3681
|
}).optional(),
|
|
3664
|
-
subcircuit_id:
|
|
3682
|
+
subcircuit_id: z171.string().optional()
|
|
3665
3683
|
}).describe("Error emitted when vias are closer than the allowed clearance");
|
|
3666
3684
|
expectTypesMatch(true);
|
|
3667
3685
|
|
|
3668
3686
|
// src/pcb/pcb_via_trace_clearance_error.ts
|
|
3669
|
-
import { z as
|
|
3687
|
+
import { z as z172 } from "zod";
|
|
3670
3688
|
var pcb_via_trace_clearance_error = base_circuit_json_error.extend({
|
|
3671
|
-
type:
|
|
3689
|
+
type: z172.literal("pcb_via_trace_clearance_error"),
|
|
3672
3690
|
pcb_via_trace_clearance_error_id: getZodPrefixedIdWithDefault(
|
|
3673
3691
|
"pcb_via_trace_clearance_error"
|
|
3674
3692
|
),
|
|
3675
|
-
error_type:
|
|
3676
|
-
pcb_via_id:
|
|
3677
|
-
pcb_trace_id:
|
|
3693
|
+
error_type: z172.literal("pcb_via_trace_clearance_error").default("pcb_via_trace_clearance_error"),
|
|
3694
|
+
pcb_via_id: z172.string(),
|
|
3695
|
+
pcb_trace_id: z172.string(),
|
|
3678
3696
|
minimum_clearance: distance.optional(),
|
|
3679
3697
|
actual_clearance: distance.optional(),
|
|
3680
|
-
center:
|
|
3681
|
-
x:
|
|
3682
|
-
y:
|
|
3698
|
+
center: z172.object({
|
|
3699
|
+
x: z172.number().optional(),
|
|
3700
|
+
y: z172.number().optional()
|
|
3683
3701
|
}).optional(),
|
|
3684
|
-
subcircuit_id:
|
|
3702
|
+
subcircuit_id: z172.string().optional()
|
|
3685
3703
|
}).describe(
|
|
3686
3704
|
"Error emitted when a via and trace are closer than the allowed clearance"
|
|
3687
3705
|
);
|
|
@@ -3690,41 +3708,41 @@ expectTypesMatch(
|
|
|
3690
3708
|
);
|
|
3691
3709
|
|
|
3692
3710
|
// src/pcb/pcb_pad_pad_clearance_error.ts
|
|
3693
|
-
import { z as
|
|
3711
|
+
import { z as z173 } from "zod";
|
|
3694
3712
|
var pcb_pad_pad_clearance_error = base_circuit_json_error.extend({
|
|
3695
|
-
type:
|
|
3713
|
+
type: z173.literal("pcb_pad_pad_clearance_error"),
|
|
3696
3714
|
pcb_pad_pad_clearance_error_id: getZodPrefixedIdWithDefault(
|
|
3697
3715
|
"pcb_pad_pad_clearance_error"
|
|
3698
3716
|
),
|
|
3699
|
-
error_type:
|
|
3700
|
-
pcb_pad_ids:
|
|
3717
|
+
error_type: z173.literal("pcb_pad_pad_clearance_error").default("pcb_pad_pad_clearance_error"),
|
|
3718
|
+
pcb_pad_ids: z173.array(z173.string()).min(2),
|
|
3701
3719
|
minimum_clearance: distance.optional(),
|
|
3702
3720
|
actual_clearance: distance.optional(),
|
|
3703
|
-
center:
|
|
3704
|
-
x:
|
|
3705
|
-
y:
|
|
3721
|
+
center: z173.object({
|
|
3722
|
+
x: z173.number().optional(),
|
|
3723
|
+
y: z173.number().optional()
|
|
3706
3724
|
}).optional(),
|
|
3707
|
-
subcircuit_id:
|
|
3725
|
+
subcircuit_id: z173.string().optional()
|
|
3708
3726
|
}).describe("Error emitted when pads are closer than the allowed clearance");
|
|
3709
3727
|
expectTypesMatch(true);
|
|
3710
3728
|
|
|
3711
3729
|
// src/pcb/pcb_pad_trace_clearance_error.ts
|
|
3712
|
-
import { z as
|
|
3730
|
+
import { z as z174 } from "zod";
|
|
3713
3731
|
var pcb_pad_trace_clearance_error = base_circuit_json_error.extend({
|
|
3714
|
-
type:
|
|
3732
|
+
type: z174.literal("pcb_pad_trace_clearance_error"),
|
|
3715
3733
|
pcb_pad_trace_clearance_error_id: getZodPrefixedIdWithDefault(
|
|
3716
3734
|
"pcb_pad_trace_clearance_error"
|
|
3717
3735
|
),
|
|
3718
|
-
error_type:
|
|
3719
|
-
pcb_pad_id:
|
|
3720
|
-
pcb_trace_id:
|
|
3736
|
+
error_type: z174.literal("pcb_pad_trace_clearance_error").default("pcb_pad_trace_clearance_error"),
|
|
3737
|
+
pcb_pad_id: z174.string(),
|
|
3738
|
+
pcb_trace_id: z174.string(),
|
|
3721
3739
|
minimum_clearance: distance.optional(),
|
|
3722
3740
|
actual_clearance: distance.optional(),
|
|
3723
|
-
center:
|
|
3724
|
-
x:
|
|
3725
|
-
y:
|
|
3741
|
+
center: z174.object({
|
|
3742
|
+
x: z174.number().optional(),
|
|
3743
|
+
y: z174.number().optional()
|
|
3726
3744
|
}).optional(),
|
|
3727
|
-
subcircuit_id:
|
|
3745
|
+
subcircuit_id: z174.string().optional()
|
|
3728
3746
|
}).describe(
|
|
3729
3747
|
"Error emitted when a pad and trace are closer than allowed clearance"
|
|
3730
3748
|
);
|
|
@@ -3733,89 +3751,89 @@ expectTypesMatch(
|
|
|
3733
3751
|
);
|
|
3734
3752
|
|
|
3735
3753
|
// src/pcb/pcb_courtyard_rect.ts
|
|
3736
|
-
import { z as
|
|
3737
|
-
var pcb_courtyard_rect =
|
|
3738
|
-
type:
|
|
3754
|
+
import { z as z175 } from "zod";
|
|
3755
|
+
var pcb_courtyard_rect = z175.object({
|
|
3756
|
+
type: z175.literal("pcb_courtyard_rect"),
|
|
3739
3757
|
pcb_courtyard_rect_id: getZodPrefixedIdWithDefault("pcb_courtyard_rect"),
|
|
3740
|
-
pcb_component_id:
|
|
3741
|
-
pcb_group_id:
|
|
3742
|
-
subcircuit_id:
|
|
3758
|
+
pcb_component_id: z175.string(),
|
|
3759
|
+
pcb_group_id: z175.string().optional(),
|
|
3760
|
+
subcircuit_id: z175.string().optional(),
|
|
3743
3761
|
center: point,
|
|
3744
3762
|
width: length,
|
|
3745
3763
|
height: length,
|
|
3746
3764
|
layer: visible_layer,
|
|
3747
3765
|
ccw_rotation: rotation.optional(),
|
|
3748
|
-
color:
|
|
3766
|
+
color: z175.string().optional()
|
|
3749
3767
|
}).describe("Defines a courtyard rectangle on the PCB");
|
|
3750
3768
|
expectTypesMatch(true);
|
|
3751
3769
|
|
|
3752
3770
|
// src/pcb/pcb_courtyard_outline.ts
|
|
3753
|
-
import { z as
|
|
3754
|
-
var pcb_courtyard_outline =
|
|
3755
|
-
type:
|
|
3771
|
+
import { z as z176 } from "zod";
|
|
3772
|
+
var pcb_courtyard_outline = z176.object({
|
|
3773
|
+
type: z176.literal("pcb_courtyard_outline"),
|
|
3756
3774
|
pcb_courtyard_outline_id: getZodPrefixedIdWithDefault(
|
|
3757
3775
|
"pcb_courtyard_outline"
|
|
3758
3776
|
),
|
|
3759
|
-
pcb_component_id:
|
|
3760
|
-
pcb_group_id:
|
|
3761
|
-
subcircuit_id:
|
|
3777
|
+
pcb_component_id: z176.string(),
|
|
3778
|
+
pcb_group_id: z176.string().optional(),
|
|
3779
|
+
subcircuit_id: z176.string().optional(),
|
|
3762
3780
|
layer: visible_layer,
|
|
3763
|
-
outline:
|
|
3781
|
+
outline: z176.array(point).min(2)
|
|
3764
3782
|
}).describe("Defines a courtyard outline on the PCB");
|
|
3765
3783
|
expectTypesMatch(true);
|
|
3766
3784
|
|
|
3767
3785
|
// src/pcb/pcb_courtyard_polygon.ts
|
|
3768
|
-
import { z as
|
|
3769
|
-
var pcb_courtyard_polygon =
|
|
3770
|
-
type:
|
|
3786
|
+
import { z as z177 } from "zod";
|
|
3787
|
+
var pcb_courtyard_polygon = z177.object({
|
|
3788
|
+
type: z177.literal("pcb_courtyard_polygon"),
|
|
3771
3789
|
pcb_courtyard_polygon_id: getZodPrefixedIdWithDefault(
|
|
3772
3790
|
"pcb_courtyard_polygon"
|
|
3773
3791
|
),
|
|
3774
|
-
pcb_component_id:
|
|
3775
|
-
pcb_group_id:
|
|
3776
|
-
subcircuit_id:
|
|
3792
|
+
pcb_component_id: z177.string(),
|
|
3793
|
+
pcb_group_id: z177.string().optional(),
|
|
3794
|
+
subcircuit_id: z177.string().optional(),
|
|
3777
3795
|
layer: visible_layer,
|
|
3778
|
-
points:
|
|
3779
|
-
color:
|
|
3796
|
+
points: z177.array(point).min(3),
|
|
3797
|
+
color: z177.string().optional()
|
|
3780
3798
|
}).describe("Defines a courtyard polygon on the PCB");
|
|
3781
3799
|
expectTypesMatch(true);
|
|
3782
3800
|
|
|
3783
3801
|
// src/pcb/pcb_courtyard_circle.ts
|
|
3784
|
-
import { z as
|
|
3785
|
-
var pcb_courtyard_circle =
|
|
3786
|
-
type:
|
|
3802
|
+
import { z as z178 } from "zod";
|
|
3803
|
+
var pcb_courtyard_circle = z178.object({
|
|
3804
|
+
type: z178.literal("pcb_courtyard_circle"),
|
|
3787
3805
|
pcb_courtyard_circle_id: getZodPrefixedIdWithDefault(
|
|
3788
3806
|
"pcb_courtyard_circle"
|
|
3789
3807
|
),
|
|
3790
|
-
pcb_component_id:
|
|
3791
|
-
pcb_group_id:
|
|
3792
|
-
subcircuit_id:
|
|
3808
|
+
pcb_component_id: z178.string(),
|
|
3809
|
+
pcb_group_id: z178.string().optional(),
|
|
3810
|
+
subcircuit_id: z178.string().optional(),
|
|
3793
3811
|
center: point,
|
|
3794
3812
|
radius: length,
|
|
3795
3813
|
layer: visible_layer,
|
|
3796
|
-
color:
|
|
3814
|
+
color: z178.string().optional()
|
|
3797
3815
|
}).describe("Defines a courtyard circle on the PCB");
|
|
3798
3816
|
expectTypesMatch(true);
|
|
3799
3817
|
|
|
3800
3818
|
// src/pcb/pcb_courtyard_pill.ts
|
|
3801
|
-
import { z as
|
|
3802
|
-
var pcb_courtyard_pill =
|
|
3803
|
-
type:
|
|
3819
|
+
import { z as z179 } from "zod";
|
|
3820
|
+
var pcb_courtyard_pill = z179.object({
|
|
3821
|
+
type: z179.literal("pcb_courtyard_pill"),
|
|
3804
3822
|
pcb_courtyard_pill_id: getZodPrefixedIdWithDefault("pcb_courtyard_pill"),
|
|
3805
|
-
pcb_component_id:
|
|
3806
|
-
pcb_group_id:
|
|
3807
|
-
subcircuit_id:
|
|
3823
|
+
pcb_component_id: z179.string(),
|
|
3824
|
+
pcb_group_id: z179.string().optional(),
|
|
3825
|
+
subcircuit_id: z179.string().optional(),
|
|
3808
3826
|
center: point,
|
|
3809
3827
|
width: length,
|
|
3810
3828
|
height: length,
|
|
3811
3829
|
radius: length,
|
|
3812
3830
|
layer: visible_layer,
|
|
3813
|
-
color:
|
|
3831
|
+
color: z179.string().optional()
|
|
3814
3832
|
}).describe("Defines a courtyard pill on the PCB");
|
|
3815
3833
|
expectTypesMatch(true);
|
|
3816
3834
|
|
|
3817
3835
|
// src/cad/cad_component.ts
|
|
3818
|
-
import { z as
|
|
3836
|
+
import { z as z180 } from "zod";
|
|
3819
3837
|
|
|
3820
3838
|
// src/cad/cad_model_conventions.ts
|
|
3821
3839
|
var cad_model_formats = [
|
|
@@ -3846,50 +3864,50 @@ var cadModelDefaultDirectionMap = {
|
|
|
3846
3864
|
};
|
|
3847
3865
|
|
|
3848
3866
|
// src/cad/cad_component.ts
|
|
3849
|
-
var cad_component =
|
|
3850
|
-
type:
|
|
3851
|
-
cad_component_id:
|
|
3852
|
-
pcb_component_id:
|
|
3853
|
-
source_component_id:
|
|
3867
|
+
var cad_component = z180.object({
|
|
3868
|
+
type: z180.literal("cad_component"),
|
|
3869
|
+
cad_component_id: z180.string(),
|
|
3870
|
+
pcb_component_id: z180.string(),
|
|
3871
|
+
source_component_id: z180.string(),
|
|
3854
3872
|
position: point3,
|
|
3855
3873
|
rotation: point3.optional(),
|
|
3856
3874
|
size: point3.optional(),
|
|
3857
3875
|
layer: layer_ref.optional(),
|
|
3858
|
-
subcircuit_id:
|
|
3876
|
+
subcircuit_id: z180.string().optional(),
|
|
3859
3877
|
// These are all ways to generate/load the 3d model
|
|
3860
|
-
footprinter_string:
|
|
3861
|
-
model_obj_url:
|
|
3862
|
-
model_stl_url:
|
|
3863
|
-
model_3mf_url:
|
|
3864
|
-
model_gltf_url:
|
|
3865
|
-
model_glb_url:
|
|
3866
|
-
model_step_url:
|
|
3867
|
-
model_wrl_url:
|
|
3878
|
+
footprinter_string: z180.string().optional(),
|
|
3879
|
+
model_obj_url: z180.string().optional(),
|
|
3880
|
+
model_stl_url: z180.string().optional(),
|
|
3881
|
+
model_3mf_url: z180.string().optional(),
|
|
3882
|
+
model_gltf_url: z180.string().optional(),
|
|
3883
|
+
model_glb_url: z180.string().optional(),
|
|
3884
|
+
model_step_url: z180.string().optional(),
|
|
3885
|
+
model_wrl_url: z180.string().optional(),
|
|
3868
3886
|
model_asset: asset.optional(),
|
|
3869
|
-
model_unit_to_mm_scale_factor:
|
|
3870
|
-
model_board_normal_direction:
|
|
3887
|
+
model_unit_to_mm_scale_factor: z180.number().optional(),
|
|
3888
|
+
model_board_normal_direction: z180.enum(cad_model_axis_directions).optional().describe(
|
|
3871
3889
|
`The direction in the model's coordinate space that is considered "up" or "coming out of the board surface"`
|
|
3872
3890
|
),
|
|
3873
3891
|
model_origin_position: point3.optional(),
|
|
3874
|
-
model_origin_alignment:
|
|
3892
|
+
model_origin_alignment: z180.enum([
|
|
3875
3893
|
"unknown",
|
|
3876
3894
|
"center",
|
|
3877
3895
|
"center_of_component_on_board_surface",
|
|
3878
3896
|
"bottom_center_of_component"
|
|
3879
3897
|
]).optional(),
|
|
3880
|
-
model_object_fit:
|
|
3881
|
-
model_jscad:
|
|
3882
|
-
show_as_translucent_model:
|
|
3883
|
-
show_as_bounding_box:
|
|
3884
|
-
show_hidden_edges:
|
|
3885
|
-
anchor_alignment:
|
|
3898
|
+
model_object_fit: z180.enum(["contain_within_bounds", "fill_bounds"]).optional().default("contain_within_bounds"),
|
|
3899
|
+
model_jscad: z180.any().optional(),
|
|
3900
|
+
show_as_translucent_model: z180.boolean().optional(),
|
|
3901
|
+
show_as_bounding_box: z180.boolean().optional(),
|
|
3902
|
+
show_hidden_edges: z180.boolean().optional(),
|
|
3903
|
+
anchor_alignment: z180.enum(["center", "center_of_component_on_board_surface"]).optional().default("center")
|
|
3886
3904
|
}).describe("Defines a component on the PCB");
|
|
3887
3905
|
expectTypesMatch(true);
|
|
3888
3906
|
|
|
3889
3907
|
// src/simulation/simulation_voltage_source.ts
|
|
3890
|
-
import { z as
|
|
3891
|
-
var wave_shape =
|
|
3892
|
-
var percentage =
|
|
3908
|
+
import { z as z181 } from "zod";
|
|
3909
|
+
var wave_shape = z181.enum(["sinewave", "square", "triangle", "sawtooth"]);
|
|
3910
|
+
var percentage = z181.union([z181.string(), z181.number()]).transform((val) => {
|
|
3893
3911
|
if (typeof val === "string") {
|
|
3894
3912
|
if (val.endsWith("%")) {
|
|
3895
3913
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -3898,32 +3916,32 @@ var percentage = z180.union([z180.string(), z180.number()]).transform((val) => {
|
|
|
3898
3916
|
}
|
|
3899
3917
|
return val;
|
|
3900
3918
|
}).pipe(
|
|
3901
|
-
|
|
3919
|
+
z181.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
3902
3920
|
);
|
|
3903
|
-
var simulation_dc_voltage_source =
|
|
3904
|
-
type:
|
|
3921
|
+
var simulation_dc_voltage_source = z181.object({
|
|
3922
|
+
type: z181.literal("simulation_voltage_source"),
|
|
3905
3923
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
3906
3924
|
"simulation_voltage_source"
|
|
3907
3925
|
),
|
|
3908
|
-
is_dc_source:
|
|
3909
|
-
positive_source_port_id:
|
|
3910
|
-
negative_source_port_id:
|
|
3911
|
-
positive_source_net_id:
|
|
3912
|
-
negative_source_net_id:
|
|
3926
|
+
is_dc_source: z181.literal(true).optional().default(true),
|
|
3927
|
+
positive_source_port_id: z181.string().optional(),
|
|
3928
|
+
negative_source_port_id: z181.string().optional(),
|
|
3929
|
+
positive_source_net_id: z181.string().optional(),
|
|
3930
|
+
negative_source_net_id: z181.string().optional(),
|
|
3913
3931
|
voltage,
|
|
3914
3932
|
ac_magnitude: voltage.optional(),
|
|
3915
3933
|
ac_phase: rotation.optional()
|
|
3916
3934
|
}).describe("Defines a DC voltage source for simulation");
|
|
3917
|
-
var simulation_ac_voltage_source =
|
|
3918
|
-
type:
|
|
3935
|
+
var simulation_ac_voltage_source = z181.object({
|
|
3936
|
+
type: z181.literal("simulation_voltage_source"),
|
|
3919
3937
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
3920
3938
|
"simulation_voltage_source"
|
|
3921
3939
|
),
|
|
3922
|
-
is_dc_source:
|
|
3923
|
-
terminal1_source_port_id:
|
|
3924
|
-
terminal2_source_port_id:
|
|
3925
|
-
terminal1_source_net_id:
|
|
3926
|
-
terminal2_source_net_id:
|
|
3940
|
+
is_dc_source: z181.literal(false),
|
|
3941
|
+
terminal1_source_port_id: z181.string().optional(),
|
|
3942
|
+
terminal2_source_port_id: z181.string().optional(),
|
|
3943
|
+
terminal1_source_net_id: z181.string().optional(),
|
|
3944
|
+
terminal2_source_net_id: z181.string().optional(),
|
|
3927
3945
|
voltage: voltage.optional(),
|
|
3928
3946
|
frequency: frequency.optional(),
|
|
3929
3947
|
peak_to_peak_voltage: voltage.optional(),
|
|
@@ -3938,14 +3956,14 @@ var simulation_ac_voltage_source = z180.object({
|
|
|
3938
3956
|
ac_magnitude: voltage.optional(),
|
|
3939
3957
|
ac_phase: rotation.optional()
|
|
3940
3958
|
}).describe("Defines an AC voltage source for simulation");
|
|
3941
|
-
var simulation_voltage_source =
|
|
3959
|
+
var simulation_voltage_source = z181.union([simulation_dc_voltage_source, simulation_ac_voltage_source]).describe("Defines a voltage source for simulation");
|
|
3942
3960
|
expectTypesMatch(true);
|
|
3943
3961
|
expectTypesMatch(true);
|
|
3944
3962
|
expectTypesMatch(true);
|
|
3945
3963
|
|
|
3946
3964
|
// src/simulation/simulation_current_source.ts
|
|
3947
|
-
import { z as
|
|
3948
|
-
var percentage2 =
|
|
3965
|
+
import { z as z182 } from "zod";
|
|
3966
|
+
var percentage2 = z182.union([z182.string(), z182.number()]).transform((val) => {
|
|
3949
3967
|
if (typeof val === "string") {
|
|
3950
3968
|
if (val.endsWith("%")) {
|
|
3951
3969
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -3954,32 +3972,32 @@ var percentage2 = z181.union([z181.string(), z181.number()]).transform((val) =>
|
|
|
3954
3972
|
}
|
|
3955
3973
|
return val;
|
|
3956
3974
|
}).pipe(
|
|
3957
|
-
|
|
3975
|
+
z182.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
3958
3976
|
);
|
|
3959
|
-
var simulation_dc_current_source =
|
|
3960
|
-
type:
|
|
3977
|
+
var simulation_dc_current_source = z182.object({
|
|
3978
|
+
type: z182.literal("simulation_current_source"),
|
|
3961
3979
|
simulation_current_source_id: getZodPrefixedIdWithDefault(
|
|
3962
3980
|
"simulation_current_source"
|
|
3963
3981
|
),
|
|
3964
|
-
is_dc_source:
|
|
3965
|
-
positive_source_port_id:
|
|
3966
|
-
negative_source_port_id:
|
|
3967
|
-
positive_source_net_id:
|
|
3968
|
-
negative_source_net_id:
|
|
3982
|
+
is_dc_source: z182.literal(true).optional().default(true),
|
|
3983
|
+
positive_source_port_id: z182.string().optional(),
|
|
3984
|
+
negative_source_port_id: z182.string().optional(),
|
|
3985
|
+
positive_source_net_id: z182.string().optional(),
|
|
3986
|
+
negative_source_net_id: z182.string().optional(),
|
|
3969
3987
|
current,
|
|
3970
3988
|
ac_magnitude: current.optional(),
|
|
3971
3989
|
ac_phase: rotation.optional()
|
|
3972
3990
|
}).describe("Defines a DC current source for simulation");
|
|
3973
|
-
var simulation_ac_current_source =
|
|
3974
|
-
type:
|
|
3991
|
+
var simulation_ac_current_source = z182.object({
|
|
3992
|
+
type: z182.literal("simulation_current_source"),
|
|
3975
3993
|
simulation_current_source_id: getZodPrefixedIdWithDefault(
|
|
3976
3994
|
"simulation_current_source"
|
|
3977
3995
|
),
|
|
3978
|
-
is_dc_source:
|
|
3979
|
-
terminal1_source_port_id:
|
|
3980
|
-
terminal2_source_port_id:
|
|
3981
|
-
terminal1_source_net_id:
|
|
3982
|
-
terminal2_source_net_id:
|
|
3996
|
+
is_dc_source: z182.literal(false),
|
|
3997
|
+
terminal1_source_port_id: z182.string().optional(),
|
|
3998
|
+
terminal2_source_port_id: z182.string().optional(),
|
|
3999
|
+
terminal1_source_net_id: z182.string().optional(),
|
|
4000
|
+
terminal2_source_net_id: z182.string().optional(),
|
|
3983
4001
|
current: current.optional(),
|
|
3984
4002
|
frequency: frequency.optional(),
|
|
3985
4003
|
peak_to_peak_current: current.optional(),
|
|
@@ -3989,58 +4007,58 @@ var simulation_ac_current_source = z181.object({
|
|
|
3989
4007
|
ac_magnitude: current.optional(),
|
|
3990
4008
|
ac_phase: rotation.optional()
|
|
3991
4009
|
}).describe("Defines an AC current source for simulation");
|
|
3992
|
-
var simulation_current_source =
|
|
4010
|
+
var simulation_current_source = z182.union([simulation_dc_current_source, simulation_ac_current_source]).describe("Defines a current source for simulation");
|
|
3993
4011
|
expectTypesMatch(true);
|
|
3994
4012
|
expectTypesMatch(true);
|
|
3995
4013
|
expectTypesMatch(true);
|
|
3996
4014
|
|
|
3997
4015
|
// src/simulation/simulation_experiment.ts
|
|
3998
|
-
import { z as
|
|
4016
|
+
import { z as z184 } from "zod";
|
|
3999
4017
|
|
|
4000
4018
|
// src/simulation/simulation_units.ts
|
|
4001
|
-
import { z as
|
|
4002
|
-
var simulation_dc_sweep_unit =
|
|
4019
|
+
import { z as z183 } from "zod";
|
|
4020
|
+
var simulation_dc_sweep_unit = z183.custom(
|
|
4003
4021
|
(dcSweepUnit) => dcSweepUnit === "V" || dcSweepUnit === "A"
|
|
4004
4022
|
);
|
|
4005
|
-
var simulation_parameter_unit =
|
|
4023
|
+
var simulation_parameter_unit = z183.custom(
|
|
4006
4024
|
(parameterUnit) => parameterUnit === "\u03A9" || parameterUnit === "F" || parameterUnit === "H" || parameterUnit === "V" || parameterUnit === "A"
|
|
4007
4025
|
);
|
|
4008
4026
|
|
|
4009
4027
|
// src/simulation/simulation_experiment.ts
|
|
4010
|
-
var experiment_type =
|
|
4011
|
-
|
|
4012
|
-
|
|
4013
|
-
|
|
4014
|
-
|
|
4028
|
+
var experiment_type = z184.union([
|
|
4029
|
+
z184.literal("spice_dc_sweep"),
|
|
4030
|
+
z184.literal("spice_dc_operating_point"),
|
|
4031
|
+
z184.literal("spice_transient_analysis"),
|
|
4032
|
+
z184.literal("spice_ac_analysis")
|
|
4015
4033
|
]);
|
|
4016
|
-
var spice_simulation_options =
|
|
4017
|
-
method:
|
|
4018
|
-
reltol:
|
|
4019
|
-
abstol:
|
|
4020
|
-
vntol:
|
|
4034
|
+
var spice_simulation_options = z184.object({
|
|
4035
|
+
method: z184.enum(["trap", "gear"]).optional(),
|
|
4036
|
+
reltol: z184.union([z184.number(), z184.string()]).optional(),
|
|
4037
|
+
abstol: z184.union([z184.number(), z184.string()]).optional(),
|
|
4038
|
+
vntol: z184.union([z184.number(), z184.string()]).optional()
|
|
4021
4039
|
}).describe("SPICE solver options for a simulation experiment");
|
|
4022
|
-
var simulation_experiment =
|
|
4023
|
-
type:
|
|
4040
|
+
var simulation_experiment = z184.object({
|
|
4041
|
+
type: z184.literal("simulation_experiment"),
|
|
4024
4042
|
simulation_experiment_id: getZodPrefixedIdWithDefault(
|
|
4025
4043
|
"simulation_experiment"
|
|
4026
4044
|
),
|
|
4027
|
-
name:
|
|
4045
|
+
name: z184.string(),
|
|
4028
4046
|
experiment_type,
|
|
4029
4047
|
time_per_step: duration_ms.optional(),
|
|
4030
4048
|
start_time_ms: ms.optional(),
|
|
4031
4049
|
end_time_ms: ms.optional(),
|
|
4032
4050
|
spice_options: spice_simulation_options.optional(),
|
|
4033
|
-
dc_sweep_voltage_source_id:
|
|
4034
|
-
dc_sweep_current_source_id:
|
|
4035
|
-
dc_sweep_start:
|
|
4036
|
-
dc_sweep_stop:
|
|
4037
|
-
dc_sweep_step:
|
|
4051
|
+
dc_sweep_voltage_source_id: z184.string().optional(),
|
|
4052
|
+
dc_sweep_current_source_id: z184.string().optional(),
|
|
4053
|
+
dc_sweep_start: z184.number().optional(),
|
|
4054
|
+
dc_sweep_stop: z184.number().optional(),
|
|
4055
|
+
dc_sweep_step: z184.number().refine((dcSweepStep) => dcSweepStep !== 0).optional(),
|
|
4038
4056
|
dc_sweep_unit: simulation_dc_sweep_unit.optional(),
|
|
4039
|
-
ac_sweep_type:
|
|
4040
|
-
ac_samples_per_interval:
|
|
4041
|
-
ac_sample_count:
|
|
4042
|
-
ac_start_frequency_hz:
|
|
4043
|
-
ac_stop_frequency_hz:
|
|
4057
|
+
ac_sweep_type: z184.enum(["linear", "decade", "octave"]).optional(),
|
|
4058
|
+
ac_samples_per_interval: z184.number().int().positive().optional(),
|
|
4059
|
+
ac_sample_count: z184.number().int().positive().optional(),
|
|
4060
|
+
ac_start_frequency_hz: z184.number().positive().optional(),
|
|
4061
|
+
ac_stop_frequency_hz: z184.number().positive().optional()
|
|
4044
4062
|
}).superRefine((experiment, context) => {
|
|
4045
4063
|
if (experiment.experiment_type === "spice_dc_sweep") {
|
|
4046
4064
|
const requiredFields = [
|
|
@@ -4052,7 +4070,7 @@ var simulation_experiment = z183.object({
|
|
|
4052
4070
|
for (const field of requiredFields) {
|
|
4053
4071
|
if (experiment[field] === void 0) {
|
|
4054
4072
|
context.addIssue({
|
|
4055
|
-
code:
|
|
4073
|
+
code: z184.ZodIssueCode.custom,
|
|
4056
4074
|
path: [field],
|
|
4057
4075
|
message: `${field} is required for a DC sweep`
|
|
4058
4076
|
});
|
|
@@ -4062,7 +4080,7 @@ var simulation_experiment = z183.object({
|
|
|
4062
4080
|
const hasCurrentSource = experiment.dc_sweep_current_source_id !== void 0;
|
|
4063
4081
|
if (hasVoltageSource === hasCurrentSource) {
|
|
4064
4082
|
context.addIssue({
|
|
4065
|
-
code:
|
|
4083
|
+
code: z184.ZodIssueCode.custom,
|
|
4066
4084
|
path: ["dc_sweep_voltage_source_id"],
|
|
4067
4085
|
message: "Exactly one DC sweep voltage or current source ID is required"
|
|
4068
4086
|
});
|
|
@@ -4071,35 +4089,35 @@ var simulation_experiment = z183.object({
|
|
|
4071
4089
|
if (experiment.experiment_type === "spice_ac_analysis") {
|
|
4072
4090
|
if (experiment.ac_sweep_type === void 0) {
|
|
4073
4091
|
context.addIssue({
|
|
4074
|
-
code:
|
|
4092
|
+
code: z184.ZodIssueCode.custom,
|
|
4075
4093
|
path: ["ac_sweep_type"],
|
|
4076
4094
|
message: "ac_sweep_type is required for an AC analysis"
|
|
4077
4095
|
});
|
|
4078
4096
|
}
|
|
4079
4097
|
if (experiment.ac_start_frequency_hz === void 0) {
|
|
4080
4098
|
context.addIssue({
|
|
4081
|
-
code:
|
|
4099
|
+
code: z184.ZodIssueCode.custom,
|
|
4082
4100
|
path: ["ac_start_frequency_hz"],
|
|
4083
4101
|
message: "ac_start_frequency_hz is required for an AC analysis"
|
|
4084
4102
|
});
|
|
4085
4103
|
}
|
|
4086
4104
|
if (experiment.ac_stop_frequency_hz === void 0) {
|
|
4087
4105
|
context.addIssue({
|
|
4088
|
-
code:
|
|
4106
|
+
code: z184.ZodIssueCode.custom,
|
|
4089
4107
|
path: ["ac_stop_frequency_hz"],
|
|
4090
4108
|
message: "ac_stop_frequency_hz is required for an AC analysis"
|
|
4091
4109
|
});
|
|
4092
4110
|
}
|
|
4093
4111
|
if (experiment.ac_sweep_type === "linear" && experiment.ac_sample_count === void 0) {
|
|
4094
4112
|
context.addIssue({
|
|
4095
|
-
code:
|
|
4113
|
+
code: z184.ZodIssueCode.custom,
|
|
4096
4114
|
path: ["ac_sample_count"],
|
|
4097
4115
|
message: "ac_sample_count is required for a linear AC analysis"
|
|
4098
4116
|
});
|
|
4099
4117
|
}
|
|
4100
4118
|
if ((experiment.ac_sweep_type === "decade" || experiment.ac_sweep_type === "octave") && experiment.ac_samples_per_interval === void 0) {
|
|
4101
4119
|
context.addIssue({
|
|
4102
|
-
code:
|
|
4120
|
+
code: z184.ZodIssueCode.custom,
|
|
4103
4121
|
path: ["ac_samples_per_interval"],
|
|
4104
4122
|
message: "ac_samples_per_interval is required for decade and octave AC analyses"
|
|
4105
4123
|
});
|
|
@@ -4109,87 +4127,87 @@ var simulation_experiment = z183.object({
|
|
|
4109
4127
|
expectTypesMatch(true);
|
|
4110
4128
|
|
|
4111
4129
|
// src/simulation/simulation_transient_voltage_graph.ts
|
|
4112
|
-
import { z as
|
|
4130
|
+
import { z as z186 } from "zod";
|
|
4113
4131
|
|
|
4114
4132
|
// src/simulation/simulation_parameter_sweep_coordinate.ts
|
|
4115
|
-
import { z as
|
|
4116
|
-
var simulation_parameter_sweep_coordinate =
|
|
4117
|
-
simulation_parameter_sweep_id:
|
|
4118
|
-
sweep_index:
|
|
4119
|
-
parameter_value:
|
|
4133
|
+
import { z as z185 } from "zod";
|
|
4134
|
+
var simulation_parameter_sweep_coordinate = z185.object({
|
|
4135
|
+
simulation_parameter_sweep_id: z185.string(),
|
|
4136
|
+
sweep_index: z185.number().int().nonnegative(),
|
|
4137
|
+
parameter_value: z185.number(),
|
|
4120
4138
|
parameter_unit: simulation_parameter_unit
|
|
4121
4139
|
});
|
|
4122
4140
|
expectTypesMatch(true);
|
|
4123
4141
|
|
|
4124
4142
|
// src/simulation/simulation_transient_voltage_graph.ts
|
|
4125
|
-
var simulation_transient_voltage_graph =
|
|
4126
|
-
type:
|
|
4143
|
+
var simulation_transient_voltage_graph = z186.object({
|
|
4144
|
+
type: z186.literal("simulation_transient_voltage_graph"),
|
|
4127
4145
|
simulation_transient_voltage_graph_id: getZodPrefixedIdWithDefault(
|
|
4128
4146
|
"simulation_transient_voltage_graph"
|
|
4129
4147
|
),
|
|
4130
|
-
simulation_experiment_id:
|
|
4148
|
+
simulation_experiment_id: z186.string(),
|
|
4131
4149
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4132
|
-
timestamps_ms:
|
|
4133
|
-
voltage_levels:
|
|
4134
|
-
source_component_id:
|
|
4135
|
-
subcircuit_connectivity_map_key:
|
|
4150
|
+
timestamps_ms: z186.array(z186.number()).optional(),
|
|
4151
|
+
voltage_levels: z186.array(z186.number()),
|
|
4152
|
+
source_component_id: z186.string().optional(),
|
|
4153
|
+
subcircuit_connectivity_map_key: z186.string().optional(),
|
|
4136
4154
|
time_per_step: duration_ms,
|
|
4137
4155
|
start_time_ms: ms,
|
|
4138
4156
|
end_time_ms: ms,
|
|
4139
|
-
name:
|
|
4140
|
-
color:
|
|
4157
|
+
name: z186.string().optional(),
|
|
4158
|
+
color: z186.string().optional()
|
|
4141
4159
|
}).describe("Stores voltage measurements over time for a simulation");
|
|
4142
4160
|
expectTypesMatch(true);
|
|
4143
4161
|
|
|
4144
4162
|
// src/simulation/simulation_transient_current_graph.ts
|
|
4145
|
-
import { z as
|
|
4146
|
-
var simulation_transient_current_graph =
|
|
4147
|
-
type:
|
|
4163
|
+
import { z as z187 } from "zod";
|
|
4164
|
+
var simulation_transient_current_graph = z187.object({
|
|
4165
|
+
type: z187.literal("simulation_transient_current_graph"),
|
|
4148
4166
|
simulation_transient_current_graph_id: getZodPrefixedIdWithDefault(
|
|
4149
4167
|
"simulation_transient_current_graph"
|
|
4150
4168
|
),
|
|
4151
|
-
simulation_experiment_id:
|
|
4169
|
+
simulation_experiment_id: z187.string(),
|
|
4152
4170
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4153
|
-
timestamps_ms:
|
|
4154
|
-
current_levels:
|
|
4155
|
-
source_component_id:
|
|
4156
|
-
subcircuit_connectivity_map_key:
|
|
4171
|
+
timestamps_ms: z187.array(z187.number()).optional(),
|
|
4172
|
+
current_levels: z187.array(z187.number()),
|
|
4173
|
+
source_component_id: z187.string().optional(),
|
|
4174
|
+
subcircuit_connectivity_map_key: z187.string().optional(),
|
|
4157
4175
|
time_per_step: duration_ms,
|
|
4158
4176
|
start_time_ms: ms,
|
|
4159
4177
|
end_time_ms: ms,
|
|
4160
|
-
name:
|
|
4161
|
-
color:
|
|
4178
|
+
name: z187.string().optional(),
|
|
4179
|
+
color: z187.string().optional()
|
|
4162
4180
|
}).describe("Stores current measurements over time for a simulation");
|
|
4163
4181
|
expectTypesMatch(true);
|
|
4164
4182
|
|
|
4165
4183
|
// src/simulation/simulation_switch.ts
|
|
4166
|
-
import { z as
|
|
4167
|
-
var simulation_switch =
|
|
4168
|
-
type:
|
|
4184
|
+
import { z as z188 } from "zod";
|
|
4185
|
+
var simulation_switch = z188.object({
|
|
4186
|
+
type: z188.literal("simulation_switch"),
|
|
4169
4187
|
simulation_switch_id: getZodPrefixedIdWithDefault("simulation_switch"),
|
|
4170
|
-
source_component_id:
|
|
4188
|
+
source_component_id: z188.string().optional(),
|
|
4171
4189
|
closes_at: ms.optional(),
|
|
4172
4190
|
opens_at: ms.optional(),
|
|
4173
|
-
starts_closed:
|
|
4191
|
+
starts_closed: z188.boolean().optional(),
|
|
4174
4192
|
switching_frequency: frequency.optional()
|
|
4175
4193
|
}).describe("Defines a switch for simulation timing control");
|
|
4176
4194
|
expectTypesMatch(true);
|
|
4177
4195
|
|
|
4178
4196
|
// src/simulation/simulation_voltage_probe.ts
|
|
4179
|
-
import { z as
|
|
4180
|
-
var simulation_voltage_probe =
|
|
4181
|
-
type:
|
|
4197
|
+
import { z as z189 } from "zod";
|
|
4198
|
+
var simulation_voltage_probe = z189.object({
|
|
4199
|
+
type: z189.literal("simulation_voltage_probe"),
|
|
4182
4200
|
simulation_voltage_probe_id: getZodPrefixedIdWithDefault(
|
|
4183
4201
|
"simulation_voltage_probe"
|
|
4184
4202
|
),
|
|
4185
|
-
source_component_id:
|
|
4186
|
-
name:
|
|
4187
|
-
signal_input_source_port_id:
|
|
4188
|
-
signal_input_source_net_id:
|
|
4189
|
-
reference_input_source_port_id:
|
|
4190
|
-
reference_input_source_net_id:
|
|
4191
|
-
subcircuit_id:
|
|
4192
|
-
color:
|
|
4203
|
+
source_component_id: z189.string().optional(),
|
|
4204
|
+
name: z189.string().optional(),
|
|
4205
|
+
signal_input_source_port_id: z189.string().optional(),
|
|
4206
|
+
signal_input_source_net_id: z189.string().optional(),
|
|
4207
|
+
reference_input_source_port_id: z189.string().optional(),
|
|
4208
|
+
reference_input_source_net_id: z189.string().optional(),
|
|
4209
|
+
subcircuit_id: z189.string().optional(),
|
|
4210
|
+
color: z189.string().optional()
|
|
4193
4211
|
}).describe(
|
|
4194
4212
|
"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."
|
|
4195
4213
|
).superRefine((data, ctx) => {
|
|
@@ -4199,20 +4217,20 @@ var simulation_voltage_probe = z188.object({
|
|
|
4199
4217
|
const has_nets = !!data.signal_input_source_net_id || !!data.reference_input_source_net_id;
|
|
4200
4218
|
if (has_ports && has_nets) {
|
|
4201
4219
|
ctx.addIssue({
|
|
4202
|
-
code:
|
|
4220
|
+
code: z189.ZodIssueCode.custom,
|
|
4203
4221
|
message: "Cannot mix port and net connections in a differential probe."
|
|
4204
4222
|
});
|
|
4205
4223
|
} else if (has_ports) {
|
|
4206
4224
|
if (!data.signal_input_source_port_id || !data.reference_input_source_port_id) {
|
|
4207
4225
|
ctx.addIssue({
|
|
4208
|
-
code:
|
|
4226
|
+
code: z189.ZodIssueCode.custom,
|
|
4209
4227
|
message: "Differential port probe requires both signal_input_source_port_id and reference_input_source_port_id."
|
|
4210
4228
|
});
|
|
4211
4229
|
}
|
|
4212
4230
|
} else if (has_nets) {
|
|
4213
4231
|
if (!data.signal_input_source_net_id || !data.reference_input_source_net_id) {
|
|
4214
4232
|
ctx.addIssue({
|
|
4215
|
-
code:
|
|
4233
|
+
code: z189.ZodIssueCode.custom,
|
|
4216
4234
|
message: "Differential net probe requires both signal_input_source_net_id and reference_input_source_net_id."
|
|
4217
4235
|
});
|
|
4218
4236
|
}
|
|
@@ -4220,7 +4238,7 @@ var simulation_voltage_probe = z188.object({
|
|
|
4220
4238
|
} else {
|
|
4221
4239
|
if (!!data.signal_input_source_port_id === !!data.signal_input_source_net_id) {
|
|
4222
4240
|
ctx.addIssue({
|
|
4223
|
-
code:
|
|
4241
|
+
code: z189.ZodIssueCode.custom,
|
|
4224
4242
|
message: "A voltage probe must have exactly one of signal_input_source_port_id or signal_input_source_net_id."
|
|
4225
4243
|
});
|
|
4226
4244
|
}
|
|
@@ -4229,20 +4247,20 @@ var simulation_voltage_probe = z188.object({
|
|
|
4229
4247
|
expectTypesMatch(true);
|
|
4230
4248
|
|
|
4231
4249
|
// src/simulation/simulation_current_probe.ts
|
|
4232
|
-
import { z as
|
|
4233
|
-
var simulation_current_probe =
|
|
4234
|
-
type:
|
|
4250
|
+
import { z as z190 } from "zod";
|
|
4251
|
+
var simulation_current_probe = z190.object({
|
|
4252
|
+
type: z190.literal("simulation_current_probe"),
|
|
4235
4253
|
simulation_current_probe_id: getZodPrefixedIdWithDefault(
|
|
4236
4254
|
"simulation_current_probe"
|
|
4237
4255
|
),
|
|
4238
|
-
source_component_id:
|
|
4239
|
-
name:
|
|
4240
|
-
positive_source_port_id:
|
|
4241
|
-
negative_source_port_id:
|
|
4242
|
-
positive_source_net_id:
|
|
4243
|
-
negative_source_net_id:
|
|
4244
|
-
subcircuit_id:
|
|
4245
|
-
color:
|
|
4256
|
+
source_component_id: z190.string().optional(),
|
|
4257
|
+
name: z190.string().optional(),
|
|
4258
|
+
positive_source_port_id: z190.string().optional(),
|
|
4259
|
+
negative_source_port_id: z190.string().optional(),
|
|
4260
|
+
positive_source_net_id: z190.string().optional(),
|
|
4261
|
+
negative_source_net_id: z190.string().optional(),
|
|
4262
|
+
subcircuit_id: z190.string().optional(),
|
|
4263
|
+
color: z190.string().optional()
|
|
4246
4264
|
}).describe(
|
|
4247
4265
|
"Defines a current probe for simulation. It measures current flowing from the positive endpoint to the negative endpoint."
|
|
4248
4266
|
).superRefine((data, ctx) => {
|
|
@@ -4254,7 +4272,7 @@ var simulation_current_probe = z189.object({
|
|
|
4254
4272
|
const hasNets = hasPositiveNet || hasNegativeNet;
|
|
4255
4273
|
if (hasPorts && hasNets) {
|
|
4256
4274
|
ctx.addIssue({
|
|
4257
|
-
code:
|
|
4275
|
+
code: z190.ZodIssueCode.custom,
|
|
4258
4276
|
message: "Cannot mix port and net connections in a current probe."
|
|
4259
4277
|
});
|
|
4260
4278
|
return;
|
|
@@ -4262,7 +4280,7 @@ var simulation_current_probe = z189.object({
|
|
|
4262
4280
|
if (hasPorts) {
|
|
4263
4281
|
if (!hasPositivePort || !hasNegativePort) {
|
|
4264
4282
|
ctx.addIssue({
|
|
4265
|
-
code:
|
|
4283
|
+
code: z190.ZodIssueCode.custom,
|
|
4266
4284
|
message: "Current probe using source ports requires both positive_source_port_id and negative_source_port_id."
|
|
4267
4285
|
});
|
|
4268
4286
|
}
|
|
@@ -4271,71 +4289,71 @@ var simulation_current_probe = z189.object({
|
|
|
4271
4289
|
if (hasNets) {
|
|
4272
4290
|
if (!hasPositiveNet || !hasNegativeNet) {
|
|
4273
4291
|
ctx.addIssue({
|
|
4274
|
-
code:
|
|
4292
|
+
code: z190.ZodIssueCode.custom,
|
|
4275
4293
|
message: "Current probe using source nets requires both positive_source_net_id and negative_source_net_id."
|
|
4276
4294
|
});
|
|
4277
4295
|
}
|
|
4278
4296
|
return;
|
|
4279
4297
|
}
|
|
4280
4298
|
ctx.addIssue({
|
|
4281
|
-
code:
|
|
4299
|
+
code: z190.ZodIssueCode.custom,
|
|
4282
4300
|
message: "A current probe must have either positive/negative source port ids or positive/negative source net ids."
|
|
4283
4301
|
});
|
|
4284
4302
|
});
|
|
4285
4303
|
expectTypesMatch(true);
|
|
4286
4304
|
|
|
4287
4305
|
// src/simulation/simulation_unknown_experiment_error.ts
|
|
4288
|
-
import { z as
|
|
4306
|
+
import { z as z191 } from "zod";
|
|
4289
4307
|
var simulation_unknown_experiment_error = base_circuit_json_error.extend({
|
|
4290
|
-
type:
|
|
4308
|
+
type: z191.literal("simulation_unknown_experiment_error"),
|
|
4291
4309
|
simulation_unknown_experiment_error_id: getZodPrefixedIdWithDefault(
|
|
4292
4310
|
"simulation_unknown_experiment_error"
|
|
4293
4311
|
),
|
|
4294
|
-
error_type:
|
|
4295
|
-
simulation_experiment_id:
|
|
4296
|
-
subcircuit_id:
|
|
4312
|
+
error_type: z191.literal("simulation_unknown_experiment_error").default("simulation_unknown_experiment_error"),
|
|
4313
|
+
simulation_experiment_id: z191.string().optional(),
|
|
4314
|
+
subcircuit_id: z191.string().optional()
|
|
4297
4315
|
}).describe("An unknown error occurred during the simulation experiment.");
|
|
4298
4316
|
expectTypesMatch(true);
|
|
4299
4317
|
|
|
4300
4318
|
// src/simulation/simulation_parameter_sweep.ts
|
|
4301
|
-
import { z as
|
|
4302
|
-
var simulation_parameter_type =
|
|
4319
|
+
import { z as z192 } from "zod";
|
|
4320
|
+
var simulation_parameter_type = z192.enum([
|
|
4303
4321
|
"resistance",
|
|
4304
4322
|
"capacitance",
|
|
4305
4323
|
"inductance",
|
|
4306
4324
|
"voltage",
|
|
4307
4325
|
"current"
|
|
4308
4326
|
]);
|
|
4309
|
-
var simulation_parameter_sweep_base =
|
|
4310
|
-
type:
|
|
4327
|
+
var simulation_parameter_sweep_base = z192.object({
|
|
4328
|
+
type: z192.literal("simulation_parameter_sweep"),
|
|
4311
4329
|
simulation_parameter_sweep_id: getZodPrefixedIdWithDefault(
|
|
4312
4330
|
"simulation_parameter_sweep"
|
|
4313
4331
|
),
|
|
4314
|
-
simulation_experiment_id:
|
|
4315
|
-
name:
|
|
4316
|
-
parameter_values:
|
|
4332
|
+
simulation_experiment_id: z192.string(),
|
|
4333
|
+
name: z192.string().optional(),
|
|
4334
|
+
parameter_values: z192.array(z192.number()).min(1),
|
|
4317
4335
|
parameter_unit: simulation_parameter_unit
|
|
4318
4336
|
});
|
|
4319
|
-
var simulation_parameter_sweep =
|
|
4337
|
+
var simulation_parameter_sweep = z192.discriminatedUnion("parameter_type", [
|
|
4320
4338
|
simulation_parameter_sweep_base.extend({
|
|
4321
|
-
parameter_type:
|
|
4322
|
-
resistor_source_component_id:
|
|
4339
|
+
parameter_type: z192.literal("resistance"),
|
|
4340
|
+
resistor_source_component_id: z192.string()
|
|
4323
4341
|
}),
|
|
4324
4342
|
simulation_parameter_sweep_base.extend({
|
|
4325
|
-
parameter_type:
|
|
4326
|
-
capacitor_source_component_id:
|
|
4343
|
+
parameter_type: z192.literal("capacitance"),
|
|
4344
|
+
capacitor_source_component_id: z192.string()
|
|
4327
4345
|
}),
|
|
4328
4346
|
simulation_parameter_sweep_base.extend({
|
|
4329
|
-
parameter_type:
|
|
4330
|
-
inductor_source_component_id:
|
|
4347
|
+
parameter_type: z192.literal("inductance"),
|
|
4348
|
+
inductor_source_component_id: z192.string()
|
|
4331
4349
|
}),
|
|
4332
4350
|
simulation_parameter_sweep_base.extend({
|
|
4333
|
-
parameter_type:
|
|
4334
|
-
source_net_id:
|
|
4351
|
+
parameter_type: z192.literal("voltage"),
|
|
4352
|
+
source_net_id: z192.string()
|
|
4335
4353
|
}),
|
|
4336
4354
|
simulation_parameter_sweep_base.extend({
|
|
4337
|
-
parameter_type:
|
|
4338
|
-
current_source_component_id:
|
|
4355
|
+
parameter_type: z192.literal("current"),
|
|
4356
|
+
current_source_component_id: z192.string()
|
|
4339
4357
|
})
|
|
4340
4358
|
]).describe("Repeats a simulation experiment over component parameter values");
|
|
4341
4359
|
expectTypesMatch(
|
|
@@ -4343,52 +4361,52 @@ expectTypesMatch(
|
|
|
4343
4361
|
);
|
|
4344
4362
|
|
|
4345
4363
|
// src/simulation/simulation_dc_operating_point_voltage.ts
|
|
4346
|
-
import { z as
|
|
4347
|
-
var simulation_dc_operating_point_voltage =
|
|
4348
|
-
type:
|
|
4364
|
+
import { z as z193 } from "zod";
|
|
4365
|
+
var simulation_dc_operating_point_voltage = z193.object({
|
|
4366
|
+
type: z193.literal("simulation_dc_operating_point_voltage"),
|
|
4349
4367
|
simulation_dc_operating_point_voltage_id: getZodPrefixedIdWithDefault(
|
|
4350
4368
|
"simulation_dc_operating_point_voltage"
|
|
4351
4369
|
),
|
|
4352
|
-
simulation_experiment_id:
|
|
4370
|
+
simulation_experiment_id: z193.string(),
|
|
4353
4371
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4354
|
-
simulation_voltage_probe_id:
|
|
4355
|
-
voltage:
|
|
4356
|
-
name:
|
|
4357
|
-
color:
|
|
4372
|
+
simulation_voltage_probe_id: z193.string(),
|
|
4373
|
+
voltage: z193.number(),
|
|
4374
|
+
name: z193.string().optional(),
|
|
4375
|
+
color: z193.string().optional()
|
|
4358
4376
|
});
|
|
4359
4377
|
expectTypesMatch(true);
|
|
4360
4378
|
|
|
4361
4379
|
// src/simulation/simulation_dc_operating_point_current.ts
|
|
4362
|
-
import { z as
|
|
4363
|
-
var simulation_dc_operating_point_current =
|
|
4364
|
-
type:
|
|
4380
|
+
import { z as z194 } from "zod";
|
|
4381
|
+
var simulation_dc_operating_point_current = z194.object({
|
|
4382
|
+
type: z194.literal("simulation_dc_operating_point_current"),
|
|
4365
4383
|
simulation_dc_operating_point_current_id: getZodPrefixedIdWithDefault(
|
|
4366
4384
|
"simulation_dc_operating_point_current"
|
|
4367
4385
|
),
|
|
4368
|
-
simulation_experiment_id:
|
|
4386
|
+
simulation_experiment_id: z194.string(),
|
|
4369
4387
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4370
|
-
simulation_current_probe_id:
|
|
4371
|
-
current:
|
|
4372
|
-
name:
|
|
4373
|
-
color:
|
|
4388
|
+
simulation_current_probe_id: z194.string(),
|
|
4389
|
+
current: z194.number(),
|
|
4390
|
+
name: z194.string().optional(),
|
|
4391
|
+
color: z194.string().optional()
|
|
4374
4392
|
});
|
|
4375
4393
|
expectTypesMatch(true);
|
|
4376
4394
|
|
|
4377
4395
|
// src/simulation/simulation_dc_sweep_voltage_graph.ts
|
|
4378
|
-
import { z as
|
|
4379
|
-
var simulation_dc_sweep_voltage_graph =
|
|
4380
|
-
type:
|
|
4396
|
+
import { z as z195 } from "zod";
|
|
4397
|
+
var simulation_dc_sweep_voltage_graph = z195.object({
|
|
4398
|
+
type: z195.literal("simulation_dc_sweep_voltage_graph"),
|
|
4381
4399
|
simulation_dc_sweep_voltage_graph_id: getZodPrefixedIdWithDefault(
|
|
4382
4400
|
"simulation_dc_sweep_voltage_graph"
|
|
4383
4401
|
),
|
|
4384
|
-
simulation_experiment_id:
|
|
4402
|
+
simulation_experiment_id: z195.string(),
|
|
4385
4403
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4386
|
-
simulation_voltage_probe_id:
|
|
4387
|
-
sweep_values:
|
|
4404
|
+
simulation_voltage_probe_id: z195.string(),
|
|
4405
|
+
sweep_values: z195.array(z195.number()),
|
|
4388
4406
|
sweep_unit: simulation_dc_sweep_unit,
|
|
4389
|
-
voltage_levels:
|
|
4390
|
-
name:
|
|
4391
|
-
color:
|
|
4407
|
+
voltage_levels: z195.array(z195.number()),
|
|
4408
|
+
name: z195.string().optional(),
|
|
4409
|
+
color: z195.string().optional()
|
|
4392
4410
|
}).refine(
|
|
4393
4411
|
(graph) => graph.sweep_values.length === graph.voltage_levels.length,
|
|
4394
4412
|
{
|
|
@@ -4398,20 +4416,20 @@ var simulation_dc_sweep_voltage_graph = z194.object({
|
|
|
4398
4416
|
expectTypesMatch(true);
|
|
4399
4417
|
|
|
4400
4418
|
// src/simulation/simulation_dc_sweep_current_graph.ts
|
|
4401
|
-
import { z as
|
|
4402
|
-
var simulation_dc_sweep_current_graph =
|
|
4403
|
-
type:
|
|
4419
|
+
import { z as z196 } from "zod";
|
|
4420
|
+
var simulation_dc_sweep_current_graph = z196.object({
|
|
4421
|
+
type: z196.literal("simulation_dc_sweep_current_graph"),
|
|
4404
4422
|
simulation_dc_sweep_current_graph_id: getZodPrefixedIdWithDefault(
|
|
4405
4423
|
"simulation_dc_sweep_current_graph"
|
|
4406
4424
|
),
|
|
4407
|
-
simulation_experiment_id:
|
|
4425
|
+
simulation_experiment_id: z196.string(),
|
|
4408
4426
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4409
|
-
simulation_current_probe_id:
|
|
4410
|
-
sweep_values:
|
|
4427
|
+
simulation_current_probe_id: z196.string(),
|
|
4428
|
+
sweep_values: z196.array(z196.number()),
|
|
4411
4429
|
sweep_unit: simulation_dc_sweep_unit,
|
|
4412
|
-
current_levels:
|
|
4413
|
-
name:
|
|
4414
|
-
color:
|
|
4430
|
+
current_levels: z196.array(z196.number()),
|
|
4431
|
+
name: z196.string().optional(),
|
|
4432
|
+
color: z196.string().optional()
|
|
4415
4433
|
}).refine(
|
|
4416
4434
|
(graph) => graph.sweep_values.length === graph.current_levels.length,
|
|
4417
4435
|
{
|
|
@@ -4421,29 +4439,29 @@ var simulation_dc_sweep_current_graph = z195.object({
|
|
|
4421
4439
|
expectTypesMatch(true);
|
|
4422
4440
|
|
|
4423
4441
|
// src/simulation/simulation_ac_sweep_voltage_graph.ts
|
|
4424
|
-
import { z as
|
|
4442
|
+
import { z as z198 } from "zod";
|
|
4425
4443
|
|
|
4426
4444
|
// src/simulation/simulation_complex_sample.ts
|
|
4427
|
-
import { z as
|
|
4428
|
-
var simulation_complex_sample =
|
|
4429
|
-
re:
|
|
4430
|
-
im:
|
|
4445
|
+
import { z as z197 } from "zod";
|
|
4446
|
+
var simulation_complex_sample = z197.object({
|
|
4447
|
+
re: z197.number(),
|
|
4448
|
+
im: z197.number()
|
|
4431
4449
|
});
|
|
4432
4450
|
expectTypesMatch(true);
|
|
4433
4451
|
|
|
4434
4452
|
// src/simulation/simulation_ac_sweep_voltage_graph.ts
|
|
4435
|
-
var simulation_ac_sweep_voltage_graph =
|
|
4436
|
-
type:
|
|
4453
|
+
var simulation_ac_sweep_voltage_graph = z198.object({
|
|
4454
|
+
type: z198.literal("simulation_ac_sweep_voltage_graph"),
|
|
4437
4455
|
simulation_ac_sweep_voltage_graph_id: getZodPrefixedIdWithDefault(
|
|
4438
4456
|
"simulation_ac_sweep_voltage_graph"
|
|
4439
4457
|
),
|
|
4440
|
-
simulation_experiment_id:
|
|
4458
|
+
simulation_experiment_id: z198.string(),
|
|
4441
4459
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4442
|
-
simulation_voltage_probe_id:
|
|
4443
|
-
frequencies_hz:
|
|
4444
|
-
complex_voltages:
|
|
4445
|
-
name:
|
|
4446
|
-
color:
|
|
4460
|
+
simulation_voltage_probe_id: z198.string(),
|
|
4461
|
+
frequencies_hz: z198.array(z198.number()),
|
|
4462
|
+
complex_voltages: z198.array(simulation_complex_sample),
|
|
4463
|
+
name: z198.string().optional(),
|
|
4464
|
+
color: z198.string().optional()
|
|
4447
4465
|
}).refine(
|
|
4448
4466
|
(graph) => graph.frequencies_hz.length === graph.complex_voltages.length,
|
|
4449
4467
|
{
|
|
@@ -4453,19 +4471,19 @@ var simulation_ac_sweep_voltage_graph = z197.object({
|
|
|
4453
4471
|
expectTypesMatch(true);
|
|
4454
4472
|
|
|
4455
4473
|
// src/simulation/simulation_ac_sweep_current_graph.ts
|
|
4456
|
-
import { z as
|
|
4457
|
-
var simulation_ac_sweep_current_graph =
|
|
4458
|
-
type:
|
|
4474
|
+
import { z as z199 } from "zod";
|
|
4475
|
+
var simulation_ac_sweep_current_graph = z199.object({
|
|
4476
|
+
type: z199.literal("simulation_ac_sweep_current_graph"),
|
|
4459
4477
|
simulation_ac_sweep_current_graph_id: getZodPrefixedIdWithDefault(
|
|
4460
4478
|
"simulation_ac_sweep_current_graph"
|
|
4461
4479
|
),
|
|
4462
|
-
simulation_experiment_id:
|
|
4480
|
+
simulation_experiment_id: z199.string(),
|
|
4463
4481
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4464
|
-
simulation_current_probe_id:
|
|
4465
|
-
frequencies_hz:
|
|
4466
|
-
complex_currents:
|
|
4467
|
-
name:
|
|
4468
|
-
color:
|
|
4482
|
+
simulation_current_probe_id: z199.string(),
|
|
4483
|
+
frequencies_hz: z199.array(z199.number()),
|
|
4484
|
+
complex_currents: z199.array(simulation_complex_sample),
|
|
4485
|
+
name: z199.string().optional(),
|
|
4486
|
+
color: z199.string().optional()
|
|
4469
4487
|
}).refine(
|
|
4470
4488
|
(graph) => graph.frequencies_hz.length === graph.complex_currents.length,
|
|
4471
4489
|
{
|
|
@@ -4475,52 +4493,52 @@ var simulation_ac_sweep_current_graph = z198.object({
|
|
|
4475
4493
|
expectTypesMatch(true);
|
|
4476
4494
|
|
|
4477
4495
|
// src/simulation/simulation_op_amp.ts
|
|
4478
|
-
import { z as
|
|
4479
|
-
var simulation_op_amp =
|
|
4480
|
-
type:
|
|
4496
|
+
import { z as z200 } from "zod";
|
|
4497
|
+
var simulation_op_amp = z200.object({
|
|
4498
|
+
type: z200.literal("simulation_op_amp"),
|
|
4481
4499
|
simulation_op_amp_id: getZodPrefixedIdWithDefault("simulation_op_amp"),
|
|
4482
|
-
source_component_id:
|
|
4483
|
-
inverting_input_source_port_id:
|
|
4484
|
-
non_inverting_input_source_port_id:
|
|
4485
|
-
output_source_port_id:
|
|
4486
|
-
positive_supply_source_port_id:
|
|
4487
|
-
negative_supply_source_port_id:
|
|
4500
|
+
source_component_id: z200.string().optional(),
|
|
4501
|
+
inverting_input_source_port_id: z200.string(),
|
|
4502
|
+
non_inverting_input_source_port_id: z200.string(),
|
|
4503
|
+
output_source_port_id: z200.string(),
|
|
4504
|
+
positive_supply_source_port_id: z200.string(),
|
|
4505
|
+
negative_supply_source_port_id: z200.string()
|
|
4488
4506
|
}).describe("Defines a simple ideal operational amplifier for simulation");
|
|
4489
4507
|
expectTypesMatch(true);
|
|
4490
4508
|
|
|
4491
4509
|
// src/simulation/simulation_spice_subcircuit.ts
|
|
4492
|
-
import { z as
|
|
4493
|
-
var simulation_spice_subcircuit =
|
|
4494
|
-
type:
|
|
4510
|
+
import { z as z201 } from "zod";
|
|
4511
|
+
var simulation_spice_subcircuit = z201.object({
|
|
4512
|
+
type: z201.literal("simulation_spice_subcircuit"),
|
|
4495
4513
|
simulation_spice_subcircuit_id: getZodPrefixedIdWithDefault(
|
|
4496
4514
|
"simulation_spice_subcircuit"
|
|
4497
4515
|
),
|
|
4498
|
-
source_component_id:
|
|
4499
|
-
spice_pin_to_source_port_map:
|
|
4500
|
-
subcircuit_source:
|
|
4516
|
+
source_component_id: z201.string(),
|
|
4517
|
+
spice_pin_to_source_port_map: z201.record(z201.string(), z201.string()),
|
|
4518
|
+
subcircuit_source: z201.string()
|
|
4501
4519
|
}).describe("Defines a custom SPICE subcircuit model for simulation");
|
|
4502
4520
|
expectTypesMatch(
|
|
4503
4521
|
true
|
|
4504
4522
|
);
|
|
4505
4523
|
|
|
4506
4524
|
// src/simulation/simulation_oscilloscope_trace.ts
|
|
4507
|
-
import { z as
|
|
4525
|
+
import { z as z202 } from "zod";
|
|
4508
4526
|
var hasValue = (value) => value !== void 0;
|
|
4509
|
-
var simulation_oscilloscope_trace =
|
|
4510
|
-
type:
|
|
4527
|
+
var simulation_oscilloscope_trace = z202.object({
|
|
4528
|
+
type: z202.literal("simulation_oscilloscope_trace"),
|
|
4511
4529
|
simulation_oscilloscope_trace_id: getZodPrefixedIdWithDefault(
|
|
4512
4530
|
"simulation_oscilloscope_trace"
|
|
4513
4531
|
),
|
|
4514
|
-
simulation_transient_voltage_graph_id:
|
|
4515
|
-
simulation_transient_current_graph_id:
|
|
4516
|
-
simulation_voltage_probe_id:
|
|
4517
|
-
simulation_current_probe_id:
|
|
4518
|
-
display_name:
|
|
4519
|
-
color:
|
|
4520
|
-
display_center_value:
|
|
4521
|
-
display_center_offset_divs:
|
|
4522
|
-
volts_per_div:
|
|
4523
|
-
amps_per_div:
|
|
4532
|
+
simulation_transient_voltage_graph_id: z202.string().optional(),
|
|
4533
|
+
simulation_transient_current_graph_id: z202.string().optional(),
|
|
4534
|
+
simulation_voltage_probe_id: z202.string().optional(),
|
|
4535
|
+
simulation_current_probe_id: z202.string().optional(),
|
|
4536
|
+
display_name: z202.string().optional(),
|
|
4537
|
+
color: z202.string().optional(),
|
|
4538
|
+
display_center_value: z202.number().optional(),
|
|
4539
|
+
display_center_offset_divs: z202.number().optional(),
|
|
4540
|
+
volts_per_div: z202.number().positive().optional(),
|
|
4541
|
+
amps_per_div: z202.number().positive().optional()
|
|
4524
4542
|
}).describe(
|
|
4525
4543
|
"Defines how a simulation measurement is rendered as an oscilloscope-style trace."
|
|
4526
4544
|
).superRefine((data, ctx) => {
|
|
@@ -4534,19 +4552,19 @@ var simulation_oscilloscope_trace = z201.object({
|
|
|
4534
4552
|
].filter(hasValue).length;
|
|
4535
4553
|
if (voltageReferences + currentReferences !== 1) {
|
|
4536
4554
|
ctx.addIssue({
|
|
4537
|
-
code:
|
|
4555
|
+
code: z202.ZodIssueCode.custom,
|
|
4538
4556
|
message: "An oscilloscope trace must reference exactly one voltage graph, current graph, voltage probe, or current probe."
|
|
4539
4557
|
});
|
|
4540
4558
|
}
|
|
4541
4559
|
if (voltageReferences > 0 && data.amps_per_div !== void 0) {
|
|
4542
4560
|
ctx.addIssue({
|
|
4543
|
-
code:
|
|
4561
|
+
code: z202.ZodIssueCode.custom,
|
|
4544
4562
|
message: "Voltage oscilloscope traces must use volts_per_div, not amps_per_div."
|
|
4545
4563
|
});
|
|
4546
4564
|
}
|
|
4547
4565
|
if (currentReferences > 0 && data.volts_per_div !== void 0) {
|
|
4548
4566
|
ctx.addIssue({
|
|
4549
|
-
code:
|
|
4567
|
+
code: z202.ZodIssueCode.custom,
|
|
4550
4568
|
message: "Current oscilloscope traces must use amps_per_div, not volts_per_div."
|
|
4551
4569
|
});
|
|
4552
4570
|
}
|
|
@@ -4554,8 +4572,8 @@ var simulation_oscilloscope_trace = z201.object({
|
|
|
4554
4572
|
expectTypesMatch(true);
|
|
4555
4573
|
|
|
4556
4574
|
// src/any_circuit_element.ts
|
|
4557
|
-
import { z as
|
|
4558
|
-
var any_circuit_element =
|
|
4575
|
+
import { z as z203 } from "zod";
|
|
4576
|
+
var any_circuit_element = z203.union([
|
|
4559
4577
|
source_trace,
|
|
4560
4578
|
source_port,
|
|
4561
4579
|
source_component_internal_connection,
|
|
@@ -4610,6 +4628,7 @@ var any_circuit_element = z202.union([
|
|
|
4610
4628
|
pcb_connector_not_in_accessible_orientation_warning,
|
|
4611
4629
|
pcb_component_missing_courtyard_warning,
|
|
4612
4630
|
supplier_footprint_mismatch_warning,
|
|
4631
|
+
pcb_fabricator_extra_charge_warning,
|
|
4613
4632
|
pcb_plated_hole,
|
|
4614
4633
|
pcb_keepout,
|
|
4615
4634
|
pcb_port,
|
|
@@ -4806,6 +4825,7 @@ export {
|
|
|
4806
4825
|
pcb_fabrication_note_path,
|
|
4807
4826
|
pcb_fabrication_note_rect,
|
|
4808
4827
|
pcb_fabrication_note_text,
|
|
4828
|
+
pcb_fabricator_extra_charge_warning,
|
|
4809
4829
|
pcb_footprint_overlap_error,
|
|
4810
4830
|
pcb_ground_plane,
|
|
4811
4831
|
pcb_ground_plane_region,
|