Module

React.DndKit.Types

Package
purescript-react-dnd-kit
Repository
i-am-the-slime/purescript-react-dnd-kit

#Coordinates Source

type Coordinates = { x :: Number, y :: Number }

2D coordinates

#CallbackRef Source

data CallbackRef

Callback ref passed to DOM elements for dnd-kit to track them. Pass this as the ref prop on your DOM element.

#DragType Source

newtype DragType

Matching type for draggables and droppables. Draggables with a given type can only be dropped on droppables that accept that type.

Constructors

Instances

#FeedbackType Source

newtype FeedbackType

Visual feedback strategy during drag.

Instances

#Source Source

type Source = { element :: Maybe Element, id :: DraggableId }

Source entity in a drag operation

#Target Source

type Target = { element :: Maybe Element, id :: DroppableId }

Target entity in a drag operation

#DragOperationSnapshot Source

type DragOperationSnapshot = { activatorEvent :: Maybe Event, canceled :: Boolean, position :: { current :: Coordinates, initial :: Coordinates }, source :: Maybe Source, target :: Maybe Target, transform :: Coordinates }

Snapshot of the current drag operation, available on all events

#DragStartEvent Source

type DragStartEvent = { operation :: DragOperationSnapshot }

#DragMoveEvent Source

#DragOverEvent Source

type DragOverEvent = { operation :: DragOperationSnapshot }

#DragEndEvent Source

type DragEndEvent = { canceled :: Boolean, operation :: DragOperationSnapshot }

#CollisionEvent Source

type CollisionEvent = { collisions :: Array Collision }

#DragDropManager Source

data DragDropManager

The central drag-drop manager (opaque)

#Collision Source

data Collision

A collision result (opaque)

#CollisionDetector Source

data CollisionDetector

A collision detector function (opaque)

#Sensor Source

data Sensor

Sensor class or configured descriptor (opaque)

#Plugin Source

data Plugin

Plugin class or configured descriptor (opaque)

#Modifier Source

data Modifier

Modifier class or configured descriptor (opaque)

#DraggableInstance Source

data DraggableInstance

Draggable instance (opaque)

#DroppableInstance Source

data DroppableInstance

Droppable instance (opaque)

#SortableInstance Source

data SortableInstance

Sortable instance (opaque)

#DndEffect Source

data DndEffect

Reactive effect for advanced usage (opaque)

#callbackRef Source

callbackRef :: forall a. CallbackRef -> a

Convert a CallbackRef to any ref type expected by DOM elements.