import { RationalTime } from "@techsquidtv/canvas-timeline-utils"; import { SnapPreparationOptions, TimelineCommandResult, TimelineReadonly, TimelineSnapFeedback, TimelineSnapResult, TimelineSnapTarget } from "@techsquidtv/canvas-timeline-core"; //#region src/hooks/editing/useTimelineSnapping.d.ts /** Result returned by `useTimelineSnapping`. */ interface UseTimelineSnappingResult { /** Whether magnetic snapping is enabled. */ enabled: boolean; /** Magnetic snap radius in screen pixels. */ thresholdPixels: number; /** Current transient snap feedback for canvas guides and UI status. */ feedback: TimelineReadonly; /** Currently active snap target, or null when nothing is snapped. */ activeTarget: TimelineSnapTarget | null; /** Enables or disables magnetic snapping. */ setEnabled: (enabled: boolean) => TimelineCommandResult; /** Sets the magnetic snap radius in screen pixels. */ setThresholdPixels: (thresholdPixels: number) => TimelineCommandResult; /** Prepares snap targets for an upcoming interaction. */ prepareSnapping: (options?: string | SnapPreparationOptions) => TimelineCommandResult; /** Resolves a candidate time against the prepared snap target index. */ resolveSnap: (time: RationalTime, publishFeedback?: boolean) => TimelineSnapResult | null; /** Finalizes an interaction and clears transient snap feedback. */ settle: () => TimelineCommandResult; } /** * Provides the canonical snapping state and commands for editor UI. * * @returns Snap settings, active feedback, and commands for preparing/resolving snap targets. */ declare function useTimelineSnapping(): UseTimelineSnappingResult; //#endregion export { UseTimelineSnappingResult, useTimelineSnapping }; //# sourceMappingURL=useTimelineSnapping.d.mts.map