UNPKG

@vue-dnd-kit/core

Version:

Core functionality for Vue DnD Kit - a lightweight Vue 3 library for building performant and accessible drag and drop interfaces

22 lines (21 loc) 1.09 kB
import { IBaseOptions, IDroppableEvents, IPlacement, TDnDNodeRef, TDroppablePayload, TModifierMethod } from '../types'; import { ComputedRef } from 'vue'; interface IMakeDroppableOptions extends IBaseOptions { /** * Group matching strategy. * - `'every'` (default): zone is accessible only if ALL dragged items match zone's groups. * - `'some'`: zone is accessible if AT LEAST ONE dragged item matches. * Invalid items are filtered out at drop time (or handled via `events.onValidate`). */ groupMatch?: TModifierMethod; events?: IDroppableEvents; data?: () => unknown; } interface IMakeDroppableReturnType { isAllowed: ComputedRef<boolean>; isDragOver: ComputedRef<IPlacement | undefined>; } export declare function makeDroppable(ref: TDnDNodeRef): IMakeDroppableReturnType; export declare function makeDroppable(ref: TDnDNodeRef, options: IMakeDroppableOptions, payload?: TDroppablePayload): IMakeDroppableReturnType; export declare function makeDroppable(ref: TDnDNodeRef, payload: TDroppablePayload): IMakeDroppableReturnType; export {};