sia-reactor 0.0.17 → 0.0.18
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/dist/adapters/react.d.cts +1 -1
- package/dist/adapters/react.d.ts +1 -1
- package/dist/adapters/vanilla.d.cts +2 -2
- package/dist/adapters/vanilla.d.ts +2 -2
- package/dist/{index-jlxXiocy.d.cts → index-JdV5I0R3.d.cts} +16 -8
- package/dist/{index-jlxXiocy.d.ts → index-JdV5I0R3.d.ts} +16 -8
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/plugins.d.cts +2 -2
- package/dist/plugins.d.ts +2 -2
- package/dist/utils.d.cts +1 -1
- package/dist/utils.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useLayoutEffect } from 'react';
|
|
2
|
-
import { E as EffectOptions, R as Reactor, l as Reactive, W as WildPaths, o as PathValue } from '../index-
|
|
2
|
+
import { E as EffectOptions, R as Reactor, l as Reactive, W as WildPaths, o as PathValue } from '../index-JdV5I0R3.cjs';
|
|
3
3
|
|
|
4
4
|
/** Isomorphic layout effect alias (`useLayoutEffect` in browser, `useEffect` otherwise). */
|
|
5
5
|
declare const useISOLayoutEffect: typeof useLayoutEffect;
|
package/dist/adapters/react.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useLayoutEffect } from 'react';
|
|
2
|
-
import { E as EffectOptions, R as Reactor, l as Reactive, W as WildPaths, o as PathValue } from '../index-
|
|
2
|
+
import { E as EffectOptions, R as Reactor, l as Reactive, W as WildPaths, o as PathValue } from '../index-JdV5I0R3.js';
|
|
3
3
|
|
|
4
4
|
/** Isomorphic layout effect alias (`useLayoutEffect` in browser, `useEffect` otherwise). */
|
|
5
5
|
declare const useISOLayoutEffect: typeof useLayoutEffect;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { E as EffectOptions } from '../index-
|
|
2
|
-
export { A as Autotracker, w as withTracker } from '../index-
|
|
1
|
+
import { E as EffectOptions } from '../index-JdV5I0R3.cjs';
|
|
2
|
+
export { A as Autotracker, w as withTracker } from '../index-JdV5I0R3.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Runs a reactive side effect in vanilla JavaScript.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { E as EffectOptions } from '../index-
|
|
2
|
-
export { A as Autotracker, w as withTracker } from '../index-
|
|
1
|
+
import { E as EffectOptions } from '../index-JdV5I0R3.js';
|
|
2
|
+
export { A as Autotracker, w as withTracker } from '../index-JdV5I0R3.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Runs a reactive side effect in vanilla JavaScript.
|
|
@@ -21,16 +21,22 @@ type NoTraverse =
|
|
|
21
21
|
| Inert<unknown>;
|
|
22
22
|
|
|
23
23
|
/** Dot-path union for traversable keys in `T`. */
|
|
24
|
-
type Paths<T, S extends string = ".", D extends number = RDepth
|
|
24
|
+
type Paths<T, S extends string = ".", D extends number = RDepth, Seen = never> = [
|
|
25
|
+
D
|
|
26
|
+
] extends [0]
|
|
25
27
|
? never // Circuit Breaker Triggered
|
|
28
|
+
: T extends Seen
|
|
29
|
+
? never // Cycle Guard Triggered
|
|
26
30
|
: T extends NoTraverse
|
|
27
31
|
? never
|
|
28
32
|
: T extends readonly (infer U)[]
|
|
29
|
-
?
|
|
33
|
+
?
|
|
34
|
+
| `${Extract<keyof T, number>}`
|
|
35
|
+
| `${Extract<keyof T, number>}${S}${Paths<U, S, RPrev[D], Seen | T>}`
|
|
30
36
|
: {
|
|
31
37
|
[K in keyof T & (string | number)]: T[K] extends Primitive
|
|
32
38
|
? `${K}`
|
|
33
|
-
: `${K}` | `${K}${S}${Paths<T[K], S, RPrev[D]>}`;
|
|
39
|
+
: `${K}` | `${K}${S}${Paths<T[K], S, RPrev[D], Seen | T>}`;
|
|
34
40
|
}[keyof T & (string | number)];
|
|
35
41
|
/** Wildcard path (`*`) or concrete dot-path. */
|
|
36
42
|
type WildPaths<T, S extends string = "."> = "*" | Paths<T, S>;
|
|
@@ -113,14 +119,16 @@ type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (
|
|
|
113
119
|
// --- "It's not that deep" WARRIORS ---
|
|
114
120
|
|
|
115
121
|
/** Deep key union of `T` up to depth `D{10}`. */
|
|
116
|
-
type DeepKeys<T, D extends number = RDepth> = [D] extends [0]
|
|
122
|
+
type DeepKeys<T, D extends number = RDepth, Seen = never> = [D] extends [0]
|
|
117
123
|
? never
|
|
124
|
+
: T extends Seen
|
|
125
|
+
? never // Cycle Guard Triggered
|
|
118
126
|
: T extends NoTraverse
|
|
119
127
|
? never
|
|
120
128
|
: T extends readonly any[]
|
|
121
|
-
? DeepKeys<T[number], RPrev[D]>
|
|
129
|
+
? DeepKeys<T[number], RPrev[D], Seen | T>
|
|
122
130
|
: {
|
|
123
|
-
[K in keyof T & (string | number)]: K | DeepKeys<T[K], RPrev[D]>;
|
|
131
|
+
[K in keyof T & (string | number)]: K | DeepKeys<T[K], RPrev[D], Seen | T>;
|
|
124
132
|
}[keyof T & (string | number)];
|
|
125
133
|
|
|
126
134
|
/** Recursive merge result type for `T1` and `T2` up to depth `D{10}`. */
|
|
@@ -724,8 +732,8 @@ declare abstract class BaseReactorPlugin<T extends object = any, Config = any, S
|
|
|
724
732
|
get name(): string;
|
|
725
733
|
protected ac: AbortController;
|
|
726
734
|
readonly signal: AbortSignal;
|
|
727
|
-
|
|
728
|
-
|
|
735
|
+
rtr: Reactor<T>;
|
|
736
|
+
config: Config extends object ? Reactive<Config> : Config;
|
|
729
737
|
state: State extends object ? Reactive<State> : State;
|
|
730
738
|
constructor(config?: Config, rtr?: Reactor<T>, state?: State);
|
|
731
739
|
/** Entry point called to initialize plugin wiring. */
|
|
@@ -21,16 +21,22 @@ type NoTraverse =
|
|
|
21
21
|
| Inert<unknown>;
|
|
22
22
|
|
|
23
23
|
/** Dot-path union for traversable keys in `T`. */
|
|
24
|
-
type Paths<T, S extends string = ".", D extends number = RDepth
|
|
24
|
+
type Paths<T, S extends string = ".", D extends number = RDepth, Seen = never> = [
|
|
25
|
+
D
|
|
26
|
+
] extends [0]
|
|
25
27
|
? never // Circuit Breaker Triggered
|
|
28
|
+
: T extends Seen
|
|
29
|
+
? never // Cycle Guard Triggered
|
|
26
30
|
: T extends NoTraverse
|
|
27
31
|
? never
|
|
28
32
|
: T extends readonly (infer U)[]
|
|
29
|
-
?
|
|
33
|
+
?
|
|
34
|
+
| `${Extract<keyof T, number>}`
|
|
35
|
+
| `${Extract<keyof T, number>}${S}${Paths<U, S, RPrev[D], Seen | T>}`
|
|
30
36
|
: {
|
|
31
37
|
[K in keyof T & (string | number)]: T[K] extends Primitive
|
|
32
38
|
? `${K}`
|
|
33
|
-
: `${K}` | `${K}${S}${Paths<T[K], S, RPrev[D]>}`;
|
|
39
|
+
: `${K}` | `${K}${S}${Paths<T[K], S, RPrev[D], Seen | T>}`;
|
|
34
40
|
}[keyof T & (string | number)];
|
|
35
41
|
/** Wildcard path (`*`) or concrete dot-path. */
|
|
36
42
|
type WildPaths<T, S extends string = "."> = "*" | Paths<T, S>;
|
|
@@ -113,14 +119,16 @@ type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (
|
|
|
113
119
|
// --- "It's not that deep" WARRIORS ---
|
|
114
120
|
|
|
115
121
|
/** Deep key union of `T` up to depth `D{10}`. */
|
|
116
|
-
type DeepKeys<T, D extends number = RDepth> = [D] extends [0]
|
|
122
|
+
type DeepKeys<T, D extends number = RDepth, Seen = never> = [D] extends [0]
|
|
117
123
|
? never
|
|
124
|
+
: T extends Seen
|
|
125
|
+
? never // Cycle Guard Triggered
|
|
118
126
|
: T extends NoTraverse
|
|
119
127
|
? never
|
|
120
128
|
: T extends readonly any[]
|
|
121
|
-
? DeepKeys<T[number], RPrev[D]>
|
|
129
|
+
? DeepKeys<T[number], RPrev[D], Seen | T>
|
|
122
130
|
: {
|
|
123
|
-
[K in keyof T & (string | number)]: K | DeepKeys<T[K], RPrev[D]>;
|
|
131
|
+
[K in keyof T & (string | number)]: K | DeepKeys<T[K], RPrev[D], Seen | T>;
|
|
124
132
|
}[keyof T & (string | number)];
|
|
125
133
|
|
|
126
134
|
/** Recursive merge result type for `T1` and `T2` up to depth `D{10}`. */
|
|
@@ -724,8 +732,8 @@ declare abstract class BaseReactorPlugin<T extends object = any, Config = any, S
|
|
|
724
732
|
get name(): string;
|
|
725
733
|
protected ac: AbortController;
|
|
726
734
|
readonly signal: AbortSignal;
|
|
727
|
-
|
|
728
|
-
|
|
735
|
+
rtr: Reactor<T>;
|
|
736
|
+
config: Config extends object ? Reactive<Config> : Config;
|
|
729
737
|
state: State extends object ? Reactive<State> : State;
|
|
730
738
|
constructor(config?: Config, rtr?: Reactor<T>, state?: State);
|
|
731
739
|
/** Entry point called to initialize plugin wiring. */
|
package/dist/index.d.cts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { C as CTX, q as ChildPaths, D as DeepKeys, r as DeepMerge, t as DeepPartial, u as DeepRequired, v as Deleter, x as DeleterRecord, y as DirectPayload, z as EVT_OPTS, F as EVT_WARN, E as EffectOptions, G as Getter, H as GetterRecord, I as INDIFFABLE, J as INERTIA, K as Inert, L as Intent, M as Listener, N as ListenerOptions, O as ListenerOptionsTuple, Q as ListenerRecord, S as Live, T as NIL, U as NOOP, V as PathBranch, X as PathBranchValue, Y as PathKey, Z as PathLeaf, o as PathValue, P as Paths, _ as Payload, $ as RAW, a0 as REJECTABLE, a as REvent, a1 as RTR_BATCH, a2 as RTR_LOG, l as Reactive, a3 as ReactivePreferences, R as Reactor, a4 as ReactorBuild, a5 as ReactorEvent, a6 as SSVERSION, a7 as Setter, a8 as SetterRecord, a9 as Stable, aa as State, ab as StrictPathKey, ac as SyncOptions, ad as SyncOptionsTuple, ae as TERMINATOR, af as Target, ag as Unflatten, ah as UnionToIntersection, ai as UpdatePayload, aj as VERSION, ak as Volatile, al as Watcher, am as WatcherRecord, W as WildPaths, an as getRaw, ao as getSnapshotVersion, ap as getVersion, aq as inert, ar as intent, as as isInert, at as isIntent, au as isVolatile, av as live, aw as methods, ax as reactive, ay as stable, az as state, aA as volatile } from './index-
|
|
1
|
+
export { C as CTX, q as ChildPaths, D as DeepKeys, r as DeepMerge, t as DeepPartial, u as DeepRequired, v as Deleter, x as DeleterRecord, y as DirectPayload, z as EVT_OPTS, F as EVT_WARN, E as EffectOptions, G as Getter, H as GetterRecord, I as INDIFFABLE, J as INERTIA, K as Inert, L as Intent, M as Listener, N as ListenerOptions, O as ListenerOptionsTuple, Q as ListenerRecord, S as Live, T as NIL, U as NOOP, V as PathBranch, X as PathBranchValue, Y as PathKey, Z as PathLeaf, o as PathValue, P as Paths, _ as Payload, $ as RAW, a0 as REJECTABLE, a as REvent, a1 as RTR_BATCH, a2 as RTR_LOG, l as Reactive, a3 as ReactivePreferences, R as Reactor, a4 as ReactorBuild, a5 as ReactorEvent, a6 as SSVERSION, a7 as Setter, a8 as SetterRecord, a9 as Stable, aa as State, ab as StrictPathKey, ac as SyncOptions, ad as SyncOptionsTuple, ae as TERMINATOR, af as Target, ag as Unflatten, ah as UnionToIntersection, ai as UpdatePayload, aj as VERSION, ak as Volatile, al as Watcher, am as WatcherRecord, W as WildPaths, an as getRaw, ao as getSnapshotVersion, ap as getVersion, aq as inert, ar as intent, as as isInert, at as isIntent, au as isVolatile, av as live, aw as methods, ax as reactive, ay as stable, az as state, aA as volatile } from './index-JdV5I0R3.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { C as CTX, q as ChildPaths, D as DeepKeys, r as DeepMerge, t as DeepPartial, u as DeepRequired, v as Deleter, x as DeleterRecord, y as DirectPayload, z as EVT_OPTS, F as EVT_WARN, E as EffectOptions, G as Getter, H as GetterRecord, I as INDIFFABLE, J as INERTIA, K as Inert, L as Intent, M as Listener, N as ListenerOptions, O as ListenerOptionsTuple, Q as ListenerRecord, S as Live, T as NIL, U as NOOP, V as PathBranch, X as PathBranchValue, Y as PathKey, Z as PathLeaf, o as PathValue, P as Paths, _ as Payload, $ as RAW, a0 as REJECTABLE, a as REvent, a1 as RTR_BATCH, a2 as RTR_LOG, l as Reactive, a3 as ReactivePreferences, R as Reactor, a4 as ReactorBuild, a5 as ReactorEvent, a6 as SSVERSION, a7 as Setter, a8 as SetterRecord, a9 as Stable, aa as State, ab as StrictPathKey, ac as SyncOptions, ad as SyncOptionsTuple, ae as TERMINATOR, af as Target, ag as Unflatten, ah as UnionToIntersection, ai as UpdatePayload, aj as VERSION, ak as Volatile, al as Watcher, am as WatcherRecord, W as WildPaths, an as getRaw, ao as getSnapshotVersion, ap as getVersion, aq as inert, ar as intent, as as isInert, at as isIntent, au as isVolatile, av as live, aw as methods, ax as reactive, ay as stable, az as state, aA as volatile } from './index-
|
|
1
|
+
export { C as CTX, q as ChildPaths, D as DeepKeys, r as DeepMerge, t as DeepPartial, u as DeepRequired, v as Deleter, x as DeleterRecord, y as DirectPayload, z as EVT_OPTS, F as EVT_WARN, E as EffectOptions, G as Getter, H as GetterRecord, I as INDIFFABLE, J as INERTIA, K as Inert, L as Intent, M as Listener, N as ListenerOptions, O as ListenerOptionsTuple, Q as ListenerRecord, S as Live, T as NIL, U as NOOP, V as PathBranch, X as PathBranchValue, Y as PathKey, Z as PathLeaf, o as PathValue, P as Paths, _ as Payload, $ as RAW, a0 as REJECTABLE, a as REvent, a1 as RTR_BATCH, a2 as RTR_LOG, l as Reactive, a3 as ReactivePreferences, R as Reactor, a4 as ReactorBuild, a5 as ReactorEvent, a6 as SSVERSION, a7 as Setter, a8 as SetterRecord, a9 as Stable, aa as State, ab as StrictPathKey, ac as SyncOptions, ad as SyncOptionsTuple, ae as TERMINATOR, af as Target, ag as Unflatten, ah as UnionToIntersection, ai as UpdatePayload, aj as VERSION, ak as Volatile, al as Watcher, am as WatcherRecord, W as WildPaths, an as getRaw, ao as getSnapshotVersion, ap as getVersion, aq as inert, ar as intent, as as isInert, at as isIntent, au as isVolatile, av as live, aw as methods, ax as reactive, ay as stable, az as state, aA as volatile } from './index-JdV5I0R3.js';
|
package/dist/plugins.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { P as Paths, B as BaseReactorPlugin, R as Reactor, a as REvent } from './index-
|
|
2
|
-
export { b as ReactorPluginConstructor } from './index-
|
|
1
|
+
import { P as Paths, B as BaseReactorPlugin, R as Reactor, a as REvent } from './index-JdV5I0R3.cjs';
|
|
2
|
+
export { b as ReactorPluginConstructor } from './index-JdV5I0R3.cjs';
|
|
3
3
|
|
|
4
4
|
interface StorageAdapterConfig {
|
|
5
5
|
debug: boolean;
|
package/dist/plugins.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { P as Paths, B as BaseReactorPlugin, R as Reactor, a as REvent } from './index-
|
|
2
|
-
export { b as ReactorPluginConstructor } from './index-
|
|
1
|
+
import { P as Paths, B as BaseReactorPlugin, R as Reactor, a as REvent } from './index-JdV5I0R3.js';
|
|
2
|
+
export { b as ReactorPluginConstructor } from './index-JdV5I0R3.js';
|
|
3
3
|
|
|
4
4
|
interface StorageAdapterConfig {
|
|
5
5
|
debug: boolean;
|
package/dist/utils.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { c as canHandle, d as deepClone, e as deleteAny, g as getAny, f as getTrailRecords, i as inAny, h as isObj, j as isPOJO, m as mergeObjs, n as nuke, p as parseAnyObj, k as parseEvtOpts, s as setAny } from './index-
|
|
1
|
+
export { c as canHandle, d as deepClone, e as deleteAny, g as getAny, f as getTrailRecords, i as inAny, h as isObj, j as isPOJO, m as mergeObjs, n as nuke, p as parseAnyObj, k as parseEvtOpts, s as setAny } from './index-JdV5I0R3.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 { c as canHandle, d as deepClone, e as deleteAny, g as getAny, f as getTrailRecords, i as inAny, h as isObj, j as isPOJO, m as mergeObjs, n as nuke, p as parseAnyObj, k as parseEvtOpts, s as setAny } from './index-
|
|
1
|
+
export { c as canHandle, d as deepClone, e as deleteAny, g as getAny, f as getTrailRecords, i as inAny, h as isObj, j as isPOJO, m as mergeObjs, n as nuke, p as parseAnyObj, k as parseEvtOpts, s as setAny } from './index-JdV5I0R3.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.18",
|
|
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",
|