refactor: extract various constants

This commit is contained in:
2025-11-25 10:10:42 +01:00
parent 4d30e47ee8
commit ccc22beda2
40 changed files with 326 additions and 216 deletions
@@ -5,6 +5,7 @@ import {
resolveDocumentAssetUrl,
resolveAssetUrl,
} from '../asset_manager';
import { DEFAULT_THUMBNAIL_SIZE } from '../constants/documents';
import type {
DocumentLike as AssetManagerDocumentLike,
AssetLike as AssetManagerAssetLike,
@@ -12,8 +13,6 @@ import type {
GetAsset as AssetManagerGetAsset,
} from '../asset_manager';
const DEFAULT_THUMBNAIL_SIZE = 48;
// Detect when an element becomes visible within a scroll container so we can delay loading.
const useLazyVisibility = (
rootRef: MutableRefObject<Element | null> | null,