export interface ReturnTo { /** A same-origin in-app path, with its search: "/workspaces//settings?section=models". */ path: string; /** What the back link says: "Design preview ยท Models". */ label: string; } /** The search params a cross-scope link adds. */ export interface ReturnToSearch { from?: string | undefined; fromLabel?: string | undefined; } /** * Accepts only a path inside this app: it starts with one "/", has no scheme, * host, backslash or control character, and resolves to the same origin. */ export declare function safeInAppPath(value: unknown): string | undefined; /** Reads `from` + `fromLabel` from a route's raw search; both or nothing. */ export declare function parseReturnTo(search: Record): ReturnToSearch; export declare function returnToOf(search: ReturnToSearch): ReturnTo | undefined; export declare function returnToSearch(returnTo: ReturnTo | undefined): ReturnToSearch; /** The page being viewed right now, as a return target. */ export declare function currentPageReturnTo(label: string): ReturnTo | undefined;