@atlaskit/editor-plugin-block-controls
Version:
Block controls plugin for @atlaskit/editor-core
20 lines (19 loc) • 883 B
TypeScript
import { type RefObject } from 'react';
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
import type { BlockControlsPlugin } from '../blockControlsPluginType';
type Options = {
api: ExtractInjectionAPI<BlockControlsPlugin> | undefined;
elementRef: RefObject<HTMLElement>;
getAnchorName: () => string;
getPos: () => number | undefined;
nodeType: string;
start: number | undefined;
view: EditorView | undefined;
};
/**
* Registry surface drag source. This intentionally duplicates the stable widget handle's drag
* contract so the legacy implementation remains byte-for-byte unchanged during migration.
*/
export declare const useBlockControlsSurfaceDragSource: ({ api, elementRef, getAnchorName, getPos, nodeType, start, view, }: Options) => void;
export {};