import { type ComputedRef, type DefineComponent, type Ref } from "vue"; import type { vec } from "../vec"; export type ConstraintFunction = (position: vec.Vector2) => vec.Vector2; export interface UseMovablePointArguments { color?: string; /** * Constrain the point to only horizontal movement, vertical movement, or mapped movement. * * In mapped movement mode, you must provide a function that maps the user's attempted position * (x, y) to the position the point should "snap" to. */ constrain?: "horizontal" | "vertical" | ConstraintFunction; } export interface UseMovablePoint { x: Ref; y: Ref; point: Ref; element: ComputedRef; } export declare function useMovablePoint(initialPoint: vec.Vector2, { constrain, color }?: UseMovablePointArguments): UseMovablePoint;