sia-reactor 0.0.20 → 0.0.21
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 +6 -8
- package/dist/{TimeTravelOverlay-BYSnHBXx.d.cts → TimeTravelOverlay-CJv-S_Km.d.cts} +2 -2
- package/dist/{TimeTravelOverlay-DoNrZwvX.d.ts → TimeTravelOverlay-DxqJL0Zk.d.ts} +2 -2
- package/dist/adapters/react.cjs +78 -96
- package/dist/adapters/react.d.cts +47 -6
- package/dist/adapters/react.d.ts +47 -6
- package/dist/adapters/react.js +34 -10
- package/dist/adapters/vanilla.cjs +45 -89
- package/dist/adapters/vanilla.d.cts +4 -4
- package/dist/adapters/vanilla.d.ts +4 -4
- package/dist/adapters/vanilla.js +2 -2
- package/dist/{chunk-VPR5SP3E.js → chunk-2WBPGSRL.js} +28 -40
- package/dist/{chunk-RFQ2JJSV.js → chunk-TFLYCXK4.js} +18 -50
- package/dist/{index-DCG3sacH.d.cts → index-Oie9hhE8.d.cts} +6 -5
- package/dist/{index-DCG3sacH.d.ts → index-Oie9hhE8.d.ts} +6 -5
- package/dist/index.cjs +28 -40
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/plugins.cjs +46 -51
- package/dist/plugins.d.cts +3 -3
- package/dist/plugins.d.ts +3 -3
- package/dist/plugins.js +19 -12
- package/dist/styles/time-travel-overlay.css +1 -1
- package/dist/super.d.ts +15 -13
- package/dist/super.global.js +63 -100
- package/dist/{timeTravel-Bv_u5M1D.d.ts → timeTravel-B1vedDQc.d.ts} +10 -9
- package/dist/{timeTravel-L8CEhHIo.d.cts → timeTravel-WpgWmKu-.d.cts} +10 -9
- package/dist/utils.d.cts +1 -1
- package/dist/utils.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { a as REvent, P as Paths, B as BaseReactorPlugin, b as Reactor } from './index-
|
|
1
|
+
import { a as REvent, P as Paths, B as BaseReactorPlugin, b as Reactor } from './index-Oie9hhE8.cjs';
|
|
2
2
|
|
|
3
3
|
/** The DNA of a specific moment in time, Records the 'Desire' (Intent) or the 'Fact' (State). */
|
|
4
4
|
interface HistoryEntry {
|
|
5
|
-
/** Was it a 'set' or a 'delete' surgery? */
|
|
6
|
-
type: REvent<any, any>["staticType"];
|
|
7
5
|
/** The surgical address in the Reactor */
|
|
8
6
|
path: string;
|
|
9
7
|
/** The data payload at that moment */
|
|
10
8
|
value: any;
|
|
11
9
|
/** The "Undo" antidote (Previous value), if applicable */
|
|
12
10
|
oldValue: any;
|
|
13
|
-
/**
|
|
14
|
-
|
|
11
|
+
/** Was it a 'set' or a 'delete' surgery? */
|
|
12
|
+
type: REvent<any, any>["staticType"];
|
|
15
13
|
/** Did the Power Line disapprove?; why? */
|
|
16
14
|
rejected: string;
|
|
17
15
|
/** For chronological re-enactment */
|
|
18
|
-
|
|
16
|
+
timedelta: number;
|
|
17
|
+
/** Did the key for the value exist on its parent object? */
|
|
18
|
+
hadKey: boolean;
|
|
19
19
|
}
|
|
20
20
|
interface TimeTravelConfig<T extends object = any> {
|
|
21
21
|
/** Specific paths only, no "*"; instead don't pass anything */
|
|
@@ -26,10 +26,10 @@ interface TimeTravelConfig<T extends object = any> {
|
|
|
26
26
|
maxPlaybackDelay: number;
|
|
27
27
|
}
|
|
28
28
|
interface TimeTravelState {
|
|
29
|
-
/** The "Timeline" of mutations (Chronological Log) */
|
|
30
|
-
history: HistoryEntry[];
|
|
31
29
|
/** The "Genesis" snapshot (Raw Data) */
|
|
32
30
|
initialState: any;
|
|
31
|
+
/** The "Timeline" of mutations (Chronological Log) */
|
|
32
|
+
history: HistoryEntry[];
|
|
33
33
|
/** The manual playhead (Index in the Timeline) */
|
|
34
34
|
currentFrame: number;
|
|
35
35
|
/** Whether playback is currently paused (Automatic Replay) */
|
|
@@ -41,6 +41,7 @@ interface TimeTravelState {
|
|
|
41
41
|
*/
|
|
42
42
|
declare class TimeTravelPlugin<T extends object = any> extends BaseReactorPlugin<T, TimeTravelConfig<T>, TimeTravelState> {
|
|
43
43
|
static readonly plugName = "timeTravel";
|
|
44
|
+
protected lastTimestamp: number;
|
|
44
45
|
protected playbackTimeoutId: number;
|
|
45
46
|
constructor(config?: Partial<TimeTravelConfig<T>>, rtr?: Reactor<T>);
|
|
46
47
|
wire(): void;
|
|
@@ -66,7 +67,7 @@ declare class TimeTravelPlugin<T extends object = any> extends BaseReactorPlugin
|
|
|
66
67
|
/** Pauses the live VCR playback. */
|
|
67
68
|
pause: () => void;
|
|
68
69
|
/** Exports the current session as a JSON string. */
|
|
69
|
-
export(): string;
|
|
70
|
+
export(replacer?: ((this: any, key: string, value: any) => any) | (number | string)[] | null, space?: string | number): string;
|
|
70
71
|
/** Imports a session from a JSON string, allowing you to replay or analyze past states. */
|
|
71
72
|
import(json: string): void;
|
|
72
73
|
}
|
package/dist/utils.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { d as canHandle, e as deepClone, f as deleteAny, g as getAny, h as getTrailRecords, i as inAny, j as isObj, k as isPOJO, m as mergeObjs, n as nuke, p as parseAnyObj, l as parseEvtOpts, s as setAny } from './index-
|
|
1
|
+
export { d as canHandle, e as deepClone, f as deleteAny, g as getAny, h as getTrailRecords, i as inAny, j as isObj, k as isPOJO, m as mergeObjs, n as nuke, p as parseAnyObj, l as parseEvtOpts, s as setAny } from './index-Oie9hhE8.cjs';
|
|
2
2
|
|
|
3
3
|
declare function clamp(min: number | undefined, val: number, max?: number): number;
|
|
4
4
|
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { d as canHandle, e as deepClone, f as deleteAny, g as getAny, h as getTrailRecords, i as inAny, j as isObj, k as isPOJO, m as mergeObjs, n as nuke, p as parseAnyObj, l as parseEvtOpts, s as setAny } from './index-
|
|
1
|
+
export { d as canHandle, e as deepClone, f as deleteAny, g as getAny, h as getTrailRecords, i as inAny, j as isObj, k as isPOJO, m as mergeObjs, n as nuke, p as parseAnyObj, l as parseEvtOpts, s as setAny } from './index-Oie9hhE8.js';
|
|
2
2
|
|
|
3
3
|
declare function clamp(min: number | undefined, val: number, max?: number): number;
|
|
4
4
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sia-reactor",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.21",
|
|
4
4
|
"description": "The Programmable Data DOM. A high-performance State Intent Architecture (S.I.A.) Engine with zero-allocation loops, event propagation, and structural sharing.",
|
|
5
5
|
"author": "Oketade Oluwatobiloba <tobioketade007@gmail.com>",
|
|
6
6
|
"license": "MIT",
|