{#if isShowDeleteConfirmation} (isShowDeleteConfirmation = false)} onConfirm={() => handlePromiseError(trashOrDelete(true))} /> {/if} {#if showShortcuts} (showShortcuts = !showShortcuts)} /> {/if} {#if $assetStore.buckets.length > 0} {/if}
((viewport.width = width), (viewport.height = height))} bind:this={element} onscroll={() => ((assetStore.lastScrollTime = Date.now()), handleTimelineScroll())} >
((topSectionHeight = height), (topSectionOffset = target.offsetTop))} class:invisible={showSkeleton} > {@render children?.()} {#if isEmpty} {@render empty?.()} {/if}
{#each $assetStore.buckets as bucket (bucket.viewId)} {@const isPremeasure = preMeasure.includes(bucket)} {@const display = bucket.intersecting || bucket === $assetStore.pendingScrollBucket || isPremeasure}
handleIntersect(bucket), onSeparate: () => handleSeparate(bucket), top: BUCKET_INTERSECTION_ROOT_TOP, bottom: BUCKET_INTERSECTION_ROOT_BOTTOM, root: element, }} data-bucket-display={bucket.intersecting} data-bucket-date={bucket.bucketDate} style:height={bucket.bucketHeight + 'px'} > {#if display && !bucket.measured} (preMeasure = preMeasure.filter((b) => b !== bucket))} > {/if} {#if !display || !bucket.measured} {/if} {#if display && bucket.measured} handleGroupSelect(title, assets)} onSelectAssetCandidates={handleSelectAssetCandidates} onSelectAssets={handleSelectAssets} /> {/if}
{/each}
{#if $showAssetViewer} {#await import('../asset-viewer/asset-viewer.svelte') then { default: AssetViewer }} {/await} {/if}