/** * Copyright (c) 2025 Elara AI Pty Ltd * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details. */ import type { PlanInstantValue } from "../instant.js"; /** One operation a run left on an event, as its element draws and says it. */ export interface PlanElementOp { /** The event was added to the canvas, or changed on it. */ readonly op: "add" | "chg"; /** The run's number, formatted. */ readonly run: string; /** What the element says on hover: `Added by Elara · run #7`, `Was Mon 09:00–17:00 · Press A1 · Elara run #7`. */ readonly provenance: string; } /** A ghost a run left on a row (R15): where an event it removed or moved stood before it. */ export interface PlanGhost { /** The element's key: its event's ref, as East prints it. */ readonly key: string; /** Removed, struck through; or moved, dashed where it was. */ readonly op: "del" | "from"; /** The run's number, formatted. */ readonly run: string; /** Where it stood: its extent on the axis — one instant twice for a tile or a mark. */ readonly start: PlanInstantValue; readonly end: PlanInstantValue; /** What it said. */ readonly label: string; /** How the row drew it: a bar or a chip spans; a tile or a mark is an instant. */ readonly shape: "span" | "instant"; } /** What the runs left, as the canvas hands it to its rows and elements. */ export interface PlanOptimisedMarks { /** Each operation, by the element's key. */ readonly ops: ReadonlyMap; /** Each row's ghosts, by the row's key. */ readonly ghosts: ReadonlyMap; /** Whether the highlight is on (R16): the ghosts show for it alone. */ readonly lit: boolean; } /** What the runs left on the canvas — nothing outside a Plan whose optimiser has run. */ export declare const PlanOptimisedContext: import("react").Context; /** * The operation a run left on an element's event, if any: what its element * draws (`data-op`) and says on hover. * * @param key - The element's key * @returns The operation; `undefined` for an event no run changed */ export declare function usePlanElementOp(key: string): PlanElementOp | undefined; /** * The ghosts a row draws while a run's highlight is on (R15): where the events * a run removed or moved stood on it. * * @param rowKey - The row's key * @returns Its ghosts; none outside the highlight */ export declare function usePlanRowGhosts(rowKey: string): readonly PlanGhost[]; //# sourceMappingURL=element-optimise.d.ts.map