circuit-json 0.0.211 → 0.0.213

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
@@ -103,6 +103,7 @@ https://github.com/user-attachments/assets/2f28b7ba-689e-4d80-85b2-5bdef84b41f8
103
103
  - [PcbTrace](#pcbtrace)
104
104
  - [PcbTraceError](#pcbtraceerror)
105
105
  - [PcbTraceHint](#pcbtracehint)
106
+ - [PcbVia](#pcbvia)
106
107
  - [Schematic Elements](#schematic-elements)
107
108
  - [SchematicBox](#schematicbox)
108
109
  - [SchematicComponent](#schematiccomponent)
@@ -208,6 +209,7 @@ interface SourceComponentBase {
208
209
  are_pins_interchangeable?: boolean
209
210
  internally_connected_source_port_ids?: string[][]
210
211
  source_group_id?: string
212
+ subcircuit_id?: string
211
213
  }
212
214
  ```
213
215
 
@@ -217,8 +219,7 @@ interface SourceComponentBase {
217
219
 
218
220
  ```typescript
219
221
  /** Error emitted when a component fails to be constructed.
220
- * Contains details about the failure and prevents the component from being rendered. */
221
- interface SourceFailedToCreateComponentError {
222
+ * Contains details about the failure and prevents the component from being rendered. */interface SourceFailedToCreateComponentError {
222
223
  type: "source_failed_to_create_component_error"
223
224
  source_failed_to_create_component_error_id: string
224
225
  error_type: "source_failed_to_create_component_error"
@@ -254,12 +255,12 @@ interface SourceGroup {
254
255
  The source code is missing a property
255
256
 
256
257
  ```typescript
257
- /** The source code is missing a property */
258
- interface SourceMissingPropertyError {
258
+ /** The source code is missing a property */ interface SourceMissingPropertyError {
259
259
  type: "source_missing_property_error"
260
260
  source_missing_property_error_id: string
261
261
  source_component_id: string
262
262
  property_name: string
263
+ subcircuit_id?: string
263
264
  error_type: "source_missing_property_error"
264
265
  message: string
265
266
  }
@@ -292,8 +293,7 @@ interface SourceNet {
292
293
  Defines a ground plane in the source domain
293
294
 
294
295
  ```typescript
295
- /** Defines a ground plane in the source domain */
296
- interface SourcePcbGroundPlane {
296
+ /** Defines a ground plane in the source domain */ interface SourcePcbGroundPlane {
297
297
  type: "source_pcb_ground_plane"
298
298
  source_pcb_ground_plane_id: string
299
299
  source_group_id: string
@@ -309,8 +309,7 @@ interface SourcePcbGroundPlane {
309
309
  Defines a source port that can be connected to other components
310
310
 
311
311
  ```typescript
312
- /** Defines a source port that can be connected to other components */
313
- interface SourcePort {
312
+ /** Defines a source port that can be connected to other components */ interface SourcePort {
314
313
  type: "source_port"
315
314
  pin_number?: number
316
315
  port_hints?: string[]
@@ -343,8 +342,8 @@ interface SourceProjectMetadata {
343
342
  Defines a simple battery component
344
343
 
345
344
  ```typescript
346
- /** Defines a simple battery component */
347
- interface SourceSimpleBattery extends SourceComponentBase {
345
+ /** Defines a simple battery component */ interface SourceSimpleBattery
346
+ extends SourceComponentBase {
348
347
  ftype: "simple_battery"
349
348
  capacity: number
350
349
  }
@@ -357,8 +356,8 @@ interface SourceSimpleBattery extends SourceComponentBase {
357
356
  Defines a simple capacitor component
358
357
 
359
358
  ```typescript
360
- /** Defines a simple capacitor component */
361
- interface SourceSimpleCapacitor extends SourceComponentBase {
359
+ /** Defines a simple capacitor component */ interface SourceSimpleCapacitor
360
+ extends SourceComponentBase {
362
361
  ftype: "simple_capacitor"
363
362
  capacitance: number
364
363
  max_voltage_rating?: number
@@ -374,8 +373,8 @@ interface SourceSimpleCapacitor extends SourceComponentBase {
374
373
  Defines a simple integrated circuit component
375
374
 
376
375
  ```typescript
377
- /** Defines a simple integrated circuit component */
378
- interface SourceSimpleChip extends SourceComponentBase {
376
+ /** Defines a simple integrated circuit component */ interface SourceSimpleChip
377
+ extends SourceComponentBase {
379
378
  ftype: "simple_chip"
380
379
  }
381
380
  ```
@@ -387,8 +386,8 @@ interface SourceSimpleChip extends SourceComponentBase {
387
386
  Defines a simple crystal oscillator component
388
387
 
389
388
  ```typescript
390
- /** Defines a simple crystal oscillator component */
391
- interface SourceSimpleCrystal extends SourceComponentBase {
389
+ /** Defines a simple crystal oscillator component */ interface SourceSimpleCrystal
390
+ extends SourceComponentBase {
392
391
  ftype: "simple_crystal"
393
392
  frequency: number
394
393
  load_capacitance?: number
@@ -402,8 +401,8 @@ interface SourceSimpleCrystal extends SourceComponentBase {
402
401
  Defines a simple diode component
403
402
 
404
403
  ```typescript
405
- /** Defines a simple diode component */
406
- interface SourceSimpleDiode extends SourceComponentBase {
404
+ /** Defines a simple diode component */ interface SourceSimpleDiode
405
+ extends SourceComponentBase {
407
406
  ftype: "simple_diode"
408
407
  }
409
408
  ```
@@ -427,8 +426,8 @@ interface SourceSimpleFuse extends SourceComponentBase {
427
426
  Defines a simple ground component
428
427
 
429
428
  ```typescript
430
- /** Defines a simple ground component */
431
- interface SourceSimpleGround extends SourceComponentBase {
429
+ /** Defines a simple ground component */ interface SourceSimpleGround
430
+ extends SourceComponentBase {
432
431
  ftype: "simple_ground"
433
432
  }
434
433
  ```
@@ -440,8 +439,8 @@ interface SourceSimpleGround extends SourceComponentBase {
440
439
  Defines a simple inductor component
441
440
 
442
441
  ```typescript
443
- /** Defines a simple inductor component */
444
- interface SourceSimpleInductor extends SourceComponentBase {
442
+ /** Defines a simple inductor component */ interface SourceSimpleInductor
443
+ extends SourceComponentBase {
445
444
  ftype: "simple_inductor"
446
445
  inductance: number
447
446
  max_current_rating?: number
@@ -455,8 +454,8 @@ interface SourceSimpleInductor extends SourceComponentBase {
455
454
  Defines a simple led component
456
455
 
457
456
  ```typescript
458
- /** Defines a simple led component */
459
- interface SourceSimpleLed extends Omit<SourceSimpleDiode, "ftype"> {
457
+ /** Defines a simple led component */ interface SourceSimpleLed
458
+ extends Omit<SourceSimpleDiode, "ftype"> {
460
459
  ftype: "simple_led"
461
460
  color?: string
462
461
  wavelength?: string
@@ -470,9 +469,8 @@ interface SourceSimpleLed extends Omit<SourceSimpleDiode, "ftype"> {
470
469
  ```typescript
471
470
  /** Defines a simple mosfet component
472
471
  * This is a three-pin semiconductor device (source, gate, drain)
473
- * Pin configuration is handled by the schematic port system */
474
-
475
- interface SourceSimpleMosfet extends SourceComponentBase {
472
+ * Pin configuration is handled by the schematic port system */ interface SourceSimpleMosfet
473
+ extends SourceComponentBase {
476
474
  ftype: "simple_mosfet"
477
475
  channel_type: "n" | "p"
478
476
  mosfet_mode: "enhancement" | "depletion"
@@ -486,8 +484,8 @@ interface SourceSimpleMosfet extends SourceComponentBase {
486
484
  Defines a simple power source component
487
485
 
488
486
  ```typescript
489
- /** Defines a simple power source component */
490
- interface SourceSimplePowerSource extends SourceComponentBase {
487
+ /** Defines a simple power source component */ interface SourceSimplePowerSource
488
+ extends SourceComponentBase {
491
489
  ftype: "simple_power_source"
492
490
  voltage: number
493
491
  }
@@ -500,8 +498,8 @@ interface SourceSimplePowerSource extends SourceComponentBase {
500
498
  Defines a simple push button component
501
499
 
502
500
  ```typescript
503
- /** Defines a simple push button component */
504
- interface SourceSimplePushButton extends SourceComponentBase {
501
+ /** Defines a simple push button component */ interface SourceSimplePushButton
502
+ extends SourceComponentBase {
505
503
  ftype: "simple_push_button"
506
504
  }
507
505
  ```
@@ -513,8 +511,8 @@ interface SourceSimplePushButton extends SourceComponentBase {
513
511
  Defines a simple resistor component
514
512
 
515
513
  ```typescript
516
- /** Defines a simple resistor component */
517
- interface SourceSimpleResistor extends SourceComponentBase {
514
+ /** Defines a simple resistor component */ interface SourceSimpleResistor
515
+ extends SourceComponentBase {
518
516
  ftype: "simple_resistor"
519
517
  resistance: number
520
518
  display_resistance?: string
@@ -528,8 +526,8 @@ interface SourceSimpleResistor extends SourceComponentBase {
528
526
  Defines a simple resonator component
529
527
 
530
528
  ```typescript
531
- /** Defines a simple resonator component */
532
- interface SourceSimpleResonator extends SourceComponentBase {
529
+ /** Defines a simple resonator component */ interface SourceSimpleResonator
530
+ extends SourceComponentBase {
533
531
  ftype: "simple_resonator"
534
532
  load_capacitance: number
535
533
  equivalent_series_resistance?: number
@@ -544,8 +542,8 @@ interface SourceSimpleResonator extends SourceComponentBase {
544
542
  Defines a simple switch component
545
543
 
546
544
  ```typescript
547
- /** Defines a simple switch component */
548
- interface SourceSimpleSwitch extends SourceComponentBase {
545
+ /** Defines a simple switch component */ interface SourceSimpleSwitch
546
+ extends SourceComponentBase {
549
547
  ftype: "simple_switch"
550
548
  }
551
549
  ```
@@ -557,8 +555,8 @@ interface SourceSimpleSwitch extends SourceComponentBase {
557
555
  ```typescript
558
556
  /** Defines a simple test point component
559
557
  * Can be surface-mount or through-hole.
560
- * Pad shape and dimensions configurable for different use cases. */
561
- interface SourceSimpleTestPoint extends SourceComponentBase {
558
+ * Pad shape and dimensions configurable for different use cases. */ interface SourceSimpleTestPoint
559
+ extends SourceComponentBase {
562
560
  ftype: "simple_test_point"
563
561
  footprint_variant?: "pad" | "through_hole"
564
562
  pad_shape?: "rect" | "circle"
@@ -576,9 +574,8 @@ interface SourceSimpleTestPoint extends SourceComponentBase {
576
574
  ```typescript
577
575
  /** Defines a simple transistor component
578
576
  * This is a three-pin semiconductor device (emitter, base, collector)
579
- * Pin configuration is handled by the schematic port system */
580
-
581
- interface SourceSimpleTransistor extends SourceComponentBase {
577
+ * Pin configuration is handled by the schematic port system */ interface SourceSimpleTransistor
578
+ extends SourceComponentBase {
582
579
  ftype: "simple_transistor"
583
580
  transistor_type: "npn" | "pnp"
584
581
  }
@@ -614,6 +611,7 @@ interface PcbAutoroutingErrorInterface {
614
611
  pcb_error_id: string
615
612
  error_type: "pcb_autorouting_error"
616
613
  message: string
614
+ subcircuit_id?: string
617
615
  }
618
616
  ```
619
617
 
@@ -624,8 +622,7 @@ interface PcbAutoroutingErrorInterface {
624
622
  Defines the board outline of the PCB
625
623
 
626
624
  ```typescript
627
- /** Defines the board outline of the PCB */
628
- interface PcbBoard {
625
+ /** Defines the board outline of the PCB */ interface PcbBoard {
629
626
  type: "pcb_board"
630
627
  pcb_board_id: string
631
628
  is_subcircuit?: boolean
@@ -647,8 +644,7 @@ interface PcbBoard {
647
644
  Defines a routing target within a pcb_group for a source_trace or source_net
648
645
 
649
646
  ```typescript
650
- /** Defines a routing target within a pcb_group for a source_trace or source_net */
651
- interface PcbBreakoutPoint {
647
+ /** Defines a routing target within a pcb_group for a source_trace or source_net */ interface PcbBreakoutPoint {
652
648
  type: "pcb_breakout_point"
653
649
  pcb_breakout_point_id: string
654
650
  pcb_group_id: string
@@ -668,8 +664,7 @@ interface PcbBreakoutPoint {
668
664
  Defines a component on the PCB
669
665
 
670
666
  ```typescript
671
- /** Defines a component on the PCB */
672
- interface PcbComponent {
667
+ /** Defines a component on the PCB */ interface PcbComponent {
673
668
  type: "pcb_component"
674
669
  pcb_component_id: string
675
670
  source_component_id: string
@@ -690,8 +685,7 @@ interface PcbComponent {
690
685
  Defines a rectangular cutout on the PCB.
691
686
 
692
687
  ```typescript
693
- /** Defines a rectangular cutout on the PCB. */
694
- interface PcbCutoutRect {
688
+ /** Defines a rectangular cutout on the PCB. */ interface PcbCutoutRect {
695
689
  type: "pcb_cutout"
696
690
  pcb_cutout_id: string
697
691
  pcb_group_id?: string
@@ -711,8 +705,7 @@ interface PcbCutoutRect {
711
705
  Defines a fabrication path on the PCB for fabricators or assemblers
712
706
 
713
707
  ```typescript
714
- /** Defines a fabrication path on the PCB for fabricators or assemblers */
715
- interface PcbFabricationNotePath {
708
+ /** Defines a fabrication path on the PCB for fabricators or assemblers */ interface PcbFabricationNotePath {
716
709
  type: "pcb_fabrication_note_path"
717
710
  pcb_fabrication_note_path_id: string
718
711
  pcb_component_id: string
@@ -731,8 +724,7 @@ interface PcbFabricationNotePath {
731
724
  Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators
732
725
 
733
726
  ```typescript
734
- /** Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators */
735
- interface PcbFabricationNoteText {
727
+ /** Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators */ interface PcbFabricationNoteText {
736
728
  type: "pcb_fabrication_note_text"
737
729
  pcb_fabrication_note_text_id: string
738
730
  subcircuit_id?: string
@@ -760,8 +752,7 @@ interface PcbFabricationNoteText {
760
752
  Defines a ground plane on the PCB
761
753
 
762
754
  ```typescript
763
- /** Defines a ground plane on the PCB */
764
- interface PcbGroundPlane {
755
+ /** Defines a ground plane on the PCB */ interface PcbGroundPlane {
765
756
  type: "pcb_ground_plane"
766
757
  pcb_ground_plane_id: string
767
758
  source_pcb_ground_plane_id: string
@@ -778,8 +769,7 @@ interface PcbGroundPlane {
778
769
  Defines a polygon region of a ground plane
779
770
 
780
771
  ```typescript
781
- /** Defines a polygon region of a ground plane */
782
- interface PcbGroundPlaneRegion {
772
+ /** Defines a polygon region of a ground plane */ interface PcbGroundPlaneRegion {
783
773
  type: "pcb_ground_plane_region"
784
774
  pcb_ground_plane_region_id: string
785
775
  pcb_ground_plane_id: string
@@ -797,8 +787,7 @@ interface PcbGroundPlaneRegion {
797
787
  Defines a group of components on the PCB
798
788
 
799
789
  ```typescript
800
- /** Defines a group of components on the PCB */
801
- interface PcbGroup {
790
+ /** Defines a group of components on the PCB */ interface PcbGroup {
802
791
  type: "pcb_group"
803
792
  pcb_group_id: string
804
793
  source_group_id: string
@@ -820,8 +809,7 @@ interface PcbGroup {
820
809
  Defines a circular or square hole on the PCB
821
810
 
822
811
  ```typescript
823
- /** Defines a circular or square hole on the PCB */
824
- interface PcbHoleCircleOrSquare {
812
+ /** Defines a circular or square hole on the PCB */ interface PcbHoleCircleOrSquare {
825
813
  type: "pcb_hole"
826
814
  pcb_hole_id: string
827
815
  pcb_group_id?: string
@@ -840,8 +828,7 @@ interface PcbHoleCircleOrSquare {
840
828
  Warning emitted when a component has both manual placement (via manualEdits) and explicit pcbX/pcbY coordinates
841
829
 
842
830
  ```typescript
843
- /** Warning emitted when a component has both manual placement (via manualEdits) and explicit pcbX/pcbY coordinates */
844
- interface PcbManualEditConflictWarning {
831
+ /** Warning emitted when a component has both manual placement (via manualEdits) and explicit pcbX/pcbY coordinates */ interface PcbManualEditConflictWarning {
845
832
  type: "pcb_manual_edit_conflict_warning"
846
833
  pcb_manual_edit_conflict_warning_id: string
847
834
  warning_type: "pcb_manual_edit_conflict_warning"
@@ -860,8 +847,7 @@ interface PcbManualEditConflictWarning {
860
847
  Defines a placement error on the PCB
861
848
 
862
849
  ```typescript
863
- /** Defines a placement error on the PCB */
864
- interface PcbMissingFootprintError {
850
+ /** Defines a placement error on the PCB */ interface PcbMissingFootprintError {
865
851
  type: "pcb_missing_footprint_error"
866
852
  pcb_missing_footprint_error_id: string
867
853
  pcb_group_id?: string
@@ -879,12 +865,12 @@ interface PcbMissingFootprintError {
879
865
  Defines a placement error on the PCB
880
866
 
881
867
  ```typescript
882
- /** Defines a placement error on the PCB */
883
- interface PcbPlacementError {
868
+ /** Defines a placement error on the PCB */ interface PcbPlacementError {
884
869
  type: "pcb_placement_error"
885
870
  pcb_placement_error_id: string
886
871
  error_type: "pcb_placement_error"
887
872
  message: string
873
+ subcircuit_id?: string
888
874
  }
889
875
  ```
890
876
 
@@ -895,8 +881,7 @@ interface PcbPlacementError {
895
881
  Defines a circular plated hole on the PCB
896
882
 
897
883
  ```typescript
898
- /** Defines a circular plated hole on the PCB */
899
- interface PcbPlatedHoleCircle {
884
+ /** Defines a circular plated hole on the PCB */ interface PcbPlatedHoleCircle {
900
885
  type: "pcb_plated_hole"
901
886
  shape: "circle"
902
887
  pcb_group_id?: string
@@ -912,7 +897,7 @@ interface PcbPlatedHoleCircle {
912
897
  pcb_plated_hole_id: string
913
898
  }
914
899
 
915
- interface PcbHolePillWithRectPad {
900
+ /** Defines an oval or pill-shaped plated hole on the PCB */ interface PcbHolePillWithRectPad {
916
901
  type: "pcb_plated_hole"
917
902
  shape: "pill_hole_with_rect_pad"
918
903
  pcb_group_id?: string
@@ -932,7 +917,7 @@ interface PcbHolePillWithRectPad {
932
917
  pcb_plated_hole_id: string
933
918
  }
934
919
 
935
- interface PcbHoleCircularWithRectPad {
920
+ /** Defines an oval or pill-shaped plated hole on the PCB */ interface PcbHoleCircularWithRectPad {
936
921
  type: "pcb_plated_hole"
937
922
  shape: "circular_hole_with_rect_pad"
938
923
  pcb_group_id?: string
@@ -959,8 +944,7 @@ interface PcbHoleCircularWithRectPad {
959
944
  Defines a port on the PCB
960
945
 
961
946
  ```typescript
962
- /** Defines a port on the PCB */
963
- interface PcbPort {
947
+ /** Defines a port on the PCB */ interface PcbPort {
964
948
  type: "pcb_port"
965
949
  pcb_port_id: string
966
950
  pcb_group_id?: string
@@ -980,13 +964,13 @@ interface PcbPort {
980
964
  Defines a trace error on the PCB where a port is not matched
981
965
 
982
966
  ```typescript
983
- /** Defines a trace error on the PCB where a port is not matched */
984
- interface PcbPortNotMatchedError {
967
+ /** Defines a trace error on the PCB where a port is not matched */ interface PcbPortNotMatchedError {
985
968
  type: "pcb_port_not_matched_error"
986
969
  pcb_error_id: string
987
970
  error_type: "pcb_port_not_matched_error"
988
971
  message: string
989
972
  pcb_component_ids: string[]
973
+ subcircuit_id?: string
990
974
  }
991
975
  ```
992
976
 
@@ -997,8 +981,7 @@ interface PcbPortNotMatchedError {
997
981
  Defines a silkscreen circle on the PCB
998
982
 
999
983
  ```typescript
1000
- /** Defines a silkscreen circle on the PCB */
1001
- interface PcbSilkscreenCircle {
984
+ /** Defines a silkscreen circle on the PCB */ interface PcbSilkscreenCircle {
1002
985
  type: "pcb_silkscreen_circle"
1003
986
  pcb_silkscreen_circle_id: string
1004
987
  pcb_component_id: string
@@ -1018,8 +1001,7 @@ interface PcbSilkscreenCircle {
1018
1001
  Defines a silkscreen line on the PCB
1019
1002
 
1020
1003
  ```typescript
1021
- /** Defines a silkscreen line on the PCB */
1022
- interface PcbSilkscreenLine {
1004
+ /** Defines a silkscreen line on the PCB */ interface PcbSilkscreenLine {
1023
1005
  type: "pcb_silkscreen_line"
1024
1006
  pcb_silkscreen_line_id: string
1025
1007
  pcb_component_id: string
@@ -1041,8 +1023,7 @@ interface PcbSilkscreenLine {
1041
1023
  Defines a silkscreen oval on the PCB
1042
1024
 
1043
1025
  ```typescript
1044
- /** Defines a silkscreen oval on the PCB */
1045
- interface PcbSilkscreenOval {
1026
+ /** Defines a silkscreen oval on the PCB */ interface PcbSilkscreenOval {
1046
1027
  type: "pcb_silkscreen_oval"
1047
1028
  pcb_silkscreen_oval_id: string
1048
1029
  pcb_component_id: string
@@ -1062,8 +1043,7 @@ interface PcbSilkscreenOval {
1062
1043
  Defines a silkscreen path on the PCB
1063
1044
 
1064
1045
  ```typescript
1065
- /** Defines a silkscreen path on the PCB */
1066
- interface PcbSilkscreenPath {
1046
+ /** Defines a silkscreen path on the PCB */ interface PcbSilkscreenPath {
1067
1047
  type: "pcb_silkscreen_path"
1068
1048
  pcb_silkscreen_path_id: string
1069
1049
  pcb_component_id: string
@@ -1082,8 +1062,7 @@ interface PcbSilkscreenPath {
1082
1062
  Defines a silkscreen pill on the PCB
1083
1063
 
1084
1064
  ```typescript
1085
- /** Defines a silkscreen pill on the PCB */
1086
- interface PcbSilkscreenPill {
1065
+ /** Defines a silkscreen pill on the PCB */ interface PcbSilkscreenPill {
1087
1066
  type: "pcb_silkscreen_pill"
1088
1067
  pcb_silkscreen_pill_id: string
1089
1068
  pcb_component_id: string
@@ -1103,8 +1082,7 @@ interface PcbSilkscreenPill {
1103
1082
  Defines a silkscreen rect on the PCB
1104
1083
 
1105
1084
  ```typescript
1106
- /** Defines a silkscreen rect on the PCB */
1107
- interface PcbSilkscreenRect {
1085
+ /** Defines a silkscreen rect on the PCB */ interface PcbSilkscreenRect {
1108
1086
  type: "pcb_silkscreen_rect"
1109
1087
  pcb_silkscreen_rect_id: string
1110
1088
  pcb_component_id: string
@@ -1128,8 +1106,7 @@ interface PcbSilkscreenRect {
1128
1106
  Defines silkscreen text on the PCB
1129
1107
 
1130
1108
  ```typescript
1131
- /** Defines silkscreen text on the PCB */
1132
- interface PcbSilkscreenText {
1109
+ /** Defines silkscreen text on the PCB */ interface PcbSilkscreenText {
1133
1110
  type: "pcb_silkscreen_text"
1134
1111
  pcb_silkscreen_text_id: string
1135
1112
  pcb_group_id?: string
@@ -1153,8 +1130,7 @@ interface PcbSilkscreenText {
1153
1130
  Defines solderpaste on the PCB
1154
1131
 
1155
1132
  ```typescript
1156
- /** Defines solderpaste on the PCB */
1157
- interface PcbSolderPasteCircle {
1133
+ /** Defines solderpaste on the PCB */ interface PcbSolderPasteCircle {
1158
1134
  type: "pcb_solder_paste"
1159
1135
  shape: "circle"
1160
1136
  pcb_solder_paste_id: string
@@ -1176,8 +1152,7 @@ interface PcbSolderPasteCircle {
1176
1152
  Defines text on the PCB
1177
1153
 
1178
1154
  ```typescript
1179
- /** Defines text on the PCB */
1180
- interface PcbText {
1155
+ /** Defines text on the PCB */ interface PcbText {
1181
1156
  type: "pcb_text"
1182
1157
  pcb_text_id: string
1183
1158
  pcb_group_id?: string
@@ -1200,8 +1175,7 @@ interface PcbText {
1200
1175
  Pattern for connecting a ground plane to a plated hole
1201
1176
 
1202
1177
  ```typescript
1203
- /** Pattern for connecting a ground plane to a plated hole */
1204
- interface PcbThermalSpoke {
1178
+ /** Pattern for connecting a ground plane to a plated hole */ interface PcbThermalSpoke {
1205
1179
  type: "pcb_thermal_spoke"
1206
1180
  pcb_thermal_spoke_id: string
1207
1181
  pcb_ground_plane_id: string
@@ -1211,6 +1185,7 @@ interface PcbThermalSpoke {
1211
1185
  spoke_inner_diameter: Distance
1212
1186
  spoke_outer_diameter: Distance
1213
1187
  pcb_plated_hole_id?: string
1188
+ subcircuit_id?: string
1214
1189
  }
1215
1190
  ```
1216
1191
 
@@ -1237,8 +1212,7 @@ interface PcbTraceRoutePointWire {
1237
1212
  Defines a trace error on the PCB
1238
1213
 
1239
1214
  ```typescript
1240
- /** Defines a trace error on the PCB */
1241
- interface PcbTraceError {
1215
+ /** Defines a trace error on the PCB */ interface PcbTraceError {
1242
1216
  type: "pcb_trace_error"
1243
1217
  pcb_trace_error_id: string
1244
1218
  error_type: "pcb_trace_error"
@@ -1248,6 +1222,7 @@ interface PcbTraceError {
1248
1222
  source_trace_id: string
1249
1223
  pcb_component_ids: string[]
1250
1224
  pcb_port_ids: string[]
1225
+ subcircuit_id?: string
1251
1226
  }
1252
1227
  ```
1253
1228
 
@@ -1258,13 +1233,38 @@ interface PcbTraceError {
1258
1233
  A hint that can be used during generation of a PCB trace.
1259
1234
 
1260
1235
  ```typescript
1261
- /** A hint that can be used during generation of a PCB trace. */
1262
- interface PcbTraceHint {
1236
+ /** A hint that can be used during generation of a PCB trace. */ interface PcbTraceHint {
1263
1237
  type: "pcb_trace_hint"
1264
1238
  pcb_trace_hint_id: string
1265
1239
  pcb_port_id: string
1266
1240
  pcb_component_id: string
1267
1241
  route: RouteHintPoint[]
1242
+ subcircuit_id?: string
1243
+ }
1244
+ ```
1245
+
1246
+ ### PcbVia
1247
+
1248
+ [Source](https://github.com/tscircuit/circuit-json/blob/main/src/pcb/pcb_via.ts)
1249
+
1250
+ Defines a via on the PCB
1251
+
1252
+ ```typescript
1253
+ /** Defines a via on the PCB */ interface PcbVia {
1254
+ type: "pcb_via"
1255
+ pcb_via_id: string
1256
+ pcb_group_id?: string
1257
+ subcircuit_id?: string
1258
+ x: Distance
1259
+ y: Distance
1260
+ outer_diameter: Distance
1261
+ hole_diameter: Distance
1262
+ /** @deprecated */
1263
+ from_layer?: LayerRef
1264
+ /** @deprecated */
1265
+ to_layer?: LayerRef
1266
+ layers: LayerRef[]
1267
+ pcb_trace_id?: string
1268
1268
  }
1269
1269
  ```
1270
1270
 
@@ -1283,6 +1283,7 @@ interface SchematicBox {
1283
1283
  is_dashed: boolean
1284
1284
  x: number
1285
1285
  y: number
1286
+ subcircuit_id?: string
1286
1287
  }
1287
1288
  ```
1288
1289
 
@@ -1328,6 +1329,7 @@ interface SchematicError {
1328
1329
  schematic_error_id: string
1329
1330
  error_type: "schematic_port_not_found"
1330
1331
  message: string
1332
+ subcircuit_id?: string
1331
1333
  }
1332
1334
  ```
1333
1335
 
@@ -1338,8 +1340,7 @@ interface SchematicError {
1338
1340
  Defines a group of components on the schematic
1339
1341
 
1340
1342
  ```typescript
1341
- /** Defines a group of components on the schematic */
1342
- interface SchematicGroup {
1343
+ /** Defines a group of components on the schematic */ interface SchematicGroup {
1343
1344
  type: "schematic_group"
1344
1345
  schematic_group_id: string
1345
1346
  source_group_id: string
@@ -1366,6 +1367,7 @@ interface SchematicLayoutError {
1366
1367
  message: string
1367
1368
  source_group_id: string
1368
1369
  schematic_group_id: string
1370
+ subcircuit_id?: string
1369
1371
  }
1370
1372
  ```
1371
1373
 
@@ -1376,14 +1378,14 @@ interface SchematicLayoutError {
1376
1378
  ```typescript
1377
1379
  /** Defines a line on the schematic, this can be used for adding arbitrary lines
1378
1380
  * to a schematic, but don't use it for drawing traces, schematic boxes or where
1379
- * other schematic elements are more appropriate. */
1380
- interface SchematicLine {
1381
+ * other schematic elements are more appropriate. */ interface SchematicLine {
1381
1382
  type: "schematic_line"
1382
1383
  schematic_component_id: string
1383
1384
  x1: number
1384
1385
  x2: number
1385
1386
  y1: number
1386
1387
  y2: number
1388
+ subcircuit_id?: string
1387
1389
  }
1388
1390
  ```
1389
1391
 
@@ -1394,8 +1396,7 @@ interface SchematicLine {
1394
1396
  Warning emitted when a component has both manual placement (via manualEdits) and explicit schX/schY coordinates
1395
1397
 
1396
1398
  ```typescript
1397
- /** Warning emitted when a component has both manual placement (via manualEdits) and explicit schX/schY coordinates */
1398
- interface SchematicManualEditConflictWarning {
1399
+ /** Warning emitted when a component has both manual placement (via manualEdits) and explicit schX/schY coordinates */ interface SchematicManualEditConflictWarning {
1399
1400
  type: "schematic_manual_edit_conflict_warning"
1400
1401
  schematic_manual_edit_conflict_warning_id: string
1401
1402
  warning_type: "schematic_manual_edit_conflict_warning"
@@ -1423,6 +1424,10 @@ interface SchematicNetLabel {
1423
1424
  anchor_side: "top" | "bottom" | "left" | "right"
1424
1425
  text: string
1425
1426
  symbol_name?: string | undefined
1427
+ /** When true the net label can be repositioned. When false the label's
1428
+ * position is fixed by the element it is attached to. */
1429
+ is_movable?: boolean
1430
+ subcircuit_id?: string
1426
1431
  }
1427
1432
  ```
1428
1433
 
@@ -1437,6 +1442,7 @@ interface SchematicPath {
1437
1442
  fill_color?: "red" | "blue"
1438
1443
  is_filled?: boolean
1439
1444
  points: Point[]
1445
+ subcircuit_id?: string
1440
1446
  }
1441
1447
  ```
1442
1448
 
@@ -1457,6 +1463,7 @@ interface SchematicPort {
1457
1463
  true_ccw_index?: number
1458
1464
  pin_number?: number
1459
1465
  display_pin_label?: string
1466
+ subcircuit_id?: string
1460
1467
  }
1461
1468
  ```
1462
1469
 
@@ -1500,6 +1507,7 @@ interface SchematicVoltageProbe {
1500
1507
  position: Point
1501
1508
  schematic_trace_id: string
1502
1509
  voltage?: number
1510
+ subcircuit_id?: string
1503
1511
  }
1504
1512
  ```
1505
1513