UNPKG

@atlaskit/adf-schema

Version:

Shared package that contains the ADF-schema (json) and ProseMirror node/mark specs

40 lines (39 loc) 1.03 kB
import { Node as ProseMirrorNode } from 'prosemirror-model'; import { SideEffects, SideEffectsJSON } from './utils/side-effects/types'; import { SortOrder } from './constants'; export declare type ColumnInfo = Map<number, CellStep>; export interface AddColumnStepInfo { cells: CellStep[]; sideEffects?: SideEffects; } /** * Information about the cell * from: where the cell will be added removed * to: where the original cell ends * newCell?: the content of the new cells if it's added */ export interface CellStep { from: number; to: number; newCell?: ProseMirrorNode; mergeWith?: number; } export interface CellStepJson { from: number; to: number; newCell?: { [key: string]: any; }; mergeWith?: number; } export interface AddColumnStepJson { stepType: 'ak-add-column'; tablePos: number; cells: CellStepJson[]; sideEffects?: SideEffectsJSON; isDelete: boolean; } export interface TableColumnOrdering { columnIndex: number; order: SortOrder; }