import type { AppServices } from "../../ui-core/bootstrap/composition-root.js"; import type { TranscriptState } from "../../ui-core/state/transcript-types.js"; import type { IntroBlockInput } from "../blocks/intro-lines.js"; import type { BlockContext } from "../blocks/block-context.js"; import { type FeedBlock } from "../feed/feed-blocks.js"; import { type TranscriptWindow } from "../feed/transcript-window.js"; import { type InkTheme } from "../render/ink-theme.js"; export interface FeedSnapshot { readonly ink: InkTheme; readonly context: BlockContext; readonly blocks: readonly FeedBlock[]; readonly window: TranscriptWindow; /** Shell width + generation the window geometry was computed for. */ readonly columns: number; readonly generation: number; } export declare function introInputFor(services: AppServices): IntroBlockInput; export declare function useInkTheme(services: AppServices): InkTheme; export interface FeedLedgerState { generation: number; committedCount: number; consumedBoundaryToken: number; } export interface UseFeedInput { readonly services: AppServices; readonly state: TranscriptState; readonly columns: number; readonly liveBudgetRows: number; readonly now: number; readonly generation: number; /** Rows hidden below the viewport; `0` pins the window to the newest row. */ readonly liveOffset: number; readonly intro: IntroBlockInput | undefined; } /** * Projects transcript state onto one virtualized scroll page: the intro card * is the first block and the whole page renders through a line-exact window * anchored `liveOffset` rows above the bottom — the OpenTUI scrollbox model. */ export declare function useFeed(input: UseFeedInput): FeedSnapshot;