Primitives / foldkit-primitives/dom

Move

const · packages/primitives/src/dom/move.ts:48

const Move: Mount.MountDefinitionNoArgs<
  'Move',
  | {
      readonly _tag: 'MoveStarted'
      readonly pointerId: number
      readonly pointerType: string
    }
  | {
      readonly _tag: 'Moved'
      readonly pointerId: number
      readonly deltaX: number
      readonly deltaY: number
      readonly pointerType: string
    }
  | {
      readonly _tag: 'MoveEnded'
      readonly pointerId: number
      readonly completed: boolean
    }
>

Pointer movement on an element as a Mount: a primary-button pointer down captures the pointer, each move reports the delta from where it started, and up, cancel, or lost capture ends it. Nothing is decided here: a drag threshold, a snap, or a constraint is the parent's update. Capture is released with the Mount.