/** * Copyright (c) 2025 Elara AI Pty Ltd * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details. */ import type { FlowchartDecisionRoles, FlowchartLaneRoles, FlowchartStateRoles, FlowchartTransitionRoles, FlowchartValue } from "./model.js"; /** The Flowchart's kinds, by the prop each fills — and the slot each keeps its reads, its session and its failures under. */ export type FlowchartSort = "states" | "transitions" | "lanes" | "decisions"; /** The kinds in the Flowchart's order: what the loading line names first. */ export declare const FLOWCHART_SORTS: readonly FlowchartSort[]; /** The kinds read through a source of the rail, each named after the kind. */ export declare const SOURCE_SORTS: readonly ("states" | "transitions")[]; /** One stored row a read holds: its roles, read with it, and its row's bytes at the record's row type. */ export interface FlowchartStoredRow { /** Its roles. */ readonly roles: R; /** Its row, as bytes. */ readonly row: Uint8Array; } /** A kind's stored rows a read holds, by key. */ export type FlowchartStored = ReadonlyMap>; /** Each kind's stored rows the settled read holds; `undefined` for a kind the Flowchart is not given. */ export interface FlowchartHeld { /** The states: the rows the narrowing keeps, or every row under `"dim"`. */ readonly states: FlowchartStored; /** The transitions. */ readonly transitions: FlowchartStored | undefined; /** The lanes, read whole. */ readonly lanes: FlowchartStored | undefined; /** The decisions, read whole. */ readonly decisions: FlowchartStored | undefined; } /** What the Flowchart reads now, as the footer's loading line says it: the first kind in flight, and whether the read is of a new narrowing. */ export interface FlowchartReading { /** The kind. */ readonly sort: FlowchartSort; /** Whether its source's narrowing is not the one its drawing was read under, which stands in meanwhile: `Updating states…`. */ readonly filtering: boolean; } /** What the Flowchart has read of its kinds' records. */ export interface FlowchartData { /** Whether a read has settled: every kind read, or its read failed. */ readonly ready: boolean; /** Whether a read is in flight. */ readonly loading: boolean; /** What is read now, the first kind in flight in the Flowchart's order; `undefined` while nothing is. */ readonly reading: FlowchartReading | undefined; /** Whether what is drawn of a kind was read under a narrowing its source no longer holds, the new one in flight: it stands in, kept, taking no edit. */ readonly filtering: boolean; /** Why the read as a whole failed — outside any one kind's. */ readonly error: string | undefined; /** Why a kind's read failed, by the kind. */ readonly failures: ReadonlyMap; /** Each kind's stored rows the settled read holds. */ readonly held: FlowchartHeld; /** * The transitions held whose end no state read holds and the states' narrowing hides (D7), by key: hidden with it — * never drawn, and never an issue — yet held, so a state's Del deletes them with it (R10). */ readonly hiddenWith: ReadonlySet; /** The revision each kind's held rows were read at, for a kind its record is read by key of (its `entries`); none for one read whole. */ readonly revisions: ReadonlyMap; /** * The revision each such kind's record reads at now, whatever of the read is in flight: held rows read at another * are from before it (`drafted.ts`' `landedDrafts`). */ readonly now: ReadonlyMap; } /** The frame's data before its reader first reports: nothing drawn, a read in flight. */ export declare const INITIAL_FLOWCHART_DATA: FlowchartData; /** * Reads the records (see the module docs). * * @param value - The payload * @param attempt - Moves to read every kind afresh: a Retry * @returns What the Flowchart has read */ export declare function useFlowchartData(value: FlowchartValue, attempt?: number): FlowchartData; /** * The Flowchart's reads, in a component of its own (#1343, as the * Schematic's): each page that lands renders it again alone, and it hands the frame * what it read only when what the frame shows moves — once its own render is * done, so the frame draws it in a task of its own. * * @param props - The payload, the read's attempt, and where the data goes * @returns Nothing: it reads */ export declare function FlowchartDataReader({ value, attempt, onData }: { value: FlowchartValue; attempt: number; onData: (data: FlowchartData) => void; }): null; //# sourceMappingURL=read.d.ts.map