circuit-json 0.0.220 → 0.0.222
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 +21 -0
- package/dist/index.d.mts +79 -1
- package/dist/index.mjs +19 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -123,6 +123,8 @@ https://github.com/user-attachments/assets/2f28b7ba-689e-4d80-85b2-5bdef84b41f8
|
|
|
123
123
|
- [SchematicText](#schematictext)
|
|
124
124
|
- [SchematicTrace](#schematictrace)
|
|
125
125
|
- [SchematicVoltageProbe](#schematicvoltageprobe)
|
|
126
|
+
- [Simulation Elements](#simulation-elements)
|
|
127
|
+
- [SimulationVoltageSource](#simulationvoltagesource)
|
|
126
128
|
|
|
127
129
|
<!-- toc:end -->
|
|
128
130
|
|
|
@@ -254,6 +256,7 @@ interface SourceGroup {
|
|
|
254
256
|
source_group_id: string
|
|
255
257
|
subcircuit_id?: string
|
|
256
258
|
parent_subcircuit_id?: string
|
|
259
|
+
parent_source_group_id?: string
|
|
257
260
|
is_subcircuit?: boolean
|
|
258
261
|
name?: string
|
|
259
262
|
}
|
|
@@ -1718,4 +1721,22 @@ interface SchematicVoltageProbe {
|
|
|
1718
1721
|
}
|
|
1719
1722
|
```
|
|
1720
1723
|
|
|
1724
|
+
## Simulation Elements
|
|
1725
|
+
|
|
1726
|
+
### SimulationVoltageSource
|
|
1727
|
+
|
|
1728
|
+
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/simulation/simulation_voltage_source.ts)
|
|
1729
|
+
|
|
1730
|
+
```typescript
|
|
1731
|
+
/** Defines a voltage source for simulation purposes. It applies a voltage
|
|
1732
|
+
* difference between two source ports. */
|
|
1733
|
+
interface SimulationVoltageSource {
|
|
1734
|
+
type: "simulation_voltage_source"
|
|
1735
|
+
simulation_voltage_source_id: string
|
|
1736
|
+
positive_source_port_id: string
|
|
1737
|
+
negative_source_port_id: string
|
|
1738
|
+
voltage: number
|
|
1739
|
+
}
|
|
1740
|
+
```
|
|
1741
|
+
|
|
1721
1742
|
<!-- circuit-json-docs:end -->
|
package/dist/index.d.mts
CHANGED
|
@@ -7730,6 +7730,7 @@ declare const source_group: z.ZodObject<{
|
|
|
7730
7730
|
source_group_id: z.ZodString;
|
|
7731
7731
|
subcircuit_id: z.ZodOptional<z.ZodString>;
|
|
7732
7732
|
parent_subcircuit_id: z.ZodOptional<z.ZodString>;
|
|
7733
|
+
parent_source_group_id: z.ZodOptional<z.ZodString>;
|
|
7733
7734
|
is_subcircuit: z.ZodOptional<z.ZodBoolean>;
|
|
7734
7735
|
name: z.ZodOptional<z.ZodString>;
|
|
7735
7736
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -7739,6 +7740,7 @@ declare const source_group: z.ZodObject<{
|
|
|
7739
7740
|
subcircuit_id?: string | undefined;
|
|
7740
7741
|
is_subcircuit?: boolean | undefined;
|
|
7741
7742
|
parent_subcircuit_id?: string | undefined;
|
|
7743
|
+
parent_source_group_id?: string | undefined;
|
|
7742
7744
|
}, {
|
|
7743
7745
|
type: "source_group";
|
|
7744
7746
|
source_group_id: string;
|
|
@@ -7746,6 +7748,7 @@ declare const source_group: z.ZodObject<{
|
|
|
7746
7748
|
subcircuit_id?: string | undefined;
|
|
7747
7749
|
is_subcircuit?: boolean | undefined;
|
|
7748
7750
|
parent_subcircuit_id?: string | undefined;
|
|
7751
|
+
parent_source_group_id?: string | undefined;
|
|
7749
7752
|
}>;
|
|
7750
7753
|
type SourceGroupInput = z.input<typeof source_group>;
|
|
7751
7754
|
interface SourceGroup {
|
|
@@ -7753,6 +7756,7 @@ interface SourceGroup {
|
|
|
7753
7756
|
source_group_id: string;
|
|
7754
7757
|
subcircuit_id?: string;
|
|
7755
7758
|
parent_subcircuit_id?: string;
|
|
7759
|
+
parent_source_group_id?: string;
|
|
7756
7760
|
is_subcircuit?: boolean;
|
|
7757
7761
|
name?: string;
|
|
7758
7762
|
}
|
|
@@ -7974,6 +7978,38 @@ interface CadComponent {
|
|
|
7974
7978
|
model_jscad?: any;
|
|
7975
7979
|
}
|
|
7976
7980
|
|
|
7981
|
+
declare const simulation_voltage_source: z.ZodObject<{
|
|
7982
|
+
type: z.ZodLiteral<"simulation_voltage_source">;
|
|
7983
|
+
simulation_voltage_source_id: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
7984
|
+
positive_source_port_id: z.ZodString;
|
|
7985
|
+
negative_source_port_id: z.ZodString;
|
|
7986
|
+
voltage: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
7987
|
+
}, "strip", z.ZodTypeAny, {
|
|
7988
|
+
type: "simulation_voltage_source";
|
|
7989
|
+
voltage: number;
|
|
7990
|
+
simulation_voltage_source_id: string;
|
|
7991
|
+
positive_source_port_id: string;
|
|
7992
|
+
negative_source_port_id: string;
|
|
7993
|
+
}, {
|
|
7994
|
+
type: "simulation_voltage_source";
|
|
7995
|
+
voltage: string | number;
|
|
7996
|
+
positive_source_port_id: string;
|
|
7997
|
+
negative_source_port_id: string;
|
|
7998
|
+
simulation_voltage_source_id?: string | undefined;
|
|
7999
|
+
}>;
|
|
8000
|
+
type SimulationVoltageSourceInput = z.input<typeof simulation_voltage_source>;
|
|
8001
|
+
/**
|
|
8002
|
+
* Defines a voltage source for simulation purposes. It applies a voltage
|
|
8003
|
+
* difference between two source ports.
|
|
8004
|
+
*/
|
|
8005
|
+
interface SimulationVoltageSource {
|
|
8006
|
+
type: "simulation_voltage_source";
|
|
8007
|
+
simulation_voltage_source_id: string;
|
|
8008
|
+
positive_source_port_id: string;
|
|
8009
|
+
negative_source_port_id: string;
|
|
8010
|
+
voltage: number;
|
|
8011
|
+
}
|
|
8012
|
+
|
|
7977
8013
|
declare const any_circuit_element: z.ZodUnion<[z.ZodObject<{
|
|
7978
8014
|
type: z.ZodLiteral<"source_trace">;
|
|
7979
8015
|
source_trace_id: z.ZodString;
|
|
@@ -8970,6 +9006,7 @@ declare const any_circuit_element: z.ZodUnion<[z.ZodObject<{
|
|
|
8970
9006
|
source_group_id: z.ZodString;
|
|
8971
9007
|
subcircuit_id: z.ZodOptional<z.ZodString>;
|
|
8972
9008
|
parent_subcircuit_id: z.ZodOptional<z.ZodString>;
|
|
9009
|
+
parent_source_group_id: z.ZodOptional<z.ZodString>;
|
|
8973
9010
|
is_subcircuit: z.ZodOptional<z.ZodBoolean>;
|
|
8974
9011
|
name: z.ZodOptional<z.ZodString>;
|
|
8975
9012
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -8979,6 +9016,7 @@ declare const any_circuit_element: z.ZodUnion<[z.ZodObject<{
|
|
|
8979
9016
|
subcircuit_id?: string | undefined;
|
|
8980
9017
|
is_subcircuit?: boolean | undefined;
|
|
8981
9018
|
parent_subcircuit_id?: string | undefined;
|
|
9019
|
+
parent_source_group_id?: string | undefined;
|
|
8982
9020
|
}, {
|
|
8983
9021
|
type: "source_group";
|
|
8984
9022
|
source_group_id: string;
|
|
@@ -8986,6 +9024,7 @@ declare const any_circuit_element: z.ZodUnion<[z.ZodObject<{
|
|
|
8986
9024
|
subcircuit_id?: string | undefined;
|
|
8987
9025
|
is_subcircuit?: boolean | undefined;
|
|
8988
9026
|
parent_subcircuit_id?: string | undefined;
|
|
9027
|
+
parent_source_group_id?: string | undefined;
|
|
8989
9028
|
}>, z.ZodObject<{
|
|
8990
9029
|
type: z.ZodLiteral<"source_component">;
|
|
8991
9030
|
source_component_id: z.ZodString;
|
|
@@ -13119,6 +13158,24 @@ declare const any_circuit_element: z.ZodUnion<[z.ZodObject<{
|
|
|
13119
13158
|
model_stl_url?: string | undefined;
|
|
13120
13159
|
model_3mf_url?: string | undefined;
|
|
13121
13160
|
model_jscad?: any;
|
|
13161
|
+
}>, z.ZodObject<{
|
|
13162
|
+
type: z.ZodLiteral<"simulation_voltage_source">;
|
|
13163
|
+
simulation_voltage_source_id: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
13164
|
+
positive_source_port_id: z.ZodString;
|
|
13165
|
+
negative_source_port_id: z.ZodString;
|
|
13166
|
+
voltage: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
13167
|
+
}, "strip", z.ZodTypeAny, {
|
|
13168
|
+
type: "simulation_voltage_source";
|
|
13169
|
+
voltage: number;
|
|
13170
|
+
simulation_voltage_source_id: string;
|
|
13171
|
+
positive_source_port_id: string;
|
|
13172
|
+
negative_source_port_id: string;
|
|
13173
|
+
}, {
|
|
13174
|
+
type: "simulation_voltage_source";
|
|
13175
|
+
voltage: string | number;
|
|
13176
|
+
positive_source_port_id: string;
|
|
13177
|
+
negative_source_port_id: string;
|
|
13178
|
+
simulation_voltage_source_id?: string | undefined;
|
|
13122
13179
|
}>]>;
|
|
13123
13180
|
/**
|
|
13124
13181
|
* @deprecated use any_circuit_element instead
|
|
@@ -14119,6 +14176,7 @@ declare const any_soup_element: z.ZodUnion<[z.ZodObject<{
|
|
|
14119
14176
|
source_group_id: z.ZodString;
|
|
14120
14177
|
subcircuit_id: z.ZodOptional<z.ZodString>;
|
|
14121
14178
|
parent_subcircuit_id: z.ZodOptional<z.ZodString>;
|
|
14179
|
+
parent_source_group_id: z.ZodOptional<z.ZodString>;
|
|
14122
14180
|
is_subcircuit: z.ZodOptional<z.ZodBoolean>;
|
|
14123
14181
|
name: z.ZodOptional<z.ZodString>;
|
|
14124
14182
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -14128,6 +14186,7 @@ declare const any_soup_element: z.ZodUnion<[z.ZodObject<{
|
|
|
14128
14186
|
subcircuit_id?: string | undefined;
|
|
14129
14187
|
is_subcircuit?: boolean | undefined;
|
|
14130
14188
|
parent_subcircuit_id?: string | undefined;
|
|
14189
|
+
parent_source_group_id?: string | undefined;
|
|
14131
14190
|
}, {
|
|
14132
14191
|
type: "source_group";
|
|
14133
14192
|
source_group_id: string;
|
|
@@ -14135,6 +14194,7 @@ declare const any_soup_element: z.ZodUnion<[z.ZodObject<{
|
|
|
14135
14194
|
subcircuit_id?: string | undefined;
|
|
14136
14195
|
is_subcircuit?: boolean | undefined;
|
|
14137
14196
|
parent_subcircuit_id?: string | undefined;
|
|
14197
|
+
parent_source_group_id?: string | undefined;
|
|
14138
14198
|
}>, z.ZodObject<{
|
|
14139
14199
|
type: z.ZodLiteral<"source_component">;
|
|
14140
14200
|
source_component_id: z.ZodString;
|
|
@@ -18268,6 +18328,24 @@ declare const any_soup_element: z.ZodUnion<[z.ZodObject<{
|
|
|
18268
18328
|
model_stl_url?: string | undefined;
|
|
18269
18329
|
model_3mf_url?: string | undefined;
|
|
18270
18330
|
model_jscad?: any;
|
|
18331
|
+
}>, z.ZodObject<{
|
|
18332
|
+
type: z.ZodLiteral<"simulation_voltage_source">;
|
|
18333
|
+
simulation_voltage_source_id: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
18334
|
+
positive_source_port_id: z.ZodString;
|
|
18335
|
+
negative_source_port_id: z.ZodString;
|
|
18336
|
+
voltage: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
18337
|
+
}, "strip", z.ZodTypeAny, {
|
|
18338
|
+
type: "simulation_voltage_source";
|
|
18339
|
+
voltage: number;
|
|
18340
|
+
simulation_voltage_source_id: string;
|
|
18341
|
+
positive_source_port_id: string;
|
|
18342
|
+
negative_source_port_id: string;
|
|
18343
|
+
}, {
|
|
18344
|
+
type: "simulation_voltage_source";
|
|
18345
|
+
voltage: string | number;
|
|
18346
|
+
positive_source_port_id: string;
|
|
18347
|
+
negative_source_port_id: string;
|
|
18348
|
+
simulation_voltage_source_id?: string | undefined;
|
|
18271
18349
|
}>]>;
|
|
18272
18350
|
type AnyCircuitElement = z.infer<typeof any_circuit_element>;
|
|
18273
18351
|
type AnyCircuitElementInput = z.input<typeof any_circuit_element>;
|
|
@@ -18285,4 +18363,4 @@ type AnySoupElementInput = AnyCircuitElementInput;
|
|
|
18285
18363
|
*/
|
|
18286
18364
|
type CircuitJson = AnyCircuitElement[];
|
|
18287
18365
|
|
|
18288
|
-
export { type AnyCircuitElement, type AnyCircuitElementInput, type AnySoupElement, type AnySoupElementInput, type AnySourceComponent, type AnySourceElement, type CadComponent, type CadComponentInput, type CircuitJson, type CircuitJsonError, type Distance, type InferredProjectMetadata, type InferredSchematicNetLabel, type InputPoint, type InputPosition, type InputRotation, type LayerRef, type LayerRefInput, type Length, type 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 PCBVia, type PcbAutoroutingError, type PcbAutoroutingErrorInput, type PcbAutoroutingErrorInterface, type PcbBoard, type PcbBoardInput, type PcbBreakoutPoint, type PcbBreakoutPointInput, type PcbCircuitElement, type PcbComponent, type PcbComponentInput, type PcbCutout, type PcbCutoutCircle, type PcbCutoutCircleInput, type PcbCutoutInput, type PcbCutoutPolygon, type PcbCutoutPolygonInput, type PcbCutoutRect, type PcbCutoutRectInput, type PcbFabricationNotePath, type PcbFabricationNotePathInput, type PcbFabricationNoteText, type PcbFabricationNoteTextInput, type 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 PcbManualEditConflictWarning, type PcbManualEditConflictWarningInput, type PcbMissingFootprintError, type PcbMissingFootprintErrorInput, type PcbPlacementError, type PcbPlacementErrorInput, type PcbPlatedHole, type PcbPlatedHoleCircle, type PcbPlatedHoleInput, type PcbPlatedHoleOval, type PcbPort, type PcbPortInput, type PcbPortNotMatchedError, type PcbPortNotMatchedErrorInput, type PcbRouteHint, type PcbRouteHintInput, type PcbRouteHints, type PcbRouteHintsInput, type PcbSilkscreenCircle, type PcbSilkscreenCircleInput, type PcbSilkscreenLine, type PcbSilkscreenLineInput, type PcbSilkscreenOval, type PcbSilkscreenOvalDeprecated, type PcbSilkscreenOvalInput, type PcbSilkscreenPath, type PcbSilkscreenPathDeprecated, type PcbSilkscreenPathInput, type PcbSilkscreenRect, type PcbSilkscreenRectInput, type PcbSilkscreenRectOld, type PcbSilkscreenText, type PcbSilkscreenTextInput, type PcbSmtPad, type PcbSmtPadCircle, type PcbSmtPadPill, type PcbSmtPadPolygon, type PcbSmtPadRect, type PcbSmtPadRotatedRect, type PcbSolderPaste, type PcbSolderPasteCircle, type PcbSolderPasteOval, type PcbSolderPastePill, type PcbSolderPasteRect, type PcbSolderPasteRotatedRect, type PcbText, type PcbTextInput, type PcbThermalSpoke, type PcbThermalSpokeInput, type PcbTrace, type PcbTraceError, type PcbTraceErrorInput, type PcbTraceHint, type PcbTraceHintInput, type PcbTraceInput, type PcbTraceRoutePoint, type PcbTraceRoutePointVia, type PcbTraceRoutePointWire, type PcbVia, type PcbViaInput, type Point, type Point3, type Position, type Rotation, type RouteHintPoint, type RouteHintPointInput, type SchematicBox, type SchematicBoxInput, type SchematicComponent, type SchematicComponentInput, type SchematicDebugLine, type SchematicDebugObject, type SchematicDebugObjectInput, type SchematicDebugPoint, type SchematicDebugRect, type SchematicError, type SchematicErrorInput, type SchematicGroup, type SchematicGroupInput, type SchematicLayoutError, type SchematicLayoutErrorInput, type SchematicLine, type SchematicLineInput, type SchematicManualEditConflictWarning, type SchematicManualEditConflictWarningInput, type SchematicNetLabel, type SchematicNetLabelInput, type SchematicPath, type SchematicPathInput, type SchematicPort, type SchematicPortArrangement, type SchematicPortArrangementBySides, type SchematicPortArrangementBySize, type SchematicPortInput, type SchematicTable, type SchematicTableCell, type SchematicTableCellInput, type SchematicTableInput, type SchematicText, type SchematicTextInput, type SchematicTrace, type SchematicTraceEdge, type SchematicTraceInput, type SchematicVoltageProbe, type SchematicVoltageProbeInput, type Size, type SizeInput, type SourceComponentBase, type SourceFailedToCreateComponentError, type SourceFailedToCreateComponentErrorInput, type SourceGroup, type SourceGroupInput, type SourceMissingPropertyError, type SourceMissingPropertyErrorInput, type SourceNet, type SourceNetInput, type SourcePcbGroundPlane, type SourcePcbGroundPlaneInput, type SourcePort, type SourcePortInput, type SourceProjectMetadata, 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 SourceSimplePotentiometer, type SourceSimplePotentiometerInput, type SourceSimplePowerSource, type SourceSimplePowerSourceInput, type SourceSimplePushButton, type SourceSimplePushButtonInput, type SourceSimpleResistor, type SourceSimpleResistorInput, type SourceSimpleResonator, type SourceSimpleResonatorInput, type SourceSimpleSwitch, type SourceSimpleSwitchInput, type SourceSimpleTestPoint, type SourceSimpleTestPointInput, type SourceSimpleTransistor, type SourceSimpleTransistorInput, type SourceTrace, type SupplierName, type VisibleLayer, type VisibleLayerRef, all_layers, any_circuit_element, any_soup_element, any_source_component, battery_capacity, cad_component, capacitance, current, distance, frequency, getZodPrefixedIdWithDefault, inductance, layer_ref, layer_string, length, ninePointAnchor, pcb_autorouting_error, pcb_board, pcb_breakout_point, pcb_component, pcb_cutout, pcb_cutout_circle, pcb_cutout_polygon, pcb_cutout_rect, pcb_fabrication_note_path, pcb_fabrication_note_text, pcb_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_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_route_point, pcb_trace_route_point_via, pcb_trace_route_point_wire, pcb_via, point, point3, port_arrangement, position, position3, resistance, rotation, route_hint_point, schematic_box, schematic_component, schematic_component_port_arrangement_by_sides, schematic_component_port_arrangement_by_size, schematic_debug_line, schematic_debug_object, schematic_debug_object_base, schematic_debug_point, schematic_debug_rect, schematic_error, schematic_group, schematic_layout_error, schematic_line, schematic_manual_edit_conflict_warning, schematic_net_label, schematic_path, schematic_pin_styles, schematic_port, schematic_table, schematic_table_cell, schematic_text, schematic_trace, schematic_voltage_probe, size, source_component_base, source_failed_to_create_component_error, source_group, source_missing_property_error, source_net, source_pcb_ground_plane, source_port, source_project_metadata, 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_potentiometer, source_simple_power_source, source_simple_push_button, source_simple_resistor, source_simple_resonator, source_simple_switch, source_simple_test_point, source_simple_transistor, source_trace, supplier_name, time, visible_layer, voltage };
|
|
18366
|
+
export { type AnyCircuitElement, type AnyCircuitElementInput, type AnySoupElement, type AnySoupElementInput, type AnySourceComponent, type AnySourceElement, type CadComponent, type CadComponentInput, type CircuitJson, type CircuitJsonError, type Distance, type InferredProjectMetadata, type InferredSchematicNetLabel, type InputPoint, type InputPosition, type InputRotation, type LayerRef, type LayerRefInput, type Length, type 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 PCBVia, type PcbAutoroutingError, type PcbAutoroutingErrorInput, type PcbAutoroutingErrorInterface, type PcbBoard, type PcbBoardInput, type PcbBreakoutPoint, type PcbBreakoutPointInput, type PcbCircuitElement, type PcbComponent, type PcbComponentInput, type PcbCutout, type PcbCutoutCircle, type PcbCutoutCircleInput, type PcbCutoutInput, type PcbCutoutPolygon, type PcbCutoutPolygonInput, type PcbCutoutRect, type PcbCutoutRectInput, type PcbFabricationNotePath, type PcbFabricationNotePathInput, type PcbFabricationNoteText, type PcbFabricationNoteTextInput, type 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 PcbManualEditConflictWarning, type PcbManualEditConflictWarningInput, type PcbMissingFootprintError, type PcbMissingFootprintErrorInput, type PcbPlacementError, type PcbPlacementErrorInput, type PcbPlatedHole, type PcbPlatedHoleCircle, type PcbPlatedHoleInput, type PcbPlatedHoleOval, type PcbPort, type PcbPortInput, type PcbPortNotMatchedError, type PcbPortNotMatchedErrorInput, type PcbRouteHint, type PcbRouteHintInput, type PcbRouteHints, type PcbRouteHintsInput, type PcbSilkscreenCircle, type PcbSilkscreenCircleInput, type PcbSilkscreenLine, type PcbSilkscreenLineInput, type PcbSilkscreenOval, type PcbSilkscreenOvalDeprecated, type PcbSilkscreenOvalInput, type PcbSilkscreenPath, type PcbSilkscreenPathDeprecated, type PcbSilkscreenPathInput, type PcbSilkscreenRect, type PcbSilkscreenRectInput, type PcbSilkscreenRectOld, type PcbSilkscreenText, type PcbSilkscreenTextInput, type PcbSmtPad, type PcbSmtPadCircle, type PcbSmtPadPill, type PcbSmtPadPolygon, type PcbSmtPadRect, type PcbSmtPadRotatedRect, type PcbSolderPaste, type PcbSolderPasteCircle, type PcbSolderPasteOval, type PcbSolderPastePill, type PcbSolderPasteRect, type PcbSolderPasteRotatedRect, type PcbText, type PcbTextInput, type PcbThermalSpoke, type PcbThermalSpokeInput, type PcbTrace, type PcbTraceError, type PcbTraceErrorInput, type PcbTraceHint, type PcbTraceHintInput, type PcbTraceInput, type PcbTraceRoutePoint, type PcbTraceRoutePointVia, type PcbTraceRoutePointWire, type PcbVia, type PcbViaInput, type Point, type Point3, type Position, type Rotation, type RouteHintPoint, type RouteHintPointInput, type SchematicBox, type SchematicBoxInput, type SchematicComponent, type SchematicComponentInput, type SchematicDebugLine, type SchematicDebugObject, type SchematicDebugObjectInput, type SchematicDebugPoint, type SchematicDebugRect, type SchematicError, type SchematicErrorInput, type SchematicGroup, type SchematicGroupInput, type SchematicLayoutError, type SchematicLayoutErrorInput, type SchematicLine, type SchematicLineInput, type SchematicManualEditConflictWarning, type SchematicManualEditConflictWarningInput, type SchematicNetLabel, type SchematicNetLabelInput, type SchematicPath, type SchematicPathInput, type SchematicPort, type SchematicPortArrangement, type SchematicPortArrangementBySides, type SchematicPortArrangementBySize, type SchematicPortInput, type SchematicTable, type SchematicTableCell, type SchematicTableCellInput, type SchematicTableInput, type SchematicText, type SchematicTextInput, type SchematicTrace, type SchematicTraceEdge, type SchematicTraceInput, type SchematicVoltageProbe, type SchematicVoltageProbeInput, type SimulationVoltageSource, type SimulationVoltageSourceInput, type Size, type SizeInput, type SourceComponentBase, type SourceFailedToCreateComponentError, type SourceFailedToCreateComponentErrorInput, type SourceGroup, type SourceGroupInput, type SourceMissingPropertyError, type SourceMissingPropertyErrorInput, type SourceNet, type SourceNetInput, type SourcePcbGroundPlane, type SourcePcbGroundPlaneInput, type SourcePort, type SourcePortInput, type SourceProjectMetadata, 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 SourceSimplePotentiometer, type SourceSimplePotentiometerInput, type SourceSimplePowerSource, type SourceSimplePowerSourceInput, type SourceSimplePushButton, type SourceSimplePushButtonInput, type SourceSimpleResistor, type SourceSimpleResistorInput, type SourceSimpleResonator, type SourceSimpleResonatorInput, type SourceSimpleSwitch, type SourceSimpleSwitchInput, type SourceSimpleTestPoint, type SourceSimpleTestPointInput, type SourceSimpleTransistor, type SourceSimpleTransistorInput, type SourceTrace, type SupplierName, type VisibleLayer, type VisibleLayerRef, all_layers, any_circuit_element, any_soup_element, any_source_component, battery_capacity, cad_component, capacitance, current, distance, frequency, getZodPrefixedIdWithDefault, inductance, layer_ref, layer_string, length, ninePointAnchor, pcb_autorouting_error, pcb_board, pcb_breakout_point, pcb_component, pcb_cutout, pcb_cutout_circle, pcb_cutout_polygon, pcb_cutout_rect, pcb_fabrication_note_path, pcb_fabrication_note_text, pcb_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_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_route_point, pcb_trace_route_point_via, pcb_trace_route_point_wire, pcb_via, point, point3, port_arrangement, position, position3, resistance, rotation, route_hint_point, schematic_box, schematic_component, schematic_component_port_arrangement_by_sides, schematic_component_port_arrangement_by_size, schematic_debug_line, schematic_debug_object, schematic_debug_object_base, schematic_debug_point, schematic_debug_rect, schematic_error, schematic_group, schematic_layout_error, schematic_line, schematic_manual_edit_conflict_warning, schematic_net_label, schematic_path, schematic_pin_styles, schematic_port, schematic_table, schematic_table_cell, schematic_text, schematic_trace, schematic_voltage_probe, simulation_voltage_source, size, source_component_base, source_failed_to_create_component_error, source_group, source_missing_property_error, source_net, source_pcb_ground_plane, source_port, source_project_metadata, 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_potentiometer, source_simple_power_source, source_simple_push_button, source_simple_resistor, source_simple_resonator, source_simple_switch, source_simple_test_point, source_simple_transistor, source_trace, supplier_name, time, visible_layer, voltage };
|
package/dist/index.mjs
CHANGED
|
@@ -612,6 +612,7 @@ var source_group = z34.object({
|
|
|
612
612
|
source_group_id: z34.string(),
|
|
613
613
|
subcircuit_id: z34.string().optional(),
|
|
614
614
|
parent_subcircuit_id: z34.string().optional(),
|
|
615
|
+
parent_source_group_id: z34.string().optional(),
|
|
615
616
|
is_subcircuit: z34.boolean().optional(),
|
|
616
617
|
name: z34.string().optional()
|
|
617
618
|
});
|
|
@@ -1877,9 +1878,22 @@ var cad_component = z90.object({
|
|
|
1877
1878
|
}).describe("Defines a component on the PCB");
|
|
1878
1879
|
expectTypesMatch(true);
|
|
1879
1880
|
|
|
1880
|
-
// src/
|
|
1881
|
+
// src/simulation/simulation_voltage_source.ts
|
|
1881
1882
|
import { z as z91 } from "zod";
|
|
1882
|
-
var
|
|
1883
|
+
var simulation_voltage_source = z91.object({
|
|
1884
|
+
type: z91.literal("simulation_voltage_source"),
|
|
1885
|
+
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
1886
|
+
"simulation_voltage_source"
|
|
1887
|
+
),
|
|
1888
|
+
positive_source_port_id: z91.string(),
|
|
1889
|
+
negative_source_port_id: z91.string(),
|
|
1890
|
+
voltage
|
|
1891
|
+
}).describe("Defines a voltage source for simulation");
|
|
1892
|
+
expectTypesMatch(true);
|
|
1893
|
+
|
|
1894
|
+
// src/any_circuit_element.ts
|
|
1895
|
+
import { z as z92 } from "zod";
|
|
1896
|
+
var any_circuit_element = z92.union([
|
|
1883
1897
|
source_trace,
|
|
1884
1898
|
source_port,
|
|
1885
1899
|
any_source_component,
|
|
@@ -1952,7 +1966,8 @@ var any_circuit_element = z91.union([
|
|
|
1952
1966
|
schematic_group,
|
|
1953
1967
|
schematic_table,
|
|
1954
1968
|
schematic_table_cell,
|
|
1955
|
-
cad_component
|
|
1969
|
+
cad_component,
|
|
1970
|
+
simulation_voltage_source
|
|
1956
1971
|
]);
|
|
1957
1972
|
var any_soup_element = any_circuit_element;
|
|
1958
1973
|
expectTypesMatch(true);
|
|
@@ -2049,6 +2064,7 @@ export {
|
|
|
2049
2064
|
schematic_text,
|
|
2050
2065
|
schematic_trace,
|
|
2051
2066
|
schematic_voltage_probe,
|
|
2067
|
+
simulation_voltage_source,
|
|
2052
2068
|
size,
|
|
2053
2069
|
source_component_base,
|
|
2054
2070
|
source_failed_to_create_component_error,
|