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

21 lines (20 loc) 1.01 kB
import { IBaseOptions, IDragActivationOptions, IDraggableEvents, IModifierOptions, IPlacement, IPlacementMargins, TDnDNodeRef, TDraggablePayload } from '../types'; import { Component, ComputedRef, Ref, WritableComputedRef } from 'vue'; interface IMakeDraggableOptions extends IBaseOptions { events?: IDraggableEvents; modifier?: IModifierOptions; render?: Component; dragHandle?: string | Ref<string>; activation?: IDragActivationOptions; placementMargins?: IPlacementMargins; data?: () => unknown; } interface IMakeDraggableReturnType { selected: WritableComputedRef<boolean>; isDragging: ComputedRef<boolean>; isAllowed: ComputedRef<boolean>; isDragOver: ComputedRef<IPlacement | undefined>; } export declare function makeDraggable(ref: TDnDNodeRef, payload?: TDraggablePayload): IMakeDraggableReturnType; export declare function makeDraggable(ref: TDnDNodeRef, options: IMakeDraggableOptions, payload?: TDraggablePayload): IMakeDraggableReturnType; export {};