import { C as ComponentGraph, G as GraphEdgeType, a as GraphEdge, I as ImpactResult, P as PathResult, N as NeighborResult, b as CompositionTree, c as GraphHealth, d as ComponentNode, S as SerializedComponentGraph } from '../types-xJ2xyp_G.js'; export { E as EDGE_TYPE_WEIGHTS, e as GRAPH_EDGE_TYPES, f as SerializedEdge } from '../types-xJ2xyp_G.js'; /** * ComponentGraphEngine — query engine for the design-system relationship graph. * * Provides BFS-based traversal, impact analysis, composition trees, * alternative discovery, and health metrics. Operates on an in-memory * adjacency list built from GraphEdge[]. */ declare class ComponentGraphEngine { private nodes; private outgoing; private incoming; private edges; private blockIndex; private health; constructor(graph: ComponentGraph, blocks?: Record); /** Get outgoing edges from a component, optionally filtered by edge type */ dependencies(component: string, edgeTypes?: GraphEdgeType[]): GraphEdge[]; /** Get incoming edges to a component, optionally filtered by edge type */ dependents(component: string, edgeTypes?: GraphEdgeType[]): GraphEdge[]; /** BFS transitive closure — what's affected if this component changes */ impact(component: string, maxDepth?: number): ImpactResult; /** BFS shortest path between two components (undirected) */ path(from: string, to: string): PathResult; /** Connected components via BFS on undirected projection */ islands(): string[][]; /** All components reachable within N hops (undirected) */ neighbors(component: string, maxHops?: number): NeighborResult; /** Get the composition tree for a compound component */ composition(component: string): CompositionTree; /** Get alternative components (deduplicated for bidirectional edges) */ alternatives(component: string): Array<{ component: string; note?: string; }>; /** Get blocks that use a component */ blocksUsing(component: string): string[]; /** Extract an induced subgraph for a set of components */ subgraph(components: string[]): ComponentGraph; /** Return precomputed health metrics */ getHealth(): GraphHealth; /** Get a single node by name */ getNode(name: string): ComponentNode | undefined; /** Check if a component exists in the graph */ hasNode(name: string): boolean; } declare function computeHealthFromData(nodes: ComponentNode[], edges: GraphEdge[], blockIndex?: Map): GraphHealth; /** * Graph serialization — compact JSON format for fragments.json embedding. * * Edges use short keys (s, t, ty, w, no, p) to reduce JSON size. * Round-trips through serialize → deserialize preserve all data. */ /** Serialize a ComponentGraph to compact JSON format */ declare function serializeGraph(graph: ComponentGraph): SerializedComponentGraph; /** Deserialize a compact JSON graph back to full ComponentGraph */ declare function deserializeGraph(serialized: SerializedComponentGraph): ComponentGraph; export { ComponentGraph, ComponentGraphEngine, ComponentNode, CompositionTree, GraphEdge, GraphEdgeType, GraphHealth, ImpactResult, NeighborResult, PathResult, SerializedComponentGraph, computeHealthFromData, deserializeGraph, serializeGraph };