@atlaskit/editor-plugin-block-controls
Version:
Block controls plugin for @atlaskit/editor-core
66 lines (65 loc) • 2.96 kB
TypeScript
export declare const DRAG_HANDLE_HEIGHT = 24;
export declare const DRAG_HANDLE_BORDER_RADIUS = 4;
export declare const DRAG_HANDLE_ZINDEX: number;
export declare const DRAG_HANDLE_DEFAULT_GAP = 8;
export declare const DRAG_HANDLE_NARROW_GAP = 4;
export declare const DRAG_HANDLE_MAX_GAP = 12;
export declare const DRAG_HANDLE_SYNCED_BLOCK_GAP = 2.5;
export declare const DRAG_HANDLE_MAX_WIDTH_PLUS_GAP: number;
export declare const DRAG_HANDLE_DIVIDER_TOP_ADJUSTMENT: number;
export declare const DRAG_HANDLE_H1_TOP_ADJUSTMENT = 5;
export declare const DRAG_HANDLE_H2_TOP_ADJUSTMENT = 2;
export declare const DRAG_HANDLE_H3_TOP_ADJUSTMENT = 1;
export declare const DRAG_HANDLE_H4_TOP_ADJUSTMENT = 3;
export declare const DRAG_HANDLE_H5_TOP_ADJUSTMENT = 3;
export declare const DRAG_HANDLE_H6_TOP_ADJUSTMENT = 3;
export declare const DRAG_HANDLE_LAYOUT_SECTION_TOP_ADJUSTMENT = 8;
export declare const DRAG_HANDLE_PARAGRAPH_TOP_ADJUSTMENT = 2;
export declare const DRAG_HANDLE_PARAGRAPH_SMALL_TOP_ADJUSTMENT = 0;
export declare const DRAG_HANDLE_WRAPPED_MEDIA_EMBED_TOP_ADJUSTMENT = 8;
/** We only want to shift-select nodes that are at the top level of a document.
* This is because funky things happen when selecting inside of tableCells, but we
* also want to avoid heavily nested cases to descope potential corner cases.
* Various top level nodes have their selection 'from' at depths other than 0,
* so we allow for some leniency to capture them all. e.g. Table is depth 3.
*/
export declare const DRAG_HANDLE_MAX_SHIFT_CLICK_DEPTH = 3;
export declare const STICKY_CONTROLS_TOP_MARGIN = 8;
export declare const STICKY_CONTROLS_TOP_MARGIN_FOR_STICKY_HEADER = 24;
export declare const QUICK_INSERT_HEIGHT = 24;
export declare const QUICK_INSERT_WIDTH = 24;
export declare const QUICK_INSERT_DIMENSIONS: {
height: number;
width: number;
};
export declare const QUICK_INSERT_LEFT_OFFSET = 16;
export declare const dragHandleGap: (nodeType: string, parentNodeType?: string) => number;
export declare const rootElementGap: (nodeType: string) => number;
export declare const getNestedNodeLeftPaddingMargin: (nodeType?: string) => "24px" | "8px" | "16px" | "20px" | "28px" | "40px";
export declare const topPositionAdjustment: (nodeType: string, layout?: string) => number;
export declare const dropTargetMarginMap: {
[key: number]: string;
};
/**
* This document serves as a quick reference map for correlating various space matches
* to the table provided above.
* For instance, the number 1 will correspond to \{0: token('space.0', '0')\}.
*/
export declare const spaceLookupMap: {
[k: string]: string;
};
export declare const spacingBetweenNodesForPreview: {
[key: string]: {
bottom: string;
top: string;
};
};
export declare const nodeMargins: {
[key: string]: {
bottom: number;
top: number;
};
};
export declare const DEFAULT_COLUMN_DISTRIBUTIONS: {
[key: number]: number;
};