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