import type { GraphHighlight } from './types'; import { type Graph } from '@turing-machine-js/machine'; import type { GraphIndexes } from './graphIndexes'; import type { HighlightOps, IndicatorOps, NodeKey } from './highlightOps'; /** * Pure highlight-rule evaluator. Given the current `highlight` (from * `MachineView`'s `$derived`), the engine `graph`, derived `indexes`, * and the previous strong-id (for pause-revisit pulse detection), emit * a sequence of `ops` calls describing the resulting visual state. * * Strictly additive — the caller is expected to clear previously-applied * highlight classes / edge marks / cluster activations BEFORE invoking * this function. The function never reads back from the consumer. * * Returns the new prev-strong-id to thread into the next call. Pulse * comparison uses the RAW strong id (not canonical), so wrapper-pause * and bare-pause register as different positions and don't pulse each * other. Updates only when `highlight.paused === true`; non-paused * events (idle / RUNNING_AUTO ticks) leave it untouched. Null highlight * resets it to null. * * See `docs/graph-highlight-and-breakpoints.md` for the 16 rules * enumerated. */ export declare function applyHighlight(highlight: GraphHighlight | null, graph: Graph | null, indexes: GraphIndexes, prevStrongId: NodeKey | null, ops: HighlightOps): { nextPrevStrongId: NodeKey | null; }; /** * Pure breakpoint-indicator rule evaluator. For each cached node key, * emit `ops.setBreakpoint(key, on)` reflecting whether the node's * canonical bare-id is in the `breakpoints` set. * * The 'idle' string sentinel never carries a breakpoint. All numeric * keys are valid BP-class members: * - positive id → regular state; canonical via bareIdOf (wrappers * collapse to bare) * - 0 → haltState singleton (engine-wide; canonical = 0) * - negative id → halt marker (per-frame visualization sentinel; * bareIdOf maps to 0 — same class as the singleton) * Consumers pass their iterable of cached node keys (e.g. `nodeCache.keys()`). */ export declare function applyIndicator(breakpoints: ReadonlySet, graph: Graph | null, nodeIds: Iterable, ops: IndicatorOps): void;