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.
@@ -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 './Rx.js';
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 './Rx.js';
11
+ import { reactive } from './RxSystem.js';
12
12
  export class Reaction extends ObservableObject {
13
13
  constructor(action) {
14
14
  super();
@@ -1,5 +1,5 @@
1
1
  import { Transaction } from './impl/Transaction.js';
2
- import { unobs } from './Rx.js';
2
+ import { unobs } from './RxSystem.js';
3
3
  export function refs(owner) {
4
4
  return new Proxy(owner, RefGettingProxy);
5
5
  }
@@ -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 Rx {
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 Rx {
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 Rx.getReaction(method).pullLastResult(args); }
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 { Rx, options, raw, reactive, unobs } from './Rx.js';
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 (Rx.isLogging)
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 Rx.getReaction(this.update).configure(options);
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 (Rx.isLogging)
419
- Rx.setLoggingHint(node.element, node.key);
420
- Rx.getReaction(node.update).configure({
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
- Rx.dispose(slot.instance);
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 './Rx.js';
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 './RxNodeImpl.js';
22
+ export { RxTree, BaseDriver, RxNodeVariable } from './RxTree.js';
23
23
  export { Clock } from './Clock.js';
@@ -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 './Rx.js';
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 './RxNodeImpl.js';
17
+ export { RxTree, BaseDriver, RxNodeVariable } from './RxTree.js';
18
18
  export { Clock } from './Clock.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "reactronic",
3
- "version": "0.24.103",
3
+ "version": "0.24.104",
4
4
  "description": "Reactronic - Transactional Reactive State Management",
5
5
  "publisher": "Nezaboodka Software",
6
6
  "license": "Apache-2.0",