UNPKG

@atlaskit/editor-plugin-toolbar

Version:

Toolbar plugin for @atlaskit/editor-core

14 lines 760 B
export var isSelectionToolbarSuppressedByUserIntent = function isSelectionToolbarSuppressedByUserIntent(currentUserIntent, isCellSelection) { return Boolean(currentUserIntent && currentUserIntent !== 'default' && !(currentUserIntent === 'dragHandleSelected' && !isCellSelection)); }; export var isPlainShiftArrowKey = function isPlainShiftArrowKey(_ref) { var shiftKey = _ref.shiftKey, key = _ref.key, metaKey = _ref.metaKey, ctrlKey = _ref.ctrlKey, altKey = _ref.altKey; return shiftKey && !metaKey && !ctrlKey && !altKey && key.includes('Arrow'); }; export var hasSelectionChanged = function hasSelectionChanged(mouseDownSelection, currentSelection) { return Boolean(mouseDownSelection && !mouseDownSelection.eq(currentSelection)); };