@tscircuit/cli 0.1.1739 → 0.1.1740
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/dist/cli/build/build.worker.js +15 -9
- package/dist/cli/main.js +659 -283
- package/dist/cli/snapshot/snapshot.worker.js +15 -9
- package/dist/lib/index.js +8 -7
- package/package.json +8 -7
|
@@ -15661,20 +15661,26 @@ async function loadLocalStepModelFsMap(circuitJson) {
|
|
|
15661
15661
|
import {
|
|
15662
15662
|
convertCircuitJsonToSchematicSimulationSvg,
|
|
15663
15663
|
convertCircuitJsonToSimulationGraphSvg,
|
|
15664
|
-
isSimulationExperiment
|
|
15665
|
-
isSimulationTransientVoltageGraph
|
|
15664
|
+
isSimulationExperiment
|
|
15666
15665
|
} from "circuit-to-svg";
|
|
15667
|
-
var
|
|
15666
|
+
var SIMULATION_ANALYSIS_RESULT_TYPES = new Set([
|
|
15667
|
+
"simulation_transient_voltage_graph",
|
|
15668
|
+
"simulation_transient_current_graph",
|
|
15669
|
+
"simulation_dc_operating_point_voltage",
|
|
15670
|
+
"simulation_dc_operating_point_current",
|
|
15671
|
+
"simulation_dc_sweep_voltage_graph",
|
|
15672
|
+
"simulation_dc_sweep_current_graph",
|
|
15673
|
+
"simulation_ac_sweep_voltage_graph",
|
|
15674
|
+
"simulation_ac_sweep_current_graph"
|
|
15675
|
+
]);
|
|
15676
|
+
var isSimulationAnalysisResult = (element) => SIMULATION_ANALYSIS_RESULT_TYPES.has(element.type);
|
|
15668
15677
|
var getSimulationSvgInputs = (circuitJson, simulationExperimentId) => {
|
|
15669
|
-
const
|
|
15670
|
-
|
|
15671
|
-
if (simulationTransientCurrentGraphIds.length === 0 && simulationTransientVoltageGraphIds.length === 0) {
|
|
15678
|
+
const hasAnalysisResult = circuitJson.some((element) => isSimulationAnalysisResult(element) && element.simulation_experiment_id === simulationExperimentId);
|
|
15679
|
+
if (!hasAnalysisResult) {
|
|
15672
15680
|
return;
|
|
15673
15681
|
}
|
|
15674
15682
|
return {
|
|
15675
|
-
simulation_experiment_id: simulationExperimentId
|
|
15676
|
-
simulation_transient_current_graph_ids: simulationTransientCurrentGraphIds,
|
|
15677
|
-
simulation_transient_voltage_graph_ids: simulationTransientVoltageGraphIds
|
|
15683
|
+
simulation_experiment_id: simulationExperimentId
|
|
15678
15684
|
};
|
|
15679
15685
|
};
|
|
15680
15686
|
var toFileNameSuffix = (value) => value.trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
|