import { RationalTime } from "@techsquidtv/canvas-timeline-utils"; import { TimelineCommandResult } from "@techsquidtv/canvas-timeline-core"; //#region src/hooks/viewport/useTimelineViewport.d.ts /** Result returned by `useTimelineViewport`. */ interface UseTimelineViewportResult { /** Current horizontal timeline scroll offset in pixels. */ scrollLeft: number; /** Current vertical timeline scroll offset in pixels. */ scrollTop: number; /** Current zoom scale in pixels per second. */ zoomScale: number; /** Measured timeline viewport width in pixels. */ viewportWidth: number; /** Measured timeline viewport height in pixels. */ viewportHeight: number; /** Explicit timeline duration, or undefined when duration follows content bounds. */ duration: RationalTime | undefined; /** Maximum timeline content time used for playback and scroll bounds. */ maxContentTime: RationalTime; /** Maximum horizontal scroll offset for the current viewport and content duration. */ maxScrollLeft: number; /** Maximum vertical scroll offset for the current viewport and track stack. */ maxScrollTop: number; /** Raw viewport duration represented by the current width and zoom. */ viewportDurationTime: RationalTime; /** Raw viewport duration in seconds represented by the current width and zoom. */ viewportDurationSeconds: number; /** Visible viewport start time. */ visibleStartTime: RationalTime; /** Visible viewport end time, clamped to content bounds. */ visibleEndTime: RationalTime; /** Visible viewport duration, clamped to content bounds. */ visibleDurationTime: RationalTime; /** Visible viewport start time in seconds for display-only UI. */ visibleStartSeconds: number; /** Visible viewport end time in seconds for display-only UI. */ visibleEndSeconds: number; /** Visible viewport duration in seconds for display-only UI. */ visibleDurationSeconds: number; /** Sets horizontal scroll offset, with final clamping delegated to the engine. */ setScrollLeft: (scrollLeft: number) => TimelineCommandResult; /** Sets vertical scroll offset, with final clamping delegated to the engine. */ setScrollTop: (scrollTop: number) => TimelineCommandResult; /** Sets zoom scale, with final clamping delegated to the engine. */ setZoomScale: (zoomScale: number) => TimelineCommandResult; /** Stores the measured timeline viewport width in the engine. */ setViewportWidth: (width: number) => TimelineCommandResult; /** Stores the measured timeline viewport height in the engine. */ setViewportHeight: (height: number) => TimelineCommandResult; /** Sets an explicit timeline duration, or clears it when passed undefined. */ setDuration: (duration: RationalTime | undefined) => TimelineCommandResult; } /** * Provides canonical viewport metrics and setters for custom timeline chrome. * * @returns Viewport metrics, visible time range, and viewport setters. */ declare function useTimelineViewport(): UseTimelineViewportResult; //#endregion export { UseTimelineViewportResult, useTimelineViewport }; //# sourceMappingURL=useTimelineViewport.d.mts.map