/** * Copyright (c) 2025 Elara AI Pty Ltd * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details. */ import type { SheetCellValue } from "../values.js"; import { type ActionCase, type ActionColumn, type ActionOffer } from "./model.js"; import type { SheetActionHost } from "./host.js"; /** Which control of the cell holds its overlay open. */ export type ActionHeld = "next" | "more"; /** Props of {@link ActionCell}. */ export interface ActionCellProps { /** The column's machine. */ column: ActionColumn; /** The row's summary: what follows its state (S7). */ summary: string; /** The row's offer. */ offer: ActionOffer; /** Whether the cell draws its controls: not on a read-only sheet, an owned row, a column that takes no edit, or a phone (T9, X4). */ controls: boolean; /** A phone's cell with nothing taken and the row free to act: `▶ Start` in place of the absent value (SH7). */ startable?: boolean | undefined; /** The cell's value is a draft (ST3). */ dirty: boolean; /** The ring is on the cell (ST2). */ selected: boolean; /** The control whose overlay is open. */ held: ActionHeld | undefined; /** The next half pressed: take its case, or open its overlay. */ onNext: (c: ActionCase, anchor: HTMLElement) => void; /** The ▾ part pressed: open the Menu of the rest of the offer. */ onMore: (anchor: HTMLElement) => void; /** The pointer rests on a control (P8): its case, or `undefined` as it leaves. */ onPreview?: ((c: ActionCase | undefined) => void) | undefined; } /** Renders an action column's cell. */ export declare const ActionCell: import("react").MemoExoticComponent<({ column, summary, offer, controls, startable, dirty, selected, held, onNext, onMore, onPreview }: ActionCellProps) => import("react/jsx-runtime").JSX.Element>; /** Props of {@link ActionCellSlot}. */ export interface ActionCellSlotProps { /** What the cell asks of its sheet. */ host: SheetActionHost; /** The row-space index. */ r: number; /** The column's key. */ columnKey: string; /** The column's machine. */ column: ActionColumn; /** The row's action cell. */ cell: SheetCellValue | undefined; /** The row's summary. */ summary: string; /** The ring is on the cell. */ selected: boolean; } /** * An action cell in its row: it listens to its sheet's host, so an edit * anywhere that may move its offer draws it again, and nothing else of the * row (#858). */ export declare const ActionCellSlot: import("react").MemoExoticComponent<({ host, r, columnKey, column, cell, summary, selected }: ActionCellSlotProps) => import("react/jsx-runtime").JSX.Element | null>; //# sourceMappingURL=ActionCell.d.ts.map