import { type ReactNode } from "react"; import { usePlayerStore, type TimelineElement } from "../store/playerStore"; import type { TrackVisualStyle } from "./timelineIcons"; function ClipLintDot({ element }: { element: TimelineElement }) { const lint = usePlayerStore((s) => s.lintFindingsByElement.get(element.key ?? element.id)); if (!lint || lint.count === 0) return null; return ( ); } export function renderClipChildren( element: TimelineElement, clipStyle: TrackVisualStyle, renderClipContent: | ((element: TimelineElement, style: { clip: string; label: string }) => ReactNode) | undefined, renderClipOverlay: ((element: TimelineElement) => ReactNode) | undefined, ): ReactNode { return ( <> {renderClipOverlay?.(element)} {!renderClipContent && } {renderClipContent && ( // borderRadius: inherit — the clip itself is overflow-visible (keyframe // diamonds hang outside its bounds), so the thumbnail layer must clip // itself to the clip's rounded corners or sharp corners poke out.
{renderClipContent(element, clipStyle)}
)} ); }