/** * Copyright (c) 2025 Elara AI Pty Ltd * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details. * * The thin per-row adapter (#616): compute one row's PRIMITIVE facts under * the canvas's focus and hand them to the memoized `PlanBodyRow` — plus the * bands a links focus gathers its rows under (#1680's review). * * The row reads its own selection, chart toggle and active control from the * controller (#815), so none of those pass through here: a selection click * renders the two rows it moved, and the canvas not at all. * * @packageDocumentation */ import type { ComponentProps, ReactNode } from "react"; import { EastChakraComponent } from "@elaraai/east-ui-components"; import type { PlanRowDrop } from "../rows/RowShell.js"; import type { PlanDraftMark } from "../use-plan-editing.js"; import { type PlanDerived, type PlanFocusBand, type PlanFocusCtx, type PlanLaneBand, type PlanRowIndex, type PlanRowValue, type VisibleRow } from "../model.js"; import type { PlanEvent, RowKey } from "../plan-state.js"; type Styles = Record>; type UIValue = ComponentProps["value"]; /** What every body row of one render shares. */ export interface PlanRowContext { styles: Styles; gridTemplate: string; dense: boolean; storageKey: string; index: PlanRowIndex; derived: PlanDerived; dispatch: (e: PlanEvent) => void; /** The chart rows the user expanded (heights read it). */ chartsExpanded: ReadonlySet; /** Which row is focused — all the row roles need. */ focusCtx: PlanFocusCtx | undefined; /** The same, with the expand clamp — what the heights need. */ heightCtx: PlanFocusCtx | undefined; /** The rows any link edge touches — they grow the links control. */ linkedKeys: ReadonlySet; /** Whether the root declares `expandRender`. */ canExpand: boolean; /** The focused row's developer render / gutter body, or `null`. */ expandBody: UIValue | null; expandGutterBody: UIValue | null; /** Whether the source is not yet exhausted — a paged canvas still loading * (a top-level section's count then covers only the loaded windows). */ partial: boolean | undefined; rowDrop: PlanRowDrop | undefined; /** Each drafted row's mark, by key (#880) — a row reads its own. */ marks: ReadonlyMap; /** The rows that close an open group — each the last visible member of * one (#949, `groupEndsOf`). */ groupEnds: ReadonlySet; /** Whether a row's events are unread (#1398, CL2): a paged kind's resource whose cells have not landed, or are read * again — its plot washed under what it holds. Absent, every row's are read. */ unread?: ((row: PlanRowValue) => boolean) | undefined; } /** * One visible row, as the memoized body row. * * @param v - The visible row * @param ctx - What the render's rows share * @returns The row element */ export declare function renderPlanRow(v: VisibleRow, ctx: PlanRowContext): ReactNode; /** * The sticky parent (#823) — pinned under a bounded frame's header while the * rows in view belong to a parent whose own row has scrolled off: the * parent's name — for a deep tree, the path of its ancestors down to it — in * the group band's look. A click takes the reader to the parent's row. Not a * row of the grid: a reader already hears each row's level, and ← walks to * the parent. */ export declare function PlanStickyParent({ parent, path, styles, gridTemplate, onGo }: { parent: PlanRowValue; /** The parent's ancestors, outermost first. */ path: readonly PlanRowValue[]; styles: Styles; gridTemplate: string; /** Go to the parent's row. */ onGo: () => void; }): import("react/jsx-runtime").JSX.Element; /** * A links focus's band (#1680's review) — the open group band's look, a 26px * heading over the rows its role gathers: `Upstream · 2`, `Focused`, `Linked · * 1`, `Downstream · 3`, a role with no rows saying so; or `Other rows · 27`, * which every row the focus does not gather folds into, and which opens in * place as a section does — its caret, a click, Enter or Space. A grid row of * its own (#819), at the first level: the rows a role gathers stand one in. */ export declare function PlanFocusBandRow({ band, h, styles, gridTemplate, dispatch }: { band: PlanFocusBand; /** The height the model laid the band out at (#817). */ h: number; styles: Styles; gridTemplate: string; dispatch: (e: PlanEvent) => void; }): import("react/jsx-runtime").JSX.Element; /** * A rule a links focus opens for its family's lanes (#1680's review): room * between two rows it gathers, as tall as the lane tracks the links layer draws * along it. No row of the grid — a reader hears the rows either side. */ export declare function PlanLaneBandRow({ band, h, styles, gridTemplate }: { band: PlanLaneBand; /** The height the model laid the band out at (#817). */ h: number; styles: Styles; gridTemplate: string; }): import("react/jsx-runtime").JSX.Element; export {}; //# sourceMappingURL=rows.d.ts.map