import type { Playlist } from '../../core/playlist'; import type { TimelineClock } from '../../core/timeline'; export interface MergedEntriesState { /** Flat list of decoded entries across all contiguously-loaded segments. */ entries: T[]; /** Set of loaded segment indices (may include non-contiguous cached segments). */ loadedSegments: Set; /** Contiguous range that was flattened [startIdx, endIdx] inclusive, or null. */ mergedRange: [number, number] | null; loading: boolean; } export interface MergedEntriesOptions { /** * Decode a segment payload into a flat list of entries. Default assumes the * decoded payload is already `T[]` — the typical shape when the decoder is * `jsonlDecoder` and each line is one entry. */ decode?: (decoded: unknown) => T[]; } /** * Find the longest contiguous chain of loaded segments containing `centerIdx` * and flatten their entries in segment order. * * Exported as a pure helper so the merge semantics are unit-testable without * setting up a React + Playlist fixture. */ export declare function mergeContiguousEntries(raw: Map, centerIdx: number): { entries: T[]; range: [number, number] | null; }; /** * Discrete counterpart to `useMergedTrack`. Loads the current segment plus a * window of neighbors around the playhead (via `engine.getDataAtTime`), * decodes each into an entry array, and flattens all contiguous loaded * segments into a single `T[]` suitable for `PillLane` / `MarkerLane` / * `RibbonLane`-style rendering. * * Playhead-centric: zoom / pan never triggers loading. Regions outside the * contiguous chain are simply absent from `entries` — lanes can render a * hatch over those time ranges from `loadedSegments`. * * Gap safety: non-contiguous cached segments stay in `loadedSegments` but do * not contribute to `entries` until the gap fills. Playback will fill gaps * as the playhead advances; seek clears the cache (matches `useMergedTrack`). */ export declare function useMergedEntries(engine: Playlist | null, clock?: TimelineClock | null, options?: MergedEntriesOptions): MergedEntriesState; //# sourceMappingURL=use-merged-entries.d.ts.map