1export const GENERIC_LANGUAGE_ID = 'diagram-source'2export const JSON5_LANGUAGE_ID = 'diagram-json5'34const strictJsonTypes = new Set(['excalidraw', 'vega', 'vegalite'])5const xmlTypes = new Set(['bpmn', 'diagramsnet', 'umlet'])67export function editorLanguageFor(type) {8 if (strictJsonTypes.has(type)) return 'json'9 if (xmlTypes.has(type)) return 'xml'10 if (type === 'wireviz') return 'yaml'11 if (type === 'dbml') return 'sql'12 if (type === 'bytefield') return 'clojure'13 if (type === 'wavedrom') return JSON5_LANGUAGE_ID14 return GENERIC_LANGUAGE_ID15}