circuit-json 0.0.197 → 0.0.199

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
@@ -72,6 +72,7 @@ https://github.com/user-attachments/assets/2f28b7ba-689e-4d80-85b2-5bdef84b41f8
72
72
  - [PCB Elements](#pcb-elements)
73
73
  - [PcbAutoroutingError](#pcbautoroutingerror)
74
74
  - [PcbBoard](#pcbboard)
75
+ - [PcbBreakoutPoint](#pcbbreakoutpoint)
75
76
  - [PcbComponent](#pcbcomponent)
76
77
  - [PcbCutout](#pcbcutout)
77
78
  - [PcbFabricationNotePath](#pcbfabricationnotepath)
@@ -577,6 +578,27 @@ interface PcbBoard {
577
578
  }
578
579
  ```
579
580
 
581
+ ### PcbBreakoutPoint
582
+
583
+ [Source](https://github.com/tscircuit/circuit-json/blob/main/src/pcb/pcb_breakout_point.ts)
584
+
585
+ Defines a routing target within a pcb_group for a source_trace or source_net
586
+
587
+ ```typescript
588
+ /** Defines a routing target within a pcb_group for a source_trace or source_net */
589
+ interface PcbBreakoutPoint {
590
+ type: "pcb_breakout_point"
591
+ pcb_breakout_point_id: string
592
+ pcb_group_id: string
593
+ subcircuit_id?: string
594
+ source_trace_id?: string
595
+ source_port_id?: string
596
+ source_net_id?: string
597
+ x: Distance
598
+ y: Distance
599
+ }
600
+ ```
601
+
580
602
  ### PcbComponent
581
603
 
582
604
  [Source](https://github.com/tscircuit/circuit-json/blob/main/src/pcb/pcb_component.ts)
package/dist/index.d.mts CHANGED
@@ -3561,7 +3561,54 @@ interface PcbManualEditConflictWarning {
3561
3561
  source_component_id: string;
3562
3562
  }
3563
3563
 
3564
- type PcbCircuitElement = PcbComponent | PcbHole | PcbPlatedHole | PcbPort | PcbSmtPad | PcbSolderPaste | PcbText | PcbTrace | PcbTraceError | PcbMissingFootprintError | PcbManualEditConflictWarning | PcbPortNotMatchedError | PcbVia | PcbBoard | PcbPlacementError | PcbTraceHint | PcbSilkscreenLine | PcbSilkscreenPath | PcbSilkscreenText | PcbSilkscreenRect | PcbSilkscreenCircle | PcbAutoroutingError | PcbCutout;
3564
+ declare const pcb_breakout_point: z.ZodObject<{
3565
+ type: z.ZodLiteral<"pcb_breakout_point">;
3566
+ pcb_breakout_point_id: z.ZodDefault<z.ZodOptional<z.ZodString>>;
3567
+ pcb_group_id: z.ZodString;
3568
+ subcircuit_id: z.ZodOptional<z.ZodString>;
3569
+ source_trace_id: z.ZodOptional<z.ZodString>;
3570
+ source_port_id: z.ZodOptional<z.ZodString>;
3571
+ source_net_id: z.ZodOptional<z.ZodString>;
3572
+ x: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
3573
+ y: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
3574
+ }, "strip", z.ZodTypeAny, {
3575
+ x: number;
3576
+ y: number;
3577
+ type: "pcb_breakout_point";
3578
+ pcb_group_id: string;
3579
+ pcb_breakout_point_id: string;
3580
+ subcircuit_id?: string | undefined;
3581
+ source_port_id?: string | undefined;
3582
+ source_trace_id?: string | undefined;
3583
+ source_net_id?: string | undefined;
3584
+ }, {
3585
+ x: string | number;
3586
+ y: string | number;
3587
+ type: "pcb_breakout_point";
3588
+ pcb_group_id: string;
3589
+ subcircuit_id?: string | undefined;
3590
+ source_port_id?: string | undefined;
3591
+ source_trace_id?: string | undefined;
3592
+ pcb_breakout_point_id?: string | undefined;
3593
+ source_net_id?: string | undefined;
3594
+ }>;
3595
+ type PcbBreakoutPointInput = z.input<typeof pcb_breakout_point>;
3596
+ /**
3597
+ * Defines a routing target within a pcb_group for a source_trace or source_net
3598
+ */
3599
+ interface PcbBreakoutPoint {
3600
+ type: "pcb_breakout_point";
3601
+ pcb_breakout_point_id: string;
3602
+ pcb_group_id: string;
3603
+ subcircuit_id?: string;
3604
+ source_trace_id?: string;
3605
+ source_port_id?: string;
3606
+ source_net_id?: string;
3607
+ x: Distance;
3608
+ y: Distance;
3609
+ }
3610
+
3611
+ type PcbCircuitElement = PcbComponent | PcbHole | PcbPlatedHole | PcbPort | PcbSmtPad | PcbSolderPaste | PcbText | PcbTrace | PcbTraceError | PcbMissingFootprintError | PcbManualEditConflictWarning | PcbPortNotMatchedError | PcbVia | PcbBoard | PcbPlacementError | PcbTraceHint | PcbSilkscreenLine | PcbSilkscreenPath | PcbSilkscreenText | PcbSilkscreenRect | PcbSilkscreenCircle | PcbAutoroutingError | PcbCutout | PcbBreakoutPoint;
3565
3612
 
3566
3613
  interface SchematicBox {
3567
3614
  type: "schematic_box";
@@ -4471,8 +4518,8 @@ declare const schematic_net_label: z.ZodObject<{
4471
4518
  y: number;
4472
4519
  };
4473
4520
  text: string;
4474
- schematic_net_label_id: string;
4475
4521
  source_net_id: string;
4522
+ schematic_net_label_id: string;
4476
4523
  anchor_side: "top" | "bottom" | "left" | "right";
4477
4524
  source_trace_id?: string | undefined;
4478
4525
  anchor_position?: {
@@ -10875,6 +10922,36 @@ declare const any_circuit_element: z.ZodUnion<[z.ZodObject<{
10875
10922
  message: string;
10876
10923
  type: "pcb_autorouting_error";
10877
10924
  pcb_error_id?: string | undefined;
10925
+ }>, z.ZodObject<{
10926
+ type: z.ZodLiteral<"pcb_breakout_point">;
10927
+ pcb_breakout_point_id: z.ZodDefault<z.ZodOptional<z.ZodString>>;
10928
+ pcb_group_id: z.ZodString;
10929
+ subcircuit_id: z.ZodOptional<z.ZodString>;
10930
+ source_trace_id: z.ZodOptional<z.ZodString>;
10931
+ source_port_id: z.ZodOptional<z.ZodString>;
10932
+ source_net_id: z.ZodOptional<z.ZodString>;
10933
+ x: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
10934
+ y: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
10935
+ }, "strip", z.ZodTypeAny, {
10936
+ x: number;
10937
+ y: number;
10938
+ type: "pcb_breakout_point";
10939
+ pcb_group_id: string;
10940
+ pcb_breakout_point_id: string;
10941
+ subcircuit_id?: string | undefined;
10942
+ source_port_id?: string | undefined;
10943
+ source_trace_id?: string | undefined;
10944
+ source_net_id?: string | undefined;
10945
+ }, {
10946
+ x: string | number;
10947
+ y: string | number;
10948
+ type: "pcb_breakout_point";
10949
+ pcb_group_id: string;
10950
+ subcircuit_id?: string | undefined;
10951
+ source_port_id?: string | undefined;
10952
+ source_trace_id?: string | undefined;
10953
+ pcb_breakout_point_id?: string | undefined;
10954
+ source_net_id?: string | undefined;
10878
10955
  }>, z.ZodDiscriminatedUnion<"shape", [z.ZodObject<{
10879
10956
  type: z.ZodLiteral<"pcb_cutout">;
10880
10957
  pcb_cutout_id: z.ZodDefault<z.ZodOptional<z.ZodString>>;
@@ -11580,8 +11657,8 @@ declare const any_circuit_element: z.ZodUnion<[z.ZodObject<{
11580
11657
  y: number;
11581
11658
  };
11582
11659
  text: string;
11583
- schematic_net_label_id: string;
11584
11660
  source_net_id: string;
11661
+ schematic_net_label_id: string;
11585
11662
  anchor_side: "top" | "bottom" | "left" | "right";
11586
11663
  source_trace_id?: string | undefined;
11587
11664
  anchor_position?: {
@@ -15583,6 +15660,36 @@ declare const any_soup_element: z.ZodUnion<[z.ZodObject<{
15583
15660
  message: string;
15584
15661
  type: "pcb_autorouting_error";
15585
15662
  pcb_error_id?: string | undefined;
15663
+ }>, z.ZodObject<{
15664
+ type: z.ZodLiteral<"pcb_breakout_point">;
15665
+ pcb_breakout_point_id: z.ZodDefault<z.ZodOptional<z.ZodString>>;
15666
+ pcb_group_id: z.ZodString;
15667
+ subcircuit_id: z.ZodOptional<z.ZodString>;
15668
+ source_trace_id: z.ZodOptional<z.ZodString>;
15669
+ source_port_id: z.ZodOptional<z.ZodString>;
15670
+ source_net_id: z.ZodOptional<z.ZodString>;
15671
+ x: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
15672
+ y: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
15673
+ }, "strip", z.ZodTypeAny, {
15674
+ x: number;
15675
+ y: number;
15676
+ type: "pcb_breakout_point";
15677
+ pcb_group_id: string;
15678
+ pcb_breakout_point_id: string;
15679
+ subcircuit_id?: string | undefined;
15680
+ source_port_id?: string | undefined;
15681
+ source_trace_id?: string | undefined;
15682
+ source_net_id?: string | undefined;
15683
+ }, {
15684
+ x: string | number;
15685
+ y: string | number;
15686
+ type: "pcb_breakout_point";
15687
+ pcb_group_id: string;
15688
+ subcircuit_id?: string | undefined;
15689
+ source_port_id?: string | undefined;
15690
+ source_trace_id?: string | undefined;
15691
+ pcb_breakout_point_id?: string | undefined;
15692
+ source_net_id?: string | undefined;
15586
15693
  }>, z.ZodDiscriminatedUnion<"shape", [z.ZodObject<{
15587
15694
  type: z.ZodLiteral<"pcb_cutout">;
15588
15695
  pcb_cutout_id: z.ZodDefault<z.ZodOptional<z.ZodString>>;
@@ -16288,8 +16395,8 @@ declare const any_soup_element: z.ZodUnion<[z.ZodObject<{
16288
16395
  y: number;
16289
16396
  };
16290
16397
  text: string;
16291
- schematic_net_label_id: string;
16292
16398
  source_net_id: string;
16399
+ schematic_net_label_id: string;
16293
16400
  anchor_side: "top" | "bottom" | "left" | "right";
16294
16401
  source_trace_id?: string | undefined;
16295
16402
  anchor_position?: {
@@ -16681,4 +16788,4 @@ type AnySoupElementInput = AnyCircuitElementInput;
16681
16788
  */
16682
16789
  type CircuitJson = AnyCircuitElement[];
16683
16790
 
16684
- 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 PCBBoard, type PCBComponent, type PCBFabricationNotePath, type PCBFabricationNoteText, type PCBHole, type PCBHoleInput, type PCBKeepout, type PCBKeepoutInput, 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 PCBVia, type PcbAutoroutingError, type PcbAutoroutingErrorInput, type PcbAutoroutingErrorInterface, type PcbBoard, type PcbBoardInput, 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 PcbGroup, type PcbGroupInput, type PcbHole, type PcbHoleCircleOrSquare, type PcbHoleCircleOrSquareInput, type PcbHoleCircularWithRectPad, type PcbHoleOval, type PcbHoleOvalInput, type PcbHolePillWithRectPad, 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 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 PcbSmtPadRotatedRect, type PcbSolderPaste, type PcbSolderPasteCircle, type PcbSolderPasteOval, type PcbSolderPastePill, type PcbSolderPasteRect, type PcbSolderPasteRotatedRect, type PcbText, type PcbTextInput, type PcbTrace, type PcbTraceError, type PcbTraceErrorInput, type PcbTraceHint, type PcbTraceHintInput, type PcbTraceInput, 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 SchematicText, type SchematicTextInput, type SchematicTrace, type SchematicTraceEdge, type SchematicTraceInput, type SchematicVoltageProbe, type SchematicVoltageProbeInput, type Size, type SourceComponentBase, type SourceFailedToCreateComponentError, type SourceFailedToCreateComponentErrorInput, type SourceGroup, type SourceGroupInput, type SourceMissingPropertyError, type SourceMissingPropertyErrorInput, type SourceNet, type SourceNetInput, type SourcePort, type SourcePortInput, type SourceProjectMetadata, type SourceSimpleBattery, type SourceSimpleBatteryInput, type SourceSimpleBugInput, 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 SupplierName, type VisibleLayer, type VisibleLayerRef, 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, pcb_autorouting_error, pcb_board, pcb_component, pcb_cutout, pcb_cutout_circle, pcb_cutout_polygon, pcb_cutout_rect, pcb_fabrication_note_path, pcb_fabrication_note_text, 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_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_trace, pcb_trace_error, pcb_trace_hint, 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_text, schematic_trace, schematic_voltage_probe, size, source_component_base, source_failed_to_create_component_error, source_group, source_missing_property_error, source_net, source_port, source_project_metadata, source_simple_battery, source_simple_bug, 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, supplier_name, time, visible_layer, voltage };
16791
+ 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 PCBBoard, type PCBComponent, type PCBFabricationNotePath, type PCBFabricationNoteText, type PCBHole, type PCBHoleInput, type PCBKeepout, type PCBKeepoutInput, 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 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 PcbGroup, type PcbGroupInput, type PcbHole, type PcbHoleCircleOrSquare, type PcbHoleCircleOrSquareInput, type PcbHoleCircularWithRectPad, type PcbHoleOval, type PcbHoleOvalInput, type PcbHolePillWithRectPad, 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 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 PcbSmtPadRotatedRect, type PcbSolderPaste, type PcbSolderPasteCircle, type PcbSolderPasteOval, type PcbSolderPastePill, type PcbSolderPasteRect, type PcbSolderPasteRotatedRect, type PcbText, type PcbTextInput, type PcbTrace, type PcbTraceError, type PcbTraceErrorInput, type PcbTraceHint, type PcbTraceHintInput, type PcbTraceInput, 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 SchematicText, type SchematicTextInput, type SchematicTrace, type SchematicTraceEdge, type SchematicTraceInput, type SchematicVoltageProbe, type SchematicVoltageProbeInput, type Size, type SourceComponentBase, type SourceFailedToCreateComponentError, type SourceFailedToCreateComponentErrorInput, type SourceGroup, type SourceGroupInput, type SourceMissingPropertyError, type SourceMissingPropertyErrorInput, type SourceNet, type SourceNetInput, type SourcePort, type SourcePortInput, type SourceProjectMetadata, type SourceSimpleBattery, type SourceSimpleBatteryInput, type SourceSimpleBugInput, 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 SupplierName, type VisibleLayer, type VisibleLayerRef, 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, 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_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_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_trace, pcb_trace_error, pcb_trace_hint, 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_text, schematic_trace, schematic_voltage_probe, size, source_component_base, source_failed_to_create_component_error, source_group, source_missing_property_error, source_net, source_port, source_project_metadata, source_simple_battery, source_simple_bug, 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, supplier_name, time, visible_layer, voltage };
package/dist/index.mjs CHANGED
@@ -1683,28 +1683,45 @@ var pcb_manual_edit_conflict_warning = z82.object({
1683
1683
  );
1684
1684
  expectTypesMatch(true);
1685
1685
 
1686
- // src/cad/cad_component.ts
1686
+ // src/pcb/pcb_breakout_point.ts
1687
1687
  import { z as z83 } from "zod";
1688
- var cad_component = z83.object({
1689
- type: z83.literal("cad_component"),
1690
- cad_component_id: z83.string(),
1691
- pcb_component_id: z83.string(),
1692
- source_component_id: z83.string(),
1688
+ var pcb_breakout_point = z83.object({
1689
+ type: z83.literal("pcb_breakout_point"),
1690
+ pcb_breakout_point_id: getZodPrefixedIdWithDefault("pcb_breakout_point"),
1691
+ pcb_group_id: z83.string(),
1692
+ subcircuit_id: z83.string().optional(),
1693
+ source_trace_id: z83.string().optional(),
1694
+ source_port_id: z83.string().optional(),
1695
+ source_net_id: z83.string().optional(),
1696
+ x: distance,
1697
+ y: distance
1698
+ }).describe(
1699
+ "Defines a routing target within a pcb_group for a source_trace or source_net"
1700
+ );
1701
+ expectTypesMatch(true);
1702
+
1703
+ // src/cad/cad_component.ts
1704
+ import { z as z84 } from "zod";
1705
+ var cad_component = z84.object({
1706
+ type: z84.literal("cad_component"),
1707
+ cad_component_id: z84.string(),
1708
+ pcb_component_id: z84.string(),
1709
+ source_component_id: z84.string(),
1693
1710
  position: point3,
1694
1711
  rotation: point3.optional(),
1695
1712
  size: point3.optional(),
1696
1713
  layer: layer_ref.optional(),
1697
1714
  // These are all ways to generate/load the 3d model
1698
- footprinter_string: z83.string().optional(),
1699
- model_obj_url: z83.string().optional(),
1700
- model_stl_url: z83.string().optional(),
1701
- model_3mf_url: z83.string().optional(),
1702
- model_jscad: z83.any().optional()
1715
+ footprinter_string: z84.string().optional(),
1716
+ model_obj_url: z84.string().optional(),
1717
+ model_stl_url: z84.string().optional(),
1718
+ model_3mf_url: z84.string().optional(),
1719
+ model_jscad: z84.any().optional()
1703
1720
  }).describe("Defines a component on the PCB");
1704
1721
 
1705
1722
  // src/any_circuit_element.ts
1706
- import { z as z84 } from "zod";
1707
- var any_circuit_element = z84.union([
1723
+ import { z as z85 } from "zod";
1724
+ var any_circuit_element = z85.union([
1708
1725
  source_trace,
1709
1726
  source_port,
1710
1727
  any_source_component,
@@ -1755,6 +1772,7 @@ var any_circuit_element = z84.union([
1755
1772
  pcb_fabrication_note_path,
1756
1773
  pcb_fabrication_note_text,
1757
1774
  pcb_autorouting_error,
1775
+ pcb_breakout_point,
1758
1776
  pcb_cutout,
1759
1777
  schematic_box,
1760
1778
  schematic_text,
@@ -1793,6 +1811,7 @@ export {
1793
1811
  length,
1794
1812
  pcb_autorouting_error,
1795
1813
  pcb_board,
1814
+ pcb_breakout_point,
1796
1815
  pcb_component,
1797
1816
  pcb_cutout,
1798
1817
  pcb_cutout_circle,
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/utils/convert-si-unit-to-number.ts","../src/units/index.ts","../src/common/point.ts","../src/common/point3.ts","../src/common/size.ts","../src/common/getZodPrefixedIdWithDefault.ts","../src/source/source_simple_capacitor.ts","../src/pcb/properties/supplier_name.ts","../src/utils/expect-types-match.ts","../src/source/base/source_component_base.ts","../src/source/source_simple_resistor.ts","../src/source/source_simple_diode.ts","../src/source/source_simple_led.ts","../src/source/source_simple_ground.ts","../src/source/source_simple_bug.ts","../src/source/source_simple_chip.ts","../src/source/source_simple_power_source.ts","../src/source/any_source_component.ts","../src/source/source_simple_fuse.ts","../src/source/source_simple_battery.ts","../src/source/source_simple_inductor.ts","../src/source/source_simple_push_button.ts","../src/source/source_simple_potentiometer.ts","../src/source/source_simple_crystal.ts","../src/source/source_simple_pin_header.ts","../src/source/source_simple_resonator.ts","../src/source/source_simple_transistor.ts","../src/source/source_simple_test_point.ts","../src/source/source_simple_mosfet.ts","../src/source/source_simple_switch.ts","../src/source/source_project_metadata.ts","../src/source/source_missing_property_error.ts","../src/source/source_failed_to_create_component_error.ts","../src/source/source_port.ts","../src/source/source_trace.ts","../src/source/source_group.ts","../src/source/source_net.ts","../src/schematic/schematic_box.ts","../src/schematic/schematic_path.ts","../src/schematic/schematic_component.ts","../src/schematic/schematic_line.ts","../src/schematic/schematic_trace.ts","../src/schematic/schematic_text.ts","../src/common/NinePointAnchor.ts","../src/common/FivePointAnchor.ts","../src/schematic/schematic_port.ts","../src/schematic/schematic_net_label.ts","../src/schematic/schematic_error.ts","../src/schematic/schematic_layout_error.ts","../src/schematic/schematic_debug_object.ts","../src/schematic/schematic_voltage_probe.ts","../src/schematic/schematic_manual_edit_conflict_warning.ts","../src/schematic/schematic_group.ts","../src/pcb/properties/layer_ref.ts","../src/pcb/properties/pcb_route_hints.ts","../src/pcb/properties/route_hint_point.ts","../src/pcb/pcb_component.ts","../src/pcb/pcb_hole.ts","../src/pcb/pcb_plated_hole.ts","../src/pcb/pcb_port.ts","../src/pcb/pcb_smtpad.ts","../src/pcb/pcb_solder_paste.ts","../src/pcb/pcb_text.ts","../src/pcb/pcb_trace.ts","../src/pcb/pcb_trace_error.ts","../src/pcb/pcb_port_not_matched_error.ts","../src/pcb/pcb_via.ts","../src/pcb/pcb_board.ts","../src/pcb/pcb_placement_error.ts","../src/pcb/pcb_trace_hint.ts","../src/pcb/pcb_silkscreen_line.ts","../src/pcb/pcb_silkscreen_path.ts","../src/pcb/pcb_silkscreen_text.ts","../src/pcb/pcb_silkscreen_rect.ts","../src/pcb/pcb_silkscreen_circle.ts","../src/pcb/pcb_silkscreen_oval.ts","../src/pcb/pcb_fabrication_note_text.ts","../src/pcb/pcb_fabrication_note_path.ts","../src/pcb/pcb_keepout.ts","../src/pcb/pcb_cutout.ts","../src/pcb/pcb_missing_footprint_error.ts","../src/pcb/pcb_group.ts","../src/pcb/pcb_autorouting_error.ts","../src/pcb/pcb_manual_edit_conflict_warning.ts","../src/cad/cad_component.ts","../src/any_circuit_element.ts"],"sourcesContent":["type UnitInfo = {\n baseUnit: BaseTscircuitUnit\n conversionFactor: number\n}\n\nconst unitMappings: Record<\n string,\n { baseUnit: BaseTscircuitUnit; variants: Record<string, number> }\n> = {\n Hz: {\n baseUnit: \"Hz\",\n variants: {\n MHz: 1e6,\n kHz: 1e3,\n Hz: 1,\n },\n },\n g: {\n baseUnit: \"g\",\n variants: {\n kg: 1e3,\n g: 1,\n },\n },\n Ω: {\n baseUnit: \"Ω\",\n variants: {\n mΩ: 1e-3,\n Ω: 1,\n kΩ: 1e3,\n KΩ: 1e3,\n kohm: 1e3,\n MΩ: 1e6,\n GΩ: 1e9,\n TΩ: 1e12,\n },\n },\n V: {\n baseUnit: \"V\",\n variants: {\n mV: 1e-3,\n V: 1,\n kV: 1e3,\n KV: 1e3,\n MV: 1e6,\n GV: 1e9,\n TV: 1e12,\n },\n },\n A: {\n baseUnit: \"A\",\n variants: {\n µA: 1e-6,\n mA: 1e-3,\n ma: 1e-3,\n A: 1,\n kA: 1e3,\n MA: 1e6,\n },\n },\n F: {\n baseUnit: \"F\",\n variants: {\n pF: 1e-12,\n nF: 1e-9,\n µF: 1e-6,\n uF: 1e-6,\n mF: 1e-3,\n F: 1,\n },\n },\n ml: {\n baseUnit: \"ml\",\n variants: {\n ml: 1,\n mL: 1,\n l: 1e3,\n L: 1e3,\n },\n },\n deg: {\n baseUnit: \"deg\",\n variants: {\n rad: 180 / Math.PI,\n },\n },\n ms: {\n baseUnit: \"ms\",\n variants: {\n s: 1000,\n },\n },\n mm: {\n baseUnit: \"mm\",\n variants: {\n nm: 1e-6,\n µm: 1e-3,\n um: 1e-3,\n mm: 1,\n cm: 10,\n dm: 100,\n m: 1000,\n km: 1e6,\n in: 25.4,\n ft: 304.8,\n IN: 25.4,\n FT: 304.8,\n yd: 914.4,\n mi: 1.609344e6,\n mil: 0.0254,\n },\n },\n}\n\nconst unitMappingAndVariantSuffixes = new Set()\nfor (const [baseUnit, info] of Object.entries(unitMappings)) {\n unitMappingAndVariantSuffixes.add(baseUnit)\n for (const variant of Object.keys(info.variants)) {\n unitMappingAndVariantSuffixes.add(variant)\n }\n}\n\nfunction getBaseTscircuitUnit(unit: string): UnitInfo {\n for (const [baseUnit, info] of Object.entries(unitMappings)) {\n if (unit in info.variants) {\n return {\n baseUnit: info.baseUnit,\n conversionFactor: info.variants[unit]!,\n }\n }\n }\n return {\n baseUnit: unit as BaseTscircuitUnit,\n conversionFactor: 1,\n }\n}\n\nconst si_prefix_multiplier = {\n tera: 1e12,\n T: 1e12,\n giga: 1e9,\n G: 1e9,\n mega: 1e6,\n M: 1e6,\n kilo: 1e3,\n k: 1e3,\n deci: 1e-1,\n d: 1e-1,\n centi: 1e-2,\n c: 1e-2,\n milli: 1e-3,\n m: 1e-3,\n micro: 1e-6,\n u: 1e-6,\n µ: 1e-6,\n nano: 1e-9,\n n: 1e-9,\n pico: 1e-12,\n p: 1e-12,\n}\ntype BaseTscircuitUnit =\n | \"ms\"\n | \"mm\"\n | \"g\"\n | \"deg\"\n | \"Hz\"\n | \"ml\"\n | \"V\"\n | \"A\"\n | \"Ω\"\n | \"F\"\n | \"H\"\n\nexport const parseAndConvertSiUnit = <\n T extends\n | string\n | number\n | undefined\n | { x: string | number; y: string | number },\n>(\n v: T,\n): {\n parsedUnit: string | null\n unitOfValue: BaseTscircuitUnit | null\n value: T extends { x: string | number; y: string | number }\n ? null | { x: number; y: number }\n : null | number\n} => {\n if (typeof v === \"undefined\")\n return { parsedUnit: null, unitOfValue: null, value: null }\n if (typeof v === \"string\" && v.match(/^-?[\\d\\.]+$/))\n return {\n value: Number.parseFloat(v) as any,\n parsedUnit: null,\n unitOfValue: null,\n }\n if (typeof v === \"number\")\n return { value: v as any, parsedUnit: null, unitOfValue: null }\n if (typeof v === \"object\" && \"x\" in v && \"y\" in v) {\n const { parsedUnit, unitOfValue } = parseAndConvertSiUnit(v.x)\n return {\n parsedUnit: parsedUnit,\n unitOfValue: unitOfValue,\n value: {\n x: parseAndConvertSiUnit(v.x as any).value as number,\n y: parseAndConvertSiUnit(v.y as any).value as number,\n } as any,\n }\n }\n const reversed_input_string = v.toString().split(\"\").reverse().join(\"\")\n const unit_reversed = reversed_input_string.match(/[^\\d\\s]+/)?.[0]\n if (!unit_reversed) {\n throw new Error(`Could not determine unit: \"${v}\"`)\n }\n const unit = unit_reversed.split(\"\").reverse().join(\"\")\n\n const numberPart = v.slice(0, -unit.length)\n if (\n unit in si_prefix_multiplier &&\n !unitMappingAndVariantSuffixes.has(unit)\n ) {\n const siMultiplier =\n si_prefix_multiplier[unit as keyof typeof si_prefix_multiplier]\n return {\n parsedUnit: null,\n unitOfValue: null,\n value: (Number.parseFloat(numberPart) * siMultiplier) as any,\n }\n }\n\n const { baseUnit, conversionFactor } = getBaseTscircuitUnit(unit)\n\n return {\n parsedUnit: unit,\n unitOfValue: baseUnit,\n value: (conversionFactor * Number.parseFloat(numberPart)) as any,\n }\n}\n","import { parseAndConvertSiUnit } from \"src/utils/convert-si-unit-to-number\"\nimport { z } from \"zod\"\n\n// // Currently, removing uncommon SI Prefixes for type simplicity.\n// export type SIPrefix =\n// // | \"y\"\n// // | \"yocto\"\n// // | \"z\"\n// // | \"zepto\"\n// // | \"atto\"\n// // | \"a\"\n// | \"femto\"\n// | \"f\"\n// | \"u\"\n// | \"micro\"\n// // | \"d\"\n// // | \"deci\"\n// | \"c\"\n// | \"centi\"\n// | \"m\"\n// | \"milli\"\n// | \"k\"\n// | \"kilo\"\n// | \"M\"\n// | \"mega\"\n// // | \"G\"\n// // | \"T\"\n// // | \"P\"\n// // | \"E\"\n// // | \"Z\"\n// // | \"Y\"\n\n// export type UnitAbbreviations = {\n// farad: \"F\"\n// ohm: \"Ω\"\n// henry: \"H\"\n// meter: \"m\"\n// volt: \"V\"\n// inch: \"in\"\n// foot: \"ft\"\n// }\n\n// export type Unit = keyof UnitAbbreviations\n// export type NumberWithUnit<T extends Unit> =\n// | `${number}${T | UnitAbbreviations[T]}`\n// | `${number} ${T | UnitAbbreviations[T]}`\n// | `${number}${SIPrefix}${T | UnitAbbreviations[T]}`\n// | `${number} ${SIPrefix}${T | UnitAbbreviations[T]}`\n// export type NumberWithAnyUnit =\n// | `${number}${UnitOrAbbreviation}`\n// | `${number} ${UnitOrAbbreviation}`\n// | `${number}${SIPrefix}${UnitOrAbbreviation}`\n// | `${number} ${SIPrefix}${UnitOrAbbreviation}`\n\n// TODO lots of validation to make sure the unit is valid etc.\nexport const resistance = z\n .string()\n .or(z.number())\n .transform((v) => parseAndConvertSiUnit(v).value!)\n\nexport const capacitance = z\n .string()\n .or(z.number())\n .transform((v) => parseAndConvertSiUnit(v).value!)\n .transform((value) => {\n return Number.parseFloat(value.toPrecision(12)) // Round to 12 significant digits\n })\n\nexport const inductance = z\n .string()\n .or(z.number())\n .transform((v) => parseAndConvertSiUnit(v).value!)\n\nexport const voltage = z\n .string()\n .or(z.number())\n .transform((v) => parseAndConvertSiUnit(v).value!)\n\nexport const length = z\n .string()\n .or(z.number())\n .transform((v) => parseAndConvertSiUnit(v).value!)\n\nexport const frequency = z\n .string()\n .or(z.number())\n .transform((v) => parseAndConvertSiUnit(v).value!)\n\n/**\n * Length in meters\n */\nexport type Length = number\nexport type Distance = number\n\nexport const distance = length\n\nexport const current = z\n .string()\n .or(z.number())\n .transform((v) => parseAndConvertSiUnit(v).value!)\n\nexport const time = z\n .string()\n .or(z.number())\n .transform((v) => parseAndConvertSiUnit(v).value!)\n\n/**\n * Rotation is always converted to degrees\n */\nexport const rotation = z\n .string()\n .or(z.number())\n .transform((arg): number => {\n if (typeof arg === \"number\") return arg\n if (arg.endsWith(\"deg\")) {\n return Number.parseFloat(arg.split(\"deg\")[0]!)\n }\n if (arg.endsWith(\"rad\")) {\n return (Number.parseFloat(arg.split(\"rad\")[0]!) * 180) / Math.PI\n }\n return Number.parseFloat(arg)\n })\n\nexport const battery_capacity = z\n .number()\n .or(z.string().endsWith(\"mAh\"))\n .transform((v) => {\n if (typeof v === \"string\") {\n const valString = v.replace(\"mAh\", \"\")\n const num = Number.parseFloat(valString)\n if (Number.isNaN(num)) {\n throw new Error(\"Invalid capacity\")\n }\n return num\n }\n return v\n })\n .describe(\"Battery capacity in mAh\")\n\nexport type InputRotation = number | string\nexport type Rotation = number\n","import { z } from \"zod\"\nimport { distance } from \"../units\"\n\nexport const point = z.object({\n x: distance,\n y: distance,\n})\n\nexport const position = point\n\nexport type Point = z.infer<typeof point>\nexport type InputPoint = z.input<typeof point>\nexport type InputPosition = z.input<typeof position>\nexport type Position = z.infer<typeof position>\n","import { z } from \"zod\"\nimport { distance } from \"../units\"\n\nexport const point3 = z.object({\n x: distance,\n y: distance,\n z: distance,\n})\n\nexport const position3 = point3\n\nexport type Point3 = z.infer<typeof point3>\n","import { z } from \"zod\"\n\nexport const size = z.object({\n width: z.number(),\n height: z.number(),\n})\n\nexport type Size = z.infer<typeof size>\n","import { z } from \"zod\"\nimport { nanoid } from \"nanoid\"\n\n/**\n * Use this for primary keys for any circuit element\n */\nexport const getZodPrefixedIdWithDefault = (prefix: string) => {\n return z\n .string()\n .optional()\n .default(() => `${prefix}_${nanoid(10)}`)\n}\n","import { z } from \"zod\"\nimport {\n source_component_base,\n type SourceComponentBase,\n} from \"src/source/base/source_component_base\"\nimport { capacitance, distance, voltage } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const source_simple_capacitor = source_component_base.extend({\n ftype: z.literal(\"simple_capacitor\"),\n capacitance,\n max_voltage_rating: voltage.optional(),\n display_capacitance: z.string().optional(),\n max_decoupling_trace_length: distance.optional(),\n})\n\nexport type SourceSimpleCapacitorInput = z.input<typeof source_simple_capacitor>\ntype InferredSourceSimpleCapacitor = z.infer<typeof source_simple_capacitor>\n\n/**\n * Defines a simple capacitor component\n */\nexport interface SourceSimpleCapacitor extends SourceComponentBase {\n ftype: \"simple_capacitor\"\n capacitance: number\n max_voltage_rating?: number\n display_capacitance?: string\n max_decoupling_trace_length?: number\n}\n\nexpectTypesMatch<SourceSimpleCapacitor, InferredSourceSimpleCapacitor>(true)\n","import { z } from \"zod\"\n\nexport const supplier_name = z.enum([\n \"jlcpcb\",\n \"macrofab\",\n \"pcbway\",\n \"digikey\",\n \"mouser\",\n \"lcsc\",\n])\n\nexport type SupplierName = z.infer<typeof supplier_name>\n","import type { TypeEqual } from \"ts-expect\"\n\ntype IsNever<T> = [T] extends [never] ? true : false\n\ntype GetMismatchedProps<T1, T2> = {\n [K in keyof T1 & keyof T2]: T1[K] extends T2[K]\n ? T2[K] extends T1[K]\n ? never\n : K\n : K\n}[keyof T1 & keyof T2]\n\nexport const expectTypesMatch = <\n const T1,\n const T2,\n T3 = Exclude<keyof T1, keyof T2>,\n T4 = Exclude<keyof T2, keyof T1>,\n T5 = GetMismatchedProps<T1, T2>,\n>(\n shouldBe: IsNever<T3> extends true\n ? IsNever<T4> extends true\n ? IsNever<T5> extends true\n ? TypeEqual<T1, T2>\n : `mismatched prop types: ${T5 extends string ? T5 : \"\"}`\n : `extra props ${T4 extends string ? T4 : \"\"}`\n : `missing props ${T3 extends string ? T3 : \"\"}`,\n): void => {}\n\n// ------ TESTS -------\n\nexpectTypesMatch<\n {\n a: number\n },\n {\n a: number\n b: number\n }\n>(\"extra props b\")\n\nexpectTypesMatch<\n {\n a: number\n b: number\n },\n {\n a: number\n }\n>(\"missing props b\")\n\nexpectTypesMatch<\n {\n a: number\n },\n {\n a: number\n }\n>(true)\n\nexpectTypesMatch<\n {\n a: number\n },\n {\n a: string\n }\n>(\"mismatched prop types: a\")\n\n// ------ String Union Matching -------\n\nexport type ExpectStringUnionsMatch<\n T1 extends string,\n T2 extends string,\n Diff1 = Exclude<T1, T2>,\n Diff2 = Exclude<T2, T1>,\n> = IsNever<Diff1> extends true\n ? IsNever<Diff2> extends true\n ? true // Unions are identical\n : `T2 has extra: \"${Diff2 extends string ? Diff2 : \"\"}\"` // T2 has elements not in T1\n : IsNever<Diff2> extends true\n ? `T1 has extra: \"${Diff1 extends string ? Diff1 : \"\"}\"` // T1 has elements not in T2\n : `T1 has extra: \"${Diff1 extends string\n ? Diff1\n : \"\"}\", T2 has extra: \"${Diff2 extends string ? Diff2 : \"\"}\"` // Both have differences\n\nexport const expectStringUnionsMatch = <\n const T1 extends string,\n const T2 extends string,\n ShouldBeTrue = ExpectStringUnionsMatch<T1, T2>,\n>(\n shouldBe: ShouldBeTrue,\n): void => {}\n\n// ------ TESTS -------\n\ntype TestUnion1 = \"a\" | \"b\" | \"c\"\ntype TestUnion2 = \"a\" | \"b\" | \"c\"\ntype TestUnion3 = \"a\" | \"b\" | \"d\"\ntype TestUnion4 = \"a\" | \"b\"\n\nexpectStringUnionsMatch<TestUnion1, TestUnion2>(true)\nexpectStringUnionsMatch<TestUnion1, TestUnion3>(\n 'T1 has extra: \"c\", T2 has extra: \"d\"',\n)\nexpectStringUnionsMatch<TestUnion1, TestUnion4>('T1 has extra: \"c\"')\nexpectStringUnionsMatch<TestUnion4, TestUnion1>('T2 has extra: \"c\"')\nexpectStringUnionsMatch<TestUnion3, TestUnion1>(\n 'T1 has extra: \"d\", T2 has extra: \"c\"',\n)\n\n// Example of using @ts-expect-error for expected failures\n// @ts-expect-error Type '\"T2 has extra: \\\"d\\\"\"' is not assignable to type 'true'.\nexpectStringUnionsMatch<TestUnion1, TestUnion3>(true)\n","import {\n supplier_name,\n type SupplierName,\n} from \"src/pcb/properties/supplier_name\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\nimport { z } from \"zod\"\n\nexport interface SourceComponentBase {\n type: \"source_component\"\n ftype?: string\n source_component_id: string\n name: string\n manufacturer_part_number?: string\n supplier_part_numbers?: Partial<Record<SupplierName, string[]>>\n display_value?: string\n are_pins_interchangeable?: boolean\n internally_connected_source_port_ids?: string[][]\n source_group_id?: string\n}\n\nexport const source_component_base = z.object({\n type: z.literal(\"source_component\"),\n ftype: z.string().optional(),\n source_component_id: z.string(),\n name: z.string(),\n manufacturer_part_number: z.string().optional(),\n supplier_part_numbers: z\n .record(supplier_name, z.array(z.string()))\n .optional(),\n display_value: z.string().optional(),\n are_pins_interchangeable: z.boolean().optional(),\n internally_connected_source_port_ids: z.array(z.array(z.string())).optional(),\n source_group_id: z.string().optional(),\n})\n\ntype InferredSourceComponentBase = z.infer<typeof source_component_base>\n\nexpectTypesMatch<SourceComponentBase, InferredSourceComponentBase>(true)\n","import { z } from \"zod\"\nimport {\n source_component_base,\n type SourceComponentBase,\n} from \"src/source/base/source_component_base\"\nimport { resistance } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const source_simple_resistor = source_component_base.extend({\n ftype: z.literal(\"simple_resistor\"),\n resistance,\n display_resistance: z.string().optional(),\n})\n\nexport type SourceSimpleResistorInput = z.input<typeof source_simple_resistor>\ntype InferredSourceSimpleResistor = z.infer<typeof source_simple_resistor>\n\n/**\n * Defines a simple resistor component\n */\nexport interface SourceSimpleResistor extends SourceComponentBase {\n ftype: \"simple_resistor\"\n resistance: number\n display_resistance?: string\n}\n\nexpectTypesMatch<SourceSimpleResistor, InferredSourceSimpleResistor>(true)\n","import {\n source_component_base,\n type SourceComponentBase,\n} from \"src/source/base/source_component_base\"\nimport { z } from \"zod\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const source_simple_diode = source_component_base.extend({\n ftype: z.literal(\"simple_diode\"),\n})\n\nexport type SourceSimpleDiodeInput = z.input<typeof source_simple_diode>\ntype InferredSourceSimpleDiode = z.infer<typeof source_simple_diode>\n\n/**\n * Defines a simple diode component\n */\nexport interface SourceSimpleDiode extends SourceComponentBase {\n ftype: \"simple_diode\"\n}\n\nexpectTypesMatch<SourceSimpleDiode, InferredSourceSimpleDiode>(true)\n","import {\n source_component_base,\n type SourceComponentBase,\n} from \"src/source/base/source_component_base\"\nimport { z } from \"zod\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\nimport {\n source_simple_diode,\n type SourceSimpleDiode,\n} from \"./source_simple_diode\"\n\nexport const source_simple_led = source_simple_diode.extend({\n ftype: z.literal(\"simple_led\"),\n color: z.string().optional(),\n wavelength: z.string().optional(),\n})\n\nexport type SourceSimpleLedInput = z.input<typeof source_simple_led>\ntype InferredSourceSimpleLed = z.infer<typeof source_simple_led>\n\n/**\n * Defines a simple led component\n */\nexport interface SourceSimpleLed extends Omit<SourceSimpleDiode, \"ftype\"> {\n ftype: \"simple_led\"\n color?: string\n wavelength?: string\n}\n\nexpectTypesMatch<SourceSimpleLed, InferredSourceSimpleLed>(true)\n","import {\n source_component_base,\n type SourceComponentBase,\n} from \"src/source/base/source_component_base\"\nimport { z } from \"zod\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const source_simple_ground = source_component_base.extend({\n ftype: z.literal(\"simple_ground\"),\n})\n\nexport type SourceSimpleGroundInput = z.input<typeof source_simple_ground>\ntype InferredSourceSimpleGround = z.infer<typeof source_simple_ground>\n\n/**\n * Defines a simple ground component\n */\nexport interface SourceSimpleGround extends SourceComponentBase {\n ftype: \"simple_ground\"\n}\n\nexpectTypesMatch<SourceSimpleGround, InferredSourceSimpleGround>(true)\n","import { source_component_base } from \"src/source/base/source_component_base\"\nimport { z } from \"zod\"\n\n/**\n * @deprecated Use source_simple_chip instead. This will be removed in a future version.\n */\nexport const source_simple_bug = source_component_base\n .extend({\n ftype: z.literal(\"simple_bug\"),\n })\n .describe(\"@deprecated\")\n\nexport type source_simple_bug = z.infer<typeof source_simple_bug>\nexport type SourceSimpleBugInput = z.input<typeof source_simple_bug>\n","import { z } from \"zod\"\nimport {\n source_component_base,\n type SourceComponentBase,\n} from \"src/source/base/source_component_base\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const source_simple_chip = source_component_base.extend({\n ftype: z.literal(\"simple_chip\"),\n})\n\nexport type SourceSimpleChipInput = z.input<typeof source_simple_chip>\ntype InferredSourceSimpleChip = z.infer<typeof source_simple_chip>\n\n/**\n * Defines a simple integrated circuit component\n */\nexport interface SourceSimpleChip extends SourceComponentBase {\n ftype: \"simple_chip\"\n}\n\nexpectTypesMatch<SourceSimpleChip, InferredSourceSimpleChip>(true)\n","import { z } from \"zod\"\nimport {\n source_component_base,\n type SourceComponentBase,\n} from \"src/source/base/source_component_base\"\nimport { voltage } from \"../units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const source_simple_power_source = source_component_base.extend({\n ftype: z.literal(\"simple_power_source\"),\n voltage,\n})\n\nexport type SourceSimplePowerSourceInput = z.input<\n typeof source_simple_power_source\n>\ntype InferredSourceSimplePowerSource = z.infer<\n typeof source_simple_power_source\n>\n\n/**\n * Defines a simple power source component\n */\nexport interface SourceSimplePowerSource extends SourceComponentBase {\n ftype: \"simple_power_source\"\n voltage: number\n}\n\nexpectTypesMatch<SourceSimplePowerSource, InferredSourceSimplePowerSource>(true)\n","import { z } from \"zod\"\nimport {\n source_simple_resistor,\n type SourceSimpleResistor,\n} from \"./source_simple_resistor\"\nimport {\n source_simple_capacitor,\n type SourceSimpleCapacitor,\n} from \"./source_simple_capacitor\"\nimport { source_simple_fuse, type SourceSimpleFuse } from \"./source_simple_fuse\"\nimport {\n source_simple_diode,\n type SourceSimpleDiode,\n} from \"./source_simple_diode\"\nimport { source_simple_led, type SourceSimpleLed } from \"./source_simple_led\"\nimport {\n source_simple_ground,\n type SourceSimpleGround,\n} from \"./source_simple_ground\"\nimport { source_simple_bug } from \"./source_simple_bug\"\nimport { source_simple_chip, type SourceSimpleChip } from \"./source_simple_chip\"\nimport {\n source_simple_power_source,\n type SourceSimplePowerSource,\n} from \"./source_simple_power_source\"\nimport {\n source_simple_battery,\n type SourceSimpleBattery,\n} from \"./source_simple_battery\"\nimport {\n source_simple_inductor,\n type SourceSimpleInductor,\n} from \"./source_simple_inductor\"\nimport {\n source_simple_push_button,\n type SourceSimplePushButton,\n} from \"./source_simple_push_button\"\nimport {\n source_simple_potentiometer,\n type SourceSimplePotentiometer,\n} from \"./source_simple_potentiometer\"\nimport {\n source_simple_crystal,\n type SourceSimpleCrystal,\n} from \"./source_simple_crystal\"\nimport {\n source_simple_pin_header,\n type SourceSimplePinHeader,\n} from \"./source_simple_pin_header\"\nimport {\n source_simple_resonator,\n type SourceSimpleResonator,\n} from \"./source_simple_resonator\"\nimport {\n source_simple_transistor,\n type SourceSimpleTransistor,\n} from \"./source_simple_transistor\"\nimport {\n source_simple_test_point,\n type SourceSimpleTestPoint,\n} from \"./source_simple_test_point\"\nimport {\n source_simple_mosfet,\n type SourceSimpleMosfet,\n} from \"./source_simple_mosfet\"\nimport {\n source_simple_switch,\n type SourceSimpleSwitch,\n} from \"./source_simple_switch\"\nimport {\n source_project_metadata,\n type SourceProjectMetadata,\n} from \"./source_project_metadata\"\nimport {\n source_missing_property_error,\n type SourceMissingPropertyError,\n} from \"./source_missing_property_error\"\nimport {\n source_failed_to_create_component_error,\n type SourceFailedToCreateComponentError,\n} from \"./source_failed_to_create_component_error\"\n\nexport const any_source_component = z.union([\n source_simple_resistor,\n source_simple_capacitor,\n source_simple_diode,\n source_simple_led,\n source_simple_ground,\n source_simple_chip,\n source_simple_bug,\n source_simple_power_source,\n source_simple_battery,\n source_simple_inductor,\n source_simple_push_button,\n source_simple_potentiometer,\n source_simple_crystal,\n source_simple_pin_header,\n source_simple_resonator,\n source_simple_switch,\n source_simple_transistor,\n source_simple_test_point,\n source_simple_mosfet,\n source_simple_fuse,\n source_project_metadata,\n source_missing_property_error,\n source_failed_to_create_component_error,\n])\n\n/**\n * Deprecated: use `AnySourceElement` instead\n */\nexport type AnySourceComponent = z.infer<typeof any_source_component>\n\nexport type AnySourceElement =\n | SourceSimpleResistor\n | SourceSimpleCapacitor\n | SourceSimpleDiode\n | SourceSimpleLed\n | SourceSimpleGround\n | SourceSimpleChip\n | SourceSimplePowerSource\n | SourceSimpleBattery\n | SourceSimpleInductor\n | SourceSimplePushButton\n | SourceSimplePotentiometer\n | SourceSimpleCrystal\n | SourceSimplePinHeader\n | SourceSimpleResonator\n | SourceSimpleSwitch\n | SourceSimpleTransistor\n | SourceSimpleTestPoint\n | SourceSimpleMosfet\n | SourceSimpleFuse\n | SourceProjectMetadata\n | SourceMissingPropertyError\n | SourceFailedToCreateComponentError\n","import { z } from \"zod\"\nimport {\n source_component_base,\n type SourceComponentBase,\n} from \"./base/source_component_base\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const source_simple_fuse = source_component_base.extend({\n ftype: z.literal(\"simple_fuse\"),\n\n current_rating_amps: z\n .number()\n .describe(\"Nominal current in amps the fuse is rated for\"),\n\n voltage_rating_volts: z\n .number()\n .describe(\"Voltage rating in volts, e.g. ±5V would be 5\"),\n})\n\nexport interface SourceSimpleFuse extends SourceComponentBase {\n ftype: \"simple_fuse\"\n current_rating_amps: number\n voltage_rating_volts: number\n}\n\nexport type SourceSimpleFuseInput = z.input<typeof source_simple_fuse>\ntype InferredSourceSimpleFuse = z.infer<typeof source_simple_fuse>\n\nexpectTypesMatch<SourceSimpleFuse, InferredSourceSimpleFuse>(true)\n","import { z } from \"zod\"\nimport {\n source_component_base,\n type SourceComponentBase,\n} from \"src/source/base/source_component_base\"\nimport { battery_capacity } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const source_simple_battery = source_component_base.extend({\n ftype: z.literal(\"simple_battery\"),\n capacity: battery_capacity,\n})\n\nexport type SourceSimpleBatteryInput = z.input<typeof source_simple_battery>\ntype InferredSourceSimpleBattery = z.infer<typeof source_simple_battery>\n\n/**\n * Defines a simple battery component\n */\nexport interface SourceSimpleBattery extends SourceComponentBase {\n ftype: \"simple_battery\"\n capacity: number\n}\n\nexpectTypesMatch<SourceSimpleBattery, InferredSourceSimpleBattery>(true)\n","import { z } from \"zod\"\nimport {\n source_component_base,\n type SourceComponentBase,\n} from \"src/source/base/source_component_base\"\nimport { inductance } from \"../units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const source_simple_inductor = source_component_base.extend({\n ftype: z.literal(\"simple_inductor\"),\n inductance,\n})\n\nexport type SourceSimpleInductorInput = z.input<typeof source_simple_inductor>\ntype InferredSourceSimpleInductor = z.infer<typeof source_simple_inductor>\n\n/**\n * Defines a simple inductor component\n */\nexport interface SourceSimpleInductor extends SourceComponentBase {\n ftype: \"simple_inductor\"\n inductance: number\n}\n\nexpectTypesMatch<SourceSimpleInductor, InferredSourceSimpleInductor>(true)\n","import { z } from \"zod\"\nimport {\n source_component_base,\n type SourceComponentBase,\n} from \"src/source/base/source_component_base\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const source_simple_push_button = source_component_base.extend({\n ftype: z.literal(\"simple_push_button\"),\n})\n\nexport type SourceSimplePushButtonInput = z.input<\n typeof source_simple_push_button\n>\ntype InferredSourceSimplePushButton = z.infer<typeof source_simple_push_button>\n\n/**\n * Defines a simple push button component\n */\nexport interface SourceSimplePushButton extends SourceComponentBase {\n ftype: \"simple_push_button\"\n}\n\nexpectTypesMatch<SourceSimplePushButton, InferredSourceSimplePushButton>(true)\n","import { z } from \"zod\"\nimport { source_component_base } from \"src/source/base/source_component_base\"\nimport { resistance } from \"src/units\"\n\nexport const source_simple_potentiometer = source_component_base.extend({\n ftype: z.literal(\"simple_potentiometer\"),\n max_resistance: resistance,\n})\n\nexport type SourceSimplePotentiometer = z.infer<\n typeof source_simple_potentiometer\n>\nexport type SourceSimplePotentiometerInput = z.input<\n typeof source_simple_potentiometer\n>\n","import { z } from \"zod\"\nimport {\n source_component_base,\n type SourceComponentBase,\n} from \"src/source/base/source_component_base\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const source_simple_crystal = source_component_base.extend({\n ftype: z.literal(\"simple_crystal\"),\n frequency: z.number().describe(\"Frequency in Hz\"),\n load_capacitance: z.number().optional().describe(\"Load capacitance in pF\"),\n})\n\nexport type SourceSimpleCrystalInput = z.input<typeof source_simple_crystal>\ntype InferredSourceSimpleCrystal = z.infer<typeof source_simple_crystal>\n\n/**\n * Defines a simple crystal oscillator component\n */\nexport interface SourceSimpleCrystal extends SourceComponentBase {\n ftype: \"simple_crystal\"\n frequency: number\n load_capacitance?: number\n}\n\nexpectTypesMatch<SourceSimpleCrystal, InferredSourceSimpleCrystal>(true)\n","import { source_component_base } from \"src/source/base/source_component_base\"\nimport { z } from \"zod\"\n\nexport const source_simple_pin_header = source_component_base.extend({\n ftype: z.literal(\"simple_pin_header\"),\n pin_count: z.number(),\n gender: z.enum([\"male\", \"female\"]).optional().default(\"male\"),\n})\n\nexport type SourceSimplePinHeader = z.infer<typeof source_simple_pin_header>\nexport type SourceSimplePinHeaderInput = z.input<\n typeof source_simple_pin_header\n>\n","import { z } from \"zod\"\nimport {\n source_component_base,\n type SourceComponentBase,\n} from \"src/source/base/source_component_base\"\nimport { capacitance, resistance, frequency } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const source_simple_resonator = source_component_base.extend({\n ftype: z.literal(\"simple_resonator\"),\n load_capacitance: capacitance,\n equivalent_series_resistance: resistance.optional(),\n frequency: frequency,\n})\n\nexport type SourceSimpleResonatorInput = z.input<typeof source_simple_resonator>\ntype InferredSourceSimpleResonator = z.infer<typeof source_simple_resonator>\n\n/**\n * Defines a simple resonator component\n */\nexport interface SourceSimpleResonator extends SourceComponentBase {\n ftype: \"simple_resonator\"\n load_capacitance: number\n equivalent_series_resistance?: number\n frequency: number\n}\n\nexpectTypesMatch<SourceSimpleResonator, InferredSourceSimpleResonator>(true)\n","import { z } from \"zod\"\nimport {\n source_component_base,\n type SourceComponentBase,\n} from \"src/source/base/source_component_base\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const source_simple_transistor = source_component_base.extend({\n ftype: z.literal(\"simple_transistor\"),\n transistor_type: z.enum([\"npn\", \"pnp\"]),\n})\n\nexport type SourceSimpleTransistorInput = z.input<\n typeof source_simple_transistor\n>\ntype InferredSourceSimpleTransistor = z.infer<typeof source_simple_transistor>\n\n/**\n * Defines a simple transistor component\n * This is a three-pin semiconductor device (emitter, base, collector)\n * Pin configuration is handled by the schematic port system\n */\n\nexport interface SourceSimpleTransistor extends SourceComponentBase {\n ftype: \"simple_transistor\"\n transistor_type: \"npn\" | \"pnp\"\n}\n\nexpectTypesMatch<SourceSimpleTransistor, InferredSourceSimpleTransistor>(true)\n","import { z } from \"zod\"\nimport {\n source_component_base,\n type SourceComponentBase,\n} from \"src/source/base/source_component_base\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const source_simple_test_point = source_component_base.extend({\n ftype: z.literal(\"simple_test_point\"),\n footprint_variant: z.enum([\"pad\", \"through_hole\"]).optional(),\n pad_shape: z.enum([\"rect\", \"circle\"]).optional(),\n pad_diameter: z.union([z.number(), z.string()]).optional(),\n hole_diameter: z.union([z.number(), z.string()]).optional(),\n width: z.union([z.number(), z.string()]).optional(),\n height: z.union([z.number(), z.string()]).optional(),\n})\n\nexport type SourceSimpleTestPointInput = z.input<\n typeof source_simple_test_point\n>\ntype InferredSourceSimpleTestPoint = z.infer<typeof source_simple_test_point>\n\n/**\n * Defines a simple test point component\n * Can be surface-mount or through-hole.\n * Pad shape and dimensions configurable for different use cases.\n */\nexport interface SourceSimpleTestPoint extends SourceComponentBase {\n ftype: \"simple_test_point\"\n footprint_variant?: \"pad\" | \"through_hole\"\n pad_shape?: \"rect\" | \"circle\"\n pad_diameter?: number | string\n hole_diameter?: number | string\n width?: number | string\n height?: number | string\n}\n\nexpectTypesMatch<SourceSimpleTestPoint, InferredSourceSimpleTestPoint>(true)\n","import { z } from \"zod\"\nimport {\n source_component_base,\n type SourceComponentBase,\n} from \"src/source/base/source_component_base\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const source_simple_mosfet = source_component_base.extend({\n ftype: z.literal(\"simple_mosfet\"),\n channel_type: z.enum([\"n\", \"p\"]),\n mosfet_mode: z.enum([\"enhancement\", \"depletion\"]),\n})\n\nexport type SourceSimpleMosfetInput = z.input<typeof source_simple_mosfet>\ntype InferredSourceSimpleMosfet = z.infer<typeof source_simple_mosfet>\n\n/**\n * Defines a simple mosfet component\n * This is a three-pin semiconductor device (source, gate, drain)\n * Pin configuration is handled by the schematic port system\n */\n\nexport interface SourceSimpleMosfet extends SourceComponentBase {\n ftype: \"simple_mosfet\"\n channel_type: \"n\" | \"p\"\n mosfet_mode: \"enhancement\" | \"depletion\"\n}\n\nexpectTypesMatch<SourceSimpleMosfet, InferredSourceSimpleMosfet>(true)\n","import { z } from \"zod\"\nimport {\n source_component_base,\n type SourceComponentBase,\n} from \"src/source/base/source_component_base\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const source_simple_switch = source_component_base.extend({\n ftype: z.literal(\"simple_switch\"),\n})\nexport type SourceSimpleSwitchInput = z.input<typeof source_simple_switch>\ntype InferredSourceSimpleSwitch = z.infer<typeof source_simple_switch>\n\n/**\n * Defines a simple switch component\n */\nexport interface SourceSimpleSwitch extends SourceComponentBase {\n ftype: \"simple_switch\"\n}\n\nexpectTypesMatch<SourceSimpleSwitch, InferredSourceSimpleSwitch>(true)\n","import { expectTypesMatch } from \"src/utils/expect-types-match\"\nimport { z } from \"zod\"\n\nexport interface SourceProjectMetadata {\n type: \"source_project_metadata\"\n name?: string\n software_used_string?: string\n created_at?: string // ISO8601 timestamp\n}\n\nexport const source_project_metadata = z.object({\n type: z.literal(\"source_project_metadata\"),\n name: z.string().optional(),\n software_used_string: z.string().optional(),\n created_at: z.string().datetime().optional(),\n})\n\nexport type InferredProjectMetadata = z.infer<typeof source_project_metadata>\nexpectTypesMatch<SourceProjectMetadata, InferredProjectMetadata>(true)\n","import { z } from \"zod\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const source_missing_property_error = z\n .object({\n type: z.literal(\"source_missing_property_error\"),\n source_missing_property_error_id: getZodPrefixedIdWithDefault(\n \"source_missing_property_error\",\n ),\n source_component_id: z.string(),\n property_name: z.string(),\n error_type: z.literal(\"source_missing_property_error\"),\n message: z.string(),\n })\n .describe(\"The source code is missing a property\")\n\nexport type SourceMissingPropertyErrorInput = z.input<\n typeof source_missing_property_error\n>\ntype InferredSourceMissingPropertyError = z.infer<\n typeof source_missing_property_error\n>\n\n/**\n * The source code is missing a property\n */\nexport interface SourceMissingPropertyError {\n type: \"source_missing_property_error\"\n source_missing_property_error_id: string\n source_component_id: string\n property_name: string\n error_type: \"source_missing_property_error\"\n message: string\n}\n\nexpectTypesMatch<\n SourceMissingPropertyError,\n InferredSourceMissingPropertyError\n>(true)\n","import { z } from \"zod\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const source_failed_to_create_component_error = z\n .object({\n type: z.literal(\"source_failed_to_create_component_error\"),\n source_failed_to_create_component_error_id: getZodPrefixedIdWithDefault(\n \"source_failed_to_create_component_error\",\n ),\n component_name: z.string().optional(),\n subcircuit_id: z.string().optional(),\n parent_source_component_id: z.string().optional(),\n message: z.string(),\n pcb_center: z\n .object({\n x: z.number().optional(),\n y: z.number().optional(),\n })\n .optional(),\n schematic_center: z\n .object({\n x: z.number().optional(),\n y: z.number().optional(),\n })\n .optional(),\n })\n .describe(\"Error emitted when a component fails to be constructed\")\n\nexport type SourceFailedToCreateComponentErrorInput = z.input<\n typeof source_failed_to_create_component_error\n>\ntype InferredSourceFailedToCreateComponentError = z.infer<\n typeof source_failed_to_create_component_error\n>\n\n/**\n * Error emitted when a component fails to be constructed.\n * Contains details about the failure and prevents the component from being rendered.\n */\nexport interface SourceFailedToCreateComponentError {\n type: \"source_failed_to_create_component_error\"\n source_failed_to_create_component_error_id: string\n message: string\n component_name?: string\n subcircuit_id?: string\n parent_source_component_id?: string\n pcb_center?: {\n x?: number\n y?: number\n }\n schematic_center?: {\n x?: number\n y?: number\n }\n}\n\nexpectTypesMatch<\n SourceFailedToCreateComponentError,\n InferredSourceFailedToCreateComponentError\n>(true)\n","import { z } from \"zod\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const source_port = z.object({\n type: z.literal(\"source_port\"),\n pin_number: z.number().optional(),\n port_hints: z.array(z.string()).optional(),\n name: z.string(),\n source_port_id: z.string(),\n source_component_id: z.string(),\n subcircuit_id: z.string().optional(),\n subcircuit_connectivity_map_key: z.string().optional(),\n})\n\nexport type SourcePortInput = z.input<typeof source_port>\ntype InferredSourcePort = z.infer<typeof source_port>\n\n/**\n * Defines a source port that can be connected to other components\n */\nexport interface SourcePort {\n type: \"source_port\"\n pin_number?: number\n port_hints?: string[]\n name: string\n source_port_id: string\n source_component_id: string\n subcircuit_id?: string\n subcircuit_connectivity_map_key?: string\n}\n\nexpectTypesMatch<SourcePort, InferredSourcePort>(true)\n","import { expectTypesMatch } from \"src/utils/expect-types-match\"\nimport { z } from \"zod\"\n\nexport interface SourceTrace {\n type: \"source_trace\"\n source_trace_id: string\n connected_source_port_ids: string[]\n connected_source_net_ids: string[]\n subcircuit_id?: string\n subcircuit_connectivity_map_key?: string\n max_length?: number\n display_name?: string\n min_trace_thickness?: number\n}\n\nexport const source_trace = z.object({\n type: z.literal(\"source_trace\"),\n source_trace_id: z.string(),\n connected_source_port_ids: z.array(z.string()),\n connected_source_net_ids: z.array(z.string()),\n subcircuit_id: z.string().optional(),\n subcircuit_connectivity_map_key: z.string().optional(),\n max_length: z.number().optional(),\n min_trace_thickness: z.number().optional(),\n display_name: z.string().optional(),\n})\n\ntype InferredSourceTrace = z.infer<typeof source_trace>\n\nexpectTypesMatch<SourceTrace, InferredSourceTrace>(true)\n","import { z } from \"zod\"\n\nexport const source_group = z.object({\n type: z.literal(\"source_group\"),\n source_group_id: z.string(),\n subcircuit_id: z.string().optional(),\n parent_subcircuit_id: z.string().optional(),\n is_subcircuit: z.boolean().optional(),\n name: z.string().optional(),\n})\n\nexport type SourceGroup = z.infer<typeof source_group>\nexport type SourceGroupInput = z.input<typeof source_group>\n","import { z } from \"zod\"\n\nexport const source_net = z.object({\n type: z.literal(\"source_net\"),\n source_net_id: z.string(),\n name: z.string(),\n member_source_group_ids: z.array(z.string()),\n is_power: z.boolean().optional(),\n is_ground: z.boolean().optional(),\n is_digital_signal: z.boolean().optional(),\n is_analog_signal: z.boolean().optional(),\n trace_width: z.number().optional(),\n subcircuit_id: z.string().optional(),\n subcircuit_connectivity_map_key: z.string().optional(),\n})\n\nexport type SourceNet = z.infer<typeof source_net>\nexport type SourceNetInput = z.input<typeof source_net>\n","import { z } from \"zod\"\nimport { distance } from \"../units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport interface SchematicBox {\n type: \"schematic_box\"\n schematic_component_id: string\n width: number\n height: number\n is_dashed: boolean\n x: number\n y: number\n}\n\nexport const schematic_box = z\n .object({\n type: z.literal(\"schematic_box\"),\n schematic_component_id: z.string(),\n width: distance,\n height: distance,\n is_dashed: z.boolean().default(false),\n x: distance,\n y: distance,\n })\n .describe(\"Draws a box on the schematic\")\n\nexport type SchematicBoxInput = z.input<typeof schematic_box>\ntype InferredSchematicBox = z.infer<typeof schematic_box>\n\nexpectTypesMatch<SchematicBox, InferredSchematicBox>(true)\n","import { z } from \"zod\"\nimport { point, type Point } from \"../common/point\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport interface SchematicPath {\n type: \"schematic_path\"\n schematic_component_id: string\n fill_color?: \"red\" | \"blue\"\n is_filled?: boolean\n points: Point[]\n}\n\nexport const schematic_path = z.object({\n type: z.literal(\"schematic_path\"),\n schematic_component_id: z.string(),\n fill_color: z.enum([\"red\", \"blue\"]).optional(),\n is_filled: z.boolean().optional(),\n points: z.array(point),\n})\n\nexport type SchematicPathInput = z.input<typeof schematic_path>\ntype InferredSchematicPath = z.infer<typeof schematic_path>\n\nexpectTypesMatch<SchematicPath, InferredSchematicPath>(true)\n","import { z } from \"zod\"\nimport { point, type Point } from \"../common/point\"\nimport { size, type Size } from \"../common/size\"\nimport { length } from \"../units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const schematic_pin_styles = z.record(\n z.object({\n left_margin: length.optional(),\n right_margin: length.optional(),\n top_margin: length.optional(),\n bottom_margin: length.optional(),\n }),\n)\n\nexport interface SchematicPortArrangementBySize {\n left_size: number\n right_size: number\n top_size?: number\n bottom_size?: number\n}\n\nexport interface SchematicPortArrangementBySides {\n left_side?: { pins: number[]; direction?: \"top-to-bottom\" | \"bottom-to-top\" }\n right_side?: { pins: number[]; direction?: \"top-to-bottom\" | \"bottom-to-top\" }\n top_side?: { pins: number[]; direction?: \"left-to-right\" | \"right-to-left\" }\n bottom_side?: {\n pins: number[]\n direction?: \"left-to-right\" | \"right-to-left\"\n }\n}\n\nexport type SchematicPortArrangement =\n | SchematicPortArrangementBySize\n | SchematicPortArrangementBySides\n\nexport interface SchematicComponent {\n type: \"schematic_component\"\n size: Size\n center: Point\n source_component_id: string\n schematic_component_id: string\n pin_spacing?: number\n pin_styles?: Record<\n string,\n {\n left_margin?: number\n right_margin?: number\n top_margin?: number\n bottom_margin?: number\n }\n >\n box_width?: number\n symbol_name?: string\n port_arrangement?: SchematicPortArrangement\n port_labels?: Record<string, string>\n symbol_display_value?: string\n subcircuit_id?: string\n schematic_group_id?: string\n}\n\nexport const schematic_component_port_arrangement_by_size = z.object({\n left_size: z.number(),\n right_size: z.number(),\n top_size: z.number().optional(),\n bottom_size: z.number().optional(),\n})\n\nexpectTypesMatch<\n SchematicPortArrangementBySize,\n z.infer<typeof schematic_component_port_arrangement_by_size>\n>(true)\n\nexport const schematic_component_port_arrangement_by_sides = z.object({\n left_side: z\n .object({\n pins: z.array(z.number()),\n // @ts-ignore\n direction: z.enum([\"top-to-bottom\", \"bottom-to-top\"]).optional(),\n })\n .optional(),\n right_side: z\n .object({\n pins: z.array(z.number()),\n // @ts-ignore\n direction: z.enum([\"top-to-bottom\", \"bottom-to-top\"]).optional(),\n })\n .optional(),\n top_side: z\n .object({\n pins: z.array(z.number()),\n // @ts-ignore\n direction: z.enum([\"left-to-right\", \"right-to-left\"]).optional(),\n })\n .optional(),\n bottom_side: z\n .object({\n pins: z.array(z.number()),\n // @ts-ignore\n direction: z.enum([\"left-to-right\", \"right-to-left\"]).optional(),\n })\n .optional(),\n})\n\nexpectTypesMatch<\n SchematicPortArrangementBySides,\n z.infer<typeof schematic_component_port_arrangement_by_sides>\n>(true)\n\nexport const port_arrangement = z.union([\n schematic_component_port_arrangement_by_size,\n schematic_component_port_arrangement_by_sides,\n])\n\nexport const schematic_component = z.object({\n type: z.literal(\"schematic_component\"),\n size,\n center: point,\n source_component_id: z.string(),\n schematic_component_id: z.string(),\n pin_spacing: length.optional(),\n pin_styles: schematic_pin_styles.optional(),\n box_width: length.optional(),\n symbol_name: z.string().optional(),\n port_arrangement: port_arrangement.optional(),\n port_labels: z.record(z.string()).optional(),\n symbol_display_value: z.string().optional(),\n subcircuit_id: z.string().optional(),\n schematic_group_id: z.string().optional(),\n})\n\nexport type SchematicComponentInput = z.input<typeof schematic_component>\ntype InferredSchematicComponent = z.infer<typeof schematic_component>\n\nexpectTypesMatch<SchematicComponent, InferredSchematicComponent>(true)\n","import { z } from \"zod\"\nimport { distance } from \"../units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\n/**\n * Defines a line on the schematic, this can be used for adding arbitrary lines\n * to a schematic, but don't use it for drawing traces, schematic boxes or where\n * other schematic elements are more appropriate.\n */\nexport interface SchematicLine {\n type: \"schematic_line\"\n schematic_component_id: string\n x1: number\n x2: number\n y1: number\n y2: number\n}\n\nexport const schematic_line = z.object({\n type: z.literal(\"schematic_line\"),\n schematic_component_id: z.string(),\n x1: distance,\n x2: distance,\n y1: distance,\n y2: distance,\n})\n\nexport type SchematicLineInput = z.input<typeof schematic_line>\ntype InferredSchematicLine = z.infer<typeof schematic_line>\n\nexpectTypesMatch<SchematicLine, InferredSchematicLine>(true)\n","import { z } from \"zod\"\nimport { distance } from \"../units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport interface SchematicTraceEdge {\n from: {\n x: number\n y: number\n }\n to: {\n x: number\n y: number\n }\n is_crossing?: boolean\n from_schematic_port_id?: string\n to_schematic_port_id?: string\n}\n\nexport interface SchematicTrace {\n type: \"schematic_trace\"\n schematic_trace_id: string\n source_trace_id: string\n junctions: {\n x: number\n y: number\n }[]\n edges: SchematicTraceEdge[]\n}\n\nexport const schematic_trace = z.object({\n type: z.literal(\"schematic_trace\"),\n schematic_trace_id: z.string(),\n source_trace_id: z.string(),\n junctions: z.array(\n z.object({\n x: z.number(),\n y: z.number(),\n }),\n ),\n edges: z.array(\n z.object({\n from: z.object({\n x: z.number(),\n y: z.number(),\n }),\n to: z.object({\n x: z.number(),\n y: z.number(),\n }),\n is_crossing: z.boolean().optional(),\n from_schematic_port_id: z.string().optional(),\n to_schematic_port_id: z.string().optional(),\n }),\n ),\n})\n\nexport type SchematicTraceInput = z.input<typeof schematic_trace>\ntype InferredSchematicTrace = z.infer<typeof schematic_trace>\n\nexpectTypesMatch<SchematicTraceInput, InferredSchematicTrace>(true)\n","import { z } from \"zod\"\nimport { distance } from \"../units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\nimport { ninePointAnchor } from \"src/common/NinePointAnchor\"\nimport type { NinePointAnchor } from \"src/common/NinePointAnchor\"\nimport type { FivePointAnchor } from \"src/common/FivePointAnchor\"\nimport { fivePointAnchor } from \"src/common/FivePointAnchor\"\n\nexport interface SchematicText {\n type: \"schematic_text\"\n schematic_component_id?: string\n schematic_text_id: string\n text: string\n font_size: number\n position: {\n x: number\n y: number\n }\n rotation: number\n anchor: NinePointAnchor | FivePointAnchor\n color: string\n}\n\nexport const schematic_text = z.object({\n type: z.literal(\"schematic_text\"),\n schematic_component_id: z.string().optional(),\n schematic_text_id: z.string(),\n text: z.string(),\n font_size: z.number().default(0.18),\n position: z.object({\n x: distance,\n y: distance,\n }),\n rotation: z.number().default(0),\n anchor: z\n .union([fivePointAnchor.describe(\"legacy\"), ninePointAnchor])\n .default(\"center\"),\n color: z.string().default(\"#000000\"),\n})\n\nexport type SchematicTextInput = z.input<typeof schematic_text>\ntype InferredSchematicText = z.infer<typeof schematic_text>\n\nexpectTypesMatch<SchematicText, InferredSchematicText>(true)\n","import { z } from \"zod\"\n\nexport type NinePointAnchor =\n | \"top_left\"\n | \"top_center\"\n | \"top_right\"\n | \"center_left\"\n | \"center\"\n | \"center_right\"\n | \"bottom_left\"\n | \"bottom_center\"\n | \"bottom_right\"\n\nexport const ninePointAnchor = z.enum([\n \"top_left\",\n \"top_center\",\n \"top_right\",\n \"center_left\",\n \"center\",\n \"center_right\",\n \"bottom_left\",\n \"bottom_center\",\n \"bottom_right\",\n])\n","import { z } from \"zod\"\n\nexport type FivePointAnchor = \"center\" | \"left\" | \"right\" | \"top\" | \"bottom\"\n\nexport const fivePointAnchor = z.enum([\n \"center\",\n \"left\",\n \"right\",\n \"top\",\n \"bottom\",\n])\n","import { z } from \"zod\"\nimport { point, type Point } from \"../common\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport interface SchematicPort {\n type: \"schematic_port\"\n schematic_port_id: string\n source_port_id: string\n schematic_component_id?: string\n center: Point\n facing_direction?: \"up\" | \"down\" | \"left\" | \"right\"\n distance_from_component_edge?: number\n side_of_component?: \"top\" | \"bottom\" | \"left\" | \"right\"\n true_ccw_index?: number\n pin_number?: number\n display_pin_label?: string\n}\n\nexport const schematic_port = z\n .object({\n type: z.literal(\"schematic_port\"),\n schematic_port_id: z.string(),\n source_port_id: z.string(),\n schematic_component_id: z.string().optional(),\n center: point,\n facing_direction: z.enum([\"up\", \"down\", \"left\", \"right\"]).optional(),\n distance_from_component_edge: z.number().optional(),\n side_of_component: z.enum([\"top\", \"bottom\", \"left\", \"right\"]).optional(),\n true_ccw_index: z.number().optional(),\n pin_number: z.number().optional(),\n display_pin_label: z.string().optional(),\n })\n .describe(\"Defines a port on a schematic component\")\n\nexport type SchematicPortInput = z.input<typeof schematic_port>\ntype InferredSchematicPort = z.infer<typeof schematic_port>\n\nexpectTypesMatch<SchematicPort, InferredSchematicPort>(true)\n","import { z } from \"zod\"\nimport { point, type Point } from \"../common/point\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\n\nexport interface SchematicNetLabel {\n type: \"schematic_net_label\"\n schematic_net_label_id: string\n schematic_trace_id?: string\n source_trace_id?: string\n source_net_id: string\n center: Point\n anchor_position?: Point | undefined\n anchor_side: \"top\" | \"bottom\" | \"left\" | \"right\"\n text: string\n symbol_name?: string | undefined\n}\n\nexport const schematic_net_label = z.object({\n type: z.literal(\"schematic_net_label\"),\n schematic_net_label_id: getZodPrefixedIdWithDefault(\"schematic_net_label\"),\n schematic_trace_id: z.string().optional(),\n source_trace_id: z.string().optional(),\n source_net_id: z.string(),\n center: point,\n anchor_position: point.optional(),\n anchor_side: z.enum([\"top\", \"bottom\", \"left\", \"right\"]),\n text: z.string(),\n symbol_name: z.string().optional(),\n})\n\nexport type SchematicNetLabelInput = z.input<typeof schematic_net_label>\nexport type InferredSchematicNetLabel = z.infer<typeof schematic_net_label>\n\nexpectTypesMatch<SchematicNetLabel, InferredSchematicNetLabel>(true)\n","import { z } from \"zod\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport interface SchematicError {\n type: \"schematic_error\"\n schematic_error_id: string\n error_type: \"schematic_port_not_found\"\n message: string\n}\n\nexport const schematic_error = z\n .object({\n type: z.literal(\"schematic_error\"),\n schematic_error_id: z.string(),\n // eventually each error type should be broken out into a dir of files\n error_type: z.literal(\"schematic_port_not_found\"),\n message: z.string(),\n })\n .describe(\"Defines a schematic error on the schematic\")\n\nexport type SchematicErrorInput = z.input<typeof schematic_error>\ntype InferredSchematicError = z.infer<typeof schematic_error>\n\nexpectTypesMatch<SchematicError, InferredSchematicError>(true)\n","import { z } from \"zod\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const schematic_layout_error = z\n .object({\n type: z.literal(\"schematic_layout_error\"),\n schematic_layout_error_id: getZodPrefixedIdWithDefault(\n \"schematic_layout_error\",\n ),\n message: z.string(),\n source_group_id: z.string(),\n schematic_group_id: z.string(),\n })\n .describe(\"Error emitted when schematic layout fails for a group\")\n\nexport type SchematicLayoutErrorInput = z.input<typeof schematic_layout_error>\ntype InferredSchematicLayoutError = z.infer<typeof schematic_layout_error>\n\nexport interface SchematicLayoutError {\n type: \"schematic_layout_error\"\n schematic_layout_error_id: string\n message: string\n source_group_id: string\n schematic_group_id: string\n}\n\nexpectTypesMatch<SchematicLayoutError, InferredSchematicLayoutError>(true)\n","import { z } from \"zod\"\nimport { point, type Point } from \"../common/point\"\nimport { size, type Size } from \"../common/size\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const schematic_debug_object_base = z.object({\n type: z.literal(\"schematic_debug_object\"),\n label: z.string().optional(),\n})\n\nexport const schematic_debug_rect = schematic_debug_object_base.extend({\n shape: z.literal(\"rect\"),\n center: point,\n size: size,\n})\n\nexport const schematic_debug_line = schematic_debug_object_base.extend({\n shape: z.literal(\"line\"),\n start: point,\n end: point,\n})\n\nexport const schematic_debug_point = schematic_debug_object_base.extend({\n shape: z.literal(\"point\"),\n center: point,\n})\n\nexport const schematic_debug_object = z.discriminatedUnion(\"shape\", [\n schematic_debug_rect,\n schematic_debug_line,\n schematic_debug_point,\n])\ntype InferredSchematicDebugObject = z.infer<typeof schematic_debug_object>\n\nexport interface SchematicDebugRect {\n type: \"schematic_debug_object\"\n label?: string\n shape: \"rect\"\n center: Point\n size: Size\n}\n\nexport interface SchematicDebugLine {\n type: \"schematic_debug_object\"\n label?: string\n shape: \"line\"\n start: Point\n end: Point\n}\n\nexport interface SchematicDebugPoint {\n type: \"schematic_debug_object\"\n label?: string\n shape: \"point\"\n center: Point\n}\n\nexport type SchematicDebugObject =\n | SchematicDebugRect\n | SchematicDebugLine\n | SchematicDebugPoint\n\nexpectTypesMatch<SchematicDebugObject, InferredSchematicDebugObject>(true)\nexport type SchematicDebugObjectInput = z.input<typeof schematic_debug_object>\n","import { z } from \"zod\"\nimport { point, type Point } from \"../common/point\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\nimport { voltage } from \"src/units\"\n\nexport interface SchematicVoltageProbe {\n type: \"schematic_voltage_probe\"\n schematic_voltage_probe_id: string\n position: Point\n schematic_trace_id: string\n voltage?: number\n}\n\nexport const schematic_voltage_probe = z\n .object({\n type: z.literal(\"schematic_voltage_probe\"),\n schematic_voltage_probe_id: z.string(),\n position: point,\n schematic_trace_id: z.string(),\n voltage: voltage.optional(),\n })\n .describe(\"Defines a voltage probe measurement point on a schematic trace\")\n\nexport type SchematicVoltageProbeInput = z.input<typeof schematic_voltage_probe>\ntype InferredSchematicVoltageProbe = z.infer<typeof schematic_voltage_probe>\n\nexpectTypesMatch<SchematicVoltageProbe, InferredSchematicVoltageProbe>(true)\n","import { z } from \"zod\"\nimport { getZodPrefixedIdWithDefault } from \"../common\"\nimport { expectTypesMatch } from \"../utils/expect-types-match\"\n\nexport const schematic_manual_edit_conflict_warning = z\n .object({\n type: z.literal(\"schematic_manual_edit_conflict_warning\"),\n schematic_manual_edit_conflict_warning_id: getZodPrefixedIdWithDefault(\n \"schematic_manual_edit_conflict_warning\",\n ),\n message: z.string(),\n schematic_component_id: z.string(),\n schematic_group_id: z.string().optional(),\n subcircuit_id: z.string().optional(),\n source_component_id: z.string(),\n })\n .describe(\n \"Warning emitted when a component has both manual placement and explicit schX/schY coordinates\",\n )\n\nexport type SchematicManualEditConflictWarningInput = z.input<\n typeof schematic_manual_edit_conflict_warning\n>\ntype InferredSchematicManualEditConflictWarning = z.infer<\n typeof schematic_manual_edit_conflict_warning\n>\n\n/**\n * Warning emitted when a component has both manual placement (via manualEdits) and explicit schX/schY coordinates\n */\nexport interface SchematicManualEditConflictWarning {\n type: \"schematic_manual_edit_conflict_warning\"\n schematic_manual_edit_conflict_warning_id: string\n message: string\n schematic_component_id: string\n schematic_group_id?: string\n subcircuit_id?: string\n source_component_id: string\n}\n\nexpectTypesMatch<\n SchematicManualEditConflictWarning,\n InferredSchematicManualEditConflictWarning\n>(true)\n","import { z } from \"zod\"\nimport { point, type Point, getZodPrefixedIdWithDefault } from \"src/common\"\nimport { length, type Length } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const schematic_group = z\n .object({\n type: z.literal(\"schematic_group\"),\n schematic_group_id: getZodPrefixedIdWithDefault(\"schematic_group\"),\n source_group_id: z.string(),\n is_subcircuit: z.boolean().optional(),\n subcircuit_id: z.string().optional(),\n width: length,\n height: length,\n center: point,\n schematic_component_ids: z.array(z.string()),\n name: z.string().optional(),\n description: z.string().optional(),\n })\n .describe(\"Defines a group of components on the schematic\")\n\nexport type SchematicGroupInput = z.input<typeof schematic_group>\ntype InferredSchematicGroup = z.infer<typeof schematic_group>\n\n/**\n * Defines a group of components on the schematic\n */\nexport interface SchematicGroup {\n type: \"schematic_group\"\n schematic_group_id: string\n source_group_id: string\n is_subcircuit?: boolean\n subcircuit_id?: string\n width: Length\n height: Length\n center: Point\n schematic_component_ids: string[]\n name?: string\n description?: string\n}\n\nexpectTypesMatch<SchematicGroup, InferredSchematicGroup>(true)\n","import { z } from \"zod\"\n\nexport const all_layers = [\n \"top\",\n \"bottom\",\n \"inner1\",\n \"inner2\",\n \"inner3\",\n \"inner4\",\n \"inner5\",\n \"inner6\",\n] as const\n\nexport const layer_string = z.enum(all_layers)\n\nexport const layer_ref = layer_string\n .or(\n z.object({\n name: layer_string,\n }),\n )\n .transform((layer) => {\n if (typeof layer === \"string\") {\n return layer\n }\n return layer.name\n })\n\nexport type LayerRefInput = z.input<typeof layer_ref>\nexport type LayerRef = z.output<typeof layer_ref>\n\nexport const visible_layer = z.enum([\"top\", \"bottom\"])\nexport type VisibleLayerRef = z.infer<typeof visible_layer>\nexport type VisibleLayer = z.infer<typeof visible_layer>\n","import { z } from \"zod\"\nimport { distance } from \"src/units\"\nimport { layer_ref } from \"./layer_ref\"\n\n// x: string | number\n// y: string | number\n// via?: boolean\n// via_to_layer?: string\nexport const pcb_route_hint = z.object({\n x: distance,\n y: distance,\n via: z.boolean().optional(),\n via_to_layer: layer_ref.optional(),\n})\nexport const pcb_route_hints = z.array(pcb_route_hint)\n\nexport type PcbRouteHintInput = z.input<typeof pcb_route_hint>\nexport type PcbRouteHintsInput = z.input<typeof pcb_route_hints>\nexport type PcbRouteHint = z.output<typeof pcb_route_hint>\nexport type PcbRouteHints = z.output<typeof pcb_route_hints>\n","import { z } from \"zod\"\nimport { distance } from \"../../units\"\nimport { layer_ref } from \"./layer_ref\"\n\nexport const route_hint_point = z.object({\n x: distance,\n y: distance,\n via: z.boolean().optional(),\n to_layer: layer_ref.optional(),\n trace_width: distance.optional(),\n})\n\nexport type RouteHintPoint = z.infer<typeof route_hint_point>\nexport type RouteHintPointInput = z.input<typeof route_hint_point>\n","import { z } from \"zod\"\nimport { point, type Point, getZodPrefixedIdWithDefault } from \"src/common\"\nimport { layer_ref, type LayerRef } from \"src/pcb/properties/layer_ref\"\nimport { rotation, length, type Rotation, type Length } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_component = z\n .object({\n type: z.literal(\"pcb_component\"),\n pcb_component_id: getZodPrefixedIdWithDefault(\"pcb_component\"),\n source_component_id: z.string(),\n center: point,\n layer: layer_ref,\n rotation: rotation,\n width: length,\n height: length,\n subcircuit_id: z.string().optional(),\n pcb_group_id: z.string().optional(),\n })\n .describe(\"Defines a component on the PCB\")\n\nexport type PcbComponentInput = z.input<typeof pcb_component>\ntype InferredPcbComponent = z.infer<typeof pcb_component>\n\n/**\n * Defines a component on the PCB\n */\nexport interface PcbComponent {\n type: \"pcb_component\"\n pcb_component_id: string\n source_component_id: string\n subcircuit_id?: string\n center: Point\n layer: LayerRef\n rotation: Rotation\n width: Length\n height: Length\n pcb_group_id?: string\n}\n\n/**\n * @deprecated use PcbComponent\n */\nexport type PCBComponent = PcbComponent\n\nexpectTypesMatch<PcbComponent, InferredPcbComponent>(true)\n","import { z } from \"zod\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport { distance, type Distance } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nconst pcb_hole_circle_or_square = z.object({\n type: z.literal(\"pcb_hole\"),\n pcb_hole_id: getZodPrefixedIdWithDefault(\"pcb_hole\"),\n pcb_group_id: z.string().optional(),\n subcircuit_id: z.string().optional(),\n hole_shape: z.enum([\"circle\", \"square\"]),\n hole_diameter: z.number(),\n x: distance,\n y: distance,\n})\n\nexport const pcb_hole_circle_or_square_shape =\n pcb_hole_circle_or_square.describe(\n \"Defines a circular or square hole on the PCB\",\n )\n\nexport type PcbHoleCircleOrSquareInput = z.input<\n typeof pcb_hole_circle_or_square\n>\ntype InferredPcbHoleCircleOrSquare = z.infer<typeof pcb_hole_circle_or_square>\n\n/**\n * Defines a circular or square hole on the PCB\n */\nexport interface PcbHoleCircleOrSquare {\n type: \"pcb_hole\"\n pcb_hole_id: string\n pcb_group_id?: string\n subcircuit_id?: string\n hole_shape: \"circle\" | \"square\"\n hole_diameter: number\n x: Distance\n y: Distance\n}\n\nexpectTypesMatch<PcbHoleCircleOrSquare, InferredPcbHoleCircleOrSquare>(true)\n\nconst pcb_hole_oval = z.object({\n type: z.literal(\"pcb_hole\"),\n pcb_hole_id: getZodPrefixedIdWithDefault(\"pcb_hole\"),\n pcb_group_id: z.string().optional(),\n subcircuit_id: z.string().optional(),\n hole_shape: z.literal(\"oval\"),\n hole_width: z.number(),\n hole_height: z.number(),\n x: distance,\n y: distance,\n})\n\nexport const pcb_hole_oval_shape = pcb_hole_oval.describe(\n \"Defines an oval hole on the PCB\",\n)\n\nexport type PcbHoleOvalInput = z.input<typeof pcb_hole_oval>\ntype InferredPcbHoleOval = z.infer<typeof pcb_hole_oval>\n\n/**\n * Defines an oval hole on the PCB\n */\nexport interface PcbHoleOval {\n type: \"pcb_hole\"\n pcb_hole_id: string\n pcb_group_id?: string\n subcircuit_id?: string\n hole_shape: \"oval\"\n hole_width: number\n hole_height: number\n x: Distance\n y: Distance\n}\n\nexpectTypesMatch<PcbHoleOval, InferredPcbHoleOval>(true)\n\nexport const pcb_hole = pcb_hole_circle_or_square.or(pcb_hole_oval)\n\n/**\n * @deprecated Use PcbHoleCircleOrSquare or PcbHoleOval\n */\nexport type PCBHoleInput = z.input<typeof pcb_hole>\n/**\n * @deprecated Use PcbHoleCircleOrSquare or PcbHoleOval\n */\nexport type PCBHole = z.infer<typeof pcb_hole>\n\nexport type PcbHole = PcbHoleCircleOrSquare | PcbHoleOval\n","import { z } from \"zod\"\nimport { distance, type Distance } from \"src/units\"\nimport { layer_ref, type LayerRef } from \"src/pcb/properties/layer_ref\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nconst pcb_plated_hole_circle = z.object({\n type: z.literal(\"pcb_plated_hole\"),\n shape: z.literal(\"circle\"),\n pcb_group_id: z.string().optional(),\n subcircuit_id: z.string().optional(),\n outer_diameter: z.number(),\n hole_diameter: z.number(),\n x: distance,\n y: distance,\n layers: z.array(layer_ref),\n port_hints: z.array(z.string()).optional(),\n pcb_component_id: z.string().optional(),\n pcb_port_id: z.string().optional(),\n pcb_plated_hole_id: getZodPrefixedIdWithDefault(\"pcb_plated_hole\"),\n})\n\n/**\n * Defines a circular plated hole on the PCB\n */\nexport interface PcbPlatedHoleCircle {\n type: \"pcb_plated_hole\"\n shape: \"circle\"\n pcb_group_id?: string\n subcircuit_id?: string\n outer_diameter: number\n hole_diameter: number\n x: Distance\n y: Distance\n layers: LayerRef[]\n port_hints?: string[]\n pcb_component_id?: string\n pcb_port_id?: string\n pcb_plated_hole_id: string\n}\n\nconst pcb_plated_hole_oval = z.object({\n type: z.literal(\"pcb_plated_hole\"),\n shape: z.enum([\"oval\", \"pill\"]),\n pcb_group_id: z.string().optional(),\n subcircuit_id: z.string().optional(),\n outer_width: z.number(),\n outer_height: z.number(),\n hole_width: z.number(),\n hole_height: z.number(),\n x: distance,\n y: distance,\n layers: z.array(layer_ref),\n port_hints: z.array(z.string()).optional(),\n pcb_component_id: z.string().optional(),\n pcb_port_id: z.string().optional(),\n pcb_plated_hole_id: getZodPrefixedIdWithDefault(\"pcb_plated_hole\"),\n})\n\n/**\n * Defines an oval or pill-shaped plated hole on the PCB\n */\nexport interface PcbPlatedHoleOval {\n type: \"pcb_plated_hole\"\n shape: \"oval\" | \"pill\"\n pcb_group_id?: string\n subcircuit_id?: string\n outer_width: number\n outer_height: number\n hole_width: number\n hole_height: number\n x: Distance\n y: Distance\n layers: LayerRef[]\n port_hints?: string[]\n pcb_component_id?: string\n pcb_port_id?: string\n pcb_plated_hole_id: string\n}\n\nconst pcb_circular_hole_with_rect_pad = z.object({\n type: z.literal(\"pcb_plated_hole\"),\n shape: z.literal(\"circular_hole_with_rect_pad\"),\n pcb_group_id: z.string().optional(),\n subcircuit_id: z.string().optional(),\n hole_shape: z.literal(\"circle\"),\n pad_shape: z.literal(\"rect\"),\n hole_diameter: z.number(),\n rect_pad_width: z.number(),\n rect_pad_height: z.number(),\n x: distance,\n y: distance,\n layers: z.array(layer_ref),\n port_hints: z.array(z.string()).optional(),\n pcb_component_id: z.string().optional(),\n pcb_port_id: z.string().optional(),\n pcb_plated_hole_id: getZodPrefixedIdWithDefault(\"pcb_plated_hole\"),\n})\nconst pcb_pill_hole_with_rect_pad = z.object({\n type: z.literal(\"pcb_plated_hole\"),\n shape: z.literal(\"pill_hole_with_rect_pad\"),\n pcb_group_id: z.string().optional(),\n subcircuit_id: z.string().optional(),\n hole_shape: z.literal(\"pill\"),\n pad_shape: z.literal(\"rect\"),\n hole_width: z.number(),\n hole_height: z.number(),\n rect_pad_width: z.number(),\n rect_pad_height: z.number(),\n x: distance,\n y: distance,\n layers: z.array(layer_ref),\n port_hints: z.array(z.string()).optional(),\n pcb_component_id: z.string().optional(),\n pcb_port_id: z.string().optional(),\n pcb_plated_hole_id: getZodPrefixedIdWithDefault(\"pcb_plated_hole\"),\n})\nexport interface PcbHolePillWithRectPad {\n type: \"pcb_plated_hole\"\n shape: \"pill_hole_with_rect_pad\"\n pcb_group_id?: string\n subcircuit_id?: string\n hole_shape: \"pill\"\n pad_shape: \"rect\"\n hole_width: number\n hole_height: number\n rect_pad_width: number\n rect_pad_height: number\n x: Distance\n y: Distance\n layers: LayerRef[]\n port_hints?: string[]\n pcb_component_id?: string\n pcb_port_id?: string\n pcb_plated_hole_id: string\n}\n\nexport interface PcbHoleCircularWithRectPad {\n type: \"pcb_plated_hole\"\n shape: \"circular_hole_with_rect_pad\"\n pcb_group_id?: string\n subcircuit_id?: string\n hole_shape: \"circle\"\n pad_shape: \"rect\"\n hole_diameter: number\n rect_pad_width: number\n rect_pad_height: number\n x: Distance\n y: Distance\n layers: LayerRef[]\n port_hints?: string[]\n pcb_component_id?: string\n pcb_port_id?: string\n pcb_plated_hole_id: string\n}\n\nexport const pcb_plated_hole = z.union([\n pcb_plated_hole_circle,\n pcb_plated_hole_oval,\n pcb_circular_hole_with_rect_pad,\n pcb_pill_hole_with_rect_pad,\n])\nexport type PcbPlatedHole =\n | PcbPlatedHoleCircle\n | PcbPlatedHoleOval\n | PcbHoleCircularWithRectPad\n | PcbHolePillWithRectPad\n\nexpectTypesMatch<PcbPlatedHoleCircle, z.infer<typeof pcb_plated_hole_circle>>(\n true,\n)\nexpectTypesMatch<PcbPlatedHoleOval, z.infer<typeof pcb_plated_hole_oval>>(true)\nexpectTypesMatch<\n PcbHoleCircularWithRectPad,\n z.infer<typeof pcb_circular_hole_with_rect_pad>\n>(true)\nexpectTypesMatch<\n PcbHolePillWithRectPad,\n z.infer<typeof pcb_pill_hole_with_rect_pad>\n>(true)\n/**\n * @deprecated use PcbPlatedHole\n */\nexport type PCBPlatedHole = PcbPlatedHole\n\n/**\n * @deprecated use PcbPlatedHoleInput\n */\nexport type PCBPlatedHoleInput = z.input<typeof pcb_plated_hole>\nexport type PcbPlatedHoleInput = z.input<typeof pcb_plated_hole>\n","import { z } from \"zod\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport { distance, type Distance } from \"src/units\"\nimport { layer_ref, type LayerRef } from \"src/pcb/properties/layer_ref\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_port = z\n .object({\n type: z.literal(\"pcb_port\"),\n pcb_port_id: getZodPrefixedIdWithDefault(\"pcb_port\"),\n pcb_group_id: z.string().optional(),\n subcircuit_id: z.string().optional(),\n source_port_id: z.string(),\n pcb_component_id: z.string(),\n x: distance,\n y: distance,\n layers: z.array(layer_ref),\n })\n .describe(\"Defines a port on the PCB\")\n\nexport type PcbPortInput = z.input<typeof pcb_port>\ntype InferredPcbPort = z.infer<typeof pcb_port>\n\n/**\n * Defines a port on the PCB\n */\nexport interface PcbPort {\n type: \"pcb_port\"\n pcb_port_id: string\n pcb_group_id?: string\n subcircuit_id?: string\n source_port_id: string\n pcb_component_id: string\n x: Distance\n y: Distance\n layers: LayerRef[]\n}\n\n/**\n * @deprecated use PcbPort\n */\nexport type PCBPort = PcbPort\n\n/**\n * @deprecated use PcbPortInput\n */\nexport type PCBPortInput = PcbPortInput\n\nexpectTypesMatch<PcbPort, InferredPcbPort>(true)\n","import { z } from \"zod\"\nimport { distance, type Distance, rotation, type Rotation } from \"src/units\"\nimport { layer_ref, type LayerRef } from \"src/pcb/properties/layer_ref\"\nimport { getZodPrefixedIdWithDefault, point, type Point } from \"src/common\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nconst pcb_smtpad_circle = z.object({\n type: z.literal(\"pcb_smtpad\"),\n shape: z.literal(\"circle\"),\n pcb_smtpad_id: getZodPrefixedIdWithDefault(\"pcb_smtpad\"),\n pcb_group_id: z.string().optional(),\n subcircuit_id: z.string().optional(),\n x: distance,\n y: distance,\n radius: z.number(),\n layer: layer_ref,\n port_hints: z.array(z.string()).optional(),\n pcb_component_id: z.string().optional(),\n pcb_port_id: z.string().optional(),\n})\n\nconst pcb_smtpad_rect = z.object({\n type: z.literal(\"pcb_smtpad\"),\n shape: z.literal(\"rect\"),\n pcb_smtpad_id: getZodPrefixedIdWithDefault(\"pcb_smtpad\"),\n pcb_group_id: z.string().optional(),\n subcircuit_id: z.string().optional(),\n x: distance,\n y: distance,\n width: z.number(),\n height: z.number(),\n layer: layer_ref,\n port_hints: z.array(z.string()).optional(),\n pcb_component_id: z.string().optional(),\n pcb_port_id: z.string().optional(),\n})\n\nconst pcb_smtpad_rotated_rect = z.object({\n type: z.literal(\"pcb_smtpad\"),\n shape: z.literal(\"rotated_rect\"),\n pcb_smtpad_id: getZodPrefixedIdWithDefault(\"pcb_smtpad\"),\n pcb_group_id: z.string().optional(),\n subcircuit_id: z.string().optional(),\n x: distance,\n y: distance,\n width: z.number(),\n height: z.number(),\n ccw_rotation: rotation,\n layer: layer_ref,\n port_hints: z.array(z.string()).optional(),\n pcb_component_id: z.string().optional(),\n pcb_port_id: z.string().optional(),\n})\n\nexport const pcb_smtpad_pill = z.object({\n type: z.literal(\"pcb_smtpad\"),\n shape: z.literal(\"pill\"),\n pcb_smtpad_id: getZodPrefixedIdWithDefault(\"pcb_smtpad\"),\n pcb_group_id: z.string().optional(),\n subcircuit_id: z.string().optional(),\n x: distance,\n y: distance,\n width: z.number(),\n height: z.number(),\n radius: z.number(),\n layer: layer_ref,\n port_hints: z.array(z.string()).optional(),\n pcb_component_id: z.string().optional(),\n pcb_port_id: z.string().optional(),\n})\n\nconst pcb_smtpad_polygon = z.object({\n type: z.literal(\"pcb_smtpad\"),\n shape: z.literal(\"polygon\"),\n pcb_smtpad_id: getZodPrefixedIdWithDefault(\"pcb_smtpad\"),\n pcb_group_id: z.string().optional(),\n subcircuit_id: z.string().optional(),\n points: z.array(point),\n layer: layer_ref,\n port_hints: z.array(z.string()).optional(),\n pcb_component_id: z.string().optional(),\n pcb_port_id: z.string().optional(),\n})\n\nexport const pcb_smtpad = z\n .union([\n pcb_smtpad_circle,\n pcb_smtpad_rect,\n pcb_smtpad_rotated_rect,\n pcb_smtpad_pill,\n pcb_smtpad_polygon,\n ])\n .describe(\"Defines an SMT pad on the PCB\")\n\nexport type PCBSMTPadInput = z.input<typeof pcb_smtpad>\ntype PCBSMTPadCircle = z.infer<typeof pcb_smtpad_circle>\ntype PCBSMTPadRect = z.infer<typeof pcb_smtpad_rect>\ntype PCBSMTPadRotatedRect = z.infer<typeof pcb_smtpad_rotated_rect>\ntype PCBSMTPadPill = z.infer<typeof pcb_smtpad_pill>\ntype PCBSMTPadPolygon = z.infer<typeof pcb_smtpad_polygon>\n\n/**\n * Defines a circular SMT pad on the PCB\n */\nexport interface PcbSmtPadCircle {\n type: \"pcb_smtpad\"\n shape: \"circle\"\n pcb_smtpad_id: string\n pcb_group_id?: string\n subcircuit_id?: string\n x: Distance\n y: Distance\n radius: number\n layer: LayerRef\n port_hints?: string[]\n pcb_component_id?: string\n pcb_port_id?: string\n}\n\n/**\n * Defines a rectangular SMT pad on the PCB\n */\nexport interface PcbSmtPadRect {\n type: \"pcb_smtpad\"\n shape: \"rect\"\n pcb_smtpad_id: string\n pcb_group_id?: string\n subcircuit_id?: string\n x: Distance\n y: Distance\n width: number\n height: number\n layer: LayerRef\n port_hints?: string[]\n pcb_component_id?: string\n pcb_port_id?: string\n}\n\n/**\n * Defines a rotated rectangular SMT pad on the PCB\n */\nexport interface PcbSmtPadRotatedRect {\n type: \"pcb_smtpad\"\n shape: \"rotated_rect\"\n pcb_smtpad_id: string\n pcb_group_id?: string\n subcircuit_id?: string\n x: Distance\n y: Distance\n width: number\n height: number\n ccw_rotation: Rotation\n layer: LayerRef\n port_hints?: string[]\n pcb_component_id?: string\n pcb_port_id?: string\n}\n/**\n * Defines a pill-shaped SMT pad on the PCB (rounded rectangle).\n */\nexport interface PcbSmtPadPill {\n type: \"pcb_smtpad\"\n shape: \"pill\"\n pcb_smtpad_id: string\n pcb_group_id?: string\n subcircuit_id?: string\n x: Distance\n y: Distance\n width: number\n height: number\n radius: number\n layer: LayerRef\n port_hints?: string[]\n pcb_component_id?: string\n pcb_port_id?: string\n}\n\n/**\n * Defines a polygonal SMT pad on the PCB\n */\nexport interface PcbSmtPadPolygon {\n type: \"pcb_smtpad\"\n shape: \"polygon\"\n pcb_smtpad_id: string\n pcb_group_id?: string\n subcircuit_id?: string\n points: Point[]\n layer: LayerRef\n port_hints?: string[]\n pcb_component_id?: string\n pcb_port_id?: string\n}\n\nexport type PcbSmtPad =\n | PcbSmtPadCircle\n | PcbSmtPadRect\n | PcbSmtPadRotatedRect\n | PcbSmtPadPill\n | PcbSmtPadPolygon\n\n/**\n * @deprecated use PcbSmtPad\n */\nexport type PCBSMTPad = PcbSmtPad\n\nexpectTypesMatch<PcbSmtPadCircle, PCBSMTPadCircle>(true)\nexpectTypesMatch<PcbSmtPadRect, PCBSMTPadRect>(true)\nexpectTypesMatch<PcbSmtPadRotatedRect, PCBSMTPadRotatedRect>(true)\nexpectTypesMatch<PcbSmtPadPill, PCBSMTPadPill>(true)\nexpectTypesMatch<PcbSmtPadPolygon, PCBSMTPadPolygon>(true)\n","import { z } from \"zod\"\nimport { distance, type Distance } from \"src/units\"\nimport { layer_ref, type LayerRef } from \"src/pcb/properties/layer_ref\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nconst pcb_solder_paste_circle = z.object({\n type: z.literal(\"pcb_solder_paste\"),\n shape: z.literal(\"circle\"),\n pcb_solder_paste_id: getZodPrefixedIdWithDefault(\"pcb_solder_paste\"),\n pcb_group_id: z.string().optional(),\n subcircuit_id: z.string().optional(),\n x: distance,\n y: distance,\n radius: z.number(),\n layer: layer_ref,\n pcb_component_id: z.string().optional(),\n pcb_smtpad_id: z.string().optional(),\n})\n\nconst pcb_solder_paste_rect = z.object({\n type: z.literal(\"pcb_solder_paste\"),\n shape: z.literal(\"rect\"),\n pcb_solder_paste_id: getZodPrefixedIdWithDefault(\"pcb_solder_paste\"),\n pcb_group_id: z.string().optional(),\n subcircuit_id: z.string().optional(),\n x: distance,\n y: distance,\n width: z.number(),\n height: z.number(),\n layer: layer_ref,\n pcb_component_id: z.string().optional(),\n pcb_smtpad_id: z.string().optional(),\n})\nconst pcb_solder_paste_pill = z.object({\n type: z.literal(\"pcb_solder_paste\"),\n shape: z.literal(\"pill\"),\n pcb_solder_paste_id: getZodPrefixedIdWithDefault(\"pcb_solder_paste\"),\n pcb_group_id: z.string().optional(),\n subcircuit_id: z.string().optional(),\n x: distance,\n y: distance,\n width: z.number(),\n height: z.number(),\n radius: z.number(),\n layer: layer_ref,\n pcb_component_id: z.string().optional(),\n pcb_smtpad_id: z.string().optional(),\n})\nconst pcb_solder_paste_rotated_rect = z.object({\n type: z.literal(\"pcb_solder_paste\"),\n shape: z.literal(\"rotated_rect\"),\n pcb_solder_paste_id: getZodPrefixedIdWithDefault(\"pcb_solder_paste\"),\n pcb_group_id: z.string().optional(),\n subcircuit_id: z.string().optional(),\n x: distance,\n y: distance,\n width: z.number(),\n height: z.number(),\n ccw_rotation: distance,\n layer: layer_ref,\n pcb_component_id: z.string().optional(),\n pcb_smtpad_id: z.string().optional(),\n})\n\nconst pcb_solder_paste_oval = z.object({\n type: z.literal(\"pcb_solder_paste\"),\n shape: z.literal(\"oval\"),\n pcb_solder_paste_id: getZodPrefixedIdWithDefault(\"pcb_solder_paste\"),\n pcb_group_id: z.string().optional(),\n subcircuit_id: z.string().optional(),\n x: distance,\n y: distance,\n width: z.number(),\n height: z.number(),\n layer: layer_ref,\n pcb_component_id: z.string().optional(),\n pcb_smtpad_id: z.string().optional(),\n})\n\nexport const pcb_solder_paste = z\n .union([\n pcb_solder_paste_circle,\n pcb_solder_paste_rect,\n pcb_solder_paste_pill,\n pcb_solder_paste_rotated_rect,\n pcb_solder_paste_oval,\n ])\n .describe(\"Defines solderpaste on the PCB\")\n\nexport type PCBSolderPasteInput = z.input<typeof pcb_solder_paste>\ntype InferredPcbSolderPasteCircle = z.infer<typeof pcb_solder_paste_circle>\ntype InferredPcbSolderPasteRect = z.infer<typeof pcb_solder_paste_rect>\ntype InferredPcbSolderPastePill = z.infer<typeof pcb_solder_paste_pill>\ntype InferredPcbSolderPasteRotatedRect = z.infer<\n typeof pcb_solder_paste_rotated_rect\n>\ntype InferredPcbSolderPasteOval = z.infer<typeof pcb_solder_paste_oval>\n\n/**\n * Defines solderpaste on the PCB\n */\nexport interface PcbSolderPasteCircle {\n type: \"pcb_solder_paste\"\n shape: \"circle\"\n pcb_solder_paste_id: string\n pcb_group_id?: string\n subcircuit_id?: string\n x: Distance\n y: Distance\n radius: number\n layer: LayerRef\n pcb_component_id?: string\n pcb_smtpad_id?: string\n}\n\n/**\n * Defines solderpaste on the PCB\n */\nexport interface PcbSolderPasteRect {\n type: \"pcb_solder_paste\"\n shape: \"rect\"\n pcb_solder_paste_id: string\n pcb_group_id?: string\n subcircuit_id?: string\n x: Distance\n y: Distance\n width: number\n height: number\n layer: LayerRef\n pcb_component_id?: string\n pcb_smtpad_id?: string\n}\n/**\n * Defines solderpaste on the PCB\n */\nexport interface PcbSolderPastePill {\n type: \"pcb_solder_paste\"\n shape: \"pill\"\n pcb_solder_paste_id: string\n pcb_group_id?: string\n subcircuit_id?: string\n x: Distance\n y: Distance\n width: number\n height: number\n radius: number\n layer: LayerRef\n pcb_component_id?: string\n pcb_smtpad_id?: string\n}\n/**\n * Defines solderpaste on the PCB\n */\nexport interface PcbSolderPasteRotatedRect {\n type: \"pcb_solder_paste\"\n shape: \"rotated_rect\"\n pcb_solder_paste_id: string\n pcb_group_id?: string\n subcircuit_id?: string\n x: Distance\n y: Distance\n width: number\n height: number\n ccw_rotation: Distance\n layer: LayerRef\n pcb_component_id?: string\n pcb_smtpad_id?: string\n}\n/**\n * Defines solderpaste on the PCB\n */\nexport interface PcbSolderPasteOval {\n type: \"pcb_solder_paste\"\n shape: \"oval\"\n pcb_solder_paste_id: string\n pcb_group_id?: string\n subcircuit_id?: string\n x: Distance\n y: Distance\n width: number\n height: number\n layer: LayerRef\n pcb_component_id?: string\n pcb_smtpad_id?: string\n}\n\nexport type PcbSolderPaste =\n | PcbSolderPasteCircle\n | PcbSolderPasteRect\n | PcbSolderPastePill\n | PcbSolderPasteRotatedRect\n | PcbSolderPasteOval\n\nexpectTypesMatch<PcbSolderPasteCircle, InferredPcbSolderPasteCircle>(true)\nexpectTypesMatch<PcbSolderPasteRect, InferredPcbSolderPasteRect>(true)\nexpectTypesMatch<PcbSolderPastePill, InferredPcbSolderPastePill>(true)\nexpectTypesMatch<PcbSolderPasteRotatedRect, InferredPcbSolderPasteRotatedRect>(\n true,\n)\nexpectTypesMatch<PcbSolderPasteOval, InferredPcbSolderPasteOval>(true)\n","import { z } from \"zod\"\nimport { point, type Point, getZodPrefixedIdWithDefault } from \"src/common\"\nimport { layer_ref, type LayerRef } from \"src/pcb/properties/layer_ref\"\nimport { length, type Length } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_text = z\n .object({\n type: z.literal(\"pcb_text\"),\n pcb_text_id: getZodPrefixedIdWithDefault(\"pcb_text\"),\n pcb_group_id: z.string().optional(),\n subcircuit_id: z.string().optional(),\n text: z.string(),\n center: point,\n layer: layer_ref,\n width: length,\n height: length,\n lines: z.number(),\n // @ts-ignore\n align: z.enum([\"bottom-left\"]),\n })\n .describe(\"Defines text on the PCB\")\n\nexport type PcbTextInput = z.input<typeof pcb_text>\ntype InferredPcbText = z.infer<typeof pcb_text>\n\n/**\n * Defines text on the PCB\n */\nexport interface PcbText {\n type: \"pcb_text\"\n pcb_text_id: string\n pcb_group_id?: string\n subcircuit_id?: string\n text: string\n center: Point\n layer: LayerRef\n width: Length\n height: Length\n lines: number\n // @ts-ignore\n align: \"bottom-left\"\n}\n\n/**\n * @deprecated use PcbText\n */\nexport type PCBText = PcbText\n\nexpectTypesMatch<PcbText, InferredPcbText>(true)\n","import { z } from \"zod\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport { distance, type Distance } from \"src/units\"\nimport { layer_ref, type LayerRef } from \"src/pcb/properties/layer_ref\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_trace_route_point_wire = z.object({\n route_type: z.literal(\"wire\"),\n x: distance,\n y: distance,\n width: distance,\n start_pcb_port_id: z.string().optional(),\n end_pcb_port_id: z.string().optional(),\n layer: layer_ref,\n})\n\nexport const pcb_trace_route_point_via = z.object({\n route_type: z.literal(\"via\"),\n x: distance,\n y: distance,\n hole_diameter: distance.optional(),\n outer_diameter: distance.optional(),\n from_layer: z.string(),\n to_layer: z.string(),\n})\n\nexport const pcb_trace_route_point = z.union([\n pcb_trace_route_point_wire,\n pcb_trace_route_point_via,\n])\ntype InferredPcbTraceRoutePoint = z.infer<typeof pcb_trace_route_point>\n\nexport const pcb_trace = z\n .object({\n type: z.literal(\"pcb_trace\"),\n source_trace_id: z.string().optional(),\n pcb_component_id: z.string().optional(),\n pcb_trace_id: getZodPrefixedIdWithDefault(\"pcb_trace\"),\n pcb_group_id: z.string().optional(),\n subcircuit_id: z.string().optional(),\n route_thickness_mode: z\n .enum([\"constant\", \"interpolated\"])\n .default(\"constant\")\n .optional(),\n route_order_index: z.number().optional(),\n should_round_corners: z.boolean().optional(),\n trace_length: z.number().optional(),\n route: z.array(pcb_trace_route_point),\n })\n .describe(\"Defines a trace on the PCB\")\n\nexport type PcbTraceInput = z.input<typeof pcb_trace>\ntype InferredPcbTrace = z.infer<typeof pcb_trace>\n\nexport interface PcbTraceRoutePointWire {\n route_type: \"wire\"\n x: Distance\n y: Distance\n width: Distance\n start_pcb_port_id?: string\n end_pcb_port_id?: string\n layer: LayerRef\n}\n\nexport interface PcbTraceRoutePointVia {\n route_type: \"via\"\n x: Distance\n y: Distance\n hole_diameter?: Distance\n outer_diameter?: Distance\n from_layer: string\n to_layer: string\n}\n\nexport type PcbTraceRoutePoint = PcbTraceRoutePointWire | PcbTraceRoutePointVia\n\n/**\n * Defines a trace on the PCB\n */\nexport interface PcbTrace {\n type: \"pcb_trace\"\n source_trace_id?: string\n pcb_component_id?: string\n pcb_group_id?: string\n subcircuit_id?: string\n pcb_trace_id: string\n /**\n * The order that this trace was routed in. This can be used to debug the\n * autorouter and to understand the trace path better\n *\n * The route_order_index should be relative to a subcircuit\n */\n route_order_index?: number\n route_thickness_mode?: \"constant\" | \"interpolated\"\n should_round_corners?: boolean\n trace_length?: number\n route: Array<PcbTraceRoutePoint>\n}\n\n/**\n * @deprecated use PcbTrace\n */\nexport type PCBTrace = PcbTrace\n\n/**\n * @deprecated use PcbTraceInput\n */\nexport type PCBTraceInput = PcbTraceInput\n\nexpectTypesMatch<PcbTraceRoutePoint, InferredPcbTraceRoutePoint>(true)\nexpectTypesMatch<PcbTrace, InferredPcbTrace>(true)\n","import { z } from \"zod\"\nimport { point, type Point, getZodPrefixedIdWithDefault } from \"src/common\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_trace_error = z\n .object({\n type: z.literal(\"pcb_trace_error\"),\n pcb_trace_error_id: getZodPrefixedIdWithDefault(\"pcb_trace_error\"),\n error_type: z.literal(\"pcb_trace_error\"),\n message: z.string(),\n center: point.optional(),\n pcb_trace_id: z.string(),\n source_trace_id: z.string(),\n pcb_component_ids: z.array(z.string()),\n pcb_port_ids: z.array(z.string()),\n })\n .describe(\"Defines a trace error on the PCB\")\n\nexport type PcbTraceErrorInput = z.input<typeof pcb_trace_error>\ntype InferredPcbTraceError = z.infer<typeof pcb_trace_error>\n\n/**\n * Defines a trace error on the PCB\n */\nexport interface PcbTraceError {\n type: \"pcb_trace_error\"\n pcb_trace_error_id: string\n error_type: \"pcb_trace_error\"\n message: string\n center?: Point\n pcb_trace_id: string\n source_trace_id: string\n pcb_component_ids: string[]\n pcb_port_ids: string[]\n}\n\n/**\n * @deprecated use PcbTraceError\n */\nexport type PCBTraceError = PcbTraceError\n\nexpectTypesMatch<PcbTraceError, InferredPcbTraceError>(true)\n","import { z } from \"zod\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_port_not_matched_error = z\n .object({\n type: z.literal(\"pcb_port_not_matched_error\"),\n pcb_error_id: getZodPrefixedIdWithDefault(\"pcb_error\"),\n message: z.string(),\n pcb_component_ids: z.array(z.string()),\n })\n .describe(\"Defines a trace error on the PCB where a port is not matched\")\n\nexport type PcbPortNotMatchedErrorInput = z.input<\n typeof pcb_port_not_matched_error\n>\ntype InferredPcbPortNotMatchedError = z.infer<typeof pcb_port_not_matched_error>\n\n/**\n * Defines a trace error on the PCB where a port is not matched\n */\nexport interface PcbPortNotMatchedError {\n type: \"pcb_port_not_matched_error\"\n pcb_error_id: string\n message: string\n pcb_component_ids: string[]\n}\n\n/**\n * @deprecated use PcbPortNotMatchedError\n */\nexport type PCBPortNotMatchedError = PcbPortNotMatchedError\n\nexpectTypesMatch<PcbPortNotMatchedError, InferredPcbPortNotMatchedError>(true)\n","import { z } from \"zod\"\nimport { distance, type Distance } from \"src/units\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport { layer_ref, type LayerRef } from \"src/pcb/properties/layer_ref\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_via = z\n .object({\n type: z.literal(\"pcb_via\"),\n pcb_via_id: getZodPrefixedIdWithDefault(\"pcb_via\"),\n pcb_group_id: z.string().optional(),\n subcircuit_id: z.string().optional(),\n x: distance,\n y: distance,\n outer_diameter: distance.default(\"0.6mm\"),\n hole_diameter: distance.default(\"0.25mm\"),\n /** @deprecated */\n from_layer: layer_ref.optional(),\n /** @deprecated */\n to_layer: layer_ref.optional(),\n layers: z.array(layer_ref),\n pcb_trace_id: z.string().optional(),\n })\n .describe(\"Defines a via on the PCB\")\n\nexport type PcbViaInput = z.input<typeof pcb_via>\ntype InferredPcbVia = z.infer<typeof pcb_via>\n\n/**\n * Defines a via on the PCB\n */\nexport interface PcbVia {\n type: \"pcb_via\"\n pcb_via_id: string\n pcb_group_id?: string\n subcircuit_id?: string\n x: Distance\n y: Distance\n outer_diameter: Distance\n hole_diameter: Distance\n /** @deprecated */\n from_layer?: LayerRef\n /** @deprecated */\n to_layer?: LayerRef\n layers: LayerRef[]\n pcb_trace_id?: string\n}\n\n/**\n * @deprecated use PcbVia\n */\nexport type PCBVia = PcbVia\n\nexpectTypesMatch<PcbVia, InferredPcbVia>(true)\n","import { z } from \"zod\"\nimport { point, type Point, getZodPrefixedIdWithDefault } from \"src/common\"\nimport { length, type Length } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_board = z\n .object({\n type: z.literal(\"pcb_board\"),\n pcb_board_id: getZodPrefixedIdWithDefault(\"pcb_board\"),\n is_subcircuit: z.boolean().optional(),\n subcircuit_id: z.string().optional(),\n width: length,\n height: length,\n center: point,\n thickness: length.optional().default(1.4),\n num_layers: z.number().optional().default(4),\n outline: z.array(point).optional(),\n material: z.enum([\"fr4\", \"fr1\"]).default(\"fr4\"),\n })\n .describe(\"Defines the board outline of the PCB\")\n\n/**\n * Defines the board outline of the PCB\n */\nexport interface PcbBoard {\n type: \"pcb_board\"\n pcb_board_id: string\n is_subcircuit?: boolean\n subcircuit_id?: string\n width: Length\n height: Length\n thickness: Length\n num_layers: number\n center: Point\n outline?: Point[]\n material: \"fr4\" | \"fr1\"\n}\n\nexport type PcbBoardInput = z.input<typeof pcb_board>\ntype InferredPcbBoard = z.infer<typeof pcb_board>\n\n/**\n * @deprecated use PcbBoard\n */\nexport type PCBBoard = PcbBoard\n\nexpectTypesMatch<PcbBoard, InferredPcbBoard>(true)\n","import { z } from \"zod\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_placement_error = z\n .object({\n type: z.literal(\"pcb_placement_error\"),\n pcb_placement_error_id: getZodPrefixedIdWithDefault(\"pcb_placement_error\"),\n message: z.string(),\n })\n .describe(\"Defines a placement error on the PCB\")\n\nexport type PcbPlacementErrorInput = z.input<typeof pcb_placement_error>\ntype InferredPcbPlacementError = z.infer<typeof pcb_placement_error>\n\n/**\n * Defines a placement error on the PCB\n */\nexport interface PcbPlacementError {\n type: \"pcb_placement_error\"\n pcb_placement_error_id: string\n message: string\n}\n\n/**\n * @deprecated use PcbPlacementError\n */\nexport type PCBPlacementError = PcbPlacementError\n\nexpectTypesMatch<PcbPlacementError, InferredPcbPlacementError>(true)\n","import { z } from \"zod\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport { route_hint_point, type RouteHintPoint } from \"src/pcb\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\n/**\n * A hint that can be used during generation of a PCB trace.\n */\nexport interface PcbTraceHint {\n type: \"pcb_trace_hint\"\n pcb_trace_hint_id: string\n pcb_port_id: string\n pcb_component_id: string\n route: RouteHintPoint[]\n}\n\nexport const pcb_trace_hint = z\n .object({\n type: z.literal(\"pcb_trace_hint\"),\n pcb_trace_hint_id: getZodPrefixedIdWithDefault(\"pcb_trace_hint\"),\n pcb_port_id: z.string(),\n pcb_component_id: z.string(),\n route: z.array(route_hint_point),\n })\n .describe(\"A hint that can be used during generation of a PCB trace\")\n\nexport type PcbTraceHintInput = z.input<typeof pcb_trace_hint>\ntype InferredPcbTraceHint = z.infer<typeof pcb_trace_hint>\n\n/**\n * @deprecated use PcbTraceHint\n */\nexport type PCBTraceHint = PcbTraceHint\n\nexpectTypesMatch<PcbTraceHint, InferredPcbTraceHint>(true)\n","import { z } from \"zod\"\nimport { distance, type Distance } from \"src/units\"\nimport {\n layer_ref,\n type LayerRef,\n type VisibleLayer,\n visible_layer,\n} from \"src/pcb/properties/layer_ref\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_silkscreen_line = z\n .object({\n type: z.literal(\"pcb_silkscreen_line\"),\n pcb_silkscreen_line_id: getZodPrefixedIdWithDefault(\"pcb_silkscreen_line\"),\n pcb_component_id: z.string(),\n pcb_group_id: z.string().optional(),\n subcircuit_id: z.string().optional(),\n stroke_width: distance.default(\"0.1mm\"),\n x1: distance,\n y1: distance,\n x2: distance,\n y2: distance,\n layer: visible_layer,\n })\n .describe(\"Defines a silkscreen line on the PCB\")\n\nexport type PcbSilkscreenLineInput = z.input<typeof pcb_silkscreen_line>\ntype InferredPcbSilkscreenLine = z.infer<typeof pcb_silkscreen_line>\n\n/**\n * Defines a silkscreen line on the PCB\n */\nexport interface PcbSilkscreenLine {\n type: \"pcb_silkscreen_line\"\n pcb_silkscreen_line_id: string\n pcb_component_id: string\n pcb_group_id?: string\n subcircuit_id?: string\n stroke_width: Distance\n x1: Distance\n y1: Distance\n x2: Distance\n y2: Distance\n layer: VisibleLayer\n}\n\n/**\n * @deprecated use PcbSilkscreenLine\n */\nexport type PCBSilkscreenLine = PcbSilkscreenLine\n\nexpectTypesMatch<PcbSilkscreenLine, InferredPcbSilkscreenLine>(true)\n","import { z } from \"zod\"\nimport { point, type Point, getZodPrefixedIdWithDefault } from \"src/common\"\nimport {\n visible_layer,\n type VisibleLayerRef,\n} from \"src/pcb/properties/layer_ref\"\nimport { length, type Length } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_silkscreen_path = z\n .object({\n type: z.literal(\"pcb_silkscreen_path\"),\n pcb_silkscreen_path_id: getZodPrefixedIdWithDefault(\"pcb_silkscreen_path\"),\n pcb_component_id: z.string(),\n pcb_group_id: z.string().optional(),\n subcircuit_id: z.string().optional(),\n layer: visible_layer,\n route: z.array(point),\n stroke_width: length,\n })\n .describe(\"Defines a silkscreen path on the PCB\")\n\nexport type PcbSilkscreenPathInput = z.input<typeof pcb_silkscreen_path>\ntype InferredPcbSilkscreenPath = z.infer<typeof pcb_silkscreen_path>\n\n/**\n * Defines a silkscreen path on the PCB\n */\nexport interface PcbSilkscreenPath {\n type: \"pcb_silkscreen_path\"\n pcb_silkscreen_path_id: string\n pcb_component_id: string\n pcb_group_id?: string\n subcircuit_id?: string\n layer: VisibleLayerRef\n route: Point[]\n stroke_width: Length\n}\n\n/**\n * @deprecated use PcbSilkscreenPath\n */\nexport type PcbSilkscreenPathDeprecated = PcbSilkscreenPath\n\nexpectTypesMatch<PcbSilkscreenPath, InferredPcbSilkscreenPath>(true)\n","import { z } from \"zod\"\nimport { point, type Point, getZodPrefixedIdWithDefault } from \"src/common\"\nimport { layer_ref, type LayerRef } from \"src/pcb/properties/layer_ref\"\nimport { distance, length, type Length } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\nimport {\n ninePointAnchor,\n type NinePointAnchor,\n} from \"src/common/NinePointAnchor\"\n\nexport const pcb_silkscreen_text = z\n .object({\n type: z.literal(\"pcb_silkscreen_text\"),\n pcb_silkscreen_text_id: getZodPrefixedIdWithDefault(\"pcb_silkscreen_text\"),\n pcb_group_id: z.string().optional(),\n subcircuit_id: z.string().optional(),\n font: z.literal(\"tscircuit2024\").default(\"tscircuit2024\"),\n font_size: distance.default(\"0.2mm\"),\n pcb_component_id: z.string(),\n text: z.string(),\n ccw_rotation: z.number().optional(),\n layer: layer_ref,\n is_mirrored: z.boolean().default(false).optional(),\n anchor_position: point.default({ x: 0, y: 0 }),\n anchor_alignment: ninePointAnchor.default(\"center\"),\n })\n .describe(\"Defines silkscreen text on the PCB\")\n\nexport type PcbSilkscreenTextInput = z.input<typeof pcb_silkscreen_text>\ntype InferredPcbSilkscreenText = z.infer<typeof pcb_silkscreen_text>\n\n/**\n * Defines silkscreen text on the PCB\n */\nexport interface PcbSilkscreenText {\n type: \"pcb_silkscreen_text\"\n pcb_silkscreen_text_id: string\n pcb_group_id?: string\n subcircuit_id?: string\n font: \"tscircuit2024\"\n font_size: Length\n pcb_component_id: string\n text: string\n ccw_rotation?: number\n layer: LayerRef\n is_mirrored?: boolean\n anchor_position: Point\n anchor_alignment: NinePointAnchor\n}\n\n/**\n * @deprecated use PcbSilkscreenText\n */\nexport type PCBSilkscreenText = PcbSilkscreenText\n\nexpectTypesMatch<PcbSilkscreenText, InferredPcbSilkscreenText>(true)\n","import { z } from \"zod\"\nimport { point, type Point, getZodPrefixedIdWithDefault } from \"src/common\"\nimport { layer_ref, type LayerRef } from \"src/pcb/properties/layer_ref\"\nimport { length, type Length } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_silkscreen_rect = z\n .object({\n type: z.literal(\"pcb_silkscreen_rect\"),\n pcb_silkscreen_rect_id: getZodPrefixedIdWithDefault(\"pcb_silkscreen_rect\"),\n pcb_component_id: z.string(),\n pcb_group_id: z.string().optional(),\n subcircuit_id: z.string().optional(),\n center: point,\n width: length,\n height: length,\n layer: layer_ref,\n stroke_width: length.default(\"1mm\"),\n is_filled: z.boolean().default(true).optional(),\n has_stroke: z.boolean().optional(),\n is_stroke_dashed: z.boolean().optional(),\n })\n .describe(\"Defines a silkscreen rect on the PCB\")\n\nexport type PcbSilkscreenRectInput = z.input<typeof pcb_silkscreen_rect>\ntype InferredPcbSilkscreenRect = z.infer<typeof pcb_silkscreen_rect>\n\n/**\n * Defines a silkscreen rect on the PCB\n */\nexport interface PcbSilkscreenRect {\n type: \"pcb_silkscreen_rect\"\n pcb_silkscreen_rect_id: string\n pcb_component_id: string\n pcb_group_id?: string\n subcircuit_id?: string\n center: Point\n width: Length\n height: Length\n layer: LayerRef\n stroke_width: Length\n is_filled?: boolean\n has_stroke?: boolean\n is_stroke_dashed?: boolean\n}\n\n/**\n * @deprecated use PcbSilkscreenRect\n */\nexport type PcbSilkscreenRectOld = PcbSilkscreenRect\n\nexpectTypesMatch<PcbSilkscreenRect, InferredPcbSilkscreenRect>(true)\n","import { z } from \"zod\"\nimport { point, type Point, getZodPrefixedIdWithDefault } from \"src/common\"\nimport {\n layer_ref,\n visible_layer,\n type LayerRef,\n type VisibleLayer,\n} from \"src/pcb/properties/layer_ref\"\nimport { length, type Length } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_silkscreen_circle = z\n .object({\n type: z.literal(\"pcb_silkscreen_circle\"),\n pcb_silkscreen_circle_id: getZodPrefixedIdWithDefault(\n \"pcb_silkscreen_circle\",\n ),\n pcb_component_id: z.string(),\n pcb_group_id: z.string().optional(),\n subcircuit_id: z.string().optional(),\n center: point,\n radius: length,\n layer: visible_layer,\n stroke_width: length.default(\"1mm\"),\n })\n .describe(\"Defines a silkscreen circle on the PCB\")\n\nexport type PcbSilkscreenCircleInput = z.input<typeof pcb_silkscreen_circle>\ntype InferredPcbSilkscreenCircle = z.infer<typeof pcb_silkscreen_circle>\n\n/**\n * Defines a silkscreen circle on the PCB\n */\nexport interface PcbSilkscreenCircle {\n type: \"pcb_silkscreen_circle\"\n pcb_silkscreen_circle_id: string\n pcb_component_id: string\n pcb_group_id?: string\n subcircuit_id?: string\n center: Point\n radius: Length\n layer: VisibleLayer\n stroke_width: Length\n}\n\nexpectTypesMatch<PcbSilkscreenCircle, InferredPcbSilkscreenCircle>(true)\n","import { z } from \"zod\"\nimport { point, type Point, getZodPrefixedIdWithDefault } from \"src/common\"\nimport {\n layer_ref,\n type LayerRef,\n visible_layer,\n type VisibleLayer,\n} from \"src/pcb/properties/layer_ref\"\nimport { distance, type Distance } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_silkscreen_oval = z\n .object({\n type: z.literal(\"pcb_silkscreen_oval\"),\n pcb_silkscreen_oval_id: getZodPrefixedIdWithDefault(\"pcb_silkscreen_oval\"),\n pcb_component_id: z.string(),\n pcb_group_id: z.string().optional(),\n subcircuit_id: z.string().optional(),\n center: point,\n radius_x: distance,\n radius_y: distance,\n layer: visible_layer,\n })\n .describe(\"Defines a silkscreen oval on the PCB\")\n\nexport type PcbSilkscreenOvalInput = z.input<typeof pcb_silkscreen_oval>\ntype InferredPcbSilkscreenOval = z.infer<typeof pcb_silkscreen_oval>\n\n/**\n * Defines a silkscreen oval on the PCB\n */\nexport interface PcbSilkscreenOval {\n type: \"pcb_silkscreen_oval\"\n pcb_silkscreen_oval_id: string\n pcb_component_id: string\n pcb_group_id?: string\n subcircuit_id?: string\n center: Point\n radius_x: Distance\n radius_y: Distance\n layer: VisibleLayer\n}\n\n/**\n * @deprecated use PcbSilkscreenOval\n */\nexport type PcbSilkscreenOvalDeprecated = PcbSilkscreenOval\n\nexpectTypesMatch<PcbSilkscreenOval, InferredPcbSilkscreenOval>(true)\n","import { z } from \"zod\"\nimport { point, type Point } from \"src/common\"\nimport { distance, type Length } from \"src/units\"\nimport {\n visible_layer,\n type LayerRef,\n type VisibleLayer,\n} from \"src/pcb/properties/layer_ref\"\nimport { getZodPrefixedIdWithDefault } from \"src/common/getZodPrefixedIdWithDefault\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_fabrication_note_text = z\n .object({\n type: z.literal(\"pcb_fabrication_note_text\"),\n pcb_fabrication_note_text_id: getZodPrefixedIdWithDefault(\n \"pcb_fabrication_note_text\",\n ),\n subcircuit_id: z.string().optional(),\n pcb_group_id: z.string().optional(),\n font: z.literal(\"tscircuit2024\").default(\"tscircuit2024\"),\n font_size: distance.default(\"1mm\"),\n pcb_component_id: z.string(),\n text: z.string(),\n layer: visible_layer,\n anchor_position: point.default({ x: 0, y: 0 }),\n anchor_alignment: z\n .enum([\"center\", \"top_left\", \"top_right\", \"bottom_left\", \"bottom_right\"])\n .default(\"center\"),\n color: z.string().optional(),\n })\n .describe(\n \"Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators\",\n )\n\nexport type PcbFabricationNoteTextInput = z.input<\n typeof pcb_fabrication_note_text\n>\ntype InferredPcbFabricationNoteText = z.infer<typeof pcb_fabrication_note_text>\n\n/**\n * Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators\n */\nexport interface PcbFabricationNoteText {\n type: \"pcb_fabrication_note_text\"\n pcb_fabrication_note_text_id: string\n subcircuit_id?: string\n pcb_group_id?: string\n font: \"tscircuit2024\"\n font_size: Length\n pcb_component_id: string\n text: string\n layer: VisibleLayer\n anchor_position: Point\n anchor_alignment:\n | \"center\"\n | \"top_left\"\n | \"top_right\"\n | \"bottom_left\"\n | \"bottom_right\"\n color?: string\n}\n\n/**\n * @deprecated use PcbFabricationNoteText\n */\nexport type PCBFabricationNoteText = PcbFabricationNoteText\n\nexpectTypesMatch<PcbFabricationNoteText, InferredPcbFabricationNoteText>(true)\n","import { z } from \"zod\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport {\n layer_ref,\n visible_layer,\n type LayerRef,\n} from \"src/pcb/properties/layer_ref\"\nimport { point, type Point } from \"src/common\"\nimport { length, type Length } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_fabrication_note_path = z\n .object({\n type: z.literal(\"pcb_fabrication_note_path\"),\n pcb_fabrication_note_path_id: getZodPrefixedIdWithDefault(\n \"pcb_fabrication_note_path\",\n ),\n pcb_component_id: z.string(),\n subcircuit_id: z.string().optional(),\n layer: layer_ref,\n route: z.array(point),\n stroke_width: length,\n color: z.string().optional(),\n })\n .describe(\n \"Defines a fabrication path on the PCB for fabricators or assemblers\",\n )\n\nexport type PcbFabricationNotePathInput = z.input<\n typeof pcb_fabrication_note_path\n>\ntype InferredPcbFabricationNotePath = z.infer<typeof pcb_fabrication_note_path>\n\n/**\n * Defines a fabrication path on the PCB for fabricators or assemblers\n */\nexport interface PcbFabricationNotePath {\n type: \"pcb_fabrication_note_path\"\n pcb_fabrication_note_path_id: string\n pcb_component_id: string\n subcircuit_id?: string\n layer: LayerRef\n route: Point[]\n stroke_width: Length\n color?: string\n}\n\n/**\n * @deprecated use PcbFabricationNotePath\n */\nexport type PCBFabricationNotePath = PcbFabricationNotePath\n\nexpectTypesMatch<PcbFabricationNotePath, InferredPcbFabricationNotePath>(true)\n","import { z } from \"zod\"\nimport { point } from \"../common\"\nimport { distance } from \"../units\"\n\nexport const pcb_keepout = z\n .object({\n type: z.literal(\"pcb_keepout\"),\n shape: z.literal(\"rect\"),\n pcb_group_id: z.string().optional(),\n subcircuit_id: z.string().optional(),\n center: point,\n width: distance,\n height: distance,\n pcb_keepout_id: z.string(),\n layers: z.array(z.string()), // Specify layers where the keepout applies\n description: z.string().optional(), // Optional description of the keepout\n })\n .or(\n z.object({\n type: z.literal(\"pcb_keepout\"),\n shape: z.literal(\"circle\"),\n pcb_group_id: z.string().optional(),\n subcircuit_id: z.string().optional(),\n center: point,\n radius: distance,\n pcb_keepout_id: z.string(),\n layers: z.array(z.string()), // Specify layers where the keepout applies\n description: z.string().optional(), // Optional description of the keepout\n }),\n )\n\nexport type PCBKeepoutInput = z.input<typeof pcb_keepout>\nexport type PCBKeepout = z.infer<typeof pcb_keepout>\n","import { z } from \"zod\"\nimport { point, type Point, getZodPrefixedIdWithDefault } from \"src/common\"\nimport { length, type Length, rotation, type Rotation } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\n// Common properties base for all cutout shapes (internal)\nconst pcb_cutout_base = z.object({\n type: z.literal(\"pcb_cutout\"),\n pcb_cutout_id: getZodPrefixedIdWithDefault(\"pcb_cutout\"),\n pcb_group_id: z.string().optional(),\n subcircuit_id: z.string().optional(),\n})\n\n// Rectangular Cutout\nexport const pcb_cutout_rect = pcb_cutout_base.extend({\n shape: z.literal(\"rect\"),\n center: point,\n width: length,\n height: length,\n rotation: rotation.optional(),\n})\nexport type PcbCutoutRectInput = z.input<typeof pcb_cutout_rect>\ntype InferredPcbCutoutRect = z.infer<typeof pcb_cutout_rect>\n/**\n * Defines a rectangular cutout on the PCB.\n */\nexport interface PcbCutoutRect {\n type: \"pcb_cutout\"\n pcb_cutout_id: string\n pcb_group_id?: string\n subcircuit_id?: string\n shape: \"rect\"\n center: Point\n width: Length\n height: Length\n rotation?: Rotation\n}\nexpectTypesMatch<PcbCutoutRect, InferredPcbCutoutRect>(true)\n\n// Circular Cutout\nexport const pcb_cutout_circle = pcb_cutout_base.extend({\n shape: z.literal(\"circle\"),\n center: point,\n radius: length,\n})\nexport type PcbCutoutCircleInput = z.input<typeof pcb_cutout_circle>\ntype InferredPcbCutoutCircle = z.infer<typeof pcb_cutout_circle>\n/**\n * Defines a circular cutout on the PCB.\n */\nexport interface PcbCutoutCircle {\n type: \"pcb_cutout\"\n pcb_cutout_id: string\n pcb_group_id?: string\n subcircuit_id?: string\n shape: \"circle\"\n center: Point\n radius: Length\n}\nexpectTypesMatch<PcbCutoutCircle, InferredPcbCutoutCircle>(true)\n\n// Polygon Cutout\nexport const pcb_cutout_polygon = pcb_cutout_base.extend({\n shape: z.literal(\"polygon\"),\n points: z.array(point),\n})\nexport type PcbCutoutPolygonInput = z.input<typeof pcb_cutout_polygon>\ntype InferredPcbCutoutPolygon = z.infer<typeof pcb_cutout_polygon>\n/**\n * Defines a polygonal cutout on the PCB, specified by a list of points.\n * The polygon should be closed (the last point implicitly connects to the first).\n */\nexport interface PcbCutoutPolygon {\n type: \"pcb_cutout\"\n pcb_cutout_id: string\n pcb_group_id?: string\n subcircuit_id?: string\n shape: \"polygon\"\n points: Point[]\n}\nexpectTypesMatch<PcbCutoutPolygon, InferredPcbCutoutPolygon>(true)\n\n// Union of all cutout shapes\nexport const pcb_cutout = z\n .discriminatedUnion(\"shape\", [\n pcb_cutout_rect,\n pcb_cutout_circle,\n pcb_cutout_polygon,\n ])\n .describe(\"Defines a cutout on the PCB, removing board material.\")\n\nexport type PcbCutoutInput = z.input<typeof pcb_cutout>\nexport type PcbCutout = PcbCutoutRect | PcbCutoutCircle | PcbCutoutPolygon\n\ntype InferredPcbCutout = z.infer<typeof pcb_cutout>\nexpectTypesMatch<PcbCutout, InferredPcbCutout>(true)\n","import { z } from \"zod\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_missing_footprint_error = z\n .object({\n type: z.literal(\"pcb_missing_footprint_error\"),\n pcb_missing_footprint_error_id: getZodPrefixedIdWithDefault(\n \"pcb_missing_footprint_error\",\n ),\n pcb_group_id: z.string().optional(),\n subcircuit_id: z.string().optional(),\n error_type: z.literal(\"pcb_missing_footprint_error\"),\n source_component_id: z.string(),\n message: z.string(),\n })\n .describe(\"Defines a missing footprint error on the PCB\")\n\nexport type PcbMissingFootprintErrorInput = z.input<\n typeof pcb_missing_footprint_error\n>\ntype InferredPcbMissingFootprintError = z.infer<\n typeof pcb_missing_footprint_error\n>\n\n/**\n * Defines a placement error on the PCB\n */\nexport interface PcbMissingFootprintError {\n type: \"pcb_missing_footprint_error\"\n pcb_missing_footprint_error_id: string\n pcb_group_id?: string\n subcircuit_id?: string\n error_type: \"pcb_missing_footprint_error\"\n source_component_id: string\n message: string\n}\n\n/**\n * @deprecated use PcbMissingFootprintError\n */\nexport type PCBMissingFootprintError = PcbMissingFootprintError\n\nexpectTypesMatch<PcbMissingFootprintError, InferredPcbMissingFootprintError>(\n true,\n)\n","import { z } from \"zod\"\nimport { point, type Point, getZodPrefixedIdWithDefault } from \"src/common\"\nimport { length, type Length } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_group = z\n .object({\n type: z.literal(\"pcb_group\"),\n pcb_group_id: getZodPrefixedIdWithDefault(\"pcb_group\"),\n source_group_id: z.string(),\n is_subcircuit: z.boolean().optional(),\n subcircuit_id: z.string().optional(),\n width: length,\n height: length,\n center: point,\n pcb_component_ids: z.array(z.string()),\n name: z.string().optional(),\n description: z.string().optional(),\n })\n .describe(\"Defines a group of components on the PCB\")\n\nexport type PcbGroupInput = z.input<typeof pcb_group>\ntype InferredPcbGroup = z.infer<typeof pcb_group>\n\n/**\n * Defines a group of components on the PCB\n */\nexport interface PcbGroup {\n type: \"pcb_group\"\n pcb_group_id: string\n source_group_id: string\n is_subcircuit?: boolean\n subcircuit_id?: string\n width: Length\n height: Length\n center: Point\n pcb_component_ids: string[]\n name?: string\n description?: string\n}\n\nexpectTypesMatch<PcbGroup, InferredPcbGroup>(true)\n","import { z } from \"zod\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_autorouting_error = z\n .object({\n type: z.literal(\"pcb_autorouting_error\"),\n pcb_error_id: getZodPrefixedIdWithDefault(\"pcb_autorouting_error\"),\n message: z.string(),\n })\n .describe(\"The autorouting has failed to route a portion of the board\")\n\nexport type PcbAutoroutingErrorInput = z.input<typeof pcb_autorouting_error>\ntype PcbInferredAutoroutingError = z.infer<typeof pcb_autorouting_error>\n\nexport interface PcbAutoroutingErrorInterface {\n type: \"pcb_autorouting_error\"\n pcb_error_id: string\n message: string\n}\n\nexport type PcbAutoroutingError = PcbAutoroutingErrorInterface\n\nexpectTypesMatch<PcbAutoroutingError, PcbInferredAutoroutingError>(true)\n","import { z } from \"zod\"\nimport { getZodPrefixedIdWithDefault } from \"../common\"\nimport { expectTypesMatch } from \"../utils/expect-types-match\"\n\nexport const pcb_manual_edit_conflict_warning = z\n .object({\n type: z.literal(\"pcb_manual_edit_conflict_warning\"),\n pcb_manual_edit_conflict_warning_id: getZodPrefixedIdWithDefault(\n \"pcb_manual_edit_conflict_warning\",\n ),\n message: z.string(),\n pcb_component_id: z.string(),\n pcb_group_id: z.string().optional(),\n subcircuit_id: z.string().optional(),\n source_component_id: z.string(),\n })\n .describe(\n \"Warning emitted when a component has both manual placement and explicit pcbX/pcbY coordinates\",\n )\n\nexport type PcbManualEditConflictWarningInput = z.input<\n typeof pcb_manual_edit_conflict_warning\n>\ntype InferredPcbManualEditConflictWarning = z.infer<\n typeof pcb_manual_edit_conflict_warning\n>\n\n/**\n * Warning emitted when a component has both manual placement (via manualEdits) and explicit pcbX/pcbY coordinates\n */\nexport interface PcbManualEditConflictWarning {\n type: \"pcb_manual_edit_conflict_warning\"\n pcb_manual_edit_conflict_warning_id: string\n message: string\n pcb_component_id: string\n pcb_group_id?: string\n subcircuit_id?: string\n source_component_id: string\n}\n\nexpectTypesMatch<\n PcbManualEditConflictWarning,\n InferredPcbManualEditConflictWarning\n>(true)\n","import { z } from \"zod\"\nimport { point3 } from \"../common\"\nimport { rotation, length } from \"../units\"\nimport { layer_ref } from \"src/pcb\"\n\nexport const cad_component = z\n .object({\n type: z.literal(\"cad_component\"),\n cad_component_id: z.string(),\n pcb_component_id: z.string(),\n source_component_id: z.string(),\n position: point3,\n rotation: point3.optional(),\n size: point3.optional(),\n layer: layer_ref.optional(),\n\n // These are all ways to generate/load the 3d model\n footprinter_string: z.string().optional(),\n model_obj_url: z.string().optional(),\n model_stl_url: z.string().optional(),\n model_3mf_url: z.string().optional(),\n model_jscad: z.any().optional(),\n })\n .describe(\"Defines a component on the PCB\")\n\nexport type CadComponentInput = z.input<typeof cad_component>\nexport type CadComponent = z.infer<typeof cad_component>\n","import { z } from \"zod\"\nimport * as pcb from \"./pcb\"\nimport * as sch from \"./schematic\"\nimport * as src from \"./source\"\nimport * as cad from \"./cad\"\nimport {\n expectStringUnionsMatch,\n expectTypesMatch,\n} from \"./utils/expect-types-match\"\n\nexport const any_circuit_element = z.union([\n // TODO source_config\n // TODO pcb_config\n // TODO schematic_config\n // TODO schematic_group\n src.source_trace,\n src.source_port,\n src.any_source_component,\n src.source_net,\n src.source_group,\n src.source_simple_bug,\n src.source_simple_chip,\n src.source_simple_capacitor,\n src.source_simple_diode,\n src.source_simple_led,\n src.source_simple_resistor,\n src.source_simple_power_source,\n src.source_simple_battery,\n src.source_simple_inductor,\n src.source_simple_pin_header,\n src.source_simple_resonator,\n src.source_simple_switch,\n src.source_simple_transistor,\n src.source_simple_test_point,\n src.source_simple_mosfet,\n src.source_simple_potentiometer,\n src.source_simple_push_button,\n src.source_project_metadata,\n pcb.pcb_component,\n pcb.pcb_hole,\n pcb.pcb_missing_footprint_error,\n pcb.pcb_manual_edit_conflict_warning,\n pcb.pcb_plated_hole,\n pcb.pcb_keepout,\n pcb.pcb_port,\n pcb.pcb_text,\n pcb.pcb_trace,\n pcb.pcb_via,\n pcb.pcb_smtpad,\n pcb.pcb_solder_paste,\n pcb.pcb_board,\n pcb.pcb_group,\n pcb.pcb_trace_hint,\n pcb.pcb_silkscreen_line,\n pcb.pcb_silkscreen_path,\n pcb.pcb_silkscreen_text,\n pcb.pcb_silkscreen_rect,\n pcb.pcb_silkscreen_circle,\n pcb.pcb_silkscreen_oval,\n pcb.pcb_trace_error,\n pcb.pcb_placement_error,\n pcb.pcb_port_not_matched_error,\n pcb.pcb_fabrication_note_path,\n pcb.pcb_fabrication_note_text,\n pcb.pcb_autorouting_error,\n pcb.pcb_cutout,\n sch.schematic_box,\n sch.schematic_text,\n sch.schematic_line,\n sch.schematic_component,\n sch.schematic_port,\n sch.schematic_trace,\n sch.schematic_path,\n sch.schematic_error,\n sch.schematic_layout_error,\n sch.schematic_net_label,\n sch.schematic_debug_object,\n sch.schematic_voltage_probe,\n sch.schematic_manual_edit_conflict_warning,\n sch.schematic_group,\n cad.cad_component,\n])\n\n/**\n * @deprecated use any_circuit_element instead\n */\nexport const any_soup_element = any_circuit_element\n\nexport type AnyCircuitElement = z.infer<typeof any_circuit_element>\nexport type AnyCircuitElementInput = z.input<typeof any_circuit_element>\n/**\n * @deprecated use AnyCircuitElement instead\n */\nexport type AnySoupElement = AnyCircuitElement\n\n/**\n * @deprecated use AnyCircuitElementInput instead\n */\nexport type AnySoupElementInput = AnyCircuitElementInput\n\n/**\n * Type representing a complete Circuit JSON document, which is an array of circuit elements.\n * This is the primary type used when working with circuit-json files or API responses.\n */\nexport type CircuitJson = AnyCircuitElement[]\n\n// ------------------- SAFETY CHECKS -------------------\n\n// SAFETY CHECK: Every element has a type\nexpectTypesMatch<\n AnyCircuitElement extends { type: string } ? AnyCircuitElement : never,\n AnyCircuitElement\n>(true)\n\n// SAFETY CHECK: Every element has an id with the key name `${type}_id`\ntype FindMissingId<T extends AnyCircuitElement> = T extends {\n type: infer U extends string\n}\n ? T extends { [K in `${U}_id`]: infer V }\n ? V extends string\n ? never\n : `${U} DOES NOT HAVE AN ${U}_id PROPERTY`\n : `${U} DOES NOT HAVE AN ${U}_id PROPERTY`\n : never\n\nexpectStringUnionsMatch<\n FindMissingId<AnyCircuitElement>,\n // EXCEPTIONS TO THE RULE\n // THIS IS FOR LEGACY REASONS, DO NOT ADD MORE EXCEPTIONS\n | \"source_project_metadata DOES NOT HAVE AN source_project_metadata_id PROPERTY\"\n | \"pcb_port_not_matched_error DOES NOT HAVE AN pcb_port_not_matched_error_id PROPERTY\"\n | \"pcb_autorouting_error DOES NOT HAVE AN pcb_autorouting_error_id PROPERTY\"\n | \"schematic_debug_object DOES NOT HAVE AN schematic_debug_object_id PROPERTY\"\n | \"schematic_box DOES NOT HAVE AN schematic_box_id PROPERTY\"\n | \"schematic_line DOES NOT HAVE AN schematic_line_id PROPERTY\"\n | \"schematic_path DOES NOT HAVE AN schematic_path_id PROPERTY\"\n>(true)\n"],"mappings":";AAKA,IAAM,eAGF;AAAA,EACF,IAAI;AAAA,IACF,UAAU;AAAA,IACV,UAAU;AAAA,MACR,KAAK;AAAA,MACL,KAAK;AAAA,MACL,IAAI;AAAA,IACN;AAAA,EACF;AAAA,EACA,GAAG;AAAA,IACD,UAAU;AAAA,IACV,UAAU;AAAA,MACR,IAAI;AAAA,MACJ,GAAG;AAAA,IACL;AAAA,EACF;AAAA,EACA,QAAG;AAAA,IACD,UAAU;AAAA,IACV,UAAU;AAAA,MACR,SAAI;AAAA,MACJ,QAAG;AAAA,MACH,SAAI;AAAA,MACJ,SAAI;AAAA,MACJ,MAAM;AAAA,MACN,SAAI;AAAA,MACJ,SAAI;AAAA,MACJ,SAAI;AAAA,IACN;AAAA,EACF;AAAA,EACA,GAAG;AAAA,IACD,UAAU;AAAA,IACV,UAAU;AAAA,MACR,IAAI;AAAA,MACJ,GAAG;AAAA,MACH,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IACN;AAAA,EACF;AAAA,EACA,GAAG;AAAA,IACD,UAAU;AAAA,IACV,UAAU;AAAA,MACR,SAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,GAAG;AAAA,MACH,IAAI;AAAA,MACJ,IAAI;AAAA,IACN;AAAA,EACF;AAAA,EACA,GAAG;AAAA,IACD,UAAU;AAAA,IACV,UAAU;AAAA,MACR,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,SAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,GAAG;AAAA,IACL;AAAA,EACF;AAAA,EACA,IAAI;AAAA,IACF,UAAU;AAAA,IACV,U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AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACN,CAAC;AAKM,IAAM,mBAAmB;AAuBhC,iBAGE,IAAI;AAaN,wBAWE,IAAI;","names":["z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z"]}
1
+ {"version":3,"sources":["../src/utils/convert-si-unit-to-number.ts","../src/units/index.ts","../src/common/point.ts","../src/common/point3.ts","../src/common/size.ts","../src/common/getZodPrefixedIdWithDefault.ts","../src/source/source_simple_capacitor.ts","../src/pcb/properties/supplier_name.ts","../src/utils/expect-types-match.ts","../src/source/base/source_component_base.ts","../src/source/source_simple_resistor.ts","../src/source/source_simple_diode.ts","../src/source/source_simple_led.ts","../src/source/source_simple_ground.ts","../src/source/source_simple_bug.ts","../src/source/source_simple_chip.ts","../src/source/source_simple_power_source.ts","../src/source/any_source_component.ts","../src/source/source_simple_fuse.ts","../src/source/source_simple_battery.ts","../src/source/source_simple_inductor.ts","../src/source/source_simple_push_button.ts","../src/source/source_simple_potentiometer.ts","../src/source/source_simple_crystal.ts","../src/source/source_simple_pin_header.ts","../src/source/source_simple_resonator.ts","../src/source/source_simple_transistor.ts","../src/source/source_simple_test_point.ts","../src/source/source_simple_mosfet.ts","../src/source/source_simple_switch.ts","../src/source/source_project_metadata.ts","../src/source/source_missing_property_error.ts","../src/source/source_failed_to_create_component_error.ts","../src/source/source_port.ts","../src/source/source_trace.ts","../src/source/source_group.ts","../src/source/source_net.ts","../src/schematic/schematic_box.ts","../src/schematic/schematic_path.ts","../src/schematic/schematic_component.ts","../src/schematic/schematic_line.ts","../src/schematic/schematic_trace.ts","../src/schematic/schematic_text.ts","../src/common/NinePointAnchor.ts","../src/common/FivePointAnchor.ts","../src/schematic/schematic_port.ts","../src/schematic/schematic_net_label.ts","../src/schematic/schematic_error.ts","../src/schematic/schematic_layout_error.ts","../src/schematic/schematic_debug_object.ts","../src/schematic/schematic_voltage_probe.ts","../src/schematic/schematic_manual_edit_conflict_warning.ts","../src/schematic/schematic_group.ts","../src/pcb/properties/layer_ref.ts","../src/pcb/properties/pcb_route_hints.ts","../src/pcb/properties/route_hint_point.ts","../src/pcb/pcb_component.ts","../src/pcb/pcb_hole.ts","../src/pcb/pcb_plated_hole.ts","../src/pcb/pcb_port.ts","../src/pcb/pcb_smtpad.ts","../src/pcb/pcb_solder_paste.ts","../src/pcb/pcb_text.ts","../src/pcb/pcb_trace.ts","../src/pcb/pcb_trace_error.ts","../src/pcb/pcb_port_not_matched_error.ts","../src/pcb/pcb_via.ts","../src/pcb/pcb_board.ts","../src/pcb/pcb_placement_error.ts","../src/pcb/pcb_trace_hint.ts","../src/pcb/pcb_silkscreen_line.ts","../src/pcb/pcb_silkscreen_path.ts","../src/pcb/pcb_silkscreen_text.ts","../src/pcb/pcb_silkscreen_rect.ts","../src/pcb/pcb_silkscreen_circle.ts","../src/pcb/pcb_silkscreen_oval.ts","../src/pcb/pcb_fabrication_note_text.ts","../src/pcb/pcb_fabrication_note_path.ts","../src/pcb/pcb_keepout.ts","../src/pcb/pcb_cutout.ts","../src/pcb/pcb_missing_footprint_error.ts","../src/pcb/pcb_group.ts","../src/pcb/pcb_autorouting_error.ts","../src/pcb/pcb_manual_edit_conflict_warning.ts","../src/pcb/pcb_breakout_point.ts","../src/cad/cad_component.ts","../src/any_circuit_element.ts"],"sourcesContent":["type UnitInfo = {\n baseUnit: BaseTscircuitUnit\n conversionFactor: number\n}\n\nconst unitMappings: Record<\n string,\n { baseUnit: BaseTscircuitUnit; variants: Record<string, number> }\n> = {\n Hz: {\n baseUnit: \"Hz\",\n variants: {\n MHz: 1e6,\n kHz: 1e3,\n Hz: 1,\n },\n },\n g: {\n baseUnit: \"g\",\n variants: {\n kg: 1e3,\n g: 1,\n },\n },\n Ω: {\n baseUnit: \"Ω\",\n variants: {\n mΩ: 1e-3,\n Ω: 1,\n kΩ: 1e3,\n KΩ: 1e3,\n kohm: 1e3,\n MΩ: 1e6,\n GΩ: 1e9,\n TΩ: 1e12,\n },\n },\n V: {\n baseUnit: \"V\",\n variants: {\n mV: 1e-3,\n V: 1,\n kV: 1e3,\n KV: 1e3,\n MV: 1e6,\n GV: 1e9,\n TV: 1e12,\n },\n },\n A: {\n baseUnit: \"A\",\n variants: {\n µA: 1e-6,\n mA: 1e-3,\n ma: 1e-3,\n A: 1,\n kA: 1e3,\n MA: 1e6,\n },\n },\n F: {\n baseUnit: \"F\",\n variants: {\n pF: 1e-12,\n nF: 1e-9,\n µF: 1e-6,\n uF: 1e-6,\n mF: 1e-3,\n F: 1,\n },\n },\n ml: {\n baseUnit: \"ml\",\n variants: {\n ml: 1,\n mL: 1,\n l: 1e3,\n L: 1e3,\n },\n },\n deg: {\n baseUnit: \"deg\",\n variants: {\n rad: 180 / Math.PI,\n },\n },\n ms: {\n baseUnit: \"ms\",\n variants: {\n s: 1000,\n },\n },\n mm: {\n baseUnit: \"mm\",\n variants: {\n nm: 1e-6,\n µm: 1e-3,\n um: 1e-3,\n mm: 1,\n cm: 10,\n dm: 100,\n m: 1000,\n km: 1e6,\n in: 25.4,\n ft: 304.8,\n IN: 25.4,\n FT: 304.8,\n yd: 914.4,\n mi: 1.609344e6,\n mil: 0.0254,\n },\n },\n}\n\nconst unitMappingAndVariantSuffixes = new Set()\nfor (const [baseUnit, info] of Object.entries(unitMappings)) {\n unitMappingAndVariantSuffixes.add(baseUnit)\n for (const variant of Object.keys(info.variants)) {\n unitMappingAndVariantSuffixes.add(variant)\n }\n}\n\nfunction getBaseTscircuitUnit(unit: string): UnitInfo {\n for (const [baseUnit, info] of Object.entries(unitMappings)) {\n if (unit in info.variants) {\n return {\n baseUnit: info.baseUnit,\n conversionFactor: info.variants[unit]!,\n }\n }\n }\n return {\n baseUnit: unit as BaseTscircuitUnit,\n conversionFactor: 1,\n }\n}\n\nconst si_prefix_multiplier = {\n tera: 1e12,\n T: 1e12,\n giga: 1e9,\n G: 1e9,\n mega: 1e6,\n M: 1e6,\n kilo: 1e3,\n k: 1e3,\n deci: 1e-1,\n d: 1e-1,\n centi: 1e-2,\n c: 1e-2,\n milli: 1e-3,\n m: 1e-3,\n micro: 1e-6,\n u: 1e-6,\n µ: 1e-6,\n nano: 1e-9,\n n: 1e-9,\n pico: 1e-12,\n p: 1e-12,\n}\ntype BaseTscircuitUnit =\n | \"ms\"\n | \"mm\"\n | \"g\"\n | \"deg\"\n | \"Hz\"\n | \"ml\"\n | \"V\"\n | \"A\"\n | \"Ω\"\n | \"F\"\n | \"H\"\n\nexport const parseAndConvertSiUnit = <\n T extends\n | string\n | number\n | undefined\n | { x: string | number; y: string | number },\n>(\n v: T,\n): {\n parsedUnit: string | null\n unitOfValue: BaseTscircuitUnit | null\n value: T extends { x: string | number; y: string | number }\n ? null | { x: number; y: number }\n : null | number\n} => {\n if (typeof v === \"undefined\")\n return { parsedUnit: null, unitOfValue: null, value: null }\n if (typeof v === \"string\" && v.match(/^-?[\\d\\.]+$/))\n return {\n value: Number.parseFloat(v) as any,\n parsedUnit: null,\n unitOfValue: null,\n }\n if (typeof v === \"number\")\n return { value: v as any, parsedUnit: null, unitOfValue: null }\n if (typeof v === \"object\" && \"x\" in v && \"y\" in v) {\n const { parsedUnit, unitOfValue } = parseAndConvertSiUnit(v.x)\n return {\n parsedUnit: parsedUnit,\n unitOfValue: unitOfValue,\n value: {\n x: parseAndConvertSiUnit(v.x as any).value as number,\n y: parseAndConvertSiUnit(v.y as any).value as number,\n } as any,\n }\n }\n const reversed_input_string = v.toString().split(\"\").reverse().join(\"\")\n const unit_reversed = reversed_input_string.match(/[^\\d\\s]+/)?.[0]\n if (!unit_reversed) {\n throw new Error(`Could not determine unit: \"${v}\"`)\n }\n const unit = unit_reversed.split(\"\").reverse().join(\"\")\n\n const numberPart = v.slice(0, -unit.length)\n if (\n unit in si_prefix_multiplier &&\n !unitMappingAndVariantSuffixes.has(unit)\n ) {\n const siMultiplier =\n si_prefix_multiplier[unit as keyof typeof si_prefix_multiplier]\n return {\n parsedUnit: null,\n unitOfValue: null,\n value: (Number.parseFloat(numberPart) * siMultiplier) as any,\n }\n }\n\n const { baseUnit, conversionFactor } = getBaseTscircuitUnit(unit)\n\n return {\n parsedUnit: unit,\n unitOfValue: baseUnit,\n value: (conversionFactor * Number.parseFloat(numberPart)) as any,\n }\n}\n","import { parseAndConvertSiUnit } from \"src/utils/convert-si-unit-to-number\"\nimport { z } from \"zod\"\n\n// // Currently, removing uncommon SI Prefixes for type simplicity.\n// export type SIPrefix =\n// // | \"y\"\n// // | \"yocto\"\n// // | \"z\"\n// // | \"zepto\"\n// // | \"atto\"\n// // | \"a\"\n// | \"femto\"\n// | \"f\"\n// | \"u\"\n// | \"micro\"\n// // | \"d\"\n// // | \"deci\"\n// | \"c\"\n// | \"centi\"\n// | \"m\"\n// | \"milli\"\n// | \"k\"\n// | \"kilo\"\n// | \"M\"\n// | \"mega\"\n// // | \"G\"\n// // | \"T\"\n// // | \"P\"\n// // | \"E\"\n// // | \"Z\"\n// // | \"Y\"\n\n// export type UnitAbbreviations = {\n// farad: \"F\"\n// ohm: \"Ω\"\n// henry: \"H\"\n// meter: \"m\"\n// volt: \"V\"\n// inch: \"in\"\n// foot: \"ft\"\n// }\n\n// export type Unit = keyof UnitAbbreviations\n// export type NumberWithUnit<T extends Unit> =\n// | `${number}${T | UnitAbbreviations[T]}`\n// | `${number} ${T | UnitAbbreviations[T]}`\n// | `${number}${SIPrefix}${T | UnitAbbreviations[T]}`\n// | `${number} ${SIPrefix}${T | UnitAbbreviations[T]}`\n// export type NumberWithAnyUnit =\n// | `${number}${UnitOrAbbreviation}`\n// | `${number} ${UnitOrAbbreviation}`\n// | `${number}${SIPrefix}${UnitOrAbbreviation}`\n// | `${number} ${SIPrefix}${UnitOrAbbreviation}`\n\n// TODO lots of validation to make sure the unit is valid etc.\nexport const resistance = z\n .string()\n .or(z.number())\n .transform((v) => parseAndConvertSiUnit(v).value!)\n\nexport const capacitance = z\n .string()\n .or(z.number())\n .transform((v) => parseAndConvertSiUnit(v).value!)\n .transform((value) => {\n return Number.parseFloat(value.toPrecision(12)) // Round to 12 significant digits\n })\n\nexport const inductance = z\n .string()\n .or(z.number())\n .transform((v) => parseAndConvertSiUnit(v).value!)\n\nexport const voltage = z\n .string()\n .or(z.number())\n .transform((v) => parseAndConvertSiUnit(v).value!)\n\nexport const length = z\n .string()\n .or(z.number())\n .transform((v) => parseAndConvertSiUnit(v).value!)\n\nexport const frequency = z\n .string()\n .or(z.number())\n .transform((v) => parseAndConvertSiUnit(v).value!)\n\n/**\n * Length in meters\n */\nexport type Length = number\nexport type Distance = number\n\nexport const distance = length\n\nexport const current = z\n .string()\n .or(z.number())\n .transform((v) => parseAndConvertSiUnit(v).value!)\n\nexport const time = z\n .string()\n .or(z.number())\n .transform((v) => parseAndConvertSiUnit(v).value!)\n\n/**\n * Rotation is always converted to degrees\n */\nexport const rotation = z\n .string()\n .or(z.number())\n .transform((arg): number => {\n if (typeof arg === \"number\") return arg\n if (arg.endsWith(\"deg\")) {\n return Number.parseFloat(arg.split(\"deg\")[0]!)\n }\n if (arg.endsWith(\"rad\")) {\n return (Number.parseFloat(arg.split(\"rad\")[0]!) * 180) / Math.PI\n }\n return Number.parseFloat(arg)\n })\n\nexport const battery_capacity = z\n .number()\n .or(z.string().endsWith(\"mAh\"))\n .transform((v) => {\n if (typeof v === \"string\") {\n const valString = v.replace(\"mAh\", \"\")\n const num = Number.parseFloat(valString)\n if (Number.isNaN(num)) {\n throw new Error(\"Invalid capacity\")\n }\n return num\n }\n return v\n })\n .describe(\"Battery capacity in mAh\")\n\nexport type InputRotation = number | string\nexport type Rotation = number\n","import { z } from \"zod\"\nimport { distance } from \"../units\"\n\nexport const point = z.object({\n x: distance,\n y: distance,\n})\n\nexport const position = point\n\nexport type Point = z.infer<typeof point>\nexport type InputPoint = z.input<typeof point>\nexport type InputPosition = z.input<typeof position>\nexport type Position = z.infer<typeof position>\n","import { z } from \"zod\"\nimport { distance } from \"../units\"\n\nexport const point3 = z.object({\n x: distance,\n y: distance,\n z: distance,\n})\n\nexport const position3 = point3\n\nexport type Point3 = z.infer<typeof point3>\n","import { z } from \"zod\"\n\nexport const size = z.object({\n width: z.number(),\n height: z.number(),\n})\n\nexport type Size = z.infer<typeof size>\n","import { z } from \"zod\"\nimport { nanoid } from \"nanoid\"\n\n/**\n * Use this for primary keys for any circuit element\n */\nexport const getZodPrefixedIdWithDefault = (prefix: string) => {\n return z\n .string()\n .optional()\n .default(() => `${prefix}_${nanoid(10)}`)\n}\n","import { z } from \"zod\"\nimport {\n source_component_base,\n type SourceComponentBase,\n} from \"src/source/base/source_component_base\"\nimport { capacitance, distance, voltage } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const source_simple_capacitor = source_component_base.extend({\n ftype: z.literal(\"simple_capacitor\"),\n capacitance,\n max_voltage_rating: voltage.optional(),\n display_capacitance: z.string().optional(),\n max_decoupling_trace_length: distance.optional(),\n})\n\nexport type SourceSimpleCapacitorInput = z.input<typeof source_simple_capacitor>\ntype InferredSourceSimpleCapacitor = z.infer<typeof source_simple_capacitor>\n\n/**\n * Defines a simple capacitor component\n */\nexport interface SourceSimpleCapacitor extends SourceComponentBase {\n ftype: \"simple_capacitor\"\n capacitance: number\n max_voltage_rating?: number\n display_capacitance?: string\n max_decoupling_trace_length?: number\n}\n\nexpectTypesMatch<SourceSimpleCapacitor, InferredSourceSimpleCapacitor>(true)\n","import { z } from \"zod\"\n\nexport const supplier_name = z.enum([\n \"jlcpcb\",\n \"macrofab\",\n \"pcbway\",\n \"digikey\",\n \"mouser\",\n \"lcsc\",\n])\n\nexport type SupplierName = z.infer<typeof supplier_name>\n","import type { TypeEqual } from \"ts-expect\"\n\ntype IsNever<T> = [T] extends [never] ? true : false\n\ntype GetMismatchedProps<T1, T2> = {\n [K in keyof T1 & keyof T2]: T1[K] extends T2[K]\n ? T2[K] extends T1[K]\n ? never\n : K\n : K\n}[keyof T1 & keyof T2]\n\nexport const expectTypesMatch = <\n const T1,\n const T2,\n T3 = Exclude<keyof T1, keyof T2>,\n T4 = Exclude<keyof T2, keyof T1>,\n T5 = GetMismatchedProps<T1, T2>,\n>(\n shouldBe: IsNever<T3> extends true\n ? IsNever<T4> extends true\n ? IsNever<T5> extends true\n ? TypeEqual<T1, T2>\n : `mismatched prop types: ${T5 extends string ? T5 : \"\"}`\n : `extra props ${T4 extends string ? T4 : \"\"}`\n : `missing props ${T3 extends string ? T3 : \"\"}`,\n): void => {}\n\n// ------ TESTS -------\n\nexpectTypesMatch<\n {\n a: number\n },\n {\n a: number\n b: number\n }\n>(\"extra props b\")\n\nexpectTypesMatch<\n {\n a: number\n b: number\n },\n {\n a: number\n }\n>(\"missing props b\")\n\nexpectTypesMatch<\n {\n a: number\n },\n {\n a: number\n }\n>(true)\n\nexpectTypesMatch<\n {\n a: number\n },\n {\n a: string\n }\n>(\"mismatched prop types: a\")\n\n// ------ String Union Matching -------\n\nexport type ExpectStringUnionsMatch<\n T1 extends string,\n T2 extends string,\n Diff1 = Exclude<T1, T2>,\n Diff2 = Exclude<T2, T1>,\n> = IsNever<Diff1> extends true\n ? IsNever<Diff2> extends true\n ? true // Unions are identical\n : `T2 has extra: \"${Diff2 extends string ? Diff2 : \"\"}\"` // T2 has elements not in T1\n : IsNever<Diff2> extends true\n ? `T1 has extra: \"${Diff1 extends string ? Diff1 : \"\"}\"` // T1 has elements not in T2\n : `T1 has extra: \"${Diff1 extends string\n ? Diff1\n : \"\"}\", T2 has extra: \"${Diff2 extends string ? Diff2 : \"\"}\"` // Both have differences\n\nexport const expectStringUnionsMatch = <\n const T1 extends string,\n const T2 extends string,\n ShouldBeTrue = ExpectStringUnionsMatch<T1, T2>,\n>(\n shouldBe: ShouldBeTrue,\n): void => {}\n\n// ------ TESTS -------\n\ntype TestUnion1 = \"a\" | \"b\" | \"c\"\ntype TestUnion2 = \"a\" | \"b\" | \"c\"\ntype TestUnion3 = \"a\" | \"b\" | \"d\"\ntype TestUnion4 = \"a\" | \"b\"\n\nexpectStringUnionsMatch<TestUnion1, TestUnion2>(true)\nexpectStringUnionsMatch<TestUnion1, TestUnion3>(\n 'T1 has extra: \"c\", T2 has extra: \"d\"',\n)\nexpectStringUnionsMatch<TestUnion1, TestUnion4>('T1 has extra: \"c\"')\nexpectStringUnionsMatch<TestUnion4, TestUnion1>('T2 has extra: \"c\"')\nexpectStringUnionsMatch<TestUnion3, TestUnion1>(\n 'T1 has extra: \"d\", T2 has extra: \"c\"',\n)\n\n// Example of using @ts-expect-error for expected failures\n// @ts-expect-error Type '\"T2 has extra: \\\"d\\\"\"' is not assignable to type 'true'.\nexpectStringUnionsMatch<TestUnion1, TestUnion3>(true)\n","import {\n supplier_name,\n type SupplierName,\n} from \"src/pcb/properties/supplier_name\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\nimport { z } from \"zod\"\n\nexport interface SourceComponentBase {\n type: \"source_component\"\n ftype?: string\n source_component_id: string\n name: string\n manufacturer_part_number?: string\n supplier_part_numbers?: Partial<Record<SupplierName, string[]>>\n display_value?: string\n are_pins_interchangeable?: boolean\n internally_connected_source_port_ids?: string[][]\n source_group_id?: string\n}\n\nexport const source_component_base = z.object({\n type: z.literal(\"source_component\"),\n ftype: z.string().optional(),\n source_component_id: z.string(),\n name: z.string(),\n manufacturer_part_number: z.string().optional(),\n supplier_part_numbers: z\n .record(supplier_name, z.array(z.string()))\n .optional(),\n display_value: z.string().optional(),\n are_pins_interchangeable: z.boolean().optional(),\n internally_connected_source_port_ids: z.array(z.array(z.string())).optional(),\n source_group_id: z.string().optional(),\n})\n\ntype InferredSourceComponentBase = z.infer<typeof source_component_base>\n\nexpectTypesMatch<SourceComponentBase, InferredSourceComponentBase>(true)\n","import { z } from \"zod\"\nimport {\n source_component_base,\n type SourceComponentBase,\n} from \"src/source/base/source_component_base\"\nimport { resistance } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const source_simple_resistor = source_component_base.extend({\n ftype: z.literal(\"simple_resistor\"),\n resistance,\n display_resistance: z.string().optional(),\n})\n\nexport type SourceSimpleResistorInput = z.input<typeof source_simple_resistor>\ntype InferredSourceSimpleResistor = z.infer<typeof source_simple_resistor>\n\n/**\n * Defines a simple resistor component\n */\nexport interface SourceSimpleResistor extends SourceComponentBase {\n ftype: \"simple_resistor\"\n resistance: number\n display_resistance?: string\n}\n\nexpectTypesMatch<SourceSimpleResistor, InferredSourceSimpleResistor>(true)\n","import {\n source_component_base,\n type SourceComponentBase,\n} from \"src/source/base/source_component_base\"\nimport { z } from \"zod\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const source_simple_diode = source_component_base.extend({\n ftype: z.literal(\"simple_diode\"),\n})\n\nexport type SourceSimpleDiodeInput = z.input<typeof source_simple_diode>\ntype InferredSourceSimpleDiode = z.infer<typeof source_simple_diode>\n\n/**\n * Defines a simple diode component\n */\nexport interface SourceSimpleDiode extends SourceComponentBase {\n ftype: \"simple_diode\"\n}\n\nexpectTypesMatch<SourceSimpleDiode, InferredSourceSimpleDiode>(true)\n","import {\n source_component_base,\n type SourceComponentBase,\n} from \"src/source/base/source_component_base\"\nimport { z } from \"zod\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\nimport {\n source_simple_diode,\n type SourceSimpleDiode,\n} from \"./source_simple_diode\"\n\nexport const source_simple_led = source_simple_diode.extend({\n ftype: z.literal(\"simple_led\"),\n color: z.string().optional(),\n wavelength: z.string().optional(),\n})\n\nexport type SourceSimpleLedInput = z.input<typeof source_simple_led>\ntype InferredSourceSimpleLed = z.infer<typeof source_simple_led>\n\n/**\n * Defines a simple led component\n */\nexport interface SourceSimpleLed extends Omit<SourceSimpleDiode, \"ftype\"> {\n ftype: \"simple_led\"\n color?: string\n wavelength?: string\n}\n\nexpectTypesMatch<SourceSimpleLed, InferredSourceSimpleLed>(true)\n","import {\n source_component_base,\n type SourceComponentBase,\n} from \"src/source/base/source_component_base\"\nimport { z } from \"zod\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const source_simple_ground = source_component_base.extend({\n ftype: z.literal(\"simple_ground\"),\n})\n\nexport type SourceSimpleGroundInput = z.input<typeof source_simple_ground>\ntype InferredSourceSimpleGround = z.infer<typeof source_simple_ground>\n\n/**\n * Defines a simple ground component\n */\nexport interface SourceSimpleGround extends SourceComponentBase {\n ftype: \"simple_ground\"\n}\n\nexpectTypesMatch<SourceSimpleGround, InferredSourceSimpleGround>(true)\n","import { source_component_base } from \"src/source/base/source_component_base\"\nimport { z } from \"zod\"\n\n/**\n * @deprecated Use source_simple_chip instead. This will be removed in a future version.\n */\nexport const source_simple_bug = source_component_base\n .extend({\n ftype: z.literal(\"simple_bug\"),\n })\n .describe(\"@deprecated\")\n\nexport type source_simple_bug = z.infer<typeof source_simple_bug>\nexport type SourceSimpleBugInput = z.input<typeof source_simple_bug>\n","import { z } from \"zod\"\nimport {\n source_component_base,\n type SourceComponentBase,\n} from \"src/source/base/source_component_base\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const source_simple_chip = source_component_base.extend({\n ftype: z.literal(\"simple_chip\"),\n})\n\nexport type SourceSimpleChipInput = z.input<typeof source_simple_chip>\ntype InferredSourceSimpleChip = z.infer<typeof source_simple_chip>\n\n/**\n * Defines a simple integrated circuit component\n */\nexport interface SourceSimpleChip extends SourceComponentBase {\n ftype: \"simple_chip\"\n}\n\nexpectTypesMatch<SourceSimpleChip, InferredSourceSimpleChip>(true)\n","import { z } from \"zod\"\nimport {\n source_component_base,\n type SourceComponentBase,\n} from \"src/source/base/source_component_base\"\nimport { voltage } from \"../units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const source_simple_power_source = source_component_base.extend({\n ftype: z.literal(\"simple_power_source\"),\n voltage,\n})\n\nexport type SourceSimplePowerSourceInput = z.input<\n typeof source_simple_power_source\n>\ntype InferredSourceSimplePowerSource = z.infer<\n typeof source_simple_power_source\n>\n\n/**\n * Defines a simple power source component\n */\nexport interface SourceSimplePowerSource extends SourceComponentBase {\n ftype: \"simple_power_source\"\n voltage: number\n}\n\nexpectTypesMatch<SourceSimplePowerSource, InferredSourceSimplePowerSource>(true)\n","import { z } from \"zod\"\nimport {\n source_simple_resistor,\n type SourceSimpleResistor,\n} from \"./source_simple_resistor\"\nimport {\n source_simple_capacitor,\n type SourceSimpleCapacitor,\n} from \"./source_simple_capacitor\"\nimport { source_simple_fuse, type SourceSimpleFuse } from \"./source_simple_fuse\"\nimport {\n source_simple_diode,\n type SourceSimpleDiode,\n} from \"./source_simple_diode\"\nimport { source_simple_led, type SourceSimpleLed } from \"./source_simple_led\"\nimport {\n source_simple_ground,\n type SourceSimpleGround,\n} from \"./source_simple_ground\"\nimport { source_simple_bug } from \"./source_simple_bug\"\nimport { source_simple_chip, type SourceSimpleChip } from \"./source_simple_chip\"\nimport {\n source_simple_power_source,\n type SourceSimplePowerSource,\n} from \"./source_simple_power_source\"\nimport {\n source_simple_battery,\n type SourceSimpleBattery,\n} from \"./source_simple_battery\"\nimport {\n source_simple_inductor,\n type SourceSimpleInductor,\n} from \"./source_simple_inductor\"\nimport {\n source_simple_push_button,\n type SourceSimplePushButton,\n} from \"./source_simple_push_button\"\nimport {\n source_simple_potentiometer,\n type SourceSimplePotentiometer,\n} from \"./source_simple_potentiometer\"\nimport {\n source_simple_crystal,\n type SourceSimpleCrystal,\n} from \"./source_simple_crystal\"\nimport {\n source_simple_pin_header,\n type SourceSimplePinHeader,\n} from \"./source_simple_pin_header\"\nimport {\n source_simple_resonator,\n type SourceSimpleResonator,\n} from \"./source_simple_resonator\"\nimport {\n source_simple_transistor,\n type SourceSimpleTransistor,\n} from \"./source_simple_transistor\"\nimport {\n source_simple_test_point,\n type SourceSimpleTestPoint,\n} from \"./source_simple_test_point\"\nimport {\n source_simple_mosfet,\n type SourceSimpleMosfet,\n} from \"./source_simple_mosfet\"\nimport {\n source_simple_switch,\n type SourceSimpleSwitch,\n} from \"./source_simple_switch\"\nimport {\n source_project_metadata,\n type SourceProjectMetadata,\n} from \"./source_project_metadata\"\nimport {\n source_missing_property_error,\n type SourceMissingPropertyError,\n} from \"./source_missing_property_error\"\nimport {\n source_failed_to_create_component_error,\n type SourceFailedToCreateComponentError,\n} from \"./source_failed_to_create_component_error\"\n\nexport const any_source_component = z.union([\n source_simple_resistor,\n source_simple_capacitor,\n source_simple_diode,\n source_simple_led,\n source_simple_ground,\n source_simple_chip,\n source_simple_bug,\n source_simple_power_source,\n source_simple_battery,\n source_simple_inductor,\n source_simple_push_button,\n source_simple_potentiometer,\n source_simple_crystal,\n source_simple_pin_header,\n source_simple_resonator,\n source_simple_switch,\n source_simple_transistor,\n source_simple_test_point,\n source_simple_mosfet,\n source_simple_fuse,\n source_project_metadata,\n source_missing_property_error,\n source_failed_to_create_component_error,\n])\n\n/**\n * Deprecated: use `AnySourceElement` instead\n */\nexport type AnySourceComponent = z.infer<typeof any_source_component>\n\nexport type AnySourceElement =\n | SourceSimpleResistor\n | SourceSimpleCapacitor\n | SourceSimpleDiode\n | SourceSimpleLed\n | SourceSimpleGround\n | SourceSimpleChip\n | SourceSimplePowerSource\n | SourceSimpleBattery\n | SourceSimpleInductor\n | SourceSimplePushButton\n | SourceSimplePotentiometer\n | SourceSimpleCrystal\n | SourceSimplePinHeader\n | SourceSimpleResonator\n | SourceSimpleSwitch\n | SourceSimpleTransistor\n | SourceSimpleTestPoint\n | SourceSimpleMosfet\n | SourceSimpleFuse\n | SourceProjectMetadata\n | SourceMissingPropertyError\n | SourceFailedToCreateComponentError\n","import { z } from \"zod\"\nimport {\n source_component_base,\n type SourceComponentBase,\n} from \"./base/source_component_base\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const source_simple_fuse = source_component_base.extend({\n ftype: z.literal(\"simple_fuse\"),\n\n current_rating_amps: z\n .number()\n .describe(\"Nominal current in amps the fuse is rated for\"),\n\n voltage_rating_volts: z\n .number()\n .describe(\"Voltage rating in volts, e.g. ±5V would be 5\"),\n})\n\nexport interface SourceSimpleFuse extends SourceComponentBase {\n ftype: \"simple_fuse\"\n current_rating_amps: number\n voltage_rating_volts: number\n}\n\nexport type SourceSimpleFuseInput = z.input<typeof source_simple_fuse>\ntype InferredSourceSimpleFuse = z.infer<typeof source_simple_fuse>\n\nexpectTypesMatch<SourceSimpleFuse, InferredSourceSimpleFuse>(true)\n","import { z } from \"zod\"\nimport {\n source_component_base,\n type SourceComponentBase,\n} from \"src/source/base/source_component_base\"\nimport { battery_capacity } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const source_simple_battery = source_component_base.extend({\n ftype: z.literal(\"simple_battery\"),\n capacity: battery_capacity,\n})\n\nexport type SourceSimpleBatteryInput = z.input<typeof source_simple_battery>\ntype InferredSourceSimpleBattery = z.infer<typeof source_simple_battery>\n\n/**\n * Defines a simple battery component\n */\nexport interface SourceSimpleBattery extends SourceComponentBase {\n ftype: \"simple_battery\"\n capacity: number\n}\n\nexpectTypesMatch<SourceSimpleBattery, InferredSourceSimpleBattery>(true)\n","import { z } from \"zod\"\nimport {\n source_component_base,\n type SourceComponentBase,\n} from \"src/source/base/source_component_base\"\nimport { inductance } from \"../units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const source_simple_inductor = source_component_base.extend({\n ftype: z.literal(\"simple_inductor\"),\n inductance,\n})\n\nexport type SourceSimpleInductorInput = z.input<typeof source_simple_inductor>\ntype InferredSourceSimpleInductor = z.infer<typeof source_simple_inductor>\n\n/**\n * Defines a simple inductor component\n */\nexport interface SourceSimpleInductor extends SourceComponentBase {\n ftype: \"simple_inductor\"\n inductance: number\n}\n\nexpectTypesMatch<SourceSimpleInductor, InferredSourceSimpleInductor>(true)\n","import { z } from \"zod\"\nimport {\n source_component_base,\n type SourceComponentBase,\n} from \"src/source/base/source_component_base\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const source_simple_push_button = source_component_base.extend({\n ftype: z.literal(\"simple_push_button\"),\n})\n\nexport type SourceSimplePushButtonInput = z.input<\n typeof source_simple_push_button\n>\ntype InferredSourceSimplePushButton = z.infer<typeof source_simple_push_button>\n\n/**\n * Defines a simple push button component\n */\nexport interface SourceSimplePushButton extends SourceComponentBase {\n ftype: \"simple_push_button\"\n}\n\nexpectTypesMatch<SourceSimplePushButton, InferredSourceSimplePushButton>(true)\n","import { z } from \"zod\"\nimport { source_component_base } from \"src/source/base/source_component_base\"\nimport { resistance } from \"src/units\"\n\nexport const source_simple_potentiometer = source_component_base.extend({\n ftype: z.literal(\"simple_potentiometer\"),\n max_resistance: resistance,\n})\n\nexport type SourceSimplePotentiometer = z.infer<\n typeof source_simple_potentiometer\n>\nexport type SourceSimplePotentiometerInput = z.input<\n typeof source_simple_potentiometer\n>\n","import { z } from \"zod\"\nimport {\n source_component_base,\n type SourceComponentBase,\n} from \"src/source/base/source_component_base\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const source_simple_crystal = source_component_base.extend({\n ftype: z.literal(\"simple_crystal\"),\n frequency: z.number().describe(\"Frequency in Hz\"),\n load_capacitance: z.number().optional().describe(\"Load capacitance in pF\"),\n})\n\nexport type SourceSimpleCrystalInput = z.input<typeof source_simple_crystal>\ntype InferredSourceSimpleCrystal = z.infer<typeof source_simple_crystal>\n\n/**\n * Defines a simple crystal oscillator component\n */\nexport interface SourceSimpleCrystal extends SourceComponentBase {\n ftype: \"simple_crystal\"\n frequency: number\n load_capacitance?: number\n}\n\nexpectTypesMatch<SourceSimpleCrystal, InferredSourceSimpleCrystal>(true)\n","import { source_component_base } from \"src/source/base/source_component_base\"\nimport { z } from \"zod\"\n\nexport const source_simple_pin_header = source_component_base.extend({\n ftype: z.literal(\"simple_pin_header\"),\n pin_count: z.number(),\n gender: z.enum([\"male\", \"female\"]).optional().default(\"male\"),\n})\n\nexport type SourceSimplePinHeader = z.infer<typeof source_simple_pin_header>\nexport type SourceSimplePinHeaderInput = z.input<\n typeof source_simple_pin_header\n>\n","import { z } from \"zod\"\nimport {\n source_component_base,\n type SourceComponentBase,\n} from \"src/source/base/source_component_base\"\nimport { capacitance, resistance, frequency } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const source_simple_resonator = source_component_base.extend({\n ftype: z.literal(\"simple_resonator\"),\n load_capacitance: capacitance,\n equivalent_series_resistance: resistance.optional(),\n frequency: frequency,\n})\n\nexport type SourceSimpleResonatorInput = z.input<typeof source_simple_resonator>\ntype InferredSourceSimpleResonator = z.infer<typeof source_simple_resonator>\n\n/**\n * Defines a simple resonator component\n */\nexport interface SourceSimpleResonator extends SourceComponentBase {\n ftype: \"simple_resonator\"\n load_capacitance: number\n equivalent_series_resistance?: number\n frequency: number\n}\n\nexpectTypesMatch<SourceSimpleResonator, InferredSourceSimpleResonator>(true)\n","import { z } from \"zod\"\nimport {\n source_component_base,\n type SourceComponentBase,\n} from \"src/source/base/source_component_base\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const source_simple_transistor = source_component_base.extend({\n ftype: z.literal(\"simple_transistor\"),\n transistor_type: z.enum([\"npn\", \"pnp\"]),\n})\n\nexport type SourceSimpleTransistorInput = z.input<\n typeof source_simple_transistor\n>\ntype InferredSourceSimpleTransistor = z.infer<typeof source_simple_transistor>\n\n/**\n * Defines a simple transistor component\n * This is a three-pin semiconductor device (emitter, base, collector)\n * Pin configuration is handled by the schematic port system\n */\n\nexport interface SourceSimpleTransistor extends SourceComponentBase {\n ftype: \"simple_transistor\"\n transistor_type: \"npn\" | \"pnp\"\n}\n\nexpectTypesMatch<SourceSimpleTransistor, InferredSourceSimpleTransistor>(true)\n","import { z } from \"zod\"\nimport {\n source_component_base,\n type SourceComponentBase,\n} from \"src/source/base/source_component_base\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const source_simple_test_point = source_component_base.extend({\n ftype: z.literal(\"simple_test_point\"),\n footprint_variant: z.enum([\"pad\", \"through_hole\"]).optional(),\n pad_shape: z.enum([\"rect\", \"circle\"]).optional(),\n pad_diameter: z.union([z.number(), z.string()]).optional(),\n hole_diameter: z.union([z.number(), z.string()]).optional(),\n width: z.union([z.number(), z.string()]).optional(),\n height: z.union([z.number(), z.string()]).optional(),\n})\n\nexport type SourceSimpleTestPointInput = z.input<\n typeof source_simple_test_point\n>\ntype InferredSourceSimpleTestPoint = z.infer<typeof source_simple_test_point>\n\n/**\n * Defines a simple test point component\n * Can be surface-mount or through-hole.\n * Pad shape and dimensions configurable for different use cases.\n */\nexport interface SourceSimpleTestPoint extends SourceComponentBase {\n ftype: \"simple_test_point\"\n footprint_variant?: \"pad\" | \"through_hole\"\n pad_shape?: \"rect\" | \"circle\"\n pad_diameter?: number | string\n hole_diameter?: number | string\n width?: number | string\n height?: number | string\n}\n\nexpectTypesMatch<SourceSimpleTestPoint, InferredSourceSimpleTestPoint>(true)\n","import { z } from \"zod\"\nimport {\n source_component_base,\n type SourceComponentBase,\n} from \"src/source/base/source_component_base\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const source_simple_mosfet = source_component_base.extend({\n ftype: z.literal(\"simple_mosfet\"),\n channel_type: z.enum([\"n\", \"p\"]),\n mosfet_mode: z.enum([\"enhancement\", \"depletion\"]),\n})\n\nexport type SourceSimpleMosfetInput = z.input<typeof source_simple_mosfet>\ntype InferredSourceSimpleMosfet = z.infer<typeof source_simple_mosfet>\n\n/**\n * Defines a simple mosfet component\n * This is a three-pin semiconductor device (source, gate, drain)\n * Pin configuration is handled by the schematic port system\n */\n\nexport interface SourceSimpleMosfet extends SourceComponentBase {\n ftype: \"simple_mosfet\"\n channel_type: \"n\" | \"p\"\n mosfet_mode: \"enhancement\" | \"depletion\"\n}\n\nexpectTypesMatch<SourceSimpleMosfet, InferredSourceSimpleMosfet>(true)\n","import { z } from \"zod\"\nimport {\n source_component_base,\n type SourceComponentBase,\n} from \"src/source/base/source_component_base\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const source_simple_switch = source_component_base.extend({\n ftype: z.literal(\"simple_switch\"),\n})\nexport type SourceSimpleSwitchInput = z.input<typeof source_simple_switch>\ntype InferredSourceSimpleSwitch = z.infer<typeof source_simple_switch>\n\n/**\n * Defines a simple switch component\n */\nexport interface SourceSimpleSwitch extends SourceComponentBase {\n ftype: \"simple_switch\"\n}\n\nexpectTypesMatch<SourceSimpleSwitch, InferredSourceSimpleSwitch>(true)\n","import { expectTypesMatch } from \"src/utils/expect-types-match\"\nimport { z } from \"zod\"\n\nexport interface SourceProjectMetadata {\n type: \"source_project_metadata\"\n name?: string\n software_used_string?: string\n created_at?: string // ISO8601 timestamp\n}\n\nexport const source_project_metadata = z.object({\n type: z.literal(\"source_project_metadata\"),\n name: z.string().optional(),\n software_used_string: z.string().optional(),\n created_at: z.string().datetime().optional(),\n})\n\nexport type InferredProjectMetadata = z.infer<typeof source_project_metadata>\nexpectTypesMatch<SourceProjectMetadata, InferredProjectMetadata>(true)\n","import { z } from \"zod\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const source_missing_property_error = z\n .object({\n type: z.literal(\"source_missing_property_error\"),\n source_missing_property_error_id: getZodPrefixedIdWithDefault(\n \"source_missing_property_error\",\n ),\n source_component_id: z.string(),\n property_name: z.string(),\n error_type: z.literal(\"source_missing_property_error\"),\n message: z.string(),\n })\n .describe(\"The source code is missing a property\")\n\nexport type SourceMissingPropertyErrorInput = z.input<\n typeof source_missing_property_error\n>\ntype InferredSourceMissingPropertyError = z.infer<\n typeof source_missing_property_error\n>\n\n/**\n * The source code is missing a property\n */\nexport interface SourceMissingPropertyError {\n type: \"source_missing_property_error\"\n source_missing_property_error_id: string\n source_component_id: string\n property_name: string\n error_type: \"source_missing_property_error\"\n message: string\n}\n\nexpectTypesMatch<\n SourceMissingPropertyError,\n InferredSourceMissingPropertyError\n>(true)\n","import { z } from \"zod\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const source_failed_to_create_component_error = z\n .object({\n type: z.literal(\"source_failed_to_create_component_error\"),\n source_failed_to_create_component_error_id: getZodPrefixedIdWithDefault(\n \"source_failed_to_create_component_error\",\n ),\n component_name: z.string().optional(),\n subcircuit_id: z.string().optional(),\n parent_source_component_id: z.string().optional(),\n message: z.string(),\n pcb_center: z\n .object({\n x: z.number().optional(),\n y: z.number().optional(),\n })\n .optional(),\n schematic_center: z\n .object({\n x: z.number().optional(),\n y: z.number().optional(),\n })\n .optional(),\n })\n .describe(\"Error emitted when a component fails to be constructed\")\n\nexport type SourceFailedToCreateComponentErrorInput = z.input<\n typeof source_failed_to_create_component_error\n>\ntype InferredSourceFailedToCreateComponentError = z.infer<\n typeof source_failed_to_create_component_error\n>\n\n/**\n * Error emitted when a component fails to be constructed.\n * Contains details about the failure and prevents the component from being rendered.\n */\nexport interface SourceFailedToCreateComponentError {\n type: \"source_failed_to_create_component_error\"\n source_failed_to_create_component_error_id: string\n message: string\n component_name?: string\n subcircuit_id?: string\n parent_source_component_id?: string\n pcb_center?: {\n x?: number\n y?: number\n }\n schematic_center?: {\n x?: number\n y?: number\n }\n}\n\nexpectTypesMatch<\n SourceFailedToCreateComponentError,\n InferredSourceFailedToCreateComponentError\n>(true)\n","import { z } from \"zod\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const source_port = z.object({\n type: z.literal(\"source_port\"),\n pin_number: z.number().optional(),\n port_hints: z.array(z.string()).optional(),\n name: z.string(),\n source_port_id: z.string(),\n source_component_id: z.string(),\n subcircuit_id: z.string().optional(),\n subcircuit_connectivity_map_key: z.string().optional(),\n})\n\nexport type SourcePortInput = z.input<typeof source_port>\ntype InferredSourcePort = z.infer<typeof source_port>\n\n/**\n * Defines a source port that can be connected to other components\n */\nexport interface SourcePort {\n type: \"source_port\"\n pin_number?: number\n port_hints?: string[]\n name: string\n source_port_id: string\n source_component_id: string\n subcircuit_id?: string\n subcircuit_connectivity_map_key?: string\n}\n\nexpectTypesMatch<SourcePort, InferredSourcePort>(true)\n","import { expectTypesMatch } from \"src/utils/expect-types-match\"\nimport { z } from \"zod\"\n\nexport interface SourceTrace {\n type: \"source_trace\"\n source_trace_id: string\n connected_source_port_ids: string[]\n connected_source_net_ids: string[]\n subcircuit_id?: string\n subcircuit_connectivity_map_key?: string\n max_length?: number\n display_name?: string\n min_trace_thickness?: number\n}\n\nexport const source_trace = z.object({\n type: z.literal(\"source_trace\"),\n source_trace_id: z.string(),\n connected_source_port_ids: z.array(z.string()),\n connected_source_net_ids: z.array(z.string()),\n subcircuit_id: z.string().optional(),\n subcircuit_connectivity_map_key: z.string().optional(),\n max_length: z.number().optional(),\n min_trace_thickness: z.number().optional(),\n display_name: z.string().optional(),\n})\n\ntype InferredSourceTrace = z.infer<typeof source_trace>\n\nexpectTypesMatch<SourceTrace, InferredSourceTrace>(true)\n","import { z } from \"zod\"\n\nexport const source_group = z.object({\n type: z.literal(\"source_group\"),\n source_group_id: z.string(),\n subcircuit_id: z.string().optional(),\n parent_subcircuit_id: z.string().optional(),\n is_subcircuit: z.boolean().optional(),\n name: z.string().optional(),\n})\n\nexport type SourceGroup = z.infer<typeof source_group>\nexport type SourceGroupInput = z.input<typeof source_group>\n","import { z } from \"zod\"\n\nexport const source_net = z.object({\n type: z.literal(\"source_net\"),\n source_net_id: z.string(),\n name: z.string(),\n member_source_group_ids: z.array(z.string()),\n is_power: z.boolean().optional(),\n is_ground: z.boolean().optional(),\n is_digital_signal: z.boolean().optional(),\n is_analog_signal: z.boolean().optional(),\n trace_width: z.number().optional(),\n subcircuit_id: z.string().optional(),\n subcircuit_connectivity_map_key: z.string().optional(),\n})\n\nexport type SourceNet = z.infer<typeof source_net>\nexport type SourceNetInput = z.input<typeof source_net>\n","import { z } from \"zod\"\nimport { distance } from \"../units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport interface SchematicBox {\n type: \"schematic_box\"\n schematic_component_id: string\n width: number\n height: number\n is_dashed: boolean\n x: number\n y: number\n}\n\nexport const schematic_box = z\n .object({\n type: z.literal(\"schematic_box\"),\n schematic_component_id: z.string(),\n width: distance,\n height: distance,\n is_dashed: z.boolean().default(false),\n x: distance,\n y: distance,\n })\n .describe(\"Draws a box on the schematic\")\n\nexport type SchematicBoxInput = z.input<typeof schematic_box>\ntype InferredSchematicBox = z.infer<typeof schematic_box>\n\nexpectTypesMatch<SchematicBox, InferredSchematicBox>(true)\n","import { z } from \"zod\"\nimport { point, type Point } from \"../common/point\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport interface SchematicPath {\n type: \"schematic_path\"\n schematic_component_id: string\n fill_color?: \"red\" | \"blue\"\n is_filled?: boolean\n points: Point[]\n}\n\nexport const schematic_path = z.object({\n type: z.literal(\"schematic_path\"),\n schematic_component_id: z.string(),\n fill_color: z.enum([\"red\", \"blue\"]).optional(),\n is_filled: z.boolean().optional(),\n points: z.array(point),\n})\n\nexport type SchematicPathInput = z.input<typeof schematic_path>\ntype InferredSchematicPath = z.infer<typeof schematic_path>\n\nexpectTypesMatch<SchematicPath, InferredSchematicPath>(true)\n","import { z } from \"zod\"\nimport { point, type Point } from \"../common/point\"\nimport { size, type Size } from \"../common/size\"\nimport { length } from \"../units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const schematic_pin_styles = z.record(\n z.object({\n left_margin: length.optional(),\n right_margin: length.optional(),\n top_margin: length.optional(),\n bottom_margin: length.optional(),\n }),\n)\n\nexport interface SchematicPortArrangementBySize {\n left_size: number\n right_size: number\n top_size?: number\n bottom_size?: number\n}\n\nexport interface SchematicPortArrangementBySides {\n left_side?: { pins: number[]; direction?: \"top-to-bottom\" | \"bottom-to-top\" }\n right_side?: { pins: number[]; direction?: \"top-to-bottom\" | \"bottom-to-top\" }\n top_side?: { pins: number[]; direction?: \"left-to-right\" | \"right-to-left\" }\n bottom_side?: {\n pins: number[]\n direction?: \"left-to-right\" | \"right-to-left\"\n }\n}\n\nexport type SchematicPortArrangement =\n | SchematicPortArrangementBySize\n | SchematicPortArrangementBySides\n\nexport interface SchematicComponent {\n type: \"schematic_component\"\n size: Size\n center: Point\n source_component_id: string\n schematic_component_id: string\n pin_spacing?: number\n pin_styles?: Record<\n string,\n {\n left_margin?: number\n right_margin?: number\n top_margin?: number\n bottom_margin?: number\n }\n >\n box_width?: number\n symbol_name?: string\n port_arrangement?: SchematicPortArrangement\n port_labels?: Record<string, string>\n symbol_display_value?: string\n subcircuit_id?: string\n schematic_group_id?: string\n}\n\nexport const schematic_component_port_arrangement_by_size = z.object({\n left_size: z.number(),\n right_size: z.number(),\n top_size: z.number().optional(),\n bottom_size: z.number().optional(),\n})\n\nexpectTypesMatch<\n SchematicPortArrangementBySize,\n z.infer<typeof schematic_component_port_arrangement_by_size>\n>(true)\n\nexport const schematic_component_port_arrangement_by_sides = z.object({\n left_side: z\n .object({\n pins: z.array(z.number()),\n // @ts-ignore\n direction: z.enum([\"top-to-bottom\", \"bottom-to-top\"]).optional(),\n })\n .optional(),\n right_side: z\n .object({\n pins: z.array(z.number()),\n // @ts-ignore\n direction: z.enum([\"top-to-bottom\", \"bottom-to-top\"]).optional(),\n })\n .optional(),\n top_side: z\n .object({\n pins: z.array(z.number()),\n // @ts-ignore\n direction: z.enum([\"left-to-right\", \"right-to-left\"]).optional(),\n })\n .optional(),\n bottom_side: z\n .object({\n pins: z.array(z.number()),\n // @ts-ignore\n direction: z.enum([\"left-to-right\", \"right-to-left\"]).optional(),\n })\n .optional(),\n})\n\nexpectTypesMatch<\n SchematicPortArrangementBySides,\n z.infer<typeof schematic_component_port_arrangement_by_sides>\n>(true)\n\nexport const port_arrangement = z.union([\n schematic_component_port_arrangement_by_size,\n schematic_component_port_arrangement_by_sides,\n])\n\nexport const schematic_component = z.object({\n type: z.literal(\"schematic_component\"),\n size,\n center: point,\n source_component_id: z.string(),\n schematic_component_id: z.string(),\n pin_spacing: length.optional(),\n pin_styles: schematic_pin_styles.optional(),\n box_width: length.optional(),\n symbol_name: z.string().optional(),\n port_arrangement: port_arrangement.optional(),\n port_labels: z.record(z.string()).optional(),\n symbol_display_value: z.string().optional(),\n subcircuit_id: z.string().optional(),\n schematic_group_id: z.string().optional(),\n})\n\nexport type SchematicComponentInput = z.input<typeof schematic_component>\ntype InferredSchematicComponent = z.infer<typeof schematic_component>\n\nexpectTypesMatch<SchematicComponent, InferredSchematicComponent>(true)\n","import { z } from \"zod\"\nimport { distance } from \"../units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\n/**\n * Defines a line on the schematic, this can be used for adding arbitrary lines\n * to a schematic, but don't use it for drawing traces, schematic boxes or where\n * other schematic elements are more appropriate.\n */\nexport interface SchematicLine {\n type: \"schematic_line\"\n schematic_component_id: string\n x1: number\n x2: number\n y1: number\n y2: number\n}\n\nexport const schematic_line = z.object({\n type: z.literal(\"schematic_line\"),\n schematic_component_id: z.string(),\n x1: distance,\n x2: distance,\n y1: distance,\n y2: distance,\n})\n\nexport type SchematicLineInput = z.input<typeof schematic_line>\ntype InferredSchematicLine = z.infer<typeof schematic_line>\n\nexpectTypesMatch<SchematicLine, InferredSchematicLine>(true)\n","import { z } from \"zod\"\nimport { distance } from \"../units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport interface SchematicTraceEdge {\n from: {\n x: number\n y: number\n }\n to: {\n x: number\n y: number\n }\n is_crossing?: boolean\n from_schematic_port_id?: string\n to_schematic_port_id?: string\n}\n\nexport interface SchematicTrace {\n type: \"schematic_trace\"\n schematic_trace_id: string\n source_trace_id: string\n junctions: {\n x: number\n y: number\n }[]\n edges: SchematicTraceEdge[]\n}\n\nexport const schematic_trace = z.object({\n type: z.literal(\"schematic_trace\"),\n schematic_trace_id: z.string(),\n source_trace_id: z.string(),\n junctions: z.array(\n z.object({\n x: z.number(),\n y: z.number(),\n }),\n ),\n edges: z.array(\n z.object({\n from: z.object({\n x: z.number(),\n y: z.number(),\n }),\n to: z.object({\n x: z.number(),\n y: z.number(),\n }),\n is_crossing: z.boolean().optional(),\n from_schematic_port_id: z.string().optional(),\n to_schematic_port_id: z.string().optional(),\n }),\n ),\n})\n\nexport type SchematicTraceInput = z.input<typeof schematic_trace>\ntype InferredSchematicTrace = z.infer<typeof schematic_trace>\n\nexpectTypesMatch<SchematicTraceInput, InferredSchematicTrace>(true)\n","import { z } from \"zod\"\nimport { distance } from \"../units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\nimport { ninePointAnchor } from \"src/common/NinePointAnchor\"\nimport type { NinePointAnchor } from \"src/common/NinePointAnchor\"\nimport type { FivePointAnchor } from \"src/common/FivePointAnchor\"\nimport { fivePointAnchor } from \"src/common/FivePointAnchor\"\n\nexport interface SchematicText {\n type: \"schematic_text\"\n schematic_component_id?: string\n schematic_text_id: string\n text: string\n font_size: number\n position: {\n x: number\n y: number\n }\n rotation: number\n anchor: NinePointAnchor | FivePointAnchor\n color: string\n}\n\nexport const schematic_text = z.object({\n type: z.literal(\"schematic_text\"),\n schematic_component_id: z.string().optional(),\n schematic_text_id: z.string(),\n text: z.string(),\n font_size: z.number().default(0.18),\n position: z.object({\n x: distance,\n y: distance,\n }),\n rotation: z.number().default(0),\n anchor: z\n .union([fivePointAnchor.describe(\"legacy\"), ninePointAnchor])\n .default(\"center\"),\n color: z.string().default(\"#000000\"),\n})\n\nexport type SchematicTextInput = z.input<typeof schematic_text>\ntype InferredSchematicText = z.infer<typeof schematic_text>\n\nexpectTypesMatch<SchematicText, InferredSchematicText>(true)\n","import { z } from \"zod\"\n\nexport type NinePointAnchor =\n | \"top_left\"\n | \"top_center\"\n | \"top_right\"\n | \"center_left\"\n | \"center\"\n | \"center_right\"\n | \"bottom_left\"\n | \"bottom_center\"\n | \"bottom_right\"\n\nexport const ninePointAnchor = z.enum([\n \"top_left\",\n \"top_center\",\n \"top_right\",\n \"center_left\",\n \"center\",\n \"center_right\",\n \"bottom_left\",\n \"bottom_center\",\n \"bottom_right\",\n])\n","import { z } from \"zod\"\n\nexport type FivePointAnchor = \"center\" | \"left\" | \"right\" | \"top\" | \"bottom\"\n\nexport const fivePointAnchor = z.enum([\n \"center\",\n \"left\",\n \"right\",\n \"top\",\n \"bottom\",\n])\n","import { z } from \"zod\"\nimport { point, type Point } from \"../common\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport interface SchematicPort {\n type: \"schematic_port\"\n schematic_port_id: string\n source_port_id: string\n schematic_component_id?: string\n center: Point\n facing_direction?: \"up\" | \"down\" | \"left\" | \"right\"\n distance_from_component_edge?: number\n side_of_component?: \"top\" | \"bottom\" | \"left\" | \"right\"\n true_ccw_index?: number\n pin_number?: number\n display_pin_label?: string\n}\n\nexport const schematic_port = z\n .object({\n type: z.literal(\"schematic_port\"),\n schematic_port_id: z.string(),\n source_port_id: z.string(),\n schematic_component_id: z.string().optional(),\n center: point,\n facing_direction: z.enum([\"up\", \"down\", \"left\", \"right\"]).optional(),\n distance_from_component_edge: z.number().optional(),\n side_of_component: z.enum([\"top\", \"bottom\", \"left\", \"right\"]).optional(),\n true_ccw_index: z.number().optional(),\n pin_number: z.number().optional(),\n display_pin_label: z.string().optional(),\n })\n .describe(\"Defines a port on a schematic component\")\n\nexport type SchematicPortInput = z.input<typeof schematic_port>\ntype InferredSchematicPort = z.infer<typeof schematic_port>\n\nexpectTypesMatch<SchematicPort, InferredSchematicPort>(true)\n","import { z } from \"zod\"\nimport { point, type Point } from \"../common/point\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\n\nexport interface SchematicNetLabel {\n type: \"schematic_net_label\"\n schematic_net_label_id: string\n schematic_trace_id?: string\n source_trace_id?: string\n source_net_id: string\n center: Point\n anchor_position?: Point | undefined\n anchor_side: \"top\" | \"bottom\" | \"left\" | \"right\"\n text: string\n symbol_name?: string | undefined\n}\n\nexport const schematic_net_label = z.object({\n type: z.literal(\"schematic_net_label\"),\n schematic_net_label_id: getZodPrefixedIdWithDefault(\"schematic_net_label\"),\n schematic_trace_id: z.string().optional(),\n source_trace_id: z.string().optional(),\n source_net_id: z.string(),\n center: point,\n anchor_position: point.optional(),\n anchor_side: z.enum([\"top\", \"bottom\", \"left\", \"right\"]),\n text: z.string(),\n symbol_name: z.string().optional(),\n})\n\nexport type SchematicNetLabelInput = z.input<typeof schematic_net_label>\nexport type InferredSchematicNetLabel = z.infer<typeof schematic_net_label>\n\nexpectTypesMatch<SchematicNetLabel, InferredSchematicNetLabel>(true)\n","import { z } from \"zod\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport interface SchematicError {\n type: \"schematic_error\"\n schematic_error_id: string\n error_type: \"schematic_port_not_found\"\n message: string\n}\n\nexport const schematic_error = z\n .object({\n type: z.literal(\"schematic_error\"),\n schematic_error_id: z.string(),\n // eventually each error type should be broken out into a dir of files\n error_type: z.literal(\"schematic_port_not_found\"),\n message: z.string(),\n })\n .describe(\"Defines a schematic error on the schematic\")\n\nexport type SchematicErrorInput = z.input<typeof schematic_error>\ntype InferredSchematicError = z.infer<typeof schematic_error>\n\nexpectTypesMatch<SchematicError, InferredSchematicError>(true)\n","import { z } from \"zod\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const schematic_layout_error = z\n .object({\n type: z.literal(\"schematic_layout_error\"),\n schematic_layout_error_id: getZodPrefixedIdWithDefault(\n \"schematic_layout_error\",\n ),\n message: z.string(),\n source_group_id: z.string(),\n schematic_group_id: z.string(),\n })\n .describe(\"Error emitted when schematic layout fails for a group\")\n\nexport type SchematicLayoutErrorInput = z.input<typeof schematic_layout_error>\ntype InferredSchematicLayoutError = z.infer<typeof schematic_layout_error>\n\nexport interface SchematicLayoutError {\n type: \"schematic_layout_error\"\n schematic_layout_error_id: string\n message: string\n source_group_id: string\n schematic_group_id: string\n}\n\nexpectTypesMatch<SchematicLayoutError, InferredSchematicLayoutError>(true)\n","import { z } from \"zod\"\nimport { point, type Point } from \"../common/point\"\nimport { size, type Size } from \"../common/size\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const schematic_debug_object_base = z.object({\n type: z.literal(\"schematic_debug_object\"),\n label: z.string().optional(),\n})\n\nexport const schematic_debug_rect = schematic_debug_object_base.extend({\n shape: z.literal(\"rect\"),\n center: point,\n size: size,\n})\n\nexport const schematic_debug_line = schematic_debug_object_base.extend({\n shape: z.literal(\"line\"),\n start: point,\n end: point,\n})\n\nexport const schematic_debug_point = schematic_debug_object_base.extend({\n shape: z.literal(\"point\"),\n center: point,\n})\n\nexport const schematic_debug_object = z.discriminatedUnion(\"shape\", [\n schematic_debug_rect,\n schematic_debug_line,\n schematic_debug_point,\n])\ntype InferredSchematicDebugObject = z.infer<typeof schematic_debug_object>\n\nexport interface SchematicDebugRect {\n type: \"schematic_debug_object\"\n label?: string\n shape: \"rect\"\n center: Point\n size: Size\n}\n\nexport interface SchematicDebugLine {\n type: \"schematic_debug_object\"\n label?: string\n shape: \"line\"\n start: Point\n end: Point\n}\n\nexport interface SchematicDebugPoint {\n type: \"schematic_debug_object\"\n label?: string\n shape: \"point\"\n center: Point\n}\n\nexport type SchematicDebugObject =\n | SchematicDebugRect\n | SchematicDebugLine\n | SchematicDebugPoint\n\nexpectTypesMatch<SchematicDebugObject, InferredSchematicDebugObject>(true)\nexport type SchematicDebugObjectInput = z.input<typeof schematic_debug_object>\n","import { z } from \"zod\"\nimport { point, type Point } from \"../common/point\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\nimport { voltage } from \"src/units\"\n\nexport interface SchematicVoltageProbe {\n type: \"schematic_voltage_probe\"\n schematic_voltage_probe_id: string\n position: Point\n schematic_trace_id: string\n voltage?: number\n}\n\nexport const schematic_voltage_probe = z\n .object({\n type: z.literal(\"schematic_voltage_probe\"),\n schematic_voltage_probe_id: z.string(),\n position: point,\n schematic_trace_id: z.string(),\n voltage: voltage.optional(),\n })\n .describe(\"Defines a voltage probe measurement point on a schematic trace\")\n\nexport type SchematicVoltageProbeInput = z.input<typeof schematic_voltage_probe>\ntype InferredSchematicVoltageProbe = z.infer<typeof schematic_voltage_probe>\n\nexpectTypesMatch<SchematicVoltageProbe, InferredSchematicVoltageProbe>(true)\n","import { z } from \"zod\"\nimport { getZodPrefixedIdWithDefault } from \"../common\"\nimport { expectTypesMatch } from \"../utils/expect-types-match\"\n\nexport const schematic_manual_edit_conflict_warning = z\n .object({\n type: z.literal(\"schematic_manual_edit_conflict_warning\"),\n schematic_manual_edit_conflict_warning_id: getZodPrefixedIdWithDefault(\n \"schematic_manual_edit_conflict_warning\",\n ),\n message: z.string(),\n schematic_component_id: z.string(),\n schematic_group_id: z.string().optional(),\n subcircuit_id: z.string().optional(),\n source_component_id: z.string(),\n })\n .describe(\n \"Warning emitted when a component has both manual placement and explicit schX/schY coordinates\",\n )\n\nexport type SchematicManualEditConflictWarningInput = z.input<\n typeof schematic_manual_edit_conflict_warning\n>\ntype InferredSchematicManualEditConflictWarning = z.infer<\n typeof schematic_manual_edit_conflict_warning\n>\n\n/**\n * Warning emitted when a component has both manual placement (via manualEdits) and explicit schX/schY coordinates\n */\nexport interface SchematicManualEditConflictWarning {\n type: \"schematic_manual_edit_conflict_warning\"\n schematic_manual_edit_conflict_warning_id: string\n message: string\n schematic_component_id: string\n schematic_group_id?: string\n subcircuit_id?: string\n source_component_id: string\n}\n\nexpectTypesMatch<\n SchematicManualEditConflictWarning,\n InferredSchematicManualEditConflictWarning\n>(true)\n","import { z } from \"zod\"\nimport { point, type Point, getZodPrefixedIdWithDefault } from \"src/common\"\nimport { length, type Length } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const schematic_group = z\n .object({\n type: z.literal(\"schematic_group\"),\n schematic_group_id: getZodPrefixedIdWithDefault(\"schematic_group\"),\n source_group_id: z.string(),\n is_subcircuit: z.boolean().optional(),\n subcircuit_id: z.string().optional(),\n width: length,\n height: length,\n center: point,\n schematic_component_ids: z.array(z.string()),\n name: z.string().optional(),\n description: z.string().optional(),\n })\n .describe(\"Defines a group of components on the schematic\")\n\nexport type SchematicGroupInput = z.input<typeof schematic_group>\ntype InferredSchematicGroup = z.infer<typeof schematic_group>\n\n/**\n * Defines a group of components on the schematic\n */\nexport interface SchematicGroup {\n type: \"schematic_group\"\n schematic_group_id: string\n source_group_id: string\n is_subcircuit?: boolean\n subcircuit_id?: string\n width: Length\n height: Length\n center: Point\n schematic_component_ids: string[]\n name?: string\n description?: string\n}\n\nexpectTypesMatch<SchematicGroup, InferredSchematicGroup>(true)\n","import { z } from \"zod\"\n\nexport const all_layers = [\n \"top\",\n \"bottom\",\n \"inner1\",\n \"inner2\",\n \"inner3\",\n \"inner4\",\n \"inner5\",\n \"inner6\",\n] as const\n\nexport const layer_string = z.enum(all_layers)\n\nexport const layer_ref = layer_string\n .or(\n z.object({\n name: layer_string,\n }),\n )\n .transform((layer) => {\n if (typeof layer === \"string\") {\n return layer\n }\n return layer.name\n })\n\nexport type LayerRefInput = z.input<typeof layer_ref>\nexport type LayerRef = z.output<typeof layer_ref>\n\nexport const visible_layer = z.enum([\"top\", \"bottom\"])\nexport type VisibleLayerRef = z.infer<typeof visible_layer>\nexport type VisibleLayer = z.infer<typeof visible_layer>\n","import { z } from \"zod\"\nimport { distance } from \"src/units\"\nimport { layer_ref } from \"./layer_ref\"\n\n// x: string | number\n// y: string | number\n// via?: boolean\n// via_to_layer?: string\nexport const pcb_route_hint = z.object({\n x: distance,\n y: distance,\n via: z.boolean().optional(),\n via_to_layer: layer_ref.optional(),\n})\nexport const pcb_route_hints = z.array(pcb_route_hint)\n\nexport type PcbRouteHintInput = z.input<typeof pcb_route_hint>\nexport type PcbRouteHintsInput = z.input<typeof pcb_route_hints>\nexport type PcbRouteHint = z.output<typeof pcb_route_hint>\nexport type PcbRouteHints = z.output<typeof pcb_route_hints>\n","import { z } from \"zod\"\nimport { distance } from \"../../units\"\nimport { layer_ref } from \"./layer_ref\"\n\nexport const route_hint_point = z.object({\n x: distance,\n y: distance,\n via: z.boolean().optional(),\n to_layer: layer_ref.optional(),\n trace_width: distance.optional(),\n})\n\nexport type RouteHintPoint = z.infer<typeof route_hint_point>\nexport type RouteHintPointInput = z.input<typeof route_hint_point>\n","import { z } from \"zod\"\nimport { point, type Point, getZodPrefixedIdWithDefault } from \"src/common\"\nimport { layer_ref, type LayerRef } from \"src/pcb/properties/layer_ref\"\nimport { rotation, length, type Rotation, type Length } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_component = z\n .object({\n type: z.literal(\"pcb_component\"),\n pcb_component_id: getZodPrefixedIdWithDefault(\"pcb_component\"),\n source_component_id: z.string(),\n center: point,\n layer: layer_ref,\n rotation: rotation,\n width: length,\n height: length,\n subcircuit_id: z.string().optional(),\n pcb_group_id: z.string().optional(),\n })\n .describe(\"Defines a component on the PCB\")\n\nexport type PcbComponentInput = z.input<typeof pcb_component>\ntype InferredPcbComponent = z.infer<typeof pcb_component>\n\n/**\n * Defines a component on the PCB\n */\nexport interface PcbComponent {\n type: \"pcb_component\"\n pcb_component_id: string\n source_component_id: string\n subcircuit_id?: string\n center: Point\n layer: LayerRef\n rotation: Rotation\n width: Length\n height: Length\n pcb_group_id?: string\n}\n\n/**\n * @deprecated use PcbComponent\n */\nexport type PCBComponent = PcbComponent\n\nexpectTypesMatch<PcbComponent, InferredPcbComponent>(true)\n","import { z } from \"zod\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport { distance, type Distance } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nconst pcb_hole_circle_or_square = z.object({\n type: z.literal(\"pcb_hole\"),\n pcb_hole_id: getZodPrefixedIdWithDefault(\"pcb_hole\"),\n pcb_group_id: z.string().optional(),\n subcircuit_id: z.string().optional(),\n hole_shape: z.enum([\"circle\", \"square\"]),\n hole_diameter: z.number(),\n x: distance,\n y: distance,\n})\n\nexport const pcb_hole_circle_or_square_shape =\n pcb_hole_circle_or_square.describe(\n \"Defines a circular or square hole on the PCB\",\n )\n\nexport type PcbHoleCircleOrSquareInput = z.input<\n typeof pcb_hole_circle_or_square\n>\ntype InferredPcbHoleCircleOrSquare = z.infer<typeof pcb_hole_circle_or_square>\n\n/**\n * Defines a circular or square hole on the PCB\n */\nexport interface PcbHoleCircleOrSquare {\n type: \"pcb_hole\"\n pcb_hole_id: string\n pcb_group_id?: string\n subcircuit_id?: string\n hole_shape: \"circle\" | \"square\"\n hole_diameter: number\n x: Distance\n y: Distance\n}\n\nexpectTypesMatch<PcbHoleCircleOrSquare, InferredPcbHoleCircleOrSquare>(true)\n\nconst pcb_hole_oval = z.object({\n type: z.literal(\"pcb_hole\"),\n pcb_hole_id: getZodPrefixedIdWithDefault(\"pcb_hole\"),\n pcb_group_id: z.string().optional(),\n subcircuit_id: z.string().optional(),\n hole_shape: z.literal(\"oval\"),\n hole_width: z.number(),\n hole_height: z.number(),\n x: distance,\n y: distance,\n})\n\nexport const pcb_hole_oval_shape = pcb_hole_oval.describe(\n \"Defines an oval hole on the PCB\",\n)\n\nexport type PcbHoleOvalInput = z.input<typeof pcb_hole_oval>\ntype InferredPcbHoleOval = z.infer<typeof pcb_hole_oval>\n\n/**\n * Defines an oval hole on the PCB\n */\nexport interface PcbHoleOval {\n type: \"pcb_hole\"\n pcb_hole_id: string\n pcb_group_id?: string\n subcircuit_id?: string\n hole_shape: \"oval\"\n hole_width: number\n hole_height: number\n x: Distance\n y: Distance\n}\n\nexpectTypesMatch<PcbHoleOval, InferredPcbHoleOval>(true)\n\nexport const pcb_hole = pcb_hole_circle_or_square.or(pcb_hole_oval)\n\n/**\n * @deprecated Use PcbHoleCircleOrSquare or PcbHoleOval\n */\nexport type PCBHoleInput = z.input<typeof pcb_hole>\n/**\n * @deprecated Use PcbHoleCircleOrSquare or PcbHoleOval\n */\nexport type PCBHole = z.infer<typeof pcb_hole>\n\nexport type PcbHole = PcbHoleCircleOrSquare | PcbHoleOval\n","import { z } from \"zod\"\nimport { distance, type Distance } from \"src/units\"\nimport { layer_ref, type LayerRef } from \"src/pcb/properties/layer_ref\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nconst pcb_plated_hole_circle = z.object({\n type: z.literal(\"pcb_plated_hole\"),\n shape: z.literal(\"circle\"),\n pcb_group_id: z.string().optional(),\n subcircuit_id: z.string().optional(),\n outer_diameter: z.number(),\n hole_diameter: z.number(),\n x: distance,\n y: distance,\n layers: z.array(layer_ref),\n port_hints: z.array(z.string()).optional(),\n pcb_component_id: z.string().optional(),\n pcb_port_id: z.string().optional(),\n pcb_plated_hole_id: getZodPrefixedIdWithDefault(\"pcb_plated_hole\"),\n})\n\n/**\n * Defines a circular plated hole on the PCB\n */\nexport interface PcbPlatedHoleCircle {\n type: \"pcb_plated_hole\"\n shape: \"circle\"\n pcb_group_id?: string\n subcircuit_id?: string\n outer_diameter: number\n hole_diameter: number\n x: Distance\n y: Distance\n layers: LayerRef[]\n port_hints?: string[]\n pcb_component_id?: string\n pcb_port_id?: string\n pcb_plated_hole_id: string\n}\n\nconst pcb_plated_hole_oval = z.object({\n type: z.literal(\"pcb_plated_hole\"),\n shape: z.enum([\"oval\", \"pill\"]),\n pcb_group_id: z.string().optional(),\n subcircuit_id: z.string().optional(),\n outer_width: z.number(),\n outer_height: z.number(),\n hole_width: z.number(),\n hole_height: z.number(),\n x: distance,\n y: distance,\n layers: z.array(layer_ref),\n port_hints: z.array(z.string()).optional(),\n pcb_component_id: z.string().optional(),\n pcb_port_id: z.string().optional(),\n pcb_plated_hole_id: getZodPrefixedIdWithDefault(\"pcb_plated_hole\"),\n})\n\n/**\n * Defines an oval or pill-shaped plated hole on the PCB\n */\nexport interface PcbPlatedHoleOval {\n type: \"pcb_plated_hole\"\n shape: \"oval\" | \"pill\"\n pcb_group_id?: string\n subcircuit_id?: string\n outer_width: number\n outer_height: number\n hole_width: number\n hole_height: number\n x: Distance\n y: Distance\n layers: LayerRef[]\n port_hints?: string[]\n pcb_component_id?: string\n pcb_port_id?: string\n pcb_plated_hole_id: string\n}\n\nconst pcb_circular_hole_with_rect_pad = z.object({\n type: z.literal(\"pcb_plated_hole\"),\n shape: z.literal(\"circular_hole_with_rect_pad\"),\n pcb_group_id: z.string().optional(),\n subcircuit_id: z.string().optional(),\n hole_shape: z.literal(\"circle\"),\n pad_shape: z.literal(\"rect\"),\n hole_diameter: z.number(),\n rect_pad_width: z.number(),\n rect_pad_height: z.number(),\n x: distance,\n y: distance,\n layers: z.array(layer_ref),\n port_hints: z.array(z.string()).optional(),\n pcb_component_id: z.string().optional(),\n pcb_port_id: z.string().optional(),\n pcb_plated_hole_id: getZodPrefixedIdWithDefault(\"pcb_plated_hole\"),\n})\nconst pcb_pill_hole_with_rect_pad = z.object({\n type: z.literal(\"pcb_plated_hole\"),\n shape: z.literal(\"pill_hole_with_rect_pad\"),\n pcb_group_id: z.string().optional(),\n subcircuit_id: z.string().optional(),\n hole_shape: z.literal(\"pill\"),\n pad_shape: z.literal(\"rect\"),\n hole_width: z.number(),\n hole_height: z.number(),\n rect_pad_width: z.number(),\n rect_pad_height: z.number(),\n x: distance,\n y: distance,\n layers: z.array(layer_ref),\n port_hints: z.array(z.string()).optional(),\n pcb_component_id: z.string().optional(),\n pcb_port_id: z.string().optional(),\n pcb_plated_hole_id: getZodPrefixedIdWithDefault(\"pcb_plated_hole\"),\n})\nexport interface PcbHolePillWithRectPad {\n type: \"pcb_plated_hole\"\n shape: \"pill_hole_with_rect_pad\"\n pcb_group_id?: string\n subcircuit_id?: string\n hole_shape: \"pill\"\n pad_shape: \"rect\"\n hole_width: number\n hole_height: number\n rect_pad_width: number\n rect_pad_height: number\n x: Distance\n y: Distance\n layers: LayerRef[]\n port_hints?: string[]\n pcb_component_id?: string\n pcb_port_id?: string\n pcb_plated_hole_id: string\n}\n\nexport interface PcbHoleCircularWithRectPad {\n type: \"pcb_plated_hole\"\n shape: \"circular_hole_with_rect_pad\"\n pcb_group_id?: string\n subcircuit_id?: string\n hole_shape: \"circle\"\n pad_shape: \"rect\"\n hole_diameter: number\n rect_pad_width: number\n rect_pad_height: number\n x: Distance\n y: Distance\n layers: LayerRef[]\n port_hints?: string[]\n pcb_component_id?: string\n pcb_port_id?: string\n pcb_plated_hole_id: string\n}\n\nexport const pcb_plated_hole = z.union([\n pcb_plated_hole_circle,\n pcb_plated_hole_oval,\n pcb_circular_hole_with_rect_pad,\n pcb_pill_hole_with_rect_pad,\n])\nexport type PcbPlatedHole =\n | PcbPlatedHoleCircle\n | PcbPlatedHoleOval\n | PcbHoleCircularWithRectPad\n | PcbHolePillWithRectPad\n\nexpectTypesMatch<PcbPlatedHoleCircle, z.infer<typeof pcb_plated_hole_circle>>(\n true,\n)\nexpectTypesMatch<PcbPlatedHoleOval, z.infer<typeof pcb_plated_hole_oval>>(true)\nexpectTypesMatch<\n PcbHoleCircularWithRectPad,\n z.infer<typeof pcb_circular_hole_with_rect_pad>\n>(true)\nexpectTypesMatch<\n PcbHolePillWithRectPad,\n z.infer<typeof pcb_pill_hole_with_rect_pad>\n>(true)\n/**\n * @deprecated use PcbPlatedHole\n */\nexport type PCBPlatedHole = PcbPlatedHole\n\n/**\n * @deprecated use PcbPlatedHoleInput\n */\nexport type PCBPlatedHoleInput = z.input<typeof pcb_plated_hole>\nexport type PcbPlatedHoleInput = z.input<typeof pcb_plated_hole>\n","import { z } from \"zod\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport { distance, type Distance } from \"src/units\"\nimport { layer_ref, type LayerRef } from \"src/pcb/properties/layer_ref\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_port = z\n .object({\n type: z.literal(\"pcb_port\"),\n pcb_port_id: getZodPrefixedIdWithDefault(\"pcb_port\"),\n pcb_group_id: z.string().optional(),\n subcircuit_id: z.string().optional(),\n source_port_id: z.string(),\n pcb_component_id: z.string(),\n x: distance,\n y: distance,\n layers: z.array(layer_ref),\n })\n .describe(\"Defines a port on the PCB\")\n\nexport type PcbPortInput = z.input<typeof pcb_port>\ntype InferredPcbPort = z.infer<typeof pcb_port>\n\n/**\n * Defines a port on the PCB\n */\nexport interface PcbPort {\n type: \"pcb_port\"\n pcb_port_id: string\n pcb_group_id?: string\n subcircuit_id?: string\n source_port_id: string\n pcb_component_id: string\n x: Distance\n y: Distance\n layers: LayerRef[]\n}\n\n/**\n * @deprecated use PcbPort\n */\nexport type PCBPort = PcbPort\n\n/**\n * @deprecated use PcbPortInput\n */\nexport type PCBPortInput = PcbPortInput\n\nexpectTypesMatch<PcbPort, InferredPcbPort>(true)\n","import { z } from \"zod\"\nimport { distance, type Distance, rotation, type Rotation } from \"src/units\"\nimport { layer_ref, type LayerRef } from \"src/pcb/properties/layer_ref\"\nimport { getZodPrefixedIdWithDefault, point, type Point } from \"src/common\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nconst pcb_smtpad_circle = z.object({\n type: z.literal(\"pcb_smtpad\"),\n shape: z.literal(\"circle\"),\n pcb_smtpad_id: getZodPrefixedIdWithDefault(\"pcb_smtpad\"),\n pcb_group_id: z.string().optional(),\n subcircuit_id: z.string().optional(),\n x: distance,\n y: distance,\n radius: z.number(),\n layer: layer_ref,\n port_hints: z.array(z.string()).optional(),\n pcb_component_id: z.string().optional(),\n pcb_port_id: z.string().optional(),\n})\n\nconst pcb_smtpad_rect = z.object({\n type: z.literal(\"pcb_smtpad\"),\n shape: z.literal(\"rect\"),\n pcb_smtpad_id: getZodPrefixedIdWithDefault(\"pcb_smtpad\"),\n pcb_group_id: z.string().optional(),\n subcircuit_id: z.string().optional(),\n x: distance,\n y: distance,\n width: z.number(),\n height: z.number(),\n layer: layer_ref,\n port_hints: z.array(z.string()).optional(),\n pcb_component_id: z.string().optional(),\n pcb_port_id: z.string().optional(),\n})\n\nconst pcb_smtpad_rotated_rect = z.object({\n type: z.literal(\"pcb_smtpad\"),\n shape: z.literal(\"rotated_rect\"),\n pcb_smtpad_id: getZodPrefixedIdWithDefault(\"pcb_smtpad\"),\n pcb_group_id: z.string().optional(),\n subcircuit_id: z.string().optional(),\n x: distance,\n y: distance,\n width: z.number(),\n height: z.number(),\n ccw_rotation: rotation,\n layer: layer_ref,\n port_hints: z.array(z.string()).optional(),\n pcb_component_id: z.string().optional(),\n pcb_port_id: z.string().optional(),\n})\n\nexport const pcb_smtpad_pill = z.object({\n type: z.literal(\"pcb_smtpad\"),\n shape: z.literal(\"pill\"),\n pcb_smtpad_id: getZodPrefixedIdWithDefault(\"pcb_smtpad\"),\n pcb_group_id: z.string().optional(),\n subcircuit_id: z.string().optional(),\n x: distance,\n y: distance,\n width: z.number(),\n height: z.number(),\n radius: z.number(),\n layer: layer_ref,\n port_hints: z.array(z.string()).optional(),\n pcb_component_id: z.string().optional(),\n pcb_port_id: z.string().optional(),\n})\n\nconst pcb_smtpad_polygon = z.object({\n type: z.literal(\"pcb_smtpad\"),\n shape: z.literal(\"polygon\"),\n pcb_smtpad_id: getZodPrefixedIdWithDefault(\"pcb_smtpad\"),\n pcb_group_id: z.string().optional(),\n subcircuit_id: z.string().optional(),\n points: z.array(point),\n layer: layer_ref,\n port_hints: z.array(z.string()).optional(),\n pcb_component_id: z.string().optional(),\n pcb_port_id: z.string().optional(),\n})\n\nexport const pcb_smtpad = z\n .union([\n pcb_smtpad_circle,\n pcb_smtpad_rect,\n pcb_smtpad_rotated_rect,\n pcb_smtpad_pill,\n pcb_smtpad_polygon,\n ])\n .describe(\"Defines an SMT pad on the PCB\")\n\nexport type PCBSMTPadInput = z.input<typeof pcb_smtpad>\ntype PCBSMTPadCircle = z.infer<typeof pcb_smtpad_circle>\ntype PCBSMTPadRect = z.infer<typeof pcb_smtpad_rect>\ntype PCBSMTPadRotatedRect = z.infer<typeof pcb_smtpad_rotated_rect>\ntype PCBSMTPadPill = z.infer<typeof pcb_smtpad_pill>\ntype PCBSMTPadPolygon = z.infer<typeof pcb_smtpad_polygon>\n\n/**\n * Defines a circular SMT pad on the PCB\n */\nexport interface PcbSmtPadCircle {\n type: \"pcb_smtpad\"\n shape: \"circle\"\n pcb_smtpad_id: string\n pcb_group_id?: string\n subcircuit_id?: string\n x: Distance\n y: Distance\n radius: number\n layer: LayerRef\n port_hints?: string[]\n pcb_component_id?: string\n pcb_port_id?: string\n}\n\n/**\n * Defines a rectangular SMT pad on the PCB\n */\nexport interface PcbSmtPadRect {\n type: \"pcb_smtpad\"\n shape: \"rect\"\n pcb_smtpad_id: string\n pcb_group_id?: string\n subcircuit_id?: string\n x: Distance\n y: Distance\n width: number\n height: number\n layer: LayerRef\n port_hints?: string[]\n pcb_component_id?: string\n pcb_port_id?: string\n}\n\n/**\n * Defines a rotated rectangular SMT pad on the PCB\n */\nexport interface PcbSmtPadRotatedRect {\n type: \"pcb_smtpad\"\n shape: \"rotated_rect\"\n pcb_smtpad_id: string\n pcb_group_id?: string\n subcircuit_id?: string\n x: Distance\n y: Distance\n width: number\n height: number\n ccw_rotation: Rotation\n layer: LayerRef\n port_hints?: string[]\n pcb_component_id?: string\n pcb_port_id?: string\n}\n/**\n * Defines a pill-shaped SMT pad on the PCB (rounded rectangle).\n */\nexport interface PcbSmtPadPill {\n type: \"pcb_smtpad\"\n shape: \"pill\"\n pcb_smtpad_id: string\n pcb_group_id?: string\n subcircuit_id?: string\n x: Distance\n y: Distance\n width: number\n height: number\n radius: number\n layer: LayerRef\n port_hints?: string[]\n pcb_component_id?: string\n pcb_port_id?: string\n}\n\n/**\n * Defines a polygonal SMT pad on the PCB\n */\nexport interface PcbSmtPadPolygon {\n type: \"pcb_smtpad\"\n shape: \"polygon\"\n pcb_smtpad_id: string\n pcb_group_id?: string\n subcircuit_id?: string\n points: Point[]\n layer: LayerRef\n port_hints?: string[]\n pcb_component_id?: string\n pcb_port_id?: string\n}\n\nexport type PcbSmtPad =\n | PcbSmtPadCircle\n | PcbSmtPadRect\n | PcbSmtPadRotatedRect\n | PcbSmtPadPill\n | PcbSmtPadPolygon\n\n/**\n * @deprecated use PcbSmtPad\n */\nexport type PCBSMTPad = PcbSmtPad\n\nexpectTypesMatch<PcbSmtPadCircle, PCBSMTPadCircle>(true)\nexpectTypesMatch<PcbSmtPadRect, PCBSMTPadRect>(true)\nexpectTypesMatch<PcbSmtPadRotatedRect, PCBSMTPadRotatedRect>(true)\nexpectTypesMatch<PcbSmtPadPill, PCBSMTPadPill>(true)\nexpectTypesMatch<PcbSmtPadPolygon, PCBSMTPadPolygon>(true)\n","import { z } from \"zod\"\nimport { distance, type Distance } from \"src/units\"\nimport { layer_ref, type LayerRef } from \"src/pcb/properties/layer_ref\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nconst pcb_solder_paste_circle = z.object({\n type: z.literal(\"pcb_solder_paste\"),\n shape: z.literal(\"circle\"),\n pcb_solder_paste_id: getZodPrefixedIdWithDefault(\"pcb_solder_paste\"),\n pcb_group_id: z.string().optional(),\n subcircuit_id: z.string().optional(),\n x: distance,\n y: distance,\n radius: z.number(),\n layer: layer_ref,\n pcb_component_id: z.string().optional(),\n pcb_smtpad_id: z.string().optional(),\n})\n\nconst pcb_solder_paste_rect = z.object({\n type: z.literal(\"pcb_solder_paste\"),\n shape: z.literal(\"rect\"),\n pcb_solder_paste_id: getZodPrefixedIdWithDefault(\"pcb_solder_paste\"),\n pcb_group_id: z.string().optional(),\n subcircuit_id: z.string().optional(),\n x: distance,\n y: distance,\n width: z.number(),\n height: z.number(),\n layer: layer_ref,\n pcb_component_id: z.string().optional(),\n pcb_smtpad_id: z.string().optional(),\n})\nconst pcb_solder_paste_pill = z.object({\n type: z.literal(\"pcb_solder_paste\"),\n shape: z.literal(\"pill\"),\n pcb_solder_paste_id: getZodPrefixedIdWithDefault(\"pcb_solder_paste\"),\n pcb_group_id: z.string().optional(),\n subcircuit_id: z.string().optional(),\n x: distance,\n y: distance,\n width: z.number(),\n height: z.number(),\n radius: z.number(),\n layer: layer_ref,\n pcb_component_id: z.string().optional(),\n pcb_smtpad_id: z.string().optional(),\n})\nconst pcb_solder_paste_rotated_rect = z.object({\n type: z.literal(\"pcb_solder_paste\"),\n shape: z.literal(\"rotated_rect\"),\n pcb_solder_paste_id: getZodPrefixedIdWithDefault(\"pcb_solder_paste\"),\n pcb_group_id: z.string().optional(),\n subcircuit_id: z.string().optional(),\n x: distance,\n y: distance,\n width: z.number(),\n height: z.number(),\n ccw_rotation: distance,\n layer: layer_ref,\n pcb_component_id: z.string().optional(),\n pcb_smtpad_id: z.string().optional(),\n})\n\nconst pcb_solder_paste_oval = z.object({\n type: z.literal(\"pcb_solder_paste\"),\n shape: z.literal(\"oval\"),\n pcb_solder_paste_id: getZodPrefixedIdWithDefault(\"pcb_solder_paste\"),\n pcb_group_id: z.string().optional(),\n subcircuit_id: z.string().optional(),\n x: distance,\n y: distance,\n width: z.number(),\n height: z.number(),\n layer: layer_ref,\n pcb_component_id: z.string().optional(),\n pcb_smtpad_id: z.string().optional(),\n})\n\nexport const pcb_solder_paste = z\n .union([\n pcb_solder_paste_circle,\n pcb_solder_paste_rect,\n pcb_solder_paste_pill,\n pcb_solder_paste_rotated_rect,\n pcb_solder_paste_oval,\n ])\n .describe(\"Defines solderpaste on the PCB\")\n\nexport type PCBSolderPasteInput = z.input<typeof pcb_solder_paste>\ntype InferredPcbSolderPasteCircle = z.infer<typeof pcb_solder_paste_circle>\ntype InferredPcbSolderPasteRect = z.infer<typeof pcb_solder_paste_rect>\ntype InferredPcbSolderPastePill = z.infer<typeof pcb_solder_paste_pill>\ntype InferredPcbSolderPasteRotatedRect = z.infer<\n typeof pcb_solder_paste_rotated_rect\n>\ntype InferredPcbSolderPasteOval = z.infer<typeof pcb_solder_paste_oval>\n\n/**\n * Defines solderpaste on the PCB\n */\nexport interface PcbSolderPasteCircle {\n type: \"pcb_solder_paste\"\n shape: \"circle\"\n pcb_solder_paste_id: string\n pcb_group_id?: string\n subcircuit_id?: string\n x: Distance\n y: Distance\n radius: number\n layer: LayerRef\n pcb_component_id?: string\n pcb_smtpad_id?: string\n}\n\n/**\n * Defines solderpaste on the PCB\n */\nexport interface PcbSolderPasteRect {\n type: \"pcb_solder_paste\"\n shape: \"rect\"\n pcb_solder_paste_id: string\n pcb_group_id?: string\n subcircuit_id?: string\n x: Distance\n y: Distance\n width: number\n height: number\n layer: LayerRef\n pcb_component_id?: string\n pcb_smtpad_id?: string\n}\n/**\n * Defines solderpaste on the PCB\n */\nexport interface PcbSolderPastePill {\n type: \"pcb_solder_paste\"\n shape: \"pill\"\n pcb_solder_paste_id: string\n pcb_group_id?: string\n subcircuit_id?: string\n x: Distance\n y: Distance\n width: number\n height: number\n radius: number\n layer: LayerRef\n pcb_component_id?: string\n pcb_smtpad_id?: string\n}\n/**\n * Defines solderpaste on the PCB\n */\nexport interface PcbSolderPasteRotatedRect {\n type: \"pcb_solder_paste\"\n shape: \"rotated_rect\"\n pcb_solder_paste_id: string\n pcb_group_id?: string\n subcircuit_id?: string\n x: Distance\n y: Distance\n width: number\n height: number\n ccw_rotation: Distance\n layer: LayerRef\n pcb_component_id?: string\n pcb_smtpad_id?: string\n}\n/**\n * Defines solderpaste on the PCB\n */\nexport interface PcbSolderPasteOval {\n type: \"pcb_solder_paste\"\n shape: \"oval\"\n pcb_solder_paste_id: string\n pcb_group_id?: string\n subcircuit_id?: string\n x: Distance\n y: Distance\n width: number\n height: number\n layer: LayerRef\n pcb_component_id?: string\n pcb_smtpad_id?: string\n}\n\nexport type PcbSolderPaste =\n | PcbSolderPasteCircle\n | PcbSolderPasteRect\n | PcbSolderPastePill\n | PcbSolderPasteRotatedRect\n | PcbSolderPasteOval\n\nexpectTypesMatch<PcbSolderPasteCircle, InferredPcbSolderPasteCircle>(true)\nexpectTypesMatch<PcbSolderPasteRect, InferredPcbSolderPasteRect>(true)\nexpectTypesMatch<PcbSolderPastePill, InferredPcbSolderPastePill>(true)\nexpectTypesMatch<PcbSolderPasteRotatedRect, InferredPcbSolderPasteRotatedRect>(\n true,\n)\nexpectTypesMatch<PcbSolderPasteOval, InferredPcbSolderPasteOval>(true)\n","import { z } from \"zod\"\nimport { point, type Point, getZodPrefixedIdWithDefault } from \"src/common\"\nimport { layer_ref, type LayerRef } from \"src/pcb/properties/layer_ref\"\nimport { length, type Length } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_text = z\n .object({\n type: z.literal(\"pcb_text\"),\n pcb_text_id: getZodPrefixedIdWithDefault(\"pcb_text\"),\n pcb_group_id: z.string().optional(),\n subcircuit_id: z.string().optional(),\n text: z.string(),\n center: point,\n layer: layer_ref,\n width: length,\n height: length,\n lines: z.number(),\n // @ts-ignore\n align: z.enum([\"bottom-left\"]),\n })\n .describe(\"Defines text on the PCB\")\n\nexport type PcbTextInput = z.input<typeof pcb_text>\ntype InferredPcbText = z.infer<typeof pcb_text>\n\n/**\n * Defines text on the PCB\n */\nexport interface PcbText {\n type: \"pcb_text\"\n pcb_text_id: string\n pcb_group_id?: string\n subcircuit_id?: string\n text: string\n center: Point\n layer: LayerRef\n width: Length\n height: Length\n lines: number\n // @ts-ignore\n align: \"bottom-left\"\n}\n\n/**\n * @deprecated use PcbText\n */\nexport type PCBText = PcbText\n\nexpectTypesMatch<PcbText, InferredPcbText>(true)\n","import { z } from \"zod\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport { distance, type Distance } from \"src/units\"\nimport { layer_ref, type LayerRef } from \"src/pcb/properties/layer_ref\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_trace_route_point_wire = z.object({\n route_type: z.literal(\"wire\"),\n x: distance,\n y: distance,\n width: distance,\n start_pcb_port_id: z.string().optional(),\n end_pcb_port_id: z.string().optional(),\n layer: layer_ref,\n})\n\nexport const pcb_trace_route_point_via = z.object({\n route_type: z.literal(\"via\"),\n x: distance,\n y: distance,\n hole_diameter: distance.optional(),\n outer_diameter: distance.optional(),\n from_layer: z.string(),\n to_layer: z.string(),\n})\n\nexport const pcb_trace_route_point = z.union([\n pcb_trace_route_point_wire,\n pcb_trace_route_point_via,\n])\ntype InferredPcbTraceRoutePoint = z.infer<typeof pcb_trace_route_point>\n\nexport const pcb_trace = z\n .object({\n type: z.literal(\"pcb_trace\"),\n source_trace_id: z.string().optional(),\n pcb_component_id: z.string().optional(),\n pcb_trace_id: getZodPrefixedIdWithDefault(\"pcb_trace\"),\n pcb_group_id: z.string().optional(),\n subcircuit_id: z.string().optional(),\n route_thickness_mode: z\n .enum([\"constant\", \"interpolated\"])\n .default(\"constant\")\n .optional(),\n route_order_index: z.number().optional(),\n should_round_corners: z.boolean().optional(),\n trace_length: z.number().optional(),\n route: z.array(pcb_trace_route_point),\n })\n .describe(\"Defines a trace on the PCB\")\n\nexport type PcbTraceInput = z.input<typeof pcb_trace>\ntype InferredPcbTrace = z.infer<typeof pcb_trace>\n\nexport interface PcbTraceRoutePointWire {\n route_type: \"wire\"\n x: Distance\n y: Distance\n width: Distance\n start_pcb_port_id?: string\n end_pcb_port_id?: string\n layer: LayerRef\n}\n\nexport interface PcbTraceRoutePointVia {\n route_type: \"via\"\n x: Distance\n y: Distance\n hole_diameter?: Distance\n outer_diameter?: Distance\n from_layer: string\n to_layer: string\n}\n\nexport type PcbTraceRoutePoint = PcbTraceRoutePointWire | PcbTraceRoutePointVia\n\n/**\n * Defines a trace on the PCB\n */\nexport interface PcbTrace {\n type: \"pcb_trace\"\n source_trace_id?: string\n pcb_component_id?: string\n pcb_group_id?: string\n subcircuit_id?: string\n pcb_trace_id: string\n /**\n * The order that this trace was routed in. This can be used to debug the\n * autorouter and to understand the trace path better\n *\n * The route_order_index should be relative to a subcircuit\n */\n route_order_index?: number\n route_thickness_mode?: \"constant\" | \"interpolated\"\n should_round_corners?: boolean\n trace_length?: number\n route: Array<PcbTraceRoutePoint>\n}\n\n/**\n * @deprecated use PcbTrace\n */\nexport type PCBTrace = PcbTrace\n\n/**\n * @deprecated use PcbTraceInput\n */\nexport type PCBTraceInput = PcbTraceInput\n\nexpectTypesMatch<PcbTraceRoutePoint, InferredPcbTraceRoutePoint>(true)\nexpectTypesMatch<PcbTrace, InferredPcbTrace>(true)\n","import { z } from \"zod\"\nimport { point, type Point, getZodPrefixedIdWithDefault } from \"src/common\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_trace_error = z\n .object({\n type: z.literal(\"pcb_trace_error\"),\n pcb_trace_error_id: getZodPrefixedIdWithDefault(\"pcb_trace_error\"),\n error_type: z.literal(\"pcb_trace_error\"),\n message: z.string(),\n center: point.optional(),\n pcb_trace_id: z.string(),\n source_trace_id: z.string(),\n pcb_component_ids: z.array(z.string()),\n pcb_port_ids: z.array(z.string()),\n })\n .describe(\"Defines a trace error on the PCB\")\n\nexport type PcbTraceErrorInput = z.input<typeof pcb_trace_error>\ntype InferredPcbTraceError = z.infer<typeof pcb_trace_error>\n\n/**\n * Defines a trace error on the PCB\n */\nexport interface PcbTraceError {\n type: \"pcb_trace_error\"\n pcb_trace_error_id: string\n error_type: \"pcb_trace_error\"\n message: string\n center?: Point\n pcb_trace_id: string\n source_trace_id: string\n pcb_component_ids: string[]\n pcb_port_ids: string[]\n}\n\n/**\n * @deprecated use PcbTraceError\n */\nexport type PCBTraceError = PcbTraceError\n\nexpectTypesMatch<PcbTraceError, InferredPcbTraceError>(true)\n","import { z } from \"zod\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_port_not_matched_error = z\n .object({\n type: z.literal(\"pcb_port_not_matched_error\"),\n pcb_error_id: getZodPrefixedIdWithDefault(\"pcb_error\"),\n message: z.string(),\n pcb_component_ids: z.array(z.string()),\n })\n .describe(\"Defines a trace error on the PCB where a port is not matched\")\n\nexport type PcbPortNotMatchedErrorInput = z.input<\n typeof pcb_port_not_matched_error\n>\ntype InferredPcbPortNotMatchedError = z.infer<typeof pcb_port_not_matched_error>\n\n/**\n * Defines a trace error on the PCB where a port is not matched\n */\nexport interface PcbPortNotMatchedError {\n type: \"pcb_port_not_matched_error\"\n pcb_error_id: string\n message: string\n pcb_component_ids: string[]\n}\n\n/**\n * @deprecated use PcbPortNotMatchedError\n */\nexport type PCBPortNotMatchedError = PcbPortNotMatchedError\n\nexpectTypesMatch<PcbPortNotMatchedError, InferredPcbPortNotMatchedError>(true)\n","import { z } from \"zod\"\nimport { distance, type Distance } from \"src/units\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport { layer_ref, type LayerRef } from \"src/pcb/properties/layer_ref\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_via = z\n .object({\n type: z.literal(\"pcb_via\"),\n pcb_via_id: getZodPrefixedIdWithDefault(\"pcb_via\"),\n pcb_group_id: z.string().optional(),\n subcircuit_id: z.string().optional(),\n x: distance,\n y: distance,\n outer_diameter: distance.default(\"0.6mm\"),\n hole_diameter: distance.default(\"0.25mm\"),\n /** @deprecated */\n from_layer: layer_ref.optional(),\n /** @deprecated */\n to_layer: layer_ref.optional(),\n layers: z.array(layer_ref),\n pcb_trace_id: z.string().optional(),\n })\n .describe(\"Defines a via on the PCB\")\n\nexport type PcbViaInput = z.input<typeof pcb_via>\ntype InferredPcbVia = z.infer<typeof pcb_via>\n\n/**\n * Defines a via on the PCB\n */\nexport interface PcbVia {\n type: \"pcb_via\"\n pcb_via_id: string\n pcb_group_id?: string\n subcircuit_id?: string\n x: Distance\n y: Distance\n outer_diameter: Distance\n hole_diameter: Distance\n /** @deprecated */\n from_layer?: LayerRef\n /** @deprecated */\n to_layer?: LayerRef\n layers: LayerRef[]\n pcb_trace_id?: string\n}\n\n/**\n * @deprecated use PcbVia\n */\nexport type PCBVia = PcbVia\n\nexpectTypesMatch<PcbVia, InferredPcbVia>(true)\n","import { z } from \"zod\"\nimport { point, type Point, getZodPrefixedIdWithDefault } from \"src/common\"\nimport { length, type Length } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_board = z\n .object({\n type: z.literal(\"pcb_board\"),\n pcb_board_id: getZodPrefixedIdWithDefault(\"pcb_board\"),\n is_subcircuit: z.boolean().optional(),\n subcircuit_id: z.string().optional(),\n width: length,\n height: length,\n center: point,\n thickness: length.optional().default(1.4),\n num_layers: z.number().optional().default(4),\n outline: z.array(point).optional(),\n material: z.enum([\"fr4\", \"fr1\"]).default(\"fr4\"),\n })\n .describe(\"Defines the board outline of the PCB\")\n\n/**\n * Defines the board outline of the PCB\n */\nexport interface PcbBoard {\n type: \"pcb_board\"\n pcb_board_id: string\n is_subcircuit?: boolean\n subcircuit_id?: string\n width: Length\n height: Length\n thickness: Length\n num_layers: number\n center: Point\n outline?: Point[]\n material: \"fr4\" | \"fr1\"\n}\n\nexport type PcbBoardInput = z.input<typeof pcb_board>\ntype InferredPcbBoard = z.infer<typeof pcb_board>\n\n/**\n * @deprecated use PcbBoard\n */\nexport type PCBBoard = PcbBoard\n\nexpectTypesMatch<PcbBoard, InferredPcbBoard>(true)\n","import { z } from \"zod\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_placement_error = z\n .object({\n type: z.literal(\"pcb_placement_error\"),\n pcb_placement_error_id: getZodPrefixedIdWithDefault(\"pcb_placement_error\"),\n message: z.string(),\n })\n .describe(\"Defines a placement error on the PCB\")\n\nexport type PcbPlacementErrorInput = z.input<typeof pcb_placement_error>\ntype InferredPcbPlacementError = z.infer<typeof pcb_placement_error>\n\n/**\n * Defines a placement error on the PCB\n */\nexport interface PcbPlacementError {\n type: \"pcb_placement_error\"\n pcb_placement_error_id: string\n message: string\n}\n\n/**\n * @deprecated use PcbPlacementError\n */\nexport type PCBPlacementError = PcbPlacementError\n\nexpectTypesMatch<PcbPlacementError, InferredPcbPlacementError>(true)\n","import { z } from \"zod\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport { route_hint_point, type RouteHintPoint } from \"src/pcb\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\n/**\n * A hint that can be used during generation of a PCB trace.\n */\nexport interface PcbTraceHint {\n type: \"pcb_trace_hint\"\n pcb_trace_hint_id: string\n pcb_port_id: string\n pcb_component_id: string\n route: RouteHintPoint[]\n}\n\nexport const pcb_trace_hint = z\n .object({\n type: z.literal(\"pcb_trace_hint\"),\n pcb_trace_hint_id: getZodPrefixedIdWithDefault(\"pcb_trace_hint\"),\n pcb_port_id: z.string(),\n pcb_component_id: z.string(),\n route: z.array(route_hint_point),\n })\n .describe(\"A hint that can be used during generation of a PCB trace\")\n\nexport type PcbTraceHintInput = z.input<typeof pcb_trace_hint>\ntype InferredPcbTraceHint = z.infer<typeof pcb_trace_hint>\n\n/**\n * @deprecated use PcbTraceHint\n */\nexport type PCBTraceHint = PcbTraceHint\n\nexpectTypesMatch<PcbTraceHint, InferredPcbTraceHint>(true)\n","import { z } from \"zod\"\nimport { distance, type Distance } from \"src/units\"\nimport {\n layer_ref,\n type LayerRef,\n type VisibleLayer,\n visible_layer,\n} from \"src/pcb/properties/layer_ref\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_silkscreen_line = z\n .object({\n type: z.literal(\"pcb_silkscreen_line\"),\n pcb_silkscreen_line_id: getZodPrefixedIdWithDefault(\"pcb_silkscreen_line\"),\n pcb_component_id: z.string(),\n pcb_group_id: z.string().optional(),\n subcircuit_id: z.string().optional(),\n stroke_width: distance.default(\"0.1mm\"),\n x1: distance,\n y1: distance,\n x2: distance,\n y2: distance,\n layer: visible_layer,\n })\n .describe(\"Defines a silkscreen line on the PCB\")\n\nexport type PcbSilkscreenLineInput = z.input<typeof pcb_silkscreen_line>\ntype InferredPcbSilkscreenLine = z.infer<typeof pcb_silkscreen_line>\n\n/**\n * Defines a silkscreen line on the PCB\n */\nexport interface PcbSilkscreenLine {\n type: \"pcb_silkscreen_line\"\n pcb_silkscreen_line_id: string\n pcb_component_id: string\n pcb_group_id?: string\n subcircuit_id?: string\n stroke_width: Distance\n x1: Distance\n y1: Distance\n x2: Distance\n y2: Distance\n layer: VisibleLayer\n}\n\n/**\n * @deprecated use PcbSilkscreenLine\n */\nexport type PCBSilkscreenLine = PcbSilkscreenLine\n\nexpectTypesMatch<PcbSilkscreenLine, InferredPcbSilkscreenLine>(true)\n","import { z } from \"zod\"\nimport { point, type Point, getZodPrefixedIdWithDefault } from \"src/common\"\nimport {\n visible_layer,\n type VisibleLayerRef,\n} from \"src/pcb/properties/layer_ref\"\nimport { length, type Length } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_silkscreen_path = z\n .object({\n type: z.literal(\"pcb_silkscreen_path\"),\n pcb_silkscreen_path_id: getZodPrefixedIdWithDefault(\"pcb_silkscreen_path\"),\n pcb_component_id: z.string(),\n pcb_group_id: z.string().optional(),\n subcircuit_id: z.string().optional(),\n layer: visible_layer,\n route: z.array(point),\n stroke_width: length,\n })\n .describe(\"Defines a silkscreen path on the PCB\")\n\nexport type PcbSilkscreenPathInput = z.input<typeof pcb_silkscreen_path>\ntype InferredPcbSilkscreenPath = z.infer<typeof pcb_silkscreen_path>\n\n/**\n * Defines a silkscreen path on the PCB\n */\nexport interface PcbSilkscreenPath {\n type: \"pcb_silkscreen_path\"\n pcb_silkscreen_path_id: string\n pcb_component_id: string\n pcb_group_id?: string\n subcircuit_id?: string\n layer: VisibleLayerRef\n route: Point[]\n stroke_width: Length\n}\n\n/**\n * @deprecated use PcbSilkscreenPath\n */\nexport type PcbSilkscreenPathDeprecated = PcbSilkscreenPath\n\nexpectTypesMatch<PcbSilkscreenPath, InferredPcbSilkscreenPath>(true)\n","import { z } from \"zod\"\nimport { point, type Point, getZodPrefixedIdWithDefault } from \"src/common\"\nimport { layer_ref, type LayerRef } from \"src/pcb/properties/layer_ref\"\nimport { distance, length, type Length } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\nimport {\n ninePointAnchor,\n type NinePointAnchor,\n} from \"src/common/NinePointAnchor\"\n\nexport const pcb_silkscreen_text = z\n .object({\n type: z.literal(\"pcb_silkscreen_text\"),\n pcb_silkscreen_text_id: getZodPrefixedIdWithDefault(\"pcb_silkscreen_text\"),\n pcb_group_id: z.string().optional(),\n subcircuit_id: z.string().optional(),\n font: z.literal(\"tscircuit2024\").default(\"tscircuit2024\"),\n font_size: distance.default(\"0.2mm\"),\n pcb_component_id: z.string(),\n text: z.string(),\n ccw_rotation: z.number().optional(),\n layer: layer_ref,\n is_mirrored: z.boolean().default(false).optional(),\n anchor_position: point.default({ x: 0, y: 0 }),\n anchor_alignment: ninePointAnchor.default(\"center\"),\n })\n .describe(\"Defines silkscreen text on the PCB\")\n\nexport type PcbSilkscreenTextInput = z.input<typeof pcb_silkscreen_text>\ntype InferredPcbSilkscreenText = z.infer<typeof pcb_silkscreen_text>\n\n/**\n * Defines silkscreen text on the PCB\n */\nexport interface PcbSilkscreenText {\n type: \"pcb_silkscreen_text\"\n pcb_silkscreen_text_id: string\n pcb_group_id?: string\n subcircuit_id?: string\n font: \"tscircuit2024\"\n font_size: Length\n pcb_component_id: string\n text: string\n ccw_rotation?: number\n layer: LayerRef\n is_mirrored?: boolean\n anchor_position: Point\n anchor_alignment: NinePointAnchor\n}\n\n/**\n * @deprecated use PcbSilkscreenText\n */\nexport type PCBSilkscreenText = PcbSilkscreenText\n\nexpectTypesMatch<PcbSilkscreenText, InferredPcbSilkscreenText>(true)\n","import { z } from \"zod\"\nimport { point, type Point, getZodPrefixedIdWithDefault } from \"src/common\"\nimport { layer_ref, type LayerRef } from \"src/pcb/properties/layer_ref\"\nimport { length, type Length } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_silkscreen_rect = z\n .object({\n type: z.literal(\"pcb_silkscreen_rect\"),\n pcb_silkscreen_rect_id: getZodPrefixedIdWithDefault(\"pcb_silkscreen_rect\"),\n pcb_component_id: z.string(),\n pcb_group_id: z.string().optional(),\n subcircuit_id: z.string().optional(),\n center: point,\n width: length,\n height: length,\n layer: layer_ref,\n stroke_width: length.default(\"1mm\"),\n is_filled: z.boolean().default(true).optional(),\n has_stroke: z.boolean().optional(),\n is_stroke_dashed: z.boolean().optional(),\n })\n .describe(\"Defines a silkscreen rect on the PCB\")\n\nexport type PcbSilkscreenRectInput = z.input<typeof pcb_silkscreen_rect>\ntype InferredPcbSilkscreenRect = z.infer<typeof pcb_silkscreen_rect>\n\n/**\n * Defines a silkscreen rect on the PCB\n */\nexport interface PcbSilkscreenRect {\n type: \"pcb_silkscreen_rect\"\n pcb_silkscreen_rect_id: string\n pcb_component_id: string\n pcb_group_id?: string\n subcircuit_id?: string\n center: Point\n width: Length\n height: Length\n layer: LayerRef\n stroke_width: Length\n is_filled?: boolean\n has_stroke?: boolean\n is_stroke_dashed?: boolean\n}\n\n/**\n * @deprecated use PcbSilkscreenRect\n */\nexport type PcbSilkscreenRectOld = PcbSilkscreenRect\n\nexpectTypesMatch<PcbSilkscreenRect, InferredPcbSilkscreenRect>(true)\n","import { z } from \"zod\"\nimport { point, type Point, getZodPrefixedIdWithDefault } from \"src/common\"\nimport {\n layer_ref,\n visible_layer,\n type LayerRef,\n type VisibleLayer,\n} from \"src/pcb/properties/layer_ref\"\nimport { length, type Length } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_silkscreen_circle = z\n .object({\n type: z.literal(\"pcb_silkscreen_circle\"),\n pcb_silkscreen_circle_id: getZodPrefixedIdWithDefault(\n \"pcb_silkscreen_circle\",\n ),\n pcb_component_id: z.string(),\n pcb_group_id: z.string().optional(),\n subcircuit_id: z.string().optional(),\n center: point,\n radius: length,\n layer: visible_layer,\n stroke_width: length.default(\"1mm\"),\n })\n .describe(\"Defines a silkscreen circle on the PCB\")\n\nexport type PcbSilkscreenCircleInput = z.input<typeof pcb_silkscreen_circle>\ntype InferredPcbSilkscreenCircle = z.infer<typeof pcb_silkscreen_circle>\n\n/**\n * Defines a silkscreen circle on the PCB\n */\nexport interface PcbSilkscreenCircle {\n type: \"pcb_silkscreen_circle\"\n pcb_silkscreen_circle_id: string\n pcb_component_id: string\n pcb_group_id?: string\n subcircuit_id?: string\n center: Point\n radius: Length\n layer: VisibleLayer\n stroke_width: Length\n}\n\nexpectTypesMatch<PcbSilkscreenCircle, InferredPcbSilkscreenCircle>(true)\n","import { z } from \"zod\"\nimport { point, type Point, getZodPrefixedIdWithDefault } from \"src/common\"\nimport {\n layer_ref,\n type LayerRef,\n visible_layer,\n type VisibleLayer,\n} from \"src/pcb/properties/layer_ref\"\nimport { distance, type Distance } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_silkscreen_oval = z\n .object({\n type: z.literal(\"pcb_silkscreen_oval\"),\n pcb_silkscreen_oval_id: getZodPrefixedIdWithDefault(\"pcb_silkscreen_oval\"),\n pcb_component_id: z.string(),\n pcb_group_id: z.string().optional(),\n subcircuit_id: z.string().optional(),\n center: point,\n radius_x: distance,\n radius_y: distance,\n layer: visible_layer,\n })\n .describe(\"Defines a silkscreen oval on the PCB\")\n\nexport type PcbSilkscreenOvalInput = z.input<typeof pcb_silkscreen_oval>\ntype InferredPcbSilkscreenOval = z.infer<typeof pcb_silkscreen_oval>\n\n/**\n * Defines a silkscreen oval on the PCB\n */\nexport interface PcbSilkscreenOval {\n type: \"pcb_silkscreen_oval\"\n pcb_silkscreen_oval_id: string\n pcb_component_id: string\n pcb_group_id?: string\n subcircuit_id?: string\n center: Point\n radius_x: Distance\n radius_y: Distance\n layer: VisibleLayer\n}\n\n/**\n * @deprecated use PcbSilkscreenOval\n */\nexport type PcbSilkscreenOvalDeprecated = PcbSilkscreenOval\n\nexpectTypesMatch<PcbSilkscreenOval, InferredPcbSilkscreenOval>(true)\n","import { z } from \"zod\"\nimport { point, type Point } from \"src/common\"\nimport { distance, type Length } from \"src/units\"\nimport {\n visible_layer,\n type LayerRef,\n type VisibleLayer,\n} from \"src/pcb/properties/layer_ref\"\nimport { getZodPrefixedIdWithDefault } from \"src/common/getZodPrefixedIdWithDefault\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_fabrication_note_text = z\n .object({\n type: z.literal(\"pcb_fabrication_note_text\"),\n pcb_fabrication_note_text_id: getZodPrefixedIdWithDefault(\n \"pcb_fabrication_note_text\",\n ),\n subcircuit_id: z.string().optional(),\n pcb_group_id: z.string().optional(),\n font: z.literal(\"tscircuit2024\").default(\"tscircuit2024\"),\n font_size: distance.default(\"1mm\"),\n pcb_component_id: z.string(),\n text: z.string(),\n layer: visible_layer,\n anchor_position: point.default({ x: 0, y: 0 }),\n anchor_alignment: z\n .enum([\"center\", \"top_left\", \"top_right\", \"bottom_left\", \"bottom_right\"])\n .default(\"center\"),\n color: z.string().optional(),\n })\n .describe(\n \"Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators\",\n )\n\nexport type PcbFabricationNoteTextInput = z.input<\n typeof pcb_fabrication_note_text\n>\ntype InferredPcbFabricationNoteText = z.infer<typeof pcb_fabrication_note_text>\n\n/**\n * Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators\n */\nexport interface PcbFabricationNoteText {\n type: \"pcb_fabrication_note_text\"\n pcb_fabrication_note_text_id: string\n subcircuit_id?: string\n pcb_group_id?: string\n font: \"tscircuit2024\"\n font_size: Length\n pcb_component_id: string\n text: string\n layer: VisibleLayer\n anchor_position: Point\n anchor_alignment:\n | \"center\"\n | \"top_left\"\n | \"top_right\"\n | \"bottom_left\"\n | \"bottom_right\"\n color?: string\n}\n\n/**\n * @deprecated use PcbFabricationNoteText\n */\nexport type PCBFabricationNoteText = PcbFabricationNoteText\n\nexpectTypesMatch<PcbFabricationNoteText, InferredPcbFabricationNoteText>(true)\n","import { z } from \"zod\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport {\n layer_ref,\n visible_layer,\n type LayerRef,\n} from \"src/pcb/properties/layer_ref\"\nimport { point, type Point } from \"src/common\"\nimport { length, type Length } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_fabrication_note_path = z\n .object({\n type: z.literal(\"pcb_fabrication_note_path\"),\n pcb_fabrication_note_path_id: getZodPrefixedIdWithDefault(\n \"pcb_fabrication_note_path\",\n ),\n pcb_component_id: z.string(),\n subcircuit_id: z.string().optional(),\n layer: layer_ref,\n route: z.array(point),\n stroke_width: length,\n color: z.string().optional(),\n })\n .describe(\n \"Defines a fabrication path on the PCB for fabricators or assemblers\",\n )\n\nexport type PcbFabricationNotePathInput = z.input<\n typeof pcb_fabrication_note_path\n>\ntype InferredPcbFabricationNotePath = z.infer<typeof pcb_fabrication_note_path>\n\n/**\n * Defines a fabrication path on the PCB for fabricators or assemblers\n */\nexport interface PcbFabricationNotePath {\n type: \"pcb_fabrication_note_path\"\n pcb_fabrication_note_path_id: string\n pcb_component_id: string\n subcircuit_id?: string\n layer: LayerRef\n route: Point[]\n stroke_width: Length\n color?: string\n}\n\n/**\n * @deprecated use PcbFabricationNotePath\n */\nexport type PCBFabricationNotePath = PcbFabricationNotePath\n\nexpectTypesMatch<PcbFabricationNotePath, InferredPcbFabricationNotePath>(true)\n","import { z } from \"zod\"\nimport { point } from \"../common\"\nimport { distance } from \"../units\"\n\nexport const pcb_keepout = z\n .object({\n type: z.literal(\"pcb_keepout\"),\n shape: z.literal(\"rect\"),\n pcb_group_id: z.string().optional(),\n subcircuit_id: z.string().optional(),\n center: point,\n width: distance,\n height: distance,\n pcb_keepout_id: z.string(),\n layers: z.array(z.string()), // Specify layers where the keepout applies\n description: z.string().optional(), // Optional description of the keepout\n })\n .or(\n z.object({\n type: z.literal(\"pcb_keepout\"),\n shape: z.literal(\"circle\"),\n pcb_group_id: z.string().optional(),\n subcircuit_id: z.string().optional(),\n center: point,\n radius: distance,\n pcb_keepout_id: z.string(),\n layers: z.array(z.string()), // Specify layers where the keepout applies\n description: z.string().optional(), // Optional description of the keepout\n }),\n )\n\nexport type PCBKeepoutInput = z.input<typeof pcb_keepout>\nexport type PCBKeepout = z.infer<typeof pcb_keepout>\n","import { z } from \"zod\"\nimport { point, type Point, getZodPrefixedIdWithDefault } from \"src/common\"\nimport { length, type Length, rotation, type Rotation } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\n// Common properties base for all cutout shapes (internal)\nconst pcb_cutout_base = z.object({\n type: z.literal(\"pcb_cutout\"),\n pcb_cutout_id: getZodPrefixedIdWithDefault(\"pcb_cutout\"),\n pcb_group_id: z.string().optional(),\n subcircuit_id: z.string().optional(),\n})\n\n// Rectangular Cutout\nexport const pcb_cutout_rect = pcb_cutout_base.extend({\n shape: z.literal(\"rect\"),\n center: point,\n width: length,\n height: length,\n rotation: rotation.optional(),\n})\nexport type PcbCutoutRectInput = z.input<typeof pcb_cutout_rect>\ntype InferredPcbCutoutRect = z.infer<typeof pcb_cutout_rect>\n/**\n * Defines a rectangular cutout on the PCB.\n */\nexport interface PcbCutoutRect {\n type: \"pcb_cutout\"\n pcb_cutout_id: string\n pcb_group_id?: string\n subcircuit_id?: string\n shape: \"rect\"\n center: Point\n width: Length\n height: Length\n rotation?: Rotation\n}\nexpectTypesMatch<PcbCutoutRect, InferredPcbCutoutRect>(true)\n\n// Circular Cutout\nexport const pcb_cutout_circle = pcb_cutout_base.extend({\n shape: z.literal(\"circle\"),\n center: point,\n radius: length,\n})\nexport type PcbCutoutCircleInput = z.input<typeof pcb_cutout_circle>\ntype InferredPcbCutoutCircle = z.infer<typeof pcb_cutout_circle>\n/**\n * Defines a circular cutout on the PCB.\n */\nexport interface PcbCutoutCircle {\n type: \"pcb_cutout\"\n pcb_cutout_id: string\n pcb_group_id?: string\n subcircuit_id?: string\n shape: \"circle\"\n center: Point\n radius: Length\n}\nexpectTypesMatch<PcbCutoutCircle, InferredPcbCutoutCircle>(true)\n\n// Polygon Cutout\nexport const pcb_cutout_polygon = pcb_cutout_base.extend({\n shape: z.literal(\"polygon\"),\n points: z.array(point),\n})\nexport type PcbCutoutPolygonInput = z.input<typeof pcb_cutout_polygon>\ntype InferredPcbCutoutPolygon = z.infer<typeof pcb_cutout_polygon>\n/**\n * Defines a polygonal cutout on the PCB, specified by a list of points.\n * The polygon should be closed (the last point implicitly connects to the first).\n */\nexport interface PcbCutoutPolygon {\n type: \"pcb_cutout\"\n pcb_cutout_id: string\n pcb_group_id?: string\n subcircuit_id?: string\n shape: \"polygon\"\n points: Point[]\n}\nexpectTypesMatch<PcbCutoutPolygon, InferredPcbCutoutPolygon>(true)\n\n// Union of all cutout shapes\nexport const pcb_cutout = z\n .discriminatedUnion(\"shape\", [\n pcb_cutout_rect,\n pcb_cutout_circle,\n pcb_cutout_polygon,\n ])\n .describe(\"Defines a cutout on the PCB, removing board material.\")\n\nexport type PcbCutoutInput = z.input<typeof pcb_cutout>\nexport type PcbCutout = PcbCutoutRect | PcbCutoutCircle | PcbCutoutPolygon\n\ntype InferredPcbCutout = z.infer<typeof pcb_cutout>\nexpectTypesMatch<PcbCutout, InferredPcbCutout>(true)\n","import { z } from \"zod\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_missing_footprint_error = z\n .object({\n type: z.literal(\"pcb_missing_footprint_error\"),\n pcb_missing_footprint_error_id: getZodPrefixedIdWithDefault(\n \"pcb_missing_footprint_error\",\n ),\n pcb_group_id: z.string().optional(),\n subcircuit_id: z.string().optional(),\n error_type: z.literal(\"pcb_missing_footprint_error\"),\n source_component_id: z.string(),\n message: z.string(),\n })\n .describe(\"Defines a missing footprint error on the PCB\")\n\nexport type PcbMissingFootprintErrorInput = z.input<\n typeof pcb_missing_footprint_error\n>\ntype InferredPcbMissingFootprintError = z.infer<\n typeof pcb_missing_footprint_error\n>\n\n/**\n * Defines a placement error on the PCB\n */\nexport interface PcbMissingFootprintError {\n type: \"pcb_missing_footprint_error\"\n pcb_missing_footprint_error_id: string\n pcb_group_id?: string\n subcircuit_id?: string\n error_type: \"pcb_missing_footprint_error\"\n source_component_id: string\n message: string\n}\n\n/**\n * @deprecated use PcbMissingFootprintError\n */\nexport type PCBMissingFootprintError = PcbMissingFootprintError\n\nexpectTypesMatch<PcbMissingFootprintError, InferredPcbMissingFootprintError>(\n true,\n)\n","import { z } from \"zod\"\nimport { point, type Point, getZodPrefixedIdWithDefault } from \"src/common\"\nimport { length, type Length } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_group = z\n .object({\n type: z.literal(\"pcb_group\"),\n pcb_group_id: getZodPrefixedIdWithDefault(\"pcb_group\"),\n source_group_id: z.string(),\n is_subcircuit: z.boolean().optional(),\n subcircuit_id: z.string().optional(),\n width: length,\n height: length,\n center: point,\n pcb_component_ids: z.array(z.string()),\n name: z.string().optional(),\n description: z.string().optional(),\n })\n .describe(\"Defines a group of components on the PCB\")\n\nexport type PcbGroupInput = z.input<typeof pcb_group>\ntype InferredPcbGroup = z.infer<typeof pcb_group>\n\n/**\n * Defines a group of components on the PCB\n */\nexport interface PcbGroup {\n type: \"pcb_group\"\n pcb_group_id: string\n source_group_id: string\n is_subcircuit?: boolean\n subcircuit_id?: string\n width: Length\n height: Length\n center: Point\n pcb_component_ids: string[]\n name?: string\n description?: string\n}\n\nexpectTypesMatch<PcbGroup, InferredPcbGroup>(true)\n","import { z } from \"zod\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_autorouting_error = z\n .object({\n type: z.literal(\"pcb_autorouting_error\"),\n pcb_error_id: getZodPrefixedIdWithDefault(\"pcb_autorouting_error\"),\n message: z.string(),\n })\n .describe(\"The autorouting has failed to route a portion of the board\")\n\nexport type PcbAutoroutingErrorInput = z.input<typeof pcb_autorouting_error>\ntype PcbInferredAutoroutingError = z.infer<typeof pcb_autorouting_error>\n\nexport interface PcbAutoroutingErrorInterface {\n type: \"pcb_autorouting_error\"\n pcb_error_id: string\n message: string\n}\n\nexport type PcbAutoroutingError = PcbAutoroutingErrorInterface\n\nexpectTypesMatch<PcbAutoroutingError, PcbInferredAutoroutingError>(true)\n","import { z } from \"zod\"\nimport { getZodPrefixedIdWithDefault } from \"../common\"\nimport { expectTypesMatch } from \"../utils/expect-types-match\"\n\nexport const pcb_manual_edit_conflict_warning = z\n .object({\n type: z.literal(\"pcb_manual_edit_conflict_warning\"),\n pcb_manual_edit_conflict_warning_id: getZodPrefixedIdWithDefault(\n \"pcb_manual_edit_conflict_warning\",\n ),\n message: z.string(),\n pcb_component_id: z.string(),\n pcb_group_id: z.string().optional(),\n subcircuit_id: z.string().optional(),\n source_component_id: z.string(),\n })\n .describe(\n \"Warning emitted when a component has both manual placement and explicit pcbX/pcbY coordinates\",\n )\n\nexport type PcbManualEditConflictWarningInput = z.input<\n typeof pcb_manual_edit_conflict_warning\n>\ntype InferredPcbManualEditConflictWarning = z.infer<\n typeof pcb_manual_edit_conflict_warning\n>\n\n/**\n * Warning emitted when a component has both manual placement (via manualEdits) and explicit pcbX/pcbY coordinates\n */\nexport interface PcbManualEditConflictWarning {\n type: \"pcb_manual_edit_conflict_warning\"\n pcb_manual_edit_conflict_warning_id: string\n message: string\n pcb_component_id: string\n pcb_group_id?: string\n subcircuit_id?: string\n source_component_id: string\n}\n\nexpectTypesMatch<\n PcbManualEditConflictWarning,\n InferredPcbManualEditConflictWarning\n>(true)\n","import { z } from \"zod\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport { distance, type Distance } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_breakout_point = z\n .object({\n type: z.literal(\"pcb_breakout_point\"),\n pcb_breakout_point_id: getZodPrefixedIdWithDefault(\"pcb_breakout_point\"),\n pcb_group_id: z.string(),\n subcircuit_id: z.string().optional(),\n source_trace_id: z.string().optional(),\n source_port_id: z.string().optional(),\n source_net_id: z.string().optional(),\n x: distance,\n y: distance,\n })\n .describe(\n \"Defines a routing target within a pcb_group for a source_trace or source_net\",\n )\n\nexport type PcbBreakoutPointInput = z.input<typeof pcb_breakout_point>\ntype InferredPcbBreakoutPoint = z.infer<typeof pcb_breakout_point>\n\n/**\n * Defines a routing target within a pcb_group for a source_trace or source_net\n */\nexport interface PcbBreakoutPoint {\n type: \"pcb_breakout_point\"\n pcb_breakout_point_id: string\n pcb_group_id: string\n subcircuit_id?: string\n source_trace_id?: string\n source_port_id?: string\n source_net_id?: string\n x: Distance\n y: Distance\n}\n\nexpectTypesMatch<PcbBreakoutPoint, InferredPcbBreakoutPoint>(true)\n","import { z } from \"zod\"\nimport { point3 } from \"../common\"\nimport { rotation, length } from \"../units\"\nimport { layer_ref } from \"src/pcb\"\n\nexport const cad_component = z\n .object({\n type: z.literal(\"cad_component\"),\n cad_component_id: z.string(),\n pcb_component_id: z.string(),\n source_component_id: z.string(),\n position: point3,\n rotation: point3.optional(),\n size: point3.optional(),\n layer: layer_ref.optional(),\n\n // These are all ways to generate/load the 3d model\n footprinter_string: z.string().optional(),\n model_obj_url: z.string().optional(),\n model_stl_url: z.string().optional(),\n model_3mf_url: z.string().optional(),\n model_jscad: z.any().optional(),\n })\n .describe(\"Defines a component on the PCB\")\n\nexport type CadComponentInput = z.input<typeof cad_component>\nexport type CadComponent = z.infer<typeof cad_component>\n","import { z } from \"zod\"\nimport * as pcb from \"./pcb\"\nimport * as sch from \"./schematic\"\nimport * as src from \"./source\"\nimport * as cad from \"./cad\"\nimport {\n expectStringUnionsMatch,\n expectTypesMatch,\n} from \"./utils/expect-types-match\"\n\nexport const any_circuit_element = z.union([\n // TODO source_config\n // TODO pcb_config\n // TODO schematic_config\n // TODO schematic_group\n src.source_trace,\n src.source_port,\n src.any_source_component,\n src.source_net,\n src.source_group,\n src.source_simple_bug,\n src.source_simple_chip,\n src.source_simple_capacitor,\n src.source_simple_diode,\n src.source_simple_led,\n src.source_simple_resistor,\n src.source_simple_power_source,\n src.source_simple_battery,\n src.source_simple_inductor,\n src.source_simple_pin_header,\n src.source_simple_resonator,\n src.source_simple_switch,\n src.source_simple_transistor,\n src.source_simple_test_point,\n src.source_simple_mosfet,\n src.source_simple_potentiometer,\n src.source_simple_push_button,\n src.source_project_metadata,\n pcb.pcb_component,\n pcb.pcb_hole,\n pcb.pcb_missing_footprint_error,\n pcb.pcb_manual_edit_conflict_warning,\n pcb.pcb_plated_hole,\n pcb.pcb_keepout,\n pcb.pcb_port,\n pcb.pcb_text,\n pcb.pcb_trace,\n pcb.pcb_via,\n pcb.pcb_smtpad,\n pcb.pcb_solder_paste,\n pcb.pcb_board,\n pcb.pcb_group,\n pcb.pcb_trace_hint,\n pcb.pcb_silkscreen_line,\n pcb.pcb_silkscreen_path,\n pcb.pcb_silkscreen_text,\n pcb.pcb_silkscreen_rect,\n pcb.pcb_silkscreen_circle,\n pcb.pcb_silkscreen_oval,\n pcb.pcb_trace_error,\n pcb.pcb_placement_error,\n pcb.pcb_port_not_matched_error,\n pcb.pcb_fabrication_note_path,\n pcb.pcb_fabrication_note_text,\n pcb.pcb_autorouting_error,\n pcb.pcb_breakout_point,\n pcb.pcb_cutout,\n sch.schematic_box,\n sch.schematic_text,\n sch.schematic_line,\n sch.schematic_component,\n sch.schematic_port,\n sch.schematic_trace,\n sch.schematic_path,\n sch.schematic_error,\n sch.schematic_layout_error,\n sch.schematic_net_label,\n sch.schematic_debug_object,\n sch.schematic_voltage_probe,\n sch.schematic_manual_edit_conflict_warning,\n sch.schematic_group,\n cad.cad_component,\n])\n\n/**\n * @deprecated use any_circuit_element instead\n */\nexport const any_soup_element = any_circuit_element\n\nexport type AnyCircuitElement = z.infer<typeof any_circuit_element>\nexport type AnyCircuitElementInput = z.input<typeof any_circuit_element>\n/**\n * @deprecated use AnyCircuitElement instead\n */\nexport type AnySoupElement = AnyCircuitElement\n\n/**\n * @deprecated use AnyCircuitElementInput instead\n */\nexport type AnySoupElementInput = AnyCircuitElementInput\n\n/**\n * Type representing a complete Circuit JSON document, which is an array of circuit elements.\n * This is the primary type used when working with circuit-json files or API responses.\n */\nexport type CircuitJson = AnyCircuitElement[]\n\n// ------------------- SAFETY CHECKS -------------------\n\n// SAFETY CHECK: Every element has a type\nexpectTypesMatch<\n AnyCircuitElement extends { type: string } ? AnyCircuitElement : never,\n AnyCircuitElement\n>(true)\n\n// SAFETY CHECK: Every element has an id with the key name `${type}_id`\ntype FindMissingId<T extends AnyCircuitElement> = T extends {\n type: infer U extends string\n}\n ? T extends { [K in `${U}_id`]: infer V }\n ? V extends string\n ? never\n : `${U} DOES NOT HAVE AN ${U}_id PROPERTY`\n : `${U} DOES NOT HAVE AN ${U}_id PROPERTY`\n : never\n\nexpectStringUnionsMatch<\n FindMissingId<AnyCircuitElement>,\n // EXCEPTIONS TO THE RULE\n // THIS IS FOR LEGACY REASONS, DO NOT ADD MORE EXCEPTIONS\n | \"source_project_metadata DOES NOT HAVE AN source_project_metadata_id PROPERTY\"\n | \"pcb_port_not_matched_error DOES NOT HAVE AN pcb_port_not_matched_error_id PROPERTY\"\n | \"pcb_autorouting_error DOES NOT HAVE AN pcb_autorouting_error_id PROPERTY\"\n | \"schematic_debug_object DOES NOT HAVE AN schematic_debug_object_id PROPERTY\"\n | \"schematic_box DOES NOT HAVE AN schematic_box_id PROPERTY\"\n | \"schematic_line DOES NOT HAVE AN schematic_line_id PROPERTY\"\n | \"schematic_path DOES NOT HAVE AN schematic_path_id PROPERTY\"\n>(true)\n"],"mappings":";AAKA,IAAM,eAGF;AAAA,EACF,IAAI;AAAA,IACF,UAAU;AAAA,IACV,UAAU;AAAA,MACR,KAAK;AAAA,MACL,KAAK;AAAA,MACL,IAAI;AAAA,IACN;AAAA,EACF;AAAA,EACA,GAAG;AAAA,IACD,UAAU;AAAA,IACV,UAAU;AAAA,MACR,IAAI;AAAA,MACJ,GAAG;AAAA,IACL;AAAA,EACF;AAAA,EACA,QAAG;AAAA,IACD,UAAU;AAAA,IACV,UAAU;AAAA,MACR,SAAI;AAAA,MACJ,QAAG;AAAA,MACH,SAAI;AAAA,MACJ,SAAI;AAAA,MACJ,MAAM;AAAA,MACN,SAAI;AAAA,MACJ,SAAI;AAAA,MACJ,SAAI;AAAA,IACN;AAAA,EACF;AAAA,EACA,GAAG;AAAA,IACD,UAAU;AAAA,IACV,UAAU;AAAA,MACR,IAAI;AAAA,MACJ,GAAG;AAAA,MACH,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IACN;AAAA,EACF;AAAA,EACA,GAAG;AAAA,IACD,UAAU;AAAA,IACV,UAAU;AAAA,MACR,SAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,GAAG;AAAA,MACH,IAAI;AAAA,MACJ,IAAI;AAAA,IACN;AAAA,EACF;AAAA,EACA,GAAG;AAAA,IACD,UAAU;AAAA,IACV,UAAU;AAAA,MACR,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,SAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,GAAG;AAAA,IACL;AAAA,EACF;AAAA,EACA,IAAI;AA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AE,IAAI,EAAE,SAAS;AAChC,CAAC,EACA,SAAS,gCAAgC;;;ACvB5C,SAAS,KAAAC,WAAS;AAUX,IAAM,sBAAsBC,IAAE,MAAM;AAAA,EAKrC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACN,CAAC;AAKM,IAAM,mBAAmB;AAuBhC,iBAGE,IAAI;AAaN,wBAWE,IAAI;","names":["z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "circuit-json",
3
- "version": "0.0.197",
3
+ "version": "0.0.199",
4
4
  "description": "Definitions for the tscircuit intermediary JSON format",
5
5
  "main": "dist/index.mjs",
6
6
  "files": [