circuit-json 0.0.269 → 0.0.270
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 +15 -14
- package/dist/index.d.mts +35 -32
- package/dist/index.mjs +30 -13
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -182,19 +182,20 @@ table below. In this case `{ max_trace_length: 100 }` is equivalent.
|
|
|
182
182
|
|
|
183
183
|
The default units when reading a number are defined as follows:
|
|
184
184
|
|
|
185
|
-
| Measurement Type | Base Unit | Description
|
|
186
|
-
| ---------------- | --------- |
|
|
187
|
-
| Length | mm | Millimeters
|
|
188
|
-
|
|
|
189
|
-
|
|
|
190
|
-
|
|
|
191
|
-
|
|
|
192
|
-
|
|
|
193
|
-
|
|
|
194
|
-
|
|
|
195
|
-
|
|
|
196
|
-
|
|
|
197
|
-
|
|
|
185
|
+
| Measurement Type | Base Unit | Description |
|
|
186
|
+
| ---------------- | --------- | ------------------ |
|
|
187
|
+
| Length | mm | Millimeters |
|
|
188
|
+
| Duration | ms | Milliseconds |
|
|
189
|
+
| Timestamp | string | ISO 8601 Timestamp |
|
|
190
|
+
| Mass | g | Grams |
|
|
191
|
+
| Angle | deg | Degrees |
|
|
192
|
+
| Frequency | Hz | Hertz |
|
|
193
|
+
| Volume | ml | Milliliters |
|
|
194
|
+
| Voltage | V | Volts |
|
|
195
|
+
| Current | A | Amperes |
|
|
196
|
+
| Resistance | Ω | Ohms |
|
|
197
|
+
| Capacitance | F | Farads |
|
|
198
|
+
| Inductance | H | Henries |
|
|
198
199
|
|
|
199
200
|
## Element Prefixes
|
|
200
201
|
|
|
@@ -2184,7 +2185,7 @@ interface SimulationTransientVoltageGraph {
|
|
|
2184
2185
|
timestamps_ms?: number[]
|
|
2185
2186
|
voltage_levels: number[]
|
|
2186
2187
|
schematic_voltage_probe_id?: string
|
|
2187
|
-
|
|
2188
|
+
subcircuit_connectivity_map_key?: string
|
|
2188
2189
|
time_per_step: number
|
|
2189
2190
|
start_time_ms: number
|
|
2190
2191
|
end_time_ms: number
|
package/dist/index.d.mts
CHANGED
|
@@ -13,7 +13,10 @@ type Length = number;
|
|
|
13
13
|
type Distance = number;
|
|
14
14
|
declare const distance: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
15
15
|
declare const current: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
16
|
+
declare const duration_ms: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
16
17
|
declare const time: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
18
|
+
declare const ms: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
19
|
+
declare const timestamp: z.ZodString;
|
|
17
20
|
/**
|
|
18
21
|
* Rotation is always converted to degrees
|
|
19
22
|
*/
|
|
@@ -6350,8 +6353,8 @@ declare const schematic_text: z.ZodObject<{
|
|
|
6350
6353
|
color: z.ZodDefault<z.ZodString>;
|
|
6351
6354
|
subcircuit_id: z.ZodOptional<z.ZodString>;
|
|
6352
6355
|
}, "strip", z.ZodTypeAny, {
|
|
6353
|
-
anchor: "top" | "bottom" | "center" | "top_left" | "top_center" | "top_right" | "center_left" | "center_right" | "bottom_left" | "bottom_center" | "bottom_right" | "left" | "right";
|
|
6354
6356
|
type: "schematic_text";
|
|
6357
|
+
anchor: "top" | "bottom" | "center" | "top_left" | "top_center" | "top_right" | "center_left" | "center_right" | "bottom_left" | "bottom_center" | "bottom_right" | "left" | "right";
|
|
6355
6358
|
rotation: number;
|
|
6356
6359
|
text: string;
|
|
6357
6360
|
font_size: number;
|
|
@@ -10212,7 +10215,7 @@ interface SimulationTransientVoltageGraph {
|
|
|
10212
10215
|
timestamps_ms?: number[];
|
|
10213
10216
|
voltage_levels: number[];
|
|
10214
10217
|
schematic_voltage_probe_id?: string;
|
|
10215
|
-
|
|
10218
|
+
subcircuit_connectivity_map_key?: string;
|
|
10216
10219
|
time_per_step: number;
|
|
10217
10220
|
start_time_ms: number;
|
|
10218
10221
|
end_time_ms: number;
|
|
@@ -10225,10 +10228,10 @@ declare const simulation_transient_voltage_graph: z.ZodObject<{
|
|
|
10225
10228
|
timestamps_ms: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
10226
10229
|
voltage_levels: z.ZodArray<z.ZodNumber, "many">;
|
|
10227
10230
|
schematic_voltage_probe_id: z.ZodOptional<z.ZodString>;
|
|
10228
|
-
|
|
10229
|
-
time_per_step: z.ZodNumber
|
|
10230
|
-
start_time_ms: z.ZodNumber
|
|
10231
|
-
end_time_ms: z.ZodNumber
|
|
10231
|
+
subcircuit_connectivity_map_key: z.ZodOptional<z.ZodString>;
|
|
10232
|
+
time_per_step: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
10233
|
+
start_time_ms: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
10234
|
+
end_time_ms: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
10232
10235
|
name: z.ZodOptional<z.ZodString>;
|
|
10233
10236
|
}, "strip", z.ZodTypeAny, {
|
|
10234
10237
|
type: "simulation_transient_voltage_graph";
|
|
@@ -10239,21 +10242,21 @@ declare const simulation_transient_voltage_graph: z.ZodObject<{
|
|
|
10239
10242
|
start_time_ms: number;
|
|
10240
10243
|
end_time_ms: number;
|
|
10241
10244
|
name?: string | undefined;
|
|
10245
|
+
subcircuit_connectivity_map_key?: string | undefined;
|
|
10242
10246
|
schematic_voltage_probe_id?: string | undefined;
|
|
10243
10247
|
timestamps_ms?: number[] | undefined;
|
|
10244
|
-
subcircuit_connecivity_map_key?: string | undefined;
|
|
10245
10248
|
}, {
|
|
10246
10249
|
type: "simulation_transient_voltage_graph";
|
|
10247
10250
|
simulation_experiment_id: string;
|
|
10248
10251
|
voltage_levels: number[];
|
|
10249
|
-
time_per_step: number;
|
|
10250
|
-
start_time_ms: number;
|
|
10251
|
-
end_time_ms: number;
|
|
10252
|
+
time_per_step: string | number;
|
|
10253
|
+
start_time_ms: string | number;
|
|
10254
|
+
end_time_ms: string | number;
|
|
10252
10255
|
name?: string | undefined;
|
|
10256
|
+
subcircuit_connectivity_map_key?: string | undefined;
|
|
10253
10257
|
schematic_voltage_probe_id?: string | undefined;
|
|
10254
10258
|
simulation_transient_voltage_graph_id?: string | undefined;
|
|
10255
10259
|
timestamps_ms?: number[] | undefined;
|
|
10256
|
-
subcircuit_connecivity_map_key?: string | undefined;
|
|
10257
10260
|
}>;
|
|
10258
10261
|
type SimulationTransientVoltageGraphInput = z.input<typeof simulation_transient_voltage_graph>;
|
|
10259
10262
|
|
|
@@ -15353,8 +15356,8 @@ declare const any_circuit_element: z.ZodUnion<[z.ZodObject<{
|
|
|
15353
15356
|
color: z.ZodDefault<z.ZodString>;
|
|
15354
15357
|
subcircuit_id: z.ZodOptional<z.ZodString>;
|
|
15355
15358
|
}, "strip", z.ZodTypeAny, {
|
|
15356
|
-
anchor: "top" | "bottom" | "center" | "top_left" | "top_center" | "top_right" | "center_left" | "center_right" | "bottom_left" | "bottom_center" | "bottom_right" | "left" | "right";
|
|
15357
15359
|
type: "schematic_text";
|
|
15360
|
+
anchor: "top" | "bottom" | "center" | "top_left" | "top_center" | "top_right" | "center_left" | "center_right" | "bottom_left" | "bottom_center" | "bottom_right" | "left" | "right";
|
|
15358
15361
|
rotation: number;
|
|
15359
15362
|
text: string;
|
|
15360
15363
|
font_size: number;
|
|
@@ -16729,10 +16732,10 @@ declare const any_circuit_element: z.ZodUnion<[z.ZodObject<{
|
|
|
16729
16732
|
timestamps_ms: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
16730
16733
|
voltage_levels: z.ZodArray<z.ZodNumber, "many">;
|
|
16731
16734
|
schematic_voltage_probe_id: z.ZodOptional<z.ZodString>;
|
|
16732
|
-
|
|
16733
|
-
time_per_step: z.ZodNumber
|
|
16734
|
-
start_time_ms: z.ZodNumber
|
|
16735
|
-
end_time_ms: z.ZodNumber
|
|
16735
|
+
subcircuit_connectivity_map_key: z.ZodOptional<z.ZodString>;
|
|
16736
|
+
time_per_step: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
16737
|
+
start_time_ms: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
16738
|
+
end_time_ms: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
16736
16739
|
name: z.ZodOptional<z.ZodString>;
|
|
16737
16740
|
}, "strip", z.ZodTypeAny, {
|
|
16738
16741
|
type: "simulation_transient_voltage_graph";
|
|
@@ -16743,21 +16746,21 @@ declare const any_circuit_element: z.ZodUnion<[z.ZodObject<{
|
|
|
16743
16746
|
start_time_ms: number;
|
|
16744
16747
|
end_time_ms: number;
|
|
16745
16748
|
name?: string | undefined;
|
|
16749
|
+
subcircuit_connectivity_map_key?: string | undefined;
|
|
16746
16750
|
schematic_voltage_probe_id?: string | undefined;
|
|
16747
16751
|
timestamps_ms?: number[] | undefined;
|
|
16748
|
-
subcircuit_connecivity_map_key?: string | undefined;
|
|
16749
16752
|
}, {
|
|
16750
16753
|
type: "simulation_transient_voltage_graph";
|
|
16751
16754
|
simulation_experiment_id: string;
|
|
16752
16755
|
voltage_levels: number[];
|
|
16753
|
-
time_per_step: number;
|
|
16754
|
-
start_time_ms: number;
|
|
16755
|
-
end_time_ms: number;
|
|
16756
|
+
time_per_step: string | number;
|
|
16757
|
+
start_time_ms: string | number;
|
|
16758
|
+
end_time_ms: string | number;
|
|
16756
16759
|
name?: string | undefined;
|
|
16760
|
+
subcircuit_connectivity_map_key?: string | undefined;
|
|
16757
16761
|
schematic_voltage_probe_id?: string | undefined;
|
|
16758
16762
|
simulation_transient_voltage_graph_id?: string | undefined;
|
|
16759
16763
|
timestamps_ms?: number[] | undefined;
|
|
16760
|
-
subcircuit_connecivity_map_key?: string | undefined;
|
|
16761
16764
|
}>]>;
|
|
16762
16765
|
/**
|
|
16763
16766
|
* @deprecated use any_circuit_element instead
|
|
@@ -21826,8 +21829,8 @@ declare const any_soup_element: z.ZodUnion<[z.ZodObject<{
|
|
|
21826
21829
|
color: z.ZodDefault<z.ZodString>;
|
|
21827
21830
|
subcircuit_id: z.ZodOptional<z.ZodString>;
|
|
21828
21831
|
}, "strip", z.ZodTypeAny, {
|
|
21829
|
-
anchor: "top" | "bottom" | "center" | "top_left" | "top_center" | "top_right" | "center_left" | "center_right" | "bottom_left" | "bottom_center" | "bottom_right" | "left" | "right";
|
|
21830
21832
|
type: "schematic_text";
|
|
21833
|
+
anchor: "top" | "bottom" | "center" | "top_left" | "top_center" | "top_right" | "center_left" | "center_right" | "bottom_left" | "bottom_center" | "bottom_right" | "left" | "right";
|
|
21831
21834
|
rotation: number;
|
|
21832
21835
|
text: string;
|
|
21833
21836
|
font_size: number;
|
|
@@ -23202,10 +23205,10 @@ declare const any_soup_element: z.ZodUnion<[z.ZodObject<{
|
|
|
23202
23205
|
timestamps_ms: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
23203
23206
|
voltage_levels: z.ZodArray<z.ZodNumber, "many">;
|
|
23204
23207
|
schematic_voltage_probe_id: z.ZodOptional<z.ZodString>;
|
|
23205
|
-
|
|
23206
|
-
time_per_step: z.ZodNumber
|
|
23207
|
-
start_time_ms: z.ZodNumber
|
|
23208
|
-
end_time_ms: z.ZodNumber
|
|
23208
|
+
subcircuit_connectivity_map_key: z.ZodOptional<z.ZodString>;
|
|
23209
|
+
time_per_step: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
23210
|
+
start_time_ms: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
23211
|
+
end_time_ms: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
23209
23212
|
name: z.ZodOptional<z.ZodString>;
|
|
23210
23213
|
}, "strip", z.ZodTypeAny, {
|
|
23211
23214
|
type: "simulation_transient_voltage_graph";
|
|
@@ -23216,21 +23219,21 @@ declare const any_soup_element: z.ZodUnion<[z.ZodObject<{
|
|
|
23216
23219
|
start_time_ms: number;
|
|
23217
23220
|
end_time_ms: number;
|
|
23218
23221
|
name?: string | undefined;
|
|
23222
|
+
subcircuit_connectivity_map_key?: string | undefined;
|
|
23219
23223
|
schematic_voltage_probe_id?: string | undefined;
|
|
23220
23224
|
timestamps_ms?: number[] | undefined;
|
|
23221
|
-
subcircuit_connecivity_map_key?: string | undefined;
|
|
23222
23225
|
}, {
|
|
23223
23226
|
type: "simulation_transient_voltage_graph";
|
|
23224
23227
|
simulation_experiment_id: string;
|
|
23225
23228
|
voltage_levels: number[];
|
|
23226
|
-
time_per_step: number;
|
|
23227
|
-
start_time_ms: number;
|
|
23228
|
-
end_time_ms: number;
|
|
23229
|
+
time_per_step: string | number;
|
|
23230
|
+
start_time_ms: string | number;
|
|
23231
|
+
end_time_ms: string | number;
|
|
23229
23232
|
name?: string | undefined;
|
|
23233
|
+
subcircuit_connectivity_map_key?: string | undefined;
|
|
23230
23234
|
schematic_voltage_probe_id?: string | undefined;
|
|
23231
23235
|
simulation_transient_voltage_graph_id?: string | undefined;
|
|
23232
23236
|
timestamps_ms?: number[] | undefined;
|
|
23233
|
-
subcircuit_connecivity_map_key?: string | undefined;
|
|
23234
23237
|
}>]>;
|
|
23235
23238
|
type AnyCircuitElement = z.infer<typeof any_circuit_element>;
|
|
23236
23239
|
type AnyCircuitElementInput = z.input<typeof any_circuit_element>;
|
|
@@ -23248,4 +23251,4 @@ type AnySoupElementInput = AnyCircuitElementInput;
|
|
|
23248
23251
|
*/
|
|
23249
23252
|
type CircuitJson = AnyCircuitElement[];
|
|
23250
23253
|
|
|
23251
|
-
export { type AnyCircuitElement, type AnyCircuitElementInput, type AnySoupElement, type AnySoupElementInput, type AnySourceComponent, type AnySourceElement, type BRepShape, type CadComponent, type CadComponentInput, type CircuitJson, type CircuitJsonError, type CircuitJsonFootprintLoadError, type CircuitJsonFootprintLoadErrorInput, type Distance, type ExperimentType, 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 PcbNet, type PcbNetInput, 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 PcbViaClearanceError, type PcbViaClearanceErrorInput, type PcbViaInput, type Point, type Point3, type PointWithBulge, type Position, type Ring, type Rotation, type RouteHintPoint, type RouteHintPointInput, type SchematicArc, type SchematicArcInput, type SchematicBox, type SchematicBoxInput, type SchematicCircle, type SchematicCircleInput, 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 SchematicRect, type SchematicRectInput, 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 SimulationExperiment, type SimulationExperimentInput, type SimulationSwitch, type SimulationSwitchInput, type SimulationTransientVoltageGraph, type SimulationTransientVoltageGraphInput, 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, circuit_json_footprint_load_error, current, distance, experiment_type, 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_net, 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, pcb_via_clearance_error, point, point3, point_with_bulge, port_arrangement, position, position3, resistance, ring, rotation, route_hint_point, schematic_arc, schematic_box, schematic_circle, 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_rect, schematic_table, schematic_table_cell, schematic_text, schematic_trace, schematic_voltage_probe, simulation_ac_voltage_source, simulation_dc_voltage_source, simulation_experiment, simulation_switch, simulation_transient_voltage_graph, 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 };
|
|
23254
|
+
export { type AnyCircuitElement, type AnyCircuitElementInput, type AnySoupElement, type AnySoupElementInput, type AnySourceComponent, type AnySourceElement, type BRepShape, type CadComponent, type CadComponentInput, type CircuitJson, type CircuitJsonError, type CircuitJsonFootprintLoadError, type CircuitJsonFootprintLoadErrorInput, type Distance, type ExperimentType, 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 PcbNet, type PcbNetInput, 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 PcbViaClearanceError, type PcbViaClearanceErrorInput, type PcbViaInput, type Point, type Point3, type PointWithBulge, type Position, type Ring, type Rotation, type RouteHintPoint, type RouteHintPointInput, type SchematicArc, type SchematicArcInput, type SchematicBox, type SchematicBoxInput, type SchematicCircle, type SchematicCircleInput, 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 SchematicRect, type SchematicRectInput, 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 SimulationExperiment, type SimulationExperimentInput, type SimulationSwitch, type SimulationSwitchInput, type SimulationTransientVoltageGraph, type SimulationTransientVoltageGraphInput, 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, circuit_json_footprint_load_error, current, distance, duration_ms, experiment_type, external_footprint_load_error, frequency, getZodPrefixedIdWithDefault, inductance, layer_ref, layer_string, length, ms, 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_net, 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, pcb_via_clearance_error, point, point3, point_with_bulge, port_arrangement, position, position3, resistance, ring, rotation, route_hint_point, schematic_arc, schematic_box, schematic_circle, 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_rect, schematic_table, schematic_table_cell, schematic_text, schematic_trace, schematic_voltage_probe, simulation_ac_voltage_source, simulation_dc_voltage_source, simulation_experiment, simulation_switch, simulation_transient_voltage_graph, 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, timestamp, visible_layer, voltage, wave_shape };
|
package/dist/index.mjs
CHANGED
|
@@ -80,6 +80,12 @@ var unitMappings = {
|
|
|
80
80
|
ms: {
|
|
81
81
|
baseUnit: "ms",
|
|
82
82
|
variants: {
|
|
83
|
+
fs: 1e-12,
|
|
84
|
+
ps: 1e-9,
|
|
85
|
+
ns: 1e-6,
|
|
86
|
+
us: 1e-3,
|
|
87
|
+
\u00B5s: 1e-3,
|
|
88
|
+
ms: 1,
|
|
83
89
|
s: 1e3
|
|
84
90
|
}
|
|
85
91
|
},
|
|
@@ -148,8 +154,8 @@ var si_prefix_multiplier = {
|
|
|
148
154
|
pico: 1e-12,
|
|
149
155
|
p: 1e-12
|
|
150
156
|
};
|
|
151
|
-
|
|
152
|
-
if (
|
|
157
|
+
function parseAndConvertSiUnit(v) {
|
|
158
|
+
if (v === void 0 || v === null)
|
|
153
159
|
return { parsedUnit: null, unitOfValue: null, value: null };
|
|
154
160
|
if (typeof v === "string" && v.match(/^-?[\d\.]+$/))
|
|
155
161
|
return {
|
|
@@ -161,12 +167,17 @@ var parseAndConvertSiUnit = (v) => {
|
|
|
161
167
|
return { value: v, parsedUnit: null, unitOfValue: null };
|
|
162
168
|
if (typeof v === "object" && "x" in v && "y" in v) {
|
|
163
169
|
const { parsedUnit, unitOfValue } = parseAndConvertSiUnit(v.x);
|
|
170
|
+
const xResult = parseAndConvertSiUnit(v.x);
|
|
171
|
+
const yResult = parseAndConvertSiUnit(v.y);
|
|
172
|
+
if (xResult.value === null || yResult.value === null) {
|
|
173
|
+
return { parsedUnit: null, unitOfValue: null, value: null };
|
|
174
|
+
}
|
|
164
175
|
return {
|
|
165
176
|
parsedUnit,
|
|
166
177
|
unitOfValue,
|
|
167
178
|
value: {
|
|
168
|
-
x:
|
|
169
|
-
y:
|
|
179
|
+
x: xResult.value,
|
|
180
|
+
y: yResult.value
|
|
170
181
|
}
|
|
171
182
|
};
|
|
172
183
|
}
|
|
@@ -191,7 +202,7 @@ var parseAndConvertSiUnit = (v) => {
|
|
|
191
202
|
unitOfValue: baseUnit,
|
|
192
203
|
value: conversionFactor * Number.parseFloat(numberPart)
|
|
193
204
|
};
|
|
194
|
-
}
|
|
205
|
+
}
|
|
195
206
|
|
|
196
207
|
// src/units/index.ts
|
|
197
208
|
import { z } from "zod";
|
|
@@ -205,7 +216,10 @@ var length = z.string().or(z.number()).transform((v) => parseAndConvertSiUnit(v)
|
|
|
205
216
|
var frequency = z.string().or(z.number()).transform((v) => parseAndConvertSiUnit(v).value);
|
|
206
217
|
var distance = length;
|
|
207
218
|
var current = z.string().or(z.number()).transform((v) => parseAndConvertSiUnit(v).value);
|
|
208
|
-
var
|
|
219
|
+
var duration_ms = z.string().or(z.number()).transform((v) => parseAndConvertSiUnit(v).value);
|
|
220
|
+
var time = duration_ms;
|
|
221
|
+
var ms = duration_ms;
|
|
222
|
+
var timestamp = z.string().datetime();
|
|
209
223
|
var rotation = z.string().or(z.number()).transform((arg) => {
|
|
210
224
|
if (typeof arg === "number") return arg;
|
|
211
225
|
if (arg.endsWith("deg")) {
|
|
@@ -520,7 +534,7 @@ var source_project_metadata = z29.object({
|
|
|
520
534
|
name: z29.string().optional(),
|
|
521
535
|
software_used_string: z29.string().optional(),
|
|
522
536
|
project_url: z29.string().optional(),
|
|
523
|
-
created_at:
|
|
537
|
+
created_at: timestamp.optional()
|
|
524
538
|
});
|
|
525
539
|
expectTypesMatch(true);
|
|
526
540
|
|
|
@@ -2363,10 +2377,10 @@ var simulation_transient_voltage_graph = z110.object({
|
|
|
2363
2377
|
timestamps_ms: z110.array(z110.number()).optional(),
|
|
2364
2378
|
voltage_levels: z110.array(z110.number()),
|
|
2365
2379
|
schematic_voltage_probe_id: z110.string().optional(),
|
|
2366
|
-
|
|
2367
|
-
time_per_step:
|
|
2368
|
-
start_time_ms:
|
|
2369
|
-
end_time_ms:
|
|
2380
|
+
subcircuit_connectivity_map_key: z110.string().optional(),
|
|
2381
|
+
time_per_step: duration_ms,
|
|
2382
|
+
start_time_ms: ms,
|
|
2383
|
+
end_time_ms: ms,
|
|
2370
2384
|
name: z110.string().optional()
|
|
2371
2385
|
}).describe("Stores voltage measurements over time for a simulation");
|
|
2372
2386
|
expectTypesMatch(true);
|
|
@@ -2376,8 +2390,8 @@ import { z as z111 } from "zod";
|
|
|
2376
2390
|
var simulation_switch = z111.object({
|
|
2377
2391
|
type: z111.literal("simulation_switch"),
|
|
2378
2392
|
simulation_switch_id: getZodPrefixedIdWithDefault("simulation_switch"),
|
|
2379
|
-
closes_at:
|
|
2380
|
-
opens_at:
|
|
2393
|
+
closes_at: ms.optional(),
|
|
2394
|
+
opens_at: ms.optional(),
|
|
2381
2395
|
starts_closed: z111.boolean().optional(),
|
|
2382
2396
|
switching_frequency: frequency.optional()
|
|
2383
2397
|
}).describe("Defines a switch for simulation timing control");
|
|
@@ -2493,6 +2507,7 @@ export {
|
|
|
2493
2507
|
circuit_json_footprint_load_error,
|
|
2494
2508
|
current,
|
|
2495
2509
|
distance,
|
|
2510
|
+
duration_ms,
|
|
2496
2511
|
experiment_type,
|
|
2497
2512
|
external_footprint_load_error,
|
|
2498
2513
|
frequency,
|
|
@@ -2501,6 +2516,7 @@ export {
|
|
|
2501
2516
|
layer_ref,
|
|
2502
2517
|
layer_string,
|
|
2503
2518
|
length,
|
|
2519
|
+
ms,
|
|
2504
2520
|
ninePointAnchor,
|
|
2505
2521
|
pcb_autorouting_error,
|
|
2506
2522
|
pcb_board,
|
|
@@ -2632,6 +2648,7 @@ export {
|
|
|
2632
2648
|
source_trace_not_connected_error,
|
|
2633
2649
|
supplier_name,
|
|
2634
2650
|
time,
|
|
2651
|
+
timestamp,
|
|
2635
2652
|
visible_layer,
|
|
2636
2653
|
voltage,
|
|
2637
2654
|
wave_shape
|