Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export const xstateToSvg = (description: MachineConfig) => {
const smcDescription = xstateToSmcDescription(description);
// console.log(JSON.stringify(smcDescription, null, 2));
const svg = render(smcDescription, {
inputType: 'json',
outputType: 'svg',
});
return svg;
};
export function stateMachineVHDL(code) {
const smcat = require("state-machine-cat")
try {
var go = getSvgStateMachine(code);
var lSVGInAString = smcat.render(go);
var view = new InitProjectView();
var panel = atom.workspace.addBottomPanel({item: view.getElement()});
svg.outerHTML += lSVGInAString
//-- Cancel button pressed: finish
view.handleCancel = () => panel.destroy();
} catch (pError) {
atom.notifications.addInfo("This is an experimental feature. Sorry, this state machine is not supported.")
}
}