reactronic 0.22.400 → 0.22.411
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/Options.d.ts +2 -1
- package/build/dist/source/api.d.ts +7 -4
- package/build/dist/source/impl/MvccArray.d.ts +1 -1
- package/build/dist/source/impl/MvccArray.js +27 -27
- package/build/dist/source/impl/MvccCollection.d.ts +1 -1
- package/build/dist/source/impl/MvccCollection.js +20 -20
- package/build/dist/source/impl/MvccMap.d.ts +1 -1
- package/build/dist/source/impl/MvccMap.js +13 -13
- package/package.json +4 -3
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { LoggingOptions } from './Logging';
|
|
2
2
|
import { SeparationMode } from './impl/Data';
|
|
3
|
-
export {
|
|
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
|
|
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 {
|
|
7
|
-
export {
|
|
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
|
|
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';
|
|
@@ -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.
|
|
6
|
+
this.impl = array;
|
|
7
7
|
}
|
|
8
|
-
get length() { return this.
|
|
8
|
+
get length() { return this.impl.length; }
|
|
9
9
|
set length(n) { this.mutable.length = n; }
|
|
10
|
-
getItem(n) { return this.
|
|
10
|
+
getItem(n) { return this.impl[n]; }
|
|
11
11
|
setItem(n, item) { this.mutable[n] = item; }
|
|
12
|
-
toString() { return this.
|
|
13
|
-
toLocaleString() { return this.
|
|
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.
|
|
17
|
-
join(separator) { return this.
|
|
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.
|
|
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.
|
|
25
|
-
indexOf(searchElement, fromIndex) { return this.
|
|
26
|
-
lastIndexOf(searchElement, fromIndex) { return this.
|
|
27
|
-
every(predicate, thisArg) { return this.
|
|
28
|
-
some(predicate, thisArg) { return this.
|
|
29
|
-
forEach(callbackfn, thisArg) { return this.
|
|
30
|
-
map(callbackfn, thisArg) { return this.
|
|
31
|
-
filter(predicate, thisArg) { return this.
|
|
32
|
-
reduce(callbackfn, initialValue) { return initialValue !== undefined ? this.
|
|
33
|
-
reduceRight(callbackfn, initialValue) { return initialValue !== undefined ? this.
|
|
34
|
-
find(predicate, thisArg) { return this.
|
|
35
|
-
findIndex(predicate, thisArg) { return this.
|
|
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.
|
|
39
|
-
entries() { return this.
|
|
40
|
-
keys() { return this.
|
|
41
|
-
values() { return this.
|
|
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.
|
|
43
|
+
const createCopy = this.impl[Sealant.CreateCopy];
|
|
44
44
|
if (createCopy)
|
|
45
|
-
return this.
|
|
46
|
-
return this.
|
|
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
|
|
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.
|
|
4
|
-
get count() { return this.
|
|
5
|
-
get addedCount() { return this.
|
|
6
|
-
get removedCount() { return this.
|
|
7
|
-
get isMergeInProgress() { return this.
|
|
8
|
-
lookup(key) { return this.
|
|
9
|
-
claim(key) { return this.
|
|
10
|
-
add(self) { return this.
|
|
11
|
-
remove(item) { return this.
|
|
12
|
-
move(item, after) { this.
|
|
13
|
-
beginMerge() { this.
|
|
14
|
-
endMerge(error) { this.
|
|
15
|
-
resetAddedAndRemovedLists() { this.
|
|
16
|
-
items() { return this.
|
|
17
|
-
addedItems(reset) { return this.
|
|
18
|
-
removedItems(reset) { return this.
|
|
19
|
-
isAdded(item) { return this.
|
|
20
|
-
isMoved(item) { return this.
|
|
21
|
-
isRemoved(item) { return this.
|
|
22
|
-
isCurrent(item) { return this.
|
|
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
|
}
|
|
@@ -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.
|
|
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.
|
|
11
|
-
get(key) { return this.
|
|
12
|
-
has(key) { return this.
|
|
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.
|
|
15
|
-
entries() { return this.
|
|
16
|
-
keys() { return this.
|
|
17
|
-
values() { return this.
|
|
18
|
-
[Symbol.toStringTag]() { return this.
|
|
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.
|
|
20
|
+
const createCopy = this.impl[Sealant.CreateCopy];
|
|
21
21
|
if (createCopy)
|
|
22
|
-
return this.
|
|
23
|
-
return this.
|
|
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(
|
|
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,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "reactronic",
|
|
3
|
-
"version": "0.22.
|
|
3
|
+
"version": "0.22.411",
|
|
4
4
|
"description": "Reactronic - Transactional Reactive State Management",
|
|
5
|
+
"publisher": "Nezaboodka Software",
|
|
6
|
+
"license": "Apache-2.0",
|
|
7
|
+
"icon": "reactronic.png",
|
|
5
8
|
"type": "module",
|
|
6
9
|
"main": "build/dist/source/api.js",
|
|
7
10
|
"types": "build/dist/source/api.d.ts",
|
|
@@ -23,8 +26,6 @@
|
|
|
23
26
|
"transactional",
|
|
24
27
|
"asynchronous"
|
|
25
28
|
],
|
|
26
|
-
"author": "Yury Chetyrko <ychetyrko@gmail.com> (https://github.com/ychetyrko)",
|
|
27
|
-
"license": "Apache-2.0",
|
|
28
29
|
"bugs": {
|
|
29
30
|
"url": "https://github.com/nezaboodka/reactronic/issues"
|
|
30
31
|
},
|