/** * vapor-chamber-router — URL/query layer. Pure string/data functions. * * Query params are STATE, not navigation (ARCHITECTURE.md §3): the typed * codec here backs the engine's query fast path and useQueryParam. */ import type { QueryParamDef, QueryValues } from './types'; /** Parse a search string ('?a=1&b=2', leading '?' optional) into QueryValues. * Repeated keys collect into arrays. '+' decodes to space. */ export declare function parseQuery(search: string): QueryValues; /** Stringify QueryValues WITHOUT the leading '?'. null/undefined entries are * skipped; arrays emit repeated keys. */ export declare function stringifyQuery(query: QueryValues | Record): string; /** Decode one raw query value through its declaration; falls back to * `def.default` when absent or failing the cast. */ export declare function decodeQueryParam(raw: string | string[] | undefined, def: QueryParamDef): unknown; /** Encode a typed value for the URL. Returns null when the key should be * DROPPED — values equal to the declared default never pollute the URL. */ export declare function encodeQueryParam(value: unknown, def: QueryParamDef): string | string[] | null; /** * Shared active/exact semantics for a link target against the current path — * `data-active` stamping (dom.ts) and useMenu() both go through here, so a * Blade-rendered menu and a Vue-rendered menu can never disagree. * Trailing-slash tolerant. exact = same path; active = exact or path prefix * ('/' is never a prefix-active catch-all). */ export declare function pathActivity(targetPath: string, currentPath: string): { active: boolean; exact: boolean; }; /** * How a query write lands in browser history. Ladder (first hit wins): * 1. explicit per-call override * 2. the route's declaration * 3. convention: `page` pushes (back steps through pages), everything else * (filters, sort, search…) replaces. */ export declare function resolveQueryHistory(key: string, def: QueryParamDef | undefined, override?: 'push' | 'replace'): 'push' | 'replace'; //# sourceMappingURL=url.d.ts.map