@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
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { ReactiveEdge, ReactiveNode } from '../../reactivity/types';
|
|
2
|
+
import { RaphScope } from '../ownership/RaphScope';
|
|
3
|
+
export interface RuntimeSignalLifecycle {
|
|
4
|
+
owner: object | undefined;
|
|
5
|
+
assertWriteAllowed?: () => void;
|
|
6
|
+
assertDependencyAllowed: (sourceOwner: RaphScope, consumerOwner: RaphScope) => void;
|
|
7
|
+
throwDisposed: () => never;
|
|
8
|
+
throwCrossRuntime: (owner: object) => never;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Записи графа одного consumer и его producers после их полного освобождения.
|
|
12
|
+
* Engine больше не достигает их ни через один список; их удерживает только
|
|
13
|
+
* якорь форм `RuntimeReactivity._releasedShapeAnchor`.
|
|
14
|
+
*
|
|
15
|
+
* @internal
|
|
16
|
+
*/
|
|
17
|
+
export interface ReleasedGraphShapes {
|
|
18
|
+
readonly source: ReactiveNode;
|
|
19
|
+
readonly written: ReactiveNode;
|
|
20
|
+
readonly edge: ReactiveEdge;
|
|
21
|
+
readonly consumer: ReactiveNode;
|
|
22
|
+
readonly counter: ReactiveNode<number>;
|
|
23
|
+
readonly bumped: ReactiveNode<number>;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Участник уборки после освобождения владельцев. Runtime считает освобождённых
|
|
27
|
+
* владельцев и на внешней границе освобождения вызывает только тех участников,
|
|
28
|
+
* чей срок подошёл. Так selector находит triggers, потерявшие потребителей, не
|
|
29
|
+
* получая уведомления о каждой снятой связи графа.
|
|
30
|
+
*
|
|
31
|
+
* Участник подключается не более чем к одному Runtime и не более одного раза.
|
|
32
|
+
*
|
|
33
|
+
* @internal
|
|
34
|
+
*/
|
|
35
|
+
export interface RuntimeDisposalSweeper {
|
|
36
|
+
_sweepSlot: number;
|
|
37
|
+
_sweepDue: number;
|
|
38
|
+
_afterOwnerDisposals: (disposals: number) => number;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Наблюдатель фактических записей одного Runtime signal. Signal вызывает его
|
|
42
|
+
* синхронно внутри своей границы записи, после того как новое значение стало
|
|
43
|
+
* видимым для чтения. Так selector будит потребителей отдельных ключей, не
|
|
44
|
+
* подписывая их на сам signal.
|
|
45
|
+
*
|
|
46
|
+
* Наблюдатель подключается не более чем к одному signal и не более одного
|
|
47
|
+
* раза. Порядок вызова наблюдателей одного signal не определён.
|
|
48
|
+
*
|
|
49
|
+
* @internal
|
|
50
|
+
*/
|
|
51
|
+
export interface RuntimeSignalWriteTap {
|
|
52
|
+
_tapSlot: number;
|
|
53
|
+
readonly _tapOwner: object;
|
|
54
|
+
_observesWrites: () => boolean;
|
|
55
|
+
_afterSourceWrite: (previous: unknown, value: unknown) => void;
|
|
56
|
+
}
|
package/dist/runtime.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./debug/runtime/errors.cjs"),r=require("./debug/runtime/
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./debug/runtime/errors.cjs"),r=require("./debug/runtime/ownership/parentGraph.cjs"),a=require("./debug/runtime/ownership/RaphEffectScope.cjs"),p=require("./debug/runtime/ownership/RaphNode.cjs"),o=require("./debug/runtime/ownership/RaphScope.cjs"),s=require("./debug/runtime/phases/orderPhaseTasks.cjs"),t=require("./debug/runtime/phases/phase.types.cjs"),h=require("./debug/runtime/RaphRuntime.cjs"),n=require("./debug/runtime/reactivity/PathHandle.cjs");exports.RaphActionError=e.RaphActionError;exports.RaphCrossRuntimeError=e.RaphCrossRuntimeError;exports.RaphDisposedError=e.RaphDisposedError;exports.RaphPhaseProcessError=e.RaphPhaseProcessError;exports.parentGraph=r.parentGraph;exports.RaphEffectScope=a.RaphEffectScope;exports.RaphNode=p.RaphNode;exports.RaphScope=o.RaphScope;exports.orderPhaseTasks=s.orderPhaseTasks;exports.RaphSchedulerType=t.RaphSchedulerType;exports.RaphRuntime=h.RaphRuntime;exports.PathHandle=n.PathHandle;
|
package/dist/runtime.js
CHANGED
|
@@ -1,18 +1,23 @@
|
|
|
1
|
-
import { RaphActionError as
|
|
2
|
-
import { parentGraph as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
import { RaphActionError as e, RaphCrossRuntimeError as p, RaphDisposedError as a, RaphPhaseProcessError as t } from "./debug/runtime/errors.js";
|
|
2
|
+
import { parentGraph as f } from "./debug/runtime/ownership/parentGraph.js";
|
|
3
|
+
import { RaphEffectScope as R } from "./debug/runtime/ownership/RaphEffectScope.js";
|
|
4
|
+
import { RaphNode as x } from "./debug/runtime/ownership/RaphNode.js";
|
|
5
|
+
import { RaphScope as d } from "./debug/runtime/ownership/RaphScope.js";
|
|
6
|
+
import { orderPhaseTasks as E } from "./debug/runtime/phases/orderPhaseTasks.js";
|
|
7
|
+
import { RaphSchedulerType as P } from "./debug/runtime/phases/phase.types.js";
|
|
8
|
+
import { RaphRuntime as S } from "./debug/runtime/RaphRuntime.js";
|
|
9
|
+
import { PathHandle as T } from "./debug/runtime/reactivity/PathHandle.js";
|
|
8
10
|
export {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
11
|
+
T as PathHandle,
|
|
12
|
+
e as RaphActionError,
|
|
13
|
+
p as RaphCrossRuntimeError,
|
|
14
|
+
a as RaphDisposedError,
|
|
15
|
+
R as RaphEffectScope,
|
|
16
|
+
x as RaphNode,
|
|
17
|
+
t as RaphPhaseProcessError,
|
|
18
|
+
S as RaphRuntime,
|
|
19
|
+
P as RaphSchedulerType,
|
|
20
|
+
d as RaphScope,
|
|
21
|
+
E as orderPhaseTasks,
|
|
22
|
+
f as parentGraph
|
|
18
23
|
};
|
package/package.json
CHANGED
|
@@ -2,32 +2,32 @@
|
|
|
2
2
|
"name": "@raphy-js/raph",
|
|
3
3
|
"repository": {
|
|
4
4
|
"type": "git",
|
|
5
|
-
"url": "https://gitlab.com/raphyjs/raph.git"
|
|
5
|
+
"url": "https://gitlab.com/raphyjs/raphy-js-raph.git"
|
|
6
6
|
},
|
|
7
7
|
"type": "module",
|
|
8
|
-
"version": "1.0.
|
|
8
|
+
"version": "1.0.1-dev.25",
|
|
9
9
|
"private": false,
|
|
10
10
|
"description": "Reactive signals, paths and application runtime",
|
|
11
11
|
"license": "Apache-2.0",
|
|
12
12
|
"sideEffects": false,
|
|
13
13
|
"exports": {
|
|
14
14
|
".": {
|
|
15
|
-
"types": "./dist/
|
|
15
|
+
"types": "./dist/main.d.ts",
|
|
16
16
|
"import": "./dist/index.js",
|
|
17
17
|
"require": "./dist/index.cjs"
|
|
18
18
|
},
|
|
19
19
|
"./path": {
|
|
20
|
-
"types": "./dist/path
|
|
20
|
+
"types": "./dist/entrypoints/path.d.ts",
|
|
21
21
|
"import": "./dist/path.js",
|
|
22
22
|
"require": "./dist/path.cjs"
|
|
23
23
|
},
|
|
24
24
|
"./raph": {
|
|
25
|
-
"types": "./dist/
|
|
25
|
+
"types": "./dist/main.d.ts",
|
|
26
26
|
"import": "./dist/raph.js",
|
|
27
27
|
"require": "./dist/raph.cjs"
|
|
28
28
|
},
|
|
29
29
|
"./signals": {
|
|
30
|
-
"types": "./dist/reactivity
|
|
30
|
+
"types": "./dist/entrypoints/reactivity.d.ts",
|
|
31
31
|
"import": "./dist/reactivity.js",
|
|
32
32
|
"require": "./dist/reactivity.cjs"
|
|
33
33
|
},
|
|
@@ -37,21 +37,32 @@
|
|
|
37
37
|
"require": "./dist/debug/*.cjs"
|
|
38
38
|
},
|
|
39
39
|
"./reactivity": {
|
|
40
|
-
"types": "./dist/reactivity
|
|
40
|
+
"types": "./dist/entrypoints/reactivity.d.ts",
|
|
41
41
|
"import": "./dist/reactivity.js",
|
|
42
42
|
"require": "./dist/reactivity.cjs"
|
|
43
43
|
},
|
|
44
44
|
"./runtime": {
|
|
45
|
-
"types": "./dist/runtime
|
|
45
|
+
"types": "./dist/entrypoints/runtime.d.ts",
|
|
46
46
|
"import": "./dist/runtime.js",
|
|
47
47
|
"require": "./dist/runtime.cjs"
|
|
48
|
+
},
|
|
49
|
+
"./machine": {
|
|
50
|
+
"types": "./dist/entrypoints/machine.d.ts",
|
|
51
|
+
"import": "./dist/machine.js",
|
|
52
|
+
"require": "./dist/machine.cjs"
|
|
53
|
+
},
|
|
54
|
+
"./machine/testing": {
|
|
55
|
+
"types": "./dist/entrypoints/machine-testing.d.ts",
|
|
56
|
+
"import": "./dist/machine-testing.js",
|
|
57
|
+
"require": "./dist/machine-testing.cjs"
|
|
48
58
|
}
|
|
49
59
|
},
|
|
50
60
|
"main": "./dist/index.cjs",
|
|
51
61
|
"module": "./dist/index.js",
|
|
52
|
-
"types": "./dist/
|
|
62
|
+
"types": "./dist/main.d.ts",
|
|
53
63
|
"files": [
|
|
54
64
|
"dist",
|
|
65
|
+
"README.md",
|
|
55
66
|
"LICENSE"
|
|
56
67
|
],
|
|
57
68
|
"scripts": {
|
|
@@ -64,27 +75,63 @@
|
|
|
64
75
|
"test:coverage": "vitest run --coverage",
|
|
65
76
|
"test:memory": "node --expose-gc ./node_modules/vitest/vitest.mjs run --config vitest.memory.config.ts",
|
|
66
77
|
"test:distribution": "node --test src/test/distribution.node.mjs",
|
|
67
|
-
"test:benchmark
|
|
68
|
-
"bench:install": "pnpm --ignore-workspace run bench:
|
|
69
|
-
"bench": "pnpm --ignore-workspace run bench:
|
|
78
|
+
"test:benchmark:reactivity": "pnpm --ignore-workspace run bench:reactivity:correctness",
|
|
79
|
+
"bench:install": "pnpm --ignore-workspace run bench:reactivity:install",
|
|
80
|
+
"bench": "pnpm --ignore-workspace run bench:reactivity:performance",
|
|
81
|
+
"bench:churn:install": "pnpm --ignore-workspace --dir src/test/benchmarks/labs/runtime-churn run install:lab",
|
|
82
|
+
"bench:churn:test": "pnpm --ignore-workspace --dir src/test/benchmarks/labs/runtime-churn test",
|
|
83
|
+
"bench:churn:correctness": "pnpm --ignore-workspace --dir src/test/benchmarks/labs/runtime-churn run correctness",
|
|
84
|
+
"bench:churn:light": "pnpm --ignore-workspace --dir src/test/benchmarks/labs/runtime-churn run light",
|
|
85
|
+
"bench:churn:balanced": "pnpm --ignore-workspace --dir src/test/benchmarks/labs/runtime-churn run balanced",
|
|
86
|
+
"bench:churn:parts": "pnpm --ignore-workspace --dir src/test/benchmarks/labs/runtime-churn run parts",
|
|
87
|
+
"bench:churn:paired": "pnpm --ignore-workspace --dir src/test/benchmarks/labs/runtime-churn run paired",
|
|
88
|
+
"bench:churn:aa": "pnpm --ignore-workspace --dir src/test/benchmarks/labs/runtime-churn run aa",
|
|
70
89
|
"bench:path": "node src/test/benchmarks/path/run.mjs",
|
|
71
|
-
"bench:
|
|
72
|
-
"bench:
|
|
73
|
-
"bench:
|
|
74
|
-
"bench:
|
|
75
|
-
"bench:
|
|
76
|
-
"bench:
|
|
77
|
-
"bench:
|
|
78
|
-
"bench:
|
|
79
|
-
"bench:
|
|
80
|
-
"bench:
|
|
81
|
-
"bench:
|
|
82
|
-
"bench:
|
|
83
|
-
"bench:
|
|
84
|
-
"bench:
|
|
85
|
-
"bench:
|
|
86
|
-
"bench:
|
|
87
|
-
"bench:
|
|
90
|
+
"bench:reactivity:install": "pnpm --ignore-workspace --dir src/test/benchmarks/labs/reactivity run install:lab",
|
|
91
|
+
"bench:reactivity:correctness": "pnpm --ignore-workspace --dir src/test/benchmarks/labs/reactivity run correctness",
|
|
92
|
+
"bench:reactivity:performance": "pnpm --ignore-workspace --dir src/test/benchmarks/labs/reactivity run performance",
|
|
93
|
+
"bench:reactivity:memory": "pnpm --ignore-workspace --dir src/test/benchmarks/labs/reactivity run memory",
|
|
94
|
+
"bench:reactivity:balanced:performance": "pnpm --ignore-workspace --dir src/test/benchmarks/labs/reactivity run performance -- --balanced",
|
|
95
|
+
"bench:reactivity:api-tax": "pnpm --ignore-workspace --dir src/test/benchmarks/labs/reactivity run api-tax",
|
|
96
|
+
"bench:reactivity:report": "pnpm --ignore-workspace --dir src/test/benchmarks/labs/reactivity run report",
|
|
97
|
+
"bench:reactivity": "pnpm --ignore-workspace --dir src/test/benchmarks/labs/reactivity run lab",
|
|
98
|
+
"bench:reactivity:raph-only": "pnpm --ignore-workspace run bench:reactivity --raph-only",
|
|
99
|
+
"bench:reactivity:balanced": "pnpm --ignore-workspace run bench:reactivity --balanced",
|
|
100
|
+
"bench:reactivity:light:correctness": "pnpm --ignore-workspace --dir src/test/benchmarks/labs/reactivity run correctness -- --light",
|
|
101
|
+
"bench:reactivity:light:performance": "pnpm --ignore-workspace --dir src/test/benchmarks/labs/reactivity run performance -- --light",
|
|
102
|
+
"bench:reactivity:light:balanced:performance": "pnpm --ignore-workspace --dir src/test/benchmarks/labs/reactivity run performance -- --light --balanced",
|
|
103
|
+
"bench:reactivity:light:api-tax": "pnpm --ignore-workspace --dir src/test/benchmarks/labs/reactivity run api-tax -- --light",
|
|
104
|
+
"bench:reactivity:light:report": "pnpm --ignore-workspace --dir src/test/benchmarks/labs/reactivity run report -- --light",
|
|
105
|
+
"bench:reactivity:light": "pnpm --ignore-workspace run bench:reactivity --light",
|
|
106
|
+
"bench:reactivity:light:balanced": "pnpm --ignore-workspace run bench:reactivity --light --balanced",
|
|
107
|
+
"bench:reactive-object:install": "pnpm --ignore-workspace --dir src/test/benchmarks/labs/reactive-object run install:lab",
|
|
108
|
+
"bench:reactive-object:correctness": "pnpm --ignore-workspace --dir src/test/benchmarks/labs/reactive-object run correctness",
|
|
109
|
+
"bench:reactive-object:gc": "pnpm --ignore-workspace --dir src/test/benchmarks/labs/reactive-object run gc",
|
|
110
|
+
"bench:reactive-object:performance": "pnpm --ignore-workspace --dir src/test/benchmarks/labs/reactive-object run performance",
|
|
111
|
+
"bench:reactive-object:memory": "pnpm --ignore-workspace --dir src/test/benchmarks/labs/reactive-object run memory",
|
|
112
|
+
"bench:reactive-object:browsers": "pnpm --ignore-workspace --dir src/test/benchmarks/labs/reactive-object run browsers",
|
|
113
|
+
"bench:reactive-object:report": "pnpm --ignore-workspace --dir src/test/benchmarks/labs/reactive-object run report",
|
|
114
|
+
"bench:reactive-object:quick": "pnpm --ignore-workspace --dir src/test/benchmarks/labs/reactive-object run quick",
|
|
115
|
+
"bench:reactive-object": "pnpm --ignore-workspace --dir src/test/benchmarks/labs/reactive-object run lab",
|
|
116
|
+
"bench:machine:install": "node src/test/benchmarks/labs/machine/scripts/install.mjs",
|
|
117
|
+
"bench:machine:correctness": "pnpm --ignore-workspace --dir src/test/benchmarks/labs/machine run correctness",
|
|
118
|
+
"bench:machine:performance": "pnpm --ignore-workspace --dir src/test/benchmarks/labs/machine run performance",
|
|
119
|
+
"bench:machine:browsers": "pnpm --ignore-workspace --dir src/test/benchmarks/labs/machine run browsers",
|
|
120
|
+
"bench:machine:memory": "pnpm --ignore-workspace --dir src/test/benchmarks/labs/machine run memory",
|
|
121
|
+
"bench:machine:report": "pnpm --ignore-workspace --dir src/test/benchmarks/labs/machine run report",
|
|
122
|
+
"bench:machine:light": "pnpm --ignore-workspace --dir src/test/benchmarks/labs/machine run light",
|
|
123
|
+
"bench:machine": "pnpm --ignore-workspace --dir src/test/benchmarks/labs/machine run lab",
|
|
124
|
+
"bench:native:machine": "node src/test/benchmarks/machine/run.mjs",
|
|
125
|
+
"bench:ecosystem:install": "pnpm --ignore-workspace --dir src/test/benchmarks/labs/ecosystem run install:lab",
|
|
126
|
+
"bench:ecosystem:typecheck": "pnpm --ignore-workspace --dir src/test/benchmarks/labs/ecosystem run typecheck",
|
|
127
|
+
"bench:ecosystem:build": "pnpm --ignore-workspace --dir src/test/benchmarks/labs/ecosystem run build",
|
|
128
|
+
"bench:ecosystem:test-cli": "pnpm --ignore-workspace --dir src/test/benchmarks/labs/ecosystem run test:cli",
|
|
129
|
+
"bench:ecosystem:list": "pnpm --ignore-workspace --dir src/test/benchmarks/labs/ecosystem run list",
|
|
130
|
+
"bench:ecosystem:light": "pnpm --ignore-workspace --dir src/test/benchmarks/labs/ecosystem run light",
|
|
131
|
+
"bench:ecosystem:balanced": "pnpm --ignore-workspace --dir src/test/benchmarks/labs/ecosystem run balanced",
|
|
132
|
+
"bench:ecosystem:full": "pnpm --ignore-workspace --dir src/test/benchmarks/labs/ecosystem run full",
|
|
133
|
+
"bench:ecosystem:curves": "pnpm --ignore-workspace --dir src/test/benchmarks/labs/ecosystem run curves",
|
|
134
|
+
"bench:ecosystem": "pnpm --ignore-workspace --dir src/test/benchmarks/labs/ecosystem run lab",
|
|
88
135
|
"lint-check": "eslint src vite.config.ts vitest.config.ts vitest.memory.config.ts --cache",
|
|
89
136
|
"lint-fix": "eslint src vite.config.ts vitest.config.ts vitest.memory.config.ts --fix --cache",
|
|
90
137
|
"build:portable": "node scripts/build-portable.mjs"
|
|
@@ -92,18 +139,12 @@
|
|
|
92
139
|
"devDependencies": {
|
|
93
140
|
"@antfu/eslint-config": "9.3.0",
|
|
94
141
|
"@vitest/coverage-v8": "^3.2.4",
|
|
95
|
-
"@volynets/reflex": "1.0.0",
|
|
96
|
-
"alien-signals": "3.2.1",
|
|
97
142
|
"eslint": "10.9.1",
|
|
98
|
-
"mobx": "7.0.3",
|
|
99
143
|
"rimraf": "^6.0.1",
|
|
100
|
-
"solid-js": "1.9.15",
|
|
101
144
|
"typescript": "~6.0.3",
|
|
102
145
|
"unplugin-dts": "^1.0.3",
|
|
103
146
|
"vite": "^6.1.0",
|
|
104
147
|
"vitest": "^3.2.4",
|
|
105
|
-
"vue-reactivity-3-5": "npm:@vue/reactivity@3.5.43",
|
|
106
|
-
"vue-reactivity-3-6-rc": "npm:@vue/reactivity@3.6.0-rc.9",
|
|
107
148
|
"vue-tsc": "^3.3.11"
|
|
108
149
|
}
|
|
109
150
|
}
|
package/ReadMe.md
DELETED
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
# @raphy-js/raph
|
|
2
|
-
|
|
3
|
-
Raph объединяет signal, path и runtime слои из Raph Next в одном публичном
|
|
4
|
-
пакете. Benchmark-наборы и исторические результаты сохранены в `src/test/benchmarks/bench-lab`.
|
|
5
|
-
|
|
6
|
-
Новая архитектура, изменения timing и миграция API описаны в [MIGRATION.md](MIGRATION.md).
|
|
7
|
-
|
|
8
|
-
## Entry points
|
|
9
|
-
|
|
10
|
-
| Import | Назначение |
|
|
11
|
-
|---|---|
|
|
12
|
-
| `@raphy-js/raph` | плоский настраиваемый facade `Raph` и совместимые public-типы |
|
|
13
|
-
| `@raphy-js/raph/path` | PathStore, Kernel, adapters, Meta и materialized derived |
|
|
14
|
-
| `@raphy-js/raph/runtime` | RaphRuntime, ownership, execution tree, phases и FrameLoop |
|
|
15
|
-
| `@raphy-js/raph/raph` | совместимый alias полного root API |
|
|
16
|
-
| `@raphy-js/raph/reactivity` | функции `signal`, `computed`, `effect`, `watch`, `batch`, `untracked` и класс `RaphReactivity` для изолированного графа |
|
|
17
|
-
| `@raphy-js/raph/debug/*` | отладочный доступ к собранным production-модулям, например `debug/reactivity/engine` |
|
|
18
|
-
|
|
19
|
-
Корневой import и `/raph` предоставляют один прикладной фасад `Raph`.
|
|
20
|
-
До первой операции фасада приложение обязано один раз выбрать режим:
|
|
21
|
-
|
|
22
|
-
```ts
|
|
23
|
-
import { Raph } from '@raphy-js/raph'
|
|
24
|
-
|
|
25
|
-
Raph.configure({ mode: 'runtime' })
|
|
26
|
-
const count = Raph.signal(0)
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
Начальные runtime phases можно определить там же, а затем дополнить через
|
|
30
|
-
`definePhases()` или `addPhase()` до первого фактического выполнения phase
|
|
31
|
-
pipeline:
|
|
32
|
-
|
|
33
|
-
```ts
|
|
34
|
-
Raph.configure({
|
|
35
|
-
mode: 'runtime',
|
|
36
|
-
phases: [
|
|
37
|
-
{ name: 'calculate', traversal: 'dirty-only' },
|
|
38
|
-
],
|
|
39
|
-
})
|
|
40
|
-
|
|
41
|
-
Raph.addPhase({ name: 'dom-write', traversal: 'dirty-only' })
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
До первого выполнения разрешено уточнять pipeline даже после регистрации phase
|
|
45
|
-
effects и observers, пока новая конфигурация сохраняет все используемые ими
|
|
46
|
-
имена фаз. Queued work при этом не теряется. После первого выполнения
|
|
47
|
-
`definePhases()`, `addPhase()` и `clearPhases()` отклоняются, чтобы порядок и
|
|
48
|
-
маршрутизация работающего pipeline оставались неизменными.
|
|
49
|
-
|
|
50
|
-
Для приложения только с синхронной реактивностью используется
|
|
51
|
-
`Raph.configure({ mode: 'reactivity' })`. Для нескольких явно именованных
|
|
52
|
-
Runtime:
|
|
53
|
-
|
|
54
|
-
```ts
|
|
55
|
-
Raph.configure({ mode: 'runtime', createDefaultRuntime: false })
|
|
56
|
-
export const editor = Raph.createRuntime({ id: 'editor' })
|
|
57
|
-
export const preview = Raph.createRuntime({ id: 'preview' })
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
`/signals` — совместимый alias `/reactivity`. `/reactivity` даёт самостоятельный signal
|
|
61
|
-
API; `/debug/*` предназначен для локальной диагностики и может меняться вместе
|
|
62
|
-
с внутренней реализацией.
|
|
63
|
-
|
|
64
|
-
```ts
|
|
65
|
-
import { computed, effect, signal } from '@raphy-js/raph/reactivity'
|
|
66
|
-
|
|
67
|
-
const count = signal(0)
|
|
68
|
-
const doubled = computed(() => count.get() * 2)
|
|
69
|
-
const dispose = effect(() => console.log(doubled.get()))
|
|
70
|
-
count.set(1)
|
|
71
|
-
dispose()
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
`new RaphReactivity()` создаёт независимый граф с тем же API. `RaphRuntime`
|
|
75
|
-
использует собственный граф с проверками владельца и жизненного цикла.
|
|
76
|
-
При миграции потребителя между major-версиями нужно проверить path,
|
|
77
|
-
phases, lifecycle и timing semantics.
|
|
78
|
-
|
|
79
|
-
`Raph.reset()` завершает все Runtime, созданные через фасад в текущей сессии.
|
|
80
|
-
Экземпляры, созданные напрямую через `new RaphRuntime()`, остаются независимыми.
|
|
81
|
-
Общие path, Meta и derived-данные нескольких Runtime принадлежат переданному
|
|
82
|
-
им `RaphKernel`; data adapter настраивается на Kernel, а не на Runtime.
|
|
83
|
-
|
|
84
|
-
## Чтение всего Kernel
|
|
85
|
-
|
|
86
|
-
`get()` и `peek()` без path эквивалентны `get('')` и `peek('')`: они
|
|
87
|
-
возвращают текущий path-root без создания копии. Facade читает Kernel
|
|
88
|
-
default runtime, а экземпляры Runtime и Kernel — данные своего Kernel:
|
|
89
|
-
|
|
90
|
-
```ts
|
|
91
|
-
const trackedDefaultData = Raph.get()
|
|
92
|
-
const untrackedDefaultData = Raph.peek()
|
|
93
|
-
const runtimeData = runtime.get()
|
|
94
|
-
const kernelData = kernel.peek()
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
`get()` сохраняет reactive tracking-поведение `get('')`, а `peek()` не
|
|
98
|
-
регистрирует реактивную зависимость.
|
|
99
|
-
|
|
100
|
-
## Sugar-ссылки facade
|
|
101
|
-
|
|
102
|
-
Частые runtime-значения доступны через `Raph` без дополнительных imports. Эти
|
|
103
|
-
ссылки используют существующие константы и функции как единственный source of
|
|
104
|
-
truth:
|
|
105
|
-
|
|
106
|
-
```ts
|
|
107
|
-
Raph.configure({
|
|
108
|
-
mode: 'runtime',
|
|
109
|
-
scheduler: Raph.Scheduler.Microtask,
|
|
110
|
-
})
|
|
111
|
-
|
|
112
|
-
Raph.derive({
|
|
113
|
-
from: 'source.rows',
|
|
114
|
-
to: 'target.rows',
|
|
115
|
-
strategy: Raph.DerivedStrategy.collectionByKey('id'),
|
|
116
|
-
compute: row => row,
|
|
117
|
-
})
|
|
118
|
-
```
|
|
119
|
-
|
|
120
|
-
## Проверки и сборка
|
|
121
|
-
|
|
122
|
-
```sh
|
|
123
|
-
pnpm --ignore-workspace install --frozen-lockfile
|
|
124
|
-
pnpm --ignore-workspace run build
|
|
125
|
-
pnpm --ignore-workspace run typecheck:test
|
|
126
|
-
pnpm --ignore-workspace run test
|
|
127
|
-
pnpm --ignore-workspace run test:memory
|
|
128
|
-
pnpm --ignore-workspace run test:distribution
|
|
129
|
-
pnpm --ignore-workspace run bench:lab:install
|
|
130
|
-
pnpm --ignore-workspace run bench:lab:light:balanced
|
|
131
|
-
pnpm --ignore-workspace run bench:lab:balanced
|
|
132
|
-
pnpm --ignore-workspace run bench:path
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
`src/test/benchmarks/bench-lab` содержит полные correctness/performance-наборы,
|
|
136
|
-
всех исходных кандидатов и Endge-сценарии. Light и Full пишут отдельные простые
|
|
137
|
-
HTML-таблицы в папках запусков `results-light/<дата>/index.html` и
|
|
138
|
-
`results/<дата>/index.html`, подсвечивая
|
|
139
|
-
всю группу в пределах +5% от лучшего результата. Balanced проводит три
|
|
140
|
-
циклические ротации и использует медианы. Локальные результаты в `results/diff`
|
|
141
|
-
можно использовать только при совпадающей среде измерения; generated reports не
|
|
142
|
-
входят в публикуемый package.
|
|
143
|
-
|
|
144
|
-
Простой независимый owner создаётся через `scope()` или `new RaphReactivity().scope()`.
|
|
145
|
-
При необходимости сборки без native-модулей используйте `pnpm run build:portable`.
|
|
146
|
-
|
|
147
|
-
# TODO
|
|
148
|
-
|
|
149
|
-
- Отделить адаптеры BenchLab в отдельный репо BenchLab
|
|
150
|
-
- _signalAccess()
|
|
151
|
-
- _computedAccess()
|
|
152
|
-
- _startBatch()
|
|
153
|
-
- _endBatch()
|
package/dist/api/public.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export { DefaultDataAdapter } from '../path/data-adapter';
|
|
2
|
-
export type { DataAdapter, DataObject, DefaultAdapterOptions, } from '../path/data-adapter';
|
|
3
|
-
export { DataPath } from '../path/data-path';
|
|
4
|
-
export type { DataPathParseOptions, PathScalar, PathSegment, PlainDataPath, } from '../path/data-path';
|
|
5
|
-
export { collectionByKey, filterByKey, full } from '../path/derived-strategies';
|
|
6
|
-
export type { DerivedCollectionByKeyStrategy, DerivedFilterByKeyStrategy, DerivedFullStrategy, DerivedStrategy, } from '../path/derived-strategies';
|
|
7
|
-
export type { RaphMetaApi, RaphMetaEvents, RaphMetaMutationCause, RaphMetaMutationEvent, RaphMetaMutationKind, RaphMetaReadOptions, RaphMetaWatchCallback, RaphMetaWatchOptions, RaphMetaWriteOptions, } from '../path/meta.types';
|
|
8
|
-
export type { PathEvent as PhaseEvent } from '../path/path.types';
|
|
9
|
-
export type { DataPathDef, PathEvent, PathEvents, PathMutationKind, PathOptions, PathWatchCallback, } from '../path/path.types';
|
|
10
|
-
export { RaphDerivedHandle } from '../path/RaphDerivedHandle';
|
|
11
|
-
export type PhaseName = string;
|
|
12
|
-
export { RaphDerivedTargetWriteError } from '../path/RaphDerivedHandle';
|
|
13
|
-
export type { DerivedOptions } from '../path/RaphDerivedHandle';
|
|
14
|
-
export { RaphKernel } from '../path/RaphKernel';
|
|
15
|
-
export type { RaphKernelOptions, RaphKernelRoot, RaphKernelRuntime, } from '../path/RaphKernel';
|
|
16
|
-
export { RaphMeta } from '../path/RaphMeta';
|
|
17
|
-
export type { ReadonlySignal, Signal, WritableComputedOptions, } from '../reactivity/types';
|
|
18
|
-
export type { Disposer, WatchOptions, WatchSource, WatchValue, } from '../reactivity/types';
|
|
19
|
-
export * from '../runtime/public';
|
|
20
|
-
export { RaphConfigurationError, RaphDefaultRuntimeError, RaphError, RaphModeError, } from './errors';
|
|
21
|
-
export { Raph } from './Raph';
|
|
22
|
-
export type { RaphConfigureOptions, RaphMode, RaphReactivityConfigureOptions, RaphRuntimeConfigureOptions, RaphRuntimeDefaults, RaphRuntimeRegistryConfigureOptions, } from './types';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("../path/data-adapter.cjs"),o=require("../path/data-path.cjs"),r=require("../path/derived-strategies.cjs"),t=require("../path/RaphDerivedHandle.cjs"),h=require("../path/RaphKernel.cjs"),u=require("../path/RaphMeta.cjs"),a=require("../runtime/errors.cjs"),i=require("../runtime/parent-graph.cjs"),n=require("../runtime/PathHandle.cjs"),R=require("../runtime/phase.types.cjs"),d=require("../runtime/RaphNode.cjs"),_=require("../runtime/RaphRuntime.cjs"),s=require("../runtime/RaphScope.cjs"),e=require("./errors.cjs"),c=require("./Raph.cjs");exports.DefaultDataAdapter=p.DefaultDataAdapter;exports.DataPath=o.DataPath;exports.collectionByKey=r.collectionByKey;exports.filterByKey=r.filterByKey;exports.full=r.full;exports.RaphDerivedHandle=t.RaphDerivedHandle;exports.RaphDerivedTargetWriteError=t.RaphDerivedTargetWriteError;exports.RaphKernel=h.RaphKernel;exports.RaphMeta=u.RaphMeta;exports.RaphActionError=a.RaphActionError;exports.RaphCrossRuntimeError=a.RaphCrossRuntimeError;exports.RaphDisposedError=a.RaphDisposedError;exports.parentGraph=i.parentGraph;exports.PathHandle=n.PathHandle;exports.RaphSchedulerType=R.RaphSchedulerType;exports.RaphNode=d.RaphNode;exports.RaphRuntime=_.RaphRuntime;exports.RaphScope=s.RaphScope;exports.RaphConfigurationError=e.RaphConfigurationError;exports.RaphDefaultRuntimeError=e.RaphDefaultRuntimeError;exports.RaphError=e.RaphError;exports.RaphModeError=e.RaphModeError;exports.Raph=c.Raph;
|
package/dist/debug/api/public.js
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { DefaultDataAdapter as e } from "../path/data-adapter.js";
|
|
2
|
-
import { DataPath as t } from "../path/data-path.js";
|
|
3
|
-
import { collectionByKey as f, filterByKey as h, full as R } from "../path/derived-strategies.js";
|
|
4
|
-
import { RaphDerivedHandle as x, RaphDerivedTargetWriteError as i } from "../path/RaphDerivedHandle.js";
|
|
5
|
-
import { RaphKernel as n } from "../path/RaphKernel.js";
|
|
6
|
-
import { RaphMeta as u } from "../path/RaphMeta.js";
|
|
7
|
-
import { RaphActionError as D, RaphCrossRuntimeError as c, RaphDisposedError as y } from "../runtime/errors.js";
|
|
8
|
-
import { parentGraph as K } from "../runtime/parent-graph.js";
|
|
9
|
-
import { PathHandle as v } from "../runtime/PathHandle.js";
|
|
10
|
-
import { RaphSchedulerType as B } from "../runtime/phase.types.js";
|
|
11
|
-
import { RaphNode as H } from "../runtime/RaphNode.js";
|
|
12
|
-
import { RaphRuntime as P } from "../runtime/RaphRuntime.js";
|
|
13
|
-
import { RaphScope as T } from "../runtime/RaphScope.js";
|
|
14
|
-
import { RaphConfigurationError as N, RaphDefaultRuntimeError as W, RaphError as b, RaphModeError as j } from "./errors.js";
|
|
15
|
-
import { Raph as q } from "./Raph.js";
|
|
16
|
-
export {
|
|
17
|
-
t as DataPath,
|
|
18
|
-
e as DefaultDataAdapter,
|
|
19
|
-
v as PathHandle,
|
|
20
|
-
q as Raph,
|
|
21
|
-
D as RaphActionError,
|
|
22
|
-
N as RaphConfigurationError,
|
|
23
|
-
c as RaphCrossRuntimeError,
|
|
24
|
-
W as RaphDefaultRuntimeError,
|
|
25
|
-
x as RaphDerivedHandle,
|
|
26
|
-
i as RaphDerivedTargetWriteError,
|
|
27
|
-
y as RaphDisposedError,
|
|
28
|
-
b as RaphError,
|
|
29
|
-
n as RaphKernel,
|
|
30
|
-
u as RaphMeta,
|
|
31
|
-
j as RaphModeError,
|
|
32
|
-
H as RaphNode,
|
|
33
|
-
P as RaphRuntime,
|
|
34
|
-
B as RaphSchedulerType,
|
|
35
|
-
T as RaphScope,
|
|
36
|
-
f as collectionByKey,
|
|
37
|
-
h as filterByKey,
|
|
38
|
-
R as full,
|
|
39
|
-
K as parentGraph
|
|
40
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var p=Object.defineProperty;var l=(r,e,t)=>e in r?p(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var d=(r,e,t)=>l(r,typeof e!="symbol"?e+"":e,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./data-path.cjs"),_=require("./PathEventHub.cjs");class b{constructor(e){d(this,"_eventHub",new _.PathEventHub("[Raph] Adapter transaction and publication failed."));this._adapter=e}get(e,t){const a=i.parseDataPath(e,t);return this._adapter.get(a.canonical)}peek(e,t){return this.get(e,t)}has(e,t){var n,s;const a=i.parseDataPath(e,t);return((s=(n=this._adapter).has)==null?void 0:s.call(n,a.canonical))??u(this._adapter.root(),a.segments)}set(e,t,a){const n=i.parseDataPath(e,a),s=this._eventHub.hasWatchers?this._adapter.get(n.canonical):void 0;this._adapter.set(n.canonical,t),this._eventHub.record({kind:"set",path:n.canonical,previous:s,value:this._eventHub.hasWatchers?this._adapter.get(n.canonical):void 0})}merge(e,t,a){const n=i.parseDataPath(e,a),s=this._eventHub.hasWatchers?this._adapter.get(n.canonical):void 0,c=o(s)&&o(t)?f(s):s;this._adapter.merge(n.canonical,t),this._eventHub.record({kind:"merge",path:n.canonical,previous:c,value:this._eventHub.hasWatchers?this._adapter.get(n.canonical):void 0})}delete(e,t){var c,h;const a=i.parseDataPath(e,t);if(!(((h=(c=this._adapter).has)==null?void 0:h.call(c,a.canonical))??u(this._adapter.root(),a.segments)))return;const s=this._eventHub.hasWatchers?this._adapter.get(a.canonical):void 0;this._adapter.delete(a.canonical),this._eventHub.record({kind:"delete",path:a.canonical,previous:s,value:void 0})}transaction(e){return this._eventHub.transaction(e)}watch(e,t){return this._eventHub.watch(e,t)}}function u(r,e){let t=r;for(const a of e)if(a.kind==="key"){if(!v(t)||!Object.hasOwn(t,a.key))return!1;t=t[a.key]}else if(a.kind==="index"){if(!Array.isArray(t)||!Object.hasOwn(t,a.index))return!1;t=t[a.index]}else{if(!Array.isArray(t))return!1;const n=t.findIndex(s=>o(s)&&Object.hasOwn(s,a.key)&&Object.is(s[a.key],a.value));if(n===-1)return!1;t=t[n]}return!0}function f(r){const e=Object.create(Object.getPrototypeOf(r));for(const t of Object.keys(r))t==="__proto__"?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,value:r[t],writable:!0}):e[t]=r[t];return e}function o(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)}function v(r){return Array.isArray(r)||o(r)}exports.AdapterPathStore=b;
|