@@ -5,7 +5,6 @@ interface CompositionThumbnailProps {
55 previewUrl : string ;
66 label : string ;
77 labelColor : string ;
8- accentColor ?: string ;
98 selector ?: string ;
109 selectorIndex ?: number ;
1110 seekTime ?: number ;
@@ -16,7 +15,6 @@ interface CompositionThumbnailProps {
1615
1716const CLIP_HEIGHT = 66 ;
1817const THUMBNAIL_URL_VERSION = "v3" ;
19- const COMPOSITION_THUMBNAIL_LABEL_Z_INDEX = 10 ;
2018
2119export function buildCompositionThumbnailUrl ( {
2220 previewUrl,
@@ -53,7 +51,6 @@ export const CompositionThumbnail = memo(function CompositionThumbnail({
5351 previewUrl,
5452 label,
5553 labelColor,
56- accentColor = "#6B7280" ,
5754 selector,
5855 selectorIndex,
5956 seekTime = 2 ,
@@ -110,8 +107,11 @@ export const CompositionThumbnail = memo(function CompositionThumbnail({
110107 className = "hidden"
111108 />
112109
113- { loaded ? (
114- < div className = "absolute inset-0 flex" >
110+ { loaded && (
111+ < div
112+ className = "absolute inset-0 flex"
113+ style = { { animation : "hf-thumb-fade 200ms ease-out" , mixBlendMode : "lighten" } }
114+ >
115115 { Array . from ( { length : frameCount } ) . map ( ( _ , i ) => (
116116 < div
117117 key = { i }
@@ -122,59 +122,25 @@ export const CompositionThumbnail = memo(function CompositionThumbnail({
122122 src = { url }
123123 alt = ""
124124 draggable = { false }
125- className = "absolute inset-0 h-full w-full object-cover opacity-60"
125+ className = "absolute inset-0 h-full w-full object-cover"
126+ style = { { opacity : 0.7 } }
126127 />
127128 </ div >
128129 ) ) }
129130 </ div >
130- ) : (
131- < div
132- className = "absolute inset-0 animate-pulse"
133- style = { {
134- background :
135- "linear-gradient(90deg, rgba(255,255,255,0.02) 0%, rgba(255,255,255,0.05) 50%, rgba(255,255,255,0.02) 100%)" ,
136- } }
137- />
138131 ) }
139132
140- < div
141- className = "absolute inset-0"
142- style = { {
143- background : `linear-gradient(120deg, ${ accentColor } 2e, transparent 34%), linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.08))` ,
144- } }
145- />
146-
147- < div
148- className = "absolute left-2 top-2"
149- style = { { zIndex : COMPOSITION_THUMBNAIL_LABEL_Z_INDEX } }
150- >
133+ < div className = "absolute left-3 top-0 bottom-0 flex items-center" style = { { zIndex : 10 } } >
151134 < span
152- className = "block max-w-full truncate rounded-md px-1.5 py-0.5 text-[9px ] font-semibold uppercase leading-none"
135+ className = "block max-w-full truncate text-[10px ] font-semibold leading-none"
153136 style = { {
154137 color : labelColor ,
155- background : `${ accentColor } 2e` ,
156- boxShadow : `inset 0 0 0 1px ${ accentColor } 40` ,
138+ textShadow : loaded ? "0 1px 4px rgba(0,0,0,0.9), 0 0 8px rgba(0,0,0,0.6)" : "none" ,
157139 } }
158140 >
159141 { label }
160142 </ span >
161143 </ div >
162-
163- < div
164- className = "absolute bottom-0 left-0 right-0 px-1.5 pb-0.5 pt-3"
165- style = { {
166- zIndex : COMPOSITION_THUMBNAIL_LABEL_Z_INDEX ,
167- background :
168- "linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 60%, transparent 100%)" ,
169- } }
170- >
171- < span
172- className = "block truncate text-[9px] font-semibold leading-tight"
173- style = { { color : labelColor , textShadow : "0 1px 2px rgba(0,0,0,0.9)" } }
174- >
175- { label }
176- </ span >
177- </ div >
178144 </ div >
179145 ) ;
180146} ) ;
0 commit comments