/** * Router for the Explorer. Two modes over the same slug-segment routes: * - 'history': real paths (/guides/installation). The standalone CLI default — * its dev server and static build guarantee every path serves the shell. * - 'hash': #/guides/installation. The embedded default — works under any * host routing without server cooperation. */ export type RoutingMode = 'history' | 'hash'; /** Get the current route segments */ export declare function getRoute(): string[]; /** Reactive read of a URL query parameter (null when absent). */ export declare function getQueryParam(key: string): string | null; /** Set (or clear, when value is null/'') a query parameter, preserving the * path and hash. Replaces history by default so in-page toggles don't stack * back-button entries. */ export declare function setQueryParam(key: string, value: string | null, opts?: { replace?: boolean; }): void; /** Navigate to a route (segments are slugs). Changing entity drops any query * params (a preview tab, say) — routeHref carries none, so the URL is clean. */ export declare function navigate(segments: string[], opts?: { replace?: boolean; }): void; /** Navigate to an app URL — an href forwarded from a stage link. Strips the * base and splits into segments; hash mode reads the #/ route. A URL that * isn't ours is ignored. */ export declare function navigateHref(href: string): void; /** Href string for a route, in the active mode (for ) */ export declare function routeHref(segments: string[]): string; /** * Initialize the router — call once on app startup. Idempotent: the built * app's entry initializes before hydration (the first render must already * know the route), and the Explorer's own onMount call then no-ops. * In history mode a leftover `#/…` URL (a pre-history bookmark) is translated * in place: its segments were display names with spaces as hyphens, which * lowercased are today's slugs for almost every title. */ export declare function initRouter(routingMode: RoutingMode, basePath?: string): void; /** * Server-side route state for prerendering: sets mode/base/route without * touching browser APIs. The build's static renderer calls this before each * route render; hrefs and route resolution then match the client exactly. */ export declare function setServerRoute(segments: string[], basePath?: string): void;