UNPKG

@lumina-study/blocks-graph

Version:

Framework-agnostic Web Component for visualizing Lumina Study block schemas

26 lines 1.19 kB
import type { Block } from '../types/block.js'; import type { BlockGraph } from '../types/block-graph.js'; import type { PositionedBlock } from '../types/positioned-block.js'; import type { GraphLayoutConfig } from './graph-layout-config.js'; export declare class GraphEngine { private config; constructor(config?: Partial<GraphLayoutConfig>); buildGraph(blocks: Block[]): BlockGraph; private calculateLevels; layoutGraph(graph: BlockGraph): PositionedBlock[]; process(blocks: Block[]): { graph: BlockGraph; positioned: PositionedBlock[]; }; isSubBlock(block: Block): boolean; getDirectPrerequisites(blockId: string, graph: BlockGraph): Block[]; getDirectPostRequisites(blockId: string, graph: BlockGraph): Block[]; getSubBlocks(blockId: string, graph: BlockGraph): Block[]; private isDescendantOf; getRelatedBlocks(blockId: string, graph: BlockGraph, includeSubBlocks: boolean): Set<string>; categorizeBlocks(blocks: Block[], graph: BlockGraph, selectedBlockId: string | null, selectionLevel: number): { visible: Set<string>; dimmed: Set<string>; }; } //# sourceMappingURL=graph-engine.d.ts.map