import { _ as GraphFormatConverter, f as Graph } from "../../types-BAEQTwK_.mjs"; //#region src/formats/tgf/index.d.ts /** * Converts a graph to TGF (Trivial Graph Format) string. * * @example * ```ts * import { createGraph } from '@statelyai/graph'; * import { toTGF } from '@statelyai/graph/tgf'; * * const graph = createGraph({ * nodes: [{ id: 'a', label: 'A' }, { id: 'b', label: 'B' }], * edges: [{ id: 'e0', sourceId: 'a', targetId: 'b', label: 'go' }], * }); * * const tgf = toTGF(graph); * // "a A\nb B\n#\na b go" * ``` */ declare function toTGF(graph: Graph): string; /** * Parses a TGF (Trivial Graph Format) string into a graph. * * @example * ```ts * import { fromTGF } from '@statelyai/graph/tgf'; * * const graph = fromTGF('a A\nb B\n#\na b go'); * // graph.nodes = [{ id: 'a', label: 'A' }, { id: 'b', label: 'B' }] * ``` */ declare function fromTGF(tgf: string): Graph; /** * Bidirectional converter for TGF (Trivial Graph Format). * * @example * ```ts * import { createGraph } from '@statelyai/graph'; * import { tgfConverter } from '@statelyai/graph/tgf'; * * const graph = createGraph({ * nodes: [{ id: 'a' }, { id: 'b' }], * edges: [{ id: 'e0', sourceId: 'a', targetId: 'b' }], * }); * * const tgf = tgfConverter.to(graph); * const roundTripped = tgfConverter.from(tgf); * ``` */ declare const tgfConverter: GraphFormatConverter; //#endregion export { fromTGF, tgfConverter, toTGF };