reactronic 0.22.400 → 0.22.410

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.
@@ -1,6 +1,7 @@
1
1
  import { LoggingOptions } from './Logging';
2
2
  import { SeparationMode } from './impl/Data';
3
- export { LoggingOptions, ProfilingOptions, LoggingLevel } from './Logging';
3
+ export { LoggingLevel } from './Logging';
4
+ export type { LoggingOptions, ProfilingOptions } from './Logging';
4
5
  import { Journal } from './impl/Journal';
5
6
  import { Monitor } from './impl/Monitor';
6
7
  export interface SnapshotOptions {
@@ -1,12 +1,15 @@
1
1
  export { all, pause } from './util/Utils';
2
- export { Collection, Item, CollectionReader } from './util/Collection';
2
+ export { Collection } from './util/Collection';
3
+ export type { Item, CollectionReader } from './util/Collection';
3
4
  export { SealedArray } from './util/SealedArray';
4
5
  export { SealedMap } from './util/SealedMap';
5
6
  export { SealedSet } from './util/SealedSet';
6
- export { MemberOptions, SnapshotOptions, Kind, Reentrance, LoggingOptions, ProfilingOptions, LoggingLevel } from './Options';
7
- export { Worker } from './Worker';
7
+ export { Kind, Reentrance, LoggingLevel } from './Options';
8
+ export type { MemberOptions, SnapshotOptions, LoggingOptions, ProfilingOptions } from './Options';
9
+ export type { Worker } from './Worker';
8
10
  export { Controller } from './Controller';
9
- export { Ref, ToggleRef, BoolOnly, GivenTypeOnly } from './Ref';
11
+ export { Ref, ToggleRef } from './Ref';
12
+ export type { BoolOnly, GivenTypeOnly } from './Ref';
10
13
  export { TransactionalObject, ObservableObject } from './impl/Mvcc';
11
14
  export { TransactionalArray, ObservableArray } from './impl/MvccArray';
12
15
  export { TransactionalMap, ObservableMap } from './impl/MvccMap';
@@ -1,6 +1,6 @@
1
1
  import { MvccObject } from './Mvcc';
2
2
  export declare class MvccArray<T> extends MvccObject {
3
- private all;
3
+ private impl;
4
4
  constructor(isObservable: boolean, array: Array<T>);
5
5
  get length(): number;
6
6
  set length(n: number);
@@ -3,47 +3,47 @@ import { MvccObject } from './Mvcc';
3
3
  export class MvccArray extends MvccObject {
4
4
  constructor(isObservable, array) {
5
5
  super(isObservable);
6
- this.all = array;
6
+ this.impl = array;
7
7
  }
8
- get length() { return this.all.length; }
8
+ get length() { return this.impl.length; }
9
9
  set length(n) { this.mutable.length = n; }
10
- getItem(n) { return this.all[n]; }
10
+ getItem(n) { return this.impl[n]; }
11
11
  setItem(n, item) { this.mutable[n] = item; }
12
- toString() { return this.all.toString(); }
13
- toLocaleString() { return this.all.toLocaleString(); }
12
+ toString() { return this.impl.toString(); }
13
+ toLocaleString() { return this.impl.toLocaleString(); }
14
14
  pop() { return this.mutable.pop(); }
15
15
  push(...items) { return this.mutable.push(...items); }
16
- concat(...items) { return this.all.concat(...items); }
17
- join(separator) { return this.all.join(separator); }
16
+ concat(...items) { return this.impl.concat(...items); }
17
+ join(separator) { return this.impl.join(separator); }
18
18
  reverse() { return this.mutable.reverse(); }
19
19
  shift() { return this.mutable.shift(); }
20
- slice(start, end) { return this.all.slice(start, end); }
20
+ slice(start, end) { return this.impl.slice(start, end); }
21
21
  sort(compareFn) { this.mutable.sort(compareFn); return this; }
22
22
  splice(start, deleteCount, ...items) { return this.mutable.splice(start, deleteCount, ...items); }
23
23
  unshift(...items) { return this.mutable.unshift(...items); }
24
- includes(searchElement, fromIndex) { return this.all.includes(searchElement, fromIndex); }
25
- indexOf(searchElement, fromIndex) { return this.all.indexOf(searchElement, fromIndex); }
26
- lastIndexOf(searchElement, fromIndex) { return this.all.lastIndexOf(searchElement, fromIndex); }
27
- every(predicate, thisArg) { return this.all.every(predicate, thisArg); }
28
- some(predicate, thisArg) { return this.all.some(predicate, thisArg); }
29
- forEach(callbackfn, thisArg) { return this.all.forEach(callbackfn, thisArg); }
30
- map(callbackfn, thisArg) { return this.all.map(callbackfn, thisArg); }
31
- filter(predicate, thisArg) { return this.all.filter(predicate, thisArg); }
32
- reduce(callbackfn, initialValue) { return initialValue !== undefined ? this.all.reduce(callbackfn, initialValue) : this.all.reduce(callbackfn); }
33
- reduceRight(callbackfn, initialValue) { return initialValue !== undefined ? this.all.reduceRight(callbackfn, initialValue) : this.all.reduceRight(callbackfn); }
34
- find(predicate, thisArg) { return this.all.find(predicate, thisArg); }
35
- findIndex(predicate, thisArg) { return this.all.findIndex(predicate, thisArg); }
24
+ includes(searchElement, fromIndex) { return this.impl.includes(searchElement, fromIndex); }
25
+ indexOf(searchElement, fromIndex) { return this.impl.indexOf(searchElement, fromIndex); }
26
+ lastIndexOf(searchElement, fromIndex) { return this.impl.lastIndexOf(searchElement, fromIndex); }
27
+ every(predicate, thisArg) { return this.impl.every(predicate, thisArg); }
28
+ some(predicate, thisArg) { return this.impl.some(predicate, thisArg); }
29
+ forEach(callbackfn, thisArg) { return this.impl.forEach(callbackfn, thisArg); }
30
+ map(callbackfn, thisArg) { return this.impl.map(callbackfn, thisArg); }
31
+ filter(predicate, thisArg) { return this.impl.filter(predicate, thisArg); }
32
+ reduce(callbackfn, initialValue) { return initialValue !== undefined ? this.impl.reduce(callbackfn, initialValue) : this.impl.reduce(callbackfn); }
33
+ reduceRight(callbackfn, initialValue) { return initialValue !== undefined ? this.impl.reduceRight(callbackfn, initialValue) : this.impl.reduceRight(callbackfn); }
34
+ find(predicate, thisArg) { return this.impl.find(predicate, thisArg); }
35
+ findIndex(predicate, thisArg) { return this.impl.findIndex(predicate, thisArg); }
36
36
  fill(value, start, end) { this.mutable.fill(value, start, end); return this; }
37
37
  copyWithin(target, start, end) { this.mutable.copyWithin(target, start, end); return this; }
38
- [Symbol.iterator]() { return this.all[Symbol.iterator](); }
39
- entries() { return this.all.entries(); }
40
- keys() { return this.all.keys(); }
41
- values() { return this.all.values(); }
38
+ [Symbol.iterator]() { return this.impl[Symbol.iterator](); }
39
+ entries() { return this.impl.entries(); }
40
+ keys() { return this.impl.keys(); }
41
+ values() { return this.impl.values(); }
42
42
  get mutable() {
43
- const createCopy = this.all[Sealant.CreateCopy];
43
+ const createCopy = this.impl[Sealant.CreateCopy];
44
44
  if (createCopy)
45
- return this.all = createCopy.call(this.all);
46
- return this.all;
45
+ return this.impl = createCopy.call(this.impl);
46
+ return this.impl;
47
47
  }
48
48
  }
49
49
  export class TransactionalArray extends MvccArray {
@@ -1,7 +1,7 @@
1
1
  import { Collection, Item, CollectionReader } from '../util/Collection';
2
2
  import { ObservableObject } from './Mvcc';
3
3
  export declare abstract class ObservableCollection<T> extends ObservableObject implements CollectionReader<T> {
4
- protected abstract a: Collection<T>;
4
+ protected abstract impl: Collection<T>;
5
5
  get strict(): boolean;
6
6
  get count(): number;
7
7
  get addedCount(): number;
@@ -1,23 +1,23 @@
1
1
  import { ObservableObject } from './Mvcc';
2
2
  export class ObservableCollection extends ObservableObject {
3
- get strict() { return this.a.strict; }
4
- get count() { return this.a.count; }
5
- get addedCount() { return this.a.addedCount; }
6
- get removedCount() { return this.a.removedCount; }
7
- get isMergeInProgress() { return this.a.isMergeInProgress; }
8
- lookup(key) { return this.a.lookup(key); }
9
- claim(key) { return this.a.claim(key); }
10
- add(self) { return this.a.add(self); }
11
- remove(item) { return this.a.remove(item); }
12
- move(item, after) { this.a.move(item, after); }
13
- beginMerge() { this.a.beginMerge(); }
14
- endMerge(error) { this.a.endMerge(error); }
15
- resetAddedAndRemovedLists() { this.a.resetAddedAndRemovedLists(); }
16
- items() { return this.a.items(); }
17
- addedItems(reset) { return this.a.addedItems(reset); }
18
- removedItems(reset) { return this.a.removedItems(reset); }
19
- isAdded(item) { return this.a.isAdded(item); }
20
- isMoved(item) { return this.a.isMoved(item); }
21
- isRemoved(item) { return this.a.isRemoved(item); }
22
- isCurrent(item) { return this.a.isCurrent(item); }
3
+ get strict() { return this.impl.strict; }
4
+ get count() { return this.impl.count; }
5
+ get addedCount() { return this.impl.addedCount; }
6
+ get removedCount() { return this.impl.removedCount; }
7
+ get isMergeInProgress() { return this.impl.isMergeInProgress; }
8
+ lookup(key) { return this.impl.lookup(key); }
9
+ claim(key) { return this.impl.claim(key); }
10
+ add(self) { return this.impl.add(self); }
11
+ remove(item) { return this.impl.remove(item); }
12
+ move(item, after) { this.impl.move(item, after); }
13
+ beginMerge() { this.impl.beginMerge(); }
14
+ endMerge(error) { this.impl.endMerge(error); }
15
+ resetAddedAndRemovedLists() { this.impl.resetAddedAndRemovedLists(); }
16
+ items() { return this.impl.items(); }
17
+ addedItems(reset) { return this.impl.addedItems(reset); }
18
+ removedItems(reset) { return this.impl.removedItems(reset); }
19
+ isAdded(item) { return this.impl.isAdded(item); }
20
+ isMoved(item) { return this.impl.isMoved(item); }
21
+ isRemoved(item) { return this.impl.isRemoved(item); }
22
+ isCurrent(item) { return this.impl.isCurrent(item); }
23
23
  }
@@ -1,6 +1,6 @@
1
1
  import { MvccObject } from './Mvcc';
2
2
  export declare class MvccMap<K, V> extends MvccObject {
3
- private all;
3
+ private impl;
4
4
  constructor(isObservable: boolean, map: Map<K, V>);
5
5
  clear(): void;
6
6
  delete(key: K): boolean;
@@ -3,29 +3,29 @@ import { MvccObject } from './Mvcc';
3
3
  export class MvccMap extends MvccObject {
4
4
  constructor(isObservable, map) {
5
5
  super(isObservable);
6
- this.all = map;
6
+ this.impl = map;
7
7
  }
8
8
  clear() { this.mutable.clear(); }
9
9
  delete(key) { return this.mutable.delete(key); }
10
- forEach(callbackfn, thisArg) { this.all.forEach(callbackfn, thisArg); }
11
- get(key) { return this.all.get(key); }
12
- has(key) { return this.all.has(key); }
10
+ forEach(callbackfn, thisArg) { this.impl.forEach(callbackfn, thisArg); }
11
+ get(key) { return this.impl.get(key); }
12
+ has(key) { return this.impl.has(key); }
13
13
  set(key, value) { this.mutable.set(key, value); return this; }
14
- get size() { return this.all.size; }
15
- entries() { return this.all.entries(); }
16
- keys() { return this.all.keys(); }
17
- values() { return this.all.values(); }
18
- [Symbol.toStringTag]() { return this.all[Symbol.toStringTag]; }
14
+ get size() { return this.impl.size; }
15
+ entries() { return this.impl.entries(); }
16
+ keys() { return this.impl.keys(); }
17
+ values() { return this.impl.values(); }
18
+ [Symbol.toStringTag]() { return this.impl[Symbol.toStringTag]; }
19
19
  get mutable() {
20
- const createCopy = this.all[Sealant.CreateCopy];
20
+ const createCopy = this.impl[Sealant.CreateCopy];
21
21
  if (createCopy)
22
- return this.all = createCopy.call(this.all);
23
- return this.all;
22
+ return this.impl = createCopy.call(this.impl);
23
+ return this.impl;
24
24
  }
25
25
  }
26
26
  export class TransactionalMap extends MvccMap {
27
27
  constructor(args) {
28
- super(true, args !== undefined ? new Map(args) : new Map());
28
+ super(false, args !== undefined ? new Map(args) : new Map());
29
29
  }
30
30
  }
31
31
  export class ObservableMap extends MvccMap {
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "reactronic",
3
- "version": "0.22.400",
3
+ "version": "0.22.410",
4
4
  "description": "Reactronic - Transactional Reactive State Management",
5
+ "icon": "reactronic.png",
5
6
  "type": "module",
6
7
  "main": "build/dist/source/api.js",
7
8
  "types": "build/dist/source/api.d.ts",