import { type PropType } from "vue"; import { vec } from "../vec"; export type ConstraintFunction = (position: vec.Vector2) => vec.Vector2; export interface MovablePointProps { /** The current position `[x, y]` of the point. */ point: vec.Vector2; /** A callback that is called as the user moves the point. */ onMove: (point: vec.Vector2) => void; /** * 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 mouse position * `[x, y]` to the position the point should "snap" to. */ constrain?: ConstraintFunction; color?: string; } export declare const MovablePoint: import("vue").DefineComponent<{ /** The current position `[x, y]` of the point. */ point: { type: PropType; required: true; }; /** A callback that is called as the user moves the point. */ onMove: { type: PropType<(point: vec.Vector2) => void>; required: true; }; /** * 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 mouse position * `[x, y]` to the position the point should "snap" to. */ constrain: { type: PropType; default: (point: vec.Vector2) => vec.Vector2; required: false; }; color: { type: StringConstructor; default: string; required: false; }; }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly; required: true; }; /** A callback that is called as the user moves the point. */ onMove: { type: PropType<(point: vec.Vector2) => void>; required: true; }; /** * 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 mouse position * `[x, y]` to the position the point should "snap" to. */ constrain: { type: PropType; default: (point: vec.Vector2) => vec.Vector2; required: false; }; color: { type: StringConstructor; default: string; required: false; }; }>>, { color: string; constrain: ConstraintFunction; }>;