import { EditorUsage, ID, ISelection, IStoreState } from '../index.data'; export interface EditContext extends ISelection { usage: EditorUsage; isActiving: boolean; pickedCells?: ID[]; } export type EditEvent = ( | { type: 'MOUSE.DOWN' } | { type: 'MOUSE.MOVE' } | { type: 'MOUSE.UP' } | { type: 'KEY.ARROW' } | { type: 'KEY.ENTER' } | { type: 'KEY.ESC' } | { type: 'PICK.ENTER' } | { type: 'PICK.EXIT' } | { type: 'EDITING' } | { type: 'SELECT.CELL' } | { type: 'SELECT.ROW' } | { type: 'SELECT.COLUMN' } | { type: 'SELECT.MOVE' } | { type: 'SELECT.NONE' }) & { key?: 'ArrowLeft' | 'ArrowRight' | 'ArrowUp' | 'ArrowDown'; selectedRow?: ID; selectedCell?: ID; selectedColumn?: ID; state?: IStoreState; }; export type EditSchema = { states: { idle: {}; selecting: { states: { cell: {}; column: {}; row: {}; }; }; editing: { states: { default: {}; picking: { states: { on: {}; off: {}; }; }; }; }; }; };