/** * Copyright (c) 2025 Elara AI Pty Ltd * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details. */ import { type ValueTypeOf } from "@elaraai/east"; import type { RecordPayloadType } from "@elaraai/e3-ui/internal"; import type { SlotStyles } from "@elaraai/east-ui-components/internal"; import type { SheetHostEmptyProps, SheetHostHeaderProps, SheetHostRowProps } from "../sheet/index.js"; import { type SheetColumnIndex, type SheetColumnMeta } from "../sheet/model.js"; import type { SheetRowValue } from "../sheet/values.js"; import type { RecordNoun } from "./status.js"; import type { RecordTicks } from "./ticks.js"; /** The Record's column groups, decoded. */ type RecordColumnGroups = ValueTypeOf["columnGroups"]; /** * What the Record's grid parts read beside the Sheet's: the record recipe's styles, the ticks, the column groups, the * rows' word, the title and whether there is an inspector. */ export interface RecordGrid { /** The record recipe's slot styles, at the Record's density. */ styles: SlotStyles; /** The rows ticked. */ ticks: RecordTicks; /** The column groups, in order. */ groups: RecordColumnGroups; /** The rows' word, one and many — `person`, `people`: what the empty state and the strip say. */ noun: RecordNoun; /** The Record's title: what the strip over nothing names (SP1). */ title: string | undefined; /** Whether the Record has an inspector: where the strip sends a row's details (SP1, SP3). */ inspector: boolean; } /** Provides what the Record's grid parts read beside the Sheet's. */ export declare const RecordGridProvider: import("react").Provider; /** * Reads what the Record's grid parts read beside the Sheet's; a part outside a {@link RecordGridProvider} is a * mistake of the frame's, and throws. * * @returns The Record's grid facts */ export declare function useRecordGrid(): RecordGrid; /** * The Record's title column — the one a phone pins: its first title column but one made from data, whose cells title a * member's value, never the row. What the head of a row's Details names, and where Add and Duplicate put the ring. * * @param columns - The columns drawn * @returns The title column, or `undefined` for a Record with none */ export declare function titleColumnOf(columns: SheetColumnIndex): SheetColumnMeta | undefined; /** * A row's title as it reads: its title column's text, else — with no title column — its first text's but one made * from data; `undefined` where that is empty. * * @param row - The row * @param columns - The columns drawn * @returns The title, or `undefined` */ export declare function titleOf(row: SheetRowValue, columns: SheetColumnIndex): string | undefined; /** * A row as its box and the strip name it: its title, else its first text, else its key. * * @param row - The row * @param columns - The columns drawn * @returns The name */ export declare function nameOf(row: SheetRowValue, columns: SheetColumnIndex): string; /** * A row (GR1–GR3, SL1, ST1–ST9): its select column's box, then its cells, the * Sheet's gestures on each — see the module docs. */ export declare const RecordRow: import("react").MemoExoticComponent<(props: SheetHostRowProps) => import("react/jsx-runtime").JSX.Element>; /** * The header (GR4, HD1–HD4, SL1): the column groups' row, then the header * row, its select column's box ticking every row shown. The two stick * together over the rows; nothing sorts. */ export declare function RecordHeader({ columns, gridTemplate, layout, rowPx, rowIds, whole, columnWindow }: SheetHostHeaderProps): import("react/jsx-runtime").JSX.Element; /** The empty state (EM1): the narrowing leaves no row to show — it says so, and clears the search, or the filters. */ export declare function RecordEmpty({ query, onClear }: SheetHostEmptyProps): import("react/jsx-runtime").JSX.Element; export {}; //# sourceMappingURL=grid.d.ts.map