/** * Copyright (c) 2025 Elara AI Pty Ltd * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details. */ import { type option } from "@elaraai/east"; import { type BuilderFrameDock } from "@elaraai/east-ui-components"; import { type SourceHiding } from "../shared/schedule/hidden.js"; import type { HiddenPicks } from "../shared/schedule/hidden-pick.js"; import type { FlowchartDetailsModel } from "./details.js"; import { type FlowchartEditing } from "./editing.js"; import { type FlowchartGesture, type FlowchartHolding, type GestureEdits } from "./edits.js"; import type { FlowchartLastSaves } from "./footer.js"; import type { FlowchartIssue } from "./issues.js"; import type { FlowchartWords } from "./messages.js"; import { type FlowchartModel, type FlowchartRows, type FlowchartValue } from "./model.js"; import type { FlowchartHeld, FlowchartSort } from "./read.js"; import type { FlowchartSelection } from "./selection.js"; /** What the inspector reads of the Flowchart. */ export interface FlowchartInspectorProps { /** The payload, decoded: each kind's name, form, own Details and row type. */ readonly value: FlowchartValue; /** What the canvas draws, the drafts in place. */ readonly model: FlowchartModel; /** The rows it draws, the drafts in place. */ readonly rows: FlowchartRows; /** Each kind's stored rows the read holds: what a form is tinted against. */ readonly held: FlowchartHeld; /** What is selected, as the canvas draws it. */ readonly selection: FlowchartSelection | null; /** The editing: each record's session and drafts, and which kinds take an edit. */ readonly editing: FlowchartEditing; /** * Records a gesture's edits as one step, as the canvas's are — what the gesture reads the latest the frame holds — * clearing the footer's refusal. * * @param gesture - The gesture * @param edits - Its edits, over what it reads; `undefined` where it makes none * @returns The edits recorded; `undefined` where nothing was */ readonly act: (gesture: FlowchartGesture, edits: (holding: FlowchartHolding) => GestureEdits | undefined) => GestureEdits | undefined; /** * Records a form's edit as one step, as `act` does a gesture's: refused, why — the footer's words, which the form says * under its field too. * * @param gesture - The gesture * @param edits - Its edits, over what it reads; `undefined` where it makes none * @returns `true` once recorded; refused, why — or `false` where nothing says */ readonly edit: (gesture: FlowchartGesture, edits: (holding: FlowchartHolding) => GestureEdits | undefined) => boolean | string; /** Says why an edit was refused, in the footer. */ readonly refuse: (words: string) => void; /** Selects something, or nothing — a transition in a state's Details, an issue's row — bringing it into view unless `scroll` is `false`. */ readonly reveal: (selection: FlowchartSelection | null, scroll?: boolean) => void; /** The Flowchart's issues, and its sessions'. */ readonly issues: readonly FlowchartIssue[]; /** Each source's hidden pick, by its kind: what an issue of a change the narrowing hides asks e3 which choices hide its row through. */ readonly picks: HiddenPicks; /** * Goes to a change the narrowing hides — the frame's hidden pick, as Find's is: the choices hiding it cleared, and * selected once the narrowing they leave draws it. * * @param at - What the issue names * @param hidden - What hides it, as far as e3 has said; `undefined` where nothing does */ readonly goToWaiting: (at: FlowchartSelection, hidden: readonly SourceHiding[] | undefined) => void; /** * Asks a row's Details for a field, which takes the keyboard there, the inspector opened at Details: what an issue's * line in Issues asks, as the toolbar's issue gone to does. Asked for none, any ask standing is dropped. * * @param sort - The row's kind * @param key - Its key * @param field - The field the issue names, by its form's key; none for an issue naming none */ readonly ask: (sort: FlowchartSort, key: string, field: option) => void; /** Each record's last save, and who made it. */ readonly saves: FlowchartLastSaves; /** The details: the reads a state's or a transition's Details shows after its head. */ readonly details: FlowchartDetailsModel; /** Where an own Details keeps its own state. */ readonly storageKey: string; /** The Flowchart's words. */ readonly words: FlowchartWords; } /** * The inspector pane, as `BuilderFrame` draws it — see the module docs. * * @param props - The payload, what the canvas draws, what is selected, the editing, the issues, the saves and the words * @returns The pane — 320px wide, its collapsed state kept per viewer — or `undefined`, no pane, given `inspector={false}` */ export declare function flowchartInspectorPane(props: FlowchartInspectorProps): BuilderFrameDock | undefined; //# sourceMappingURL=inspector.d.ts.map