import type { Node as PmNode } from '@atlaskit/editor-prosemirror/model'; import type { EditorState, Selection } from '@atlaskit/editor-prosemirror/state'; import type { EditorView } from '@atlaskit/editor-prosemirror/view'; import type { AnalyticsEventPayload } from '../analytics'; import type { Command } from '../types'; export { RelativeSelectionPos } from './types'; export type { SelectionPluginState, EditorSelectionAPI, SelectionPluginOptions, SelectionSharedState, SetSelectionRelativeToNode, } from './types'; export { GapCursorSelection, Side, JSON_ID, GapBookmark } from './gap-cursor/selection'; export { setSelectionTopLevelBlocks, setGapCursorAtPos } from './gap-cursor/actions'; export { isIgnored } from './gap-cursor/utils/is-ignored'; export { isValidTargetNode } from './gap-cursor/utils/is-valid-target-node'; export { setGapCursorSelection } from './gap-cursor/utils/setGapCursorSelection'; export { hideCaretModifier, gapCursorStyles } from './gap-cursor/styles'; export { atTheBeginningOfBlock, atTheBeginningOfDoc, atTheEndOfBlock, atTheEndOfDoc, deleteSelectedRange, endPositionOfParent, expandSelectionBounds, expandSelectionToBlockRange, expandToBlockRange, getSourceNodesFromSelectionRange, isMultiBlockRange, isMultiBlockSelection, isSelectionAtEndOfNode, isSelectionAtStartOfNode, selectionIsAtTheBeginningOfBlock, startPositionOfParent, } from './utils'; export { getSliceFromSelection, getFragmentsFromSelection, getLocalIdsFromSelection, } from './context-helpers'; export declare function getNodeSelectionAnalyticsPayload(selection: Selection): AnalyticsEventPayload | undefined; export declare function getAllSelectionAnalyticsPayload(selection: Selection): AnalyticsEventPayload | undefined; export declare function getCellSelectionAnalyticsPayload(state: EditorState): AnalyticsEventPayload | undefined; export declare function getRangeSelectionAnalyticsPayload(selection: Selection, doc: PmNode): AnalyticsEventPayload | undefined; /** * Insert content, delete a range and create a new selection * This function automatically handles the mapping of positions for insertion and deletion. * The new selection is handled as a function since it may not always be necessary to resolve a position to the transactions mapping * * @param getSelectionResolvedPos get the resolved position to create a new selection * @param insertions content to insert at the specified position * @param deletions the ranges to delete */ export declare const selectNode: (pos: number) => Command; export declare function createSelectionClickHandler(nodes: string[], isValidTarget: (target: HTMLElement) => boolean, options: { getNodeSelectionPos?: (state: EditorState, nodePos: number) => number; useLongPressSelection: boolean; }): (view: EditorView, _pos: number, node: PmNode, nodePos: number, event: MouseEvent, direct: boolean) => boolean;