/** * URL <-> desktop-state mapping (#136). * * A deep link addresses a filesystem node by its **key path** - the sequence of * node keys from the desktop root, joined with '/' - e.g. '我的文档/readme.txt'. * This is the '?open=' value; it is host-router-agnostic and reversible via * {@link serializeOpenPath}, which 'XPHandle.getShareUrl' uses to build a * shareable permalink. */ /** Parse a `/`-joined key path (a `?open=` value) into filesystem segments. */ export declare function parseOpenPath(raw: string): string[]; /** Serialize filesystem segments back into a `?open=` value (segments URL-encoded). */ export declare function serializeOpenPath(path: string[]): string; /** A route maps matched path params to the windows to open on load. */ export type DeepLinkRoute = (params: Record) => { open?: string | string[]; }; /** Pretty URL patterns (`/blog/:slug`) → the file(s) they open (#136). */ export type DeepLinkRoutes = Record; /** * Match a location's pathname against a `routes` map and return the resolved * `open` targets. Patterns use `:name` segments (e.g. `/blog/:slug`); the first * pattern that matches wins. Purely lexical — no router dependency, so a host * on any framework can pass its current `location` in. */ export declare function resolveRoutes(routes: DeepLinkRoutes, pathname: string): string[]; /** Normalize the `open` prop (string | string[] | undefined) to a string list. */ export declare function toOpenList(open?: string | string[]): string[];