@raphy-js/raph 1.0.0-dev.2 → 1.0.1-dev.25
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-CClhT8WR.js +1044 -0
- package/dist/core-cPQWYD4K.cjs +1 -0
- package/dist/debug/api/Raph.cjs +1 -1
- package/dist/debug/api/Raph.js +368 -367
- package/dist/debug/api/RaphFacadeSession.cjs +1 -0
- package/dist/debug/api/RaphFacadeSession.js +302 -0
- package/dist/debug/api/RaphReactivityInstance.cjs +1 -0
- package/dist/debug/api/RaphReactivityInstance.js +146 -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/DataPath.js +390 -0
- package/dist/debug/path/PathRouter.cjs +1 -0
- package/dist/debug/path/PathRouter.js +80 -0
- package/dist/debug/path/RaphKernel.cjs +1 -1
- package/dist/debug/path/RaphKernel.js +316 -236
- 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/derived/DerivedRegistry.js +143 -0
- package/dist/debug/path/derived/RaphDerivedHandle.cjs +1 -0
- package/dist/debug/path/{RaphDerivedHandle.js → derived/RaphDerivedHandle.js} +19 -22
- package/dist/debug/path/derived/derived-collection.utils.cjs +1 -0
- package/dist/debug/path/{derived-collection.js → derived/derived-collection.utils.js} +71 -71
- 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/meta/MetaController.cjs +1 -0
- package/dist/debug/path/{MetaController.js → meta/MetaController.js} +58 -66
- package/dist/debug/path/meta/RaphMeta.cjs +1 -0
- package/dist/debug/path/meta/RaphMeta.js +62 -0
- package/dist/debug/path/meta/RaphMetaStore.cjs +1 -0
- package/dist/debug/path/{RaphMetaStore.js → meta/RaphMetaStore.js} +24 -30
- 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/storage/AdapterPathStore.js +128 -0
- package/dist/debug/path/storage/DefaultDataAdapter.cjs +1 -0
- package/dist/debug/path/{data-adapter.js → storage/DefaultDataAdapter.js} +47 -57
- package/dist/debug/path/storage/PathEventHub.cjs +1 -0
- package/dist/debug/path/storage/PathEventHub.js +161 -0
- package/dist/debug/path/storage/PathStore.cjs +1 -0
- package/dist/debug/path/{PathStore.js → storage/PathStore.js} +88 -98
- package/dist/debug/path/storage/createDataDraft.cjs +1 -0
- package/dist/debug/path/{data-draft.js → storage/createDataDraft.js} +24 -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/disposal.cjs +1 -0
- package/dist/debug/reactivity/disposal.js +32 -0
- package/dist/debug/reactivity/engine.cjs +1 -1
- package/dist/debug/reactivity/engine.js +888 -321
- package/dist/debug/reactivity/reactive-object.cjs +1 -0
- package/dist/debug/reactivity/reactive-object.js +265 -0
- package/dist/debug/reactivity/scope.cjs +1 -1
- package/dist/debug/reactivity/scope.js +221 -117
- package/dist/debug/reactivity/watch.cjs +1 -1
- package/dist/debug/reactivity/watch.js +1 -1
- package/dist/debug/runtime/RaphRuntime.cjs +1 -1
- package/dist/debug/runtime/RaphRuntime.js +1134 -502
- package/dist/debug/runtime/diagnostics/RaphDebug.cjs +1 -0
- package/dist/debug/runtime/diagnostics/RaphDebug.js +287 -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 +304 -0
- package/dist/debug/runtime/ownership/RaphNode.cjs +1 -0
- package/dist/debug/runtime/ownership/RaphNode.js +665 -0
- package/dist/debug/runtime/ownership/RaphScope.cjs +1 -0
- package/dist/debug/runtime/ownership/RaphScope.js +236 -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/RaphFrameLoop.cjs +1 -0
- package/dist/debug/runtime/{RaphFrameLoop.js → phases/RaphFrameLoop.js} +13 -17
- package/dist/debug/runtime/phases/RaphPhasePipeline.cjs +1 -0
- package/dist/debug/runtime/phases/RaphPhasePipeline.js +848 -0
- package/dist/debug/runtime/phases/RaphPhaseTaskRecord.cjs +1 -0
- package/dist/debug/runtime/phases/RaphPhaseTaskRecord.js +176 -0
- package/dist/debug/runtime/phases/RaphPhaseWatch.cjs +1 -0
- package/dist/debug/runtime/phases/RaphPhaseWatch.js +20 -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/reactivity/PathHandle.js +165 -0
- package/dist/debug/runtime/reactivity/RaphMetaSource.cjs +1 -0
- package/dist/debug/runtime/reactivity/RaphMetaSource.js +108 -0
- package/dist/debug/runtime/reactivity/RaphSelector.cjs +1 -0
- package/dist/debug/runtime/reactivity/RaphSelector.js +503 -0
- package/dist/debug/runtime/reactivity/RaphWorkGraph.cjs +1 -0
- package/dist/debug/runtime/reactivity/RaphWorkGraph.js +1157 -0
- package/dist/debug/runtime/reactivity/RuntimeReactivity.cjs +1 -0
- package/dist/debug/runtime/reactivity/RuntimeReactivity.js +550 -0
- package/dist/debug/runtime/reactivity/RuntimeWatch.cjs +1 -0
- package/dist/debug/runtime/reactivity/RuntimeWatch.js +77 -0
- package/dist/debug/runtime/reactivity/disposal-sweep.utils.cjs +1 -0
- package/dist/debug/runtime/reactivity/disposal-sweep.utils.js +42 -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 +18 -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 +822 -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 +37 -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/storage/PathEventHub.d.ts +62 -0
- package/dist/path/{PathStore.d.ts → storage/PathStore.d.ts} +7 -7
- 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/disposal.d.ts +14 -0
- package/dist/reactivity/engine.d.ts +193 -6
- package/dist/reactivity/reactive-object.d.ts +36 -0
- package/dist/reactivity/scope.d.ts +108 -30
- 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 +319 -160
- package/dist/runtime/diagnostics/RaphDebug.d.ts +239 -0
- package/dist/runtime/errors.d.ts +5 -0
- package/dist/runtime/ownership/RaphEffectScope.d.ts +98 -0
- package/dist/runtime/ownership/RaphNode.d.ts +310 -0
- package/dist/runtime/ownership/RaphScope.d.ts +168 -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 +253 -0
- package/dist/runtime/phases/RaphPhaseTaskRecord.d.ts +195 -0
- package/dist/runtime/phases/RaphPhaseWatch.d.ts +22 -0
- package/dist/runtime/phases/orderPhaseTasks.d.ts +6 -0
- package/dist/runtime/phases/phase.types.d.ts +171 -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/RaphSelector.d.ts +338 -0
- package/dist/runtime/reactivity/RaphWorkGraph.d.ts +309 -0
- package/dist/runtime/reactivity/RuntimeReactivity.d.ts +293 -0
- package/dist/runtime/{RuntimeWatch.d.ts → reactivity/RuntimeWatch.d.ts} +12 -6
- package/dist/runtime/reactivity/disposal-sweep.utils.d.ts +19 -0
- package/dist/runtime/reactivity/runtime-reactivity.types.d.ts +56 -0
- package/dist/runtime.cjs +1 -1
- package/dist/runtime.js +21 -16
- package/package.json +76 -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/AdapterPathStore.js +0 -133
- package/dist/debug/path/DerivedRegistry.cjs +0 -1
- package/dist/debug/path/DerivedRegistry.js +0 -157
- package/dist/debug/path/MetaController.cjs +0 -1
- package/dist/debug/path/PathEventHub.cjs +0 -1
- package/dist/debug/path/PathEventHub.js +0 -148
- package/dist/debug/path/PathStore.cjs +0 -1
- package/dist/debug/path/RaphDerivedHandle.cjs +0 -1
- package/dist/debug/path/RaphMeta.cjs +0 -1
- package/dist/debug/path/RaphMeta.js +0 -68
- package/dist/debug/path/RaphMetaStore.cjs +0 -1
- package/dist/debug/path/data-adapter.cjs +0 -1
- package/dist/debug/path/data-draft.cjs +0 -1
- package/dist/debug/path/data-path.cjs +0 -1
- package/dist/debug/path/data-path.js +0 -423
- package/dist/debug/path/derived-collection.cjs +0 -1
- package/dist/debug/path/path-router.cjs +0 -1
- package/dist/debug/path/path-router.js +0 -86
- 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/PathHandle.js +0 -139
- package/dist/debug/runtime/RaphDebug.cjs +0 -1
- package/dist/debug/runtime/RaphDebug.js +0 -15
- package/dist/debug/runtime/RaphFrameLoop.cjs +0 -1
- 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/PathEventHub.d.ts +0 -48
- 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/RuntimeReactivity.d.ts +0 -40
- package/dist/runtime/phase.types.d.ts +0 -49
- package/dist/runtime/public.d.ts +0 -13
- package/dist/runtime/runtime-reactivity.types.d.ts +0 -9
- /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/{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/{segment-key.cjs → pathSegmentKey.cjs} +0 -0
- /package/dist/debug/path/{segment-key.js → pathSegmentKey.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/{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
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
var p = Object.defineProperty;
|
|
2
|
-
var _ = (c, e, i) => e in c ? p(c, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : c[e] = i;
|
|
3
|
-
var a = (c, e, i) => _(c, typeof e != "symbol" ? e + "" : e, i);
|
|
4
|
-
import { RaphReactivity as f } from "../reactivity/engine.js";
|
|
5
|
-
let r;
|
|
6
|
-
class o {
|
|
7
|
-
constructor() {
|
|
8
|
-
// Хранит binding только на время синхронной регистрации effect.
|
|
9
|
-
a(this, "_active");
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Связывает effect с owner и phase только на время регистрации.
|
|
13
|
-
*/
|
|
14
|
-
bind(e) {
|
|
15
|
-
const i = this._active;
|
|
16
|
-
if (i === void 0)
|
|
17
|
-
return { schedule: e, dispose: A };
|
|
18
|
-
const t = i.binding(e);
|
|
19
|
-
if (i.initial === "scheduled")
|
|
20
|
-
return t;
|
|
21
|
-
let s = !0;
|
|
22
|
-
return {
|
|
23
|
-
dispose: t.dispose,
|
|
24
|
-
schedule: () => {
|
|
25
|
-
if (!s) {
|
|
26
|
-
t.schedule();
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
s = !1, e();
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Выполняет операцию с текущим effect binding.
|
|
35
|
-
*/
|
|
36
|
-
runWith(e, i, t) {
|
|
37
|
-
const s = this._active;
|
|
38
|
-
this._active = e === void 0 ? void 0 : { binding: e, initial: i };
|
|
39
|
-
try {
|
|
40
|
-
return t();
|
|
41
|
-
} finally {
|
|
42
|
-
this._active = s;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
class y extends f {
|
|
47
|
-
/**
|
|
48
|
-
* Создаёт policy adapter реактивного графа для одного runtime.
|
|
49
|
-
*/
|
|
50
|
-
constructor(i) {
|
|
51
|
-
const t = new o();
|
|
52
|
-
super({
|
|
53
|
-
effectScheduler: {
|
|
54
|
-
bind: t.bind.bind(t)
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
// Изолирует registration binding от алгоритмов базового reactive graph.
|
|
58
|
-
a(this, "_bindings");
|
|
59
|
-
this._lifecycle = i, this._bindings = t;
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* Создаёт временную registration boundary для runtime effect.
|
|
63
|
-
*/
|
|
64
|
-
withEffectBinding(i, t, s) {
|
|
65
|
-
return this._bindings.runWith(i, t, s);
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* Выполняет untracked-операцию, сохраняя runtime owner context.
|
|
69
|
-
*/
|
|
70
|
-
untrackedWithOwner(i) {
|
|
71
|
-
const t = r;
|
|
72
|
-
r = void 0;
|
|
73
|
-
try {
|
|
74
|
-
return this.untracked(i);
|
|
75
|
-
} finally {
|
|
76
|
-
r = t;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* Возвращает owner текущего синхронного реактивного контекста.
|
|
81
|
-
*/
|
|
82
|
-
getActiveOwner() {
|
|
83
|
-
return r == null ? void 0 : r.owner;
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* Выполняет операцию с указанным active owner.
|
|
87
|
-
*/
|
|
88
|
-
runWithOwner(i, t) {
|
|
89
|
-
const s = r;
|
|
90
|
-
r = i;
|
|
91
|
-
try {
|
|
92
|
-
return t();
|
|
93
|
-
} finally {
|
|
94
|
-
r = s;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
/**
|
|
98
|
-
* Создаёт owned signal с runtime lifecycle policy.
|
|
99
|
-
*/
|
|
100
|
-
signalForOwner(i, t) {
|
|
101
|
-
const s = this._lifecycle, u = t === void 0 ? this.signal(i) : t._adoptSource(this._ownedSignal(i)), v = s.assertWriteAllowed, h = s.runWrite ?? g;
|
|
102
|
-
return v !== void 0 ? {
|
|
103
|
-
get() {
|
|
104
|
-
return l(s), t == null || t._assertAlive(), u.get();
|
|
105
|
-
},
|
|
106
|
-
peek() {
|
|
107
|
-
return n(s), t == null || t._assertAlive(), u.peek();
|
|
108
|
-
},
|
|
109
|
-
set(d) {
|
|
110
|
-
t == null || t._assertAlive(), v(), h(() => u.set(d));
|
|
111
|
-
}
|
|
112
|
-
} : {
|
|
113
|
-
get() {
|
|
114
|
-
return l(s), t == null || t._assertAlive(), u.get();
|
|
115
|
-
},
|
|
116
|
-
peek() {
|
|
117
|
-
return n(s), t == null || t._assertAlive(), u.peek();
|
|
118
|
-
},
|
|
119
|
-
set(d) {
|
|
120
|
-
n(s), t == null || t._assertAlive(), h(() => u.set(d));
|
|
121
|
-
}
|
|
122
|
-
};
|
|
123
|
-
}
|
|
124
|
-
/**
|
|
125
|
-
* Создаёт owned computed с runtime lifecycle policy.
|
|
126
|
-
*/
|
|
127
|
-
computedForOwner(i, t) {
|
|
128
|
-
const s = this._lifecycle, u = t === void 0 ? this.computed(i) : t._adoptSource(this._ownedComputed(i));
|
|
129
|
-
return {
|
|
130
|
-
get() {
|
|
131
|
-
return l(s), t == null || t._assertAlive(), u.get();
|
|
132
|
-
},
|
|
133
|
-
peek() {
|
|
134
|
-
return n(s), t == null || t._assertAlive(), u.peek();
|
|
135
|
-
}
|
|
136
|
-
};
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
function n(c) {
|
|
140
|
-
c.owner === void 0 && c.throwDisposed();
|
|
141
|
-
}
|
|
142
|
-
function l(c) {
|
|
143
|
-
n(c);
|
|
144
|
-
const e = r;
|
|
145
|
-
e !== void 0 && e !== c && c.throwCrossRuntime(e.owner);
|
|
146
|
-
}
|
|
147
|
-
function g(c) {
|
|
148
|
-
return c();
|
|
149
|
-
}
|
|
150
|
-
function A() {
|
|
151
|
-
}
|
|
152
|
-
export {
|
|
153
|
-
y as RuntimeReactivity
|
|
154
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var a=Object.defineProperty;var c=(i,t,e)=>t in i?a(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e;var p=(i,t,e)=>c(i,typeof t!="symbol"?t+"":t,e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});class h{constructor(t){p(this,"_cleanup");p(this,"_stopped",!1);this._runUntracked=t}get stopped(){return this._stopped}deliver(t){const e=[],n=this._cleanup;if(this._cleanup=void 0,n!==void 0&&this._attempt(n,e),!this._stopped){let s=null;try{const r=this._runUntracked(t);typeof r=="function"&&(s=r)}catch(r){e.push(r)}s!==null&&(this._stopped?this._attempt(s,e):this._cleanup=s)}o(e)}stop(t){if(this._stopped)return;this._stopped=!0;const e=[];if(t!==void 0)try{t()}catch(s){e.push(s)}const n=this._cleanup;this._cleanup=void 0,n!==void 0&&this._attempt(n,e),o(e)}_attempt(t,e){try{this._runUntracked(t)}catch(n){e.push(n)}}}function o(i){if(i.length===1)throw i[0];if(i.length>1)throw new AggregateError(i,"[Raph] Runtime watch delivery failed.")}exports.RuntimeWatch=h;
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
var o = Object.defineProperty;
|
|
2
|
-
var a = (i, t, e) => t in i ? o(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
|
|
3
|
-
var p = (i, t, e) => a(i, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
-
class u {
|
|
5
|
-
/**
|
|
6
|
-
* Создаёт runtime-owned watch с явным lifecycle остановки.
|
|
7
|
-
*/
|
|
8
|
-
constructor(t) {
|
|
9
|
-
// Хранят cleanup последней доставки и окончательное состояние watcher.
|
|
10
|
-
p(this, "_cleanup");
|
|
11
|
-
p(this, "_stopped", !1);
|
|
12
|
-
this._runUntracked = t;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Показывает, остановлен ли watch.
|
|
16
|
-
*/
|
|
17
|
-
get stopped() {
|
|
18
|
-
return this._stopped;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Освобождает предыдущий результат callback и выполняет новую доставку.
|
|
22
|
-
* Ошибка cleanup не лишает живой watcher текущего события.
|
|
23
|
-
*/
|
|
24
|
-
deliver(t) {
|
|
25
|
-
const e = [], s = this._cleanup;
|
|
26
|
-
if (this._cleanup = void 0, s !== void 0 && this._attempt(s, e), !this._stopped) {
|
|
27
|
-
let n = null;
|
|
28
|
-
try {
|
|
29
|
-
const r = this._runUntracked(t);
|
|
30
|
-
typeof r == "function" && (n = r);
|
|
31
|
-
} catch (r) {
|
|
32
|
-
e.push(r);
|
|
33
|
-
}
|
|
34
|
-
n !== null && (this._stopped ? this._attempt(n, e) : this._cleanup = n);
|
|
35
|
-
}
|
|
36
|
-
h(e);
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Останавливает внешнюю регистрацию и cleanup callback, сохраняя обе ошибки.
|
|
40
|
-
*/
|
|
41
|
-
stop(t) {
|
|
42
|
-
if (this._stopped)
|
|
43
|
-
return;
|
|
44
|
-
this._stopped = !0;
|
|
45
|
-
const e = [];
|
|
46
|
-
if (t !== void 0)
|
|
47
|
-
try {
|
|
48
|
-
t();
|
|
49
|
-
} catch (n) {
|
|
50
|
-
e.push(n);
|
|
51
|
-
}
|
|
52
|
-
const s = this._cleanup;
|
|
53
|
-
this._cleanup = void 0, s !== void 0 && this._attempt(s, e), h(e);
|
|
54
|
-
}
|
|
55
|
-
_attempt(t, e) {
|
|
56
|
-
try {
|
|
57
|
-
this._runUntracked(t);
|
|
58
|
-
} catch (s) {
|
|
59
|
-
e.push(s);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
function h(i) {
|
|
64
|
-
if (i.length === 1)
|
|
65
|
-
throw i[0];
|
|
66
|
-
if (i.length > 1)
|
|
67
|
-
throw new AggregateError(i, "[Raph] Runtime watch delivery failed.");
|
|
68
|
-
}
|
|
69
|
-
export {
|
|
70
|
-
u as RuntimeWatch
|
|
71
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./errors.cjs"),r=require("./parent-graph.cjs"),t=require("./PathHandle.cjs"),p=require("./phase.types.cjs"),a=require("./RaphNode.cjs"),u=require("./RaphRuntime.cjs"),o=require("./RaphScope.cjs");exports.RaphActionError=e.RaphActionError;exports.RaphCrossRuntimeError=e.RaphCrossRuntimeError;exports.RaphDisposedError=e.RaphDisposedError;exports.parentGraph=r.parentGraph;exports.PathHandle=t.PathHandle;exports.RaphSchedulerType=p.RaphSchedulerType;exports.RaphNode=a.RaphNode;exports.RaphRuntime=u.RaphRuntime;exports.RaphScope=o.RaphScope;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { RaphActionError as p, RaphCrossRuntimeError as e, RaphDisposedError as t } from "./errors.js";
|
|
2
|
-
import { parentGraph as h } from "./parent-graph.js";
|
|
3
|
-
import { PathHandle as R } from "./PathHandle.js";
|
|
4
|
-
import { RaphSchedulerType as x } from "./phase.types.js";
|
|
5
|
-
import { RaphNode as d } from "./RaphNode.js";
|
|
6
|
-
import { RaphRuntime as s } from "./RaphRuntime.js";
|
|
7
|
-
import { RaphScope as u } from "./RaphScope.js";
|
|
8
|
-
export {
|
|
9
|
-
R as PathHandle,
|
|
10
|
-
p as RaphActionError,
|
|
11
|
-
e as RaphCrossRuntimeError,
|
|
12
|
-
t as RaphDisposedError,
|
|
13
|
-
d as RaphNode,
|
|
14
|
-
s as RaphRuntime,
|
|
15
|
-
x as RaphSchedulerType,
|
|
16
|
-
u as RaphScope,
|
|
17
|
-
h as parentGraph
|
|
18
|
-
};
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { DataPathDef, PathEvent, PathWatchCallback } from './path.types';
|
|
2
|
-
/**
|
|
3
|
-
* Общий dormant event/watch lifecycle для встроенного и adapter path-store.
|
|
4
|
-
*/
|
|
5
|
-
export declare class PathEventHub {
|
|
6
|
-
private readonly _transactionErrorMessage;
|
|
7
|
-
private _router;
|
|
8
|
-
private _events;
|
|
9
|
-
private _transactionDepth;
|
|
10
|
-
private _watcherCount;
|
|
11
|
-
private _publishing;
|
|
12
|
-
/**
|
|
13
|
-
* Создаёт общий transaction и publication boundary для path store.
|
|
14
|
-
*/
|
|
15
|
-
constructor(_transactionErrorMessage: string);
|
|
16
|
-
/**
|
|
17
|
-
* Показывает, есть ли watchers, ради которых нужно сохранять значения событий.
|
|
18
|
-
*/
|
|
19
|
-
get hasWatchers(): boolean;
|
|
20
|
-
/**
|
|
21
|
-
* Возвращает накопленные события текущей transaction.
|
|
22
|
-
* @internal
|
|
23
|
-
*/
|
|
24
|
-
get events(): readonly PathEvent[] | undefined;
|
|
25
|
-
/**
|
|
26
|
-
* Возвращает внутренний path router для диагностики store.
|
|
27
|
-
* @internal
|
|
28
|
-
*/
|
|
29
|
-
get router(): unknown;
|
|
30
|
-
/**
|
|
31
|
-
* Возвращает число активных watchers.
|
|
32
|
-
* @internal
|
|
33
|
-
*/
|
|
34
|
-
get watcherCount(): number;
|
|
35
|
-
/**
|
|
36
|
-
* Добавляет событие в текущую transaction либо публикует его сразу.
|
|
37
|
-
*/
|
|
38
|
-
record(event: PathEvent): void;
|
|
39
|
-
/**
|
|
40
|
-
* Выполняет операцию в общей синхронной transaction boundary.
|
|
41
|
-
*/
|
|
42
|
-
transaction<T>(operation: () => T): T;
|
|
43
|
-
/**
|
|
44
|
-
* Подписывает callback на подходящие изменения и возвращает disposer.
|
|
45
|
-
*/
|
|
46
|
-
watch(maskOrMasks: DataPathDef | readonly DataPathDef[], callback: PathWatchCallback): () => void;
|
|
47
|
-
private _publish;
|
|
48
|
-
}
|
package/dist/path/public.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export { DefaultDataAdapter } from './data-adapter';
|
|
2
|
-
export type { DataAdapter, DataObject, DefaultAdapterOptions, } from './data-adapter';
|
|
3
|
-
export { DataPath } from './data-path';
|
|
4
|
-
export type { DataPathParseOptions, PathScalar, PathSegment, PlainDataPath, } from './data-path';
|
|
5
|
-
export { collectionByKey, filterByKey, full } from './derived-strategies';
|
|
6
|
-
export type { DerivedCollectionByKeyStrategy, DerivedFilterByKeyStrategy, DerivedFullStrategy, DerivedStrategy, } from './derived-strategies';
|
|
7
|
-
export type { RaphMetaApi, RaphMetaEvents, RaphMetaMutationCause, RaphMetaMutationEvent, RaphMetaMutationKind, RaphMetaReadOptions, RaphMetaWatchCallback, RaphMetaWatchOptions, RaphMetaWriteOptions, } from './meta.types';
|
|
8
|
-
export type { DataPathDef, PathApi, PathEvent, PathEvents, PathMutationKind, PathOptions, PathWatchCallback, } from './path.types';
|
|
9
|
-
export { PathStore } from './PathStore';
|
|
10
|
-
export { RaphDerivedHandle } from './RaphDerivedHandle';
|
|
11
|
-
export type { DerivedOptions } from './RaphDerivedHandle';
|
|
12
|
-
export { RaphKernel } from './RaphKernel';
|
|
13
|
-
export type { RaphKernelOptions, RaphKernelRoot, RaphKernelRuntime, } from './RaphKernel';
|
|
14
|
-
export { RaphMeta } from './RaphMeta';
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { RaphScope } from './RaphScope';
|
|
2
|
-
export interface RaphDebugOwnerSnapshot {
|
|
3
|
-
readonly id: string;
|
|
4
|
-
readonly kind: 'scope' | 'node';
|
|
5
|
-
readonly disposed: boolean;
|
|
6
|
-
readonly resources: number;
|
|
7
|
-
readonly sources: number;
|
|
8
|
-
readonly children: readonly RaphDebugOwnerSnapshot[];
|
|
9
|
-
}
|
|
10
|
-
export interface RaphDebugFrameLoopSnapshot {
|
|
11
|
-
readonly running: boolean;
|
|
12
|
-
readonly manual: boolean;
|
|
13
|
-
readonly leases: number;
|
|
14
|
-
}
|
|
15
|
-
export interface RaphDebugSnapshot {
|
|
16
|
-
readonly id: string;
|
|
17
|
-
readonly disposed: boolean;
|
|
18
|
-
readonly pending: boolean;
|
|
19
|
-
readonly transactionDepth: number;
|
|
20
|
-
readonly kernelTransactionDepth: number;
|
|
21
|
-
readonly owners: number;
|
|
22
|
-
readonly pathHandles: number;
|
|
23
|
-
readonly rootScope: RaphDebugOwnerSnapshot;
|
|
24
|
-
readonly scopes: readonly RaphDebugOwnerSnapshot[];
|
|
25
|
-
readonly root: RaphDebugOwnerSnapshot;
|
|
26
|
-
readonly frameLoop: RaphDebugFrameLoopSnapshot;
|
|
27
|
-
}
|
|
28
|
-
export interface RaphRuntimeDebug {
|
|
29
|
-
snapshot: () => RaphDebugSnapshot;
|
|
30
|
-
getTree: () => RaphDebugOwnerSnapshot;
|
|
31
|
-
}
|
|
32
|
-
export declare function createOwnerSnapshot(owner: RaphScope): RaphDebugOwnerSnapshot;
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import { DataPathDef } from '../path/path.types';
|
|
2
|
-
import { Disposer } from '../reactivity/types';
|
|
3
|
-
import { RaphObserveDataOptions, RaphTrackOptions } from './phase.types';
|
|
4
|
-
import { RaphRuntime } from './RaphRuntime';
|
|
5
|
-
import { RaphScope } from './RaphScope';
|
|
6
|
-
export interface NodeOptions {
|
|
7
|
-
readonly id?: string;
|
|
8
|
-
readonly priority?: number;
|
|
9
|
-
readonly parent?: RaphNode;
|
|
10
|
-
readonly meta?: Readonly<Record<string, unknown>>;
|
|
11
|
-
readonly type?: string;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Scope с явным parent/children lifecycle.
|
|
15
|
-
*/
|
|
16
|
-
export declare class RaphNode<TApi = unknown> extends RaphScope {
|
|
17
|
-
priority: number;
|
|
18
|
-
private _parent;
|
|
19
|
-
private readonly _children;
|
|
20
|
-
readonly api: Readonly<TApi>;
|
|
21
|
-
meta: Record<string, unknown>;
|
|
22
|
-
type: string;
|
|
23
|
-
/**
|
|
24
|
-
* Создаёт node внутри ownership tree указанного runtime.
|
|
25
|
-
*/
|
|
26
|
-
constructor(parent: RaphNode | RaphRuntime | null, options?: Omit<NodeOptions, 'parent'>, runtime?: RaphRuntime);
|
|
27
|
-
/**
|
|
28
|
-
* Возвращает текущего родителя node либо null для root.
|
|
29
|
-
*/
|
|
30
|
-
get parent(): RaphNode | null;
|
|
31
|
-
/**
|
|
32
|
-
* Возвращает снимок непосредственных дочерних nodes.
|
|
33
|
-
*/
|
|
34
|
-
get children(): readonly RaphNode[];
|
|
35
|
-
/**
|
|
36
|
-
* Перемещает node внутри ownership tree одного Runtime.
|
|
37
|
-
*/
|
|
38
|
-
addChild(node: RaphNode): boolean;
|
|
39
|
-
/**
|
|
40
|
-
* Обновляет изменяемые priority, meta и type node.
|
|
41
|
-
*/
|
|
42
|
-
options(options: Pick<NodeOptions, 'meta' | 'priority' | 'type'>): void;
|
|
43
|
-
/**
|
|
44
|
-
* Показывает, ожидает ли node выполнения.
|
|
45
|
-
*/
|
|
46
|
-
dirty(phase: string): void;
|
|
47
|
-
/**
|
|
48
|
-
* Отсоединяет node от ownership tree с заданной lifecycle-семантикой.
|
|
49
|
-
*/
|
|
50
|
-
remove(): void;
|
|
51
|
-
/**
|
|
52
|
-
* Освобождает node вместе с дочерними owners и registrations.
|
|
53
|
-
*/
|
|
54
|
-
dispose(): void;
|
|
55
|
-
/**
|
|
56
|
-
* Регистрирует path observer в phase pipeline.
|
|
57
|
-
*/
|
|
58
|
-
observeData(masks: DataPathDef | readonly DataPathDef[], options: RaphObserveDataOptions): Disposer;
|
|
59
|
-
/**
|
|
60
|
-
* Регистрирует tracked executor указанной phase.
|
|
61
|
-
*/
|
|
62
|
-
track(masks: DataPathDef | readonly DataPathDef[], options?: RaphTrackOptions): Disposer;
|
|
63
|
-
/**
|
|
64
|
-
* Однократно устанавливает immutable API, принадлежащий node.
|
|
65
|
-
* @internal
|
|
66
|
-
*/
|
|
67
|
-
_setApi(api: TApi): void;
|
|
68
|
-
}
|
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
import { DataPathDef } from '../path/path.types';
|
|
2
|
-
import { RaphKernel } from '../path/RaphKernel';
|
|
3
|
-
import { Disposer, EffectTask } from '../reactivity/types';
|
|
4
|
-
import { RaphFrameContext, RaphObserveDataOptions, RaphPhase, RaphPhaseMode, RaphSchedulerMode, RaphTrackOptions } from './phase.types';
|
|
5
|
-
import { RaphNode } from './RaphNode';
|
|
6
|
-
/**
|
|
7
|
-
* Ленивый Runtime-owned pipeline поверх Kernel path batches.
|
|
8
|
-
*/
|
|
9
|
-
export declare class RaphPhasePipeline {
|
|
10
|
-
private readonly _kernel;
|
|
11
|
-
private readonly _root;
|
|
12
|
-
private readonly _scheduler;
|
|
13
|
-
private readonly _runUntracked;
|
|
14
|
-
private readonly _deferSync;
|
|
15
|
-
private _observerRouter;
|
|
16
|
-
private _phaseRouter;
|
|
17
|
-
private _observers;
|
|
18
|
-
private _stopKernel;
|
|
19
|
-
private _phases;
|
|
20
|
-
private _phaseByName;
|
|
21
|
-
private _pending;
|
|
22
|
-
private _tasks;
|
|
23
|
-
private _phaseBindings;
|
|
24
|
-
private _taskSequence;
|
|
25
|
-
private _scheduled;
|
|
26
|
-
private _scheduleToken;
|
|
27
|
-
private _frameHandle;
|
|
28
|
-
private _frameHandleKind;
|
|
29
|
-
private _configurationLocked;
|
|
30
|
-
private _running;
|
|
31
|
-
private _disposed;
|
|
32
|
-
private _firstFrameAt;
|
|
33
|
-
private _lastFrameAt;
|
|
34
|
-
private _frameNumber;
|
|
35
|
-
private _frame;
|
|
36
|
-
/**
|
|
37
|
-
* Создаёт phase pipeline для runtime и его root node.
|
|
38
|
-
*/
|
|
39
|
-
constructor(_kernel: RaphKernel, _root: RaphNode, _scheduler: RaphSchedulerMode, _runUntracked: <T>(operation: () => T) => T, _deferSync?: () => boolean);
|
|
40
|
-
/**
|
|
41
|
-
* Возвращает последний frame context pipeline.
|
|
42
|
-
*/
|
|
43
|
-
get frame(): RaphFrameContext;
|
|
44
|
-
/**
|
|
45
|
-
* Возвращает текущее упорядоченное определение phases.
|
|
46
|
-
*/
|
|
47
|
-
get phases(): readonly RaphPhase[];
|
|
48
|
-
/**
|
|
49
|
-
* Заменяет полное определение phase pipeline до его первого выполнения.
|
|
50
|
-
*/
|
|
51
|
-
definePhases(phases: readonly RaphPhase[]): void;
|
|
52
|
-
/**
|
|
53
|
-
* Добавляет phase до первого выполнения pipeline.
|
|
54
|
-
*/
|
|
55
|
-
addPhase(phase: RaphPhase): void;
|
|
56
|
-
/**
|
|
57
|
-
* Удаляет пользовательские phases до первого выполнения pipeline.
|
|
58
|
-
*/
|
|
59
|
-
clearPhases(): void;
|
|
60
|
-
/**
|
|
61
|
-
* Возвращает phase либо отклоняет неизвестное имя.
|
|
62
|
-
*/
|
|
63
|
-
requirePhase(name: string): void;
|
|
64
|
-
/**
|
|
65
|
-
* Фиксирует phase definitions перед синхронным выполнением вне flush.
|
|
66
|
-
*/
|
|
67
|
-
lockConfiguration(): void;
|
|
68
|
-
/**
|
|
69
|
-
* Удерживает определение фазы для idle registrations вне data observer/effect.
|
|
70
|
-
*/
|
|
71
|
-
retainPhase(name: string): Disposer;
|
|
72
|
-
/**
|
|
73
|
-
* Возвращает scheduler mode указанной phase.
|
|
74
|
-
*/
|
|
75
|
-
phaseMode(name: string): RaphPhaseMode;
|
|
76
|
-
/**
|
|
77
|
-
* Связывает реактивный effect с phase scheduler.
|
|
78
|
-
*/
|
|
79
|
-
registerEffect(name: string): Disposer;
|
|
80
|
-
/**
|
|
81
|
-
* Один раз связывает watcher с task и callback.
|
|
82
|
-
* Повторные invalidations используют ту же task без hot-path поиска node и phase.
|
|
83
|
-
*/
|
|
84
|
-
bindEffect(phase: string, priority: number, run: () => void, node?: RaphNode): EffectTask;
|
|
85
|
-
/**
|
|
86
|
-
* Ставит уже зарегистрированный effect в очередь его phase.
|
|
87
|
-
*/
|
|
88
|
-
queueEffect(phase: string, priority: number, run: () => void, schedule?: boolean): Disposer;
|
|
89
|
-
/**
|
|
90
|
-
* Запрашивает выполнение pipeline согласно scheduler mode.
|
|
91
|
-
*/
|
|
92
|
-
request(): void;
|
|
93
|
-
/**
|
|
94
|
-
* Ставит frame-driven обход всего дерева в очередь даже без reactive effect.
|
|
95
|
-
*/
|
|
96
|
-
requestAlwaysPhases(): void;
|
|
97
|
-
/**
|
|
98
|
-
* Регистрирует path observer в phase pipeline.
|
|
99
|
-
*/
|
|
100
|
-
observeData(node: RaphNode, masks: DataPathDef | readonly DataPathDef[], options: RaphObserveDataOptions): Disposer;
|
|
101
|
-
/**
|
|
102
|
-
* Регистрирует tracked executor указанной phase.
|
|
103
|
-
*/
|
|
104
|
-
track(node: RaphNode, masks: DataPathDef | readonly DataPathDef[], options: RaphTrackOptions): Disposer;
|
|
105
|
-
/**
|
|
106
|
-
* Помечает node и зависимых владельцев как требующих выполнения.
|
|
107
|
-
*/
|
|
108
|
-
invalidate(node: RaphNode, phase: string): void;
|
|
109
|
-
/**
|
|
110
|
-
* Синхронно выполняет все готовые очереди pipeline.
|
|
111
|
-
*/
|
|
112
|
-
flush(): void;
|
|
113
|
-
/**
|
|
114
|
-
* Останавливает scheduler и удаляет observers, tasks и phase definitions.
|
|
115
|
-
*/
|
|
116
|
-
dispose(): void;
|
|
117
|
-
/**
|
|
118
|
-
* Показывает наличие запланированной или выполняемой работы pipeline.
|
|
119
|
-
* @internal
|
|
120
|
-
*/
|
|
121
|
-
_debugPending(): boolean;
|
|
122
|
-
private _addObserver;
|
|
123
|
-
private _ensureKernelWatch;
|
|
124
|
-
private _assertRetainedPhases;
|
|
125
|
-
private _receive;
|
|
126
|
-
private _queue;
|
|
127
|
-
private _schedule;
|
|
128
|
-
private _cancelScheduled;
|
|
129
|
-
private _nextFrame;
|
|
130
|
-
private _hasPending;
|
|
131
|
-
private _expandContexts;
|
|
132
|
-
private _assertAlive;
|
|
133
|
-
}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { Disposer, ReadonlySignal, Signal, WatchOptions, WatchSource, WatchValue, WritableComputedOptions } from '../reactivity/types';
|
|
2
|
-
import { RaphEffectOptions } from './phase.types';
|
|
3
|
-
import { RaphRuntime } from './RaphRuntime';
|
|
4
|
-
import { ScopeNode } from '../reactivity/scope';
|
|
5
|
-
/**
|
|
6
|
-
* Владеет группой runtime-ресурсов без участия в дереве исполнения.
|
|
7
|
-
*/
|
|
8
|
-
export declare class RaphScope extends ScopeNode {
|
|
9
|
-
readonly id: string;
|
|
10
|
-
readonly runtime: RaphRuntime;
|
|
11
|
-
/**
|
|
12
|
-
* Создаёт lifecycle scope внутри указанного runtime.
|
|
13
|
-
*/
|
|
14
|
-
constructor(id: string, runtime: RaphRuntime);
|
|
15
|
-
/**
|
|
16
|
-
* Создаёт writable signal, принадлежащий указанному owner.
|
|
17
|
-
*/
|
|
18
|
-
signal<T>(value: T): Signal<T>;
|
|
19
|
-
/**
|
|
20
|
-
* Создаёт computed, принадлежащий указанному owner.
|
|
21
|
-
*/
|
|
22
|
-
computed<T>(getter: () => T): ReadonlySignal<T>;
|
|
23
|
-
computed<T>(options: WritableComputedOptions<T>): Signal<T>;
|
|
24
|
-
/**
|
|
25
|
-
* Создаёт реактивный effect и регистрирует его lifecycle у owner.
|
|
26
|
-
*/
|
|
27
|
-
effect(callback: () => void | Disposer): Disposer;
|
|
28
|
-
effect(phase: string, callback: () => void | Disposer, options?: RaphEffectOptions): Disposer;
|
|
29
|
-
/**
|
|
30
|
-
* Подписывает callback и привязывает disposer к lifecycle scope.
|
|
31
|
-
*/
|
|
32
|
-
watch<S extends WatchSource | readonly WatchSource[]>(source: S, callback: (value: WatchValue<S>, previous: WatchValue<S> | undefined) => void | Disposer, options?: WatchOptions): Disposer;
|
|
33
|
-
/**
|
|
34
|
-
* Создаёт action, выполнение которой привязано к lifecycle scope.
|
|
35
|
-
*/
|
|
36
|
-
action<Args extends unknown[], Result>(name: string, operation: (...args: Args) => Result): (...args: Args) => Result;
|
|
37
|
-
/**
|
|
38
|
-
* Выполняет runtime cleanup после освобождения scope.
|
|
39
|
-
*/
|
|
40
|
-
protected _afterDispose(): void;
|
|
41
|
-
/**
|
|
42
|
-
* Возвращает диагностическое сообщение для освобождённого scope.
|
|
43
|
-
*/
|
|
44
|
-
protected _disposalMessage(): string;
|
|
45
|
-
/**
|
|
46
|
-
* Запрещает операции после начала освобождения scope.
|
|
47
|
-
* @internal
|
|
48
|
-
*/
|
|
49
|
-
_assertAlive(): void;
|
|
50
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { ScopeNode } from '../reactivity/scope';
|
|
2
|
-
import { ReadonlySignal, Signal } from '../reactivity/types';
|
|
3
|
-
import { RaphEffectInitialMode } from './phase.types';
|
|
4
|
-
import { RuntimeEffectBinding, RuntimeSignalLifecycle } from './runtime-reactivity.types';
|
|
5
|
-
import { RaphReactivity } from '../reactivity/engine';
|
|
6
|
-
/**
|
|
7
|
-
* Внутренний policy adapter, наследующий реактивные алгоритмы без дублирования.
|
|
8
|
-
*/
|
|
9
|
-
export declare class RuntimeReactivity extends RaphReactivity {
|
|
10
|
-
private readonly _lifecycle;
|
|
11
|
-
private readonly _bindings;
|
|
12
|
-
/**
|
|
13
|
-
* Создаёт policy adapter реактивного графа для одного runtime.
|
|
14
|
-
*/
|
|
15
|
-
constructor(_lifecycle: RuntimeSignalLifecycle);
|
|
16
|
-
/**
|
|
17
|
-
* Создаёт временную registration boundary для runtime effect.
|
|
18
|
-
*/
|
|
19
|
-
withEffectBinding<T>(binding: RuntimeEffectBinding | undefined, initial: RaphEffectInitialMode, operation: () => T): T;
|
|
20
|
-
/**
|
|
21
|
-
* Выполняет untracked-операцию, сохраняя runtime owner context.
|
|
22
|
-
*/
|
|
23
|
-
untrackedWithOwner<T>(operation: () => T): T;
|
|
24
|
-
/**
|
|
25
|
-
* Возвращает owner текущего синхронного реактивного контекста.
|
|
26
|
-
*/
|
|
27
|
-
getActiveOwner(): object | undefined;
|
|
28
|
-
/**
|
|
29
|
-
* Выполняет операцию с указанным active owner.
|
|
30
|
-
*/
|
|
31
|
-
runWithOwner<T>(lifecycle: RuntimeSignalLifecycle | undefined, operation: () => T): T;
|
|
32
|
-
/**
|
|
33
|
-
* Создаёт owned signal с runtime lifecycle policy.
|
|
34
|
-
*/
|
|
35
|
-
signalForOwner<T>(initialValue: T, owner?: ScopeNode): Signal<T>;
|
|
36
|
-
/**
|
|
37
|
-
* Создаёт owned computed с runtime lifecycle policy.
|
|
38
|
-
*/
|
|
39
|
-
computedForOwner<T>(getter: () => T, owner?: ScopeNode): ReadonlySignal<T>;
|
|
40
|
-
}
|