/** * Copyright (c) 2025 Elara AI Pty Ltd * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details. */ import type { SortedMap, option } from "@elaraai/east"; import { type Formatters } from "@elaraai/east-ui-components"; import type { PeriodRead } from "../shared/loading.js"; import { type AllocationDrag, type Target } from "./drag.js"; import type { AllocationOptimised } from "./optimise.js"; import { type AllocationDomain, type AllocationStyles, type AllocationValue, type Bin, type Context, type Day, type Issue, type Load, type Selection, type Slot } from "./model.js"; /** How a selection asks to be followed (A12): `soft` leaves the resource pane where it is when the row is in view. */ export interface TimelineFollow { nonce: number; soft: boolean; } /** A selected link (A68): its bin's part on a resource. */ export interface SelectedLink { bin: string; resource: string; } /** The Timeline's props. */ export interface TimelineProps { value: AllocationValue; context: Context; styles: AllocationStyles; format: Formatters; /** The plan day. */ day: Date; /** The day as drafted, and as the record holds it. */ plan: Day; held: Day | undefined; /** Whether two bins are the same: one unlike the record's is a draft. */ sameBin: (a: Bin, b: Bin) => boolean; /** Whether a bin holds a conflict not yet chosen: it wears the warn ring. None by default. */ conflicted?: ((id: string) => boolean) | undefined; /** Whether a bin's row breaks its form's bounds (#1585), stored or changed: it wears the warn ring too. None by default. */ bounded?: ((id: string) => boolean) | undefined; /** Every resource's load. */ loads: SortedMap; /** The day's slots. */ slots: readonly Slot[]; /** Every issue: the app's flags on its bins. */ issues: readonly Issue[]; /** The resources the narrowing shows, by key; `none` for every one. */ visible: option>; /** The lanes the narrowing shows, by key; `none` for every one (#1336). */ visibleLanes: option>; /** The arrivals the narrowing shows, by key; `none` for every one: a bin of a hidden arrival has no card (#1339). */ visibleArrivals: option>; /** Clears the narrowing, where nothing shows; `undefined` with no narrowing. */ clearFilters: (() => void) | undefined; selection: Selection | undefined; /** The focus (A13). */ focus: string | undefined; /** The arrival whose every bin the Library's Allocated card highlights (A10). */ highlight: string | undefined; /** Whether a Library arrival is picked (A11): its free lane hours show, and a click there or on a ranked resource books it. */ picked: boolean; /** Books the picked arrival where a click lands, as its drop would (A11). */ book: (target: Target) => void; /** Whether the day takes edits. */ editable: boolean; select: (next: Selection | undefined) => void; /** A connector clicked: its bin's resource Chooser, in the inspector (A21). */ choose: (bin: string) => void; follow: TimelineFollow; /** The selected link (A68), and selecting one: its bin and the link. */ link: SelectedLink | undefined; selectLink: (link: SelectedLink) => void; /** Unlinks a bin's part on a resource: the selected link's ×. */ unlink: (bin: string, resource: string) => void; /** The board's drags (#1328). */ drag: AllocationDrag; /** A question's candidates: what a ranked fit's preview bar shows (A28), e3-ui's own arithmetic. */ candidates: AllocationDomain["candidates"]; /** * What it draws of the day's read (#1398): the day as read; a day not read yet — the day without its bins handed in * as `plan`, its lane-hour cells washed and its figures placeholders once the reveal says so; or one whose read * failed — its geometry, the failure said once across the lane cells of the first row in view. */ read: PeriodRead; /** A started day with no bins, once read (CL13): what the first row in view says — `No bins on Wed 12 May` — and how to book one. */ empty: { message: string; hint: string | undefined; } | undefined; /** * What the runs of the app's optimiser left on the day's bins (#1409): each bin's operation, drawn on its card with * its provenance on hover; the ghosts where the bins a run moved or removed stood; the lanes the latest run changed; * and the links the runs added or changed, with the kilns they land on. */ optimised?: AllocationOptimised | undefined; /** * Whether a run's highlight is on (#1409): the ghosts show, the lane heads the run changed flash, the runs' links * draw outlined in the Elara tone over the focus's family, and the loads they land on glow with the cards. */ lit?: boolean | undefined; } /** * The Timeline (see the module docs). * * @param props - See {@link TimelineProps} * @returns The three panes under their head */ export declare function AllocationTimeline(props: TimelineProps): import("react/jsx-runtime").JSX.Element; //# sourceMappingURL=timeline.d.ts.map