reactronic 0.24.103 → 0.24.104
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/build/dist/source/Clock.js +1 -1
- package/build/dist/source/Reaction.js +1 -1
- package/build/dist/source/Ref.js +1 -1
- package/build/dist/source/{Rx.d.ts → RxSystem.d.ts} +1 -1
- package/build/dist/source/{Rx.js → RxSystem.js} +2 -2
- package/build/dist/source/{RxNodeImpl.js → RxTree.js} +7 -7
- package/build/dist/source/api.d.ts +2 -2
- package/build/dist/source/api.js +2 -2
- package/package.json +1 -1
- /package/build/dist/source/{RxNodeImpl.d.ts → RxTree.d.ts} +0 -0
|
@@ -8,7 +8,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
8
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
9
|
};
|
|
10
10
|
import { ObservableObject } from './impl/Mvcc.js';
|
|
11
|
-
import { transactional } from './
|
|
11
|
+
import { transactional } from './RxSystem.js';
|
|
12
12
|
export class Clock extends ObservableObject {
|
|
13
13
|
constructor(interval = 1000) {
|
|
14
14
|
super();
|
|
@@ -8,7 +8,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
8
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
9
|
};
|
|
10
10
|
import { ObservableObject } from './impl/Mvcc.js';
|
|
11
|
-
import { reactive } from './
|
|
11
|
+
import { reactive } from './RxSystem.js';
|
|
12
12
|
export class Reaction extends ObservableObject {
|
|
13
13
|
constructor(action) {
|
|
14
14
|
super();
|
package/build/dist/source/Ref.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { F } from './util/Utils.js';
|
|
2
2
|
import { AbstractReaction, MemberOptions, LoggingOptions, ProfilingOptions } from './Options.js';
|
|
3
|
-
export declare class
|
|
3
|
+
export declare class RxSystem {
|
|
4
4
|
static why(brief?: boolean): string;
|
|
5
5
|
static getReaction<T>(method: F<T>): AbstractReaction<T>;
|
|
6
6
|
static pullLastResult<T>(method: F<Promise<T>>, args?: any[]): T | undefined;
|
|
@@ -5,10 +5,10 @@ import { Changeset } from './impl/Changeset.js';
|
|
|
5
5
|
import { Mvcc } from './impl/Mvcc.js';
|
|
6
6
|
import { Transaction } from './impl/Transaction.js';
|
|
7
7
|
import { ReactionImpl } from './impl/Reaction.js';
|
|
8
|
-
export class
|
|
8
|
+
export class RxSystem {
|
|
9
9
|
static why(brief = false) { return brief ? ReactionImpl.briefWhy() : ReactionImpl.why(); }
|
|
10
10
|
static getReaction(method) { return ReactionImpl.getControllerOf(method); }
|
|
11
|
-
static pullLastResult(method, args) { return
|
|
11
|
+
static pullLastResult(method, args) { return RxSystem.getReaction(method).pullLastResult(args); }
|
|
12
12
|
static configureCurrentOperation(options) { return ReactionImpl.configureImpl(undefined, options); }
|
|
13
13
|
static getRevisionOf(obj) { return obj[Meta.Revision]; }
|
|
14
14
|
static takeSnapshot(obj) { return Changeset.takeSnapshot(obj); }
|
|
@@ -22,7 +22,7 @@ import { emitLetters, getCallerInfo } from './util/RxNodeUtils.js';
|
|
|
22
22
|
import { Reentrance } from './Options.js';
|
|
23
23
|
import { ObservableObject } from './impl/Mvcc.js';
|
|
24
24
|
import { Transaction } from './impl/Transaction.js';
|
|
25
|
-
import {
|
|
25
|
+
import { RxSystem, options, raw, reactive, unobs } from './RxSystem.js';
|
|
26
26
|
export class RxTree {
|
|
27
27
|
static declare(driver, declaration, preset) {
|
|
28
28
|
var _a;
|
|
@@ -147,7 +147,7 @@ function generateKey(owner) {
|
|
|
147
147
|
const n = owner.numerator++;
|
|
148
148
|
const lettered = emitLetters(n);
|
|
149
149
|
let result;
|
|
150
|
-
if (
|
|
150
|
+
if (RxSystem.isLogging)
|
|
151
151
|
result = `·${getCallerInfo(lettered)}`;
|
|
152
152
|
else
|
|
153
153
|
result = `·${lettered}`;
|
|
@@ -247,7 +247,7 @@ class RxNodeImpl {
|
|
|
247
247
|
configureReactronic(options) {
|
|
248
248
|
if (this.stamp < Number.MAX_SAFE_INTEGER - 1 || !this.has(Mode.PinpointUpdate))
|
|
249
249
|
throw new Error('reactronic can be configured only for elements with pinpoint update mode and only inside initialize');
|
|
250
|
-
return
|
|
250
|
+
return RxSystem.getReaction(this.update).configure(options);
|
|
251
251
|
}
|
|
252
252
|
static get current() {
|
|
253
253
|
if (!gCurrent)
|
|
@@ -415,9 +415,9 @@ function triggerUpdate(slot) {
|
|
|
415
415
|
if (node.has(Mode.PinpointUpdate)) {
|
|
416
416
|
if (node.stamp === Number.MAX_SAFE_INTEGER) {
|
|
417
417
|
Transaction.outside(() => {
|
|
418
|
-
if (
|
|
419
|
-
|
|
420
|
-
|
|
418
|
+
if (RxSystem.isLogging)
|
|
419
|
+
RxSystem.setLoggingHint(node.element, node.key);
|
|
420
|
+
RxSystem.getReaction(node.update).configure({
|
|
421
421
|
order: node.level,
|
|
422
422
|
});
|
|
423
423
|
});
|
|
@@ -511,7 +511,7 @@ function runDisposalLoop() {
|
|
|
511
511
|
while (slot !== undefined) {
|
|
512
512
|
if (Transaction.isFrameOver(500, 5))
|
|
513
513
|
yield Transaction.requestNextFrame();
|
|
514
|
-
|
|
514
|
+
RxSystem.dispose(slot.instance);
|
|
515
515
|
slot = slot.aux;
|
|
516
516
|
RxNodeImpl.disposableNodeCount--;
|
|
517
517
|
}
|
|
@@ -16,8 +16,8 @@ export { Changeset } from './impl/Changeset.js';
|
|
|
16
16
|
export { Transaction } from './impl/Transaction.js';
|
|
17
17
|
export { Monitor } from './impl/Monitor.js';
|
|
18
18
|
export { Journal } from './impl/Journal.js';
|
|
19
|
-
export { Rx, raw, obs, transactional, reactive, cached, transaction, unobs, sensitive, options } from './
|
|
19
|
+
export { RxSystem as Rx, raw, obs, transactional, reactive, cached, transaction, unobs, sensitive, options } from './RxSystem.js';
|
|
20
20
|
export { Mode, Priority } from './RxNode.js';
|
|
21
21
|
export type { Delegate, SimpleDelegate, RxNode, RxNodeDecl, RxNodeDriver, RxNodeContext } from './RxNode.js';
|
|
22
|
-
export { RxTree, BaseDriver, RxNodeVariable } from './
|
|
22
|
+
export { RxTree, BaseDriver, RxNodeVariable } from './RxTree.js';
|
|
23
23
|
export { Clock } from './Clock.js';
|
package/build/dist/source/api.js
CHANGED
|
@@ -12,7 +12,7 @@ export { Changeset } from './impl/Changeset.js';
|
|
|
12
12
|
export { Transaction } from './impl/Transaction.js';
|
|
13
13
|
export { Monitor } from './impl/Monitor.js';
|
|
14
14
|
export { Journal } from './impl/Journal.js';
|
|
15
|
-
export { Rx, raw, obs, transactional, reactive, cached, transaction, unobs, sensitive, options } from './
|
|
15
|
+
export { RxSystem as Rx, raw, obs, transactional, reactive, cached, transaction, unobs, sensitive, options } from './RxSystem.js';
|
|
16
16
|
export { Mode, Priority } from './RxNode.js';
|
|
17
|
-
export { RxTree, BaseDriver, RxNodeVariable } from './
|
|
17
|
+
export { RxTree, BaseDriver, RxNodeVariable } from './RxTree.js';
|
|
18
18
|
export { Clock } from './Clock.js';
|
package/package.json
CHANGED
|
File without changes
|