{ // when hmr happens, skeleton is initialized to true by default // normally, loading asset-grid is part of a navigation event, and the completion of // that event triggers a scroll-to-asset, if necessary, when then clears the skeleton. // this handler will run the navigation/scroll-to-asset handler when hmr is performed, // preventing skeleton from showing after hmr const finishHmr = () => { const asset = $page.url.searchParams.get('at'); if (asset) { $gridScrollTarget = { at: asset }; } void completeNav(); }; const assetGridUpdate = payload.updates.some((update) => update.path.endsWith('base-timeline-viewer.svelte')); if (assetGridUpdate) { // wait 500ms for the update to be fully swapped in setTimeout(finishHmr, 500); } }} /> {@render header?.(scrollTo)}
((timelineManager.viewportWidth = v), updateSlidingWindow())} bind:this={element} onscroll={() => (handleTimelineScroll(), updateSlidingWindow(), updateIsScrolling())} >
{@render children?.()} {#if isEmpty} {@render empty?.()} {/if}
{#each timelineManager.months as monthGroup (monthGroup.viewId)} {@const display = monthGroup.intersecting} {@const absoluteHeight = monthGroup.top} {#if !monthGroup.isLoaded}
{:else if display}
{ if (isSingleSelect) { scrollTo(0); } onSelect?.(asset); }} onScrollCompensationMonthInDOM={scrollCompensation} />
{/if} {/each}