import { RationalTime } from "@techsquidtv/canvas-timeline-utils"; import { Marker, TimelineCommandResult, TimelineReadonly } from "@techsquidtv/canvas-timeline-core"; //#region src/hooks/markers/useTimelineMarkers.d.ts /** Editable marker fields accepted by `useTimelineMarkers().updateMarker`. */ type TimelineMarkerUpdate = Partial>; /** Result returned by `useTimelineMarkers`. */ interface UseTimelineMarkersResult { /** Current timeline markers sorted by time. */ markers: readonly TimelineReadonly[]; /** Adds a marker at a timeline time. */ addMarker: (time: RationalTime, label?: string, color?: string, description?: string) => TimelineCommandResult>; /** Adds a marker at the current playhead. */ addMarkerAtPlayhead: (label?: string, color?: string, description?: string) => TimelineCommandResult>; /** Removes a marker by id. */ removeMarker: (id: string) => TimelineCommandResult; /** Updates marker metadata by id. */ updateMarker: (id: string, updates: TimelineMarkerUpdate) => TimelineCommandResult>; /** Moves the playhead to a marker by id. */ seekToMarker: (id: string) => TimelineCommandResult>; /** Moves the playhead to the next marker after the current playhead. */ seekToNextMarker: () => TimelineCommandResult>; /** Moves the playhead to the previous marker before the current playhead. */ seekToPreviousMarker: () => TimelineCommandResult>; } /** * Accesses and manages bookmark/annotation pins (markers). * * This canonical marker hook does not subscribe to live playhead ticks. Compose * it with `useActiveMarkers` when UI needs marker proximity at the current * playhead. * * @returns Sorted marker state and commands for adding, removing, updating, and seeking markers. */ declare function useTimelineMarkers(): UseTimelineMarkersResult; //#endregion export { TimelineMarkerUpdate, UseTimelineMarkersResult, useTimelineMarkers }; //# sourceMappingURL=useTimelineMarkers.d.mts.map