import type { StateNavigator } from 'navigation'; export type SelectionHistory = 'replace' | 'push'; export type NavigationHistoryAction = 'add' | 'replace' | 'none'; export type PaneApplyIntent = 'replace' | 'push' | null; export type PaneBackAction = { type: 'browser'; distance: number; } | { type: 'selection'; targetIndex: number; } | { type: 'deselect'; } | { type: 'outer'; distance: number; }; /** * Pane selections initiated locally already ran their screen preload before * updating the URL. Consume that one-shot intent when the URL mirror catches * up, so a later external URL/Back/Forward change is treated as cold again. */ export declare function consumePaneApplyIntent(intentRef: { current: PaneApplyIntent; }): PaneApplyIntent; export declare function shouldPreloadMirroredSelection(intent: PaneApplyIntent): boolean; /** * Returns the earlier URL-backed pane selection for an in-app Back action. * An index (rather than the value) is returned because `undefined` is itself a * valid SplitView snapshot: it represents the empty detail placeholder. */ export declare function resolveSelectionBackTargetIndex(stackLength: number, distance?: number): number | null; /** * Web pane selections are real browser-history entries. Back must consume the * current entry instead of replacing it with the previous selection; replacing * turns `[detail, review]` into `[detail, detail]` and makes the next Back a * no-op. Native has no browser timeline, so it keeps the synchronous selection * refresh before falling back to the outer navigator. * * A selection that replaced its predecessor (peer selections replace by * default, and so does a create screen swapping itself for the new record) owns * no earlier entry: consuming the browser entry would leave the split, or the * app. Back clears that selection instead, on web and native alike. */ export declare function resolvePaneBackAction(stackLength: number, distance?: number, useBrowserHistory?: boolean, hasSelection?: boolean): PaneBackAction; /** * A peer selection is not a drill-down step. Split views therefore replace the * current browser/native history entry by default, while still allowing a * workspace to opt into replayable selection history. * * An explicit replace always wins so a row can collapse an intermediate step * even when its enclosing split opted into push history. */ export declare function resolveSelectionHistoryAction(historyAction: NavigationHistoryAction | undefined, selectionHistory?: SelectionHistory): 'add' | 'replace'; /** * In-app Back on web consumes the pane's browser entry, but the popstate that * re-derives the pane arrives asynchronously. Step a pane drill synchronously * first, so its unloading guards (a discard-changes prompt) judge the screen as * the caller left it, for example still saving. Returns false when a guard kept * the screen; the browser entry must then stay. */ export declare function stepPaneDrillBack(navigator: StateNavigator, distance: number): boolean; //# sourceMappingURL=selectionHistory.d.ts.map