import { I as VisualGraph, z as VisualGraphFormatConverter } from "../../types-BAEQTwK_.mjs"; import { ElkEdge, ElkEdgeSection, ElkExtendedEdge, ElkGraphElement, ElkLabel, ElkNode, ElkNode as ElkNode$1, ElkPoint, ElkPort, ElkPrimitiveEdge, ElkShape, LayoutOptions } from "elkjs/lib/elk-api"; //#region src/formats/elk/index.d.ts /** * Converts a visual graph to ELK JSON format. * * @example * ```ts * import { createVisualGraph } from '@statelyai/graph'; * import { toELK } from '@statelyai/graph/elk'; * * const graph = createVisualGraph({ * nodes: [ * { id: 'a', x: 0, y: 0, width: 100, height: 50 }, * { id: 'b', x: 200, y: 0, width: 100, height: 50 }, * ], * edges: [{ id: 'e1', sourceId: 'a', targetId: 'b' }], * }); * * const elk = toELK(graph); * // { id: '', children: [...], edges: [...] } * ``` */ declare function toELK(graph: VisualGraph): ElkNode$1; /** * Parses an ELK JSON node into a visual graph. * * @example * ```ts * import { fromELK } from '@statelyai/graph/elk'; * * const graph = fromELK({ * id: 'root', * children: [ * { id: 'a', x: 0, y: 0, width: 100, height: 50 }, * { id: 'b', x: 200, y: 0, width: 100, height: 50 }, * ], * edges: [{ id: 'e1', sources: ['a'], targets: ['b'] }], * }); * * graph.nodes; // [{id: 'a', x: 0, y: 0, ...}, {id: 'b', x: 200, ...}] * graph.edges; // [{sourceId: 'a', targetId: 'b', ...}] * ``` */ declare function fromELK(elkRoot: ElkNode$1): VisualGraph; /** * Bidirectional converter for ELK JSON format. * * @example * ```ts * import { elkConverter } from '@statelyai/graph/elk'; * * const elk = elkConverter.to(graph); * const roundTripped = elkConverter.from(elk); * ``` */ declare const elkConverter: VisualGraphFormatConverter; //#endregion export { type ElkEdge, type ElkEdgeSection, type ElkExtendedEdge, type ElkGraphElement, type ElkLabel, type ElkNode, type ElkPoint, type ElkPort, type ElkPrimitiveEdge, type ElkShape, type LayoutOptions, elkConverter, fromELK, toELK };