circuit-json 0.0.429 → 0.0.431
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 +48 -0
- package/dist/index.d.mts +264 -16
- package/dist/index.mjs +152 -116
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -3497,8 +3497,25 @@ var pcb_courtyard_circle = z158.object({
|
|
|
3497
3497
|
}).describe("Defines a courtyard circle on the PCB");
|
|
3498
3498
|
expectTypesMatch(true);
|
|
3499
3499
|
|
|
3500
|
-
// src/
|
|
3500
|
+
// src/pcb/pcb_courtyard_pill.ts
|
|
3501
3501
|
import { z as z159 } from "zod";
|
|
3502
|
+
var pcb_courtyard_pill = z159.object({
|
|
3503
|
+
type: z159.literal("pcb_courtyard_pill"),
|
|
3504
|
+
pcb_courtyard_pill_id: getZodPrefixedIdWithDefault("pcb_courtyard_pill"),
|
|
3505
|
+
pcb_component_id: z159.string(),
|
|
3506
|
+
pcb_group_id: z159.string().optional(),
|
|
3507
|
+
subcircuit_id: z159.string().optional(),
|
|
3508
|
+
center: point,
|
|
3509
|
+
width: length,
|
|
3510
|
+
height: length,
|
|
3511
|
+
radius: length,
|
|
3512
|
+
layer: visible_layer,
|
|
3513
|
+
color: z159.string().optional()
|
|
3514
|
+
}).describe("Defines a courtyard pill on the PCB");
|
|
3515
|
+
expectTypesMatch(true);
|
|
3516
|
+
|
|
3517
|
+
// src/cad/cad_component.ts
|
|
3518
|
+
import { z as z160 } from "zod";
|
|
3502
3519
|
|
|
3503
3520
|
// src/cad/cad_model_conventions.ts
|
|
3504
3521
|
var cad_model_formats = [
|
|
@@ -3529,49 +3546,49 @@ var cadModelDefaultDirectionMap = {
|
|
|
3529
3546
|
};
|
|
3530
3547
|
|
|
3531
3548
|
// src/cad/cad_component.ts
|
|
3532
|
-
var cad_component =
|
|
3533
|
-
type:
|
|
3534
|
-
cad_component_id:
|
|
3535
|
-
pcb_component_id:
|
|
3536
|
-
source_component_id:
|
|
3549
|
+
var cad_component = z160.object({
|
|
3550
|
+
type: z160.literal("cad_component"),
|
|
3551
|
+
cad_component_id: z160.string(),
|
|
3552
|
+
pcb_component_id: z160.string(),
|
|
3553
|
+
source_component_id: z160.string(),
|
|
3537
3554
|
position: point3,
|
|
3538
3555
|
rotation: point3.optional(),
|
|
3539
3556
|
size: point3.optional(),
|
|
3540
3557
|
layer: layer_ref.optional(),
|
|
3541
|
-
subcircuit_id:
|
|
3558
|
+
subcircuit_id: z160.string().optional(),
|
|
3542
3559
|
// These are all ways to generate/load the 3d model
|
|
3543
|
-
footprinter_string:
|
|
3544
|
-
model_obj_url:
|
|
3545
|
-
model_stl_url:
|
|
3546
|
-
model_3mf_url:
|
|
3547
|
-
model_gltf_url:
|
|
3548
|
-
model_glb_url:
|
|
3549
|
-
model_step_url:
|
|
3550
|
-
model_wrl_url:
|
|
3560
|
+
footprinter_string: z160.string().optional(),
|
|
3561
|
+
model_obj_url: z160.string().optional(),
|
|
3562
|
+
model_stl_url: z160.string().optional(),
|
|
3563
|
+
model_3mf_url: z160.string().optional(),
|
|
3564
|
+
model_gltf_url: z160.string().optional(),
|
|
3565
|
+
model_glb_url: z160.string().optional(),
|
|
3566
|
+
model_step_url: z160.string().optional(),
|
|
3567
|
+
model_wrl_url: z160.string().optional(),
|
|
3551
3568
|
model_asset: asset.optional(),
|
|
3552
|
-
model_unit_to_mm_scale_factor:
|
|
3553
|
-
model_board_normal_direction:
|
|
3569
|
+
model_unit_to_mm_scale_factor: z160.number().optional(),
|
|
3570
|
+
model_board_normal_direction: z160.enum(cad_model_axis_directions).optional().describe(
|
|
3554
3571
|
`The direction in the model's coordinate space that is considered "up" or "coming out of the board surface"`
|
|
3555
3572
|
),
|
|
3556
3573
|
model_origin_position: point3.optional(),
|
|
3557
|
-
model_origin_alignment:
|
|
3574
|
+
model_origin_alignment: z160.enum([
|
|
3558
3575
|
"unknown",
|
|
3559
3576
|
"center",
|
|
3560
3577
|
"center_of_component_on_board_surface",
|
|
3561
3578
|
"bottom_center_of_component"
|
|
3562
3579
|
]).optional(),
|
|
3563
|
-
model_object_fit:
|
|
3564
|
-
model_jscad:
|
|
3565
|
-
show_as_translucent_model:
|
|
3566
|
-
show_as_bounding_box:
|
|
3567
|
-
anchor_alignment:
|
|
3580
|
+
model_object_fit: z160.enum(["contain_within_bounds", "fill_bounds"]).optional().default("contain_within_bounds"),
|
|
3581
|
+
model_jscad: z160.any().optional(),
|
|
3582
|
+
show_as_translucent_model: z160.boolean().optional(),
|
|
3583
|
+
show_as_bounding_box: z160.boolean().optional(),
|
|
3584
|
+
anchor_alignment: z160.enum(["center", "center_of_component_on_board_surface"]).optional().default("center")
|
|
3568
3585
|
}).describe("Defines a component on the PCB");
|
|
3569
3586
|
expectTypesMatch(true);
|
|
3570
3587
|
|
|
3571
3588
|
// src/simulation/simulation_voltage_source.ts
|
|
3572
|
-
import { z as
|
|
3573
|
-
var wave_shape =
|
|
3574
|
-
var percentage =
|
|
3589
|
+
import { z as z161 } from "zod";
|
|
3590
|
+
var wave_shape = z161.enum(["sinewave", "square", "triangle", "sawtooth"]);
|
|
3591
|
+
var percentage = z161.union([z161.string(), z161.number()]).transform((val) => {
|
|
3575
3592
|
if (typeof val === "string") {
|
|
3576
3593
|
if (val.endsWith("%")) {
|
|
3577
3594
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -3580,30 +3597,30 @@ var percentage = z160.union([z160.string(), z160.number()]).transform((val) => {
|
|
|
3580
3597
|
}
|
|
3581
3598
|
return val;
|
|
3582
3599
|
}).pipe(
|
|
3583
|
-
|
|
3600
|
+
z161.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
3584
3601
|
);
|
|
3585
|
-
var simulation_dc_voltage_source =
|
|
3586
|
-
type:
|
|
3602
|
+
var simulation_dc_voltage_source = z161.object({
|
|
3603
|
+
type: z161.literal("simulation_voltage_source"),
|
|
3587
3604
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
3588
3605
|
"simulation_voltage_source"
|
|
3589
3606
|
),
|
|
3590
|
-
is_dc_source:
|
|
3591
|
-
positive_source_port_id:
|
|
3592
|
-
negative_source_port_id:
|
|
3593
|
-
positive_source_net_id:
|
|
3594
|
-
negative_source_net_id:
|
|
3607
|
+
is_dc_source: z161.literal(true).optional().default(true),
|
|
3608
|
+
positive_source_port_id: z161.string().optional(),
|
|
3609
|
+
negative_source_port_id: z161.string().optional(),
|
|
3610
|
+
positive_source_net_id: z161.string().optional(),
|
|
3611
|
+
negative_source_net_id: z161.string().optional(),
|
|
3595
3612
|
voltage
|
|
3596
3613
|
}).describe("Defines a DC voltage source for simulation");
|
|
3597
|
-
var simulation_ac_voltage_source =
|
|
3598
|
-
type:
|
|
3614
|
+
var simulation_ac_voltage_source = z161.object({
|
|
3615
|
+
type: z161.literal("simulation_voltage_source"),
|
|
3599
3616
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
3600
3617
|
"simulation_voltage_source"
|
|
3601
3618
|
),
|
|
3602
|
-
is_dc_source:
|
|
3603
|
-
terminal1_source_port_id:
|
|
3604
|
-
terminal2_source_port_id:
|
|
3605
|
-
terminal1_source_net_id:
|
|
3606
|
-
terminal2_source_net_id:
|
|
3619
|
+
is_dc_source: z161.literal(false),
|
|
3620
|
+
terminal1_source_port_id: z161.string().optional(),
|
|
3621
|
+
terminal2_source_port_id: z161.string().optional(),
|
|
3622
|
+
terminal1_source_net_id: z161.string().optional(),
|
|
3623
|
+
terminal2_source_net_id: z161.string().optional(),
|
|
3607
3624
|
voltage: voltage.optional(),
|
|
3608
3625
|
frequency: frequency.optional(),
|
|
3609
3626
|
peak_to_peak_voltage: voltage.optional(),
|
|
@@ -3611,14 +3628,14 @@ var simulation_ac_voltage_source = z160.object({
|
|
|
3611
3628
|
phase: rotation.optional(),
|
|
3612
3629
|
duty_cycle: percentage.optional()
|
|
3613
3630
|
}).describe("Defines an AC voltage source for simulation");
|
|
3614
|
-
var simulation_voltage_source =
|
|
3631
|
+
var simulation_voltage_source = z161.union([simulation_dc_voltage_source, simulation_ac_voltage_source]).describe("Defines a voltage source for simulation");
|
|
3615
3632
|
expectTypesMatch(true);
|
|
3616
3633
|
expectTypesMatch(true);
|
|
3617
3634
|
expectTypesMatch(true);
|
|
3618
3635
|
|
|
3619
3636
|
// src/simulation/simulation_current_source.ts
|
|
3620
|
-
import { z as
|
|
3621
|
-
var percentage2 =
|
|
3637
|
+
import { z as z162 } from "zod";
|
|
3638
|
+
var percentage2 = z162.union([z162.string(), z162.number()]).transform((val) => {
|
|
3622
3639
|
if (typeof val === "string") {
|
|
3623
3640
|
if (val.endsWith("%")) {
|
|
3624
3641
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -3627,30 +3644,30 @@ var percentage2 = z161.union([z161.string(), z161.number()]).transform((val) =>
|
|
|
3627
3644
|
}
|
|
3628
3645
|
return val;
|
|
3629
3646
|
}).pipe(
|
|
3630
|
-
|
|
3647
|
+
z162.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
3631
3648
|
);
|
|
3632
|
-
var simulation_dc_current_source =
|
|
3633
|
-
type:
|
|
3649
|
+
var simulation_dc_current_source = z162.object({
|
|
3650
|
+
type: z162.literal("simulation_current_source"),
|
|
3634
3651
|
simulation_current_source_id: getZodPrefixedIdWithDefault(
|
|
3635
3652
|
"simulation_current_source"
|
|
3636
3653
|
),
|
|
3637
|
-
is_dc_source:
|
|
3638
|
-
positive_source_port_id:
|
|
3639
|
-
negative_source_port_id:
|
|
3640
|
-
positive_source_net_id:
|
|
3641
|
-
negative_source_net_id:
|
|
3654
|
+
is_dc_source: z162.literal(true).optional().default(true),
|
|
3655
|
+
positive_source_port_id: z162.string().optional(),
|
|
3656
|
+
negative_source_port_id: z162.string().optional(),
|
|
3657
|
+
positive_source_net_id: z162.string().optional(),
|
|
3658
|
+
negative_source_net_id: z162.string().optional(),
|
|
3642
3659
|
current
|
|
3643
3660
|
}).describe("Defines a DC current source for simulation");
|
|
3644
|
-
var simulation_ac_current_source =
|
|
3645
|
-
type:
|
|
3661
|
+
var simulation_ac_current_source = z162.object({
|
|
3662
|
+
type: z162.literal("simulation_current_source"),
|
|
3646
3663
|
simulation_current_source_id: getZodPrefixedIdWithDefault(
|
|
3647
3664
|
"simulation_current_source"
|
|
3648
3665
|
),
|
|
3649
|
-
is_dc_source:
|
|
3650
|
-
terminal1_source_port_id:
|
|
3651
|
-
terminal2_source_port_id:
|
|
3652
|
-
terminal1_source_net_id:
|
|
3653
|
-
terminal2_source_net_id:
|
|
3666
|
+
is_dc_source: z162.literal(false),
|
|
3667
|
+
terminal1_source_port_id: z162.string().optional(),
|
|
3668
|
+
terminal2_source_port_id: z162.string().optional(),
|
|
3669
|
+
terminal1_source_net_id: z162.string().optional(),
|
|
3670
|
+
terminal2_source_net_id: z162.string().optional(),
|
|
3654
3671
|
current: current.optional(),
|
|
3655
3672
|
frequency: frequency.optional(),
|
|
3656
3673
|
peak_to_peak_current: current.optional(),
|
|
@@ -3658,25 +3675,25 @@ var simulation_ac_current_source = z161.object({
|
|
|
3658
3675
|
phase: rotation.optional(),
|
|
3659
3676
|
duty_cycle: percentage2.optional()
|
|
3660
3677
|
}).describe("Defines an AC current source for simulation");
|
|
3661
|
-
var simulation_current_source =
|
|
3678
|
+
var simulation_current_source = z162.union([simulation_dc_current_source, simulation_ac_current_source]).describe("Defines a current source for simulation");
|
|
3662
3679
|
expectTypesMatch(true);
|
|
3663
3680
|
expectTypesMatch(true);
|
|
3664
3681
|
expectTypesMatch(true);
|
|
3665
3682
|
|
|
3666
3683
|
// src/simulation/simulation_experiment.ts
|
|
3667
|
-
import { z as
|
|
3668
|
-
var experiment_type =
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
|
|
3684
|
+
import { z as z163 } from "zod";
|
|
3685
|
+
var experiment_type = z163.union([
|
|
3686
|
+
z163.literal("spice_dc_sweep"),
|
|
3687
|
+
z163.literal("spice_dc_operating_point"),
|
|
3688
|
+
z163.literal("spice_transient_analysis"),
|
|
3689
|
+
z163.literal("spice_ac_analysis")
|
|
3673
3690
|
]);
|
|
3674
|
-
var simulation_experiment =
|
|
3675
|
-
type:
|
|
3691
|
+
var simulation_experiment = z163.object({
|
|
3692
|
+
type: z163.literal("simulation_experiment"),
|
|
3676
3693
|
simulation_experiment_id: getZodPrefixedIdWithDefault(
|
|
3677
3694
|
"simulation_experiment"
|
|
3678
3695
|
),
|
|
3679
|
-
name:
|
|
3696
|
+
name: z163.string(),
|
|
3680
3697
|
experiment_type,
|
|
3681
3698
|
time_per_step: duration_ms.optional(),
|
|
3682
3699
|
start_time_ms: ms.optional(),
|
|
@@ -3685,53 +3702,53 @@ var simulation_experiment = z162.object({
|
|
|
3685
3702
|
expectTypesMatch(true);
|
|
3686
3703
|
|
|
3687
3704
|
// src/simulation/simulation_transient_voltage_graph.ts
|
|
3688
|
-
import { z as
|
|
3689
|
-
var simulation_transient_voltage_graph =
|
|
3690
|
-
type:
|
|
3705
|
+
import { z as z164 } from "zod";
|
|
3706
|
+
var simulation_transient_voltage_graph = z164.object({
|
|
3707
|
+
type: z164.literal("simulation_transient_voltage_graph"),
|
|
3691
3708
|
simulation_transient_voltage_graph_id: getZodPrefixedIdWithDefault(
|
|
3692
3709
|
"simulation_transient_voltage_graph"
|
|
3693
3710
|
),
|
|
3694
|
-
simulation_experiment_id:
|
|
3695
|
-
timestamps_ms:
|
|
3696
|
-
voltage_levels:
|
|
3697
|
-
source_component_id:
|
|
3698
|
-
subcircuit_connectivity_map_key:
|
|
3711
|
+
simulation_experiment_id: z164.string(),
|
|
3712
|
+
timestamps_ms: z164.array(z164.number()).optional(),
|
|
3713
|
+
voltage_levels: z164.array(z164.number()),
|
|
3714
|
+
source_component_id: z164.string().optional(),
|
|
3715
|
+
subcircuit_connectivity_map_key: z164.string().optional(),
|
|
3699
3716
|
time_per_step: duration_ms,
|
|
3700
3717
|
start_time_ms: ms,
|
|
3701
3718
|
end_time_ms: ms,
|
|
3702
|
-
name:
|
|
3703
|
-
color:
|
|
3719
|
+
name: z164.string().optional(),
|
|
3720
|
+
color: z164.string().optional()
|
|
3704
3721
|
}).describe("Stores voltage measurements over time for a simulation");
|
|
3705
3722
|
expectTypesMatch(true);
|
|
3706
3723
|
|
|
3707
3724
|
// src/simulation/simulation_switch.ts
|
|
3708
|
-
import { z as
|
|
3709
|
-
var simulation_switch =
|
|
3710
|
-
type:
|
|
3725
|
+
import { z as z165 } from "zod";
|
|
3726
|
+
var simulation_switch = z165.object({
|
|
3727
|
+
type: z165.literal("simulation_switch"),
|
|
3711
3728
|
simulation_switch_id: getZodPrefixedIdWithDefault("simulation_switch"),
|
|
3712
|
-
source_component_id:
|
|
3729
|
+
source_component_id: z165.string().optional(),
|
|
3713
3730
|
closes_at: ms.optional(),
|
|
3714
3731
|
opens_at: ms.optional(),
|
|
3715
|
-
starts_closed:
|
|
3732
|
+
starts_closed: z165.boolean().optional(),
|
|
3716
3733
|
switching_frequency: frequency.optional()
|
|
3717
3734
|
}).describe("Defines a switch for simulation timing control");
|
|
3718
3735
|
expectTypesMatch(true);
|
|
3719
3736
|
|
|
3720
3737
|
// src/simulation/simulation_voltage_probe.ts
|
|
3721
|
-
import { z as
|
|
3722
|
-
var simulation_voltage_probe =
|
|
3723
|
-
type:
|
|
3738
|
+
import { z as z166 } from "zod";
|
|
3739
|
+
var simulation_voltage_probe = z166.object({
|
|
3740
|
+
type: z166.literal("simulation_voltage_probe"),
|
|
3724
3741
|
simulation_voltage_probe_id: getZodPrefixedIdWithDefault(
|
|
3725
3742
|
"simulation_voltage_probe"
|
|
3726
3743
|
),
|
|
3727
|
-
source_component_id:
|
|
3728
|
-
name:
|
|
3729
|
-
signal_input_source_port_id:
|
|
3730
|
-
signal_input_source_net_id:
|
|
3731
|
-
reference_input_source_port_id:
|
|
3732
|
-
reference_input_source_net_id:
|
|
3733
|
-
subcircuit_id:
|
|
3734
|
-
color:
|
|
3744
|
+
source_component_id: z166.string().optional(),
|
|
3745
|
+
name: z166.string().optional(),
|
|
3746
|
+
signal_input_source_port_id: z166.string().optional(),
|
|
3747
|
+
signal_input_source_net_id: z166.string().optional(),
|
|
3748
|
+
reference_input_source_port_id: z166.string().optional(),
|
|
3749
|
+
reference_input_source_net_id: z166.string().optional(),
|
|
3750
|
+
subcircuit_id: z166.string().optional(),
|
|
3751
|
+
color: z166.string().optional()
|
|
3735
3752
|
}).describe(
|
|
3736
3753
|
"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."
|
|
3737
3754
|
).superRefine((data, ctx) => {
|
|
@@ -3741,20 +3758,20 @@ var simulation_voltage_probe = z165.object({
|
|
|
3741
3758
|
const has_nets = !!data.signal_input_source_net_id || !!data.reference_input_source_net_id;
|
|
3742
3759
|
if (has_ports && has_nets) {
|
|
3743
3760
|
ctx.addIssue({
|
|
3744
|
-
code:
|
|
3761
|
+
code: z166.ZodIssueCode.custom,
|
|
3745
3762
|
message: "Cannot mix port and net connections in a differential probe."
|
|
3746
3763
|
});
|
|
3747
3764
|
} else if (has_ports) {
|
|
3748
3765
|
if (!data.signal_input_source_port_id || !data.reference_input_source_port_id) {
|
|
3749
3766
|
ctx.addIssue({
|
|
3750
|
-
code:
|
|
3767
|
+
code: z166.ZodIssueCode.custom,
|
|
3751
3768
|
message: "Differential port probe requires both signal_input_source_port_id and reference_input_source_port_id."
|
|
3752
3769
|
});
|
|
3753
3770
|
}
|
|
3754
3771
|
} else if (has_nets) {
|
|
3755
3772
|
if (!data.signal_input_source_net_id || !data.reference_input_source_net_id) {
|
|
3756
3773
|
ctx.addIssue({
|
|
3757
|
-
code:
|
|
3774
|
+
code: z166.ZodIssueCode.custom,
|
|
3758
3775
|
message: "Differential net probe requires both signal_input_source_net_id and reference_input_source_net_id."
|
|
3759
3776
|
});
|
|
3760
3777
|
}
|
|
@@ -3762,7 +3779,7 @@ var simulation_voltage_probe = z165.object({
|
|
|
3762
3779
|
} else {
|
|
3763
3780
|
if (!!data.signal_input_source_port_id === !!data.signal_input_source_net_id) {
|
|
3764
3781
|
ctx.addIssue({
|
|
3765
|
-
code:
|
|
3782
|
+
code: z166.ZodIssueCode.custom,
|
|
3766
3783
|
message: "A voltage probe must have exactly one of signal_input_source_port_id or signal_input_source_net_id."
|
|
3767
3784
|
});
|
|
3768
3785
|
}
|
|
@@ -3771,35 +3788,50 @@ var simulation_voltage_probe = z165.object({
|
|
|
3771
3788
|
expectTypesMatch(true);
|
|
3772
3789
|
|
|
3773
3790
|
// src/simulation/simulation_unknown_experiment_error.ts
|
|
3774
|
-
import { z as
|
|
3791
|
+
import { z as z167 } from "zod";
|
|
3775
3792
|
var simulation_unknown_experiment_error = base_circuit_json_error.extend({
|
|
3776
|
-
type:
|
|
3793
|
+
type: z167.literal("simulation_unknown_experiment_error"),
|
|
3777
3794
|
simulation_unknown_experiment_error_id: getZodPrefixedIdWithDefault(
|
|
3778
3795
|
"simulation_unknown_experiment_error"
|
|
3779
3796
|
),
|
|
3780
|
-
error_type:
|
|
3781
|
-
simulation_experiment_id:
|
|
3782
|
-
subcircuit_id:
|
|
3797
|
+
error_type: z167.literal("simulation_unknown_experiment_error").default("simulation_unknown_experiment_error"),
|
|
3798
|
+
simulation_experiment_id: z167.string().optional(),
|
|
3799
|
+
subcircuit_id: z167.string().optional()
|
|
3783
3800
|
}).describe("An unknown error occurred during the simulation experiment.");
|
|
3784
3801
|
expectTypesMatch(true);
|
|
3785
3802
|
|
|
3786
3803
|
// src/simulation/simulation_op_amp.ts
|
|
3787
|
-
import { z as
|
|
3788
|
-
var simulation_op_amp =
|
|
3789
|
-
type:
|
|
3804
|
+
import { z as z168 } from "zod";
|
|
3805
|
+
var simulation_op_amp = z168.object({
|
|
3806
|
+
type: z168.literal("simulation_op_amp"),
|
|
3790
3807
|
simulation_op_amp_id: getZodPrefixedIdWithDefault("simulation_op_amp"),
|
|
3791
|
-
source_component_id:
|
|
3792
|
-
inverting_input_source_port_id:
|
|
3793
|
-
non_inverting_input_source_port_id:
|
|
3794
|
-
output_source_port_id:
|
|
3795
|
-
positive_supply_source_port_id:
|
|
3796
|
-
negative_supply_source_port_id:
|
|
3808
|
+
source_component_id: z168.string().optional(),
|
|
3809
|
+
inverting_input_source_port_id: z168.string(),
|
|
3810
|
+
non_inverting_input_source_port_id: z168.string(),
|
|
3811
|
+
output_source_port_id: z168.string(),
|
|
3812
|
+
positive_supply_source_port_id: z168.string(),
|
|
3813
|
+
negative_supply_source_port_id: z168.string()
|
|
3797
3814
|
}).describe("Defines a simple ideal operational amplifier for simulation");
|
|
3798
3815
|
expectTypesMatch(true);
|
|
3799
3816
|
|
|
3817
|
+
// src/simulation/simulation_spice_subcircuit.ts
|
|
3818
|
+
import { z as z169 } from "zod";
|
|
3819
|
+
var simulation_spice_subcircuit = z169.object({
|
|
3820
|
+
type: z169.literal("simulation_spice_subcircuit"),
|
|
3821
|
+
simulation_spice_subcircuit_id: getZodPrefixedIdWithDefault(
|
|
3822
|
+
"simulation_spice_subcircuit"
|
|
3823
|
+
),
|
|
3824
|
+
source_component_id: z169.string(),
|
|
3825
|
+
spice_pin_to_source_port_map: z169.record(z169.string(), z169.string()),
|
|
3826
|
+
subcircuit_source: z169.string()
|
|
3827
|
+
}).describe("Defines a custom SPICE subcircuit model for simulation");
|
|
3828
|
+
expectTypesMatch(
|
|
3829
|
+
true
|
|
3830
|
+
);
|
|
3831
|
+
|
|
3800
3832
|
// src/any_circuit_element.ts
|
|
3801
|
-
import { z as
|
|
3802
|
-
var any_circuit_element =
|
|
3833
|
+
import { z as z170 } from "zod";
|
|
3834
|
+
var any_circuit_element = z170.union([
|
|
3803
3835
|
source_trace,
|
|
3804
3836
|
source_port,
|
|
3805
3837
|
source_component_internal_connection,
|
|
@@ -3905,6 +3937,7 @@ var any_circuit_element = z168.union([
|
|
|
3905
3937
|
pcb_courtyard_outline,
|
|
3906
3938
|
pcb_courtyard_polygon,
|
|
3907
3939
|
pcb_courtyard_circle,
|
|
3940
|
+
pcb_courtyard_pill,
|
|
3908
3941
|
schematic_box,
|
|
3909
3942
|
schematic_text,
|
|
3910
3943
|
schematic_line,
|
|
@@ -3934,7 +3967,8 @@ var any_circuit_element = z168.union([
|
|
|
3934
3967
|
simulation_switch,
|
|
3935
3968
|
simulation_voltage_probe,
|
|
3936
3969
|
simulation_unknown_experiment_error,
|
|
3937
|
-
simulation_op_amp
|
|
3970
|
+
simulation_op_amp,
|
|
3971
|
+
simulation_spice_subcircuit
|
|
3938
3972
|
]);
|
|
3939
3973
|
var any_soup_element = any_circuit_element;
|
|
3940
3974
|
expectTypesMatch(true);
|
|
@@ -4000,6 +4034,7 @@ export {
|
|
|
4000
4034
|
pcb_courtyard_circle,
|
|
4001
4035
|
pcb_courtyard_outline,
|
|
4002
4036
|
pcb_courtyard_overlap_error,
|
|
4037
|
+
pcb_courtyard_pill,
|
|
4003
4038
|
pcb_courtyard_polygon,
|
|
4004
4039
|
pcb_courtyard_rect,
|
|
4005
4040
|
pcb_cutout,
|
|
@@ -4111,6 +4146,7 @@ export {
|
|
|
4111
4146
|
simulation_dc_voltage_source,
|
|
4112
4147
|
simulation_experiment,
|
|
4113
4148
|
simulation_op_amp,
|
|
4149
|
+
simulation_spice_subcircuit,
|
|
4114
4150
|
simulation_switch,
|
|
4115
4151
|
simulation_transient_voltage_graph,
|
|
4116
4152
|
simulation_unknown_experiment_error,
|