import type { ElementsMap, ExcalidrawElement } from "@excalidraw/element/types"; import type { Scene } from "@excalidraw/element"; import { useApp, useExcalidrawSetAppState } from "../App"; import "./DragInput.scss"; import type { StatsInputProperty } from "./utils"; import type { AppState } from "../../types"; export type DragInputCallbackType

= (props: { accumulatedChange: number; instantChange: number; originalElements: readonly E[]; originalElementsMap: ElementsMap; shouldKeepAspectRatio: boolean; shouldChangeByStepSize: boolean; scene: Scene; nextValue?: number; property: P; originalAppState: AppState; setInputValue: (value: number) => void; app: ReturnType; setAppState: ReturnType; }) => void; export type DragFinishedCallbackType = (props: { app: ReturnType; setAppState: ReturnType; originalElements: readonly E[] | null; originalAppState: AppState; }) => void; interface StatsDragInputProps { label: string | React.ReactNode; icon?: React.ReactNode; value: number | "Mixed"; elements: readonly E[]; editable?: boolean; shouldKeepAspectRatio?: boolean; dragInputCallback: DragInputCallbackType; property: T; scene: Scene; appState: AppState; /** how many px you need to drag to get 1 unit change */ sensitivity?: number; dragFinishedCallback?: DragFinishedCallbackType; } declare const StatsDragInput: ({ label, icon, dragInputCallback, value, elements, editable, shouldKeepAspectRatio, property, scene, appState, sensitivity, dragFinishedCallback, }: StatsDragInputProps) => import("react/jsx-runtime").JSX.Element | null; export default StatsDragInput;