@expofp/floorplan
Version:
Interactive floor plan library for expos and events
36 lines • 1.85 kB
TypeScript
/** The visited-URL trail (pathname + search per entry) — analytics referrer feed. */
export declare function getLocationHistory(): string[];
/** The app's current search (`''` or `'?…'`) — the platform's params filtered out. */
export declare function currentSearch(): string;
export declare function pushQuery(search: string): void;
/**
* Returns whether the write actually happened — `false` under frozen writes,
* for callers whose follow-up only makes sense after a real URL change (the
* debug-mode scrub reloads only on `true`, else `?debug=` would reload forever).
*/
export declare function replaceQuery(search: string): boolean;
/** Stop writing to the history for the rest of the session (heatmap mode). */
export declare function disableUrlWrites(): void;
/**
* Start listening to the browser history. `onNavigate` fires on every POP
* (browser back/forward) so the dispatch side can replay the URL into state.
*/
export declare function initUrlSync(options: {
offHistory: boolean;
onNavigate: () => void;
}): void;
export declare function destroyUrlSync(): void;
/**
* The UI back button — a real browser back. The POP it produces flows through
* the listener above, so the state replay (`onNavigate`) and the trail
* recording happen exactly as for the browser's own back button. Note the
* replay is therefore asynchronous (it lands with the POP event), and on a
* history with no in-app pushes yet the browser may leave the page — both
* identical to pressing the browser's back button.
*
* Writes are frozen until that POP lands (see `backPending`); the timer lifts
* the freeze when no POP will ever come — a back with nowhere to go (empty
* back stack, e.g. a deep link opened in a fresh tab) is a silent no-op.
*/
export declare function goBack(): void;
//# sourceMappingURL=url-sync.d.ts.map