import { _ as GraphFormatConverter, f as Graph } from "./types-BAEQTwK_.mjs"; //#region src/formats/converter/index.d.ts /** * Create a `GraphFormatConverter` from a pair of `to`/`from` functions. * * @example * ```ts * import { createFormatConverter } from '@statelyai/graph'; * * const yamlConverter = createFormatConverter( * (graph) => toYAML(graph), * (yaml) => fromYAML(yaml), * ); * * const yaml = yamlConverter.to(graph); * const graph = yamlConverter.from(yaml); * ``` */ declare function createFormatConverter(to: (graph: Graph) => TSerial, from: (input: TSerial) => Graph): GraphFormatConverter; /** * Bidirectional converter for adjacency-list format (`Record`). * * @example * ```ts * import { adjacencyListConverter, createGraph } from '@statelyai/graph'; * * const graph = createGraph({ * nodes: { a: {}, b: {} }, * edges: [{ source: 'a', target: 'b' }], * }); * * const adj = adjacencyListConverter.to(graph); * // { a: ['b'], b: [] } * * const roundTripped = adjacencyListConverter.from(adj); * ``` */ declare const adjacencyListConverter: GraphFormatConverter>; /** * Bidirectional converter for edge-list format (`[source, target][]`). * * @example * ```ts * import { edgeListConverter, createGraph } from '@statelyai/graph'; * * const graph = createGraph({ * nodes: { a: {}, b: {} }, * edges: [{ source: 'a', target: 'b' }], * }); * * const edges = edgeListConverter.to(graph); * // [['a', 'b']] * * const roundTripped = edgeListConverter.from(edges); * ``` */ declare const edgeListConverter: GraphFormatConverter<[string, string][]>; //#endregion export { createFormatConverter as n, edgeListConverter as r, adjacencyListConverter as t };