circuit-json 0.0.428 → 0.0.430

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
@@ -46,16 +46,25 @@ https://github.com/user-attachments/assets/2f28b7ba-689e-4d80-85b2-5bdef84b41f8
46
46
  - [Typescript Usage](#typescript-usage)
47
47
 
48
48
  - [Source Components](#source-components)
49
+ - [SourceAmbiguousPortReference](#sourceambiguousportreference)
49
50
  - [SourceBoard](#sourceboard)
50
51
  - [SourceComponentBase](#sourcecomponentbase)
51
52
  - [SourceComponentInternalConnection](#sourcecomponentinternalconnection)
53
+ - [SourceComponentMisconfiguredError](#sourcecomponentmisconfigurederror)
54
+ - [SourceComponentPinsUnderspecifiedWarning](#sourcecomponentpinsunderspecifiedwarning)
52
55
  - [SourceFailedToCreateComponentError](#sourcefailedtocreatecomponenterror)
53
56
  - [SourceGroup](#sourcegroup)
57
+ - [SourceI2cMisconfiguredError](#sourcei2cmisconfigurederror)
54
58
  - [SourceInterconnect](#sourceinterconnect)
59
+ - [SourceInvalidComponentPropertyError](#sourceinvalidcomponentpropertyerror)
55
60
  - [SourceManuallyPlacedVia](#sourcemanuallyplacedvia)
61
+ - [SourceMissingManufacturerPartNumberWarning](#sourcemissingmanufacturerpartnumberwarning)
56
62
  - [SourceMissingPropertyError](#sourcemissingpropertyerror)
57
63
  - [SourceNet](#sourcenet)
64
+ - [SourceNoGroundPinDefinedWarning](#sourcenogroundpindefinedwarning)
65
+ - [SourceNoPowerPinDefinedWarning](#sourcenopowerpindefinedwarning)
58
66
  - [SourcePcbGroundPlane](#sourcepcbgroundplane)
67
+ - [SourcePinAttributes](#sourcepinattributes)
59
68
  - [SourcePinMissingTraceWarning](#sourcepinmissingtracewarning)
60
69
  - [SourcePinMustBeConnectedError](#sourcepinmustbeconnectederror)
61
70
  - [SourcePort](#sourceport)
@@ -64,7 +73,9 @@ https://github.com/user-attachments/assets/2f28b7ba-689e-4d80-85b2-5bdef84b41f8
64
73
  - [SourceSimpleBattery](#sourcesimplebattery)
65
74
  - [SourceSimpleCapacitor](#sourcesimplecapacitor)
66
75
  - [SourceSimpleChip](#sourcesimplechip)
76
+ - [SourceSimpleConnector](#sourcesimpleconnector)
67
77
  - [SourceSimpleCrystal](#sourcesimplecrystal)
78
+ - [SourceSimpleCurrentSource](#sourcesimplecurrentsource)
68
79
  - [SourceSimpleDiode](#sourcesimplediode)
69
80
  - [SourceSimpleFiducial](#sourcesimplefiducial)
70
81
  - [SourceSimpleFuse](#sourcesimplefuse)
@@ -72,6 +83,7 @@ https://github.com/user-attachments/assets/2f28b7ba-689e-4d80-85b2-5bdef84b41f8
72
83
  - [SourceSimpleInductor](#sourcesimpleinductor)
73
84
  - [SourceSimpleLed](#sourcesimpleled)
74
85
  - [SourceSimpleMosfet](#sourcesimplemosfet)
86
+ - [SourceSimpleOpAmp](#sourcesimpleopamp)
75
87
  - [SourceSimplePinHeader](#sourcesimplepinheader)
76
88
  - [SourceSimplePinout](#sourcesimplepinout)
77
89
  - [SourceSimplePotentiometer](#sourcesimplepotentiometer)
@@ -83,6 +95,7 @@ https://github.com/user-attachments/assets/2f28b7ba-689e-4d80-85b2-5bdef84b41f8
83
95
  - [SourceSimpleTestPoint](#sourcesimpletestpoint)
84
96
  - [SourceSimpleTransistor](#sourcesimpletransistor)
85
97
  - [SourceSimpleVoltageProbe](#sourcesimplevoltageprobe)
98
+ - [SourceSimpleVoltageSource](#sourcesimplevoltagesource)
86
99
  - [SourceTrace](#sourcetrace)
87
100
  - [SourceTraceNotConnectedError](#sourcetracenotconnectederror)
88
101
  - [UnknownErrorFindingPart](#unknownerrorfindingpart)
@@ -94,10 +107,14 @@ https://github.com/user-attachments/assets/2f28b7ba-689e-4d80-85b2-5bdef84b41f8
94
107
  - [PcbBreakoutPoint](#pcbbreakoutpoint)
95
108
  - [PcbComponent](#pcbcomponent)
96
109
  - [PcbComponentInvalidLayerError](#pcbcomponentinvalidlayererror)
110
+ - [PcbComponentNotOnBoardEdgeError](#pcbcomponentnotonboardedgeerror)
97
111
  - [PcbComponentOutsideBoardError](#pcbcomponentoutsideboarderror)
112
+ - [PcbConnectorNotInAccessibleOrientationWarning](#pcbconnectornotinaccessibleorientationwarning)
98
113
  - [PcbCopperPour](#pcbcopperpour)
99
114
  - [PcbCopperText](#pcbcoppertext)
115
+ - [PcbCourtyardCircle](#pcbcourtyardcircle)
100
116
  - [PcbCourtyardOutline](#pcbcourtyardoutline)
117
+ - [PcbCourtyardOverlapError](#pcbcourtyardoverlaperror)
101
118
  - [PcbCourtyardPolygon](#pcbcourtyardpolygon)
102
119
  - [PcbCourtyardRect](#pcbcourtyardrect)
103
120
  - [PcbCutout](#pcbcutout)
@@ -118,7 +135,10 @@ https://github.com/user-attachments/assets/2f28b7ba-689e-4d80-85b2-5bdef84b41f8
118
135
  - [PcbNotePath](#pcbnotepath)
119
136
  - [PcbNoteRect](#pcbnoterect)
120
137
  - [PcbNoteText](#pcbnotetext)
138
+ - [PcbPadPadClearanceError](#pcbpadpadclearanceerror)
139
+ - [PcbPadTraceClearanceError](#pcbpadtraceclearanceerror)
121
140
  - [PcbPanel](#pcbpanel)
141
+ - [PcbPanelizationPlacementError](#pcbpanelizationplacementerror)
122
142
  - [PcbPlacementError](#pcbplacementerror)
123
143
  - [PcbPlatedHole](#pcbplatedhole)
124
144
  - [PcbPort](#pcbport)
@@ -133,16 +153,16 @@ https://github.com/user-attachments/assets/2f28b7ba-689e-4d80-85b2-5bdef84b41f8
133
153
  - [PcbSilkscreenRect](#pcbsilkscreenrect)
134
154
  - [PcbSilkscreenText](#pcbsilkscreentext)
135
155
  - [PcbSolderPaste](#pcbsolderpaste)
136
- - [SupplierFootprintMismatchWarning](#supplierfootprintmismatchwarning)
137
156
  - [PcbText](#pcbtext)
138
157
  - [PcbThermalSpoke](#pcbthermalspoke)
139
158
  - [PcbTrace](#pcbtrace)
140
- - [PcbTraceWarning](#pcbtracewarning)
141
159
  - [PcbTraceError](#pcbtraceerror)
142
160
  - [PcbTraceHint](#pcbtracehint)
143
161
  - [PcbTraceMissingError](#pcbtracemissingerror)
162
+ - [PcbTraceWarning](#pcbtracewarning)
144
163
  - [PcbVia](#pcbvia)
145
164
  - [PcbViaClearanceError](#pcbviaclearanceerror)
165
+ - [PcbViaTraceClearanceError](#pcbviatraceclearanceerror)
146
166
  - [Schematic Elements](#schematic-elements)
147
167
  - [SchematicArc](#schematicarc)
148
168
  - [SchematicBox](#schematicbox)
@@ -159,13 +179,17 @@ https://github.com/user-attachments/assets/2f28b7ba-689e-4d80-85b2-5bdef84b41f8
159
179
  - [SchematicPort](#schematicport)
160
180
  - [SchematicRect](#schematicrect)
161
181
  - [SchematicSheet](#schematicsheet)
182
+ - [SchematicSymbol](#schematicsymbol)
162
183
  - [SchematicTable](#schematictable)
163
184
  - [SchematicTableCell](#schematictablecell)
164
185
  - [SchematicText](#schematictext)
165
186
  - [SchematicTrace](#schematictrace)
166
187
  - [SchematicVoltageProbe](#schematicvoltageprobe)
167
188
  - [Simulation Elements](#simulation-elements)
189
+ - [SimulationCurrentSource](#simulationcurrentsource)
168
190
  - [SimulationExperiment](#simulationexperiment)
191
+ - [SimulationOpAmp](#simulationopamp)
192
+ - [SimulationSpiceSubcircuit](#simulationspicesubcircuit)
169
193
  - [SimulationSwitch](#simulationswitch)
170
194
  - [SimulationTransientVoltageGraph](#simulationtransientvoltagegraph)
171
195
  - [SimulationUnknownExperimentError](#simulationunknownexperimenterror)
@@ -247,6 +271,22 @@ There are 3 main element prefixes:
247
271
 
248
272
  ## Source Components
249
273
 
274
+ ### SourceAmbiguousPortReference
275
+
276
+ [Source](https://github.com/tscircuit/circuit-json/blob/main/src/source/source_ambiguous_port_reference.ts)
277
+
278
+ ```typescript
279
+ /** Error emitted when a port hint matches multiple non-overlapping pads,
280
+ * making the port reference ambiguous (e.g. multiple pads all named "SH" */
281
+ interface SourceAmbiguousPortReference extends BaseCircuitJsonError {
282
+ type: "source_ambiguous_port_reference"
283
+ source_ambiguous_port_reference_id: string
284
+ error_type: "source_ambiguous_port_reference"
285
+ source_port_id?: string
286
+ source_component_id?: string
287
+ }
288
+ ```
289
+
250
290
  ### SourceBoard
251
291
 
252
292
  [Source](https://github.com/tscircuit/circuit-json/blob/main/src/source/source_board.ts)
@@ -276,6 +316,7 @@ interface SourceComponentBase {
276
316
  manufacturer_part_number?: string
277
317
  supplier_part_numbers?: Partial<Record<SupplierName, string[]>>
278
318
  display_value?: string
319
+ display_name?: string
279
320
  are_pins_interchangeable?: boolean
280
321
  internally_connected_source_port_ids?: string[][]
281
322
  source_group_id?: string
@@ -297,6 +338,42 @@ interface SourceComponentInternalConnection {
297
338
  }
298
339
  ```
299
340
 
341
+ ### SourceComponentMisconfiguredError
342
+
343
+ [Source](https://github.com/tscircuit/circuit-json/blob/main/src/source/source_component_misconfigured_error.ts)
344
+
345
+ Error emitted when one or more source components have an invalid or conflicting configuration
346
+
347
+ ```typescript
348
+ /** Error emitted when one or more source components have an invalid or conflicting configuration */
349
+ interface SourceComponentMisconfiguredError extends BaseCircuitJsonError {
350
+ type: "source_component_misconfigured_error"
351
+ source_component_misconfigured_error_id: string
352
+ error_type: "source_component_misconfigured_error"
353
+ source_component_ids: string[]
354
+ source_port_ids?: string[]
355
+ }
356
+ ```
357
+
358
+ ### SourceComponentPinsUnderspecifiedWarning
359
+
360
+ [Source](https://github.com/tscircuit/circuit-json/blob/main/src/source/source_component_pins_underspecified_warning.ts)
361
+
362
+ Warning emitted when all ports on a source component are underspecified
363
+
364
+ ```typescript
365
+ /** Warning emitted when all ports on a source component are underspecified */
366
+ interface SourceComponentPinsUnderspecifiedWarning {
367
+ type: "source_component_pins_underspecified_warning"
368
+ source_component_pins_underspecified_warning_id: string
369
+ warning_type: "source_component_pins_underspecified_warning"
370
+ message: string
371
+ source_component_id: string
372
+ source_port_ids: string[]
373
+ subcircuit_id?: string
374
+ }
375
+ ```
376
+
300
377
  ### SourceFailedToCreateComponentError
301
378
 
302
379
  [Source](https://github.com/tscircuit/circuit-json/blob/main/src/source/source_failed_to_create_component_error.ts)
@@ -304,11 +381,10 @@ interface SourceComponentInternalConnection {
304
381
  ```typescript
305
382
  /** Error emitted when a component fails to be constructed.
306
383
  * Contains details about the failure and prevents the component from being rendered. */
307
- interface SourceFailedToCreateComponentError {
384
+ interface SourceFailedToCreateComponentError extends BaseCircuitJsonError {
308
385
  type: "source_failed_to_create_component_error"
309
386
  source_failed_to_create_component_error_id: string
310
387
  error_type: "source_failed_to_create_component_error"
311
- message: string
312
388
  component_name?: string
313
389
  subcircuit_id?: string
314
390
  parent_source_component_id?: string
@@ -341,6 +417,22 @@ interface SourceGroup {
341
417
  }
342
418
  ```
343
419
 
420
+ ### SourceI2cMisconfiguredError
421
+
422
+ [Source](https://github.com/tscircuit/circuit-json/blob/main/src/source/source_i2c_misconfigured_error.ts)
423
+
424
+ Error emitted when incompatible I2C pins (e.g. SDA and SCL) are connected to the same net
425
+
426
+ ```typescript
427
+ /** Error emitted when incompatible I2C pins (e.g. SDA and SCL) are connected to the same net */
428
+ interface SourceI2cMisconfiguredError extends BaseCircuitJsonError {
429
+ type: "source_i2c_misconfigured_error"
430
+ source_i2c_misconfigured_error_id: string
431
+ error_type: "source_i2c_misconfigured_error"
432
+ source_port_ids: string[]
433
+ }
434
+ ```
435
+
344
436
  ### SourceInterconnect
345
437
 
346
438
  [Source](https://github.com/tscircuit/circuit-json/blob/main/src/source/source_interconnect.ts)
@@ -354,6 +446,26 @@ interface SourceInterconnect extends SourceComponentBase {
354
446
  }
355
447
  ```
356
448
 
449
+ ### SourceInvalidComponentPropertyError
450
+
451
+ [Source](https://github.com/tscircuit/circuit-json/blob/main/src/source/source_invalid_component_property_error.ts)
452
+
453
+ The source component property is invalid
454
+
455
+ ```typescript
456
+ /** The source component property is invalid */
457
+ interface SourceInvalidComponentPropertyError extends BaseCircuitJsonError {
458
+ type: "source_invalid_component_property_error"
459
+ source_invalid_component_property_error_id: string
460
+ source_component_id: string
461
+ property_name: string
462
+ property_value?: unknown
463
+ expected_format?: string
464
+ subcircuit_id?: string
465
+ error_type: "source_invalid_component_property_error"
466
+ }
467
+ ```
468
+
357
469
  ### SourceManuallyPlacedVia
358
470
 
359
471
  [Source](https://github.com/tscircuit/circuit-json/blob/main/src/source/source_manually_placed_via.ts)
@@ -372,6 +484,25 @@ interface SourceManuallyPlacedVia {
372
484
  }
373
485
  ```
374
486
 
487
+ ### SourceMissingManufacturerPartNumberWarning
488
+
489
+ [Source](https://github.com/tscircuit/circuit-json/blob/main/src/source/source_missing_manufacturer_part_number_warning.ts)
490
+
491
+ Warning emitted when a standard connector is missing manufacturer part number
492
+
493
+ ```typescript
494
+ /** Warning emitted when a standard connector is missing manufacturer part number */
495
+ interface SourceMissingManufacturerPartNumberWarning {
496
+ type: "source_missing_manufacturer_part_number_warning"
497
+ source_missing_manufacturer_part_number_warning_id: string
498
+ warning_type: "source_missing_manufacturer_part_number_warning"
499
+ message: string
500
+ source_component_id: string
501
+ standard: string
502
+ subcircuit_id?: string
503
+ }
504
+ ```
505
+
375
506
  ### SourceMissingPropertyError
376
507
 
377
508
  [Source](https://github.com/tscircuit/circuit-json/blob/main/src/source/source_missing_property_error.ts)
@@ -380,14 +511,13 @@ The source code is missing a property
380
511
 
381
512
  ```typescript
382
513
  /** The source code is missing a property */
383
- interface SourceMissingPropertyError {
514
+ interface SourceMissingPropertyError extends BaseCircuitJsonError {
384
515
  type: "source_missing_property_error"
385
516
  source_missing_property_error_id: string
386
517
  source_component_id: string
387
518
  property_name: string
388
519
  subcircuit_id?: string
389
520
  error_type: "source_missing_property_error"
390
- message: string
391
521
  }
392
522
  ```
393
523
 
@@ -412,6 +542,44 @@ interface SourceNet {
412
542
  }
413
543
  ```
414
544
 
545
+ ### SourceNoGroundPinDefinedWarning
546
+
547
+ [Source](https://github.com/tscircuit/circuit-json/blob/main/src/source/source_no_ground_pin_defined_warning.ts)
548
+
549
+ Warning emitted when a chip has no source ports marked as ground pins
550
+
551
+ ```typescript
552
+ /** Warning emitted when a chip has no source ports marked as ground pins */
553
+ interface SourceNoGroundPinDefinedWarning {
554
+ type: "source_no_ground_pin_defined_warning"
555
+ source_no_ground_pin_defined_warning_id: string
556
+ warning_type: "source_no_ground_pin_defined_warning"
557
+ message: string
558
+ source_component_id: string
559
+ source_port_ids: string[]
560
+ subcircuit_id?: string
561
+ }
562
+ ```
563
+
564
+ ### SourceNoPowerPinDefinedWarning
565
+
566
+ [Source](https://github.com/tscircuit/circuit-json/blob/main/src/source/source_no_power_pin_defined_warning.ts)
567
+
568
+ Warning emitted when a chip has no source ports with requires_power=true
569
+
570
+ ```typescript
571
+ /** Warning emitted when a chip has no source ports with requires_power=true */
572
+ interface SourceNoPowerPinDefinedWarning {
573
+ type: "source_no_power_pin_defined_warning"
574
+ source_no_power_pin_defined_warning_id: string
575
+ warning_type: "source_no_power_pin_defined_warning"
576
+ message: string
577
+ source_component_id: string
578
+ source_port_ids: string[]
579
+ subcircuit_id?: string
580
+ }
581
+ ```
582
+
415
583
  ### SourcePcbGroundPlane
416
584
 
417
585
  [Source](https://github.com/tscircuit/circuit-json/blob/main/src/source/source_pcb_ground_plane.ts)
@@ -429,6 +597,52 @@ interface SourcePcbGroundPlane {
429
597
  }
430
598
  ```
431
599
 
600
+ ### SourcePinAttributes
601
+
602
+ [Source](https://github.com/tscircuit/circuit-json/blob/main/src/source/properties/source_pin_attributes.ts)
603
+
604
+ ```typescript
605
+ interface SourcePinAttributes {
606
+ must_be_connected?: boolean
607
+ provides_power?: boolean
608
+ requires_power?: boolean
609
+ provides_ground?: boolean
610
+ requires_ground?: boolean
611
+ provides_voltage?: string | number
612
+ requires_voltage?: string | number
613
+ do_not_connect?: boolean
614
+ include_in_board_pinout?: boolean
615
+ can_use_internal_pullup?: boolean
616
+ is_using_internal_pullup?: boolean
617
+ needs_external_pullup?: boolean
618
+ can_use_internal_pulldown?: boolean
619
+ is_using_internal_pulldown?: boolean
620
+ needs_external_pulldown?: boolean
621
+ can_use_open_drain?: boolean
622
+ is_using_open_drain?: boolean
623
+ can_use_push_pull?: boolean
624
+ is_using_push_pull?: boolean
625
+ should_have_decoupling_capacitor?: boolean
626
+ recommended_decoupling_capacitor_capacitance?: string | number
627
+ is_configured_for_i2c_sda?: boolean
628
+ is_configured_for_i2c_scl?: boolean
629
+ is_configured_for_spi_mosi?: boolean
630
+ is_configured_for_spi_miso?: boolean
631
+ is_configured_for_spi_sck?: boolean
632
+ is_configured_for_spi_cs?: boolean
633
+ is_configured_for_uart_tx?: boolean
634
+ is_configured_for_uart_rx?: boolean
635
+ supports_i2c_sda?: boolean
636
+ supports_i2c_scl?: boolean
637
+ supports_spi_mosi?: boolean
638
+ supports_spi_miso?: boolean
639
+ supports_spi_sck?: boolean
640
+ supports_spi_cs?: boolean
641
+ supports_uart_tx?: boolean
642
+ supports_uart_rx?: boolean
643
+ }
644
+ ```
645
+
432
646
  ### SourcePinMissingTraceWarning
433
647
 
434
648
  [Source](https://github.com/tscircuit/circuit-json/blob/main/src/source/source_pin_missing_trace_warning.ts)
@@ -456,11 +670,10 @@ Error emitted when a pin with mustBeConnected attribute is not connected to any
456
670
 
457
671
  ```typescript
458
672
  /** Error emitted when a pin with mustBeConnected attribute is not connected to any trace */
459
- interface SourcePinMustBeConnectedError {
673
+ interface SourcePinMustBeConnectedError extends BaseCircuitJsonError {
460
674
  type: "source_pin_must_be_connected_error"
461
675
  source_pin_must_be_connected_error_id: string
462
676
  error_type: "source_pin_must_be_connected_error"
463
- message: string
464
677
  source_component_id: string
465
678
  source_port_id: string
466
679
  subcircuit_id?: string
@@ -475,7 +688,7 @@ Defines a source port that can be connected to other components
475
688
 
476
689
  ```typescript
477
690
  /** Defines a source port that can be connected to other components */
478
- interface SourcePort {
691
+ interface SourcePort extends SourcePinAttributes {
479
692
  type: "source_port"
480
693
  pin_number?: number
481
694
  port_hints?: string[]
@@ -486,43 +699,6 @@ interface SourcePort {
486
699
  most_frequently_referenced_by_name?: string
487
700
  subcircuit_id?: string
488
701
  subcircuit_connectivity_map_key?: string
489
- must_be_connected?: boolean
490
- provides_power?: boolean
491
- requires_power?: boolean
492
- provides_ground?: boolean
493
- requires_ground?: boolean
494
- provides_voltage?: string | number
495
- requires_voltage?: string | number
496
- do_not_connect?: boolean
497
- include_in_board_pinout?: boolean
498
- can_use_internal_pullup?: boolean
499
- is_using_internal_pullup?: boolean
500
- needs_external_pullup?: boolean
501
- can_use_internal_pulldown?: boolean
502
- is_using_internal_pulldown?: boolean
503
- needs_external_pulldown?: boolean
504
- can_use_open_drain?: boolean
505
- is_using_open_drain?: boolean
506
- can_use_push_pull?: boolean
507
- is_using_push_pull?: boolean
508
- should_have_decoupling_capacitor?: boolean
509
- recommended_decoupling_capacitor_capacitance?: string | number
510
- is_configured_for_i2c_sda?: boolean
511
- is_configured_for_i2c_scl?: boolean
512
- is_configured_for_spi_mosi?: boolean
513
- is_configured_for_spi_miso?: boolean
514
- is_configured_for_spi_sck?: boolean
515
- is_configured_for_spi_cs?: boolean
516
- is_configured_for_uart_tx?: boolean
517
- is_configured_for_uart_rx?: boolean
518
- supports_i2c_sda?: boolean
519
- supports_i2c_scl?: boolean
520
- supports_spi_mosi?: boolean
521
- supports_spi_miso?: boolean
522
- supports_spi_sck?: boolean
523
- supports_spi_cs?: boolean
524
- supports_uart_tx?: boolean
525
- supports_uart_rx?: boolean
526
702
  }
527
703
  ```
528
704
 
@@ -603,6 +779,20 @@ interface SourceSimpleChip extends SourceComponentBase {
603
779
  }
604
780
  ```
605
781
 
782
+ ### SourceSimpleConnector
783
+
784
+ [Source](https://github.com/tscircuit/circuit-json/blob/main/src/source/source_simple_connector.ts)
785
+
786
+ Defines a simple connector component
787
+
788
+ ```typescript
789
+ /** Defines a simple connector component */
790
+ interface SourceSimpleConnector extends SourceComponentBase {
791
+ ftype: "simple_connector"
792
+ standard?: "usb_c" | "m2"
793
+ }
794
+ ```
795
+
606
796
  ### SourceSimpleCrystal
607
797
 
608
798
  [Source](https://github.com/tscircuit/circuit-json/blob/main/src/source/source_simple_crystal.ts)
@@ -615,6 +805,26 @@ interface SourceSimpleCrystal extends SourceComponentBase {
615
805
  ftype: "simple_crystal"
616
806
  frequency: number
617
807
  load_capacitance?: number
808
+ pin_variant?: "two_pin" | "four_pin"
809
+ }
810
+ ```
811
+
812
+ ### SourceSimpleCurrentSource
813
+
814
+ [Source](https://github.com/tscircuit/circuit-json/blob/main/src/source/source_simple_current_source.ts)
815
+
816
+ Defines a simple current source component
817
+
818
+ ```typescript
819
+ /** Defines a simple current source component */
820
+ interface SourceSimpleCurrentSource extends SourceComponentBase {
821
+ ftype: "simple_current_source"
822
+ current: number
823
+ frequency?: number
824
+ peak_to_peak_current?: number
825
+ wave_shape: "sine" | "square" | "triangle" | "sawtooth" | "dc"
826
+ phase?: number
827
+ duty_cycle?: number
618
828
  }
619
829
  ```
620
830
 
@@ -715,6 +925,19 @@ interface SourceSimpleMosfet extends SourceComponentBase {
715
925
  }
716
926
  ```
717
927
 
928
+ ### SourceSimpleOpAmp
929
+
930
+ [Source](https://github.com/tscircuit/circuit-json/blob/main/src/source/source_simple_op_amp.ts)
931
+
932
+ Defines a simple op-amp component
933
+
934
+ ```typescript
935
+ /** Defines a simple op-amp component */
936
+ interface SourceSimpleOpAmp extends SourceComponentBase {
937
+ ftype: "simple_op_amp"
938
+ }
939
+ ```
940
+
718
941
  ### SourceSimplePinHeader
719
942
 
720
943
  [Source](https://github.com/tscircuit/circuit-json/blob/main/src/source/source_simple_pin_header.ts)
@@ -748,6 +971,7 @@ interface SourceSimplePinout extends SourceComponentBase {
748
971
  interface SourceSimplePotentiometer extends SourceComponentBase {
749
972
  ftype: "simple_potentiometer"
750
973
  max_resistance: number
974
+ display_max_resistance?: string
751
975
  }
752
976
  ```
753
977
 
@@ -868,6 +1092,25 @@ interface SourceSimpleVoltageProbe extends SourceComponentBase {
868
1092
  }
869
1093
  ```
870
1094
 
1095
+ ### SourceSimpleVoltageSource
1096
+
1097
+ [Source](https://github.com/tscircuit/circuit-json/blob/main/src/source/source_simple_voltage_source.ts)
1098
+
1099
+ Defines a simple voltage source component
1100
+
1101
+ ```typescript
1102
+ /** Defines a simple voltage source component */
1103
+ interface SourceSimpleVoltageSource extends SourceComponentBase {
1104
+ ftype: "simple_voltage_source"
1105
+ voltage: number
1106
+ frequency?: number
1107
+ peak_to_peak_voltage?: number
1108
+ wave_shape?: "sinewave" | "square" | "triangle" | "sawtooth"
1109
+ phase?: number
1110
+ duty_cycle?: number
1111
+ }
1112
+ ```
1113
+
871
1114
  ### SourceTrace
872
1115
 
873
1116
  [Source](https://github.com/tscircuit/circuit-json/blob/main/src/source/source_trace.ts)
@@ -894,11 +1137,10 @@ Occurs when a source trace selector does not match any ports
894
1137
 
895
1138
  ```typescript
896
1139
  /** Occurs when a source trace selector does not match any ports */
897
- interface SourceTraceNotConnectedError {
1140
+ interface SourceTraceNotConnectedError extends BaseCircuitJsonError {
898
1141
  type: "source_trace_not_connected_error"
899
1142
  source_trace_not_connected_error_id: string
900
1143
  error_type: "source_trace_not_connected_error"
901
- message: string
902
1144
  subcircuit_id?: string
903
1145
  source_group_id?: string
904
1146
  source_trace_id?: string
@@ -915,11 +1157,10 @@ interface SourceTraceNotConnectedError {
915
1157
  /** Error emitted when an unexpected error occurs while finding a part.
916
1158
  * This includes cases where the API returns HTML instead of JSON,
917
1159
  * network failures, or other unexpected responses. */
918
- interface UnknownErrorFindingPart {
1160
+ interface UnknownErrorFindingPart extends BaseCircuitJsonError {
919
1161
  type: "unknown_error_finding_part"
920
1162
  unknown_error_finding_part_id: string
921
1163
  error_type: "unknown_error_finding_part"
922
- message: string
923
1164
  source_component_id?: string
924
1165
  subcircuit_id?: string
925
1166
  }
@@ -950,9 +1191,20 @@ interface CadComponent {
950
1191
  model_glb_url?: string
951
1192
  model_step_url?: string
952
1193
  model_wrl_url?: string
1194
+ model_asset?: Asset
953
1195
  model_unit_to_mm_scale_factor?: number
1196
+ model_board_normal_direction?: CadModelAxisDirection
1197
+ model_origin_position?: Point3
1198
+ model_origin_alignment?:
1199
+ | "unknown"
1200
+ | "center"
1201
+ | "center_of_component_on_board_surface"
1202
+ | "bottom_center_of_component"
1203
+ model_object_fit: "contain_within_bounds" | "fill_bounds"
954
1204
  model_jscad?: any
955
1205
  show_as_translucent_model?: boolean
1206
+ show_as_bounding_box?: boolean
1207
+ anchor_alignment: CadComponentAnchorAlignment
956
1208
  }
957
1209
  ```
958
1210
 
@@ -963,11 +1215,10 @@ interface CadComponent {
963
1215
  [Source](https://github.com/tscircuit/circuit-json/blob/main/src/pcb/pcb_autorouting_error.ts)
964
1216
 
965
1217
  ```typescript
966
- interface PcbAutoroutingErrorInterface {
1218
+ interface PcbAutoroutingErrorInterface extends BaseCircuitJsonError {
967
1219
  type: "pcb_autorouting_error"
968
1220
  pcb_error_id: string
969
1221
  error_type: "pcb_autorouting_error"
970
- message: string
971
1222
  subcircuit_id?: string
972
1223
  }
973
1224
  ```
@@ -980,12 +1231,14 @@ Defines the board outline of the PCB
980
1231
 
981
1232
  ```typescript
982
1233
  /** Defines the board outline of the PCB */
983
- interface PcbBoard {
1234
+ interface PcbBoard extends ManufacturingDrcProperties {
984
1235
  type: "pcb_board"
985
1236
  pcb_board_id: string
986
1237
  pcb_panel_id?: string
1238
+ carrier_pcb_board_id?: string
987
1239
  is_subcircuit?: boolean
988
1240
  subcircuit_id?: string
1241
+ is_mounted_to_carrier_board?: boolean
989
1242
  width?: Length
990
1243
  height?: Length
991
1244
  display_offset_x?: string
@@ -999,7 +1252,7 @@ interface PcbBoard {
999
1252
  solder_mask_color?: string
1000
1253
  silkscreen_color?: string
1001
1254
  anchor_position?: Point
1002
- anchor_alignment: NinePointAnchor
1255
+ anchor_alignment?: NinePointAnchor
1003
1256
  position_mode?: "relative_to_panel_anchor" | "none"
1004
1257
  }
1005
1258
  ```
@@ -1029,34 +1282,9 @@ interface PcbBreakoutPoint {
1029
1282
 
1030
1283
  [Source](https://github.com/tscircuit/circuit-json/blob/main/src/pcb/pcb_component.ts)
1031
1284
 
1032
- Defines a component on the PCB
1033
-
1034
1285
  ```typescript
1035
- /** Defines a component on the PCB */
1036
- interface PcbComponent {
1037
- type: "pcb_component"
1038
- pcb_component_id: string
1039
- source_component_id: string
1040
- subcircuit_id?: string
1041
- center: Point
1042
- layer: LayerRef
1043
- rotation: Rotation
1044
- display_offset_x?: string
1045
- display_offset_y?: string
1046
- width: Length
1047
- height: Length
1048
- do_not_place?: boolean
1049
- pcb_group_id?: string
1050
- position_mode?:
1051
- | "packed"
1052
- | "relative_to_group_anchor"
1053
- | "relative_to_another_component"
1054
- | "none"
1055
- anchor_position?: Point
1056
- anchor_alignment?: NinePointAnchor
1057
- positioned_relative_to_pcb_group_id?: string
1058
- positioned_relative_to_pcb_board_id?: string
1059
- obstructs_within_bounds: boolean
1286
+ interface PcbComponentMetadata {
1287
+ kicad_footprint?: KicadFootprintMetadata
1060
1288
  }
1061
1289
  ```
1062
1290
 
@@ -1068,11 +1296,10 @@ Error emitted when a component is placed on an invalid layer (components can onl
1068
1296
 
1069
1297
  ```typescript
1070
1298
  /** Error emitted when a component is placed on an invalid layer (components can only be on 'top' or 'bottom' layers) */
1071
- interface PcbComponentInvalidLayerError {
1299
+ interface PcbComponentInvalidLayerError extends BaseCircuitJsonError {
1072
1300
  type: "pcb_component_invalid_layer_error"
1073
1301
  pcb_component_invalid_layer_error_id: string
1074
1302
  error_type: "pcb_component_invalid_layer_error"
1075
- message: string
1076
1303
  pcb_component_id?: string
1077
1304
  source_component_id: string
1078
1305
  layer: LayerRef
@@ -1080,6 +1307,27 @@ interface PcbComponentInvalidLayerError {
1080
1307
  }
1081
1308
  ```
1082
1309
 
1310
+ ### PcbComponentNotOnBoardEdgeError
1311
+
1312
+ [Source](https://github.com/tscircuit/circuit-json/blob/main/src/pcb/pcb_component_not_on_board_edge_error.ts)
1313
+
1314
+ Error emitted when a component that must be placed on the board edge is centered away from the edge
1315
+
1316
+ ```typescript
1317
+ /** Error emitted when a component that must be placed on the board edge is centered away from the edge */
1318
+ interface PcbComponentNotOnBoardEdgeError extends BaseCircuitJsonError {
1319
+ type: "pcb_component_not_on_board_edge_error"
1320
+ pcb_component_not_on_board_edge_error_id: string
1321
+ error_type: "pcb_component_not_on_board_edge_error"
1322
+ pcb_component_id: string
1323
+ pcb_board_id: string
1324
+ component_center: Point
1325
+ pad_to_nearest_board_edge_distance: number
1326
+ source_component_id?: string
1327
+ subcircuit_id?: string
1328
+ }
1329
+ ```
1330
+
1083
1331
  ### PcbComponentOutsideBoardError
1084
1332
 
1085
1333
  [Source](https://github.com/tscircuit/circuit-json/blob/main/src/pcb/pcb_component_outside_board_error.ts)
@@ -1088,11 +1336,10 @@ Error emitted when a PCB component is placed outside the board boundaries
1088
1336
 
1089
1337
  ```typescript
1090
1338
  /** Error emitted when a PCB component is placed outside the board boundaries */
1091
- interface PcbComponentOutsideBoardError {
1339
+ interface PcbComponentOutsideBoardError extends BaseCircuitJsonError {
1092
1340
  type: "pcb_component_outside_board_error"
1093
1341
  pcb_component_outside_board_error_id: string
1094
1342
  error_type: "pcb_component_outside_board_error"
1095
- message: string
1096
1343
  pcb_component_id: string
1097
1344
  pcb_board_id: string
1098
1345
  component_center: Point
@@ -1107,6 +1354,28 @@ interface PcbComponentOutsideBoardError {
1107
1354
  }
1108
1355
  ```
1109
1356
 
1357
+ ### PcbConnectorNotInAccessibleOrientationWarning
1358
+
1359
+ [Source](https://github.com/tscircuit/circuit-json/blob/main/src/pcb/pcb_connector_not_in_accessible_orientation_warning.ts)
1360
+
1361
+ Warning emitted when a connector PCB component is facing inward toward the board and should be reoriented
1362
+
1363
+ ```typescript
1364
+ /** Warning emitted when a connector PCB component is facing inward toward the board and should be reoriented */
1365
+ interface PcbConnectorNotInAccessibleOrientationWarning {
1366
+ type: "pcb_connector_not_in_accessible_orientation_warning"
1367
+ pcb_connector_not_in_accessible_orientation_warning_id: string
1368
+ warning_type: "pcb_connector_not_in_accessible_orientation_warning"
1369
+ message: string
1370
+ pcb_component_id: string
1371
+ source_component_id?: string
1372
+ pcb_board_id?: string
1373
+ facing_direction: ConnectorOrientationDirection
1374
+ recommended_facing_direction: ConnectorOrientationDirection
1375
+ subcircuit_id?: string
1376
+ }
1377
+ ```
1378
+
1110
1379
  ### PcbCopperPour
1111
1380
 
1112
1381
  [Source](https://github.com/tscircuit/circuit-json/blob/main/src/pcb/pcb_copper_pour.ts)
@@ -1163,6 +1432,27 @@ interface PcbCopperText {
1163
1432
  }
1164
1433
  ```
1165
1434
 
1435
+ ### PcbCourtyardCircle
1436
+
1437
+ [Source](https://github.com/tscircuit/circuit-json/blob/main/src/pcb/pcb_courtyard_circle.ts)
1438
+
1439
+ Defines a courtyard circle on the PCB
1440
+
1441
+ ```typescript
1442
+ /** Defines a courtyard circle on the PCB */
1443
+ interface PcbCourtyardCircle {
1444
+ type: "pcb_courtyard_circle"
1445
+ pcb_courtyard_circle_id: string
1446
+ pcb_component_id: string
1447
+ pcb_group_id?: string
1448
+ subcircuit_id?: string
1449
+ center: Point
1450
+ radius: Length
1451
+ layer: VisibleLayer
1452
+ color?: string
1453
+ }
1454
+ ```
1455
+
1166
1456
  ### PcbCourtyardOutline
1167
1457
 
1168
1458
  [Source](https://github.com/tscircuit/circuit-json/blob/main/src/pcb/pcb_courtyard_outline.ts)
@@ -1179,10 +1469,22 @@ interface PcbCourtyardOutline {
1179
1469
  subcircuit_id?: string
1180
1470
  layer: VisibleLayer
1181
1471
  outline: Point[]
1182
- stroke_width: Length
1183
- is_closed?: boolean
1184
- is_stroke_dashed?: boolean
1185
- color?: string
1472
+ }
1473
+ ```
1474
+
1475
+ ### PcbCourtyardOverlapError
1476
+
1477
+ [Source](https://github.com/tscircuit/circuit-json/blob/main/src/pcb/pcb_courtyard_overlap_error.ts)
1478
+
1479
+ Error emitted when the courtyard (CrtYd) of one PCB component overlaps with the courtyard of another
1480
+
1481
+ ```typescript
1482
+ /** Error emitted when the courtyard (CrtYd) of one PCB component overlaps with the courtyard of another */
1483
+ interface PcbCourtyardOverlapError extends BaseCircuitJsonError {
1484
+ type: "pcb_courtyard_overlap_error"
1485
+ pcb_error_id: string
1486
+ error_type: "pcb_courtyard_overlap_error"
1487
+ pcb_component_ids: [string, string]
1186
1488
  }
1187
1489
  ```
1188
1490
 
@@ -1224,6 +1526,7 @@ interface PcbCourtyardRect {
1224
1526
  width: Length
1225
1527
  height: Length
1226
1528
  layer: VisibleLayer
1529
+ ccw_rotation?: Rotation
1227
1530
  color?: string
1228
1531
  }
1229
1532
  ```
@@ -1348,6 +1651,7 @@ interface PcbFabricationNoteText {
1348
1651
  font_size: Length
1349
1652
  pcb_component_id: string
1350
1653
  text: string
1654
+ ccw_rotation?: number
1351
1655
  layer: VisibleLayer
1352
1656
  anchor_position: Point
1353
1657
  anchor_alignment:
@@ -1368,11 +1672,10 @@ Error emitted when a pcb footprint overlaps with another element
1368
1672
 
1369
1673
  ```typescript
1370
1674
  /** Error emitted when a pcb footprint overlaps with another element */
1371
- interface PcbFootprintOverlapError {
1675
+ interface PcbFootprintOverlapError extends BaseCircuitJsonError {
1372
1676
  type: "pcb_footprint_overlap_error"
1373
1677
  pcb_error_id: string
1374
1678
  error_type: "pcb_footprint_overlap_error"
1375
- message: string
1376
1679
  pcb_smtpad_ids?: string[]
1377
1680
  pcb_plated_hole_ids?: string[]
1378
1681
  pcb_hole_ids?: string[]
@@ -1505,14 +1808,13 @@ Defines a placement error on the PCB
1505
1808
 
1506
1809
  ```typescript
1507
1810
  /** Defines a placement error on the PCB */
1508
- interface PcbMissingFootprintError {
1811
+ interface PcbMissingFootprintError extends BaseCircuitJsonError {
1509
1812
  type: "pcb_missing_footprint_error"
1510
1813
  pcb_missing_footprint_error_id: string
1511
1814
  pcb_group_id?: string
1512
1815
  subcircuit_id?: string
1513
1816
  error_type: "pcb_missing_footprint_error"
1514
1817
  source_component_id: string
1515
- message: string
1516
1818
  }
1517
1819
  ```
1518
1820
 
@@ -1558,6 +1860,7 @@ interface PcbNoteDimension {
1558
1860
  }
1559
1861
  font: "tscircuit2024"
1560
1862
  font_size: Length
1863
+ layer: VisibleLayer
1561
1864
  color?: string
1562
1865
  arrow_size: Length
1563
1866
  }
@@ -1583,6 +1886,7 @@ interface PcbNoteLine {
1583
1886
  y1: Distance
1584
1887
  x2: Distance
1585
1888
  y2: Distance
1889
+ layer: VisibleLayer
1586
1890
  stroke_width: Distance
1587
1891
  color?: string
1588
1892
  is_dashed?: boolean
@@ -1606,6 +1910,7 @@ interface PcbNotePath {
1606
1910
  name?: string
1607
1911
  text?: string
1608
1912
  route: Point[]
1913
+ layer: VisibleLayer
1609
1914
  stroke_width: Length
1610
1915
  color?: string
1611
1916
  }
@@ -1630,6 +1935,7 @@ interface PcbNoteRect {
1630
1935
  center: Point
1631
1936
  width: Length
1632
1937
  height: Length
1938
+ layer: VisibleLayer
1633
1939
  stroke_width: Length
1634
1940
  corner_radius?: Length
1635
1941
  is_filled?: boolean
@@ -1665,11 +1971,58 @@ interface PcbNoteText {
1665
1971
  | "bottom_left"
1666
1972
  | "bottom_right"
1667
1973
  layer: VisibleLayer
1668
- is_mirrored?: boolean
1974
+ is_mirrored_from_top_view?: boolean
1669
1975
  color?: string
1670
1976
  }
1671
1977
  ```
1672
1978
 
1979
+ ### PcbPadPadClearanceError
1980
+
1981
+ [Source](https://github.com/tscircuit/circuit-json/blob/main/src/pcb/pcb_pad_pad_clearance_error.ts)
1982
+
1983
+ Error emitted when pads are closer than the allowed clearance
1984
+
1985
+ ```typescript
1986
+ /** Error emitted when pads are closer than the allowed clearance */
1987
+ interface PcbPadPadClearanceError extends BaseCircuitJsonError {
1988
+ type: "pcb_pad_pad_clearance_error"
1989
+ pcb_pad_pad_clearance_error_id: string
1990
+ error_type: "pcb_pad_pad_clearance_error"
1991
+ pcb_pad_ids: string[]
1992
+ minimum_clearance?: Distance
1993
+ actual_clearance?: Distance
1994
+ center?: {
1995
+ x?: number
1996
+ y?: number
1997
+ }
1998
+ subcircuit_id?: string
1999
+ }
2000
+ ```
2001
+
2002
+ ### PcbPadTraceClearanceError
2003
+
2004
+ [Source](https://github.com/tscircuit/circuit-json/blob/main/src/pcb/pcb_pad_trace_clearance_error.ts)
2005
+
2006
+ Error emitted when a pad and trace are closer than allowed clearance
2007
+
2008
+ ```typescript
2009
+ /** Error emitted when a pad and trace are closer than allowed clearance */
2010
+ interface PcbPadTraceClearanceError extends BaseCircuitJsonError {
2011
+ type: "pcb_pad_trace_clearance_error"
2012
+ pcb_pad_trace_clearance_error_id: string
2013
+ error_type: "pcb_pad_trace_clearance_error"
2014
+ pcb_pad_id: string
2015
+ pcb_trace_id: string
2016
+ minimum_clearance?: Distance
2017
+ actual_clearance?: Distance
2018
+ center?: {
2019
+ x?: number
2020
+ y?: number
2021
+ }
2022
+ subcircuit_id?: string
2023
+ }
2024
+ ```
2025
+
1673
2026
  ### PcbPanel
1674
2027
 
1675
2028
  [Source](https://github.com/tscircuit/circuit-json/blob/main/src/pcb/pcb_panel.ts)
@@ -1689,6 +2042,24 @@ interface PcbPanel {
1689
2042
  }
1690
2043
  ```
1691
2044
 
2045
+ ### PcbPanelizationPlacementError
2046
+
2047
+ [Source](https://github.com/tscircuit/circuit-json/blob/main/src/pcb/pcb_panelization_placement_error.ts)
2048
+
2049
+ Defines a panelization placement error on the PCB
2050
+
2051
+ ```typescript
2052
+ /** Defines a panelization placement error on the PCB */
2053
+ interface PcbPanelizationPlacementError extends BaseCircuitJsonError {
2054
+ type: "pcb_panelization_placement_error"
2055
+ pcb_panelization_placement_error_id: string
2056
+ error_type: "pcb_panelization_placement_error"
2057
+ pcb_panel_id?: string
2058
+ pcb_board_id?: string
2059
+ subcircuit_id?: string
2060
+ }
2061
+ ```
2062
+
1692
2063
  ### PcbPlacementError
1693
2064
 
1694
2065
  [Source](https://github.com/tscircuit/circuit-json/blob/main/src/pcb/pcb_placement_error.ts)
@@ -1697,11 +2068,10 @@ Defines a placement error on the PCB
1697
2068
 
1698
2069
  ```typescript
1699
2070
  /** Defines a placement error on the PCB */
1700
- interface PcbPlacementError {
2071
+ interface PcbPlacementError extends BaseCircuitJsonError {
1701
2072
  type: "pcb_placement_error"
1702
2073
  pcb_placement_error_id: string
1703
2074
  error_type: "pcb_placement_error"
1704
- message: string
1705
2075
  subcircuit_id?: string
1706
2076
  }
1707
2077
  ```
@@ -1806,6 +2176,7 @@ interface PcbHoleCircularWithRectPad {
1806
2176
  pcb_port_id?: string
1807
2177
  pcb_plated_hole_id: string
1808
2178
  soldermask_margin?: number
2179
+ rect_ccw_rotation?: Rotation
1809
2180
  }
1810
2181
 
1811
2182
  /** Defines a plated hole with a polygonal pad on the PCB */
@@ -1830,6 +2201,7 @@ interface PcbHoleWithPolygonPad {
1830
2201
  pcb_port_id?: string
1831
2202
  pcb_plated_hole_id: string
1832
2203
  soldermask_margin?: number
2204
+ ccw_rotation?: Rotation
1833
2205
  }
1834
2206
  ```
1835
2207
 
@@ -1863,11 +2235,10 @@ Defines an error when a pcb port is not connected to any trace
1863
2235
 
1864
2236
  ```typescript
1865
2237
  /** Defines an error when a pcb port is not connected to any trace */
1866
- interface PcbPortNotConnectedError {
2238
+ interface PcbPortNotConnectedError extends BaseCircuitJsonError {
1867
2239
  type: "pcb_port_not_connected_error"
1868
2240
  pcb_port_not_connected_error_id: string
1869
2241
  error_type: "pcb_port_not_connected_error"
1870
- message: string
1871
2242
  pcb_port_ids: string[]
1872
2243
  pcb_component_ids: string[]
1873
2244
  subcircuit_id?: string
@@ -1882,11 +2253,10 @@ Defines a trace error on the PCB where a port is not matched
1882
2253
 
1883
2254
  ```typescript
1884
2255
  /** Defines a trace error on the PCB where a port is not matched */
1885
- interface PcbPortNotMatchedError {
2256
+ interface PcbPortNotMatchedError extends BaseCircuitJsonError {
1886
2257
  type: "pcb_port_not_matched_error"
1887
2258
  pcb_error_id: string
1888
2259
  error_type: "pcb_port_not_matched_error"
1889
- message: string
1890
2260
  pcb_component_ids: string[]
1891
2261
  subcircuit_id?: string
1892
2262
  }
@@ -1925,6 +2295,7 @@ interface PcbSilkscreenCircle {
1925
2295
  radius: Length
1926
2296
  layer: VisibleLayer
1927
2297
  stroke_width: Length
2298
+ is_filled?: boolean
1928
2299
  }
1929
2300
  ```
1930
2301
 
@@ -1969,6 +2340,7 @@ interface PcbSilkscreenOval {
1969
2340
  radius_x: Distance
1970
2341
  radius_y: Distance
1971
2342
  layer: VisibleLayer
2343
+ ccw_rotation?: number
1972
2344
  }
1973
2345
  ```
1974
2346
 
@@ -2010,6 +2382,7 @@ interface PcbSilkscreenPill {
2010
2382
  width: Length
2011
2383
  height: Length
2012
2384
  layer: LayerRef
2385
+ ccw_rotation?: number
2013
2386
  }
2014
2387
  ```
2015
2388
 
@@ -2036,6 +2409,7 @@ interface PcbSilkscreenRect {
2036
2409
  is_filled?: boolean
2037
2410
  has_stroke?: boolean
2038
2411
  is_stroke_dashed?: boolean
2412
+ ccw_rotation?: number
2039
2413
  }
2040
2414
  ```
2041
2415
 
@@ -2065,7 +2439,7 @@ interface PcbSilkscreenText {
2065
2439
  }
2066
2440
  ccw_rotation?: number
2067
2441
  layer: LayerRef
2068
- is_mirrored_from_top_view?: boolean
2442
+ is_mirrored?: boolean
2069
2443
  anchor_position: Point
2070
2444
  anchor_alignment: NinePointAnchor
2071
2445
  }
@@ -2094,30 +2468,6 @@ interface PcbSolderPasteCircle {
2094
2468
  }
2095
2469
  ```
2096
2470
 
2097
- ### SupplierFootprintMismatchWarning
2098
-
2099
- [Source](https://github.com/tscircuit/circuit-json/blob/main/src/pcb/supplier_footprint_mismatch_warning.ts)
2100
-
2101
- Warning emitted when a supplier part footprint does not match the expected footprint
2102
-
2103
- ```typescript
2104
- /** Warning emitted when a supplier part footprint does not match the expected footprint */
2105
- interface SupplierFootprintMismatchWarning {
2106
- type: "supplier_footprint_mismatch_warning"
2107
- supplier_footprint_mismatch_warning_id: string
2108
- warning_type: "supplier_footprint_mismatch_warning"
2109
- message: string
2110
- source_component_id: string
2111
- pcb_component_id?: string
2112
- pcb_group_id?: string
2113
- subcircuit_id?: string
2114
- supplier_name?: SupplierName
2115
- supplier_part_number?: string
2116
- supplier_footprint_url?: string
2117
- footprint_copper_intersection_over_union: number
2118
- }
2119
- ```
2120
-
2121
2471
  ### PcbText
2122
2472
 
2123
2473
  [Source](https://github.com/tscircuit/circuit-json/blob/main/src/pcb/pcb_text.ts)
@@ -2174,50 +2524,19 @@ interface PcbTraceRoutePointWire {
2174
2524
  x: Distance
2175
2525
  y: Distance
2176
2526
  width: Distance
2527
+ copper_pour_id?: string
2528
+ is_inside_copper_pour?: boolean
2177
2529
  start_pcb_port_id?: string
2178
2530
  end_pcb_port_id?: string
2179
2531
  layer: LayerRef
2180
2532
  }
2181
2533
 
2182
- interface PcbTraceRoutePointThroughPad {
2183
- route_type: "through_pad"
2184
- start: Point
2185
- end: Point
2186
- width: Distance
2187
- start_layer: LayerRef
2188
- end_layer: LayerRef
2189
- pcb_smtpad_id?: string
2190
- pcb_plated_hole_id?: string
2191
- }
2192
-
2193
2534
  type PcbTraceRoutePoint =
2194
2535
  | PcbTraceRoutePointWire
2195
2536
  | PcbTraceRoutePointVia
2196
2537
  | PcbTraceRoutePointThroughPad
2197
2538
  ```
2198
2539
 
2199
- ### PcbTraceWarning
2200
-
2201
- [Source](https://github.com/tscircuit/circuit-json/blob/main/src/pcb/pcb_trace_warning.ts)
2202
-
2203
- Warning emitted when a PCB trace has a warning condition
2204
-
2205
- ```typescript
2206
- /** Warning emitted when a PCB trace has a warning condition */
2207
- interface PcbTraceWarning {
2208
- type: "pcb_trace_warning"
2209
- pcb_trace_warning_id: string
2210
- warning_type: "pcb_trace_warning"
2211
- message: string
2212
- center?: Point
2213
- pcb_trace_id: string
2214
- source_trace_id: string
2215
- pcb_component_ids: string[]
2216
- pcb_port_ids: string[]
2217
- subcircuit_id?: string
2218
- }
2219
- ```
2220
-
2221
2540
  ### PcbTraceError
2222
2541
 
2223
2542
  [Source](https://github.com/tscircuit/circuit-json/blob/main/src/pcb/pcb_trace_error.ts)
@@ -2226,11 +2545,10 @@ Defines a trace error on the PCB
2226
2545
 
2227
2546
  ```typescript
2228
2547
  /** Defines a trace error on the PCB */
2229
- interface PcbTraceError {
2548
+ interface PcbTraceError extends BaseCircuitJsonError {
2230
2549
  type: "pcb_trace_error"
2231
2550
  pcb_trace_error_id: string
2232
2551
  error_type: "pcb_trace_error"
2233
- message: string
2234
2552
  center?: Point
2235
2553
  pcb_trace_id: string
2236
2554
  source_trace_id: string
@@ -2266,12 +2584,33 @@ Defines an error when a source trace has no corresponding PCB trace
2266
2584
 
2267
2585
  ```typescript
2268
2586
  /** Defines an error when a source trace has no corresponding PCB trace */
2269
- interface PcbTraceMissingError {
2587
+ interface PcbTraceMissingError extends BaseCircuitJsonError {
2270
2588
  type: "pcb_trace_missing_error"
2271
2589
  pcb_trace_missing_error_id: string
2272
2590
  error_type: "pcb_trace_missing_error"
2591
+ center?: Point
2592
+ source_trace_id: string
2593
+ pcb_component_ids: string[]
2594
+ pcb_port_ids: string[]
2595
+ subcircuit_id?: string
2596
+ }
2597
+ ```
2598
+
2599
+ ### PcbTraceWarning
2600
+
2601
+ [Source](https://github.com/tscircuit/circuit-json/blob/main/src/pcb/pcb_trace_warning.ts)
2602
+
2603
+ Defines a trace warning on the PCB
2604
+
2605
+ ```typescript
2606
+ /** Defines a trace warning on the PCB */
2607
+ interface PcbTraceWarning {
2608
+ type: "pcb_trace_warning"
2609
+ pcb_trace_warning_id: string
2610
+ warning_type: "pcb_trace_warning"
2273
2611
  message: string
2274
2612
  center?: Point
2613
+ pcb_trace_id: string
2275
2614
  source_trace_id: string
2276
2615
  pcb_component_ids: string[]
2277
2616
  pcb_port_ids: string[]
@@ -2317,11 +2656,10 @@ Error emitted when vias are closer than the allowed clearance
2317
2656
 
2318
2657
  ```typescript
2319
2658
  /** Error emitted when vias are closer than the allowed clearance */
2320
- interface PcbViaClearanceError {
2659
+ interface PcbViaClearanceError extends BaseCircuitJsonError {
2321
2660
  type: "pcb_via_clearance_error"
2322
2661
  pcb_error_id: string
2323
2662
  error_type: "pcb_via_clearance_error"
2324
- message: string
2325
2663
  pcb_via_ids: string[]
2326
2664
  minimum_clearance?: Distance
2327
2665
  actual_clearance?: Distance
@@ -2333,6 +2671,30 @@ interface PcbViaClearanceError {
2333
2671
  }
2334
2672
  ```
2335
2673
 
2674
+ ### PcbViaTraceClearanceError
2675
+
2676
+ [Source](https://github.com/tscircuit/circuit-json/blob/main/src/pcb/pcb_via_trace_clearance_error.ts)
2677
+
2678
+ Error emitted when a via and trace are closer than the allowed clearance
2679
+
2680
+ ```typescript
2681
+ /** Error emitted when a via and trace are closer than the allowed clearance */
2682
+ interface PcbViaTraceClearanceError extends BaseCircuitJsonError {
2683
+ type: "pcb_via_trace_clearance_error"
2684
+ pcb_via_trace_clearance_error_id: string
2685
+ error_type: "pcb_via_trace_clearance_error"
2686
+ pcb_via_id: string
2687
+ pcb_trace_id: string
2688
+ minimum_clearance?: Distance
2689
+ actual_clearance?: Distance
2690
+ center?: {
2691
+ x?: number
2692
+ y?: number
2693
+ }
2694
+ subcircuit_id?: string
2695
+ }
2696
+ ```
2697
+
2336
2698
  ## Schematic Elements
2337
2699
 
2338
2700
  ### SchematicArc
@@ -2346,7 +2708,8 @@ Draws a styled arc on the schematic
2346
2708
  interface SchematicArc {
2347
2709
  type: "schematic_arc"
2348
2710
  schematic_arc_id: string
2349
- schematic_component_id: string
2711
+ schematic_component_id?: string
2712
+ schematic_symbol_id?: string
2350
2713
  center: Point
2351
2714
  radius: number
2352
2715
  start_angle_degrees: number
@@ -2367,6 +2730,7 @@ interface SchematicArc {
2367
2730
  interface SchematicBox {
2368
2731
  type: "schematic_box"
2369
2732
  schematic_component_id?: string
2733
+ schematic_symbol_id?: string
2370
2734
  width: number
2371
2735
  height: number
2372
2736
  is_dashed: boolean
@@ -2387,7 +2751,8 @@ Draws a styled circle on the schematic
2387
2751
  interface SchematicCircle {
2388
2752
  type: "schematic_circle"
2389
2753
  schematic_circle_id: string
2390
- schematic_component_id: string
2754
+ schematic_component_id?: string
2755
+ schematic_symbol_id?: string
2391
2756
  center: Point
2392
2757
  radius: number
2393
2758
  stroke_width?: number | null
@@ -2410,6 +2775,7 @@ interface SchematicComponent {
2410
2775
  center: Point
2411
2776
  source_component_id?: string
2412
2777
  schematic_component_id: string
2778
+ schematic_symbol_id?: string
2413
2779
  pin_spacing?: number
2414
2780
  pin_styles?: Record<
2415
2781
  string,
@@ -2496,11 +2862,10 @@ interface SchematicDebugPoint {
2496
2862
  [Source](https://github.com/tscircuit/circuit-json/blob/main/src/schematic/schematic_error.ts)
2497
2863
 
2498
2864
  ```typescript
2499
- interface SchematicError {
2865
+ interface SchematicError extends BaseCircuitJsonError {
2500
2866
  type: "schematic_error"
2501
2867
  schematic_error_id: string
2502
2868
  error_type: "schematic_port_not_found"
2503
- message: string
2504
2869
  subcircuit_id?: string
2505
2870
  }
2506
2871
  ```
@@ -2534,11 +2899,10 @@ interface SchematicGroup {
2534
2899
  [Source](https://github.com/tscircuit/circuit-json/blob/main/src/schematic/schematic_layout_error.ts)
2535
2900
 
2536
2901
  ```typescript
2537
- interface SchematicLayoutError {
2902
+ interface SchematicLayoutError extends BaseCircuitJsonError {
2538
2903
  type: "schematic_layout_error"
2539
2904
  schematic_layout_error_id: string
2540
2905
  error_type: "schematic_layout_error"
2541
- message: string
2542
2906
  source_group_id: string
2543
2907
  schematic_group_id: string
2544
2908
  subcircuit_id?: string
@@ -2556,7 +2920,8 @@ Draws a styled line on the schematic
2556
2920
  interface SchematicLine {
2557
2921
  type: "schematic_line"
2558
2922
  schematic_line_id: string
2559
- schematic_component_id: string
2923
+ schematic_component_id?: string
2924
+ schematic_symbol_id?: string
2560
2925
  x1: number
2561
2926
  y1: number
2562
2927
  x2: number
@@ -2621,9 +2986,13 @@ interface SchematicNetLabel {
2621
2986
  ```typescript
2622
2987
  interface SchematicPath {
2623
2988
  type: "schematic_path"
2624
- schematic_component_id: string
2625
- fill_color?: "red" | "blue"
2989
+ schematic_path_id: string
2990
+ schematic_component_id?: string
2991
+ schematic_symbol_id?: string
2992
+ fill_color?: string
2626
2993
  is_filled?: boolean
2994
+ stroke_width?: number | null
2995
+ stroke_color?: string
2627
2996
  dash_length?: number
2628
2997
  dash_gap?: number
2629
2998
  points: Point[]
@@ -2652,6 +3021,7 @@ interface SchematicPort {
2652
3021
  is_connected?: boolean
2653
3022
  has_input_arrow?: boolean
2654
3023
  has_output_arrow?: boolean
3024
+ is_drawn_with_inversion_circle?: boolean
2655
3025
  }
2656
3026
  ```
2657
3027
 
@@ -2666,7 +3036,8 @@ Draws a styled rectangle on the schematic
2666
3036
  interface SchematicRect {
2667
3037
  type: "schematic_rect"
2668
3038
  schematic_rect_id: string
2669
- schematic_component_id: string
3039
+ schematic_component_id?: string
3040
+ schematic_symbol_id?: string
2670
3041
  center: Point
2671
3042
  width: number
2672
3043
  height: number
@@ -2696,6 +3067,19 @@ interface SchematicSheet {
2696
3067
  }
2697
3068
  ```
2698
3069
 
3070
+ ### SchematicSymbol
3071
+
3072
+ [Source](https://github.com/tscircuit/circuit-json/blob/main/src/schematic/schematic_symbol.ts)
3073
+
3074
+ ```typescript
3075
+ interface SchematicSymbol {
3076
+ type: "schematic_symbol"
3077
+ schematic_symbol_id: string
3078
+ name?: string
3079
+ metadata?: SchematicSymbolMetadata
3080
+ }
3081
+ ```
3082
+
2699
3083
  ### SchematicTable
2700
3084
 
2701
3085
  [Source](https://github.com/tscircuit/circuit-json/blob/main/src/schematic/schematic_table.ts)
@@ -2753,6 +3137,7 @@ interface SchematicTableCell {
2753
3137
  interface SchematicText {
2754
3138
  type: "schematic_text"
2755
3139
  schematic_component_id?: string
3140
+ schematic_symbol_id?: string
2756
3141
  schematic_text_id: string
2757
3142
  text: string
2758
3143
  font_size: number
@@ -2808,6 +3193,46 @@ interface SchematicVoltageProbe {
2808
3193
 
2809
3194
  ## Simulation Elements
2810
3195
 
3196
+ ### SimulationCurrentSource
3197
+
3198
+ [Source](https://github.com/tscircuit/circuit-json/blob/main/src/simulation/simulation_current_source.ts)
3199
+
3200
+ ```typescript
3201
+ type SimulationCurrentSource =
3202
+ | SimulationDcCurrentSource
3203
+ | SimulationAcCurrentSource
3204
+
3205
+ /** Defines a DC current source for simulation purposes. It forces a current
3206
+ * between two source ports. */
3207
+ interface SimulationDcCurrentSource {
3208
+ type: "simulation_current_source"
3209
+ simulation_current_source_id: string
3210
+ is_dc_source: true
3211
+ positive_source_port_id?: string
3212
+ positive_source_net_id?: string
3213
+ negative_source_port_id?: string
3214
+ negative_source_net_id?: string
3215
+ current: number
3216
+ }
3217
+
3218
+ /** Defines an AC current source for simulation purposes. */
3219
+ interface SimulationAcCurrentSource {
3220
+ type: "simulation_current_source"
3221
+ simulation_current_source_id: string
3222
+ is_dc_source: false
3223
+ terminal1_source_port_id?: string
3224
+ terminal2_source_port_id?: string
3225
+ terminal1_source_net_id?: string
3226
+ terminal2_source_net_id?: string
3227
+ current?: number
3228
+ frequency?: number
3229
+ peak_to_peak_current?: number
3230
+ wave_shape?: WaveShape
3231
+ phase?: number
3232
+ duty_cycle?: number
3233
+ }
3234
+ ```
3235
+
2811
3236
  ### SimulationExperiment
2812
3237
 
2813
3238
  [Source](https://github.com/tscircuit/circuit-json/blob/main/src/simulation/simulation_experiment.ts)
@@ -2824,6 +3249,49 @@ interface SimulationExperiment {
2824
3249
  }
2825
3250
  ```
2826
3251
 
3252
+ ### SimulationOpAmp
3253
+
3254
+ [Source](https://github.com/tscircuit/circuit-json/blob/main/src/simulation/simulation_op_amp.ts)
3255
+
3256
+ Defines a simple ideal operational amplifier for simulation.
3257
+
3258
+ ```typescript
3259
+ /** Defines a simple ideal operational amplifier for simulation. */
3260
+ interface SimulationOpAmp {
3261
+ type: "simulation_op_amp"
3262
+ simulation_op_amp_id: string
3263
+ source_component_id?: string
3264
+ inverting_input_source_port_id: string
3265
+ non_inverting_input_source_port_id: string
3266
+ output_source_port_id: string
3267
+ positive_supply_source_port_id: string
3268
+ negative_supply_source_port_id: string
3269
+ }
3270
+ ```
3271
+
3272
+ ### SimulationSpiceSubcircuit
3273
+
3274
+ [Source](https://github.com/tscircuit/circuit-json/blob/main/src/simulation/simulation_spice_subcircuit.ts)
3275
+
3276
+ Defines a custom SPICE subcircuit model for simulation.
3277
+
3278
+ ```typescript
3279
+ /** Defines a custom SPICE subcircuit model for simulation. */
3280
+ interface SimulationSpiceSubcircuit {
3281
+ type: "simulation_spice_subcircuit"
3282
+ simulation_spice_subcircuit_id: string
3283
+ /** Source component this SPICE subcircuit models. */
3284
+
3285
+ source_component_id: string
3286
+ /** Maps SPICE subcircuit pin names to source port ids. */
3287
+
3288
+ spice_pin_to_source_port_map: Record<string, string>
3289
+ /** Full SPICE subcircuit source text. */
3290
+
3291
+ subcircuit_source: string
3292
+ }
3293
+ ```
3294
+
2827
3295
  ### SimulationSwitch
2828
3296
 
2829
3297
  [Source](https://github.com/tscircuit/circuit-json/blob/main/src/simulation/simulation_switch.ts)
@@ -2869,11 +3337,10 @@ An unknown error occurred during the simulation experiment.
2869
3337
 
2870
3338
  ```typescript
2871
3339
  /** An unknown error occurred during the simulation experiment. */
2872
- interface SimulationUnknownExperimentError {
3340
+ interface SimulationUnknownExperimentError extends BaseCircuitJsonError {
2873
3341
  type: "simulation_unknown_experiment_error"
2874
3342
  simulation_unknown_experiment_error_id: string
2875
3343
  error_type: "simulation_unknown_experiment_error"
2876
- message: string
2877
3344
  simulation_experiment_id?: string
2878
3345
  subcircuit_id?: string
2879
3346
  }