/** * Copyright (c) 2025 Elara AI Pty Ltd * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details. */ import { type SystemStyleObject } from "@chakra-ui/react"; import type { ValueTypeOf } from "@elaraai/east"; import type { RecordSlicesChromeType } from "@elaraai/east-ui/internal"; import { type KeySearchSource, type ToolbarItem } from "@elaraai/east-ui-components"; import { type ZoomRange } from "../shared/schedule/zoom.js"; import type { FlowchartWords } from "./messages.js"; type Styles = Record; /** The canvas's orientation: left to right, or top down. */ export type FlowchartOrientation = "LR" | "TD"; /** * The Flowchart's own fold ranks, after every step of the slice rail's * (#952): the freshness chip goes, LR · TD folds into its chip, find state * into its icon, and last the zoom's strip — with a rail, LR · TD with it — * into find state's View. The history item's step (`DEFAULT_RANK`) comes * after them. */ export declare const FLOWCHART_RANK: { readonly freshness: 10; readonly orientation: number; readonly seek: number; readonly controls: number; }; /** The bundle the zoom's strip folds into find state's View in — with a rail, LR · TD with it: one move. */ export declare const FLOWCHART_CONTROLS = "flowchart.controls"; /** What the freshness chip says: the evidence the flow was drawn from, and when. */ export interface FlowchartFreshness { /** Its label (`scans-2026.09`). */ readonly label: string; /** Its stamp, when it has one. */ readonly date: Date | undefined; } /** What the Flowchart's toolbar items show and drive. */ export interface FlowchartToolbarProps { /** The `flowchart` recipe's styles: the freshness chip's dot. */ readonly styles: Styles; /** Find state's source (`find.ts`) — `undefined` with no state to seek. */ readonly find: KeySearchSource | undefined; /** The canvas's orientation. */ readonly orientation: FlowchartOrientation; /** Turns the canvas. */ readonly onOrientation: (orientation: FlowchartOrientation) => void; /** The freshness chip — `undefined` when the flowchart has none. */ readonly freshness: FlowchartFreshness | undefined; /** The Flowchart's words: the items' labels, and the formatters the chip's date prints with, in the app's locale. */ readonly words: FlowchartWords; /** The history item over the records' one history (`historyToolbarItem`) — where the flowchart edits; `undefined` where it does not. */ readonly history?: ToolbarItem | undefined; /** The rail (#1346): one over the flowchart's `Slice.bindRecords`, its affordances and its persistence; `undefined` with no slice. */ readonly chrome?: ValueTypeOf | undefined; /** What the rail's summary counts each source in, by its name — `states`, `state cards`, `owners`. */ readonly nouns?: Readonly> | undefined; /** Where the canvas's zoom stands (R42): at Fit Zoom out is off, at the cards' own size Zoom in. */ readonly zoom: ZoomRange; /** Zooms the canvas about its middle by a factor. */ readonly onZoom: (factor: number) => void; /** Puts the whole flowchart in view. */ readonly onFit: () => void; } /** * The Flowchart's toolbar items, in §7.1's order and on its fold ladder (see * the module docs) — for its frame's one toolbar. * * @param props - What the items show and drive * @returns The items, a falsy entry for each the flowchart has no use for */ export declare function useFlowchartToolbarItems({ styles, find, orientation, onOrientation, freshness, words, history, chrome, nouns, zoom, onZoom, onFit, }: FlowchartToolbarProps): ReadonlyArray; export {}; //# sourceMappingURL=toolbar.d.ts.map