import type { Ref } from "vue"; import type { TLogViewHandle } from "../components/TLogView.js"; import type { TLogSavedSearch } from "./use-tlog-search-controller.js"; export type StorageLike = Readonly<{ getItem: (key: string) => string | null; setItem: (key: string, value: string) => void; removeItem: (key: string) => void; }>; export type TLogViewSessionState = Readonly<{ scrollTop: number; firstLineIndex: number; visualIndexMode: "estimated" | "exact"; search?: Readonly<{ query: string; mode: "text" | "regex"; caseSensitive: boolean; wholeWord: boolean; regexFlags?: string; currentMatchIndex: number; history?: readonly string[]; savedSearches?: readonly TLogSavedSearch[]; }>; ui?: Readonly<{ resultsPage?: number; linksPanelActiveIndex?: number; wrap?: boolean; ansi?: boolean; links?: boolean; keyboardLinks?: boolean; }>; }>; export type TLogViewSessionBindings = Readonly<{ logView: Ref; visualIndexMode?: Ref<"estimated" | "exact">; wrap?: Ref; ansi?: Ref; links?: Ref; keyboardLinks?: Ref; search?: Readonly<{ query: Ref; mode: Ref<"text" | "regex">; caseSensitive: Ref; wholeWord: Ref; regexFlags: Ref; searchHistory?: Ref; savedSearches?: Ref; updateQuery: (value: string) => void; updateMode: (value: "text" | "regex") => void; updateCaseSensitive: (value: boolean) => void; updateWholeWord: (value: boolean) => void; updateRegexFlags: (value: string) => void; setSearchHistory?: (value: readonly string[]) => void; setSavedSearches?: (value: readonly TLogSavedSearch[]) => void; clearSearch: () => void; selectMatch: (matchIndex: number) => boolean; resultsPage?: Readonly<{ state: Ref>; setPage: (page: number) => void; }>; }>; linkController?: Readonly<{ activeIndex: Ref; focusVisibleLink: (visibleIndex: number) => boolean; clearFocus: () => void; }>; }>; export declare function serializeTLogViewSessionState(state: TLogViewSessionState): string; export declare function deserializeTLogViewSessionState(value: string | null | undefined): TLogViewSessionState | null; export declare function createTLogViewSessionStore(options?: { storageKey?: string; storage?: StorageLike | null; }): { state: Ref; load: () => TLogViewSessionState | null; save: (state: TLogViewSessionState) => void; clear: () => void; }; export declare function captureTLogViewSessionState(bindings: TLogViewSessionBindings): TLogViewSessionState | null; export declare function restoreTLogViewSessionState(bindings: TLogViewSessionBindings, state: TLogViewSessionState | null): boolean;