circuit-json 0.0.210 → 0.0.212
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 +112 -106
- package/dist/index.d.mts +569 -0
- package/dist/index.mjs +40 -19
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
429
|
+
/** Defines a simple ground component */ interface SourceSimpleGround
|
|
430
|
+
extends SourceComponentBase {
|
|
432
431
|
ftype: "simple_ground"
|
|
433
432
|
}
|
|
434
433
|
```
|
|
@@ -440,10 +439,11 @@ interface SourceSimpleGround extends SourceComponentBase {
|
|
|
440
439
|
Defines a simple inductor component
|
|
441
440
|
|
|
442
441
|
```typescript
|
|
443
|
-
/** Defines a simple inductor component */
|
|
444
|
-
|
|
442
|
+
/** Defines a simple inductor component */ interface SourceSimpleInductor
|
|
443
|
+
extends SourceComponentBase {
|
|
445
444
|
ftype: "simple_inductor"
|
|
446
445
|
inductance: number
|
|
446
|
+
max_current_rating?: number
|
|
447
447
|
}
|
|
448
448
|
```
|
|
449
449
|
|
|
@@ -454,8 +454,8 @@ interface SourceSimpleInductor extends SourceComponentBase {
|
|
|
454
454
|
Defines a simple led component
|
|
455
455
|
|
|
456
456
|
```typescript
|
|
457
|
-
/** Defines a simple led component */
|
|
458
|
-
|
|
457
|
+
/** Defines a simple led component */ interface SourceSimpleLed
|
|
458
|
+
extends Omit<SourceSimpleDiode, "ftype"> {
|
|
459
459
|
ftype: "simple_led"
|
|
460
460
|
color?: string
|
|
461
461
|
wavelength?: string
|
|
@@ -469,9 +469,8 @@ interface SourceSimpleLed extends Omit<SourceSimpleDiode, "ftype"> {
|
|
|
469
469
|
```typescript
|
|
470
470
|
/** Defines a simple mosfet component
|
|
471
471
|
* This is a three-pin semiconductor device (source, gate, drain)
|
|
472
|
-
* Pin configuration is handled by the schematic port system */
|
|
473
|
-
|
|
474
|
-
interface SourceSimpleMosfet extends SourceComponentBase {
|
|
472
|
+
* Pin configuration is handled by the schematic port system */ interface SourceSimpleMosfet
|
|
473
|
+
extends SourceComponentBase {
|
|
475
474
|
ftype: "simple_mosfet"
|
|
476
475
|
channel_type: "n" | "p"
|
|
477
476
|
mosfet_mode: "enhancement" | "depletion"
|
|
@@ -485,8 +484,8 @@ interface SourceSimpleMosfet extends SourceComponentBase {
|
|
|
485
484
|
Defines a simple power source component
|
|
486
485
|
|
|
487
486
|
```typescript
|
|
488
|
-
/** Defines a simple power source component */
|
|
489
|
-
|
|
487
|
+
/** Defines a simple power source component */ interface SourceSimplePowerSource
|
|
488
|
+
extends SourceComponentBase {
|
|
490
489
|
ftype: "simple_power_source"
|
|
491
490
|
voltage: number
|
|
492
491
|
}
|
|
@@ -499,8 +498,8 @@ interface SourceSimplePowerSource extends SourceComponentBase {
|
|
|
499
498
|
Defines a simple push button component
|
|
500
499
|
|
|
501
500
|
```typescript
|
|
502
|
-
/** Defines a simple push button component */
|
|
503
|
-
|
|
501
|
+
/** Defines a simple push button component */ interface SourceSimplePushButton
|
|
502
|
+
extends SourceComponentBase {
|
|
504
503
|
ftype: "simple_push_button"
|
|
505
504
|
}
|
|
506
505
|
```
|
|
@@ -512,8 +511,8 @@ interface SourceSimplePushButton extends SourceComponentBase {
|
|
|
512
511
|
Defines a simple resistor component
|
|
513
512
|
|
|
514
513
|
```typescript
|
|
515
|
-
/** Defines a simple resistor component */
|
|
516
|
-
|
|
514
|
+
/** Defines a simple resistor component */ interface SourceSimpleResistor
|
|
515
|
+
extends SourceComponentBase {
|
|
517
516
|
ftype: "simple_resistor"
|
|
518
517
|
resistance: number
|
|
519
518
|
display_resistance?: string
|
|
@@ -527,8 +526,8 @@ interface SourceSimpleResistor extends SourceComponentBase {
|
|
|
527
526
|
Defines a simple resonator component
|
|
528
527
|
|
|
529
528
|
```typescript
|
|
530
|
-
/** Defines a simple resonator component */
|
|
531
|
-
|
|
529
|
+
/** Defines a simple resonator component */ interface SourceSimpleResonator
|
|
530
|
+
extends SourceComponentBase {
|
|
532
531
|
ftype: "simple_resonator"
|
|
533
532
|
load_capacitance: number
|
|
534
533
|
equivalent_series_resistance?: number
|
|
@@ -543,8 +542,8 @@ interface SourceSimpleResonator extends SourceComponentBase {
|
|
|
543
542
|
Defines a simple switch component
|
|
544
543
|
|
|
545
544
|
```typescript
|
|
546
|
-
/** Defines a simple switch component */
|
|
547
|
-
|
|
545
|
+
/** Defines a simple switch component */ interface SourceSimpleSwitch
|
|
546
|
+
extends SourceComponentBase {
|
|
548
547
|
ftype: "simple_switch"
|
|
549
548
|
}
|
|
550
549
|
```
|
|
@@ -556,8 +555,8 @@ interface SourceSimpleSwitch extends SourceComponentBase {
|
|
|
556
555
|
```typescript
|
|
557
556
|
/** Defines a simple test point component
|
|
558
557
|
* Can be surface-mount or through-hole.
|
|
559
|
-
* Pad shape and dimensions configurable for different use cases. */
|
|
560
|
-
|
|
558
|
+
* Pad shape and dimensions configurable for different use cases. */ interface SourceSimpleTestPoint
|
|
559
|
+
extends SourceComponentBase {
|
|
561
560
|
ftype: "simple_test_point"
|
|
562
561
|
footprint_variant?: "pad" | "through_hole"
|
|
563
562
|
pad_shape?: "rect" | "circle"
|
|
@@ -575,9 +574,8 @@ interface SourceSimpleTestPoint extends SourceComponentBase {
|
|
|
575
574
|
```typescript
|
|
576
575
|
/** Defines a simple transistor component
|
|
577
576
|
* This is a three-pin semiconductor device (emitter, base, collector)
|
|
578
|
-
* Pin configuration is handled by the schematic port system */
|
|
579
|
-
|
|
580
|
-
interface SourceSimpleTransistor extends SourceComponentBase {
|
|
577
|
+
* Pin configuration is handled by the schematic port system */ interface SourceSimpleTransistor
|
|
578
|
+
extends SourceComponentBase {
|
|
581
579
|
ftype: "simple_transistor"
|
|
582
580
|
transistor_type: "npn" | "pnp"
|
|
583
581
|
}
|
|
@@ -613,6 +611,7 @@ interface PcbAutoroutingErrorInterface {
|
|
|
613
611
|
pcb_error_id: string
|
|
614
612
|
error_type: "pcb_autorouting_error"
|
|
615
613
|
message: string
|
|
614
|
+
subcircuit_id?: string
|
|
616
615
|
}
|
|
617
616
|
```
|
|
618
617
|
|
|
@@ -623,8 +622,7 @@ interface PcbAutoroutingErrorInterface {
|
|
|
623
622
|
Defines the board outline of the PCB
|
|
624
623
|
|
|
625
624
|
```typescript
|
|
626
|
-
/** Defines the board outline of the PCB */
|
|
627
|
-
interface PcbBoard {
|
|
625
|
+
/** Defines the board outline of the PCB */ interface PcbBoard {
|
|
628
626
|
type: "pcb_board"
|
|
629
627
|
pcb_board_id: string
|
|
630
628
|
is_subcircuit?: boolean
|
|
@@ -646,8 +644,7 @@ interface PcbBoard {
|
|
|
646
644
|
Defines a routing target within a pcb_group for a source_trace or source_net
|
|
647
645
|
|
|
648
646
|
```typescript
|
|
649
|
-
/** Defines a routing target within a pcb_group for a source_trace or source_net */
|
|
650
|
-
interface PcbBreakoutPoint {
|
|
647
|
+
/** Defines a routing target within a pcb_group for a source_trace or source_net */ interface PcbBreakoutPoint {
|
|
651
648
|
type: "pcb_breakout_point"
|
|
652
649
|
pcb_breakout_point_id: string
|
|
653
650
|
pcb_group_id: string
|
|
@@ -667,8 +664,7 @@ interface PcbBreakoutPoint {
|
|
|
667
664
|
Defines a component on the PCB
|
|
668
665
|
|
|
669
666
|
```typescript
|
|
670
|
-
/** Defines a component on the PCB */
|
|
671
|
-
interface PcbComponent {
|
|
667
|
+
/** Defines a component on the PCB */ interface PcbComponent {
|
|
672
668
|
type: "pcb_component"
|
|
673
669
|
pcb_component_id: string
|
|
674
670
|
source_component_id: string
|
|
@@ -689,8 +685,7 @@ interface PcbComponent {
|
|
|
689
685
|
Defines a rectangular cutout on the PCB.
|
|
690
686
|
|
|
691
687
|
```typescript
|
|
692
|
-
/** Defines a rectangular cutout on the PCB. */
|
|
693
|
-
interface PcbCutoutRect {
|
|
688
|
+
/** Defines a rectangular cutout on the PCB. */ interface PcbCutoutRect {
|
|
694
689
|
type: "pcb_cutout"
|
|
695
690
|
pcb_cutout_id: string
|
|
696
691
|
pcb_group_id?: string
|
|
@@ -710,8 +705,7 @@ interface PcbCutoutRect {
|
|
|
710
705
|
Defines a fabrication path on the PCB for fabricators or assemblers
|
|
711
706
|
|
|
712
707
|
```typescript
|
|
713
|
-
/** Defines a fabrication path on the PCB for fabricators or assemblers */
|
|
714
|
-
interface PcbFabricationNotePath {
|
|
708
|
+
/** Defines a fabrication path on the PCB for fabricators or assemblers */ interface PcbFabricationNotePath {
|
|
715
709
|
type: "pcb_fabrication_note_path"
|
|
716
710
|
pcb_fabrication_note_path_id: string
|
|
717
711
|
pcb_component_id: string
|
|
@@ -730,8 +724,7 @@ interface PcbFabricationNotePath {
|
|
|
730
724
|
Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators
|
|
731
725
|
|
|
732
726
|
```typescript
|
|
733
|
-
/** Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators */
|
|
734
|
-
interface PcbFabricationNoteText {
|
|
727
|
+
/** Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators */ interface PcbFabricationNoteText {
|
|
735
728
|
type: "pcb_fabrication_note_text"
|
|
736
729
|
pcb_fabrication_note_text_id: string
|
|
737
730
|
subcircuit_id?: string
|
|
@@ -759,8 +752,7 @@ interface PcbFabricationNoteText {
|
|
|
759
752
|
Defines a ground plane on the PCB
|
|
760
753
|
|
|
761
754
|
```typescript
|
|
762
|
-
/** Defines a ground plane on the PCB */
|
|
763
|
-
interface PcbGroundPlane {
|
|
755
|
+
/** Defines a ground plane on the PCB */ interface PcbGroundPlane {
|
|
764
756
|
type: "pcb_ground_plane"
|
|
765
757
|
pcb_ground_plane_id: string
|
|
766
758
|
source_pcb_ground_plane_id: string
|
|
@@ -777,8 +769,7 @@ interface PcbGroundPlane {
|
|
|
777
769
|
Defines a polygon region of a ground plane
|
|
778
770
|
|
|
779
771
|
```typescript
|
|
780
|
-
/** Defines a polygon region of a ground plane */
|
|
781
|
-
interface PcbGroundPlaneRegion {
|
|
772
|
+
/** Defines a polygon region of a ground plane */ interface PcbGroundPlaneRegion {
|
|
782
773
|
type: "pcb_ground_plane_region"
|
|
783
774
|
pcb_ground_plane_region_id: string
|
|
784
775
|
pcb_ground_plane_id: string
|
|
@@ -796,8 +787,7 @@ interface PcbGroundPlaneRegion {
|
|
|
796
787
|
Defines a group of components on the PCB
|
|
797
788
|
|
|
798
789
|
```typescript
|
|
799
|
-
/** Defines a group of components on the PCB */
|
|
800
|
-
interface PcbGroup {
|
|
790
|
+
/** Defines a group of components on the PCB */ interface PcbGroup {
|
|
801
791
|
type: "pcb_group"
|
|
802
792
|
pcb_group_id: string
|
|
803
793
|
source_group_id: string
|
|
@@ -819,8 +809,7 @@ interface PcbGroup {
|
|
|
819
809
|
Defines a circular or square hole on the PCB
|
|
820
810
|
|
|
821
811
|
```typescript
|
|
822
|
-
/** Defines a circular or square hole on the PCB */
|
|
823
|
-
interface PcbHoleCircleOrSquare {
|
|
812
|
+
/** Defines a circular or square hole on the PCB */ interface PcbHoleCircleOrSquare {
|
|
824
813
|
type: "pcb_hole"
|
|
825
814
|
pcb_hole_id: string
|
|
826
815
|
pcb_group_id?: string
|
|
@@ -839,8 +828,7 @@ interface PcbHoleCircleOrSquare {
|
|
|
839
828
|
Warning emitted when a component has both manual placement (via manualEdits) and explicit pcbX/pcbY coordinates
|
|
840
829
|
|
|
841
830
|
```typescript
|
|
842
|
-
/** Warning emitted when a component has both manual placement (via manualEdits) and explicit pcbX/pcbY coordinates */
|
|
843
|
-
interface PcbManualEditConflictWarning {
|
|
831
|
+
/** Warning emitted when a component has both manual placement (via manualEdits) and explicit pcbX/pcbY coordinates */ interface PcbManualEditConflictWarning {
|
|
844
832
|
type: "pcb_manual_edit_conflict_warning"
|
|
845
833
|
pcb_manual_edit_conflict_warning_id: string
|
|
846
834
|
warning_type: "pcb_manual_edit_conflict_warning"
|
|
@@ -859,8 +847,7 @@ interface PcbManualEditConflictWarning {
|
|
|
859
847
|
Defines a placement error on the PCB
|
|
860
848
|
|
|
861
849
|
```typescript
|
|
862
|
-
/** Defines a placement error on the PCB */
|
|
863
|
-
interface PcbMissingFootprintError {
|
|
850
|
+
/** Defines a placement error on the PCB */ interface PcbMissingFootprintError {
|
|
864
851
|
type: "pcb_missing_footprint_error"
|
|
865
852
|
pcb_missing_footprint_error_id: string
|
|
866
853
|
pcb_group_id?: string
|
|
@@ -878,12 +865,12 @@ interface PcbMissingFootprintError {
|
|
|
878
865
|
Defines a placement error on the PCB
|
|
879
866
|
|
|
880
867
|
```typescript
|
|
881
|
-
/** Defines a placement error on the PCB */
|
|
882
|
-
interface PcbPlacementError {
|
|
868
|
+
/** Defines a placement error on the PCB */ interface PcbPlacementError {
|
|
883
869
|
type: "pcb_placement_error"
|
|
884
870
|
pcb_placement_error_id: string
|
|
885
871
|
error_type: "pcb_placement_error"
|
|
886
872
|
message: string
|
|
873
|
+
subcircuit_id?: string
|
|
887
874
|
}
|
|
888
875
|
```
|
|
889
876
|
|
|
@@ -894,8 +881,7 @@ interface PcbPlacementError {
|
|
|
894
881
|
Defines a circular plated hole on the PCB
|
|
895
882
|
|
|
896
883
|
```typescript
|
|
897
|
-
/** Defines a circular plated hole on the PCB */
|
|
898
|
-
interface PcbPlatedHoleCircle {
|
|
884
|
+
/** Defines a circular plated hole on the PCB */ interface PcbPlatedHoleCircle {
|
|
899
885
|
type: "pcb_plated_hole"
|
|
900
886
|
shape: "circle"
|
|
901
887
|
pcb_group_id?: string
|
|
@@ -911,7 +897,7 @@ interface PcbPlatedHoleCircle {
|
|
|
911
897
|
pcb_plated_hole_id: string
|
|
912
898
|
}
|
|
913
899
|
|
|
914
|
-
interface PcbHolePillWithRectPad {
|
|
900
|
+
/** Defines an oval or pill-shaped plated hole on the PCB */ interface PcbHolePillWithRectPad {
|
|
915
901
|
type: "pcb_plated_hole"
|
|
916
902
|
shape: "pill_hole_with_rect_pad"
|
|
917
903
|
pcb_group_id?: string
|
|
@@ -931,7 +917,7 @@ interface PcbHolePillWithRectPad {
|
|
|
931
917
|
pcb_plated_hole_id: string
|
|
932
918
|
}
|
|
933
919
|
|
|
934
|
-
interface PcbHoleCircularWithRectPad {
|
|
920
|
+
/** Defines an oval or pill-shaped plated hole on the PCB */ interface PcbHoleCircularWithRectPad {
|
|
935
921
|
type: "pcb_plated_hole"
|
|
936
922
|
shape: "circular_hole_with_rect_pad"
|
|
937
923
|
pcb_group_id?: string
|
|
@@ -958,8 +944,7 @@ interface PcbHoleCircularWithRectPad {
|
|
|
958
944
|
Defines a port on the PCB
|
|
959
945
|
|
|
960
946
|
```typescript
|
|
961
|
-
/** Defines a port on the PCB */
|
|
962
|
-
interface PcbPort {
|
|
947
|
+
/** Defines a port on the PCB */ interface PcbPort {
|
|
963
948
|
type: "pcb_port"
|
|
964
949
|
pcb_port_id: string
|
|
965
950
|
pcb_group_id?: string
|
|
@@ -979,13 +964,13 @@ interface PcbPort {
|
|
|
979
964
|
Defines a trace error on the PCB where a port is not matched
|
|
980
965
|
|
|
981
966
|
```typescript
|
|
982
|
-
/** Defines a trace error on the PCB where a port is not matched */
|
|
983
|
-
interface PcbPortNotMatchedError {
|
|
967
|
+
/** Defines a trace error on the PCB where a port is not matched */ interface PcbPortNotMatchedError {
|
|
984
968
|
type: "pcb_port_not_matched_error"
|
|
985
969
|
pcb_error_id: string
|
|
986
970
|
error_type: "pcb_port_not_matched_error"
|
|
987
971
|
message: string
|
|
988
972
|
pcb_component_ids: string[]
|
|
973
|
+
subcircuit_id?: string
|
|
989
974
|
}
|
|
990
975
|
```
|
|
991
976
|
|
|
@@ -996,8 +981,7 @@ interface PcbPortNotMatchedError {
|
|
|
996
981
|
Defines a silkscreen circle on the PCB
|
|
997
982
|
|
|
998
983
|
```typescript
|
|
999
|
-
/** Defines a silkscreen circle on the PCB */
|
|
1000
|
-
interface PcbSilkscreenCircle {
|
|
984
|
+
/** Defines a silkscreen circle on the PCB */ interface PcbSilkscreenCircle {
|
|
1001
985
|
type: "pcb_silkscreen_circle"
|
|
1002
986
|
pcb_silkscreen_circle_id: string
|
|
1003
987
|
pcb_component_id: string
|
|
@@ -1017,8 +1001,7 @@ interface PcbSilkscreenCircle {
|
|
|
1017
1001
|
Defines a silkscreen line on the PCB
|
|
1018
1002
|
|
|
1019
1003
|
```typescript
|
|
1020
|
-
/** Defines a silkscreen line on the PCB */
|
|
1021
|
-
interface PcbSilkscreenLine {
|
|
1004
|
+
/** Defines a silkscreen line on the PCB */ interface PcbSilkscreenLine {
|
|
1022
1005
|
type: "pcb_silkscreen_line"
|
|
1023
1006
|
pcb_silkscreen_line_id: string
|
|
1024
1007
|
pcb_component_id: string
|
|
@@ -1040,8 +1023,7 @@ interface PcbSilkscreenLine {
|
|
|
1040
1023
|
Defines a silkscreen oval on the PCB
|
|
1041
1024
|
|
|
1042
1025
|
```typescript
|
|
1043
|
-
/** Defines a silkscreen oval on the PCB */
|
|
1044
|
-
interface PcbSilkscreenOval {
|
|
1026
|
+
/** Defines a silkscreen oval on the PCB */ interface PcbSilkscreenOval {
|
|
1045
1027
|
type: "pcb_silkscreen_oval"
|
|
1046
1028
|
pcb_silkscreen_oval_id: string
|
|
1047
1029
|
pcb_component_id: string
|
|
@@ -1061,8 +1043,7 @@ interface PcbSilkscreenOval {
|
|
|
1061
1043
|
Defines a silkscreen path on the PCB
|
|
1062
1044
|
|
|
1063
1045
|
```typescript
|
|
1064
|
-
/** Defines a silkscreen path on the PCB */
|
|
1065
|
-
interface PcbSilkscreenPath {
|
|
1046
|
+
/** Defines a silkscreen path on the PCB */ interface PcbSilkscreenPath {
|
|
1066
1047
|
type: "pcb_silkscreen_path"
|
|
1067
1048
|
pcb_silkscreen_path_id: string
|
|
1068
1049
|
pcb_component_id: string
|
|
@@ -1081,8 +1062,7 @@ interface PcbSilkscreenPath {
|
|
|
1081
1062
|
Defines a silkscreen pill on the PCB
|
|
1082
1063
|
|
|
1083
1064
|
```typescript
|
|
1084
|
-
/** Defines a silkscreen pill on the PCB */
|
|
1085
|
-
interface PcbSilkscreenPill {
|
|
1065
|
+
/** Defines a silkscreen pill on the PCB */ interface PcbSilkscreenPill {
|
|
1086
1066
|
type: "pcb_silkscreen_pill"
|
|
1087
1067
|
pcb_silkscreen_pill_id: string
|
|
1088
1068
|
pcb_component_id: string
|
|
@@ -1102,8 +1082,7 @@ interface PcbSilkscreenPill {
|
|
|
1102
1082
|
Defines a silkscreen rect on the PCB
|
|
1103
1083
|
|
|
1104
1084
|
```typescript
|
|
1105
|
-
/** Defines a silkscreen rect on the PCB */
|
|
1106
|
-
interface PcbSilkscreenRect {
|
|
1085
|
+
/** Defines a silkscreen rect on the PCB */ interface PcbSilkscreenRect {
|
|
1107
1086
|
type: "pcb_silkscreen_rect"
|
|
1108
1087
|
pcb_silkscreen_rect_id: string
|
|
1109
1088
|
pcb_component_id: string
|
|
@@ -1127,8 +1106,7 @@ interface PcbSilkscreenRect {
|
|
|
1127
1106
|
Defines silkscreen text on the PCB
|
|
1128
1107
|
|
|
1129
1108
|
```typescript
|
|
1130
|
-
/** Defines silkscreen text on the PCB */
|
|
1131
|
-
interface PcbSilkscreenText {
|
|
1109
|
+
/** Defines silkscreen text on the PCB */ interface PcbSilkscreenText {
|
|
1132
1110
|
type: "pcb_silkscreen_text"
|
|
1133
1111
|
pcb_silkscreen_text_id: string
|
|
1134
1112
|
pcb_group_id?: string
|
|
@@ -1152,8 +1130,7 @@ interface PcbSilkscreenText {
|
|
|
1152
1130
|
Defines solderpaste on the PCB
|
|
1153
1131
|
|
|
1154
1132
|
```typescript
|
|
1155
|
-
/** Defines solderpaste on the PCB */
|
|
1156
|
-
interface PcbSolderPasteCircle {
|
|
1133
|
+
/** Defines solderpaste on the PCB */ interface PcbSolderPasteCircle {
|
|
1157
1134
|
type: "pcb_solder_paste"
|
|
1158
1135
|
shape: "circle"
|
|
1159
1136
|
pcb_solder_paste_id: string
|
|
@@ -1175,8 +1152,7 @@ interface PcbSolderPasteCircle {
|
|
|
1175
1152
|
Defines text on the PCB
|
|
1176
1153
|
|
|
1177
1154
|
```typescript
|
|
1178
|
-
/** Defines text on the PCB */
|
|
1179
|
-
interface PcbText {
|
|
1155
|
+
/** Defines text on the PCB */ interface PcbText {
|
|
1180
1156
|
type: "pcb_text"
|
|
1181
1157
|
pcb_text_id: string
|
|
1182
1158
|
pcb_group_id?: string
|
|
@@ -1199,8 +1175,7 @@ interface PcbText {
|
|
|
1199
1175
|
Pattern for connecting a ground plane to a plated hole
|
|
1200
1176
|
|
|
1201
1177
|
```typescript
|
|
1202
|
-
/** Pattern for connecting a ground plane to a plated hole */
|
|
1203
|
-
interface PcbThermalSpoke {
|
|
1178
|
+
/** Pattern for connecting a ground plane to a plated hole */ interface PcbThermalSpoke {
|
|
1204
1179
|
type: "pcb_thermal_spoke"
|
|
1205
1180
|
pcb_thermal_spoke_id: string
|
|
1206
1181
|
pcb_ground_plane_id: string
|
|
@@ -1210,6 +1185,7 @@ interface PcbThermalSpoke {
|
|
|
1210
1185
|
spoke_inner_diameter: Distance
|
|
1211
1186
|
spoke_outer_diameter: Distance
|
|
1212
1187
|
pcb_plated_hole_id?: string
|
|
1188
|
+
subcircuit_id?: string
|
|
1213
1189
|
}
|
|
1214
1190
|
```
|
|
1215
1191
|
|
|
@@ -1236,8 +1212,7 @@ interface PcbTraceRoutePointWire {
|
|
|
1236
1212
|
Defines a trace error on the PCB
|
|
1237
1213
|
|
|
1238
1214
|
```typescript
|
|
1239
|
-
/** Defines a trace error on the PCB */
|
|
1240
|
-
interface PcbTraceError {
|
|
1215
|
+
/** Defines a trace error on the PCB */ interface PcbTraceError {
|
|
1241
1216
|
type: "pcb_trace_error"
|
|
1242
1217
|
pcb_trace_error_id: string
|
|
1243
1218
|
error_type: "pcb_trace_error"
|
|
@@ -1247,6 +1222,7 @@ interface PcbTraceError {
|
|
|
1247
1222
|
source_trace_id: string
|
|
1248
1223
|
pcb_component_ids: string[]
|
|
1249
1224
|
pcb_port_ids: string[]
|
|
1225
|
+
subcircuit_id?: string
|
|
1250
1226
|
}
|
|
1251
1227
|
```
|
|
1252
1228
|
|
|
@@ -1257,13 +1233,38 @@ interface PcbTraceError {
|
|
|
1257
1233
|
A hint that can be used during generation of a PCB trace.
|
|
1258
1234
|
|
|
1259
1235
|
```typescript
|
|
1260
|
-
/** A hint that can be used during generation of a PCB trace. */
|
|
1261
|
-
interface PcbTraceHint {
|
|
1236
|
+
/** A hint that can be used during generation of a PCB trace. */ interface PcbTraceHint {
|
|
1262
1237
|
type: "pcb_trace_hint"
|
|
1263
1238
|
pcb_trace_hint_id: string
|
|
1264
1239
|
pcb_port_id: string
|
|
1265
1240
|
pcb_component_id: string
|
|
1266
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
|
|
1267
1268
|
}
|
|
1268
1269
|
```
|
|
1269
1270
|
|
|
@@ -1282,6 +1283,7 @@ interface SchematicBox {
|
|
|
1282
1283
|
is_dashed: boolean
|
|
1283
1284
|
x: number
|
|
1284
1285
|
y: number
|
|
1286
|
+
subcircuit_id?: string
|
|
1285
1287
|
}
|
|
1286
1288
|
```
|
|
1287
1289
|
|
|
@@ -1327,6 +1329,7 @@ interface SchematicError {
|
|
|
1327
1329
|
schematic_error_id: string
|
|
1328
1330
|
error_type: "schematic_port_not_found"
|
|
1329
1331
|
message: string
|
|
1332
|
+
subcircuit_id?: string
|
|
1330
1333
|
}
|
|
1331
1334
|
```
|
|
1332
1335
|
|
|
@@ -1337,8 +1340,7 @@ interface SchematicError {
|
|
|
1337
1340
|
Defines a group of components on the schematic
|
|
1338
1341
|
|
|
1339
1342
|
```typescript
|
|
1340
|
-
/** Defines a group of components on the schematic */
|
|
1341
|
-
interface SchematicGroup {
|
|
1343
|
+
/** Defines a group of components on the schematic */ interface SchematicGroup {
|
|
1342
1344
|
type: "schematic_group"
|
|
1343
1345
|
schematic_group_id: string
|
|
1344
1346
|
source_group_id: string
|
|
@@ -1365,6 +1367,7 @@ interface SchematicLayoutError {
|
|
|
1365
1367
|
message: string
|
|
1366
1368
|
source_group_id: string
|
|
1367
1369
|
schematic_group_id: string
|
|
1370
|
+
subcircuit_id?: string
|
|
1368
1371
|
}
|
|
1369
1372
|
```
|
|
1370
1373
|
|
|
@@ -1375,14 +1378,14 @@ interface SchematicLayoutError {
|
|
|
1375
1378
|
```typescript
|
|
1376
1379
|
/** Defines a line on the schematic, this can be used for adding arbitrary lines
|
|
1377
1380
|
* to a schematic, but don't use it for drawing traces, schematic boxes or where
|
|
1378
|
-
* other schematic elements are more appropriate. */
|
|
1379
|
-
interface SchematicLine {
|
|
1381
|
+
* other schematic elements are more appropriate. */ interface SchematicLine {
|
|
1380
1382
|
type: "schematic_line"
|
|
1381
1383
|
schematic_component_id: string
|
|
1382
1384
|
x1: number
|
|
1383
1385
|
x2: number
|
|
1384
1386
|
y1: number
|
|
1385
1387
|
y2: number
|
|
1388
|
+
subcircuit_id?: string
|
|
1386
1389
|
}
|
|
1387
1390
|
```
|
|
1388
1391
|
|
|
@@ -1393,8 +1396,7 @@ interface SchematicLine {
|
|
|
1393
1396
|
Warning emitted when a component has both manual placement (via manualEdits) and explicit schX/schY coordinates
|
|
1394
1397
|
|
|
1395
1398
|
```typescript
|
|
1396
|
-
/** Warning emitted when a component has both manual placement (via manualEdits) and explicit schX/schY coordinates */
|
|
1397
|
-
interface SchematicManualEditConflictWarning {
|
|
1399
|
+
/** Warning emitted when a component has both manual placement (via manualEdits) and explicit schX/schY coordinates */ interface SchematicManualEditConflictWarning {
|
|
1398
1400
|
type: "schematic_manual_edit_conflict_warning"
|
|
1399
1401
|
schematic_manual_edit_conflict_warning_id: string
|
|
1400
1402
|
warning_type: "schematic_manual_edit_conflict_warning"
|
|
@@ -1422,6 +1424,7 @@ interface SchematicNetLabel {
|
|
|
1422
1424
|
anchor_side: "top" | "bottom" | "left" | "right"
|
|
1423
1425
|
text: string
|
|
1424
1426
|
symbol_name?: string | undefined
|
|
1427
|
+
subcircuit_id?: string
|
|
1425
1428
|
}
|
|
1426
1429
|
```
|
|
1427
1430
|
|
|
@@ -1436,6 +1439,7 @@ interface SchematicPath {
|
|
|
1436
1439
|
fill_color?: "red" | "blue"
|
|
1437
1440
|
is_filled?: boolean
|
|
1438
1441
|
points: Point[]
|
|
1442
|
+
subcircuit_id?: string
|
|
1439
1443
|
}
|
|
1440
1444
|
```
|
|
1441
1445
|
|
|
@@ -1456,6 +1460,7 @@ interface SchematicPort {
|
|
|
1456
1460
|
true_ccw_index?: number
|
|
1457
1461
|
pin_number?: number
|
|
1458
1462
|
display_pin_label?: string
|
|
1463
|
+
subcircuit_id?: string
|
|
1459
1464
|
}
|
|
1460
1465
|
```
|
|
1461
1466
|
|
|
@@ -1499,6 +1504,7 @@ interface SchematicVoltageProbe {
|
|
|
1499
1504
|
position: Point
|
|
1500
1505
|
schematic_trace_id: string
|
|
1501
1506
|
voltage?: number
|
|
1507
|
+
subcircuit_id?: string
|
|
1502
1508
|
}
|
|
1503
1509
|
```
|
|
1504
1510
|
|