import { TimelineControlCommitDetails } from "../core/timelineControlEvents.mjs"; //#region src/hooks/playback/useTimelinePlayheadControl.d.ts /** * Options for adapting the timeline playhead to a scalar control. */ interface TimelinePlayheadControlOptions { /** Minimum timeline time in seconds. Defaults to 0. */ min?: number; /** Maximum timeline time in seconds. Defaults to timeline duration/content end. */ max?: number; /** Slider step in seconds for consumers using slider primitives. */ step?: number; /** Accessible label for the playhead control. */ label?: string; /** * Called after the hook applies a committed control value to the engine. * * When the underlying scalar control provides commit details, Canvas Timeline * forwards them unchanged as the second argument and does not read their * fields. */ onValueCommitted?: (value: number[], eventDetails?: TimelineControlCommitDetails) => void; } /** * Adapts the timeline playhead to a Base UI-compatible scalar slider. * * Use this hook when an application wants its own playhead scrubber, time field, * or transport control while preserving the shared `TimelineEngine` state. It * composes with `useTimelinePlayback`, which exposes imperative transport * commands without subscribing to live playhead ticks. * * @param options - Optional bounds, step size, label, and commit callback for the playhead control. * @returns Current playhead seconds, formatted value text, imperative setters, and props for `Slider.Root` plus `Slider.Thumb`. * * @example * ```tsx * const playhead = useTimelinePlayheadControl(); * * return ( * * * * * * * * * ); * ``` */ declare function useTimelinePlayheadControl(options?: TimelinePlayheadControlOptions): { /** Accessible label used by the default thumb props. */ label: string; /** Maximum playhead time in seconds. */ max: number; /** Minimum playhead time in seconds. */ min: number; /** Slider step in seconds. */ step: number; /** Current playhead time in seconds. */ value: number; /** Formatted playhead value for assistive technology. */ valueText: any; /** Moves the playhead to an absolute time in seconds without settling history. */ setValue: (nextValue: number) => void; /** Moves the playhead by a relative number of seconds. */ stepBy: (deltaSeconds: number) => void; /** Moves the playhead and settles the engine interaction. */ commit: (nextValue?: number) => void; /** Formats a timeline second value for `aria-valuetext`. */ getAriaValueText: any; /** Props for a Base UI `Slider.Root`. */ rootProps: any; /** Props for a Base UI `Slider.Thumb`. */ thumbProps: any; }; //#endregion export { TimelinePlayheadControlOptions, useTimelinePlayheadControl }; //# sourceMappingURL=useTimelinePlayheadControl.d.mts.map