import { Path } from "@portabletext/editor";
import { ReactNode } from "react";
/**
 * The block-relative position a drop would land at.
 *
 * @beta
 */
type DropPosition = {
  path: Path;
  position: 'start' | 'end';
};
/**
 * Tracks the drop position during drag and drop and serves it through
 * context. Mount inside `EditorProvider`, wrapping whatever reads the
 * position:
 *
 * ```tsx
 * <EditorProvider initialConfig={...}>
 *   <DndProvider>
 *     <PortableTextEditable />
 *   </DndProvider>
 * </EditorProvider>
 * ```
 *
 * Reads via {@link useDropPosition} only re-render when the drop position
 * at their own path changes.
 *
 * @beta
 */
declare function DndProvider(props: {
  children?: ReactNode;
}): import("react").JSX.Element;
/**
 * Read where a drop would land relative to the block at `path`: `'start'`,
 * `'end'`, or `undefined` when no drag is hovering this block. Re-renders
 * only when the position at this path changes.
 *
 * `path` is the keyed block path render callbacks receive, e.g.
 * `[{_key: 'b0'}]`.
 *
 * @beta
 */
declare function useDropPosition(path: Path): DropPosition['position'] | undefined;
export { DndProvider, type DropPosition, useDropPosition };
//# sourceMappingURL=index.d.ts.map