import { RendererType } from "./renderers/core"; import { ParserType } from "./parsers/core"; import { UserTable, Table } from "./lib/table"; import { FunctionMapping } from "./formula/functions/__base"; import React from "react"; export declare type Y = number; export declare type X = number; export declare type Height = number; export declare type Width = number; export declare type ShapeType = { height: Height; width: Width; }; export declare type RectType = { y: Y; x: X; height: Height; width: Width; }; export declare type MatrixType = T[][]; export declare type Labeler = (n: number) => string; export declare type Renderers = { [s: string]: RendererType; }; export declare type Parsers = { [s: string]: ParserType; }; export declare type Labelers = { [s: string]: Labeler; }; export declare type TableRef = { table: UserTable; dispatch: (table: UserTable) => void; }; export declare type FeedbackType = (table: UserTable, points?: { pointing: PointType; selectingFrom: PointType; selectingTo: PointType; }) => void; export declare type Mode = "light" | "dark"; export declare type Headers = "both" | "vertical" | "horizontal" | "none"; export declare type CellType = { value?: any; style?: React.CSSProperties; justifyContent?: React.CSSProperties['justifyContent']; alignItems?: React.CSSProperties['alignItems']; labeler?: string; width?: Width; height?: Height; renderer?: string; parser?: string; custom?: Custom; changedAt?: Date; }; export declare type CellFilter = (cell: CellType) => boolean; export declare type CellsByAddressType = { [address: string]: CellType; }; export declare type CellsByIdType = { [id: Id]: CellType | undefined; }; export declare type OptionsType = { sheetHeight?: number; sheetWidth?: number; sheetResize?: "both" | "vertical" | "horizontal" | "none"; historyLimit?: number; headerHeight?: number; headerWidth?: number; editingOnEnter?: boolean; showAddress?: boolean; minNumRows?: number; maxNumRows?: number; minNumCols?: number; maxNumCols?: number; mode?: Mode; renderers?: Renderers; parsers?: Parsers; labelers?: Labelers; onSave?: FeedbackType; onChange?: FeedbackType; onSelect?: FeedbackType; }; export declare type RangeType = { start: number; end: number; }; export declare type PointType = { y: Y; x: X; }; export declare type PositionType = { y: Y; x: X; }; export declare type ZoneType = { startY: Y; startX: X; endY: Y; endX: X; }; export declare type AreaType = { top: Y; left: X; bottom: Y; right: X; }; export declare type WriterType = (value: string) => void; export declare type StoreType = { table: Table; tableInitialized: boolean; sheetRef: React.MutableRefObject; editorRef: React.MutableRefObject; gridOuterRef: React.MutableRefObject; searchInputRef: React.MutableRefObject; entering: boolean; choosing: PointType; cutting: boolean; copyingZone: ZoneType; selectingZone: ZoneType; autofillDraggingTo: PointType | null; headerTopSelecting: boolean; headerLeftSelecting: boolean; editingCell: string; editorRect: RectType; resizingRect: RectType; sheetHeight: number; sheetWidth: number; headerHeight: number; headerWidth: number; minNumRows: number; maxNumRows: number; minNumCols: number; maxNumCols: number; searchQuery?: string; matchingCells: string[]; matchingCellIndex: number; editingOnEnter: boolean; showAddress: boolean; contextMenuPosition: PositionType; resizingPositionY: [Y, Y, Y]; resizingPositionX: [X, X, X]; onSave?: FeedbackType; }; export declare type Props = { initial: CellsByAddressType; tableRef?: React.MutableRefObject; options?: OptionsType; className?: string; style?: React.CSSProperties; additionalFunctions?: FunctionMapping; }; export declare type Id = string; export declare type Ids = Id[]; export declare type IdMatrix = Ids[]; export declare type Address = string; export declare type MatricesByAddress = { [origin: Address]: MatrixType; }; export declare type StoreReflectionType = { choosing?: PointType; cutting?: boolean; copyingZone?: ZoneType; selectingZone?: ZoneType | undefined; }; export declare type HistoryUpdateType = { operation: "UPDATE"; reflection?: StoreReflectionType; diffBefore: CellsByIdType; diffAfter: CellsByIdType; partial: boolean; }; export declare type HistoryMoveType = { operation: "MOVE"; reflection?: StoreReflectionType; matrixFrom: IdMatrix; matrixTo: IdMatrix; matrixNew: IdMatrix; pointFrom: PointType; pointTo: PointType; lostRows: MatricesByAddress; }; export declare type HistoryAddRowsType = { operation: "ADD_ROWS"; reflection?: StoreReflectionType; y: number; idMatrix: IdMatrix; diffBefore?: CellsByIdType; diffAfter?: CellsByIdType; partial?: true; }; export declare type HistoryRemoveRowsType = { operation: "REMOVE_ROWS"; reflection?: StoreReflectionType; y: number; idMatrix: IdMatrix; }; export declare type HistoryAddColsType = { operation: "ADD_COLS"; reflection?: StoreReflectionType; x: number; idMatrix: IdMatrix; diffBefore?: CellsByIdType; diffAfter?: CellsByIdType; partial?: true; }; export declare type HistoryRemoveColsType = { operation: "REMOVE_COLS"; reflection?: StoreReflectionType; x: number; idMatrix: IdMatrix; }; export declare type HistoryType = HistoryUpdateType | HistoryMoveType | HistoryAddRowsType | HistoryRemoveRowsType | HistoryAddColsType | HistoryRemoveColsType; //# sourceMappingURL=types.d.ts.map