@@ -32,6 +32,8 @@ import { queryTimelineClipIndex } from "../lib/timelineClipIndex";
3232import { getTimelineElementIdentity } from "../lib/timelineElementHelpers" ;
3333import { timelineClipFocusId } from "./timelineNavigationIdentity" ;
3434import { useTimelineKeyboardActor } from "./useTimelineKeyboardActor" ;
35+ import { deriveTimelineTransitionSeams } from "./timelineTransitionSeams" ;
36+ import { TimelineTransitionOverlays } from "./TimelineTransitionOverlays" ;
3537
3638export function TimelineLanes ( {
3739 pps,
@@ -104,13 +106,15 @@ export function TimelineLanes({
104106 const { collapsedGroupIds, expandedLaneOwnerIds, toggleGroupExpanded, toggleLaneOwnerExpanded } =
105107 useTimelineGroupDisclosure ( ) ;
106108 const automationLanes = useAutomationLanes ( ) ;
109+ const allTransitionElements = useMemo (
110+ ( ) => tracks . flatMap ( ( [ , elements ] ) => elements . map ( getPreviewElement ) ) ,
111+ [ getPreviewElement , tracks ] ,
112+ ) ;
107113 // A group's automation clock is COMPOSITION time (groups doc §1.3), so its
108114 // synthetic lane element spans the whole composition rather than a clip.
109115 const compositionDuration = usePlayerStore ( ( s ) => s . duration ) ;
110116 useAutomationSelectionKeyboard ( { lanes : automationLanes } ) ;
111117 const { logicalRowsByTrack, groupByAnchor } = useTimelineLaneRowIndexes ( logicalRows , groups ) ;
112- // Which tracks are group MEMBERS, so their headers can render the level-2
113- // nesting their `aria-level` already reports.
114118 const groupMemberTracks = useMemo (
115119 ( ) => new Set ( groups . flatMap ( ( group ) => group . memberTracks ) ) ,
116120 [ groups ] ,
@@ -197,11 +201,7 @@ export function TimelineLanes({
197201 const ts = trackStyles . get ( trackNum ) ?? getTrackStyle ( "" ) ;
198202 const isPendingTrack =
199203 draggedClip ?. started === true && ! trackOrder . includes ( trackNum ) && els . length === 0 ;
200- // All lanes use the same uniform color — no alternating stripes.
201204 const rowBackground = theme . rowBackground ;
202- // The beat-dot strip occupies the top of this track's lane (active track,
203- // or the music track when nothing is selected). When shown, keyframe
204- // diamonds shrink + drop to the bottom half so they don't collide with it.
205205 const beatStripOnTrack = trackShowsBeatStrip ( els , beatAnalysis ?. beatTimes , {
206206 selectedElementId,
207207 isMusicTrack,
@@ -223,9 +223,10 @@ export function TimelineLanes({
223223 // property lanes are showing. Undefined means "fill the row", which is
224224 // right only while it is collapsed and the row is nothing but bar.
225225 const clipBarHeight = rowExpanded ? TRACK_H - 2 * CLIP_Y : undefined ;
226- // The clips whose envelopes this row draws, at their dragged positions.
227- // Once per row, not once per clip in the map below.
228226 const automationElements = els . map ( getPreviewElement ) ;
227+ const transitionSeams = deriveTimelineTransitionSeams ( allTransitionElements ) . filter (
228+ ( seam ) => seam . incoming . track === trackNum ,
229+ ) ;
229230 // Minted here because this is the only place that sees BOTH ends of
230231 // the disclosure: the caret in the sticky header and the diamond lanes
231232 // on the canvas. Keyed by display row, not by `trackNum`, which is a
@@ -553,6 +554,12 @@ export function TimelineLanes({
553554 ) ;
554555 } )
555556 }
557+ < TimelineTransitionOverlays
558+ seams = { transitionSeams }
559+ pixelsPerSecond = { pps }
560+ rowHeight = { rowHeight }
561+ clipBarHeight = { clipBarHeight }
562+ />
556563 { /* The automation lanes belong to the ROW, so they are mounted
557564 here rather than under the active clip's property lanes.
558565 Hanging off that clip meant selecting a sibling moved the
0 commit comments