reactronic 0.24.111 → 0.24.113
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.
|
@@ -4,7 +4,7 @@ export type Delegate<T> = (element: T, base: () => void) => void;
|
|
|
4
4
|
export type SimpleDelegate<T = unknown, R = void> = (element: T) => R;
|
|
5
5
|
export declare enum Mode {
|
|
6
6
|
Default = 0,
|
|
7
|
-
|
|
7
|
+
IndependentUpdate = 1,
|
|
8
8
|
ManualMount = 2
|
|
9
9
|
}
|
|
10
10
|
export declare const enum Priority {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export var Mode;
|
|
2
2
|
(function (Mode) {
|
|
3
3
|
Mode[Mode["Default"] = 0] = "Default";
|
|
4
|
-
Mode[Mode["
|
|
4
|
+
Mode[Mode["IndependentUpdate"] = 1] = "IndependentUpdate";
|
|
5
5
|
Mode[Mode["ManualMount"] = 2] = "ManualMount";
|
|
6
6
|
})(Mode || (Mode = {}));
|
|
7
7
|
export var Priority;
|
|
@@ -220,7 +220,7 @@ class RxNodeImpl {
|
|
|
220
220
|
this.priority = Priority.Realtime;
|
|
221
221
|
this.childrenShuffling = false;
|
|
222
222
|
RxNodeImpl.grandNodeCount++;
|
|
223
|
-
if (this.has(Mode.
|
|
223
|
+
if (this.has(Mode.IndependentUpdate))
|
|
224
224
|
RxNodeImpl.disposableNodeCount++;
|
|
225
225
|
}
|
|
226
226
|
get isInitialUpdate() { return this.stamp === 1; }
|
|
@@ -234,8 +234,8 @@ class RxNodeImpl {
|
|
|
234
234
|
updateNow(this.seat);
|
|
235
235
|
}
|
|
236
236
|
configureReactronic(options) {
|
|
237
|
-
if (this.stamp < Number.MAX_SAFE_INTEGER - 1 || !this.has(Mode.
|
|
238
|
-
throw new Error('reactronic can be configured only for elements with
|
|
237
|
+
if (this.stamp < Number.MAX_SAFE_INTEGER - 1 || !this.has(Mode.IndependentUpdate))
|
|
238
|
+
throw new Error('reactronic can be configured only for elements with independent update mode and only inside initialize');
|
|
239
239
|
return RxSystem.getReaction(this.update).configure(options);
|
|
240
240
|
}
|
|
241
241
|
static get current() {
|
|
@@ -401,7 +401,7 @@ function updateIncrementally(owner, stamp, allChildren, items, priority) {
|
|
|
401
401
|
function triggerUpdateGivenSeat(seat) {
|
|
402
402
|
const node = seat.instance;
|
|
403
403
|
if (node.stamp >= 0) {
|
|
404
|
-
if (node.has(Mode.
|
|
404
|
+
if (node.has(Mode.IndependentUpdate)) {
|
|
405
405
|
if (node.stamp === Number.MAX_SAFE_INTEGER) {
|
|
406
406
|
Transaction.outside(() => {
|
|
407
407
|
if (RxSystem.isLogging)
|
|
@@ -474,7 +474,7 @@ function triggerFinalization(seat, isLeader, individual) {
|
|
|
474
474
|
const childrenAreLeaders = unobs(() => driver.finalize(el, isLeader));
|
|
475
475
|
el.native = null;
|
|
476
476
|
el.controller = null;
|
|
477
|
-
if (node.has(Mode.
|
|
477
|
+
if (node.has(Mode.IndependentUpdate)) {
|
|
478
478
|
seat.aux = undefined;
|
|
479
479
|
const last = gLastToDispose;
|
|
480
480
|
if (last)
|
|
@@ -18,6 +18,6 @@ export { Monitor } from './impl/Monitor.js';
|
|
|
18
18
|
export { Journal } from './impl/Journal.js';
|
|
19
19
|
export { RxSystem, raw, obs, transactional, reactive, cached, transaction, unobs, sensitive, options } from './RxSystem.js';
|
|
20
20
|
export { Mode, Priority } from './RxNode.js';
|
|
21
|
-
export type { Delegate, SimpleDelegate, RxNode, RxNodeDecl, RxNodeDriver, RxNodeContext } from './RxNode.js';
|
|
21
|
+
export type { Delegate, SimpleDelegate, RxElement, RxNode, RxNodeDecl, RxNodeDriver, RxNodeContext } from './RxNode.js';
|
|
22
22
|
export { RxTree, BaseDriver, RxNodeVariable } from './RxTree.js';
|
|
23
23
|
export { Clock } from './Clock.js';
|