@raphy-js/raph 1.0.0-dev.2 → 1.0.1-dev.20
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 +1096 -0
- package/dist/api/Raph.d.ts +59 -190
- package/dist/api/RaphFacadeSession.d.ts +90 -0
- package/dist/api/RaphReactivityInstance.d.ts +72 -0
- package/dist/api/errors.d.ts +9 -4
- package/dist/api/types.d.ts +162 -17
- package/dist/core-CyilRD7s.js +1055 -0
- package/dist/core-ugchZNqC.cjs +1 -0
- package/dist/debug/api/Raph.cjs +1 -1
- package/dist/debug/api/Raph.js +368 -366
- package/dist/debug/api/RaphFacadeSession.cjs +1 -0
- package/dist/debug/api/RaphFacadeSession.js +306 -0
- package/dist/debug/api/RaphReactivityInstance.cjs +1 -0
- package/dist/debug/api/RaphReactivityInstance.js +149 -0
- package/dist/debug/api/errors.cjs +1 -1
- package/dist/debug/api/errors.js +10 -7
- package/dist/debug/path/DataPath.cjs +1 -0
- package/dist/debug/path/{data-path.js → DataPath.js} +151 -180
- package/dist/debug/path/PathRouter.cjs +1 -0
- package/dist/debug/path/{path-router.js → PathRouter.js} +1 -1
- package/dist/debug/path/RaphKernel.cjs +1 -1
- package/dist/debug/path/RaphKernel.js +258 -207
- package/dist/debug/path/data-path.utils.cjs +1 -0
- package/dist/debug/path/data-path.utils.js +56 -0
- package/dist/debug/path/derived/DerivedRegistry.cjs +1 -0
- package/dist/debug/path/{DerivedRegistry.js → derived/DerivedRegistry.js} +5 -5
- package/dist/debug/path/derived/derived-collection.utils.cjs +1 -0
- package/dist/debug/path/{derived-collection.js → derived/derived-collection.utils.js} +1 -1
- package/dist/debug/path/derived/derived-strategy.types.cjs +1 -0
- package/dist/debug/path/derived/derived-strategy.types.js +1 -0
- package/dist/debug/path/{MetaController.cjs → meta/MetaController.cjs} +1 -1
- package/dist/debug/path/{MetaController.js → meta/MetaController.js} +3 -3
- package/dist/debug/path/meta/RaphMetaStore.cjs +1 -0
- package/dist/debug/path/{RaphMetaStore.js → meta/RaphMetaStore.js} +1 -1
- package/dist/debug/path/meta/meta.types.cjs +1 -0
- package/dist/debug/path/meta/meta.types.js +1 -0
- package/dist/debug/path/storage/AdapterPathStore.cjs +1 -0
- package/dist/debug/path/{AdapterPathStore.js → storage/AdapterPathStore.js} +9 -9
- package/dist/debug/path/storage/DefaultDataAdapter.cjs +1 -0
- package/dist/debug/path/{data-adapter.js → storage/DefaultDataAdapter.js} +2 -2
- package/dist/debug/path/storage/PathEventHub.cjs +1 -0
- package/dist/debug/path/{PathEventHub.js → storage/PathEventHub.js} +34 -34
- package/dist/debug/path/storage/PathStore.cjs +1 -0
- package/dist/debug/path/{PathStore.js → storage/PathStore.js} +28 -28
- package/dist/debug/path/storage/data-adapter.types.cjs +1 -0
- package/dist/debug/path/storage/data-adapter.types.js +1 -0
- package/dist/debug/reactivity/engine.cjs +1 -1
- package/dist/debug/reactivity/engine.js +478 -306
- package/dist/debug/reactivity/reactive-object.cjs +1 -0
- package/dist/debug/reactivity/reactive-object.js +280 -0
- package/dist/debug/runtime/RaphRuntime.cjs +1 -1
- package/dist/debug/runtime/RaphRuntime.js +798 -519
- package/dist/debug/runtime/diagnostics/RaphDebug.cjs +1 -0
- package/dist/debug/runtime/diagnostics/RaphDebug.js +297 -0
- package/dist/debug/runtime/errors.cjs +1 -1
- package/dist/debug/runtime/errors.js +6 -3
- package/dist/debug/runtime/ownership/RaphEffectScope.cjs +1 -0
- package/dist/debug/runtime/ownership/RaphEffectScope.js +171 -0
- package/dist/debug/runtime/ownership/RaphNode.cjs +1 -0
- package/dist/debug/runtime/ownership/RaphNode.js +206 -0
- package/dist/debug/runtime/ownership/RaphScope.cjs +1 -0
- package/dist/debug/runtime/ownership/RaphScope.js +101 -0
- package/dist/debug/runtime/ownership/parent-graph.types.cjs +1 -0
- package/dist/debug/runtime/ownership/parent-graph.types.js +1 -0
- package/dist/debug/runtime/phases/RaphPhasePipeline.cjs +1 -0
- package/dist/debug/runtime/phases/RaphPhasePipeline.js +587 -0
- package/dist/debug/runtime/phases/orderPhaseTasks.cjs +1 -0
- package/dist/debug/runtime/phases/orderPhaseTasks.js +59 -0
- package/dist/debug/runtime/reactivity/PathHandle.cjs +1 -0
- package/dist/debug/runtime/{PathHandle.js → reactivity/PathHandle.js} +75 -39
- package/dist/debug/runtime/reactivity/RaphMetaSource.cjs +1 -0
- package/dist/debug/runtime/reactivity/RaphMetaSource.js +112 -0
- package/dist/debug/runtime/reactivity/RaphWorkGraph.cjs +1 -0
- package/dist/debug/runtime/reactivity/RaphWorkGraph.js +995 -0
- package/dist/debug/runtime/reactivity/RuntimeReactivity.cjs +1 -0
- package/dist/debug/runtime/reactivity/RuntimeReactivity.js +156 -0
- package/dist/debug/runtime/reactivity/RuntimeWatch.cjs +1 -0
- package/dist/debug/runtime/reactivity/RuntimeWatch.js +88 -0
- package/dist/debug/runtime/reactivity/runtime-reactivity.types.cjs +1 -0
- package/dist/debug/runtime/reactivity/runtime-reactivity.types.js +1 -0
- package/dist/entrypoints/machine-testing.d.ts +2 -0
- package/dist/entrypoints/machine.d.ts +5 -0
- package/dist/entrypoints/path.d.ts +14 -0
- package/dist/entrypoints/reactivity.d.ts +1 -0
- package/dist/entrypoints/runtime.d.ts +17 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +46 -38
- package/dist/machine/compiler.d.ts +71 -0
- package/dist/machine/core.d.ts +50 -0
- package/dist/machine/persistence.d.ts +5 -0
- package/dist/machine/runtime.d.ts +4 -0
- package/dist/machine/testing.d.ts +43 -0
- package/dist/machine/types.d.ts +155 -0
- package/dist/machine-testing.cjs +1 -0
- package/dist/machine-testing.js +188 -0
- package/dist/machine.cjs +1 -0
- package/dist/machine.js +837 -0
- package/dist/main.d.ts +20 -0
- package/dist/path/{data-path.d.ts → DataPath.d.ts} +16 -40
- package/dist/path/{path-router.d.ts → PathRouter.d.ts} +1 -1
- package/dist/path/RaphKernel.d.ts +13 -10
- package/dist/path/data-path.types.d.ts +34 -0
- package/dist/path/data-path.utils.d.ts +9 -0
- package/dist/path/{DerivedRegistry.d.ts → derived/DerivedRegistry.d.ts} +2 -2
- package/dist/path/{RaphDerivedHandle.d.ts → derived/RaphDerivedHandle.d.ts} +3 -3
- package/dist/path/derived/derived-collection.types.d.ts +12 -0
- package/dist/path/{derived-collection.d.ts → derived/derived-collection.utils.d.ts} +3 -13
- package/dist/path/{derived-strategies.d.ts → derived/derived-strategy.types.d.ts} +0 -3
- package/dist/path/derived/derived-strategy.utils.d.ts +4 -0
- package/dist/path/{MetaController.d.ts → meta/MetaController.d.ts} +4 -4
- package/dist/path/{RaphMeta.d.ts → meta/RaphMeta.d.ts} +2 -2
- package/dist/path/{RaphMetaStore.d.ts → meta/RaphMetaStore.d.ts} +1 -1
- package/dist/path/{meta.types.d.ts → meta/meta.types.d.ts} +2 -4
- package/dist/path/path.types.d.ts +3 -2
- package/dist/path/{segment-key.d.ts → pathSegmentKey.d.ts} +1 -1
- package/dist/path/{AdapterPathStore.d.ts → storage/AdapterPathStore.d.ts} +4 -4
- package/dist/path/{data-adapter.d.ts → storage/DefaultDataAdapter.d.ts} +2 -17
- package/dist/path/{PathEventHub.d.ts → storage/PathEventHub.d.ts} +9 -9
- package/dist/path/{PathStore.d.ts → storage/PathStore.d.ts} +3 -3
- package/dist/path/storage/data-adapter.types.d.ts +17 -0
- package/dist/path.cjs +1 -1
- package/dist/path.js +16 -16
- package/dist/raph.cjs +1 -1
- package/dist/raph.js +46 -38
- package/dist/reactivity/engine.d.ts +17 -3
- package/dist/reactivity/reactive-object.d.ts +36 -0
- package/dist/reactivity/types.d.ts +25 -0
- package/dist/reactivity.cjs +1 -1
- package/dist/reactivity.js +12 -12
- package/dist/runtime/RaphRuntime.d.ts +132 -192
- package/dist/runtime/diagnostics/RaphDebug.d.ts +239 -0
- package/dist/runtime/errors.d.ts +5 -0
- package/dist/runtime/ownership/RaphEffectScope.d.ts +29 -0
- package/dist/runtime/ownership/RaphNode.d.ts +40 -0
- package/dist/runtime/ownership/RaphScope.d.ts +38 -0
- package/dist/runtime/{parent-graph.d.ts → ownership/parent-graph.types.d.ts} +0 -1
- package/dist/runtime/ownership/parentGraph.d.ts +3 -0
- package/dist/runtime/phases/RaphPhasePipeline.d.ts +79 -0
- package/dist/runtime/phases/orderPhaseTasks.d.ts +6 -0
- package/dist/runtime/phases/phase.types.d.ts +92 -0
- package/dist/runtime/{PathHandle.d.ts → reactivity/PathHandle.d.ts} +14 -6
- package/dist/runtime/reactivity/RaphMetaSource.d.ts +32 -0
- package/dist/runtime/reactivity/RaphWorkGraph.d.ts +171 -0
- package/dist/runtime/{RuntimeReactivity.d.ts → reactivity/RuntimeReactivity.d.ts} +14 -9
- package/dist/runtime/{RuntimeWatch.d.ts → reactivity/RuntimeWatch.d.ts} +9 -3
- package/dist/runtime/{runtime-reactivity.types.d.ts → reactivity/runtime-reactivity.types.d.ts} +3 -1
- package/dist/runtime.cjs +1 -1
- package/dist/runtime.js +21 -16
- package/package.json +68 -35
- package/ReadMe.md +0 -153
- package/dist/api/public.d.ts +0 -22
- package/dist/debug/api/public.cjs +0 -1
- package/dist/debug/api/public.js +0 -40
- package/dist/debug/path/AdapterPathStore.cjs +0 -1
- package/dist/debug/path/DerivedRegistry.cjs +0 -1
- package/dist/debug/path/PathEventHub.cjs +0 -1
- package/dist/debug/path/PathStore.cjs +0 -1
- package/dist/debug/path/RaphMetaStore.cjs +0 -1
- package/dist/debug/path/data-adapter.cjs +0 -1
- package/dist/debug/path/data-path.cjs +0 -1
- package/dist/debug/path/derived-collection.cjs +0 -1
- package/dist/debug/path/path-router.cjs +0 -1
- package/dist/debug/path/public.cjs +0 -1
- package/dist/debug/path/public.js +0 -18
- package/dist/debug/runtime/PathHandle.cjs +0 -1
- package/dist/debug/runtime/RaphDebug.cjs +0 -1
- package/dist/debug/runtime/RaphDebug.js +0 -15
- package/dist/debug/runtime/RaphNode.cjs +0 -1
- package/dist/debug/runtime/RaphNode.js +0 -143
- package/dist/debug/runtime/RaphPhasePipeline.cjs +0 -1
- package/dist/debug/runtime/RaphPhasePipeline.js +0 -526
- package/dist/debug/runtime/RaphScope.cjs +0 -1
- package/dist/debug/runtime/RaphScope.js +0 -64
- package/dist/debug/runtime/RuntimeReactivity.cjs +0 -1
- package/dist/debug/runtime/RuntimeReactivity.js +0 -154
- package/dist/debug/runtime/RuntimeWatch.cjs +0 -1
- package/dist/debug/runtime/RuntimeWatch.js +0 -71
- package/dist/debug/runtime/public.cjs +0 -1
- package/dist/debug/runtime/public.js +0 -18
- package/dist/path/public.d.ts +0 -14
- package/dist/runtime/RaphDebug.d.ts +0 -32
- package/dist/runtime/RaphNode.d.ts +0 -68
- package/dist/runtime/RaphPhasePipeline.d.ts +0 -133
- package/dist/runtime/RaphScope.d.ts +0 -50
- package/dist/runtime/phase.types.d.ts +0 -49
- package/dist/runtime/public.d.ts +0 -13
- /package/dist/debug/path/{meta.types.cjs → data-path.types.cjs} +0 -0
- /package/dist/debug/path/{meta.types.js → data-path.types.js} +0 -0
- /package/dist/debug/path/{RaphDerivedHandle.cjs → derived/RaphDerivedHandle.cjs} +0 -0
- /package/dist/debug/path/{RaphDerivedHandle.js → derived/RaphDerivedHandle.js} +0 -0
- /package/dist/debug/{runtime/runtime-reactivity.types.cjs → path/derived/derived-collection.types.cjs} +0 -0
- /package/dist/debug/{runtime/runtime-reactivity.types.js → path/derived/derived-collection.types.js} +0 -0
- /package/dist/debug/path/{derived-strategies.cjs → derived/derived-strategy.utils.cjs} +0 -0
- /package/dist/debug/path/{derived-strategies.js → derived/derived-strategy.utils.js} +0 -0
- /package/dist/debug/path/{RaphMeta.cjs → meta/RaphMeta.cjs} +0 -0
- /package/dist/debug/path/{RaphMeta.js → meta/RaphMeta.js} +0 -0
- /package/dist/debug/path/{segment-key.cjs → pathSegmentKey.cjs} +0 -0
- /package/dist/debug/path/{segment-key.js → pathSegmentKey.js} +0 -0
- /package/dist/debug/path/{data-draft.cjs → storage/createDataDraft.cjs} +0 -0
- /package/dist/debug/path/{data-draft.js → storage/createDataDraft.js} +0 -0
- /package/dist/debug/runtime/{parent-graph.cjs → ownership/parentGraph.cjs} +0 -0
- /package/dist/debug/runtime/{parent-graph.js → ownership/parentGraph.js} +0 -0
- /package/dist/debug/runtime/{disposal.cjs → ownership/throwDisposalErrors.cjs} +0 -0
- /package/dist/debug/runtime/{disposal.js → ownership/throwDisposalErrors.js} +0 -0
- /package/dist/debug/runtime/{RaphFrameLoop.cjs → phases/RaphFrameLoop.cjs} +0 -0
- /package/dist/debug/runtime/{RaphFrameLoop.js → phases/RaphFrameLoop.js} +0 -0
- /package/dist/debug/runtime/{phase.types.cjs → phases/phase.types.cjs} +0 -0
- /package/dist/debug/runtime/{phase.types.js → phases/phase.types.js} +0 -0
- /package/dist/path/{data-draft.d.ts → storage/createDataDraft.d.ts} +0 -0
- /package/dist/runtime/{disposal.d.ts → ownership/throwDisposalErrors.d.ts} +0 -0
- /package/dist/runtime/{RaphFrameLoop.d.ts → phases/RaphFrameLoop.d.ts} +0 -0
package/dist/debug/api/Raph.js
CHANGED
|
@@ -1,419 +1,421 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import "../path/
|
|
5
|
-
import "../
|
|
6
|
-
import {
|
|
7
|
-
import "
|
|
8
|
-
import {
|
|
9
|
-
import "
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
import { RaphSchedulerType as c } from "../runtime/phase.types.js";
|
|
14
|
-
import "../runtime/RaphNode.js";
|
|
15
|
-
import { RaphRuntime as d } from "../runtime/RaphRuntime.js";
|
|
16
|
-
import "../runtime/RaphScope.js";
|
|
17
|
-
import { RaphConfigurationError as a, RaphModeError as f, RaphDefaultRuntimeError as l } from "./errors.js";
|
|
18
|
-
import { RaphReactivity as D } from "../reactivity/engine.js";
|
|
19
|
-
function n() {
|
|
20
|
-
throw new a(
|
|
21
|
-
"[Raph] Facade is not configured. Call Raph.configure({ mode }) first."
|
|
22
|
-
);
|
|
23
|
-
}
|
|
24
|
-
class s {
|
|
25
|
-
/**
|
|
26
|
-
* Показывает, завершена ли явная конфигурация facade.
|
|
27
|
-
*/
|
|
28
|
-
static get configured() {
|
|
29
|
-
return this._state === "configured";
|
|
1
|
+
var d = Object.defineProperty;
|
|
2
|
+
var f = (i, e, t) => e in i ? d(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
|
|
3
|
+
var u = (i, e, t) => f(i, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { filterByKey as p, collectionByKey as m, full as g } from "../path/derived/derived-strategy.utils.js";
|
|
5
|
+
import { RaphSchedulerType as q } from "../runtime/phases/phase.types.js";
|
|
6
|
+
import { RaphRuntime as v } from "../runtime/RaphRuntime.js";
|
|
7
|
+
import { RaphConfigurationError as _, RaphCapabilityError as a } from "./errors.js";
|
|
8
|
+
import { RaphFacadeSession as l } from "./RaphFacadeSession.js";
|
|
9
|
+
import { RaphReactivityInstance as o } from "./RaphReactivityInstance.js";
|
|
10
|
+
class y {
|
|
11
|
+
constructor(e) {
|
|
12
|
+
this._session = e;
|
|
30
13
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
return
|
|
14
|
+
// ---------------------------------------------
|
|
15
|
+
// PUBLIC API
|
|
16
|
+
// ---------------------------------------------
|
|
17
|
+
get configured() {
|
|
18
|
+
return !0;
|
|
36
19
|
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
20
|
+
get defaultInstanceId() {
|
|
21
|
+
return this._session.defaultInstanceId;
|
|
22
|
+
}
|
|
23
|
+
get kernel() {
|
|
24
|
+
return this._runtime().kernel;
|
|
25
|
+
}
|
|
26
|
+
get meta() {
|
|
27
|
+
return this._runtime().meta;
|
|
28
|
+
}
|
|
29
|
+
get debug() {
|
|
30
|
+
return this._runtime().debug;
|
|
31
|
+
}
|
|
32
|
+
get root() {
|
|
33
|
+
return this._runtime().root;
|
|
34
|
+
}
|
|
35
|
+
get rootScope() {
|
|
36
|
+
return this._runtime().rootScope;
|
|
37
|
+
}
|
|
38
|
+
get frameTick() {
|
|
39
|
+
return this._runtime().frameTick;
|
|
40
|
+
}
|
|
41
|
+
get frame() {
|
|
42
|
+
return this._runtime().frame;
|
|
43
|
+
}
|
|
44
|
+
get phases() {
|
|
45
|
+
return this._runtime().phases;
|
|
46
|
+
}
|
|
47
|
+
get loopEnabled() {
|
|
48
|
+
return this._runtime().loopEnabled;
|
|
49
|
+
}
|
|
50
|
+
instance(e) {
|
|
51
|
+
return this._session.instance(e);
|
|
52
|
+
}
|
|
53
|
+
getInstance(e) {
|
|
54
|
+
return this._session.getInstance(e);
|
|
55
|
+
}
|
|
56
|
+
hasInstance(e) {
|
|
57
|
+
return this._session.hasInstance(e);
|
|
58
|
+
}
|
|
59
|
+
disposeInstance(e) {
|
|
60
|
+
return this._session.disposeInstance(e);
|
|
61
|
+
}
|
|
62
|
+
runtime(e) {
|
|
63
|
+
return this._session.runtime(e);
|
|
64
|
+
}
|
|
65
|
+
reactivity(e) {
|
|
66
|
+
return this._session.reactivity(e);
|
|
67
|
+
}
|
|
68
|
+
createRuntime(e = {}) {
|
|
69
|
+
return this._session.createRuntime(e);
|
|
70
|
+
}
|
|
71
|
+
createReactivity(e = {}) {
|
|
72
|
+
return this._session.createReactivity(e);
|
|
73
|
+
}
|
|
74
|
+
createKernel(e = {}) {
|
|
75
|
+
return this._session.createKernel(e);
|
|
76
|
+
}
|
|
77
|
+
signal(e) {
|
|
78
|
+
return this._reactive().signal(e);
|
|
79
|
+
}
|
|
80
|
+
reactive(e) {
|
|
81
|
+
return this._reactive().reactive(e);
|
|
82
|
+
}
|
|
83
|
+
computed(e) {
|
|
84
|
+
const t = this._reactive();
|
|
85
|
+
return t instanceof v, t.computed(e);
|
|
86
|
+
}
|
|
87
|
+
effect(e, t, r) {
|
|
88
|
+
const s = this._session.instance();
|
|
89
|
+
if (s instanceof o) {
|
|
90
|
+
if (typeof e != "function" || t !== void 0)
|
|
91
|
+
throw h("phase effect", s);
|
|
92
|
+
return s.effect(e);
|
|
93
|
+
}
|
|
94
|
+
if (typeof e != "string" || t === void 0)
|
|
95
|
+
throw new a("[Raph] Runtime effects require an explicit phase.");
|
|
96
|
+
return s.effect(s.rootScope, e, t, r);
|
|
97
|
+
}
|
|
98
|
+
watch(e, t, r, s) {
|
|
99
|
+
const n = this._session.instance();
|
|
100
|
+
if (n instanceof o) {
|
|
101
|
+
if (typeof t != "function")
|
|
102
|
+
throw h("phase watch", n);
|
|
103
|
+
return n.watch(
|
|
104
|
+
e,
|
|
105
|
+
t,
|
|
106
|
+
r
|
|
44
107
|
);
|
|
45
|
-
this._state = "configuring";
|
|
46
|
-
try {
|
|
47
|
-
if (this._validateConfigureOptions(t), t.mode === "reactivity")
|
|
48
|
-
this._configureReactivity(new D());
|
|
49
|
-
else if (t.mode === "runtime")
|
|
50
|
-
this._configureRuntime(t);
|
|
51
|
-
else
|
|
52
|
-
throw new a("[Raph] Unsupported facade mode.");
|
|
53
|
-
this._mode = t.mode, this._state = "configured";
|
|
54
|
-
} catch (e) {
|
|
55
|
-
const i = [e], h = [...this._runtimeOrder].reverse();
|
|
56
|
-
this._clearSession();
|
|
57
|
-
for (const m of h)
|
|
58
|
-
try {
|
|
59
|
-
m.dispose();
|
|
60
|
-
} catch (_) {
|
|
61
|
-
i.push(_);
|
|
62
|
-
}
|
|
63
|
-
throw i.length === 1 ? e : new AggregateError(i, "[Raph] Facade configuration and cleanup failed.");
|
|
64
108
|
}
|
|
109
|
+
if (typeof t != "string" || typeof r != "function")
|
|
110
|
+
throw new a("[Raph] Runtime watches require an explicit phase.");
|
|
111
|
+
return n.watch(
|
|
112
|
+
n.rootScope,
|
|
113
|
+
e,
|
|
114
|
+
t,
|
|
115
|
+
r,
|
|
116
|
+
s
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
batch(e) {
|
|
120
|
+
return this._reactive().batch(e);
|
|
121
|
+
}
|
|
122
|
+
untracked(e) {
|
|
123
|
+
return this._reactive().untracked(e);
|
|
124
|
+
}
|
|
125
|
+
scope(e) {
|
|
126
|
+
const t = this._session.instance();
|
|
127
|
+
if (t instanceof o) {
|
|
128
|
+
if (e !== void 0)
|
|
129
|
+
throw h("named Runtime scope", t);
|
|
130
|
+
return t.scope();
|
|
131
|
+
}
|
|
132
|
+
if (e === void 0)
|
|
133
|
+
throw new a("[Raph] Runtime scopes require an explicit id.");
|
|
134
|
+
return t.scope(e);
|
|
65
135
|
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
*/
|
|
69
|
-
static reset() {
|
|
70
|
-
if (this._state === "unconfigured")
|
|
71
|
-
return;
|
|
72
|
-
if (this._state !== "configured")
|
|
73
|
-
throw new a(`[Raph] Cannot reset facade while it is ${this._state}.`);
|
|
74
|
-
this._state = "resetting";
|
|
75
|
-
const t = [...this._runtimeOrder].reverse();
|
|
76
|
-
this._clearBindings(), this._runtimes = /* @__PURE__ */ new Map(), this._runtimeOrder = [], this._defaultRuntime = void 0;
|
|
77
|
-
const e = [];
|
|
78
|
-
for (const i of t)
|
|
79
|
-
try {
|
|
80
|
-
i.dispose();
|
|
81
|
-
} catch (h) {
|
|
82
|
-
e.push(h);
|
|
83
|
-
}
|
|
84
|
-
if (this._clearSession(), e.length === 1)
|
|
85
|
-
throw e[0];
|
|
86
|
-
if (e.length > 1)
|
|
87
|
-
throw new AggregateError(e, "[Raph] Facade reset failed.");
|
|
136
|
+
action(e, t) {
|
|
137
|
+
return typeof e == "function" ? this._runtime().action(e) : this._runtime().action(e, t);
|
|
88
138
|
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
139
|
+
definePhases(e) {
|
|
140
|
+
this._runtime().definePhases(e);
|
|
141
|
+
}
|
|
142
|
+
addPhase(e) {
|
|
143
|
+
this._runtime().addPhase(e);
|
|
94
144
|
}
|
|
145
|
+
clearPhases() {
|
|
146
|
+
this._runtime().clearPhases();
|
|
147
|
+
}
|
|
148
|
+
requestExecution() {
|
|
149
|
+
this._runtime().requestExecution();
|
|
150
|
+
}
|
|
151
|
+
flush() {
|
|
152
|
+
this._runtime().flush();
|
|
153
|
+
}
|
|
154
|
+
afterFlush() {
|
|
155
|
+
return this._runtime().afterFlush();
|
|
156
|
+
}
|
|
157
|
+
acquireLoop(e) {
|
|
158
|
+
return this._runtime().acquireLoop(e);
|
|
159
|
+
}
|
|
160
|
+
startLoop() {
|
|
161
|
+
this._runtime().startLoop();
|
|
162
|
+
}
|
|
163
|
+
stopLoop() {
|
|
164
|
+
this._runtime().stopLoop();
|
|
165
|
+
}
|
|
166
|
+
aggregate(e) {
|
|
167
|
+
const t = this._runtime();
|
|
168
|
+
return t.aggregate(t.rootScope, e);
|
|
169
|
+
}
|
|
170
|
+
node(e, t) {
|
|
171
|
+
return this._runtime().node(e, t);
|
|
172
|
+
}
|
|
173
|
+
getNode(e) {
|
|
174
|
+
return this._runtime().getNode(e);
|
|
175
|
+
}
|
|
176
|
+
derive(e) {
|
|
177
|
+
return this._runtime().derive(e);
|
|
178
|
+
}
|
|
179
|
+
getDerivedSnapshot() {
|
|
180
|
+
return this._runtime().getDerivedSnapshot();
|
|
181
|
+
}
|
|
182
|
+
path(e, t = {}) {
|
|
183
|
+
return this._runtime().path(e, t);
|
|
184
|
+
}
|
|
185
|
+
get(e, t) {
|
|
186
|
+
return e === void 0 ? this._runtime().get() : this._runtime().get(e, t);
|
|
187
|
+
}
|
|
188
|
+
peek(e, t) {
|
|
189
|
+
return e === void 0 ? this._runtime().peek() : this._runtime().peek(e, t);
|
|
190
|
+
}
|
|
191
|
+
has(e, t) {
|
|
192
|
+
return this._runtime().has(e, t);
|
|
193
|
+
}
|
|
194
|
+
set(e, t, r) {
|
|
195
|
+
this._runtime().set(e, t, r);
|
|
196
|
+
}
|
|
197
|
+
merge(e, t, r) {
|
|
198
|
+
this._runtime().merge(e, t, r);
|
|
199
|
+
}
|
|
200
|
+
delete(e, t) {
|
|
201
|
+
this._runtime().delete(e, t);
|
|
202
|
+
}
|
|
203
|
+
// ---------------------------------------------
|
|
204
|
+
// INTERNAL
|
|
205
|
+
// ---------------------------------------------
|
|
95
206
|
/**
|
|
96
|
-
*
|
|
207
|
+
* Освобождает точную session generation для global reset.
|
|
208
|
+
* @internal
|
|
97
209
|
*/
|
|
210
|
+
_dispose() {
|
|
211
|
+
this._session.dispose();
|
|
212
|
+
}
|
|
213
|
+
// ---------------------------------------------
|
|
214
|
+
// PRIVATE
|
|
215
|
+
// ---------------------------------------------
|
|
216
|
+
_runtime() {
|
|
217
|
+
return this._session.runtime();
|
|
218
|
+
}
|
|
219
|
+
_reactive() {
|
|
220
|
+
return this._session.instance();
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
class c {
|
|
224
|
+
constructor() {
|
|
225
|
+
}
|
|
226
|
+
// ---------------------------------------------
|
|
227
|
+
// PUBLIC API
|
|
228
|
+
// ---------------------------------------------
|
|
229
|
+
static get configured() {
|
|
230
|
+
return this._handle !== void 0;
|
|
231
|
+
}
|
|
232
|
+
static get defaultInstanceId() {
|
|
233
|
+
return this._require().defaultInstanceId;
|
|
234
|
+
}
|
|
235
|
+
static get kernel() {
|
|
236
|
+
return this._require().kernel;
|
|
237
|
+
}
|
|
98
238
|
static get meta() {
|
|
99
|
-
return this.
|
|
239
|
+
return this._require().meta;
|
|
100
240
|
}
|
|
101
|
-
/**
|
|
102
|
-
* Возвращает диагностический facade default runtime.
|
|
103
|
-
*/
|
|
104
241
|
static get debug() {
|
|
105
|
-
return this.
|
|
242
|
+
return this._require().debug;
|
|
106
243
|
}
|
|
107
|
-
/**
|
|
108
|
-
* Возвращает корневой node default runtime.
|
|
109
|
-
*/
|
|
110
244
|
static get root() {
|
|
111
|
-
return this.
|
|
245
|
+
return this._require().root;
|
|
112
246
|
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
*/
|
|
116
|
-
static getDerivedSnapshot() {
|
|
117
|
-
return this._requireDefault().getDerivedSnapshot();
|
|
247
|
+
static get rootScope() {
|
|
248
|
+
return this._require().rootScope;
|
|
118
249
|
}
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
*/
|
|
122
|
-
static createKernel(t = {}) {
|
|
123
|
-
return this._requireMode("runtime"), new o(t);
|
|
250
|
+
static get frameTick() {
|
|
251
|
+
return this._require().frameTick;
|
|
124
252
|
}
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
*/
|
|
128
|
-
static createRuntime(t = {}) {
|
|
129
|
-
this._requireMode("runtime");
|
|
130
|
-
const e = this._resolveRuntimeId(t.id);
|
|
131
|
-
if (this._runtimes.has(e))
|
|
132
|
-
throw new a(`[Raph] Runtime id "${e}" is already registered.`);
|
|
133
|
-
const i = new d({
|
|
134
|
-
...this._runtimeDefaults,
|
|
135
|
-
...t,
|
|
136
|
-
id: e
|
|
137
|
-
});
|
|
138
|
-
return this._registerRuntime(i), i;
|
|
253
|
+
static get frame() {
|
|
254
|
+
return this._require().frame;
|
|
139
255
|
}
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
*/
|
|
143
|
-
static getRuntime(t) {
|
|
144
|
-
return this._requireMode("runtime"), this._validateRuntimeId(t), this._runtimes.get(t);
|
|
256
|
+
static get phases() {
|
|
257
|
+
return this._require().phases;
|
|
145
258
|
}
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
*/
|
|
149
|
-
static requireRuntime(t) {
|
|
150
|
-
const e = this.getRuntime(t);
|
|
151
|
-
if (e === void 0)
|
|
152
|
-
throw new a(`[Raph] Runtime "${t}" is not registered.`);
|
|
153
|
-
return e;
|
|
259
|
+
static get loopEnabled() {
|
|
260
|
+
return this._require().loopEnabled;
|
|
154
261
|
}
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
return this.
|
|
262
|
+
static configure(e) {
|
|
263
|
+
if (this._handle !== void 0)
|
|
264
|
+
throw new _("[Raph] Facade is already configured.");
|
|
265
|
+
const t = new y(l.create(e));
|
|
266
|
+
return this._handle = t, t;
|
|
160
267
|
}
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
static disposeRuntime(t) {
|
|
165
|
-
const e = this.getRuntime(t);
|
|
166
|
-
return e === void 0 ? !1 : (e.dispose(), !0);
|
|
268
|
+
static reset() {
|
|
269
|
+
const e = this._handle;
|
|
270
|
+
e !== void 0 && (this._handle = void 0, e._dispose());
|
|
167
271
|
}
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
*/
|
|
171
|
-
static definePhases(t) {
|
|
172
|
-
this._requireDefault().definePhases(t);
|
|
272
|
+
static instance(e) {
|
|
273
|
+
return this._require().instance(e);
|
|
173
274
|
}
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
*/
|
|
177
|
-
static addPhase(t) {
|
|
178
|
-
this._requireDefault().addPhase(t);
|
|
275
|
+
static getInstance(e) {
|
|
276
|
+
return this._require().getInstance(e);
|
|
179
277
|
}
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
*/
|
|
183
|
-
static clearPhases() {
|
|
184
|
-
this._requireDefault().clearPhases();
|
|
278
|
+
static hasInstance(e) {
|
|
279
|
+
return this._require().hasInstance(e);
|
|
185
280
|
}
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
*/
|
|
189
|
-
static flush() {
|
|
190
|
-
this._requireDefault().flush();
|
|
281
|
+
static disposeInstance(e) {
|
|
282
|
+
return this._require().disposeInstance(e);
|
|
191
283
|
}
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
*/
|
|
195
|
-
static acquireLoop(t) {
|
|
196
|
-
return this._requireDefault().acquireLoop(t);
|
|
284
|
+
static runtime(e) {
|
|
285
|
+
return this._require().runtime(e);
|
|
197
286
|
}
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
*/
|
|
201
|
-
static startLoop() {
|
|
202
|
-
this._requireDefault().startLoop();
|
|
287
|
+
static reactivity(e) {
|
|
288
|
+
return this._require().reactivity(e);
|
|
203
289
|
}
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
*/
|
|
207
|
-
static stopLoop() {
|
|
208
|
-
this._requireDefault().stopLoop();
|
|
290
|
+
static createRuntime(e = {}) {
|
|
291
|
+
return this._require().createRuntime(e);
|
|
209
292
|
}
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
*/
|
|
213
|
-
static node(t, e) {
|
|
214
|
-
return this._requireDefault().node(t, e);
|
|
293
|
+
static createReactivity(e = {}) {
|
|
294
|
+
return this._require().createReactivity(e);
|
|
215
295
|
}
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
*/
|
|
219
|
-
static derive(t) {
|
|
220
|
-
return this._requireDefault().derive(t);
|
|
296
|
+
static createKernel(e = {}) {
|
|
297
|
+
return this._require().createKernel(e);
|
|
221
298
|
}
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
*/
|
|
225
|
-
static path(t, e = {}) {
|
|
226
|
-
return this._requireDefault().path(t, e);
|
|
299
|
+
static signal(e) {
|
|
300
|
+
return this._require().signal(e);
|
|
227
301
|
}
|
|
228
|
-
static
|
|
229
|
-
|
|
230
|
-
return t === void 0 ? i.get() : i.get(t, e);
|
|
302
|
+
static reactive(e) {
|
|
303
|
+
return this._require().reactive(e);
|
|
231
304
|
}
|
|
232
|
-
static
|
|
233
|
-
|
|
234
|
-
return t === void 0 ? i.peek() : i.peek(t, e);
|
|
305
|
+
static computed(e) {
|
|
306
|
+
return typeof e == "function" ? this._require().computed(e) : this._require().computed(e);
|
|
235
307
|
}
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
*/
|
|
239
|
-
static has(t, e) {
|
|
240
|
-
return this._requireDefault().has(t, e);
|
|
308
|
+
static effect(e, t, r) {
|
|
309
|
+
return typeof e == "function" ? this._require().effect(e) : this._require().effect(e, t, r);
|
|
241
310
|
}
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
311
|
+
static watch(e, t, r, s) {
|
|
312
|
+
const n = this._require();
|
|
313
|
+
return typeof t == "string" ? n.watch(
|
|
314
|
+
e,
|
|
315
|
+
t,
|
|
316
|
+
r,
|
|
317
|
+
s
|
|
318
|
+
) : n.watch(
|
|
319
|
+
e,
|
|
320
|
+
t,
|
|
321
|
+
r
|
|
322
|
+
);
|
|
247
323
|
}
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
*/
|
|
251
|
-
static merge(t, e, i) {
|
|
252
|
-
this._requireDefault().merge(t, e, i);
|
|
324
|
+
static batch(e) {
|
|
325
|
+
return this._require().batch(e);
|
|
253
326
|
}
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
*/
|
|
257
|
-
static delete(t, e) {
|
|
258
|
-
this._requireDefault().delete(t, e);
|
|
327
|
+
static untracked(e) {
|
|
328
|
+
return this._require().untracked(e);
|
|
259
329
|
}
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
*/
|
|
263
|
-
static transaction(t) {
|
|
264
|
-
return this._requireDefault().transaction(t);
|
|
330
|
+
static scope(e) {
|
|
331
|
+
return e === void 0 ? this._require().scope() : this._require().scope(e);
|
|
265
332
|
}
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
*/
|
|
269
|
-
static action(t, e) {
|
|
270
|
-
return this._requireDefault().action(t, e);
|
|
333
|
+
static action(e, t) {
|
|
334
|
+
return typeof e == "function" ? this._require().action(e) : this._require().action(e, t);
|
|
271
335
|
}
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
*/
|
|
275
|
-
static runInAction(t, e) {
|
|
276
|
-
return this._requireDefault().runInAction(t, e);
|
|
277
|
-
}
|
|
278
|
-
static _configureReactivity(t) {
|
|
279
|
-
this._reactivity = t, this.signal = t.signal, this.computed = t.computed, this.effect = ((e) => {
|
|
280
|
-
if (typeof e != "function")
|
|
281
|
-
throw new f("[Raph] Phase effects require runtime mode.");
|
|
282
|
-
return t.effect(e);
|
|
283
|
-
}), this.watch = t.watch, this.batch = t.batch, this.untracked = t.untracked, this.scope = t.scope;
|
|
284
|
-
}
|
|
285
|
-
static _configureRuntime(t) {
|
|
286
|
-
if (this._runtimeDefaults = {
|
|
287
|
-
...t.scheduler === void 0 ? {} : { scheduler: t.scheduler },
|
|
288
|
-
...t.enforceActions === void 0 ? {} : { enforceActions: t.enforceActions }
|
|
289
|
-
}, t.createDefaultRuntime === !1) {
|
|
290
|
-
this._installMissingDefaultBindings();
|
|
291
|
-
return;
|
|
292
|
-
}
|
|
293
|
-
const e = t.defaultRuntimeId ?? "default";
|
|
294
|
-
this._validateRuntimeId(e);
|
|
295
|
-
const i = new d({
|
|
296
|
-
...this._runtimeDefaults,
|
|
297
|
-
...t.kernel === void 0 ? {} : { kernel: t.kernel },
|
|
298
|
-
id: e
|
|
299
|
-
});
|
|
300
|
-
this._registerRuntime(i), t.phases !== void 0 && i.definePhases(t.phases), this._defaultRuntime = i, this._bindRuntime(i);
|
|
301
|
-
}
|
|
302
|
-
static _bindRuntime(t) {
|
|
303
|
-
this.signal = t.signal.bind(t), this.computed = t.computed.bind(t), this.effect = t.effect.bind(t), this.watch = t.watch.bind(t), this.batch = t.transaction.bind(t), this.untracked = t.untracked.bind(t), this.scope = t.scope.bind(t);
|
|
304
|
-
}
|
|
305
|
-
static _registerRuntime(t) {
|
|
306
|
-
this._runtimes.set(t.id, t), this._runtimeOrder.push(t), t._onDisposed(() => {
|
|
307
|
-
this._runtimes.get(t.id) === t && this._runtimes.delete(t.id);
|
|
308
|
-
const e = this._runtimeOrder.indexOf(t);
|
|
309
|
-
e >= 0 && this._runtimeOrder.splice(e, 1), this._defaultRuntime === t && (this._defaultRuntime = void 0, this._state === "configured" && this._installMissingDefaultBindings());
|
|
310
|
-
});
|
|
311
|
-
}
|
|
312
|
-
static _requireDefault() {
|
|
313
|
-
this._requireMode("runtime");
|
|
314
|
-
const t = this._defaultRuntime;
|
|
315
|
-
if (t === void 0)
|
|
316
|
-
throw new l("[Raph] Runtime mode has no default Runtime.");
|
|
317
|
-
return t;
|
|
318
|
-
}
|
|
319
|
-
static _requireMode(t) {
|
|
320
|
-
if (this._state !== "configured" && n(), this._mode !== t)
|
|
321
|
-
throw new f(`[Raph] Operation requires ${t} mode.`);
|
|
322
|
-
}
|
|
323
|
-
static _resolveRuntimeId(t) {
|
|
324
|
-
if (t !== void 0)
|
|
325
|
-
return this._validateRuntimeId(t), t;
|
|
326
|
-
let e;
|
|
327
|
-
do
|
|
328
|
-
e = `runtime-${this._runtimeCounter++}`;
|
|
329
|
-
while (this._runtimes.has(e));
|
|
330
|
-
return e;
|
|
336
|
+
static definePhases(e) {
|
|
337
|
+
this._require().definePhases(e);
|
|
331
338
|
}
|
|
332
|
-
static
|
|
333
|
-
|
|
334
|
-
throw new a(
|
|
335
|
-
"[Raph] Runtime id must be a non-empty string without surrounding whitespace."
|
|
336
|
-
);
|
|
339
|
+
static addPhase(e) {
|
|
340
|
+
this._require().addPhase(e);
|
|
337
341
|
}
|
|
338
|
-
static
|
|
339
|
-
|
|
340
|
-
throw new a("[Raph] Configure options must be an object.");
|
|
341
|
-
if (t.mode === "reactivity") {
|
|
342
|
-
this._assertKnownOptions(t, /* @__PURE__ */ new Set(["mode"]));
|
|
343
|
-
return;
|
|
344
|
-
}
|
|
345
|
-
if (t.mode !== "runtime")
|
|
346
|
-
throw new a("[Raph] Unsupported facade mode.");
|
|
347
|
-
if (this._assertKnownOptions(t, /* @__PURE__ */ new Set([
|
|
348
|
-
"mode",
|
|
349
|
-
"createDefaultRuntime",
|
|
350
|
-
"defaultRuntimeId",
|
|
351
|
-
"kernel",
|
|
352
|
-
"phases",
|
|
353
|
-
"scheduler",
|
|
354
|
-
"enforceActions"
|
|
355
|
-
])), t.createDefaultRuntime !== void 0 && t.createDefaultRuntime !== !0 && t.createDefaultRuntime !== !1)
|
|
356
|
-
throw new a("[Raph] createDefaultRuntime must be boolean.");
|
|
357
|
-
if (t.scheduler !== void 0 && !q(t.scheduler))
|
|
358
|
-
throw new a(
|
|
359
|
-
`[Raph] Unsupported scheduler "${String(t.scheduler)}".`
|
|
360
|
-
);
|
|
361
|
-
if (t.enforceActions !== void 0 && typeof t.enforceActions != "boolean")
|
|
362
|
-
throw new a("[Raph] enforceActions must be boolean.");
|
|
363
|
-
if (t.createDefaultRuntime === !1) {
|
|
364
|
-
if (t.defaultRuntimeId !== void 0 || t.kernel !== void 0 || t.phases !== void 0)
|
|
365
|
-
throw new a(
|
|
366
|
-
"[Raph] Registry-only mode cannot receive defaultRuntimeId, kernel or phases."
|
|
367
|
-
);
|
|
368
|
-
return;
|
|
369
|
-
}
|
|
370
|
-
if (t.defaultRuntimeId !== void 0 && this._validateRuntimeId(t.defaultRuntimeId), t.kernel !== void 0 && !(t.kernel instanceof o))
|
|
371
|
-
throw new a("[Raph] kernel must be a RaphKernel instance.");
|
|
372
|
-
if (t.phases !== void 0 && !Array.isArray(t.phases))
|
|
373
|
-
throw new a("[Raph] phases must be an array.");
|
|
342
|
+
static clearPhases() {
|
|
343
|
+
this._require().clearPhases();
|
|
374
344
|
}
|
|
375
|
-
static
|
|
376
|
-
|
|
377
|
-
if (!e.has(i))
|
|
378
|
-
throw new a(`[Raph] Unsupported configure option "${i}".`);
|
|
345
|
+
static requestExecution() {
|
|
346
|
+
this._require().requestExecution();
|
|
379
347
|
}
|
|
380
|
-
static
|
|
381
|
-
|
|
382
|
-
throw new l("[Raph] Runtime mode has no default Runtime.");
|
|
383
|
-
};
|
|
384
|
-
this.signal = t, this.computed = t, this.effect = t, this.watch = t, this.batch = t, this.untracked = t, this.scope = t;
|
|
348
|
+
static flush() {
|
|
349
|
+
this._require().flush();
|
|
385
350
|
}
|
|
386
|
-
static
|
|
387
|
-
|
|
351
|
+
static afterFlush() {
|
|
352
|
+
return this._require().afterFlush();
|
|
388
353
|
}
|
|
389
|
-
static
|
|
390
|
-
this.
|
|
354
|
+
static acquireLoop(e) {
|
|
355
|
+
return this._require().acquireLoop(e);
|
|
391
356
|
}
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
357
|
+
static startLoop() {
|
|
358
|
+
this._require().startLoop();
|
|
359
|
+
}
|
|
360
|
+
static stopLoop() {
|
|
361
|
+
this._require().stopLoop();
|
|
362
|
+
}
|
|
363
|
+
static aggregate(e) {
|
|
364
|
+
return this._require().aggregate(e);
|
|
365
|
+
}
|
|
366
|
+
static node(e, t) {
|
|
367
|
+
return this._require().node(e, t);
|
|
368
|
+
}
|
|
369
|
+
static getNode(e) {
|
|
370
|
+
return this._require().getNode(e);
|
|
371
|
+
}
|
|
372
|
+
static derive(e) {
|
|
373
|
+
return this._require().derive(e);
|
|
374
|
+
}
|
|
375
|
+
static getDerivedSnapshot() {
|
|
376
|
+
return this._require().getDerivedSnapshot();
|
|
377
|
+
}
|
|
378
|
+
static path(e, t = {}) {
|
|
379
|
+
return this._require().path(e, t);
|
|
380
|
+
}
|
|
381
|
+
static get(e, t) {
|
|
382
|
+
return e === void 0 ? this._require().get() : this._require().get(e, t);
|
|
383
|
+
}
|
|
384
|
+
static peek(e, t) {
|
|
385
|
+
return e === void 0 ? this._require().peek() : this._require().peek(e, t);
|
|
386
|
+
}
|
|
387
|
+
static has(e, t) {
|
|
388
|
+
return this._require().has(e, t);
|
|
389
|
+
}
|
|
390
|
+
static set(e, t, r) {
|
|
391
|
+
this._require().set(e, t, r);
|
|
392
|
+
}
|
|
393
|
+
static merge(e, t, r) {
|
|
394
|
+
this._require().merge(e, t, r);
|
|
395
|
+
}
|
|
396
|
+
static delete(e, t) {
|
|
397
|
+
this._require().delete(e, t);
|
|
398
|
+
}
|
|
399
|
+
// ---------------------------------------------
|
|
400
|
+
// PRIVATE
|
|
401
|
+
// ---------------------------------------------
|
|
402
|
+
static _require() {
|
|
403
|
+
const e = this._handle;
|
|
404
|
+
if (e === void 0)
|
|
405
|
+
throw new _("[Raph] Facade is not configured. Call Raph.configure(...) first.");
|
|
406
|
+
return e;
|
|
396
407
|
}
|
|
397
408
|
}
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
// ---------------------------------------------
|
|
403
|
-
/**
|
|
404
|
-
* Предоставляет режимы scheduler без отдельного импорта константы.
|
|
405
|
-
*/
|
|
406
|
-
r(s, "Scheduler", c), /**
|
|
407
|
-
* Предоставляет стратегии materialized derived рядом с facade API.
|
|
408
|
-
*/
|
|
409
|
-
r(s, "DerivedStrategy", Object.freeze({
|
|
410
|
-
full: v,
|
|
411
|
-
collectionByKey: p,
|
|
412
|
-
filterByKey: R
|
|
409
|
+
u(c, "_handle"), u(c, "Scheduler", q), u(c, "DerivedStrategy", Object.freeze({
|
|
410
|
+
full: g,
|
|
411
|
+
collectionByKey: m,
|
|
412
|
+
filterByKey: p
|
|
413
413
|
}));
|
|
414
|
-
function
|
|
415
|
-
return
|
|
414
|
+
function h(i, e) {
|
|
415
|
+
return new a(
|
|
416
|
+
`[Raph] ${i} is unavailable for reactivity instance "${e.id}".`
|
|
417
|
+
);
|
|
416
418
|
}
|
|
417
419
|
export {
|
|
418
|
-
|
|
420
|
+
c as Raph
|
|
419
421
|
};
|