import type { ComputedRef, Ref, VNodeRef } from 'vue'; import type { ProcessedToken } from './tokens'; /** Layout and row sizing inputs for one opt-in token virtualizer. */ export interface TokenVirtualRowsOptions { /** Root in the same iframe document whose native scrolling is observed. */ container: Ref; /** Ordered tokens already processed by the public grid/list component. */ tokens: ComputedRef; /** Grid rows reflow by measured canvas width; list rows remain one token each. */ layout: ComputedRef<'grid' | 'list'>; /** Grid column width, matching HstTokenGrid's existing option. */ colSize: ComputedRef; /** Approximate row size used until browser measurement arrives. */ estimatedRowSize: ComputedRef; /** Number of extra measured rows retained around native viewport. */ overscan: ComputedRef; } /** A row and its spacer before that row in the native document flow. */ export interface RenderedTokenRow { /** Stable row identity. */ row: { key: string; tokens: readonly ProcessedToken[]; }; /** Current index in logical row order. */ index: number; /** Omitted measured/estimated extent before this rendered row. */ offsetBefore: number; } /** Visible rows and spacer dimensions used by the component template. */ export interface RenderedTokenRows { /** Visible window plus any focused row, sorted in source order. */ entries: RenderedTokenRow[]; /** Omitted extent before first rendered entry. */ offsetTop: number; /** Omitted extent after last rendered entry. */ offsetBottom: number; } /** Share measured native scrolling, responsive grouping, and focus ownership across token layouts. */ export declare function useTokenVirtualRows(options: TokenVirtualRowsOptions): { columns: ComputedRef; rows: ComputedRef[]>; rendered: ComputedRef; getRowElementRef: (key: string) => VNodeRef; retainFocusedToken: (event: FocusEvent) => void; releaseFocusedToken: (event: FocusEvent) => void; };