circuit-json 0.0.247 → 0.0.248
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 +27 -0
- package/dist/index.d.mts +243 -3
- package/dist/index.mjs +63 -36
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -82,6 +82,7 @@ https://github.com/user-attachments/assets/2f28b7ba-689e-4d80-85b2-5bdef84b41f8
|
|
|
82
82
|
- [PcbBoard](#pcbboard)
|
|
83
83
|
- [PcbBreakoutPoint](#pcbbreakoutpoint)
|
|
84
84
|
- [PcbComponent](#pcbcomponent)
|
|
85
|
+
- [PcbComponentOutsideBoardError](#pcbcomponentoutsideboarderror)
|
|
85
86
|
- [PcbCopperPour](#pcbcopperpour)
|
|
86
87
|
- [PcbCutout](#pcbcutout)
|
|
87
88
|
- [PcbFabricationNotePath](#pcbfabricationnotepath)
|
|
@@ -797,6 +798,32 @@ interface PcbComponent {
|
|
|
797
798
|
}
|
|
798
799
|
```
|
|
799
800
|
|
|
801
|
+
### PcbComponentOutsideBoardError
|
|
802
|
+
|
|
803
|
+
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/pcb/pcb_component_outside_board_error.ts)
|
|
804
|
+
|
|
805
|
+
Error emitted when a PCB component is placed outside the board boundaries
|
|
806
|
+
|
|
807
|
+
```typescript
|
|
808
|
+
/** Error emitted when a PCB component is placed outside the board boundaries */ interface PcbComponentOutsideBoardError {
|
|
809
|
+
type: "pcb_component_outside_board_error"
|
|
810
|
+
pcb_component_outside_board_error_id: string
|
|
811
|
+
error_type: "pcb_component_outside_board_error"
|
|
812
|
+
message: string
|
|
813
|
+
pcb_component_id: string
|
|
814
|
+
pcb_board_id: string
|
|
815
|
+
component_center: Point
|
|
816
|
+
component_bounds: {
|
|
817
|
+
min_x: number
|
|
818
|
+
max_x: number
|
|
819
|
+
min_y: number
|
|
820
|
+
max_y: number
|
|
821
|
+
}
|
|
822
|
+
subcircuit_id?: string
|
|
823
|
+
source_component_id?: string
|
|
824
|
+
}
|
|
825
|
+
```
|
|
826
|
+
|
|
800
827
|
### PcbCopperPour
|
|
801
828
|
|
|
802
829
|
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/pcb/pcb_copper_pour.ts)
|
package/dist/index.d.mts
CHANGED
|
@@ -4963,7 +4963,101 @@ declare const pcb_copper_pour: z.ZodDiscriminatedUnion<"shape", [z.ZodObject<{
|
|
|
4963
4963
|
type PcbCopperPourInput = z.input<typeof pcb_copper_pour>;
|
|
4964
4964
|
type PcbCopperPour = PcbCopperPourRect | PcbCopperPourBRep | PcbCopperPourPolygon;
|
|
4965
4965
|
|
|
4966
|
-
|
|
4966
|
+
declare const pcb_component_outside_board_error: z.ZodObject<{
|
|
4967
|
+
type: z.ZodLiteral<"pcb_component_outside_board_error">;
|
|
4968
|
+
pcb_component_outside_board_error_id: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
4969
|
+
error_type: z.ZodDefault<z.ZodLiteral<"pcb_component_outside_board_error">>;
|
|
4970
|
+
message: z.ZodString;
|
|
4971
|
+
pcb_component_id: z.ZodString;
|
|
4972
|
+
pcb_board_id: z.ZodString;
|
|
4973
|
+
component_center: z.ZodObject<{
|
|
4974
|
+
x: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
4975
|
+
y: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
4976
|
+
}, "strip", z.ZodTypeAny, {
|
|
4977
|
+
x: number;
|
|
4978
|
+
y: number;
|
|
4979
|
+
}, {
|
|
4980
|
+
x: string | number;
|
|
4981
|
+
y: string | number;
|
|
4982
|
+
}>;
|
|
4983
|
+
component_bounds: z.ZodObject<{
|
|
4984
|
+
min_x: z.ZodNumber;
|
|
4985
|
+
max_x: z.ZodNumber;
|
|
4986
|
+
min_y: z.ZodNumber;
|
|
4987
|
+
max_y: z.ZodNumber;
|
|
4988
|
+
}, "strip", z.ZodTypeAny, {
|
|
4989
|
+
min_x: number;
|
|
4990
|
+
max_x: number;
|
|
4991
|
+
min_y: number;
|
|
4992
|
+
max_y: number;
|
|
4993
|
+
}, {
|
|
4994
|
+
min_x: number;
|
|
4995
|
+
max_x: number;
|
|
4996
|
+
min_y: number;
|
|
4997
|
+
max_y: number;
|
|
4998
|
+
}>;
|
|
4999
|
+
subcircuit_id: z.ZodOptional<z.ZodString>;
|
|
5000
|
+
source_component_id: z.ZodOptional<z.ZodString>;
|
|
5001
|
+
}, "strip", z.ZodTypeAny, {
|
|
5002
|
+
message: string;
|
|
5003
|
+
type: "pcb_component_outside_board_error";
|
|
5004
|
+
pcb_component_id: string;
|
|
5005
|
+
error_type: "pcb_component_outside_board_error";
|
|
5006
|
+
pcb_board_id: string;
|
|
5007
|
+
pcb_component_outside_board_error_id: string;
|
|
5008
|
+
component_center: {
|
|
5009
|
+
x: number;
|
|
5010
|
+
y: number;
|
|
5011
|
+
};
|
|
5012
|
+
component_bounds: {
|
|
5013
|
+
min_x: number;
|
|
5014
|
+
max_x: number;
|
|
5015
|
+
min_y: number;
|
|
5016
|
+
max_y: number;
|
|
5017
|
+
};
|
|
5018
|
+
source_component_id?: string | undefined;
|
|
5019
|
+
subcircuit_id?: string | undefined;
|
|
5020
|
+
}, {
|
|
5021
|
+
message: string;
|
|
5022
|
+
type: "pcb_component_outside_board_error";
|
|
5023
|
+
pcb_component_id: string;
|
|
5024
|
+
pcb_board_id: string;
|
|
5025
|
+
component_center: {
|
|
5026
|
+
x: string | number;
|
|
5027
|
+
y: string | number;
|
|
5028
|
+
};
|
|
5029
|
+
component_bounds: {
|
|
5030
|
+
min_x: number;
|
|
5031
|
+
max_x: number;
|
|
5032
|
+
min_y: number;
|
|
5033
|
+
max_y: number;
|
|
5034
|
+
};
|
|
5035
|
+
source_component_id?: string | undefined;
|
|
5036
|
+
subcircuit_id?: string | undefined;
|
|
5037
|
+
error_type?: "pcb_component_outside_board_error" | undefined;
|
|
5038
|
+
pcb_component_outside_board_error_id?: string | undefined;
|
|
5039
|
+
}>;
|
|
5040
|
+
type PcbComponentOutsideBoardErrorInput = z.input<typeof pcb_component_outside_board_error>;
|
|
5041
|
+
/** Error emitted when a PCB component is placed outside the board boundaries */
|
|
5042
|
+
interface PcbComponentOutsideBoardError {
|
|
5043
|
+
type: "pcb_component_outside_board_error";
|
|
5044
|
+
pcb_component_outside_board_error_id: string;
|
|
5045
|
+
error_type: "pcb_component_outside_board_error";
|
|
5046
|
+
message: string;
|
|
5047
|
+
pcb_component_id: string;
|
|
5048
|
+
pcb_board_id: string;
|
|
5049
|
+
component_center: Point;
|
|
5050
|
+
component_bounds: {
|
|
5051
|
+
min_x: number;
|
|
5052
|
+
max_x: number;
|
|
5053
|
+
min_y: number;
|
|
5054
|
+
max_y: number;
|
|
5055
|
+
};
|
|
5056
|
+
subcircuit_id?: string;
|
|
5057
|
+
source_component_id?: string;
|
|
5058
|
+
}
|
|
5059
|
+
|
|
5060
|
+
type PcbCircuitElement = PcbComponent | PcbHole | PcbPlatedHole | PcbPort | PcbSmtPad | PcbSolderPaste | PcbText | PcbTrace | PcbTraceError | PcbTraceMissingError | PcbMissingFootprintError | ExternalFootprintLoadError | PcbManualEditConflictWarning | PcbPortNotMatchedError | PcbPortNotConnectedError | PcbVia | PcbBoard | PcbPlacementError | PcbTraceHint | PcbSilkscreenLine | PcbSilkscreenPath | PcbSilkscreenText | PcbSilkscreenRect | PcbSilkscreenCircle | PcbAutoroutingError | PcbFootprintOverlapError | PcbCutout | PcbBreakoutPoint | PcbGroundPlane | PcbGroundPlaneRegion | PcbThermalSpoke | PcbCopperPour | PcbComponentOutsideBoardError;
|
|
4967
5061
|
|
|
4968
5062
|
interface SchematicBox {
|
|
4969
5063
|
type: "schematic_box";
|
|
@@ -6652,7 +6746,7 @@ interface SchematicTableCell {
|
|
|
6652
6746
|
subcircuit_id?: string;
|
|
6653
6747
|
}
|
|
6654
6748
|
|
|
6655
|
-
type CircuitJsonError = PcbTraceError | PcbPlacementError | PcbPortNotMatchedError | PcbAutoroutingError | PcbFootprintOverlapError | PcbMissingFootprintError | SchematicError;
|
|
6749
|
+
type CircuitJsonError = PcbTraceError | PcbPlacementError | PcbPortNotMatchedError | PcbAutoroutingError | PcbFootprintOverlapError | PcbMissingFootprintError | PcbComponentOutsideBoardError | SchematicError;
|
|
6656
6750
|
|
|
6657
6751
|
interface SourceComponentBase {
|
|
6658
6752
|
type: "source_component";
|
|
@@ -14324,6 +14418,79 @@ declare const any_circuit_element: z.ZodUnion<[z.ZodObject<{
|
|
|
14324
14418
|
source_net_id?: string | undefined;
|
|
14325
14419
|
pcb_copper_pour_id?: string | undefined;
|
|
14326
14420
|
}>]>, z.ZodObject<{
|
|
14421
|
+
type: z.ZodLiteral<"pcb_component_outside_board_error">;
|
|
14422
|
+
pcb_component_outside_board_error_id: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
14423
|
+
error_type: z.ZodDefault<z.ZodLiteral<"pcb_component_outside_board_error">>;
|
|
14424
|
+
message: z.ZodString;
|
|
14425
|
+
pcb_component_id: z.ZodString;
|
|
14426
|
+
pcb_board_id: z.ZodString;
|
|
14427
|
+
component_center: z.ZodObject<{
|
|
14428
|
+
x: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
14429
|
+
y: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
14430
|
+
}, "strip", z.ZodTypeAny, {
|
|
14431
|
+
x: number;
|
|
14432
|
+
y: number;
|
|
14433
|
+
}, {
|
|
14434
|
+
x: string | number;
|
|
14435
|
+
y: string | number;
|
|
14436
|
+
}>;
|
|
14437
|
+
component_bounds: z.ZodObject<{
|
|
14438
|
+
min_x: z.ZodNumber;
|
|
14439
|
+
max_x: z.ZodNumber;
|
|
14440
|
+
min_y: z.ZodNumber;
|
|
14441
|
+
max_y: z.ZodNumber;
|
|
14442
|
+
}, "strip", z.ZodTypeAny, {
|
|
14443
|
+
min_x: number;
|
|
14444
|
+
max_x: number;
|
|
14445
|
+
min_y: number;
|
|
14446
|
+
max_y: number;
|
|
14447
|
+
}, {
|
|
14448
|
+
min_x: number;
|
|
14449
|
+
max_x: number;
|
|
14450
|
+
min_y: number;
|
|
14451
|
+
max_y: number;
|
|
14452
|
+
}>;
|
|
14453
|
+
subcircuit_id: z.ZodOptional<z.ZodString>;
|
|
14454
|
+
source_component_id: z.ZodOptional<z.ZodString>;
|
|
14455
|
+
}, "strip", z.ZodTypeAny, {
|
|
14456
|
+
message: string;
|
|
14457
|
+
type: "pcb_component_outside_board_error";
|
|
14458
|
+
pcb_component_id: string;
|
|
14459
|
+
error_type: "pcb_component_outside_board_error";
|
|
14460
|
+
pcb_board_id: string;
|
|
14461
|
+
pcb_component_outside_board_error_id: string;
|
|
14462
|
+
component_center: {
|
|
14463
|
+
x: number;
|
|
14464
|
+
y: number;
|
|
14465
|
+
};
|
|
14466
|
+
component_bounds: {
|
|
14467
|
+
min_x: number;
|
|
14468
|
+
max_x: number;
|
|
14469
|
+
min_y: number;
|
|
14470
|
+
max_y: number;
|
|
14471
|
+
};
|
|
14472
|
+
source_component_id?: string | undefined;
|
|
14473
|
+
subcircuit_id?: string | undefined;
|
|
14474
|
+
}, {
|
|
14475
|
+
message: string;
|
|
14476
|
+
type: "pcb_component_outside_board_error";
|
|
14477
|
+
pcb_component_id: string;
|
|
14478
|
+
pcb_board_id: string;
|
|
14479
|
+
component_center: {
|
|
14480
|
+
x: string | number;
|
|
14481
|
+
y: string | number;
|
|
14482
|
+
};
|
|
14483
|
+
component_bounds: {
|
|
14484
|
+
min_x: number;
|
|
14485
|
+
max_x: number;
|
|
14486
|
+
min_y: number;
|
|
14487
|
+
max_y: number;
|
|
14488
|
+
};
|
|
14489
|
+
source_component_id?: string | undefined;
|
|
14490
|
+
subcircuit_id?: string | undefined;
|
|
14491
|
+
error_type?: "pcb_component_outside_board_error" | undefined;
|
|
14492
|
+
pcb_component_outside_board_error_id?: string | undefined;
|
|
14493
|
+
}>, z.ZodObject<{
|
|
14327
14494
|
type: z.ZodLiteral<"schematic_box">;
|
|
14328
14495
|
schematic_component_id: z.ZodOptional<z.ZodString>;
|
|
14329
14496
|
width: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
@@ -20294,6 +20461,79 @@ declare const any_soup_element: z.ZodUnion<[z.ZodObject<{
|
|
|
20294
20461
|
source_net_id?: string | undefined;
|
|
20295
20462
|
pcb_copper_pour_id?: string | undefined;
|
|
20296
20463
|
}>]>, z.ZodObject<{
|
|
20464
|
+
type: z.ZodLiteral<"pcb_component_outside_board_error">;
|
|
20465
|
+
pcb_component_outside_board_error_id: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
20466
|
+
error_type: z.ZodDefault<z.ZodLiteral<"pcb_component_outside_board_error">>;
|
|
20467
|
+
message: z.ZodString;
|
|
20468
|
+
pcb_component_id: z.ZodString;
|
|
20469
|
+
pcb_board_id: z.ZodString;
|
|
20470
|
+
component_center: z.ZodObject<{
|
|
20471
|
+
x: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
20472
|
+
y: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
20473
|
+
}, "strip", z.ZodTypeAny, {
|
|
20474
|
+
x: number;
|
|
20475
|
+
y: number;
|
|
20476
|
+
}, {
|
|
20477
|
+
x: string | number;
|
|
20478
|
+
y: string | number;
|
|
20479
|
+
}>;
|
|
20480
|
+
component_bounds: z.ZodObject<{
|
|
20481
|
+
min_x: z.ZodNumber;
|
|
20482
|
+
max_x: z.ZodNumber;
|
|
20483
|
+
min_y: z.ZodNumber;
|
|
20484
|
+
max_y: z.ZodNumber;
|
|
20485
|
+
}, "strip", z.ZodTypeAny, {
|
|
20486
|
+
min_x: number;
|
|
20487
|
+
max_x: number;
|
|
20488
|
+
min_y: number;
|
|
20489
|
+
max_y: number;
|
|
20490
|
+
}, {
|
|
20491
|
+
min_x: number;
|
|
20492
|
+
max_x: number;
|
|
20493
|
+
min_y: number;
|
|
20494
|
+
max_y: number;
|
|
20495
|
+
}>;
|
|
20496
|
+
subcircuit_id: z.ZodOptional<z.ZodString>;
|
|
20497
|
+
source_component_id: z.ZodOptional<z.ZodString>;
|
|
20498
|
+
}, "strip", z.ZodTypeAny, {
|
|
20499
|
+
message: string;
|
|
20500
|
+
type: "pcb_component_outside_board_error";
|
|
20501
|
+
pcb_component_id: string;
|
|
20502
|
+
error_type: "pcb_component_outside_board_error";
|
|
20503
|
+
pcb_board_id: string;
|
|
20504
|
+
pcb_component_outside_board_error_id: string;
|
|
20505
|
+
component_center: {
|
|
20506
|
+
x: number;
|
|
20507
|
+
y: number;
|
|
20508
|
+
};
|
|
20509
|
+
component_bounds: {
|
|
20510
|
+
min_x: number;
|
|
20511
|
+
max_x: number;
|
|
20512
|
+
min_y: number;
|
|
20513
|
+
max_y: number;
|
|
20514
|
+
};
|
|
20515
|
+
source_component_id?: string | undefined;
|
|
20516
|
+
subcircuit_id?: string | undefined;
|
|
20517
|
+
}, {
|
|
20518
|
+
message: string;
|
|
20519
|
+
type: "pcb_component_outside_board_error";
|
|
20520
|
+
pcb_component_id: string;
|
|
20521
|
+
pcb_board_id: string;
|
|
20522
|
+
component_center: {
|
|
20523
|
+
x: string | number;
|
|
20524
|
+
y: string | number;
|
|
20525
|
+
};
|
|
20526
|
+
component_bounds: {
|
|
20527
|
+
min_x: number;
|
|
20528
|
+
max_x: number;
|
|
20529
|
+
min_y: number;
|
|
20530
|
+
max_y: number;
|
|
20531
|
+
};
|
|
20532
|
+
source_component_id?: string | undefined;
|
|
20533
|
+
subcircuit_id?: string | undefined;
|
|
20534
|
+
error_type?: "pcb_component_outside_board_error" | undefined;
|
|
20535
|
+
pcb_component_outside_board_error_id?: string | undefined;
|
|
20536
|
+
}>, z.ZodObject<{
|
|
20297
20537
|
type: z.ZodLiteral<"schematic_box">;
|
|
20298
20538
|
schematic_component_id: z.ZodOptional<z.ZodString>;
|
|
20299
20539
|
width: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
@@ -21523,4 +21763,4 @@ type AnySoupElementInput = AnyCircuitElementInput;
|
|
|
21523
21763
|
*/
|
|
21524
21764
|
type CircuitJson = AnyCircuitElement[];
|
|
21525
21765
|
|
|
21526
|
-
export { type AnyCircuitElement, type AnyCircuitElementInput, type AnySoupElement, type AnySoupElementInput, type AnySourceComponent, type AnySourceElement, type BRepShape, type CadComponent, type CadComponentInput, type CircuitJson, type CircuitJsonError, type Distance, type ExternalFootprintLoadError, type ExternalFootprintLoadErrorInput, type InferredProjectMetadata, type InferredSchematicNetLabel, type InputPoint, type InputPosition, type InputRotation, type LayerRef, type LayerRefInput, type Length, type NinePointAnchor, type PCBBoard, type PCBComponent, type PCBFabricationNotePath, type PCBFabricationNoteText, type PCBHole, type PCBHoleInput, type PCBKeepout, type PCBKeepoutCircle, type PCBKeepoutInput, type PCBKeepoutRect, type PCBMissingFootprintError, type PCBPlacementError, type PCBPlatedHole, type PCBPlatedHoleInput, type PCBPort, type PCBPortInput, type PCBPortNotMatchedError, type PCBSMTPad, type PCBSMTPadInput, type PCBSilkscreenLine, type PCBSilkscreenText, type PCBSolderPasteInput, type PCBText, type PCBTrace, type PCBTraceError, type PCBTraceHint, type PCBTraceInput, type PCBTraceMissingError, type PCBVia, type PcbAutoroutingError, type PcbAutoroutingErrorInput, type PcbAutoroutingErrorInterface, type PcbBoard, type PcbBoardInput, type PcbBreakoutPoint, type PcbBreakoutPointInput, type PcbCircuitElement, type PcbComponent, type PcbComponentInput, type PcbCopperPour, type PcbCopperPourBRep, type PcbCopperPourBRepInput, type PcbCopperPourInput, type PcbCopperPourPolygon, type PcbCopperPourPolygonInput, type PcbCopperPourRect, type PcbCopperPourRectInput, type PcbCutout, type PcbCutoutCircle, type PcbCutoutCircleInput, type PcbCutoutInput, type PcbCutoutPolygon, type PcbCutoutPolygonInput, type PcbCutoutRect, type PcbCutoutRectInput, type PcbFabricationNotePath, type PcbFabricationNotePathInput, type PcbFabricationNoteText, type PcbFabricationNoteTextInput, type PcbFootprintOverlapError, type PcbFootprintOverlapErrorInput, type PcbGroundPlane, type PcbGroundPlaneInput, type PcbGroundPlaneRegion, type PcbGroundPlaneRegionInput, type PcbGroup, type PcbGroupInput, type PcbHole, type PcbHoleCircleOrSquare, type PcbHoleCircleOrSquareInput, type PcbHoleCircularWithRectPad, type PcbHoleOval, type PcbHoleOvalInput, type PcbHolePillWithRectPad, type PcbHoleRotatedPillWithRectPad, type PcbManualEditConflictWarning, type PcbManualEditConflictWarningInput, type PcbMissingFootprintError, type PcbMissingFootprintErrorInput, type PcbPlacementError, type PcbPlacementErrorInput, type PcbPlatedHole, type PcbPlatedHoleCircle, type PcbPlatedHoleInput, type PcbPlatedHoleOval, type PcbPort, type PcbPortInput, type PcbPortNotConnectedError, type PcbPortNotConnectedErrorInput, type PcbPortNotMatchedError, type PcbPortNotMatchedErrorInput, type PcbRouteHint, type PcbRouteHintInput, type PcbRouteHints, type PcbRouteHintsInput, type PcbSilkscreenCircle, type PcbSilkscreenCircleInput, type PcbSilkscreenLine, type PcbSilkscreenLineInput, type PcbSilkscreenOval, type PcbSilkscreenOvalDeprecated, type PcbSilkscreenOvalInput, type PcbSilkscreenPath, type PcbSilkscreenPathDeprecated, type PcbSilkscreenPathInput, type PcbSilkscreenRect, type PcbSilkscreenRectInput, type PcbSilkscreenRectOld, type PcbSilkscreenText, type PcbSilkscreenTextInput, type PcbSmtPad, type PcbSmtPadCircle, type PcbSmtPadPill, type PcbSmtPadPolygon, type PcbSmtPadRect, type PcbSmtPadRotatedPill, type PcbSmtPadRotatedRect, type PcbSolderPaste, type PcbSolderPasteCircle, type PcbSolderPasteOval, type PcbSolderPastePill, type PcbSolderPasteRect, type PcbSolderPasteRotatedRect, type PcbText, type PcbTextInput, type PcbThermalSpoke, type PcbThermalSpokeInput, type PcbTrace, type PcbTraceError, type PcbTraceErrorInput, type PcbTraceHint, type PcbTraceHintInput, type PcbTraceInput, type PcbTraceMissingError, type PcbTraceMissingErrorInput, type PcbTraceRoutePoint, type PcbTraceRoutePointVia, type PcbTraceRoutePointWire, type PcbVia, type PcbViaInput, type Point, type Point3, type PointWithBulge, type Position, type Ring, type Rotation, type RouteHintPoint, type RouteHintPointInput, type SchematicBox, type SchematicBoxInput, type SchematicComponent, type SchematicComponentInput, type SchematicDebugLine, type SchematicDebugObject, type SchematicDebugObjectInput, type SchematicDebugPoint, type SchematicDebugRect, type SchematicError, type SchematicErrorInput, type SchematicGroup, type SchematicGroupInput, type SchematicLayoutError, type SchematicLayoutErrorInput, type SchematicLine, type SchematicLineInput, type SchematicManualEditConflictWarning, type SchematicManualEditConflictWarningInput, type SchematicNetLabel, type SchematicNetLabelInput, type SchematicPath, type SchematicPathInput, type SchematicPort, type SchematicPortArrangement, type SchematicPortArrangementBySides, type SchematicPortArrangementBySize, type SchematicPortInput, type SchematicTable, type SchematicTableCell, type SchematicTableCellInput, type SchematicTableInput, type SchematicText, type SchematicTextInput, type SchematicTrace, type SchematicTraceEdge, type SchematicTraceInput, type SchematicVoltageProbe, type SchematicVoltageProbeInput, type SimulationAcVoltageSource, type SimulationAcVoltageSourceInput, type SimulationDcVoltageSource, type SimulationVoltageSource, type SimulationVoltageSourceInput, type Size, type SizeInput, type SourceComponentBase, type SourceFailedToCreateComponentError, type SourceFailedToCreateComponentErrorInput, type SourceGroup, type SourceGroupInput, type SourceManuallyPlacedVia, type SourceManuallyPlacedViaInput, type SourceMissingPropertyError, type SourceMissingPropertyErrorInput, type SourceNet, type SourceNetInput, type SourcePcbGroundPlane, type SourcePcbGroundPlaneInput, type SourcePinMissingTraceWarning, type SourcePinMissingTraceWarningInput, type SourcePort, type SourcePortInput, type SourceProjectMetadata, type SourcePropertyIgnoredWarning, type SourcePropertyIgnoredWarningInput, type SourceSimpleBattery, type SourceSimpleBatteryInput, type SourceSimpleCapacitor, type SourceSimpleCapacitorInput, type SourceSimpleChip, type SourceSimpleChipInput, type SourceSimpleCrystal, type SourceSimpleCrystalInput, type SourceSimpleDiode, type SourceSimpleDiodeInput, type SourceSimpleGround, type SourceSimpleGroundInput, type SourceSimpleInductor, type SourceSimpleInductorInput, type SourceSimpleLed, type SourceSimpleLedInput, type SourceSimpleMosfet, type SourceSimpleMosfetInput, type SourceSimplePinHeader, type SourceSimplePinHeaderInput, type SourceSimplePinout, type SourceSimplePinoutInput, type SourceSimplePotentiometer, type SourceSimplePotentiometerInput, type SourceSimplePowerSource, type SourceSimplePowerSourceInput, type SourceSimplePushButton, type SourceSimplePushButtonInput, type SourceSimpleResistor, type SourceSimpleResistorInput, type SourceSimpleResonator, type SourceSimpleResonatorInput, type SourceSimpleSwitch, type SourceSimpleSwitchInput, type SourceSimpleTestPoint, type SourceSimpleTestPointInput, type SourceSimpleTransistor, type SourceSimpleTransistorInput, type SourceTrace, type SourceTraceNotConnectedError, type SourceTraceNotConnectedErrorInput, type SupplierName, type VisibleLayer, type VisibleLayerRef, type WaveShape, all_layers, any_circuit_element, any_soup_element, any_source_component, battery_capacity, brep_shape, cad_component, capacitance, current, distance, external_footprint_load_error, frequency, getZodPrefixedIdWithDefault, inductance, layer_ref, layer_string, length, ninePointAnchor, pcb_autorouting_error, pcb_board, pcb_breakout_point, pcb_component, pcb_copper_pour, pcb_copper_pour_brep, pcb_copper_pour_polygon, pcb_copper_pour_rect, pcb_cutout, pcb_cutout_circle, pcb_cutout_polygon, pcb_cutout_rect, pcb_fabrication_note_path, pcb_fabrication_note_text, pcb_footprint_overlap_error, pcb_ground_plane, pcb_ground_plane_region, pcb_group, pcb_hole, pcb_hole_circle_or_square_shape, pcb_hole_oval_shape, pcb_keepout, pcb_manual_edit_conflict_warning, pcb_missing_footprint_error, pcb_placement_error, pcb_plated_hole, pcb_port, pcb_port_not_connected_error, pcb_port_not_matched_error, pcb_route_hint, pcb_route_hints, pcb_silkscreen_circle, pcb_silkscreen_line, pcb_silkscreen_oval, pcb_silkscreen_path, pcb_silkscreen_rect, pcb_silkscreen_text, pcb_smtpad, pcb_smtpad_pill, pcb_solder_paste, pcb_text, pcb_thermal_spoke, pcb_trace, pcb_trace_error, pcb_trace_hint, pcb_trace_missing_error, pcb_trace_route_point, pcb_trace_route_point_via, pcb_trace_route_point_wire, pcb_via, point, point3, point_with_bulge, port_arrangement, position, position3, resistance, ring, rotation, route_hint_point, schematic_box, schematic_component, schematic_component_port_arrangement_by_sides, schematic_component_port_arrangement_by_size, schematic_debug_line, schematic_debug_object, schematic_debug_object_base, schematic_debug_point, schematic_debug_rect, schematic_error, schematic_group, schematic_layout_error, schematic_line, schematic_manual_edit_conflict_warning, schematic_net_label, schematic_path, schematic_pin_styles, schematic_port, schematic_table, schematic_table_cell, schematic_text, schematic_trace, schematic_voltage_probe, simulation_ac_voltage_source, simulation_dc_voltage_source, simulation_voltage_source, size, source_component_base, source_failed_to_create_component_error, source_group, source_manually_placed_via, source_missing_property_error, source_net, source_pcb_ground_plane, source_pin_missing_trace_warning, source_port, source_project_metadata, source_property_ignored_warning, source_simple_battery, source_simple_capacitor, source_simple_chip, source_simple_crystal, source_simple_diode, source_simple_ground, source_simple_inductor, source_simple_led, source_simple_mosfet, source_simple_pin_header, source_simple_pinout, source_simple_potentiometer, source_simple_power_source, source_simple_push_button, source_simple_resistor, source_simple_resonator, source_simple_switch, source_simple_test_point, source_simple_transistor, source_trace, source_trace_not_connected_error, supplier_name, time, visible_layer, voltage, wave_shape };
|
|
21766
|
+
export { type AnyCircuitElement, type AnyCircuitElementInput, type AnySoupElement, type AnySoupElementInput, type AnySourceComponent, type AnySourceElement, type BRepShape, type CadComponent, type CadComponentInput, type CircuitJson, type CircuitJsonError, type Distance, type ExternalFootprintLoadError, type ExternalFootprintLoadErrorInput, type InferredProjectMetadata, type InferredSchematicNetLabel, type InputPoint, type InputPosition, type InputRotation, type LayerRef, type LayerRefInput, type Length, type NinePointAnchor, type PCBBoard, type PCBComponent, type PCBFabricationNotePath, type PCBFabricationNoteText, type PCBHole, type PCBHoleInput, type PCBKeepout, type PCBKeepoutCircle, type PCBKeepoutInput, type PCBKeepoutRect, type PCBMissingFootprintError, type PCBPlacementError, type PCBPlatedHole, type PCBPlatedHoleInput, type PCBPort, type PCBPortInput, type PCBPortNotMatchedError, type PCBSMTPad, type PCBSMTPadInput, type PCBSilkscreenLine, type PCBSilkscreenText, type PCBSolderPasteInput, type PCBText, type PCBTrace, type PCBTraceError, type PCBTraceHint, type PCBTraceInput, type PCBTraceMissingError, type PCBVia, type PcbAutoroutingError, type PcbAutoroutingErrorInput, type PcbAutoroutingErrorInterface, type PcbBoard, type PcbBoardInput, type PcbBreakoutPoint, type PcbBreakoutPointInput, type PcbCircuitElement, type PcbComponent, type PcbComponentInput, type PcbComponentOutsideBoardError, type PcbComponentOutsideBoardErrorInput, type PcbCopperPour, type PcbCopperPourBRep, type PcbCopperPourBRepInput, type PcbCopperPourInput, type PcbCopperPourPolygon, type PcbCopperPourPolygonInput, type PcbCopperPourRect, type PcbCopperPourRectInput, type PcbCutout, type PcbCutoutCircle, type PcbCutoutCircleInput, type PcbCutoutInput, type PcbCutoutPolygon, type PcbCutoutPolygonInput, type PcbCutoutRect, type PcbCutoutRectInput, type PcbFabricationNotePath, type PcbFabricationNotePathInput, type PcbFabricationNoteText, type PcbFabricationNoteTextInput, type PcbFootprintOverlapError, type PcbFootprintOverlapErrorInput, type PcbGroundPlane, type PcbGroundPlaneInput, type PcbGroundPlaneRegion, type PcbGroundPlaneRegionInput, type PcbGroup, type PcbGroupInput, type PcbHole, type PcbHoleCircleOrSquare, type PcbHoleCircleOrSquareInput, type PcbHoleCircularWithRectPad, type PcbHoleOval, type PcbHoleOvalInput, type PcbHolePillWithRectPad, type PcbHoleRotatedPillWithRectPad, type PcbManualEditConflictWarning, type PcbManualEditConflictWarningInput, type PcbMissingFootprintError, type PcbMissingFootprintErrorInput, type PcbPlacementError, type PcbPlacementErrorInput, type PcbPlatedHole, type PcbPlatedHoleCircle, type PcbPlatedHoleInput, type PcbPlatedHoleOval, type PcbPort, type PcbPortInput, type PcbPortNotConnectedError, type PcbPortNotConnectedErrorInput, type PcbPortNotMatchedError, type PcbPortNotMatchedErrorInput, type PcbRouteHint, type PcbRouteHintInput, type PcbRouteHints, type PcbRouteHintsInput, type PcbSilkscreenCircle, type PcbSilkscreenCircleInput, type PcbSilkscreenLine, type PcbSilkscreenLineInput, type PcbSilkscreenOval, type PcbSilkscreenOvalDeprecated, type PcbSilkscreenOvalInput, type PcbSilkscreenPath, type PcbSilkscreenPathDeprecated, type PcbSilkscreenPathInput, type PcbSilkscreenRect, type PcbSilkscreenRectInput, type PcbSilkscreenRectOld, type PcbSilkscreenText, type PcbSilkscreenTextInput, type PcbSmtPad, type PcbSmtPadCircle, type PcbSmtPadPill, type PcbSmtPadPolygon, type PcbSmtPadRect, type PcbSmtPadRotatedPill, type PcbSmtPadRotatedRect, type PcbSolderPaste, type PcbSolderPasteCircle, type PcbSolderPasteOval, type PcbSolderPastePill, type PcbSolderPasteRect, type PcbSolderPasteRotatedRect, type PcbText, type PcbTextInput, type PcbThermalSpoke, type PcbThermalSpokeInput, type PcbTrace, type PcbTraceError, type PcbTraceErrorInput, type PcbTraceHint, type PcbTraceHintInput, type PcbTraceInput, type PcbTraceMissingError, type PcbTraceMissingErrorInput, type PcbTraceRoutePoint, type PcbTraceRoutePointVia, type PcbTraceRoutePointWire, type PcbVia, type PcbViaInput, type Point, type Point3, type PointWithBulge, type Position, type Ring, type Rotation, type RouteHintPoint, type RouteHintPointInput, type SchematicBox, type SchematicBoxInput, type SchematicComponent, type SchematicComponentInput, type SchematicDebugLine, type SchematicDebugObject, type SchematicDebugObjectInput, type SchematicDebugPoint, type SchematicDebugRect, type SchematicError, type SchematicErrorInput, type SchematicGroup, type SchematicGroupInput, type SchematicLayoutError, type SchematicLayoutErrorInput, type SchematicLine, type SchematicLineInput, type SchematicManualEditConflictWarning, type SchematicManualEditConflictWarningInput, type SchematicNetLabel, type SchematicNetLabelInput, type SchematicPath, type SchematicPathInput, type SchematicPort, type SchematicPortArrangement, type SchematicPortArrangementBySides, type SchematicPortArrangementBySize, type SchematicPortInput, type SchematicTable, type SchematicTableCell, type SchematicTableCellInput, type SchematicTableInput, type SchematicText, type SchematicTextInput, type SchematicTrace, type SchematicTraceEdge, type SchematicTraceInput, type SchematicVoltageProbe, type SchematicVoltageProbeInput, type SimulationAcVoltageSource, type SimulationAcVoltageSourceInput, type SimulationDcVoltageSource, type SimulationVoltageSource, type SimulationVoltageSourceInput, type Size, type SizeInput, type SourceComponentBase, type SourceFailedToCreateComponentError, type SourceFailedToCreateComponentErrorInput, type SourceGroup, type SourceGroupInput, type SourceManuallyPlacedVia, type SourceManuallyPlacedViaInput, type SourceMissingPropertyError, type SourceMissingPropertyErrorInput, type SourceNet, type SourceNetInput, type SourcePcbGroundPlane, type SourcePcbGroundPlaneInput, type SourcePinMissingTraceWarning, type SourcePinMissingTraceWarningInput, type SourcePort, type SourcePortInput, type SourceProjectMetadata, type SourcePropertyIgnoredWarning, type SourcePropertyIgnoredWarningInput, type SourceSimpleBattery, type SourceSimpleBatteryInput, type SourceSimpleCapacitor, type SourceSimpleCapacitorInput, type SourceSimpleChip, type SourceSimpleChipInput, type SourceSimpleCrystal, type SourceSimpleCrystalInput, type SourceSimpleDiode, type SourceSimpleDiodeInput, type SourceSimpleGround, type SourceSimpleGroundInput, type SourceSimpleInductor, type SourceSimpleInductorInput, type SourceSimpleLed, type SourceSimpleLedInput, type SourceSimpleMosfet, type SourceSimpleMosfetInput, type SourceSimplePinHeader, type SourceSimplePinHeaderInput, type SourceSimplePinout, type SourceSimplePinoutInput, type SourceSimplePotentiometer, type SourceSimplePotentiometerInput, type SourceSimplePowerSource, type SourceSimplePowerSourceInput, type SourceSimplePushButton, type SourceSimplePushButtonInput, type SourceSimpleResistor, type SourceSimpleResistorInput, type SourceSimpleResonator, type SourceSimpleResonatorInput, type SourceSimpleSwitch, type SourceSimpleSwitchInput, type SourceSimpleTestPoint, type SourceSimpleTestPointInput, type SourceSimpleTransistor, type SourceSimpleTransistorInput, type SourceTrace, type SourceTraceNotConnectedError, type SourceTraceNotConnectedErrorInput, type SupplierName, type VisibleLayer, type VisibleLayerRef, type WaveShape, all_layers, any_circuit_element, any_soup_element, any_source_component, battery_capacity, brep_shape, cad_component, capacitance, current, distance, external_footprint_load_error, frequency, getZodPrefixedIdWithDefault, inductance, layer_ref, layer_string, length, ninePointAnchor, pcb_autorouting_error, pcb_board, pcb_breakout_point, pcb_component, pcb_component_outside_board_error, pcb_copper_pour, pcb_copper_pour_brep, pcb_copper_pour_polygon, pcb_copper_pour_rect, pcb_cutout, pcb_cutout_circle, pcb_cutout_polygon, pcb_cutout_rect, pcb_fabrication_note_path, pcb_fabrication_note_text, pcb_footprint_overlap_error, pcb_ground_plane, pcb_ground_plane_region, pcb_group, pcb_hole, pcb_hole_circle_or_square_shape, pcb_hole_oval_shape, pcb_keepout, pcb_manual_edit_conflict_warning, pcb_missing_footprint_error, pcb_placement_error, pcb_plated_hole, pcb_port, pcb_port_not_connected_error, pcb_port_not_matched_error, pcb_route_hint, pcb_route_hints, pcb_silkscreen_circle, pcb_silkscreen_line, pcb_silkscreen_oval, pcb_silkscreen_path, pcb_silkscreen_rect, pcb_silkscreen_text, pcb_smtpad, pcb_smtpad_pill, pcb_solder_paste, pcb_text, pcb_thermal_spoke, pcb_trace, pcb_trace_error, pcb_trace_hint, pcb_trace_missing_error, pcb_trace_route_point, pcb_trace_route_point_via, pcb_trace_route_point_wire, pcb_via, point, point3, point_with_bulge, port_arrangement, position, position3, resistance, ring, rotation, route_hint_point, schematic_box, schematic_component, schematic_component_port_arrangement_by_sides, schematic_component_port_arrangement_by_size, schematic_debug_line, schematic_debug_object, schematic_debug_object_base, schematic_debug_point, schematic_debug_rect, schematic_error, schematic_group, schematic_layout_error, schematic_line, schematic_manual_edit_conflict_warning, schematic_net_label, schematic_path, schematic_pin_styles, schematic_port, schematic_table, schematic_table_cell, schematic_text, schematic_trace, schematic_voltage_probe, simulation_ac_voltage_source, simulation_dc_voltage_source, simulation_voltage_source, size, source_component_base, source_failed_to_create_component_error, source_group, source_manually_placed_via, source_missing_property_error, source_net, source_pcb_ground_plane, source_pin_missing_trace_warning, source_port, source_project_metadata, source_property_ignored_warning, source_simple_battery, source_simple_capacitor, source_simple_chip, source_simple_crystal, source_simple_diode, source_simple_ground, source_simple_inductor, source_simple_led, source_simple_mosfet, source_simple_pin_header, source_simple_pinout, source_simple_potentiometer, source_simple_power_source, source_simple_push_button, source_simple_resistor, source_simple_resonator, source_simple_switch, source_simple_test_point, source_simple_transistor, source_trace, source_trace_not_connected_error, supplier_name, time, visible_layer, voltage, wave_shape };
|
package/dist/index.mjs
CHANGED
|
@@ -2091,35 +2091,60 @@ var pcb_copper_pour = z99.discriminatedUnion("shape", [
|
|
|
2091
2091
|
]).describe("Defines a copper pour on the PCB.");
|
|
2092
2092
|
expectTypesMatch(true);
|
|
2093
2093
|
|
|
2094
|
-
// src/
|
|
2094
|
+
// src/pcb/pcb_component_outside_board_error.ts
|
|
2095
2095
|
import { z as z100 } from "zod";
|
|
2096
|
-
var
|
|
2097
|
-
type: z100.literal("
|
|
2098
|
-
|
|
2096
|
+
var pcb_component_outside_board_error = z100.object({
|
|
2097
|
+
type: z100.literal("pcb_component_outside_board_error"),
|
|
2098
|
+
pcb_component_outside_board_error_id: getZodPrefixedIdWithDefault(
|
|
2099
|
+
"pcb_component_outside_board_error"
|
|
2100
|
+
),
|
|
2101
|
+
error_type: z100.literal("pcb_component_outside_board_error").default("pcb_component_outside_board_error"),
|
|
2102
|
+
message: z100.string(),
|
|
2099
2103
|
pcb_component_id: z100.string(),
|
|
2100
|
-
|
|
2104
|
+
pcb_board_id: z100.string(),
|
|
2105
|
+
component_center: point,
|
|
2106
|
+
component_bounds: z100.object({
|
|
2107
|
+
min_x: z100.number(),
|
|
2108
|
+
max_x: z100.number(),
|
|
2109
|
+
min_y: z100.number(),
|
|
2110
|
+
max_y: z100.number()
|
|
2111
|
+
}),
|
|
2112
|
+
subcircuit_id: z100.string().optional(),
|
|
2113
|
+
source_component_id: z100.string().optional()
|
|
2114
|
+
}).describe(
|
|
2115
|
+
"Error emitted when a PCB component is placed outside the board boundaries"
|
|
2116
|
+
);
|
|
2117
|
+
expectTypesMatch(true);
|
|
2118
|
+
|
|
2119
|
+
// src/cad/cad_component.ts
|
|
2120
|
+
import { z as z101 } from "zod";
|
|
2121
|
+
var cad_component = z101.object({
|
|
2122
|
+
type: z101.literal("cad_component"),
|
|
2123
|
+
cad_component_id: z101.string(),
|
|
2124
|
+
pcb_component_id: z101.string(),
|
|
2125
|
+
source_component_id: z101.string(),
|
|
2101
2126
|
position: point3,
|
|
2102
2127
|
rotation: point3.optional(),
|
|
2103
2128
|
size: point3.optional(),
|
|
2104
2129
|
layer: layer_ref.optional(),
|
|
2105
|
-
subcircuit_id:
|
|
2130
|
+
subcircuit_id: z101.string().optional(),
|
|
2106
2131
|
// These are all ways to generate/load the 3d model
|
|
2107
|
-
footprinter_string:
|
|
2108
|
-
model_obj_url:
|
|
2109
|
-
model_stl_url:
|
|
2110
|
-
model_3mf_url:
|
|
2111
|
-
model_gltf_url:
|
|
2112
|
-
model_glb_url:
|
|
2113
|
-
model_step_url:
|
|
2114
|
-
model_wrl_url:
|
|
2115
|
-
model_jscad:
|
|
2132
|
+
footprinter_string: z101.string().optional(),
|
|
2133
|
+
model_obj_url: z101.string().optional(),
|
|
2134
|
+
model_stl_url: z101.string().optional(),
|
|
2135
|
+
model_3mf_url: z101.string().optional(),
|
|
2136
|
+
model_gltf_url: z101.string().optional(),
|
|
2137
|
+
model_glb_url: z101.string().optional(),
|
|
2138
|
+
model_step_url: z101.string().optional(),
|
|
2139
|
+
model_wrl_url: z101.string().optional(),
|
|
2140
|
+
model_jscad: z101.any().optional()
|
|
2116
2141
|
}).describe("Defines a component on the PCB");
|
|
2117
2142
|
expectTypesMatch(true);
|
|
2118
2143
|
|
|
2119
2144
|
// src/simulation/simulation_voltage_source.ts
|
|
2120
|
-
import { z as
|
|
2121
|
-
var wave_shape =
|
|
2122
|
-
var percentage =
|
|
2145
|
+
import { z as z102 } from "zod";
|
|
2146
|
+
var wave_shape = z102.enum(["sinewave", "square", "triangle", "sawtooth"]);
|
|
2147
|
+
var percentage = z102.union([z102.string(), z102.number()]).transform((val) => {
|
|
2123
2148
|
if (typeof val === "string") {
|
|
2124
2149
|
if (val.endsWith("%")) {
|
|
2125
2150
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -2128,30 +2153,30 @@ var percentage = z101.union([z101.string(), z101.number()]).transform((val) => {
|
|
|
2128
2153
|
}
|
|
2129
2154
|
return val;
|
|
2130
2155
|
}).pipe(
|
|
2131
|
-
|
|
2156
|
+
z102.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
2132
2157
|
);
|
|
2133
|
-
var simulation_dc_voltage_source =
|
|
2134
|
-
type:
|
|
2158
|
+
var simulation_dc_voltage_source = z102.object({
|
|
2159
|
+
type: z102.literal("simulation_voltage_source"),
|
|
2135
2160
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
2136
2161
|
"simulation_voltage_source"
|
|
2137
2162
|
),
|
|
2138
|
-
is_dc_source:
|
|
2139
|
-
positive_source_port_id:
|
|
2140
|
-
negative_source_port_id:
|
|
2141
|
-
positive_source_net_id:
|
|
2142
|
-
negative_source_net_id:
|
|
2163
|
+
is_dc_source: z102.literal(true).optional().default(true),
|
|
2164
|
+
positive_source_port_id: z102.string().optional(),
|
|
2165
|
+
negative_source_port_id: z102.string().optional(),
|
|
2166
|
+
positive_source_net_id: z102.string().optional(),
|
|
2167
|
+
negative_source_net_id: z102.string().optional(),
|
|
2143
2168
|
voltage
|
|
2144
2169
|
}).describe("Defines a DC voltage source for simulation");
|
|
2145
|
-
var simulation_ac_voltage_source =
|
|
2146
|
-
type:
|
|
2170
|
+
var simulation_ac_voltage_source = z102.object({
|
|
2171
|
+
type: z102.literal("simulation_voltage_source"),
|
|
2147
2172
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
2148
2173
|
"simulation_voltage_source"
|
|
2149
2174
|
),
|
|
2150
|
-
is_dc_source:
|
|
2151
|
-
terminal1_source_port_id:
|
|
2152
|
-
terminal2_source_port_id:
|
|
2153
|
-
terminal1_source_net_id:
|
|
2154
|
-
terminal2_source_net_id:
|
|
2175
|
+
is_dc_source: z102.literal(false),
|
|
2176
|
+
terminal1_source_port_id: z102.string().optional(),
|
|
2177
|
+
terminal2_source_port_id: z102.string().optional(),
|
|
2178
|
+
terminal1_source_net_id: z102.string().optional(),
|
|
2179
|
+
terminal2_source_net_id: z102.string().optional(),
|
|
2155
2180
|
voltage: voltage.optional(),
|
|
2156
2181
|
frequency: frequency.optional(),
|
|
2157
2182
|
peak_to_peak_voltage: voltage.optional(),
|
|
@@ -2159,14 +2184,14 @@ var simulation_ac_voltage_source = z101.object({
|
|
|
2159
2184
|
phase: rotation.optional(),
|
|
2160
2185
|
duty_cycle: percentage.optional()
|
|
2161
2186
|
}).describe("Defines an AC voltage source for simulation");
|
|
2162
|
-
var simulation_voltage_source =
|
|
2187
|
+
var simulation_voltage_source = z102.union([simulation_dc_voltage_source, simulation_ac_voltage_source]).describe("Defines a voltage source for simulation");
|
|
2163
2188
|
expectTypesMatch(true);
|
|
2164
2189
|
expectTypesMatch(true);
|
|
2165
2190
|
expectTypesMatch(true);
|
|
2166
2191
|
|
|
2167
2192
|
// src/any_circuit_element.ts
|
|
2168
|
-
import { z as
|
|
2169
|
-
var any_circuit_element =
|
|
2193
|
+
import { z as z103 } from "zod";
|
|
2194
|
+
var any_circuit_element = z103.union([
|
|
2170
2195
|
source_trace,
|
|
2171
2196
|
source_port,
|
|
2172
2197
|
any_source_component,
|
|
@@ -2231,6 +2256,7 @@ var any_circuit_element = z102.union([
|
|
|
2231
2256
|
pcb_ground_plane_region,
|
|
2232
2257
|
pcb_thermal_spoke,
|
|
2233
2258
|
pcb_copper_pour,
|
|
2259
|
+
pcb_component_outside_board_error,
|
|
2234
2260
|
schematic_box,
|
|
2235
2261
|
schematic_text,
|
|
2236
2262
|
schematic_line,
|
|
@@ -2276,6 +2302,7 @@ export {
|
|
|
2276
2302
|
pcb_board,
|
|
2277
2303
|
pcb_breakout_point,
|
|
2278
2304
|
pcb_component,
|
|
2305
|
+
pcb_component_outside_board_error,
|
|
2279
2306
|
pcb_copper_pour,
|
|
2280
2307
|
pcb_copper_pour_brep,
|
|
2281
2308
|
pcb_copper_pour_polygon,
|