/** * 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 PlanLinkEnd, type PlanLinkKindValue } from "./links/kinds.js"; import { type ConnectVetoFn } from "../shared/links/veto.js"; import { type PlanEventRows } from "./root/events.js"; import { type PlanLandingValue } from "./root/landings.js"; import { type PlanRowsHidden } from "./frame/hidden.js"; import type { PlanCanvasParts } from "./root/chrome.js"; import { type FuncCallBound } from "../shared/func/use-func-call.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 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; /** Where the event kinds' events land on the root's own rows (#1192, #1541) — a Plan of event kinds' payload carries it. */ events?: PlanEventRows | undefined; /** The ids the viewer hides in the library's Series tab (#1195): the event kinds' events 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 series the event kinds land on (#1541): what an event's resource is named by. */ landings?: readonly PlanLandingValue[] | 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 app's optimiser (#1409, east-workspace#1622): its binding — which the Elara eye calls by name, with the event * kinds' unsaved edits as drafts of the records it lists; none, no eye. */ optimise?: FuncCallBound | undefined; /** Whether the Plan's Autosave begins on, as its author says: its one history's choice begins there. */ autosave?: boolean | undefined; /** * The link kinds (#1541, U10): each a kind of link over the app's record, its links drawn beside the root's own and * saved in a session of its own, under the one history; none, a Plan of the root's links alone. */ linkKinds?: readonly PlanLinkKindValue[] | undefined; /** The Plan's veto over the link a Connect would draw (#1541, U10): told its kind and its two events; `undefined` for none. */ canConnect?: ConnectVetoFn | 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, where the event kinds' events land, what the viewer hides, the panel's tabs whose cards land, the event kinds, the series they land on, the library's tabs, the optimiser, 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, landings, tabs, optimise, autosave, linkKinds, canConnect, }: PlanCanvasArgs): PlanCanvasParts; //# sourceMappingURL=canvas.d.ts.map