sia-reactor 0.0.21 → 0.0.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +115 -89
- package/dist/{TimeTravelOverlay-CJv-S_Km.d.cts → TimeTravelOverlay-DiXUgbUU.d.cts} +9 -8
- package/dist/{TimeTravelOverlay-DxqJL0Zk.d.ts → TimeTravelOverlay-eWjAy0yr.d.ts} +9 -8
- package/dist/adapters/react.cjs +66 -84
- package/dist/adapters/react.d.cts +23 -22
- package/dist/adapters/react.d.ts +23 -22
- package/dist/adapters/react.js +3 -3
- package/dist/adapters/vanilla.cjs +66 -84
- package/dist/adapters/vanilla.d.cts +4 -4
- package/dist/adapters/vanilla.d.ts +4 -4
- package/dist/adapters/vanilla.js +3 -3
- package/dist/{chunk-2WBPGSRL.js → chunk-3SKLWTEA.js} +52 -70
- package/dist/{chunk-DP74DVRT.js → chunk-BTA6MIQ6.js} +40 -8
- package/dist/{chunk-TFLYCXK4.js → chunk-CS3FOV6J.js} +14 -13
- package/dist/{index-Oie9hhE8.d.cts → index-BgbbNXTW.d.cts} +306 -207
- package/dist/{index-Oie9hhE8.d.ts → index-BgbbNXTW.d.ts} +306 -207
- package/dist/index.cjs +54 -75
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -4
- package/dist/{plugins.cjs → modules.cjs} +437 -166
- package/dist/modules.d.cts +53 -0
- package/dist/modules.d.ts +53 -0
- package/dist/modules.js +627 -0
- package/dist/super.d.ts +610 -281
- package/dist/super.global.js +445 -174
- package/dist/timeTravel-CraHdbXZ.d.cts +352 -0
- package/dist/timeTravel-YUxRHRgh.d.ts +352 -0
- package/dist/utils.cjs +41 -7
- package/dist/utils.d.cts +1 -1
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +3 -1
- package/package.json +6 -6
- package/dist/plugins.d.cts +0 -112
- package/dist/plugins.d.ts +0 -112
- package/dist/plugins.js +0 -370
- package/dist/timeTravel-B1vedDQc.d.ts +0 -76
- package/dist/timeTravel-WpgWmKu-.d.cts +0 -76
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
import { a as REvent, c as ReactorModuleId, P as Paths, B as BaseReactorModule, R as Reactor } from './index-BgbbNXTW.cjs';
|
|
2
|
+
|
|
3
|
+
type JSONReplacer = ((this: any, key: string, value: any) => any) | (number | string)[] | null;
|
|
4
|
+
type JSONReviver = ((this: any, key: string, value: any) => any) | undefined;
|
|
5
|
+
interface StorageAdapterConfig {
|
|
6
|
+
debug: boolean;
|
|
7
|
+
/** Optional `JSON.stringify()` like replacer to be used where applicable. */
|
|
8
|
+
replacer?: JSONReplacer;
|
|
9
|
+
/** Optional `JSON.parse()` like reviver to be used where applicable. */
|
|
10
|
+
reviver?: JSONReviver;
|
|
11
|
+
}
|
|
12
|
+
interface CookieOptions {
|
|
13
|
+
/** Cookie path scope, defaults to root for maximum accessibility. */
|
|
14
|
+
path: string;
|
|
15
|
+
/** Optional cookie domain scope, e.g. ".example.com". */
|
|
16
|
+
domain?: string;
|
|
17
|
+
/** Cookie Secure attribute, defaults to `false` but should be `true` in production for HTTPS sites. */
|
|
18
|
+
secure: boolean;
|
|
19
|
+
/** Cookie SameSite attribute for CSRF protection, defaults to "Lax" for a balance of security and usability. */
|
|
20
|
+
sameSite: "Strict" | "Lax" | "None";
|
|
21
|
+
/** Optional cookie lifetime in seconds, e.g. 604800 for a week. */
|
|
22
|
+
maxAge?: number;
|
|
23
|
+
/** Optional absolute cookie expiry date, e.g. (new Date()).setDate(new Date().getDate() + 7), "Wed, 21 Oct 2023 07:28:00 GMT" (UTC Format). */
|
|
24
|
+
expires?: string | Date;
|
|
25
|
+
}
|
|
26
|
+
interface CookieAdapterConfig extends StorageAdapterConfig, CookieOptions {
|
|
27
|
+
}
|
|
28
|
+
interface MemoryAdapterConfig extends StorageAdapterConfig {
|
|
29
|
+
/** stored as strings to mimic local constraints */
|
|
30
|
+
store: Map<string, string>;
|
|
31
|
+
}
|
|
32
|
+
interface IndexedDBAdapterConfig extends StorageAdapterConfig {
|
|
33
|
+
/** The name of the IndexedDB database to be created or retrieved. */
|
|
34
|
+
dbName: string;
|
|
35
|
+
/** Database version tag to use during creation or retrieval. */
|
|
36
|
+
version: number;
|
|
37
|
+
/** First store is default during operations if none provided */
|
|
38
|
+
stores: string[];
|
|
39
|
+
/** return a preffered instance or `throw` to prevent accessing the database */
|
|
40
|
+
onidb: () => any;
|
|
41
|
+
/** Called when the database request needs to be upgraded */
|
|
42
|
+
onupgradeneeded: (database: IDBDatabase, event: IDBVersionChangeEvent) => void;
|
|
43
|
+
/** Called when the database version changes */
|
|
44
|
+
onversionchange: (database: IDBDatabase, event: IDBVersionChangeEvent) => void;
|
|
45
|
+
/** Called when the database request is successful */
|
|
46
|
+
onsuccess: (database: IDBDatabase, event: Event) => void;
|
|
47
|
+
/** Called when the database request fails */
|
|
48
|
+
onerror: (error: DOMException | null, event: Event) => any;
|
|
49
|
+
/** Called when the database request is blocked */
|
|
50
|
+
onblocked: (event: IDBVersionChangeEvent) => void;
|
|
51
|
+
}
|
|
52
|
+
interface StorageAdapterConstructor<Config extends StorageAdapterConfig = StorageAdapterConfig> {
|
|
53
|
+
new (config?: Config): StorageAdapter<Config>;
|
|
54
|
+
}
|
|
55
|
+
interface AsyncStorageAdapterConstructor<Config extends StorageAdapterConfig = StorageAdapterConfig> {
|
|
56
|
+
new (config?: Config): AsyncStorageAdapter<Config>;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Abstract base class for storage adapters, defines the interface and common functionality.
|
|
60
|
+
* @typeParam Config Configuration object type for the adapter.
|
|
61
|
+
*/
|
|
62
|
+
declare abstract class BaseStorageAdapter<Config extends StorageAdapterConfig = StorageAdapterConfig> {
|
|
63
|
+
readonly name: string;
|
|
64
|
+
config: Config;
|
|
65
|
+
protected warn: (act?: string, mssg?: string, key?: string, store?: string) => false | void;
|
|
66
|
+
constructor(config?: Config);
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Abstract base class for storage adapters, defines the interface and common functionality.
|
|
70
|
+
* Extend this class to implement specific synchronous storage mechanisms (e.g., LocalStorage).
|
|
71
|
+
* @typeParam Config Configuration object type for the adapter.
|
|
72
|
+
*/
|
|
73
|
+
declare abstract class StorageAdapter<Config extends StorageAdapterConfig = StorageAdapterConfig> extends BaseStorageAdapter<Config> {
|
|
74
|
+
readonly name: string;
|
|
75
|
+
abstract get(key: string): any;
|
|
76
|
+
abstract set(key: string, value: any): boolean;
|
|
77
|
+
abstract remove(key: string): boolean;
|
|
78
|
+
abstract clear(): boolean;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Abstract base class for asynchronous storage adapters, defines the interface and common functionality.
|
|
82
|
+
* Extend this class to implement specific asynchronous storage mechanisms (e.g., IndexedDB).
|
|
83
|
+
* @typeParam Config Configuration object type for the adapter.
|
|
84
|
+
*/
|
|
85
|
+
declare abstract class AsyncStorageAdapter<Config extends StorageAdapterConfig = StorageAdapterConfig> extends BaseStorageAdapter<Config> {
|
|
86
|
+
readonly name: string;
|
|
87
|
+
abstract get(key: string): Promise<any>;
|
|
88
|
+
abstract set(key: string, value: any): Promise<boolean>;
|
|
89
|
+
abstract remove(key: string): Promise<boolean>;
|
|
90
|
+
abstract clear(): Promise<boolean>;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* - The LocalStorage Adapter (~5MB per origin, browser-dependent).
|
|
94
|
+
* - Provides aN implementation of the `StorageAdapter` interface using the browser's `localStorage`.
|
|
95
|
+
* Handles JSON serialization and deserialization, and includes error handling for unsupported environments.
|
|
96
|
+
*/
|
|
97
|
+
declare class LocalStorageAdapter extends StorageAdapter {
|
|
98
|
+
readonly name: string;
|
|
99
|
+
/**
|
|
100
|
+
* Reads and parses a value from localStorage.
|
|
101
|
+
* @param key Storage key.
|
|
102
|
+
* @returns Parsed value, or `undefined` when missing/unreadable.
|
|
103
|
+
*/
|
|
104
|
+
get(key: string, reviver?: JSONReviver): any;
|
|
105
|
+
/**
|
|
106
|
+
* Serializes and writes a value to localStorage.
|
|
107
|
+
* @param key Storage key.
|
|
108
|
+
* @param value Value to serialize.
|
|
109
|
+
* @returns `true` when write succeeds, else `false`.
|
|
110
|
+
*/
|
|
111
|
+
set(key: string, value: any, replacer?: JSONReplacer | undefined): boolean;
|
|
112
|
+
/**
|
|
113
|
+
* Removes a single key from localStorage.
|
|
114
|
+
* @param key Storage key.
|
|
115
|
+
* @returns `true` when removal succeeds, else `false`.
|
|
116
|
+
*/
|
|
117
|
+
remove(key: string): boolean;
|
|
118
|
+
/**
|
|
119
|
+
* Clears all localStorage entries for the current origin.
|
|
120
|
+
* @returns `true` when clear succeeds, else `false`.
|
|
121
|
+
*/
|
|
122
|
+
clear(): boolean;
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* - The SessionStorage Adapter (~5MB per origin per tab, browser-dependent).
|
|
126
|
+
* - Provides an implementation of the `StorageAdapter` interface using the browser's `sessionStorage`.
|
|
127
|
+
* Handles JSON serialization and deserialization, and includes error handling for unsupported environments.
|
|
128
|
+
*/
|
|
129
|
+
declare class SessionStorageAdapter extends StorageAdapter {
|
|
130
|
+
readonly name: string;
|
|
131
|
+
/**
|
|
132
|
+
* Reads and parses a value from sessionStorage.
|
|
133
|
+
* @param key Storage key.
|
|
134
|
+
* @returns Parsed value, or `undefined` when missing/unreadable.
|
|
135
|
+
*/
|
|
136
|
+
get(key: string, reviver?: JSONReviver): any;
|
|
137
|
+
/**
|
|
138
|
+
* Serializes and writes a value to sessionStorage.
|
|
139
|
+
* @param key Storage key.
|
|
140
|
+
* @param value Value to serialize.
|
|
141
|
+
* @returns `true` when write succeeds, else `false`.
|
|
142
|
+
*/
|
|
143
|
+
set(key: string, value: any, replacer?: JSONReplacer | undefined): boolean;
|
|
144
|
+
/**
|
|
145
|
+
* Removes a single key from sessionStorage.
|
|
146
|
+
* @param key Storage key.
|
|
147
|
+
* @returns `true` when removal succeeds, else `false`.
|
|
148
|
+
*/
|
|
149
|
+
remove(key: string): boolean;
|
|
150
|
+
/**
|
|
151
|
+
* Clears all sessionStorage entries for the current tab session.
|
|
152
|
+
* @returns `true` when clear succeeds, else `false`.
|
|
153
|
+
*/
|
|
154
|
+
clear(): boolean;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* - The Memory Storage Adapter (RAM-bound; no fixed browser quota).
|
|
158
|
+
* - Provides an implementation of the `StorageAdapter` interface using an in-memory `Map`.
|
|
159
|
+
* Useful for testing or non-persistent storage needs, mimics the API and behavior of LocalStorage.
|
|
160
|
+
*/
|
|
161
|
+
declare class MemoryAdapter extends StorageAdapter<MemoryAdapterConfig> {
|
|
162
|
+
readonly name: string;
|
|
163
|
+
constructor(build?: Partial<MemoryAdapterConfig>);
|
|
164
|
+
/**
|
|
165
|
+
* Reads and parses a value from memory storage.
|
|
166
|
+
* @param key Storage key.
|
|
167
|
+
* @returns Parsed value, or `undefined` when missing/unreadable.
|
|
168
|
+
*/
|
|
169
|
+
get(key: string, reviver?: JSONReviver): any;
|
|
170
|
+
/**
|
|
171
|
+
* Serializes and writes a value to memory storage.
|
|
172
|
+
* @param key Storage key.
|
|
173
|
+
* @param value Value to serialize.
|
|
174
|
+
* @returns `true` when write succeeds, else `false`.
|
|
175
|
+
*/
|
|
176
|
+
set(key: string, value: any, replacer?: JSONReplacer | undefined): boolean;
|
|
177
|
+
/**
|
|
178
|
+
* Removes a single key from memory storage.
|
|
179
|
+
* @param key Storage key.
|
|
180
|
+
* @returns `true` when removal succeeds, else `false`.
|
|
181
|
+
*/
|
|
182
|
+
remove(key: string): boolean;
|
|
183
|
+
/**
|
|
184
|
+
* Clears all entries from memory storage.
|
|
185
|
+
* @returns `true` when clear succeeds, else `false`.
|
|
186
|
+
*/
|
|
187
|
+
clear(): boolean;
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* - The Cookie Storage Adapter (~4KB per cookie; practical total payload budget often ~30KB).
|
|
191
|
+
* - Provides an implementation of the `StorageAdapter` interface using `document.cookie`.
|
|
192
|
+
* Handles JSON serialization/deserialization and URL-safe key/value encoding.
|
|
193
|
+
*/
|
|
194
|
+
declare class CookieAdapter extends StorageAdapter<CookieAdapterConfig> {
|
|
195
|
+
readonly name: string;
|
|
196
|
+
protected deets: (opts?: Partial<CookieOptions>, _d?: string | undefined, _m?: number | undefined, _e?: string | Date | undefined) => string;
|
|
197
|
+
constructor(build?: Partial<CookieAdapterConfig>);
|
|
198
|
+
/**
|
|
199
|
+
* Reads and parses a cookie visible to the current page scope.
|
|
200
|
+
* @param key Cookie key.
|
|
201
|
+
* @returns Parsed value, or `undefined` when missing/unreadable.
|
|
202
|
+
*/
|
|
203
|
+
get(key: string, reviver?: JSONReviver): any;
|
|
204
|
+
/**
|
|
205
|
+
* Writes a cookie with optional per-call scope/lifetime overrides.
|
|
206
|
+
* @param key Cookie key.
|
|
207
|
+
* @param value Value to serialize.
|
|
208
|
+
* @param opts Optional per-call cookie options.
|
|
209
|
+
* @returns `true` when write succeeds, else `false`.
|
|
210
|
+
*/
|
|
211
|
+
set(key: string, value: any, opts?: Partial<CookieOptions>, replacer?: JSONReplacer | undefined): boolean;
|
|
212
|
+
/**
|
|
213
|
+
* Removes a cookie key using matching scope attributes.
|
|
214
|
+
* @param key Cookie key.
|
|
215
|
+
* @param opts Optional per-call scope overrides.
|
|
216
|
+
* @returns `true` when removal succeeds, else `false`.
|
|
217
|
+
*/
|
|
218
|
+
remove(key: string, opts?: Partial<CookieOptions>): boolean;
|
|
219
|
+
/**
|
|
220
|
+
* Attempts to remove all visible cookie keys for the given scope.
|
|
221
|
+
* @param opts Optional per-call scope overrides.
|
|
222
|
+
* @returns `true` when clear succeeds, else `false`.
|
|
223
|
+
*/
|
|
224
|
+
clear(opts?: Partial<CookieOptions>): boolean;
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* - The IndexedDB Adapter (quota-managed; typically tens of MB to GB).
|
|
228
|
+
* - Provides an implementation of the `AsyncStorageAdapter` interface using the IndexedDB database.
|
|
229
|
+
* Handles database connection management, object store setup, and includes error handling for unsupported environments and common issues, requires snapshots(non-proxies) for persistence.
|
|
230
|
+
*/
|
|
231
|
+
declare class IndexedDBAdapter extends AsyncStorageAdapter<IndexedDBAdapterConfig> {
|
|
232
|
+
readonly name: string;
|
|
233
|
+
protected db?: IDBDatabase;
|
|
234
|
+
constructor(build?: Partial<IndexedDBAdapterConfig>);
|
|
235
|
+
/**
|
|
236
|
+
* Returns a connected IndexedDB instance, opening it when needed.
|
|
237
|
+
* @returns Connected database handle.
|
|
238
|
+
*/
|
|
239
|
+
idb(): Promise<IDBDatabase>;
|
|
240
|
+
/**
|
|
241
|
+
* Reads a value by key from an object store.
|
|
242
|
+
* @param key Record key.
|
|
243
|
+
* @param store Optional object-store override.
|
|
244
|
+
* @returns Stored value, or `undefined` when missing/unreadable.
|
|
245
|
+
*/
|
|
246
|
+
get(key: string, store?: string): Promise<any>;
|
|
247
|
+
/**
|
|
248
|
+
* Writes a value by key into an object store.
|
|
249
|
+
* @param key Record key.
|
|
250
|
+
* @param value Value to store.
|
|
251
|
+
* @param store Optional object-store override.
|
|
252
|
+
* @returns `true` when write succeeds, else `false`.
|
|
253
|
+
*/
|
|
254
|
+
set(key: string, value: any, store?: string): Promise<boolean>;
|
|
255
|
+
/**
|
|
256
|
+
* Deletes a value by key from an object store.
|
|
257
|
+
* @param key Record key.
|
|
258
|
+
* @param store Optional object-store override.
|
|
259
|
+
* @returns `true` when delete succeeds, else `false`.
|
|
260
|
+
*/
|
|
261
|
+
remove(key: string, store?: string): Promise<boolean>;
|
|
262
|
+
/**
|
|
263
|
+
* Clears one or more object stores.
|
|
264
|
+
* @param stores Store name or list of store names to clear.
|
|
265
|
+
* @returns `true` when all clears succeed, else `false`.
|
|
266
|
+
*/
|
|
267
|
+
clear(stores?: string | string[]): Promise<boolean>;
|
|
268
|
+
}
|
|
269
|
+
declare const COOKIE_ADAPTER_BUILD: Partial<CookieAdapterConfig>;
|
|
270
|
+
declare const INDEXED_DB_ADAPTER_BUILD: Partial<IndexedDBAdapterConfig>;
|
|
271
|
+
|
|
272
|
+
/** The DNA of a specific moment in time, Records the 'Desire' (Intent) or the 'Fact' (State). */
|
|
273
|
+
interface HistoryEntry {
|
|
274
|
+
/** The surgical address in the Reactor */
|
|
275
|
+
path: string;
|
|
276
|
+
/** The data payload at that moment */
|
|
277
|
+
value: any;
|
|
278
|
+
/** The "Undo" antidote (Previous value), if applicable */
|
|
279
|
+
oldValue: any;
|
|
280
|
+
/** Was it a 'set' or a 'delete' surgery? */
|
|
281
|
+
type: REvent<any, any>["staticType"];
|
|
282
|
+
/** Did the Power Line disapprove?; why? */
|
|
283
|
+
rejected?: string;
|
|
284
|
+
/** Did the key for the value exist on its parent object? */
|
|
285
|
+
hadKey: boolean;
|
|
286
|
+
/** For chronological re-enactment */
|
|
287
|
+
deltat: number;
|
|
288
|
+
/** For multi-reactor management, identifies who the entry belongs to */
|
|
289
|
+
rid: ReactorModuleId;
|
|
290
|
+
}
|
|
291
|
+
interface TimeTravelConfig<T extends object = any> {
|
|
292
|
+
/** Specific paths only, no "*"; instead don't pass anything */
|
|
293
|
+
paths: Paths<T>[];
|
|
294
|
+
/** Maximum number of history entries to keep (Memory Cap), you lose replaying Sessions or the Genesis */
|
|
295
|
+
maxHistoryLength: number;
|
|
296
|
+
/** Max delay between events during playback (ms) */
|
|
297
|
+
maxPlaybackDelay: number;
|
|
298
|
+
}
|
|
299
|
+
interface TimeTravelState {
|
|
300
|
+
/** The "Genesis" snapshot (Raw Data) */
|
|
301
|
+
initialState: {
|
|
302
|
+
[rid: ReactorModuleId]: any;
|
|
303
|
+
};
|
|
304
|
+
/** The "Timeline" of mutations (Chronological Log) */
|
|
305
|
+
history: HistoryEntry[];
|
|
306
|
+
/** The manual playhead (Index in the Timeline) */
|
|
307
|
+
currentFrame: number;
|
|
308
|
+
/** Whether playback is currently paused (Automatic Replay) */
|
|
309
|
+
paused: boolean;
|
|
310
|
+
}
|
|
311
|
+
/**
|
|
312
|
+
* - The Flight Recorder (Black Box).
|
|
313
|
+
* - Implements S.I.A. logic to allow playback, teleportation, redos and undos.
|
|
314
|
+
* Allows history from single or multiple reactors to be recorded and replayed in a synchronized manner, even if they have different shapes.
|
|
315
|
+
* If paired with async persistence, `use()` or `setup()` this module after hydration where applicable to avoid recording restore waves.
|
|
316
|
+
*/
|
|
317
|
+
declare class TimeTravelModule<T extends object = any> extends BaseReactorModule<T, TimeTravelConfig<T>, TimeTravelState> {
|
|
318
|
+
static readonly moduleName: string;
|
|
319
|
+
protected lastTimestamp: number;
|
|
320
|
+
protected playbackTimeoutId: number;
|
|
321
|
+
constructor(config?: Partial<TimeTravelConfig<T>>, rtr?: Reactor<T>);
|
|
322
|
+
wire(): void;
|
|
323
|
+
protected onAttach(rtr: Reactor<any>, rid: ReactorModuleId): void;
|
|
324
|
+
protected handlePaths({ value: paths, oldValue: prevs }: REvent<TimeTravelConfig<T>, "paths">): void;
|
|
325
|
+
/** Chronicling the lifecycle of the system, Captures the essence of every mutation wave that bubbles up. */
|
|
326
|
+
protected record(e: REvent<any, any>, rid?: ReactorModuleId): void;
|
|
327
|
+
/** Clears timeline history and resets playhead/genesis to the current reactor state. */
|
|
328
|
+
clear(): void;
|
|
329
|
+
/** Instant state reconstruction (Teleport). Glides through deltas natively. */
|
|
330
|
+
jumpTo(index?: number, keepShield?: boolean): void;
|
|
331
|
+
/** Step through time, Moves the playhead and teleports the state. */
|
|
332
|
+
step(stride?: number, forward?: boolean): void;
|
|
333
|
+
/** Step back in time, Moves the playhead backward and teleports the state. */
|
|
334
|
+
undo: () => void;
|
|
335
|
+
/** Step forward in time, Restores previously undone actions. */
|
|
336
|
+
redo: () => void;
|
|
337
|
+
/** Core automove engine. Replays or rewinds the "Story" by respecting time gaps. */
|
|
338
|
+
automove(forward?: boolean): Promise<void>;
|
|
339
|
+
/** Start chronological re-enactment of the session. */
|
|
340
|
+
play: () => Promise<void>;
|
|
341
|
+
/** Start reverse chronological re-enactment of the session. */
|
|
342
|
+
rewind: () => Promise<void>;
|
|
343
|
+
/** Pauses the live VCR playback. */
|
|
344
|
+
pause: () => void;
|
|
345
|
+
/** Exports the current session as a JSON string. */
|
|
346
|
+
export(replacer?: JSONReplacer, space?: string | number): string;
|
|
347
|
+
/** Imports a session from a JSON string, allowing you to replay or analyze past states. */
|
|
348
|
+
import(json: string, reviver?: JSONReviver): void;
|
|
349
|
+
}
|
|
350
|
+
declare const TIME_TRAVEL_MODULE_BUILD: Partial<TimeTravelConfig>;
|
|
351
|
+
|
|
352
|
+
export { AsyncStorageAdapter as A, BaseStorageAdapter as B, COOKIE_ADAPTER_BUILD as C, type HistoryEntry as H, INDEXED_DB_ADAPTER_BUILD as I, type JSONReplacer as J, LocalStorageAdapter as L, MemoryAdapter as M, StorageAdapter as S, TIME_TRAVEL_MODULE_BUILD as T, type StorageAdapterConstructor as a, type AsyncStorageAdapterConstructor as b, CookieAdapter as c, type CookieAdapterConfig as d, type CookieOptions as e, IndexedDBAdapter as f, type IndexedDBAdapterConfig as g, type JSONReviver as h, type MemoryAdapterConfig as i, SessionStorageAdapter as j, type StorageAdapterConfig as k, type TimeTravelConfig as l, TimeTravelModule as m, type TimeTravelState as n };
|