import { type JourneyRuntime } from './runtime'; import { type JourneyDef, type JourneyState, type SerializedJourneyState } from './types'; /** * @internal Project an open {@link JourneyState} into a plain, JSON-safe * {@link SerializedJourneyState} that can ride a cookie across page navigations. * The step projection mirrors `finish()`; `startedAt` (a `performance.now()` * monotonic stamp) is bridged to a wall-clock epoch so it survives the page * load where `performance.now()` resets. */ export declare function projectJourneyState(journey: JourneyState): SerializedJourneyState; /** * @internal Rehydrate a {@link SerializedJourneyState} into a live * {@link JourneyState} bound to the supplied runtime. `startedAt` is rebased * from the wall-clock epoch back to a `performance.now()` monotonic stamp, * `StepRecord[]` is rebuilt with re-linked circular references, and the * `JOURNEY_ENGINE` hook is re-bound so HTTP attribution works on the new page. */ export declare function deserializeJourneyState(serialized: SerializedJourneyState, config: JourneyDef, api: JourneyRuntime, defaultJourneyIdleMs: number): JourneyState; //# sourceMappingURL=persist.d.ts.map