@plait/draw
Version:
Implementation of the core logic of the flowchart drawing tool plugin.
30 lines (29 loc) • 1.94 kB
TypeScript
import { PlaitBoard, Point, RectangleClient } from '@plait/core';
import { PlaitBaseTable, PlaitTable, PlaitTableBoard, PlaitTableCell, PlaitTableCellWithPoints } from '../interfaces/table';
import { BaseEditor } from 'slate';
export declare function getCellsWithPoints(board: PlaitBoard, element: PlaitBaseTable): PlaitTableCellWithPoints[];
export declare function getCellWithPoints(board: PlaitBoard, table: PlaitBaseTable, cellId: string): PlaitTableCellWithPoints;
export declare function getHitCell(board: PlaitTableBoard, element: PlaitBaseTable, point: Point): PlaitTableCell | null | undefined;
export declare function editCell(board: PlaitBoard, cell: PlaitTableCell): void;
export declare function getTextManageByCell(board: PlaitBoard, cell: PlaitTableCell): import("@plait/common").TextManage;
export declare const updateColumns: (table: PlaitBaseTable, columnId: string, width: number, offset: number) => {
columns: {
id: string;
width?: number;
}[];
points: Point[];
};
export declare const updateRows: (table: PlaitBaseTable, rowId: string, height: number, offset: number) => {
rows: {
id: string;
height?: number;
}[];
points: Point[];
};
export declare function updateCellIdsByRowOrColumn(cells: PlaitTableCell[], oldId: string, newId: string, type: 'row' | 'column'): void;
export declare function updateRowOrColumnIds(element: PlaitTable, type: 'row' | 'column'): void;
export declare function updateCellIds(cells: PlaitTableCell[]): void;
export declare function isCellIncludeText(cell: PlaitTableCell): number | undefined;
export declare function getCellsRectangle(board: PlaitTableBoard, element: PlaitTable, cells: PlaitTableCell[]): RectangleClient;
export declare const createCell: (rowId: string, columnId: string, text?: string | null) => PlaitTableCell;
export declare const getSelectedTableCellsEditor: (board: PlaitBoard) => BaseEditor[] | undefined;