import { f as Graph } from "../../types-BAEQTwK_.mjs"; //#region src/formats/adjacency-list/index.d.ts /** * Converts a graph to an adjacency list representation. * * @example * ```ts * import { createGraph, toAdjacencyList } from '@statelyai/graph'; * * const graph = createGraph({ * nodes: { a: {}, b: {}, c: {} }, * edges: [{ source: 'a', target: 'b' }, { source: 'a', target: 'c' }], * }); * * toAdjacencyList(graph); * // { a: ['b', 'c'], b: [], c: [] } * ``` */ declare function toAdjacencyList(graph: Graph): Record; /** * Parses an adjacency list into a graph. * * @example * ```ts * import { fromAdjacencyList } from '@statelyai/graph'; * * const graph = fromAdjacencyList({ * a: ['b', 'c'], * b: ['c'], * c: [], * }); * * graph.nodes; // [{id: 'a', ...}, {id: 'b', ...}, {id: 'c', ...}] * graph.edges; // [{sourceId: 'a', targetId: 'b', ...}, ...] * ``` */ declare function fromAdjacencyList(adj: Record, options?: { directed?: boolean; id?: string; }): Graph; //#endregion export { fromAdjacencyList, toAdjacencyList };