/** * Copyright (c) 2025 Elara AI Pty Ltd * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details. */ import { type CellCoord, type DragEventValue, type DragPayload } from "@elaraai/east-ui-components"; import { type SheetRowDrop } from "./drop.js"; import type { InsertionActions, InsertSeam } from "./Insertion.js"; import type { SheetRowAction } from "./Rows.js"; import type { SheetHost } from "./parts.js"; import type { SheetDecode } from "./use-decode.js"; import type { SheetSession } from "./use-session.js"; import type { SheetBody } from "./use-body.js"; import type { SheetMachine } from "./use-machine.js"; import type { SheetEffects } from "./use-effects.js"; import type { SheetGestures } from "./use-gestures.js"; import type { SheetReading } from "./use-reading.js"; import type { SheetRing } from "./use-ring.js"; import type { SheetScroll } from "./use-scroll.js"; /** * The sheet's drops as they stand (#1187): what the rows' shared * {@link SheetRowDrop} and the sheet's drop target call — made afresh each * render, read through a ref, so neither changes for it. */ export interface SheetDropApi { /** Whether the drop a candidate event makes lands. */ canDrop: (event: DragEventValue) => boolean; /** What the ghost says where a drag rests. */ caption: (coord: CellCoord, payload: DragPayload) => string | undefined; /** Where it rests, as the announcements name it. */ name: (coord: CellCoord, payload: DragPayload) => string; /** A drag rests over a row that takes it: the seam, or the row, lights. */ hover: (el: HTMLElement, coord: CellCoord, payload: DragPayload) => void; /** A completed drag: run as one transaction — `false` when nothing changed. */ drop: (event: DragEventValue) => boolean; } /** * Builds what the rows are handed beside their cells (see the module docs). * * @param host - What the frame hands the parts * @param sheetDecode - The decoded columns, layout, callbacks, narrowing and row source * @param sheetSession - The store, the lens, the paging, the session and the rows * @param sheetBody - The body, the row space and the cells at each place * @param sheetMachine - The machine's context and dispatch * @param sheetEffects - The effect runner and what its effects reach * @param sheetGestures - The history's runner, the discard and the insertion * @param sheetReading - The loading line and the frame's loading facts * @param sheetRing - The strip, the active cell and the hint * @param sheetScroll - The scroll's report, the sticky rows, the sizes and the motion * @returns The rows' drop, seams, inserts, decisions and runs */ export declare function useSheetRowParts(host: SheetHost, sheetDecode: SheetDecode, sheetSession: SheetSession, sheetBody: SheetBody, sheetMachine: SheetMachine, sheetEffects: SheetEffects, sheetGestures: SheetGestures, sheetReading: SheetReading, sheetRing: SheetRing, sheetScroll: SheetScroll): { bandMixed: (r: number, picked: boolean) => boolean; dragActive: boolean; dropApi: import("react").RefObject; dropHost: import("./drop.js").SheetDropHost | undefined; dropOn: boolean; foldedInserts: ((r: number) => SheetRowAction[]) | undefined; insertActions: (r: number, side: "gutter" | "body") => InsertionActions; insertLayerRef: import("react").RefObject; insertPreview: { r: number; kind: "row" | "group"; side: "gutter" | "body"; } | undefined; movesGroups: boolean; movesLines: boolean; movesRows: boolean; onRowSeamEnter: (r: number, side: "gutter" | "body", hit: HTMLElement) => void; onSeamLeave: (to: EventTarget | null) => void; railNouns: { [k: string]: string; } | undefined; retryRead: (w?: number) => void; rowDrop: SheetRowDrop | undefined; rowsNoun: string; runLoading: (band: { at: string; from: number; to: number; }) => boolean; seam: InsertSeam | undefined; seamSide: (i: number) => "gutter" | "body"; seamsOn: boolean; }; /** What {@link useSheetRowParts} gives the parts after it. */ export type SheetRowParts = ReturnType; //# sourceMappingURL=use-row-parts.d.ts.map