import { I as VisualGraph, f as Graph } from "../types-BAEQTwK_.mjs"; import { LayoutOptions } from "./index.mjs"; //#region src/layout/graphviz.d.ts /** Graphviz layout engines supported by the adapter. */ type GraphvizEngine = 'dot' | 'neato' | 'fdp' | 'sfdp' | 'circo' | 'twopi' | 'osage' | 'patchwork'; interface GraphvizLayoutOptions extends LayoutOptions { /** Graphviz layout engine. Defaults to `'dot'`. */ engine?: GraphvizEngine; /** * Raw Graphviz graph attributes, emitted last (override everything). * See https://graphviz.org/doc/info/attrs.html */ graphAttributes?: Record; } /** * Lay out a graph with Graphviz (via `@hpcc-js/wasm-graphviz`, an optional * peer dependency). Pure: returns a new {@link VisualGraph} with node * positions/sizes, routed edge `points` (`routing: 'splines'` — Graphviz * b-spline control points, tail → head, endpoints included), and computed * edge label rects (edge `x`/`y`). * * Node sizes are resolved via {@link getNodeSize} and passed to Graphviz as * fixed sizes, so layout never depends on Graphviz's own text measurement. * * Notes: * - Compound graphs (`parentId`) are not supported — use `getElkLayout`, or * `getFlattenedGraph()` the graph first. (Graphviz clusters: planned.) * - In a directed graph, edges with `mode: 'undirected'` are laid out as * directed but drawn without arrowheads (`dir=none`); in an undirected * graph, per-edge `mode: 'directed'` overrides are ignored (DOT `graph` * has no directed edge operator). * - `options.seed` maps to the Graphviz `start` attribute (used by the * randomized engines neato/fdp/sfdp; ignored by deterministic engines). * - `options.constraints.layer` maps to `{ rank=same; … }` groups (`dot` * engine only — the other engines have no rank concept). * * @example * ```ts * import { getGraphvizLayout } from '@statelyai/graph/layout/graphviz'; * * const laidOut = await getGraphvizLayout(graph, { * engine: 'dot', * measure: (node) => measureText(node.label), * }); * ``` */ declare function getGraphvizLayout(graph: Graph | VisualGraph, options?: GraphvizLayoutOptions): Promise; //#endregion export { GraphvizEngine, GraphvizLayoutOptions, getGraphvizLayout };