import { Fragment, Node, NodeType, Slice } from "prosemirror-model"; import { EditorState } from "prosemirror-state"; import { Dispatch, TableStart } from "../types"; import { EdgeRect } from "./EdgeRect"; /** * Get a rectangular area of cells from a slice, or null if the outer nodes of * the slice aren't table cells or rows. */ export declare function pastedCells(slice: Slice): Cells | undefined | null; export declare function fitSlice(nodeType: NodeType, slice: Slice): Node; export interface Cells { width: number; height: number; rows: Fragment[]; } /** * Clip or extend (repeat) the given set of cells to cover the given width and * height. Will clip rowspan/colspan cells at the edges when they stick out. */ export declare function clipCells({ width, height, rows }: Cells, newWidth: number, newHeight: number): Cells; /** * Insert the given set of cells (as returned by `pastedCells`) into a table, at * the position pointed at by rect. */ export declare function insertCells(state: EditorState, dispatch: Dispatch, tableStart: TableStart, rect: EdgeRect, cells: Cells): void;