circuit-json 0.0.234 → 0.0.235

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 CHANGED
@@ -1886,6 +1886,7 @@ interface SimulationAcVoltageSource {
1886
1886
  peak_to_peak_voltage?: number
1887
1887
  wave_shape?: WaveShape
1888
1888
  phase?: number
1889
+ duty_cycle?: number
1889
1890
  }
1890
1891
  ```
1891
1892
 
package/dist/index.d.mts CHANGED
@@ -8502,6 +8502,7 @@ declare const simulation_ac_voltage_source: z.ZodObject<{
8502
8502
  peak_to_peak_voltage: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
8503
8503
  wave_shape: z.ZodOptional<z.ZodEnum<["sinewave", "square", "triangle", "sawtooth"]>>;
8504
8504
  phase: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
8505
+ duty_cycle: z.ZodOptional<z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>, z.ZodNumber>>;
8505
8506
  }, "strip", z.ZodTypeAny, {
8506
8507
  type: "simulation_voltage_source";
8507
8508
  simulation_voltage_source_id: string;
@@ -8515,6 +8516,7 @@ declare const simulation_ac_voltage_source: z.ZodObject<{
8515
8516
  peak_to_peak_voltage?: number | undefined;
8516
8517
  wave_shape?: "square" | "sinewave" | "triangle" | "sawtooth" | undefined;
8517
8518
  phase?: number | undefined;
8519
+ duty_cycle?: number | undefined;
8518
8520
  }, {
8519
8521
  type: "simulation_voltage_source";
8520
8522
  is_dc_source: false;
@@ -8528,7 +8530,9 @@ declare const simulation_ac_voltage_source: z.ZodObject<{
8528
8530
  peak_to_peak_voltage?: string | number | undefined;
8529
8531
  wave_shape?: "square" | "sinewave" | "triangle" | "sawtooth" | undefined;
8530
8532
  phase?: string | number | undefined;
8533
+ duty_cycle?: string | number | undefined;
8531
8534
  }>;
8535
+ type SimulationAcVoltageSourceInput = z.input<typeof simulation_ac_voltage_source>;
8532
8536
  declare const simulation_voltage_source: z.ZodUnion<[z.ZodObject<{
8533
8537
  type: z.ZodLiteral<"simulation_voltage_source">;
8534
8538
  simulation_voltage_source_id: z.ZodDefault<z.ZodOptional<z.ZodString>>;
@@ -8569,6 +8573,7 @@ declare const simulation_voltage_source: z.ZodUnion<[z.ZodObject<{
8569
8573
  peak_to_peak_voltage: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
8570
8574
  wave_shape: z.ZodOptional<z.ZodEnum<["sinewave", "square", "triangle", "sawtooth"]>>;
8571
8575
  phase: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
8576
+ duty_cycle: z.ZodOptional<z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>, z.ZodNumber>>;
8572
8577
  }, "strip", z.ZodTypeAny, {
8573
8578
  type: "simulation_voltage_source";
8574
8579
  simulation_voltage_source_id: string;
@@ -8582,6 +8587,7 @@ declare const simulation_voltage_source: z.ZodUnion<[z.ZodObject<{
8582
8587
  peak_to_peak_voltage?: number | undefined;
8583
8588
  wave_shape?: "square" | "sinewave" | "triangle" | "sawtooth" | undefined;
8584
8589
  phase?: number | undefined;
8590
+ duty_cycle?: number | undefined;
8585
8591
  }, {
8586
8592
  type: "simulation_voltage_source";
8587
8593
  is_dc_source: false;
@@ -8595,6 +8601,7 @@ declare const simulation_voltage_source: z.ZodUnion<[z.ZodObject<{
8595
8601
  peak_to_peak_voltage?: string | number | undefined;
8596
8602
  wave_shape?: "square" | "sinewave" | "triangle" | "sawtooth" | undefined;
8597
8603
  phase?: string | number | undefined;
8604
+ duty_cycle?: string | number | undefined;
8598
8605
  }>]>;
8599
8606
  type SimulationVoltageSourceInput = z.input<typeof simulation_voltage_source>;
8600
8607
  /**
@@ -8627,6 +8634,7 @@ interface SimulationAcVoltageSource {
8627
8634
  peak_to_peak_voltage?: number;
8628
8635
  wave_shape?: WaveShape;
8629
8636
  phase?: number;
8637
+ duty_cycle?: number;
8630
8638
  }
8631
8639
  type SimulationVoltageSource = SimulationDcVoltageSource | SimulationAcVoltageSource;
8632
8640
 
@@ -14150,6 +14158,7 @@ declare const any_circuit_element: z.ZodUnion<[z.ZodObject<{
14150
14158
  peak_to_peak_voltage: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
14151
14159
  wave_shape: z.ZodOptional<z.ZodEnum<["sinewave", "square", "triangle", "sawtooth"]>>;
14152
14160
  phase: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
14161
+ duty_cycle: z.ZodOptional<z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>, z.ZodNumber>>;
14153
14162
  }, "strip", z.ZodTypeAny, {
14154
14163
  type: "simulation_voltage_source";
14155
14164
  simulation_voltage_source_id: string;
@@ -14163,6 +14172,7 @@ declare const any_circuit_element: z.ZodUnion<[z.ZodObject<{
14163
14172
  peak_to_peak_voltage?: number | undefined;
14164
14173
  wave_shape?: "square" | "sinewave" | "triangle" | "sawtooth" | undefined;
14165
14174
  phase?: number | undefined;
14175
+ duty_cycle?: number | undefined;
14166
14176
  }, {
14167
14177
  type: "simulation_voltage_source";
14168
14178
  is_dc_source: false;
@@ -14176,6 +14186,7 @@ declare const any_circuit_element: z.ZodUnion<[z.ZodObject<{
14176
14186
  peak_to_peak_voltage?: string | number | undefined;
14177
14187
  wave_shape?: "square" | "sinewave" | "triangle" | "sawtooth" | undefined;
14178
14188
  phase?: string | number | undefined;
14189
+ duty_cycle?: string | number | undefined;
14179
14190
  }>]>]>;
14180
14191
  /**
14181
14192
  * @deprecated use any_circuit_element instead
@@ -19700,6 +19711,7 @@ declare const any_soup_element: z.ZodUnion<[z.ZodObject<{
19700
19711
  peak_to_peak_voltage: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
19701
19712
  wave_shape: z.ZodOptional<z.ZodEnum<["sinewave", "square", "triangle", "sawtooth"]>>;
19702
19713
  phase: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
19714
+ duty_cycle: z.ZodOptional<z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>, z.ZodNumber>>;
19703
19715
  }, "strip", z.ZodTypeAny, {
19704
19716
  type: "simulation_voltage_source";
19705
19717
  simulation_voltage_source_id: string;
@@ -19713,6 +19725,7 @@ declare const any_soup_element: z.ZodUnion<[z.ZodObject<{
19713
19725
  peak_to_peak_voltage?: number | undefined;
19714
19726
  wave_shape?: "square" | "sinewave" | "triangle" | "sawtooth" | undefined;
19715
19727
  phase?: number | undefined;
19728
+ duty_cycle?: number | undefined;
19716
19729
  }, {
19717
19730
  type: "simulation_voltage_source";
19718
19731
  is_dc_source: false;
@@ -19726,6 +19739,7 @@ declare const any_soup_element: z.ZodUnion<[z.ZodObject<{
19726
19739
  peak_to_peak_voltage?: string | number | undefined;
19727
19740
  wave_shape?: "square" | "sinewave" | "triangle" | "sawtooth" | undefined;
19728
19741
  phase?: string | number | undefined;
19742
+ duty_cycle?: string | number | undefined;
19729
19743
  }>]>]>;
19730
19744
  type AnyCircuitElement = z.infer<typeof any_circuit_element>;
19731
19745
  type AnyCircuitElementInput = z.input<typeof any_circuit_element>;
@@ -19743,4 +19757,4 @@ type AnySoupElementInput = AnyCircuitElementInput;
19743
19757
  */
19744
19758
  type CircuitJson = AnyCircuitElement[];
19745
19759
 
19746
- export { type AnyCircuitElement, type AnyCircuitElementInput, type AnySoupElement, type AnySoupElementInput, type AnySourceComponent, type AnySourceElement, type CadComponent, type CadComponentInput, type CircuitJson, type CircuitJsonError, type Distance, type InferredProjectMetadata, type InferredSchematicNetLabel, type InputPoint, type InputPosition, type InputRotation, type LayerRef, type LayerRefInput, type Length, type NinePointAnchor, type PCBBoard, type PCBComponent, type PCBFabricationNotePath, type PCBFabricationNoteText, type PCBHole, type PCBHoleInput, type PCBKeepout, type PCBKeepoutCircle, type PCBKeepoutInput, type PCBKeepoutRect, type PCBMissingFootprintError, type PCBPlacementError, type PCBPlatedHole, type PCBPlatedHoleInput, type PCBPort, type PCBPortInput, type PCBPortNotMatchedError, type PCBSMTPad, type PCBSMTPadInput, type PCBSilkscreenLine, type PCBSilkscreenText, type PCBSolderPasteInput, type PCBText, type PCBTrace, type PCBTraceError, type PCBTraceHint, type PCBTraceInput, type PCBTraceMissingError, type PCBVia, type PcbAutoroutingError, type PcbAutoroutingErrorInput, type PcbAutoroutingErrorInterface, type PcbBoard, type PcbBoardInput, type PcbBreakoutPoint, type PcbBreakoutPointInput, type PcbCircuitElement, type PcbComponent, type PcbComponentInput, type PcbCutout, type PcbCutoutCircle, type PcbCutoutCircleInput, type PcbCutoutInput, type PcbCutoutPolygon, type PcbCutoutPolygonInput, type PcbCutoutRect, type PcbCutoutRectInput, type PcbFabricationNotePath, type PcbFabricationNotePathInput, type PcbFabricationNoteText, type PcbFabricationNoteTextInput, type PcbFootprintOverlapError, type PcbFootprintOverlapErrorInput, type PcbGroundPlane, type PcbGroundPlaneInput, type PcbGroundPlaneRegion, type PcbGroundPlaneRegionInput, type PcbGroup, type PcbGroupInput, type PcbHole, type PcbHoleCircleOrSquare, type PcbHoleCircleOrSquareInput, type PcbHoleCircularWithRectPad, type PcbHoleOval, type PcbHoleOvalInput, type PcbHolePillWithRectPad, type PcbHoleRotatedPillWithRectPad, type PcbManualEditConflictWarning, type PcbManualEditConflictWarningInput, type PcbMissingFootprintError, type PcbMissingFootprintErrorInput, type PcbPlacementError, type PcbPlacementErrorInput, type PcbPlatedHole, type PcbPlatedHoleCircle, type PcbPlatedHoleInput, type PcbPlatedHoleOval, type PcbPort, type PcbPortInput, type PcbPortNotConnectedError, type PcbPortNotConnectedErrorInput, type PcbPortNotMatchedError, type PcbPortNotMatchedErrorInput, type PcbRouteHint, type PcbRouteHintInput, type PcbRouteHints, type PcbRouteHintsInput, type PcbSilkscreenCircle, type PcbSilkscreenCircleInput, type PcbSilkscreenLine, type PcbSilkscreenLineInput, type PcbSilkscreenOval, type PcbSilkscreenOvalDeprecated, type PcbSilkscreenOvalInput, type PcbSilkscreenPath, type PcbSilkscreenPathDeprecated, type PcbSilkscreenPathInput, type PcbSilkscreenRect, type PcbSilkscreenRectInput, type PcbSilkscreenRectOld, type PcbSilkscreenText, type PcbSilkscreenTextInput, type PcbSmtPad, type PcbSmtPadCircle, type PcbSmtPadPill, type PcbSmtPadPolygon, type PcbSmtPadRect, type PcbSmtPadRotatedPill, type PcbSmtPadRotatedRect, type PcbSolderPaste, type PcbSolderPasteCircle, type PcbSolderPasteOval, type PcbSolderPastePill, type PcbSolderPasteRect, type PcbSolderPasteRotatedRect, type PcbText, type PcbTextInput, type PcbThermalSpoke, type PcbThermalSpokeInput, type PcbTrace, type PcbTraceError, type PcbTraceErrorInput, type PcbTraceHint, type PcbTraceHintInput, type PcbTraceInput, type PcbTraceMissingError, type PcbTraceMissingErrorInput, type PcbTraceRoutePoint, type PcbTraceRoutePointVia, type PcbTraceRoutePointWire, type PcbVia, type PcbViaInput, type Point, type Point3, type Position, type Rotation, type RouteHintPoint, type RouteHintPointInput, type SchematicBox, type SchematicBoxInput, type SchematicComponent, type SchematicComponentInput, type SchematicDebugLine, type SchematicDebugObject, type SchematicDebugObjectInput, type SchematicDebugPoint, type SchematicDebugRect, type SchematicError, type SchematicErrorInput, type SchematicGroup, type SchematicGroupInput, type SchematicLayoutError, type SchematicLayoutErrorInput, type SchematicLine, type SchematicLineInput, type SchematicManualEditConflictWarning, type SchematicManualEditConflictWarningInput, type SchematicNetLabel, type SchematicNetLabelInput, type SchematicPath, type SchematicPathInput, type SchematicPort, type SchematicPortArrangement, type SchematicPortArrangementBySides, type SchematicPortArrangementBySize, type SchematicPortInput, type SchematicTable, type SchematicTableCell, type SchematicTableCellInput, type SchematicTableInput, type SchematicText, type SchematicTextInput, type SchematicTrace, type SchematicTraceEdge, type SchematicTraceInput, type SchematicVoltageProbe, type SchematicVoltageProbeInput, type SimulationAcVoltageSource, type SimulationDcVoltageSource, type SimulationVoltageSource, type SimulationVoltageSourceInput, type Size, type SizeInput, type SourceComponentBase, type SourceFailedToCreateComponentError, type SourceFailedToCreateComponentErrorInput, type SourceGroup, type SourceGroupInput, type SourceMissingPropertyError, type SourceMissingPropertyErrorInput, type SourceNet, type SourceNetInput, type SourcePcbGroundPlane, type SourcePcbGroundPlaneInput, type SourcePinMissingTraceWarning, type SourcePinMissingTraceWarningInput, type SourcePort, type SourcePortInput, type SourceProjectMetadata, type SourcePropertyIgnoredWarning, type SourcePropertyIgnoredWarningInput, type SourceSimpleBattery, type SourceSimpleBatteryInput, type SourceSimpleCapacitor, type SourceSimpleCapacitorInput, type SourceSimpleChip, type SourceSimpleChipInput, type SourceSimpleCrystal, type SourceSimpleCrystalInput, type SourceSimpleDiode, type SourceSimpleDiodeInput, type SourceSimpleGround, type SourceSimpleGroundInput, type SourceSimpleInductor, type SourceSimpleInductorInput, type SourceSimpleLed, type SourceSimpleLedInput, type SourceSimpleMosfet, type SourceSimpleMosfetInput, type SourceSimplePinHeader, type SourceSimplePinHeaderInput, type SourceSimplePotentiometer, type SourceSimplePotentiometerInput, type SourceSimplePowerSource, type SourceSimplePowerSourceInput, type SourceSimplePushButton, type SourceSimplePushButtonInput, type SourceSimpleResistor, type SourceSimpleResistorInput, type SourceSimpleResonator, type SourceSimpleResonatorInput, type SourceSimpleSwitch, type SourceSimpleSwitchInput, type SourceSimpleTestPoint, type SourceSimpleTestPointInput, type SourceSimpleTransistor, type SourceSimpleTransistorInput, type SourceTrace, type SourceTraceNotConnectedError, type SourceTraceNotConnectedErrorInput, type SupplierName, type VisibleLayer, type VisibleLayerRef, type WaveShape, all_layers, any_circuit_element, any_soup_element, any_source_component, battery_capacity, cad_component, capacitance, current, distance, frequency, getZodPrefixedIdWithDefault, inductance, layer_ref, layer_string, length, ninePointAnchor, pcb_autorouting_error, pcb_board, pcb_breakout_point, pcb_component, pcb_cutout, pcb_cutout_circle, pcb_cutout_polygon, pcb_cutout_rect, pcb_fabrication_note_path, pcb_fabrication_note_text, pcb_footprint_overlap_error, pcb_ground_plane, pcb_ground_plane_region, pcb_group, pcb_hole, pcb_hole_circle_or_square_shape, pcb_hole_oval_shape, pcb_keepout, pcb_manual_edit_conflict_warning, pcb_missing_footprint_error, pcb_placement_error, pcb_plated_hole, pcb_port, pcb_port_not_connected_error, pcb_port_not_matched_error, pcb_route_hint, pcb_route_hints, pcb_silkscreen_circle, pcb_silkscreen_line, pcb_silkscreen_oval, pcb_silkscreen_path, pcb_silkscreen_rect, pcb_silkscreen_text, pcb_smtpad, pcb_smtpad_pill, pcb_solder_paste, pcb_text, pcb_thermal_spoke, pcb_trace, pcb_trace_error, pcb_trace_hint, pcb_trace_missing_error, pcb_trace_route_point, pcb_trace_route_point_via, pcb_trace_route_point_wire, pcb_via, point, point3, port_arrangement, position, position3, resistance, rotation, route_hint_point, schematic_box, schematic_component, schematic_component_port_arrangement_by_sides, schematic_component_port_arrangement_by_size, schematic_debug_line, schematic_debug_object, schematic_debug_object_base, schematic_debug_point, schematic_debug_rect, schematic_error, schematic_group, schematic_layout_error, schematic_line, schematic_manual_edit_conflict_warning, schematic_net_label, schematic_path, schematic_pin_styles, schematic_port, schematic_table, schematic_table_cell, schematic_text, schematic_trace, schematic_voltage_probe, simulation_ac_voltage_source, simulation_dc_voltage_source, simulation_voltage_source, size, source_component_base, source_failed_to_create_component_error, source_group, source_missing_property_error, source_net, source_pcb_ground_plane, source_pin_missing_trace_warning, source_port, source_project_metadata, source_property_ignored_warning, source_simple_battery, source_simple_capacitor, source_simple_chip, source_simple_crystal, source_simple_diode, source_simple_ground, source_simple_inductor, source_simple_led, source_simple_mosfet, source_simple_pin_header, source_simple_potentiometer, source_simple_power_source, source_simple_push_button, source_simple_resistor, source_simple_resonator, source_simple_switch, source_simple_test_point, source_simple_transistor, source_trace, source_trace_not_connected_error, supplier_name, time, visible_layer, voltage, wave_shape };
19760
+ export { type AnyCircuitElement, type AnyCircuitElementInput, type AnySoupElement, type AnySoupElementInput, type AnySourceComponent, type AnySourceElement, type CadComponent, type CadComponentInput, type CircuitJson, type CircuitJsonError, type Distance, type InferredProjectMetadata, type InferredSchematicNetLabel, type InputPoint, type InputPosition, type InputRotation, type LayerRef, type LayerRefInput, type Length, type NinePointAnchor, type PCBBoard, type PCBComponent, type PCBFabricationNotePath, type PCBFabricationNoteText, type PCBHole, type PCBHoleInput, type PCBKeepout, type PCBKeepoutCircle, type PCBKeepoutInput, type PCBKeepoutRect, type PCBMissingFootprintError, type PCBPlacementError, type PCBPlatedHole, type PCBPlatedHoleInput, type PCBPort, type PCBPortInput, type PCBPortNotMatchedError, type PCBSMTPad, type PCBSMTPadInput, type PCBSilkscreenLine, type PCBSilkscreenText, type PCBSolderPasteInput, type PCBText, type PCBTrace, type PCBTraceError, type PCBTraceHint, type PCBTraceInput, type PCBTraceMissingError, type PCBVia, type PcbAutoroutingError, type PcbAutoroutingErrorInput, type PcbAutoroutingErrorInterface, type PcbBoard, type PcbBoardInput, type PcbBreakoutPoint, type PcbBreakoutPointInput, type PcbCircuitElement, type PcbComponent, type PcbComponentInput, type PcbCutout, type PcbCutoutCircle, type PcbCutoutCircleInput, type PcbCutoutInput, type PcbCutoutPolygon, type PcbCutoutPolygonInput, type PcbCutoutRect, type PcbCutoutRectInput, type PcbFabricationNotePath, type PcbFabricationNotePathInput, type PcbFabricationNoteText, type PcbFabricationNoteTextInput, type PcbFootprintOverlapError, type PcbFootprintOverlapErrorInput, type PcbGroundPlane, type PcbGroundPlaneInput, type PcbGroundPlaneRegion, type PcbGroundPlaneRegionInput, type PcbGroup, type PcbGroupInput, type PcbHole, type PcbHoleCircleOrSquare, type PcbHoleCircleOrSquareInput, type PcbHoleCircularWithRectPad, type PcbHoleOval, type PcbHoleOvalInput, type PcbHolePillWithRectPad, type PcbHoleRotatedPillWithRectPad, type PcbManualEditConflictWarning, type PcbManualEditConflictWarningInput, type PcbMissingFootprintError, type PcbMissingFootprintErrorInput, type PcbPlacementError, type PcbPlacementErrorInput, type PcbPlatedHole, type PcbPlatedHoleCircle, type PcbPlatedHoleInput, type PcbPlatedHoleOval, type PcbPort, type PcbPortInput, type PcbPortNotConnectedError, type PcbPortNotConnectedErrorInput, type PcbPortNotMatchedError, type PcbPortNotMatchedErrorInput, type PcbRouteHint, type PcbRouteHintInput, type PcbRouteHints, type PcbRouteHintsInput, type PcbSilkscreenCircle, type PcbSilkscreenCircleInput, type PcbSilkscreenLine, type PcbSilkscreenLineInput, type PcbSilkscreenOval, type PcbSilkscreenOvalDeprecated, type PcbSilkscreenOvalInput, type PcbSilkscreenPath, type PcbSilkscreenPathDeprecated, type PcbSilkscreenPathInput, type PcbSilkscreenRect, type PcbSilkscreenRectInput, type PcbSilkscreenRectOld, type PcbSilkscreenText, type PcbSilkscreenTextInput, type PcbSmtPad, type PcbSmtPadCircle, type PcbSmtPadPill, type PcbSmtPadPolygon, type PcbSmtPadRect, type PcbSmtPadRotatedPill, type PcbSmtPadRotatedRect, type PcbSolderPaste, type PcbSolderPasteCircle, type PcbSolderPasteOval, type PcbSolderPastePill, type PcbSolderPasteRect, type PcbSolderPasteRotatedRect, type PcbText, type PcbTextInput, type PcbThermalSpoke, type PcbThermalSpokeInput, type PcbTrace, type PcbTraceError, type PcbTraceErrorInput, type PcbTraceHint, type PcbTraceHintInput, type PcbTraceInput, type PcbTraceMissingError, type PcbTraceMissingErrorInput, type PcbTraceRoutePoint, type PcbTraceRoutePointVia, type PcbTraceRoutePointWire, type PcbVia, type PcbViaInput, type Point, type Point3, type Position, type Rotation, type RouteHintPoint, type RouteHintPointInput, type SchematicBox, type SchematicBoxInput, type SchematicComponent, type SchematicComponentInput, type SchematicDebugLine, type SchematicDebugObject, type SchematicDebugObjectInput, type SchematicDebugPoint, type SchematicDebugRect, type SchematicError, type SchematicErrorInput, type SchematicGroup, type SchematicGroupInput, type SchematicLayoutError, type SchematicLayoutErrorInput, type SchematicLine, type SchematicLineInput, type SchematicManualEditConflictWarning, type SchematicManualEditConflictWarningInput, type SchematicNetLabel, type SchematicNetLabelInput, type SchematicPath, type SchematicPathInput, type SchematicPort, type SchematicPortArrangement, type SchematicPortArrangementBySides, type SchematicPortArrangementBySize, type SchematicPortInput, type SchematicTable, type SchematicTableCell, type SchematicTableCellInput, type SchematicTableInput, type SchematicText, type SchematicTextInput, type SchematicTrace, type SchematicTraceEdge, type SchematicTraceInput, type SchematicVoltageProbe, type SchematicVoltageProbeInput, type SimulationAcVoltageSource, type SimulationAcVoltageSourceInput, type SimulationDcVoltageSource, type SimulationVoltageSource, type SimulationVoltageSourceInput, type Size, type SizeInput, type SourceComponentBase, type SourceFailedToCreateComponentError, type SourceFailedToCreateComponentErrorInput, type SourceGroup, type SourceGroupInput, type SourceMissingPropertyError, type SourceMissingPropertyErrorInput, type SourceNet, type SourceNetInput, type SourcePcbGroundPlane, type SourcePcbGroundPlaneInput, type SourcePinMissingTraceWarning, type SourcePinMissingTraceWarningInput, type SourcePort, type SourcePortInput, type SourceProjectMetadata, type SourcePropertyIgnoredWarning, type SourcePropertyIgnoredWarningInput, type SourceSimpleBattery, type SourceSimpleBatteryInput, type SourceSimpleCapacitor, type SourceSimpleCapacitorInput, type SourceSimpleChip, type SourceSimpleChipInput, type SourceSimpleCrystal, type SourceSimpleCrystalInput, type SourceSimpleDiode, type SourceSimpleDiodeInput, type SourceSimpleGround, type SourceSimpleGroundInput, type SourceSimpleInductor, type SourceSimpleInductorInput, type SourceSimpleLed, type SourceSimpleLedInput, type SourceSimpleMosfet, type SourceSimpleMosfetInput, type SourceSimplePinHeader, type SourceSimplePinHeaderInput, type SourceSimplePotentiometer, type SourceSimplePotentiometerInput, type SourceSimplePowerSource, type SourceSimplePowerSourceInput, type SourceSimplePushButton, type SourceSimplePushButtonInput, type SourceSimpleResistor, type SourceSimpleResistorInput, type SourceSimpleResonator, type SourceSimpleResonatorInput, type SourceSimpleSwitch, type SourceSimpleSwitchInput, type SourceSimpleTestPoint, type SourceSimpleTestPointInput, type SourceSimpleTransistor, type SourceSimpleTransistorInput, type SourceTrace, type SourceTraceNotConnectedError, type SourceTraceNotConnectedErrorInput, type SupplierName, type VisibleLayer, type VisibleLayerRef, type WaveShape, all_layers, any_circuit_element, any_soup_element, any_source_component, battery_capacity, cad_component, capacitance, current, distance, frequency, getZodPrefixedIdWithDefault, inductance, layer_ref, layer_string, length, ninePointAnchor, pcb_autorouting_error, pcb_board, pcb_breakout_point, pcb_component, pcb_cutout, pcb_cutout_circle, pcb_cutout_polygon, pcb_cutout_rect, pcb_fabrication_note_path, pcb_fabrication_note_text, pcb_footprint_overlap_error, pcb_ground_plane, pcb_ground_plane_region, pcb_group, pcb_hole, pcb_hole_circle_or_square_shape, pcb_hole_oval_shape, pcb_keepout, pcb_manual_edit_conflict_warning, pcb_missing_footprint_error, pcb_placement_error, pcb_plated_hole, pcb_port, pcb_port_not_connected_error, pcb_port_not_matched_error, pcb_route_hint, pcb_route_hints, pcb_silkscreen_circle, pcb_silkscreen_line, pcb_silkscreen_oval, pcb_silkscreen_path, pcb_silkscreen_rect, pcb_silkscreen_text, pcb_smtpad, pcb_smtpad_pill, pcb_solder_paste, pcb_text, pcb_thermal_spoke, pcb_trace, pcb_trace_error, pcb_trace_hint, pcb_trace_missing_error, pcb_trace_route_point, pcb_trace_route_point_via, pcb_trace_route_point_wire, pcb_via, point, point3, port_arrangement, position, position3, resistance, rotation, route_hint_point, schematic_box, schematic_component, schematic_component_port_arrangement_by_sides, schematic_component_port_arrangement_by_size, schematic_debug_line, schematic_debug_object, schematic_debug_object_base, schematic_debug_point, schematic_debug_rect, schematic_error, schematic_group, schematic_layout_error, schematic_line, schematic_manual_edit_conflict_warning, schematic_net_label, schematic_path, schematic_pin_styles, schematic_port, schematic_table, schematic_table_cell, schematic_text, schematic_trace, schematic_voltage_probe, simulation_ac_voltage_source, simulation_dc_voltage_source, simulation_voltage_source, size, source_component_base, source_failed_to_create_component_error, source_group, source_missing_property_error, source_net, source_pcb_ground_plane, source_pin_missing_trace_warning, source_port, source_project_metadata, source_property_ignored_warning, source_simple_battery, source_simple_capacitor, source_simple_chip, source_simple_crystal, source_simple_diode, source_simple_ground, source_simple_inductor, source_simple_led, source_simple_mosfet, source_simple_pin_header, source_simple_potentiometer, source_simple_power_source, source_simple_push_button, source_simple_resistor, source_simple_resonator, source_simple_switch, source_simple_test_point, source_simple_transistor, source_trace, source_trace_not_connected_error, supplier_name, time, visible_layer, voltage, wave_shape };
package/dist/index.mjs CHANGED
@@ -2018,6 +2018,17 @@ expectTypesMatch(true);
2018
2018
  // src/simulation/simulation_voltage_source.ts
2019
2019
  import { z as z96 } from "zod";
2020
2020
  var wave_shape = z96.enum(["sinewave", "square", "triangle", "sawtooth"]);
2021
+ var percentage = z96.union([z96.string(), z96.number()]).transform((val) => {
2022
+ if (typeof val === "string") {
2023
+ if (val.endsWith("%")) {
2024
+ return parseFloat(val.slice(0, -1)) / 100;
2025
+ }
2026
+ return parseFloat(val);
2027
+ }
2028
+ return val;
2029
+ }).pipe(
2030
+ z96.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
2031
+ );
2021
2032
  var simulation_dc_voltage_source = z96.object({
2022
2033
  type: z96.literal("simulation_voltage_source"),
2023
2034
  simulation_voltage_source_id: getZodPrefixedIdWithDefault(
@@ -2044,7 +2055,8 @@ var simulation_ac_voltage_source = z96.object({
2044
2055
  frequency: frequency.optional(),
2045
2056
  peak_to_peak_voltage: voltage.optional(),
2046
2057
  wave_shape: wave_shape.optional(),
2047
- phase: rotation.optional()
2058
+ phase: rotation.optional(),
2059
+ duty_cycle: percentage.optional()
2048
2060
  }).describe("Defines an AC voltage source for simulation");
2049
2061
  var simulation_voltage_source = z96.union([simulation_dc_voltage_source, simulation_ac_voltage_source]).describe("Defines a voltage source for simulation");
2050
2062
  expectTypesMatch(true);