Interface

UseTimelineSelectionResult

Result returned by `useTimelineSelection`.

Usage notes

The result is the shared selection model used by clip inspectors, track headers, grouping controls, clipboard commands, and edit toolbars. It includes both primary selection fields and multi-selection arrays so product chrome can avoid re-deriving selection from raw tracks.

Signature

Type Definition
Interface UseTimelineSelectionResult

Type parameters

NameConstraintDefaultDescription
TrackKindNonestringApp-defined track kind values carried by selected tracks.

Properties

NameSignatureDescription
clearSelection(): voidClears both clip and track selection.
hasSelectionhasSelection: booleanWhether any clip or track is selected.
selectClip(clipId: string | null): voidSelects a clip by id, or clears clip selection when passed null.
selectClips(clipIds: typeOperator): voidSelects multiple clips by id, clearing clips not included.
selectedClipselectedClip: Clip | nullCurrently selected clip, or null when no clip is selected.
selectedClipIdselectedClipId: string | nullID of the currently selected clip, or null when no clip is selected.
selectedClipIdsselectedClipIds: string[]IDs of all selected clips in track order.
selectedClipsselectedClips: Clip[]All selected clips in track order.
selectedClipTrackIdselectedClipTrackId: string | nullID of the track containing the selected clip, or null when no clip is selected.
selectedGroupselectedGroup: TimelineClipGroup | nullSelected group when the primary selected clip belongs to one.
selectedGroupIdselectedGroupId: string | nullSelected group id when the primary selected clip belongs to one.
selectedTrackselectedTrack: Track<TrackKind> | nullCurrently selected track, or null when no track row is selected.
selectedTrackIdselectedTrackId: string | nullID of the currently selected track, or null when no track row is selected.
selectTrack(trackId: string | null): voidSelects a track by id, or clears track selection when passed null.
toggleClipSelection(clipId: string, selected?: boolean): booleanToggles one clip in the current multi-selection.