@atlaskit/editor-common
Version:
A package that contains common classes and components for editor and renderer
16 lines (15 loc) • 813 B
TypeScript
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
import type { EditorContainerWidth } from '../types/editor-container-width';
export declare const layoutToWidth: {
default: number;
wide: number;
'full-width': number;
};
/**
* Calculates width of parent node of a nested node (inside layouts, extension)
* If current node selection is not nested will return undefined
*/
export declare const getParentNodeWidth: (pos: number | undefined, state: EditorState, containerWidth: EditorContainerWidth, isFullWidthModeEnabled?: boolean) => any;
export declare const getTableContainerWidth: (node: PMNode) => number;
export declare const getTableWidthWithNumberColumn: (node: PMNode, offset: number) => number;