/** * Copyright (c) 2025 Elara AI Pty Ltd * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details. */ /** * The Sheet's decoded value as the parts read it: the columns the grid draws — those the viewer hides left out, a phone's * pinned one first — the registers, the group declaration, the pitches and the gutter, the tracks, the app's callbacks and * its new keys, the narrowing and the views, the copilot's declaration and the row source. * * @packageDocumentation */ import { type RefObject } from "react"; import { type ValueTypeOf } from "@elaraai/east"; import { type KnownKeys } from "@elaraai/east-ui-components"; import { type RowsViewport } from "@elaraai/east-ui-components/internal"; import type { RecordSliceBindType, RecordSliceStateType } from "@elaraai/east-ui/internal"; import { SuggestMemo, type FillColumn } from "./suggest.js"; import { InFlight } from "./suggest-async.js"; import type { SheetPagerColumn } from "./Pager.js"; import type { SheetNarrowing, SheetProposerValue, SheetRowValue, SheetSavedView, SheetDriverValue, SheetPagedSourceValue, SheetRootValue, SheetSelectionValue } from "./values.js"; import type { SheetHost, SheetHostLayout } from "./parts.js"; /** A phone's frame (`Mobile Sheet Spec.md` SH4): a pinned column's width, at the left, beside the window of columns. */ export declare const PHONE_PIN_PX = 150; /** * Decodes the Sheet's value into what every part reads (see the module docs). * * @param value - The Sheet root value * @param host - What the frame hands the parts * @returns The columns, the layout, the callbacks, the narrowing, the views and the row source */ export declare function useSheetDecode(value: SheetRootValue, host: SheetHost): { capabilities: SheetRootValue["editing"]["edits"]; chrome: Extract["value"] | undefined; declaredViews: SheetRootValue["views"]; decodedRows: readonly SheetRowValue[] | undefined; driver: SheetDriverValue | undefined; narrowing: SheetNarrowing | undefined; onSelectFn: Extract["value"] | undefined; onViewsChangeFn: Extract["value"] | undefined; pagedSource: SheetPagedSourceValue | undefined; proposers: SheetProposerValue[]; rowsPart: ValueTypeOf | undefined; rowsWhere: ValueTypeOf["where"] | undefined; selection: SheetSelectionValue | undefined; views: readonly SheetSavedView[]; viewsRef: RefObject; activeView: string | undefined; ahead: number; allColumns: import("./model.js").SheetColumnIndex; bandPx: number; blanks: number; canInsertGroups: boolean; canInsertRows: boolean; columns: import("./model.js").SheetColumnIndex; copilotOn: boolean; declaredNoun: { readonly singular: string; readonly plural: string; } | undefined; driverColumn: string | undefined; fillColumns: FillColumn[]; folded: boolean; framePx: number | undefined; gridId: string; gridTemplate: string; group: import("./model.js").SheetGroupIndex | undefined; gutterPx: number; hostGrid: import("./parts.js").SheetGridHost | undefined; hostLayout: SheetHostLayout; inflight: RefObject; keyOrder: ((a: string, b: string) => number) | undefined; keyed: boolean; lensWanted: boolean; loose: boolean; makeKey: (known: KnownKeys) => string; minWidth: number; noun: { readonly singular: string; readonly plural: string; }; numberPx: number; pagedColumns: readonly import("./model.js").SheetColumnMeta[]; pagerColumns: readonly SheetPagerColumn[]; pagerRef: RefObject<{ list: readonly SheetPagerColumn[]; slot: number; inView: number; }>; phoneColumns: number; phoneFrame: boolean; pinPx: number; pinned: boolean; readOnly: boolean; recordRows: boolean; registers: import("./model.js").SheetRegisterIndex; rowNumbers: boolean; rowPx: number; setFramePx: import("react").Dispatch>; setNumberPx: import("react").Dispatch>; setRowNumbers: import("react").Dispatch>; setViewPx: import("react").Dispatch>; setViewport: import("react").Dispatch>; setViewsState: import("react").Dispatch>; size: "lg" | "md" | "sm"; slotPx: number; subRowPx: number; suggestMemo: RefObject; titleMeta: import("./model.js").SheetColumnMeta | undefined; today: Date; triggers: Set; viewPx: number | undefined; viewport: RowsViewport | null; words: import("./words.js").SheetWords; }; /** What {@link useSheetDecode} gives the parts after it. */ export type SheetDecode = ReturnType; //# sourceMappingURL=use-decode.d.ts.map