import { TimelineControlCommitDetails } from "../core/timelineControlEvents.mjs"; //#region src/hooks/viewport/useTimelineInOutRangeControl.d.ts /** * Options for adapting timeline In/Out points to a range control. */ interface TimelineInOutRangeControlOptions { /** Minimum timeline time in seconds. Defaults to 0. */ min?: number; /** Maximum timeline time in seconds. Defaults to timeline duration or 100. */ max?: number; /** Whether pointer-driven changes should snap to timeline targets. */ snap?: boolean; /** Slider step in seconds for consumers using slider primitives. */ step?: number; /** Accessible label for the in-point thumb. */ inLabel?: string; /** Accessible label for the out-point thumb. */ outLabel?: string; /** * Called after the hook applies a committed range value to the engine. * * When the underlying range control provides commit details, Canvas Timeline * forwards them unchanged as the second argument and does not read their * fields. */ onValueCommitted?: (value: readonly number[], eventDetails?: TimelineControlCommitDetails) => void; } /** * Change metadata emitted by Base UI range slider interactions. */ interface RangeChangeDetails { /** Index of the thumb that produced the value change. */ activeThumbIndex?: number; /** Base UI interaction reason for the value change. */ reason?: string; } /** * Adapts timeline In/Out points to a Base UI-compatible range slider. * * The hook keeps loop or export boundaries in sync with `TimelineEngine` * `inPoint` and `outPoint` values while returning semantic labels and * `aria-valuetext` strings for each thumb. `Timeline.RangeSelector.Root` uses * this hook internally; consumers can call it directly when composing their own * Base UI slider surface. * * @param options - Optional bounds, step size, thumb labels, and commit callback. * @returns Current In/Out values in seconds, formatted range text, engine commands, and props for range slider root and thumbs. * * @example * ```tsx * const range = useTimelineInOutRangeControl(); * * return ( * * * * * * * * * * ); * ``` */ declare function useTimelineInOutRangeControl(options?: TimelineInOutRangeControlOptions): { /** Maximum timeline boundary time in seconds. */ max: number; /** Minimum timeline boundary time in seconds. */ min: number; /** Slider step in seconds. */ step: number; /** Current `[inPoint, outPoint]` values in seconds. */ value: [number, number]; /** Formatted range summary for assistive technology. */ valueText: any; /** Formatted in-point value for assistive technology. */ inValueText: any; /** Formatted out-point value for assistive technology. */ outValueText: any; /** Updates In/Out points from second values without settling history. */ setValue: (nextValue: number[], eventDetails?: RangeChangeDetails) => void; /** Clears both In and Out points. */ clear: () => void; /** Updates In/Out points and settles the engine interaction. */ commit: (nextValue?: [number, number]) => void; /** Formats a timeline second value for `aria-valuetext`. */ getAriaValueText: (nextValue: number) => any; /** Props for a Base UI `Slider.Root`. */ rootProps: { min: number; max: number; step: number; value: [number, number]; onValueChange: (nextValue: number[], eventDetails?: RangeChangeDetails) => void; onValueCommitted: (values: readonly number[], eventDetails?: TimelineControlCommitDetails) => void; }; /** Props for the Base UI thumb controlling the In point. */ inThumbProps: { 'aria-label': string; 'aria-valuetext': any; }; /** Props for the Base UI thumb controlling the Out point. */ outThumbProps: { 'aria-label': string; 'aria-valuetext': any; }; }; //#endregion export { RangeChangeDetails, TimelineInOutRangeControlOptions, useTimelineInOutRangeControl }; //# sourceMappingURL=useTimelineInOutRangeControl.d.mts.map