circuit-json 0.0.267 → 0.0.268

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
@@ -79,6 +79,8 @@ https://github.com/user-attachments/assets/2f28b7ba-689e-4d80-85b2-5bdef84b41f8
79
79
  - [SourceSimpleTransistor](#sourcesimpletransistor)
80
80
  - [SourceTrace](#sourcetrace)
81
81
  - [SourceTraceNotConnectedError](#sourcetracenotconnectederror)
82
+ - [CAD Components](#cad-components)
83
+ - [CadComponent](#cadcomponent)
82
84
  - [PCB Elements](#pcb-elements)
83
85
  - [PcbAutoroutingError](#pcbautoroutingerror)
84
86
  - [PcbBoard](#pcbboard)
@@ -140,6 +142,7 @@ https://github.com/user-attachments/assets/2f28b7ba-689e-4d80-85b2-5bdef84b41f8
140
142
  - [SchematicVoltageProbe](#schematicvoltageprobe)
141
143
  - [Simulation Elements](#simulation-elements)
142
144
  - [SimulationExperiment](#simulationexperiment)
145
+ - [SimulationSwitch](#simulationswitch)
143
146
  - [SimulationTransientVoltageGraph](#simulationtransientvoltagegraph)
144
147
  - [SimulationVoltageSource](#simulationvoltagesource)
145
148
 
@@ -748,6 +751,36 @@ interface SourceTraceNotConnectedError {
748
751
  }
749
752
  ```
750
753
 
754
+ ## CAD Components
755
+
756
+ ### CadComponent
757
+
758
+ [Source](https://github.com/tscircuit/circuit-json/blob/main/src/cad/cad_component.ts)
759
+
760
+ ```typescript
761
+ interface CadComponent {
762
+ type: "cad_component"
763
+ cad_component_id: string
764
+ pcb_component_id: string
765
+ source_component_id: string
766
+ position: Point3
767
+ rotation?: Point3
768
+ size?: Point3
769
+ layer?: LayerRef
770
+ subcircuit_id?: string
771
+ footprinter_string?: string
772
+ model_obj_url?: string
773
+ model_stl_url?: string
774
+ model_3mf_url?: string
775
+ model_gltf_url?: string
776
+ model_glb_url?: string
777
+ model_step_url?: string
778
+ model_wrl_url?: string
779
+ model_unit_to_mm_scale_factor?: number
780
+ model_jscad?: any
781
+ }
782
+ ```
783
+
751
784
  ## PCB Elements
752
785
 
753
786
  ### PcbAutoroutingError
@@ -839,7 +872,8 @@ interface PcbComponent {
839
872
  Error emitted when a PCB component is placed outside the board boundaries
840
873
 
841
874
  ```typescript
842
- /** Error emitted when a PCB component is placed outside the board boundaries */ interface PcbComponentOutsideBoardError {
875
+ /** Error emitted when a PCB component is placed outside the board boundaries */
876
+ interface PcbComponentOutsideBoardError {
843
877
  type: "pcb_component_outside_board_error"
844
878
  pcb_component_outside_board_error_id: string
845
879
  error_type: "pcb_component_outside_board_error"
@@ -958,7 +992,8 @@ interface PcbFabricationNoteText {
958
992
  Error emitted when a pcb footprint overlaps with another element
959
993
 
960
994
  ```typescript
961
- /** Error emitted when a pcb footprint overlaps with another element */ interface PcbFootprintOverlapError {
995
+ /** Error emitted when a pcb footprint overlaps with another element */
996
+ interface PcbFootprintOverlapError {
962
997
  type: "pcb_footprint_overlap_error"
963
998
  pcb_error_id: string
964
999
  error_type: "pcb_footprint_overlap_error"
@@ -1642,7 +1677,8 @@ interface PcbVia {
1642
1677
  Draws a styled arc on the schematic
1643
1678
 
1644
1679
  ```typescript
1645
- /** Draws a styled arc on the schematic */ interface SchematicArc {
1680
+ /** Draws a styled arc on the schematic */
1681
+ interface SchematicArc {
1646
1682
  type: "schematic_arc"
1647
1683
  schematic_arc_id: string
1648
1684
  schematic_component_id: string
@@ -1682,7 +1718,8 @@ interface SchematicBox {
1682
1718
  Draws a styled circle on the schematic
1683
1719
 
1684
1720
  ```typescript
1685
- /** Draws a styled circle on the schematic */ interface SchematicCircle {
1721
+ /** Draws a styled circle on the schematic */
1722
+ interface SchematicCircle {
1686
1723
  type: "schematic_circle"
1687
1724
  schematic_circle_id: string
1688
1725
  schematic_component_id: string
@@ -1850,7 +1887,8 @@ interface SchematicLayoutError {
1850
1887
  Draws a styled line on the schematic
1851
1888
 
1852
1889
  ```typescript
1853
- /** Draws a styled line on the schematic */ interface SchematicLine {
1890
+ /** Draws a styled line on the schematic */
1891
+ interface SchematicLine {
1854
1892
  type: "schematic_line"
1855
1893
  schematic_line_id: string
1856
1894
  schematic_component_id: string
@@ -1955,7 +1993,8 @@ interface SchematicPort {
1955
1993
  Draws a styled rectangle on the schematic
1956
1994
 
1957
1995
  ```typescript
1958
- /** Draws a styled rectangle on the schematic */ interface SchematicRect {
1996
+ /** Draws a styled rectangle on the schematic */
1997
+ interface SchematicRect {
1959
1998
  type: "schematic_rect"
1960
1999
  schematic_rect_id: string
1961
2000
  schematic_component_id: string
@@ -2093,6 +2132,21 @@ interface SimulationExperiment {
2093
2132
  }
2094
2133
  ```
2095
2134
 
2135
+ ### SimulationSwitch
2136
+
2137
+ [Source](https://github.com/tscircuit/circuit-json/blob/main/src/simulation/simulation_switch.ts)
2138
+
2139
+ ```typescript
2140
+ interface SimulationSwitch {
2141
+ type: "simulation_switch"
2142
+ simulation_switch_id: string
2143
+ closes_at?: number
2144
+ opens_at?: number
2145
+ starts_closed?: boolean
2146
+ switching_frequency?: number
2147
+ }
2148
+ ```
2149
+
2096
2150
  ### SimulationTransientVoltageGraph
2097
2151
 
2098
2152
  [Source](https://github.com/tscircuit/circuit-json/blob/main/src/simulation/simulation_transient_voltage_graph.ts)
package/dist/index.d.mts CHANGED
@@ -10194,6 +10194,38 @@ declare const simulation_transient_voltage_graph: z.ZodObject<{
10194
10194
  }>;
10195
10195
  type SimulationTransientVoltageGraphInput = z.input<typeof simulation_transient_voltage_graph>;
10196
10196
 
10197
+ declare const simulation_switch: z.ZodObject<{
10198
+ type: z.ZodLiteral<"simulation_switch">;
10199
+ simulation_switch_id: z.ZodDefault<z.ZodOptional<z.ZodString>>;
10200
+ closes_at: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
10201
+ opens_at: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
10202
+ starts_closed: z.ZodOptional<z.ZodBoolean>;
10203
+ switching_frequency: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
10204
+ }, "strip", z.ZodTypeAny, {
10205
+ type: "simulation_switch";
10206
+ simulation_switch_id: string;
10207
+ closes_at?: number | undefined;
10208
+ opens_at?: number | undefined;
10209
+ starts_closed?: boolean | undefined;
10210
+ switching_frequency?: number | undefined;
10211
+ }, {
10212
+ type: "simulation_switch";
10213
+ simulation_switch_id?: string | undefined;
10214
+ closes_at?: string | number | undefined;
10215
+ opens_at?: string | number | undefined;
10216
+ starts_closed?: boolean | undefined;
10217
+ switching_frequency?: string | number | undefined;
10218
+ }>;
10219
+ type SimulationSwitchInput = z.input<typeof simulation_switch>;
10220
+ interface SimulationSwitch {
10221
+ type: "simulation_switch";
10222
+ simulation_switch_id: string;
10223
+ closes_at?: number;
10224
+ opens_at?: number;
10225
+ starts_closed?: boolean;
10226
+ switching_frequency?: number;
10227
+ }
10228
+
10197
10229
  declare const any_circuit_element: z.ZodUnion<[z.ZodObject<{
10198
10230
  type: z.ZodLiteral<"source_trace">;
10199
10231
  source_trace_id: z.ZodString;
@@ -23063,4 +23095,4 @@ type AnySoupElementInput = AnyCircuitElementInput;
23063
23095
  */
23064
23096
  type CircuitJson = AnyCircuitElement[];
23065
23097
 
23066
- export { type AnyCircuitElement, type AnyCircuitElementInput, type AnySoupElement, type AnySoupElementInput, type AnySourceComponent, type AnySourceElement, type BRepShape, type CadComponent, type CadComponentInput, type CircuitJson, type CircuitJsonError, type CircuitJsonFootprintLoadError, type CircuitJsonFootprintLoadErrorInput, type Distance, type ExperimentType, type ExternalFootprintLoadError, type ExternalFootprintLoadErrorInput, 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 PcbComponentOutsideBoardError, type PcbComponentOutsideBoardErrorInput, type PcbCopperPour, type PcbCopperPourBRep, type PcbCopperPourBRepInput, type PcbCopperPourInput, type PcbCopperPourPolygon, type PcbCopperPourPolygonInput, type PcbCopperPourRect, type PcbCopperPourRectInput, 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 PcbNet, type PcbNetInput, 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 PointWithBulge, type Position, type Ring, type Rotation, type RouteHintPoint, type RouteHintPointInput, type SchematicArc, type SchematicArcInput, type SchematicBox, type SchematicBoxInput, type SchematicCircle, type SchematicCircleInput, 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 SchematicRect, type SchematicRectInput, 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 SimulationExperiment, type SimulationExperimentInput, type SimulationTransientVoltageGraph, type SimulationTransientVoltageGraphInput, type SimulationVoltageSource, type SimulationVoltageSourceInput, type Size, type SizeInput, type SourceComponentBase, type SourceFailedToCreateComponentError, type SourceFailedToCreateComponentErrorInput, type SourceGroup, type SourceGroupInput, type SourceManuallyPlacedVia, type SourceManuallyPlacedViaInput, 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 SourceSimplePinout, type SourceSimplePinoutInput, 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, brep_shape, cad_component, capacitance, circuit_json_footprint_load_error, current, distance, experiment_type, external_footprint_load_error, frequency, getZodPrefixedIdWithDefault, inductance, layer_ref, layer_string, length, ninePointAnchor, pcb_autorouting_error, pcb_board, pcb_breakout_point, pcb_component, pcb_component_outside_board_error, pcb_copper_pour, pcb_copper_pour_brep, pcb_copper_pour_polygon, pcb_copper_pour_rect, 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_net, 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, point_with_bulge, port_arrangement, position, position3, resistance, ring, rotation, route_hint_point, schematic_arc, schematic_box, schematic_circle, 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_rect, schematic_table, schematic_table_cell, schematic_text, schematic_trace, schematic_voltage_probe, simulation_ac_voltage_source, simulation_dc_voltage_source, simulation_experiment, simulation_transient_voltage_graph, simulation_voltage_source, size, source_component_base, source_failed_to_create_component_error, source_group, source_manually_placed_via, 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_pinout, 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 };
23098
+ export { type AnyCircuitElement, type AnyCircuitElementInput, type AnySoupElement, type AnySoupElementInput, type AnySourceComponent, type AnySourceElement, type BRepShape, type CadComponent, type CadComponentInput, type CircuitJson, type CircuitJsonError, type CircuitJsonFootprintLoadError, type CircuitJsonFootprintLoadErrorInput, type Distance, type ExperimentType, type ExternalFootprintLoadError, type ExternalFootprintLoadErrorInput, 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 PcbComponentOutsideBoardError, type PcbComponentOutsideBoardErrorInput, type PcbCopperPour, type PcbCopperPourBRep, type PcbCopperPourBRepInput, type PcbCopperPourInput, type PcbCopperPourPolygon, type PcbCopperPourPolygonInput, type PcbCopperPourRect, type PcbCopperPourRectInput, 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 PcbNet, type PcbNetInput, 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 PointWithBulge, type Position, type Ring, type Rotation, type RouteHintPoint, type RouteHintPointInput, type SchematicArc, type SchematicArcInput, type SchematicBox, type SchematicBoxInput, type SchematicCircle, type SchematicCircleInput, 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 SchematicRect, type SchematicRectInput, 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 SimulationExperiment, type SimulationExperimentInput, type SimulationSwitch, type SimulationSwitchInput, type SimulationTransientVoltageGraph, type SimulationTransientVoltageGraphInput, type SimulationVoltageSource, type SimulationVoltageSourceInput, type Size, type SizeInput, type SourceComponentBase, type SourceFailedToCreateComponentError, type SourceFailedToCreateComponentErrorInput, type SourceGroup, type SourceGroupInput, type SourceManuallyPlacedVia, type SourceManuallyPlacedViaInput, 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 SourceSimplePinout, type SourceSimplePinoutInput, 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, brep_shape, cad_component, capacitance, circuit_json_footprint_load_error, current, distance, experiment_type, external_footprint_load_error, frequency, getZodPrefixedIdWithDefault, inductance, layer_ref, layer_string, length, ninePointAnchor, pcb_autorouting_error, pcb_board, pcb_breakout_point, pcb_component, pcb_component_outside_board_error, pcb_copper_pour, pcb_copper_pour_brep, pcb_copper_pour_polygon, pcb_copper_pour_rect, 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_net, 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, point_with_bulge, port_arrangement, position, position3, resistance, ring, rotation, route_hint_point, schematic_arc, schematic_box, schematic_circle, 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_rect, schematic_table, schematic_table_cell, schematic_text, schematic_trace, schematic_voltage_probe, simulation_ac_voltage_source, simulation_dc_voltage_source, simulation_experiment, simulation_switch, simulation_transient_voltage_graph, simulation_voltage_source, size, source_component_base, source_failed_to_create_component_error, source_group, source_manually_placed_via, 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_pinout, 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
@@ -2353,9 +2353,21 @@ var simulation_transient_voltage_graph = z109.object({
2353
2353
  }).describe("Stores voltage measurements over time for a simulation");
2354
2354
  expectTypesMatch(true);
2355
2355
 
2356
- // src/any_circuit_element.ts
2356
+ // src/simulation/simulation_switch.ts
2357
2357
  import { z as z110 } from "zod";
2358
- var any_circuit_element = z110.union([
2358
+ var simulation_switch = z110.object({
2359
+ type: z110.literal("simulation_switch"),
2360
+ simulation_switch_id: getZodPrefixedIdWithDefault("simulation_switch"),
2361
+ closes_at: time.optional(),
2362
+ opens_at: time.optional(),
2363
+ starts_closed: z110.boolean().optional(),
2364
+ switching_frequency: frequency.optional()
2365
+ }).describe("Defines a switch for simulation timing control");
2366
+ expectTypesMatch(true);
2367
+
2368
+ // src/any_circuit_element.ts
2369
+ import { z as z111 } from "zod";
2370
+ var any_circuit_element = z111.union([
2359
2371
  source_trace,
2360
2372
  source_port,
2361
2373
  any_source_component,
@@ -2562,6 +2574,7 @@ export {
2562
2574
  simulation_ac_voltage_source,
2563
2575
  simulation_dc_voltage_source,
2564
2576
  simulation_experiment,
2577
+ simulation_switch,
2565
2578
  simulation_transient_voltage_graph,
2566
2579
  simulation_voltage_source,
2567
2580
  size,