/** * Copyright (c) 2025 Elara AI Pty Ltd * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details. */ import { type ValueTypeOf } from "@elaraai/east"; import { type PlanPayloadType } from "@elaraai/e3-ui/internal"; import { type PlanRootValue } from "./model.js"; import { type PlanEventCanDropFn } from "./edit/event-drag.js"; import { type PlanEventRows, type PlanEventShownValue } from "./root/events.js"; import { type PlanRowsHidden } from "./frame/hidden.js"; import type { PlanCanvasParts } from "./root/chrome.js"; export { type PlanRootValue, type PlanRowValue } from "./model.js"; export type { PlanCanvasParts, PlanChrome } from "./root/chrome.js"; /** One event kind, as the Plan's payload carries it (#1190). */ type PlanEventKindValue = ValueTypeOf["events"][number]; /** One resource kind, as the Plan's payload carries it (#1190). */ type PlanResourceKindValue = ValueTypeOf["resources"][number]; /** One of the library's tabs, as the Plan's payload carries it (#1195). */ type PlanLibraryTabValue = ValueTypeOf["library"][number]; /** Install (or clear) the test root render probe. Test use only. */ export declare function setPlanRootRenderProbe(fn: (() => void) | undefined): void; /** What {@link usePlanCanvas} reads. */ export interface PlanCanvasArgs { /** The Plan root value. */ value: PlanRootValue; /** Storage key prefix for persisting component state. */ storageKey: string; /** The event kinds' rows (#1192), drawn ahead of the root's own — a Plan of event kinds' payload carries them. */ events?: PlanEventRows | undefined; /** The ids the viewer hides in the library's Series tab (#1195): the event kinds' rows leave out what they name. */ hidden?: readonly string[] | undefined; /** What those ids hide of the Plan's own `rows`, which the canvas leaves out; `undefined` when they hide none. */ rowsHidden?: PlanRowsHidden | undefined; /** The event kinds' slots (#1197): an element of theirs selects its event, as the Calendar's do (B15). */ eventKinds?: readonly string[] | undefined; /** The library ids of the Plan's own panel tabs whose cards land on its rows (#1259) — its author's tabs'. */ panel?: readonly string[] | undefined; /** The event kinds themselves (#1194): each edited in a session over its record, under one history with `data`'s. */ kinds?: readonly PlanEventKindValue[] | undefined; /** The resource kinds (#1196): what the event kinds' rows stand for, by name. */ resources?: readonly PlanResourceKindValue[] | undefined; /** The library's tabs (#1196): the author's tabs' cards, which land on an event of their patch's kind. */ tabs?: readonly PlanLibraryTabValue[] | undefined; /** The Plan's drop veto over an event kind's drop (#1196): `Schedule.Types.Candidate` to its refusal's message. */ canDrop?: PlanEventCanDropFn | undefined; /** The resources the rail shows (#1344): by a resource kind's slot, the keys its source shows — what its rows draw. */ shown?: PlanEventShownValue | undefined; /** * Whether a resource kind's source is resolving a new narrowing, or its last read failed (#1344): main keeps the * rows it shows, busy, and takes no gesture until the narrowing lands. */ busy?: boolean | undefined; /** The app's optimiser (#1409): its binding, which the Elara eye calls by name; none, no eye. */ optimise?: { readonly name: string; } | undefined; /** Whether the Plan's Autosave begins on, as its author says: its one history's choice begins there. */ autosave?: boolean | undefined; } /** * The Plan's canvas, for the frame it renders in (#1193): everything the * canvas keeps and derives, composed into main, and the facts the frame's * toolbar, banners and footer are drawn from — see the module docs. The * frame calls it once per render and places what it hands back. * * @param args - The root, its storage key, the event kinds' rows, what the viewer hides, the panel's tabs whose cards land, the event kinds, the resource kinds, the library's tabs, the event kinds' drop veto, the resources the rail shows, whether their narrowing is resolving, and whether its Autosave begins on * @returns The canvas's parts: its contexts, main, its declared bound, and its chrome's facts */ export declare function usePlanCanvas({ value: hostValue, storageKey, events, hidden, rowsHidden, eventKinds, panel, kinds, resources, tabs, canDrop, shown: shownResources, busy, optimise, autosave, }: PlanCanvasArgs): PlanCanvasParts; //# sourceMappingURL=canvas.d.ts.map