circuit-json 0.0.282 → 0.0.283

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
@@ -87,6 +87,7 @@ https://github.com/user-attachments/assets/2f28b7ba-689e-4d80-85b2-5bdef84b41f8
87
87
  - [PcbBoard](#pcbboard)
88
88
  - [PcbBreakoutPoint](#pcbbreakoutpoint)
89
89
  - [PcbComponent](#pcbcomponent)
90
+ - [PcbComponentInvalidLayerError](#pcbcomponentinvalidlayererror)
90
91
  - [PcbComponentOutsideBoardError](#pcbcomponentoutsideboarderror)
91
92
  - [PcbCopperPour](#pcbcopperpour)
92
93
  - [PcbCourtyardOutline](#pcbcourtyardoutline)
@@ -895,6 +896,26 @@ interface PcbComponent {
895
896
  }
896
897
  ```
897
898
 
899
+ ### PcbComponentInvalidLayerError
900
+
901
+ [Source](https://github.com/tscircuit/circuit-json/blob/main/src/pcb/pcb_component_invalid_layer_error.ts)
902
+
903
+ Error emitted when a component is placed on an invalid layer (components can only be on 'top' or 'bottom' layers)
904
+
905
+ ```typescript
906
+ /** Error emitted when a component is placed on an invalid layer (components can only be on 'top' or 'bottom' layers) */
907
+ interface PcbComponentInvalidLayerError {
908
+ type: "pcb_component_invalid_layer_error"
909
+ pcb_component_invalid_layer_error_id: string
910
+ error_type: "pcb_component_invalid_layer_error"
911
+ message: string
912
+ pcb_component_id?: string
913
+ source_component_id: string
914
+ layer: LayerRef
915
+ subcircuit_id?: string
916
+ }
917
+ ```
918
+
898
919
  ### PcbComponentOutsideBoardError
899
920
 
900
921
  [Source](https://github.com/tscircuit/circuit-json/blob/main/src/pcb/pcb_component_outside_board_error.ts)
package/dist/index.d.mts CHANGED
@@ -6056,6 +6056,57 @@ interface PcbComponentOutsideBoardError {
6056
6056
  source_component_id?: string;
6057
6057
  }
6058
6058
 
6059
+ declare const pcb_component_invalid_layer_error: z.ZodObject<{
6060
+ type: z.ZodLiteral<"pcb_component_invalid_layer_error">;
6061
+ pcb_component_invalid_layer_error_id: z.ZodDefault<z.ZodOptional<z.ZodString>>;
6062
+ error_type: z.ZodDefault<z.ZodLiteral<"pcb_component_invalid_layer_error">>;
6063
+ message: z.ZodString;
6064
+ pcb_component_id: z.ZodOptional<z.ZodString>;
6065
+ source_component_id: z.ZodString;
6066
+ layer: z.ZodEffects<z.ZodUnion<[z.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>, z.ZodObject<{
6067
+ name: z.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>;
6068
+ }, "strip", z.ZodTypeAny, {
6069
+ name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
6070
+ }, {
6071
+ name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
6072
+ }>]>, "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6", "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
6073
+ name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
6074
+ }>;
6075
+ subcircuit_id: z.ZodOptional<z.ZodString>;
6076
+ }, "strip", z.ZodTypeAny, {
6077
+ message: string;
6078
+ type: "pcb_component_invalid_layer_error";
6079
+ source_component_id: string;
6080
+ layer: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
6081
+ error_type: "pcb_component_invalid_layer_error";
6082
+ pcb_component_invalid_layer_error_id: string;
6083
+ pcb_component_id?: string | undefined;
6084
+ subcircuit_id?: string | undefined;
6085
+ }, {
6086
+ message: string;
6087
+ type: "pcb_component_invalid_layer_error";
6088
+ source_component_id: string;
6089
+ layer: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
6090
+ name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
6091
+ };
6092
+ pcb_component_id?: string | undefined;
6093
+ subcircuit_id?: string | undefined;
6094
+ error_type?: "pcb_component_invalid_layer_error" | undefined;
6095
+ pcb_component_invalid_layer_error_id?: string | undefined;
6096
+ }>;
6097
+ type PcbComponentInvalidLayerErrorInput = z.input<typeof pcb_component_invalid_layer_error>;
6098
+ /** Error emitted when a component is placed on an invalid layer (components can only be on 'top' or 'bottom' layers) */
6099
+ interface PcbComponentInvalidLayerError {
6100
+ type: "pcb_component_invalid_layer_error";
6101
+ pcb_component_invalid_layer_error_id: string;
6102
+ error_type: "pcb_component_invalid_layer_error";
6103
+ message: string;
6104
+ pcb_component_id?: string;
6105
+ source_component_id: string;
6106
+ layer: LayerRef;
6107
+ subcircuit_id?: string;
6108
+ }
6109
+
6059
6110
  declare const pcb_via_clearance_error: z.ZodObject<{
6060
6111
  type: z.ZodLiteral<"pcb_via_clearance_error">;
6061
6112
  pcb_error_id: z.ZodDefault<z.ZodOptional<z.ZodString>>;
@@ -6279,7 +6330,7 @@ interface PcbCourtyardOutline {
6279
6330
  */
6280
6331
  type PCBCourtyardOutline = PcbCourtyardOutline;
6281
6332
 
6282
- type PcbCircuitElement = PcbComponent | PcbHole | PcbPlatedHole | PcbPort | PcbSmtPad | PcbSolderPaste | PcbText | PcbTrace | PcbTraceError | PcbTraceMissingError | PcbMissingFootprintError | ExternalFootprintLoadError | CircuitJsonFootprintLoadError | PcbManualEditConflictWarning | PcbPortNotMatchedError | PcbPortNotConnectedError | PcbVia | PcbNet | PcbBoard | PcbPlacementError | PcbTraceHint | PcbSilkscreenLine | PcbSilkscreenPath | PcbSilkscreenText | PcbSilkscreenRect | PcbSilkscreenCircle | PcbFabricationNoteRect | PcbFabricationNoteDimension | PcbNoteText | PcbNoteRect | PcbNotePath | PcbNoteLine | PcbNoteDimension | PcbAutoroutingError | PcbFootprintOverlapError | PcbCutout | PcbBreakoutPoint | PcbGroundPlane | PcbGroundPlaneRegion | PcbThermalSpoke | PcbCopperPour | PcbComponentOutsideBoardError | PcbViaClearanceError | PcbCourtyardRect | PcbCourtyardOutline;
6333
+ type PcbCircuitElement = PcbComponent | PcbHole | PcbPlatedHole | PcbPort | PcbSmtPad | PcbSolderPaste | PcbText | PcbTrace | PcbTraceError | PcbTraceMissingError | PcbMissingFootprintError | ExternalFootprintLoadError | CircuitJsonFootprintLoadError | PcbManualEditConflictWarning | PcbPortNotMatchedError | PcbPortNotConnectedError | PcbVia | PcbNet | PcbBoard | PcbPlacementError | PcbTraceHint | PcbSilkscreenLine | PcbSilkscreenPath | PcbSilkscreenText | PcbSilkscreenRect | PcbSilkscreenCircle | PcbFabricationNoteRect | PcbFabricationNoteDimension | PcbNoteText | PcbNoteRect | PcbNotePath | PcbNoteLine | PcbNoteDimension | PcbAutoroutingError | PcbFootprintOverlapError | PcbCutout | PcbBreakoutPoint | PcbGroundPlane | PcbGroundPlaneRegion | PcbThermalSpoke | PcbCopperPour | PcbComponentOutsideBoardError | PcbComponentInvalidLayerError | PcbViaClearanceError | PcbCourtyardRect | PcbCourtyardOutline;
6283
6334
 
6284
6335
  interface SchematicBox {
6285
6336
  type: "schematic_box";
@@ -16861,6 +16912,43 @@ declare const any_circuit_element: z.ZodUnion<[z.ZodObject<{
16861
16912
  subcircuit_id?: string | undefined;
16862
16913
  error_type?: "pcb_component_outside_board_error" | undefined;
16863
16914
  pcb_component_outside_board_error_id?: string | undefined;
16915
+ }>, z.ZodObject<{
16916
+ type: z.ZodLiteral<"pcb_component_invalid_layer_error">;
16917
+ pcb_component_invalid_layer_error_id: z.ZodDefault<z.ZodOptional<z.ZodString>>;
16918
+ error_type: z.ZodDefault<z.ZodLiteral<"pcb_component_invalid_layer_error">>;
16919
+ message: z.ZodString;
16920
+ pcb_component_id: z.ZodOptional<z.ZodString>;
16921
+ source_component_id: z.ZodString;
16922
+ layer: z.ZodEffects<z.ZodUnion<[z.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>, z.ZodObject<{
16923
+ name: z.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>;
16924
+ }, "strip", z.ZodTypeAny, {
16925
+ name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
16926
+ }, {
16927
+ name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
16928
+ }>]>, "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6", "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
16929
+ name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
16930
+ }>;
16931
+ subcircuit_id: z.ZodOptional<z.ZodString>;
16932
+ }, "strip", z.ZodTypeAny, {
16933
+ message: string;
16934
+ type: "pcb_component_invalid_layer_error";
16935
+ source_component_id: string;
16936
+ layer: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
16937
+ error_type: "pcb_component_invalid_layer_error";
16938
+ pcb_component_invalid_layer_error_id: string;
16939
+ pcb_component_id?: string | undefined;
16940
+ subcircuit_id?: string | undefined;
16941
+ }, {
16942
+ message: string;
16943
+ type: "pcb_component_invalid_layer_error";
16944
+ source_component_id: string;
16945
+ layer: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
16946
+ name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
16947
+ };
16948
+ pcb_component_id?: string | undefined;
16949
+ subcircuit_id?: string | undefined;
16950
+ error_type?: "pcb_component_invalid_layer_error" | undefined;
16951
+ pcb_component_invalid_layer_error_id?: string | undefined;
16864
16952
  }>, z.ZodObject<{
16865
16953
  type: z.ZodLiteral<"pcb_courtyard_rect">;
16866
16954
  pcb_courtyard_rect_id: z.ZodDefault<z.ZodOptional<z.ZodString>>;
@@ -24014,6 +24102,43 @@ declare const any_soup_element: z.ZodUnion<[z.ZodObject<{
24014
24102
  subcircuit_id?: string | undefined;
24015
24103
  error_type?: "pcb_component_outside_board_error" | undefined;
24016
24104
  pcb_component_outside_board_error_id?: string | undefined;
24105
+ }>, z.ZodObject<{
24106
+ type: z.ZodLiteral<"pcb_component_invalid_layer_error">;
24107
+ pcb_component_invalid_layer_error_id: z.ZodDefault<z.ZodOptional<z.ZodString>>;
24108
+ error_type: z.ZodDefault<z.ZodLiteral<"pcb_component_invalid_layer_error">>;
24109
+ message: z.ZodString;
24110
+ pcb_component_id: z.ZodOptional<z.ZodString>;
24111
+ source_component_id: z.ZodString;
24112
+ layer: z.ZodEffects<z.ZodUnion<[z.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>, z.ZodObject<{
24113
+ name: z.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>;
24114
+ }, "strip", z.ZodTypeAny, {
24115
+ name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
24116
+ }, {
24117
+ name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
24118
+ }>]>, "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6", "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
24119
+ name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
24120
+ }>;
24121
+ subcircuit_id: z.ZodOptional<z.ZodString>;
24122
+ }, "strip", z.ZodTypeAny, {
24123
+ message: string;
24124
+ type: "pcb_component_invalid_layer_error";
24125
+ source_component_id: string;
24126
+ layer: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
24127
+ error_type: "pcb_component_invalid_layer_error";
24128
+ pcb_component_invalid_layer_error_id: string;
24129
+ pcb_component_id?: string | undefined;
24130
+ subcircuit_id?: string | undefined;
24131
+ }, {
24132
+ message: string;
24133
+ type: "pcb_component_invalid_layer_error";
24134
+ source_component_id: string;
24135
+ layer: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
24136
+ name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
24137
+ };
24138
+ pcb_component_id?: string | undefined;
24139
+ subcircuit_id?: string | undefined;
24140
+ error_type?: "pcb_component_invalid_layer_error" | undefined;
24141
+ pcb_component_invalid_layer_error_id?: string | undefined;
24017
24142
  }>, z.ZodObject<{
24018
24143
  type: z.ZodLiteral<"pcb_courtyard_rect">;
24019
24144
  pcb_courtyard_rect_id: z.ZodDefault<z.ZodOptional<z.ZodString>>;
@@ -25663,4 +25788,4 @@ type AnySoupElementInput = AnyCircuitElementInput;
25663
25788
  */
25664
25789
  type CircuitJson = AnyCircuitElement[];
25665
25790
 
25666
- 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 PCBCourtyardOutline, type PCBCourtyardRect, type PCBFabricationNoteDimension, type PCBFabricationNotePath, type PCBFabricationNoteRect, 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 PcbCourtyardOutline, type PcbCourtyardOutlineInput, type PcbCourtyardRect, type PcbCourtyardRectInput, type PcbCutout, type PcbCutoutCircle, type PcbCutoutCircleInput, type PcbCutoutInput, type PcbCutoutPolygon, type PcbCutoutPolygonInput, type PcbCutoutRect, type PcbCutoutRectInput, type PcbFabricationNoteDimension, type PcbFabricationNoteDimensionInput, type PcbFabricationNotePath, type PcbFabricationNotePathInput, type PcbFabricationNoteRect, type PcbFabricationNoteRectInput, 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 PcbHolePill, type PcbHolePillInput, type PcbHolePillWithRectPad, type PcbHoleRotatedPill, type PcbHoleRotatedPillInput, type PcbHoleRotatedPillWithRectPad, type PcbManualEditConflictWarning, type PcbManualEditConflictWarningInput, type PcbMissingFootprintError, type PcbMissingFootprintErrorInput, type PcbNet, type PcbNetInput, type PcbNoteDimension, type PcbNoteDimensionInput, type PcbNoteLine, type PcbNoteLineInput, type PcbNotePath, type PcbNotePathInput, type PcbNoteRect, type PcbNoteRectInput, type PcbNoteText, type PcbNoteTextInput, 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 PcbViaClearanceError, type PcbViaClearanceErrorInput, 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 SimulationVoltageProbe, type SimulationVoltageProbeInput, type SimulationVoltageSource, type SimulationVoltageSourceInput, type Size, type SizeInput, type SourceBoard, type SourceBoardInput, 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, duration_ms, experiment_type, external_footprint_load_error, frequency, getZodPrefixedIdWithDefault, inductance, layer_ref, layer_string, length, ms, 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_courtyard_outline, pcb_courtyard_rect, pcb_cutout, pcb_cutout_circle, pcb_cutout_polygon, pcb_cutout_rect, pcb_fabrication_note_dimension, pcb_fabrication_note_path, pcb_fabrication_note_rect, 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_hole_pill_shape, pcb_hole_rotated_pill_shape, pcb_keepout, pcb_manual_edit_conflict_warning, pcb_missing_footprint_error, pcb_net, pcb_note_dimension, pcb_note_line, pcb_note_path, pcb_note_rect, pcb_note_text, 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, pcb_via_clearance_error, 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_probe, simulation_voltage_source, size, source_board, 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, timestamp, visible_layer, voltage, wave_shape };
25791
+ 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 PCBCourtyardOutline, type PCBCourtyardRect, type PCBFabricationNoteDimension, type PCBFabricationNotePath, type PCBFabricationNoteRect, 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 PcbComponentInvalidLayerError, type PcbComponentInvalidLayerErrorInput, type PcbComponentOutsideBoardError, type PcbComponentOutsideBoardErrorInput, type PcbCopperPour, type PcbCopperPourBRep, type PcbCopperPourBRepInput, type PcbCopperPourInput, type PcbCopperPourPolygon, type PcbCopperPourPolygonInput, type PcbCopperPourRect, type PcbCopperPourRectInput, type PcbCourtyardOutline, type PcbCourtyardOutlineInput, type PcbCourtyardRect, type PcbCourtyardRectInput, type PcbCutout, type PcbCutoutCircle, type PcbCutoutCircleInput, type PcbCutoutInput, type PcbCutoutPolygon, type PcbCutoutPolygonInput, type PcbCutoutRect, type PcbCutoutRectInput, type PcbFabricationNoteDimension, type PcbFabricationNoteDimensionInput, type PcbFabricationNotePath, type PcbFabricationNotePathInput, type PcbFabricationNoteRect, type PcbFabricationNoteRectInput, 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 PcbHolePill, type PcbHolePillInput, type PcbHolePillWithRectPad, type PcbHoleRotatedPill, type PcbHoleRotatedPillInput, type PcbHoleRotatedPillWithRectPad, type PcbManualEditConflictWarning, type PcbManualEditConflictWarningInput, type PcbMissingFootprintError, type PcbMissingFootprintErrorInput, type PcbNet, type PcbNetInput, type PcbNoteDimension, type PcbNoteDimensionInput, type PcbNoteLine, type PcbNoteLineInput, type PcbNotePath, type PcbNotePathInput, type PcbNoteRect, type PcbNoteRectInput, type PcbNoteText, type PcbNoteTextInput, 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 PcbViaClearanceError, type PcbViaClearanceErrorInput, 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 SimulationVoltageProbe, type SimulationVoltageProbeInput, type SimulationVoltageSource, type SimulationVoltageSourceInput, type Size, type SizeInput, type SourceBoard, type SourceBoardInput, 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, duration_ms, experiment_type, external_footprint_load_error, frequency, getZodPrefixedIdWithDefault, inductance, layer_ref, layer_string, length, ms, ninePointAnchor, pcb_autorouting_error, pcb_board, pcb_breakout_point, pcb_component, pcb_component_invalid_layer_error, pcb_component_outside_board_error, pcb_copper_pour, pcb_copper_pour_brep, pcb_copper_pour_polygon, pcb_copper_pour_rect, pcb_courtyard_outline, pcb_courtyard_rect, pcb_cutout, pcb_cutout_circle, pcb_cutout_polygon, pcb_cutout_rect, pcb_fabrication_note_dimension, pcb_fabrication_note_path, pcb_fabrication_note_rect, 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_hole_pill_shape, pcb_hole_rotated_pill_shape, pcb_keepout, pcb_manual_edit_conflict_warning, pcb_missing_footprint_error, pcb_net, pcb_note_dimension, pcb_note_line, pcb_note_path, pcb_note_rect, pcb_note_text, 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, pcb_via_clearance_error, 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_probe, simulation_voltage_source, size, source_board, 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, timestamp, visible_layer, voltage, wave_shape };
package/dist/index.mjs CHANGED
@@ -2432,93 +2432,111 @@ var pcb_component_outside_board_error = z113.object({
2432
2432
  );
2433
2433
  expectTypesMatch(true);
2434
2434
 
2435
- // src/pcb/pcb_via_clearance_error.ts
2435
+ // src/pcb/pcb_component_invalid_layer_error.ts
2436
2436
  import { z as z114 } from "zod";
2437
- var pcb_via_clearance_error = z114.object({
2438
- type: z114.literal("pcb_via_clearance_error"),
2439
- pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
2440
- error_type: z114.literal("pcb_via_clearance_error").default("pcb_via_clearance_error"),
2437
+ var pcb_component_invalid_layer_error = z114.object({
2438
+ type: z114.literal("pcb_component_invalid_layer_error"),
2439
+ pcb_component_invalid_layer_error_id: getZodPrefixedIdWithDefault(
2440
+ "pcb_component_invalid_layer_error"
2441
+ ),
2442
+ error_type: z114.literal("pcb_component_invalid_layer_error").default("pcb_component_invalid_layer_error"),
2441
2443
  message: z114.string(),
2442
- pcb_via_ids: z114.array(z114.string()).min(2),
2444
+ pcb_component_id: z114.string().optional(),
2445
+ source_component_id: z114.string(),
2446
+ layer: layer_ref,
2447
+ subcircuit_id: z114.string().optional()
2448
+ }).describe(
2449
+ "Error emitted when a component is placed on an invalid layer (components can only be on 'top' or 'bottom' layers)"
2450
+ );
2451
+ expectTypesMatch(true);
2452
+
2453
+ // src/pcb/pcb_via_clearance_error.ts
2454
+ import { z as z115 } from "zod";
2455
+ var pcb_via_clearance_error = z115.object({
2456
+ type: z115.literal("pcb_via_clearance_error"),
2457
+ pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
2458
+ error_type: z115.literal("pcb_via_clearance_error").default("pcb_via_clearance_error"),
2459
+ message: z115.string(),
2460
+ pcb_via_ids: z115.array(z115.string()).min(2),
2443
2461
  minimum_clearance: distance.optional(),
2444
2462
  actual_clearance: distance.optional(),
2445
- pcb_center: z114.object({
2446
- x: z114.number().optional(),
2447
- y: z114.number().optional()
2463
+ pcb_center: z115.object({
2464
+ x: z115.number().optional(),
2465
+ y: z115.number().optional()
2448
2466
  }).optional(),
2449
- subcircuit_id: z114.string().optional()
2467
+ subcircuit_id: z115.string().optional()
2450
2468
  }).describe("Error emitted when vias are closer than the allowed clearance");
2451
2469
  expectTypesMatch(true);
2452
2470
 
2453
2471
  // src/pcb/pcb_courtyard_rect.ts
2454
- import { z as z115 } from "zod";
2455
- var pcb_courtyard_rect = z115.object({
2456
- type: z115.literal("pcb_courtyard_rect"),
2472
+ import { z as z116 } from "zod";
2473
+ var pcb_courtyard_rect = z116.object({
2474
+ type: z116.literal("pcb_courtyard_rect"),
2457
2475
  pcb_courtyard_rect_id: getZodPrefixedIdWithDefault("pcb_courtyard_rect"),
2458
- pcb_component_id: z115.string(),
2459
- pcb_group_id: z115.string().optional(),
2460
- subcircuit_id: z115.string().optional(),
2476
+ pcb_component_id: z116.string(),
2477
+ pcb_group_id: z116.string().optional(),
2478
+ subcircuit_id: z116.string().optional(),
2461
2479
  center: point,
2462
2480
  width: length,
2463
2481
  height: length,
2464
2482
  layer: visible_layer,
2465
2483
  stroke_width: length.default("0.1mm"),
2466
- is_filled: z115.boolean().optional(),
2467
- has_stroke: z115.boolean().optional(),
2468
- is_stroke_dashed: z115.boolean().optional(),
2469
- color: z115.string().optional()
2484
+ is_filled: z116.boolean().optional(),
2485
+ has_stroke: z116.boolean().optional(),
2486
+ is_stroke_dashed: z116.boolean().optional(),
2487
+ color: z116.string().optional()
2470
2488
  }).describe("Defines a courtyard rectangle on the PCB");
2471
2489
  expectTypesMatch(true);
2472
2490
 
2473
2491
  // src/pcb/pcb_courtyard_outline.ts
2474
- import { z as z116 } from "zod";
2475
- var pcb_courtyard_outline = z116.object({
2476
- type: z116.literal("pcb_courtyard_outline"),
2492
+ import { z as z117 } from "zod";
2493
+ var pcb_courtyard_outline = z117.object({
2494
+ type: z117.literal("pcb_courtyard_outline"),
2477
2495
  pcb_courtyard_outline_id: getZodPrefixedIdWithDefault(
2478
2496
  "pcb_courtyard_outline"
2479
2497
  ),
2480
- pcb_component_id: z116.string(),
2481
- pcb_group_id: z116.string().optional(),
2482
- subcircuit_id: z116.string().optional(),
2498
+ pcb_component_id: z117.string(),
2499
+ pcb_group_id: z117.string().optional(),
2500
+ subcircuit_id: z117.string().optional(),
2483
2501
  layer: visible_layer,
2484
- outline: z116.array(point).min(2),
2502
+ outline: z117.array(point).min(2),
2485
2503
  stroke_width: length.default("0.1mm"),
2486
- is_closed: z116.boolean().optional(),
2487
- is_stroke_dashed: z116.boolean().optional(),
2488
- color: z116.string().optional()
2504
+ is_closed: z117.boolean().optional(),
2505
+ is_stroke_dashed: z117.boolean().optional(),
2506
+ color: z117.string().optional()
2489
2507
  }).describe("Defines a courtyard outline on the PCB");
2490
2508
  expectTypesMatch(true);
2491
2509
 
2492
2510
  // src/cad/cad_component.ts
2493
- import { z as z117 } from "zod";
2494
- var cad_component = z117.object({
2495
- type: z117.literal("cad_component"),
2496
- cad_component_id: z117.string(),
2497
- pcb_component_id: z117.string(),
2498
- source_component_id: z117.string(),
2511
+ import { z as z118 } from "zod";
2512
+ var cad_component = z118.object({
2513
+ type: z118.literal("cad_component"),
2514
+ cad_component_id: z118.string(),
2515
+ pcb_component_id: z118.string(),
2516
+ source_component_id: z118.string(),
2499
2517
  position: point3,
2500
2518
  rotation: point3.optional(),
2501
2519
  size: point3.optional(),
2502
2520
  layer: layer_ref.optional(),
2503
- subcircuit_id: z117.string().optional(),
2521
+ subcircuit_id: z118.string().optional(),
2504
2522
  // These are all ways to generate/load the 3d model
2505
- footprinter_string: z117.string().optional(),
2506
- model_obj_url: z117.string().optional(),
2507
- model_stl_url: z117.string().optional(),
2508
- model_3mf_url: z117.string().optional(),
2509
- model_gltf_url: z117.string().optional(),
2510
- model_glb_url: z117.string().optional(),
2511
- model_step_url: z117.string().optional(),
2512
- model_wrl_url: z117.string().optional(),
2513
- model_unit_to_mm_scale_factor: z117.number().optional(),
2514
- model_jscad: z117.any().optional()
2523
+ footprinter_string: z118.string().optional(),
2524
+ model_obj_url: z118.string().optional(),
2525
+ model_stl_url: z118.string().optional(),
2526
+ model_3mf_url: z118.string().optional(),
2527
+ model_gltf_url: z118.string().optional(),
2528
+ model_glb_url: z118.string().optional(),
2529
+ model_step_url: z118.string().optional(),
2530
+ model_wrl_url: z118.string().optional(),
2531
+ model_unit_to_mm_scale_factor: z118.number().optional(),
2532
+ model_jscad: z118.any().optional()
2515
2533
  }).describe("Defines a component on the PCB");
2516
2534
  expectTypesMatch(true);
2517
2535
 
2518
2536
  // src/simulation/simulation_voltage_source.ts
2519
- import { z as z118 } from "zod";
2520
- var wave_shape = z118.enum(["sinewave", "square", "triangle", "sawtooth"]);
2521
- var percentage = z118.union([z118.string(), z118.number()]).transform((val) => {
2537
+ import { z as z119 } from "zod";
2538
+ var wave_shape = z119.enum(["sinewave", "square", "triangle", "sawtooth"]);
2539
+ var percentage = z119.union([z119.string(), z119.number()]).transform((val) => {
2522
2540
  if (typeof val === "string") {
2523
2541
  if (val.endsWith("%")) {
2524
2542
  return parseFloat(val.slice(0, -1)) / 100;
@@ -2527,30 +2545,30 @@ var percentage = z118.union([z118.string(), z118.number()]).transform((val) => {
2527
2545
  }
2528
2546
  return val;
2529
2547
  }).pipe(
2530
- z118.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
2548
+ z119.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
2531
2549
  );
2532
- var simulation_dc_voltage_source = z118.object({
2533
- type: z118.literal("simulation_voltage_source"),
2550
+ var simulation_dc_voltage_source = z119.object({
2551
+ type: z119.literal("simulation_voltage_source"),
2534
2552
  simulation_voltage_source_id: getZodPrefixedIdWithDefault(
2535
2553
  "simulation_voltage_source"
2536
2554
  ),
2537
- is_dc_source: z118.literal(true).optional().default(true),
2538
- positive_source_port_id: z118.string().optional(),
2539
- negative_source_port_id: z118.string().optional(),
2540
- positive_source_net_id: z118.string().optional(),
2541
- negative_source_net_id: z118.string().optional(),
2555
+ is_dc_source: z119.literal(true).optional().default(true),
2556
+ positive_source_port_id: z119.string().optional(),
2557
+ negative_source_port_id: z119.string().optional(),
2558
+ positive_source_net_id: z119.string().optional(),
2559
+ negative_source_net_id: z119.string().optional(),
2542
2560
  voltage
2543
2561
  }).describe("Defines a DC voltage source for simulation");
2544
- var simulation_ac_voltage_source = z118.object({
2545
- type: z118.literal("simulation_voltage_source"),
2562
+ var simulation_ac_voltage_source = z119.object({
2563
+ type: z119.literal("simulation_voltage_source"),
2546
2564
  simulation_voltage_source_id: getZodPrefixedIdWithDefault(
2547
2565
  "simulation_voltage_source"
2548
2566
  ),
2549
- is_dc_source: z118.literal(false),
2550
- terminal1_source_port_id: z118.string().optional(),
2551
- terminal2_source_port_id: z118.string().optional(),
2552
- terminal1_source_net_id: z118.string().optional(),
2553
- terminal2_source_net_id: z118.string().optional(),
2567
+ is_dc_source: z119.literal(false),
2568
+ terminal1_source_port_id: z119.string().optional(),
2569
+ terminal2_source_port_id: z119.string().optional(),
2570
+ terminal1_source_net_id: z119.string().optional(),
2571
+ terminal2_source_net_id: z119.string().optional(),
2554
2572
  voltage: voltage.optional(),
2555
2573
  frequency: frequency.optional(),
2556
2574
  peak_to_peak_voltage: voltage.optional(),
@@ -2558,25 +2576,25 @@ var simulation_ac_voltage_source = z118.object({
2558
2576
  phase: rotation.optional(),
2559
2577
  duty_cycle: percentage.optional()
2560
2578
  }).describe("Defines an AC voltage source for simulation");
2561
- var simulation_voltage_source = z118.union([simulation_dc_voltage_source, simulation_ac_voltage_source]).describe("Defines a voltage source for simulation");
2579
+ var simulation_voltage_source = z119.union([simulation_dc_voltage_source, simulation_ac_voltage_source]).describe("Defines a voltage source for simulation");
2562
2580
  expectTypesMatch(true);
2563
2581
  expectTypesMatch(true);
2564
2582
  expectTypesMatch(true);
2565
2583
 
2566
2584
  // src/simulation/simulation_experiment.ts
2567
- import { z as z119 } from "zod";
2568
- var experiment_type = z119.union([
2569
- z119.literal("spice_dc_sweep"),
2570
- z119.literal("spice_dc_operating_point"),
2571
- z119.literal("spice_transient_analysis"),
2572
- z119.literal("spice_ac_analysis")
2585
+ import { z as z120 } from "zod";
2586
+ var experiment_type = z120.union([
2587
+ z120.literal("spice_dc_sweep"),
2588
+ z120.literal("spice_dc_operating_point"),
2589
+ z120.literal("spice_transient_analysis"),
2590
+ z120.literal("spice_ac_analysis")
2573
2591
  ]);
2574
- var simulation_experiment = z119.object({
2575
- type: z119.literal("simulation_experiment"),
2592
+ var simulation_experiment = z120.object({
2593
+ type: z120.literal("simulation_experiment"),
2576
2594
  simulation_experiment_id: getZodPrefixedIdWithDefault(
2577
2595
  "simulation_experiment"
2578
2596
  ),
2579
- name: z119.string(),
2597
+ name: z120.string(),
2580
2598
  experiment_type,
2581
2599
  time_per_step: duration_ms.optional(),
2582
2600
  start_time_ms: ms.optional(),
@@ -2585,48 +2603,48 @@ var simulation_experiment = z119.object({
2585
2603
  expectTypesMatch(true);
2586
2604
 
2587
2605
  // src/simulation/simulation_transient_voltage_graph.ts
2588
- import { z as z120 } from "zod";
2589
- var simulation_transient_voltage_graph = z120.object({
2590
- type: z120.literal("simulation_transient_voltage_graph"),
2606
+ import { z as z121 } from "zod";
2607
+ var simulation_transient_voltage_graph = z121.object({
2608
+ type: z121.literal("simulation_transient_voltage_graph"),
2591
2609
  simulation_transient_voltage_graph_id: getZodPrefixedIdWithDefault(
2592
2610
  "simulation_transient_voltage_graph"
2593
2611
  ),
2594
- simulation_experiment_id: z120.string(),
2595
- timestamps_ms: z120.array(z120.number()).optional(),
2596
- voltage_levels: z120.array(z120.number()),
2597
- schematic_voltage_probe_id: z120.string().optional(),
2598
- simulation_voltage_probe_id: z120.string().optional(),
2599
- subcircuit_connectivity_map_key: z120.string().optional(),
2612
+ simulation_experiment_id: z121.string(),
2613
+ timestamps_ms: z121.array(z121.number()).optional(),
2614
+ voltage_levels: z121.array(z121.number()),
2615
+ schematic_voltage_probe_id: z121.string().optional(),
2616
+ simulation_voltage_probe_id: z121.string().optional(),
2617
+ subcircuit_connectivity_map_key: z121.string().optional(),
2600
2618
  time_per_step: duration_ms,
2601
2619
  start_time_ms: ms,
2602
2620
  end_time_ms: ms,
2603
- name: z120.string().optional()
2621
+ name: z121.string().optional()
2604
2622
  }).describe("Stores voltage measurements over time for a simulation");
2605
2623
  expectTypesMatch(true);
2606
2624
 
2607
2625
  // src/simulation/simulation_switch.ts
2608
- import { z as z121 } from "zod";
2609
- var simulation_switch = z121.object({
2610
- type: z121.literal("simulation_switch"),
2626
+ import { z as z122 } from "zod";
2627
+ var simulation_switch = z122.object({
2628
+ type: z122.literal("simulation_switch"),
2611
2629
  simulation_switch_id: getZodPrefixedIdWithDefault("simulation_switch"),
2612
2630
  closes_at: ms.optional(),
2613
2631
  opens_at: ms.optional(),
2614
- starts_closed: z121.boolean().optional(),
2632
+ starts_closed: z122.boolean().optional(),
2615
2633
  switching_frequency: frequency.optional()
2616
2634
  }).describe("Defines a switch for simulation timing control");
2617
2635
  expectTypesMatch(true);
2618
2636
 
2619
2637
  // src/simulation/simulation_voltage_probe.ts
2620
- import { z as z122 } from "zod";
2621
- var simulation_voltage_probe = z122.object({
2622
- type: z122.literal("simulation_voltage_probe"),
2638
+ import { z as z123 } from "zod";
2639
+ var simulation_voltage_probe = z123.object({
2640
+ type: z123.literal("simulation_voltage_probe"),
2623
2641
  simulation_voltage_probe_id: getZodPrefixedIdWithDefault(
2624
2642
  "simulation_voltage_probe"
2625
2643
  ),
2626
- source_port_id: z122.string().optional(),
2627
- source_net_id: z122.string().optional(),
2628
- name: z122.string().optional(),
2629
- subcircuit_id: z122.string().optional()
2644
+ source_port_id: z123.string().optional(),
2645
+ source_net_id: z123.string().optional(),
2646
+ name: z123.string().optional(),
2647
+ subcircuit_id: z123.string().optional()
2630
2648
  }).describe(
2631
2649
  "Defines a voltage probe for simulation, connected to a port or a net"
2632
2650
  ).refine(
@@ -2638,8 +2656,8 @@ var simulation_voltage_probe = z122.object({
2638
2656
  expectTypesMatch(true);
2639
2657
 
2640
2658
  // src/any_circuit_element.ts
2641
- import { z as z123 } from "zod";
2642
- var any_circuit_element = z123.union([
2659
+ import { z as z124 } from "zod";
2660
+ var any_circuit_element = z124.union([
2643
2661
  source_trace,
2644
2662
  source_port,
2645
2663
  any_source_component,
@@ -2716,6 +2734,7 @@ var any_circuit_element = z123.union([
2716
2734
  pcb_thermal_spoke,
2717
2735
  pcb_copper_pour,
2718
2736
  pcb_component_outside_board_error,
2737
+ pcb_component_invalid_layer_error,
2719
2738
  pcb_courtyard_rect,
2720
2739
  pcb_courtyard_outline,
2721
2740
  schematic_box,
@@ -2774,6 +2793,7 @@ export {
2774
2793
  pcb_board,
2775
2794
  pcb_breakout_point,
2776
2795
  pcb_component,
2796
+ pcb_component_invalid_layer_error,
2777
2797
  pcb_component_outside_board_error,
2778
2798
  pcb_copper_pour,
2779
2799
  pcb_copper_pour_brep,