import type { SharedValue } from 'react-native-reanimated'; /** * Core drag state values that are always reset together. * These represent the fundamental drag operation state. */ export interface CoreDragStateValues { globalIsDragging: SharedValue; draggedIndex: SharedValue; draggedItemId: SharedValue; currentTranslateY: SharedValue; dragStartScrollOffset: SharedValue; measuredItemHeight: SharedValue; draggedItemSettled: SharedValue; } /** * Overlay state values for the crossfade system. * Setting overlayActive to false triggers the crossfade fade-out. */ export interface OverlayStateValues { overlayActive: SharedValue; } /** * Full overlay state values including all overlay-related SharedValues. * Used when we need to fully clear overlay state (e.g., onFinalize). */ export interface FullOverlayStateValues extends OverlayStateValues { overlayItemId: SharedValue; overlayTranslateY: SharedValue; overlayReady: SharedValue; overlayVisible: SharedValue; } /** * Drop state values that track the dropping animation phase. */ export interface DropStateValues { isDropping: SharedValue; expectedDropIndex: SharedValue; reorderInFlight: SharedValue; dropCommitVersion: SharedValue; } /** * Shifted overlay position info captured at drop time. */ export interface ShiftedOverlayPosition { baseY: number; height: number; shift: number; scrollAtCapture: number; } /** * Shifted overlay state values for the shifted items mask system. */ export interface ShiftedOverlayStateValues { shiftedOverlaysActive: SharedValue; shiftedOverlays: SharedValue>; pendingOverlayCount: SharedValue; reorderRequested: SharedValue; } /** * Gesture state values (local to the drag gesture). */ export interface GestureStateValues { isDragging: SharedValue; translateY: SharedValue; draggedScale: SharedValue; hoveredIndex: SharedValue; } /** * Reset core drag state values. * * This is the minimal reset needed to clear the drag operation state. * Call this when a drag ends without position change (same-position drop). * * @worklet - This function runs on the UI thread */ export declare function resetCoreDragState(values: CoreDragStateValues): void; /** * Reset overlay state to trigger crossfade fade-out. * * Setting overlayActive to false triggers the crossfade animation. * The crossfade completion callback will clear remaining overlay state. * * @worklet - This function runs on the UI thread */ export declare function resetOverlayState(values: OverlayStateValues): void; /** * Reset full overlay state including all values. * * Use this only when you need immediate cleanup without crossfade * (e.g., gesture cancellation in onFinalize). * * @worklet - This function runs on the UI thread */ export declare function resetFullOverlayState(values: FullOverlayStateValues): void; /** * Reset drop state values. * * Call this when the drop animation completes or needs to be cancelled. * * @worklet - This function runs on the UI thread */ export declare function resetDropState(values: DropStateValues): void; /** * Reset shifted overlay state values. * * Call this when the shifted items mask system needs to be cleared. * * @worklet - This function runs on the UI thread */ export declare function resetShiftedOverlayState(values: ShiftedOverlayStateValues): void; /** * Reset gesture-local state values. * * Call this when the gesture is cancelled or finalized unsuccessfully. * * @worklet - This function runs on the UI thread */ export declare function resetGestureState(values: GestureStateValues): void; /** * Combined state values for full reset operations. */ export interface AllDragStateValues extends CoreDragStateValues, FullOverlayStateValues, DropStateValues, GestureStateValues { } /** * Reset all drag state values at once. * * Use this for complete cleanup, such as in onFinalize when gesture fails. * Note: This does NOT reset shifted overlay state - use resetShiftedOverlayState * separately if needed. * * @worklet - This function runs on the UI thread */ export declare function resetAllDragState(values: AllDragStateValues): void; //# sourceMappingURL=dragStateReset.d.ts.map