UNPKG

@atlaskit/editor-plugin-toolbar

Version:

Toolbar plugin for @atlaskit/editor-core

9 lines 542 B
export const isSelectionToolbarSuppressedByUserIntent = (currentUserIntent, isCellSelection) => Boolean(currentUserIntent && currentUserIntent !== 'default' && !(currentUserIntent === 'dragHandleSelected' && !isCellSelection)); export const isPlainShiftArrowKey = ({ shiftKey, key, metaKey, ctrlKey, altKey }) => shiftKey && !metaKey && !ctrlKey && !altKey && key.includes('Arrow'); export const hasSelectionChanged = (mouseDownSelection, currentSelection) => Boolean(mouseDownSelection && !mouseDownSelection.eq(currentSelection));