@dra2020/baseclient 1.0.127 → 1.0.129
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/dist/baseclient.js +116 -312
- package/dist/baseclient.js.map +1 -1
- package/dist/colors/jscolormapsdata.d.ts +1 -1
- package/dist/context/context.d.ts +1 -1
- package/dist/fsm/fsm.d.ts +3 -3
- package/dist/geo/geo.d.ts +8 -8
- package/dist/geo/multiblockmapping.d.ts +2 -2
- package/dist/ot-js/otarray.d.ts +2 -2
- package/dist/ot-js/otcounter.d.ts +1 -1
- package/dist/ot-js/otmap.d.ts +1 -1
- package/dist/ot-js/otsession.d.ts +9 -5
- package/dist/poly/matrix.d.ts +5 -5
- package/dist/poly/polypack.d.ts +3 -3
- package/dist/poly/simplify.d.ts +1 -1
- package/dist/poly/topo.d.ts +2 -2
- package/dist/util/bintrie.d.ts +3 -3
- package/dist/util/gradient.d.ts +1 -1
- package/dist/util/util.d.ts +1 -1
- package/docs/fsm.md +22 -0
- package/lib/ot-js/otsession.ts +6 -2
- package/package.json +1 -1
package/dist/fsm/fsm.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export declare const FSM_CUSTOM6: number;
|
|
|
14
14
|
export declare const FSM_CUSTOM7: number;
|
|
15
15
|
export declare const FSM_CUSTOM8: number;
|
|
16
16
|
export declare const FSM_CUSTOM9: number;
|
|
17
|
-
export type FsmIndex = Set<Fsm>;
|
|
17
|
+
export declare type FsmIndex = Set<Fsm>;
|
|
18
18
|
export declare class FsmManager {
|
|
19
19
|
theId: number;
|
|
20
20
|
theEpoch: number;
|
|
@@ -68,7 +68,7 @@ export declare class FsmSleep extends Fsm {
|
|
|
68
68
|
constructor(env: FsmEnvironment, delay: number);
|
|
69
69
|
tick(): void;
|
|
70
70
|
}
|
|
71
|
-
export type SerializerIndex = {
|
|
71
|
+
export declare type SerializerIndex = {
|
|
72
72
|
[key: string]: Fsm;
|
|
73
73
|
};
|
|
74
74
|
export declare class FsmSerializer extends Fsm {
|
|
@@ -77,7 +77,7 @@ export declare class FsmSerializer extends Fsm {
|
|
|
77
77
|
serialize(id: string, fsm?: Fsm): Fsm;
|
|
78
78
|
tick(): void;
|
|
79
79
|
}
|
|
80
|
-
type FsmArrayMap = {
|
|
80
|
+
declare type FsmArrayMap = {
|
|
81
81
|
[key: string]: Fsm[];
|
|
82
82
|
};
|
|
83
83
|
export declare class FsmTracker {
|
package/dist/geo/geo.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import * as geojson from 'geojson';
|
|
2
2
|
import * as Poly from '../poly/all';
|
|
3
|
-
export type GeoProperties = geojson.GeoJsonProperties;
|
|
4
|
-
export type GeoFeature = geojson.Feature;
|
|
5
|
-
export type GeoFeatureArray = GeoFeature[];
|
|
6
|
-
export type GeoFeatureCollection = geojson.FeatureCollection;
|
|
7
|
-
export type GeoCentroidMap = {
|
|
3
|
+
export declare type GeoProperties = geojson.GeoJsonProperties;
|
|
4
|
+
export declare type GeoFeature = geojson.Feature;
|
|
5
|
+
export declare type GeoFeatureArray = GeoFeature[];
|
|
6
|
+
export declare type GeoFeatureCollection = geojson.FeatureCollection;
|
|
7
|
+
export declare type GeoCentroidMap = {
|
|
8
8
|
[geoid: string]: {
|
|
9
9
|
x: number;
|
|
10
10
|
y: number;
|
|
11
11
|
};
|
|
12
12
|
};
|
|
13
|
-
export type HideMap = {
|
|
13
|
+
export declare type HideMap = {
|
|
14
14
|
[id: string]: boolean;
|
|
15
15
|
};
|
|
16
16
|
export declare function dumpMetrics(): void;
|
|
@@ -33,14 +33,14 @@ export declare function geoTopoToCollectionNonNull(topo: Poly.Topo): GeoFeatureC
|
|
|
33
33
|
export interface GeoFeatureMap {
|
|
34
34
|
[id: string]: GeoFeature;
|
|
35
35
|
}
|
|
36
|
-
export type FeatureFunc = (f: GeoFeature) => void;
|
|
36
|
+
export declare type FeatureFunc = (f: GeoFeature) => void;
|
|
37
37
|
interface GeoEntry {
|
|
38
38
|
tag: string;
|
|
39
39
|
col?: GeoFeatureCollection;
|
|
40
40
|
map?: GeoFeatureMap;
|
|
41
41
|
topo?: Poly.Topo;
|
|
42
42
|
}
|
|
43
|
-
type GeoEntryMap = {
|
|
43
|
+
declare type GeoEntryMap = {
|
|
44
44
|
[tag: string]: GeoEntry;
|
|
45
45
|
};
|
|
46
46
|
export declare function geoEqual(m1: GeoMultiCollection, m2: GeoMultiCollection): boolean;
|
package/dist/ot-js/otarray.d.ts
CHANGED
|
@@ -5,8 +5,8 @@ export declare const OpRetain: number;
|
|
|
5
5
|
export declare const OpCursor: number;
|
|
6
6
|
export declare const OpSet: number;
|
|
7
7
|
export declare const OpTmpRetain: number;
|
|
8
|
-
export type OTSingleArrayEdit = [number, number, any];
|
|
9
|
-
export type OTEdits = OTSingleArrayEdit[];
|
|
8
|
+
export declare type OTSingleArrayEdit = [number, number, any];
|
|
9
|
+
export declare type OTEdits = OTSingleArrayEdit[];
|
|
10
10
|
declare enum OTalignEdgesType {
|
|
11
11
|
AlignForCompose = 0,
|
|
12
12
|
AlignForTransform = 1
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as OT from "./ottypes";
|
|
2
2
|
export declare const OpCounterAdd = 1;
|
|
3
3
|
export declare const OpCounterDel = 2;
|
|
4
|
-
export type CounterEdit = [number, string, any];
|
|
4
|
+
export declare type CounterEdit = [number, string, any];
|
|
5
5
|
export declare class OTCounterResource extends OT.OTResourceBase {
|
|
6
6
|
constructor(rid: string);
|
|
7
7
|
static factory(rid: string): OTCounterResource;
|
package/dist/ot-js/otmap.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as OT from './ottypes';
|
|
2
2
|
export declare const OpMapSet = 1;
|
|
3
3
|
export declare const OpMapDel = 2;
|
|
4
|
-
export type MapEdit = [number, string, any];
|
|
4
|
+
export declare type MapEdit = [number, string, any];
|
|
5
5
|
export declare class OTMapResource extends OT.OTResourceBase {
|
|
6
6
|
constructor(rid: string);
|
|
7
7
|
static factory(rid: string): OTMapResource;
|
|
@@ -21,9 +21,13 @@ export declare const FilterTrash: number;
|
|
|
21
21
|
export declare const FilterPublic: number;
|
|
22
22
|
export declare const FilterOfficial: number;
|
|
23
23
|
export declare const FilterCOI: number;
|
|
24
|
+
export declare const FilterMyGroupMaps: number;
|
|
24
25
|
export declare const FilterMyGroups: number;
|
|
26
|
+
export declare const FilterMyDatasets: number;
|
|
27
|
+
export declare const FilterPublicDatasets: number;
|
|
28
|
+
export declare const FilterMyGroupDatasets: number;
|
|
25
29
|
export declare const FilterCount: number;
|
|
26
|
-
export type Filter = number;
|
|
30
|
+
export declare type Filter = number;
|
|
27
31
|
export declare const PermNone: number;
|
|
28
32
|
export declare const PermRead: number;
|
|
29
33
|
export declare const PermWrite: number;
|
|
@@ -32,10 +36,10 @@ export declare const PermAdmin: number;
|
|
|
32
36
|
export declare const PermVersion: number;
|
|
33
37
|
export declare const PermEdit: number;
|
|
34
38
|
export declare const PermAll: number;
|
|
35
|
-
export type Permission = number;
|
|
39
|
+
export declare type Permission = number;
|
|
36
40
|
export declare const ServerStateRunning: number;
|
|
37
41
|
export declare const ServerStateMaintenance: number;
|
|
38
|
-
export type ServerState = number;
|
|
42
|
+
export declare type ServerState = number;
|
|
39
43
|
export interface AccessSessionMap {
|
|
40
44
|
[key: string]: string;
|
|
41
45
|
}
|
|
@@ -52,7 +56,7 @@ export interface Revision {
|
|
|
52
56
|
label?: string;
|
|
53
57
|
editcache?: string;
|
|
54
58
|
}
|
|
55
|
-
export type RevisionList = Revision[];
|
|
59
|
+
export declare type RevisionList = Revision[];
|
|
56
60
|
export interface SessionUser {
|
|
57
61
|
id: string;
|
|
58
62
|
name: string;
|
|
@@ -101,7 +105,7 @@ export interface SessionProps {
|
|
|
101
105
|
xid?: string;
|
|
102
106
|
colors?: string;
|
|
103
107
|
}
|
|
104
|
-
export type LabelUpdate = {
|
|
108
|
+
export declare type LabelUpdate = {
|
|
105
109
|
[name: string]: boolean | null;
|
|
106
110
|
};
|
|
107
111
|
export interface SessionUpdateProps {
|
package/dist/poly/matrix.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export type Matrix = number[][];
|
|
2
|
-
export type Vector = number[];
|
|
3
|
-
export type Range = number[];
|
|
4
|
-
export type Index = number[][];
|
|
5
|
-
export type applyCB = (v: Vector) => number;
|
|
1
|
+
export declare type Matrix = number[][];
|
|
2
|
+
export declare type Vector = number[];
|
|
3
|
+
export declare type Range = number[];
|
|
4
|
+
export declare type Index = number[][];
|
|
5
|
+
export declare type applyCB = (v: Vector) => number;
|
|
6
6
|
export declare const enum Dim {
|
|
7
7
|
Rows = 0,
|
|
8
8
|
Columns = 1
|
package/dist/poly/polypack.d.ts
CHANGED
|
@@ -4,8 +4,8 @@ export interface PolyPack {
|
|
|
4
4
|
buffer: any;
|
|
5
5
|
}
|
|
6
6
|
export declare function polyPackSize(coords: any): number;
|
|
7
|
-
type EachRingCB = (buffer: Float64Array, iPoly: number, iRing: number, iOffset: number, nPoints: number) => void;
|
|
8
|
-
type EachPointCB = (buffer: Float64Array, iPoly: number, iRing: number, iOffset: number) => void;
|
|
7
|
+
declare type EachRingCB = (buffer: Float64Array, iPoly: number, iRing: number, iOffset: number, nPoints: number) => void;
|
|
8
|
+
declare type EachPointCB = (buffer: Float64Array, iPoly: number, iRing: number, iOffset: number) => void;
|
|
9
9
|
export declare function polyPackEachRing(pack: PolyPack, cb: EachRingCB): void;
|
|
10
10
|
export declare function polyPackEachPoint(pack: PolyPack, cb: EachPointCB): void;
|
|
11
11
|
export declare function polyPackCountPoints(pack: PolyPack): number;
|
|
@@ -22,7 +22,7 @@ export declare function polyUnpack(prepack: any): any;
|
|
|
22
22
|
export declare function featurePackSize(f: any): number;
|
|
23
23
|
export declare function featurePack(f: any, prepack?: PolyPack): any;
|
|
24
24
|
export declare function featureUnpack(f: any): any;
|
|
25
|
-
export type SavePack = WeakMap<any, any>;
|
|
25
|
+
export declare type SavePack = WeakMap<any, any>;
|
|
26
26
|
export declare function featureUnpackTemporarily(f: any, save?: SavePack): SavePack;
|
|
27
27
|
export declare function featureRepack(f: any, save: SavePack): any;
|
|
28
28
|
export declare function featurePackString(f: any): string;
|
package/dist/poly/simplify.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type Point = [number, number];
|
|
1
|
+
export declare type Point = [number, number];
|
|
2
2
|
export declare function simplify(points: Point[], tolerance?: number, highestQuality?: boolean): Point[];
|
package/dist/poly/topo.d.ts
CHANGED
|
@@ -2,11 +2,11 @@ import * as FSM from '../fsm/all';
|
|
|
2
2
|
import * as G from '../geo/all';
|
|
3
3
|
import * as P from './poly';
|
|
4
4
|
import * as Q from './quad';
|
|
5
|
-
export type Topo = any;
|
|
5
|
+
export declare type Topo = any;
|
|
6
6
|
export declare function topoFromCollection(col: any): Topo;
|
|
7
7
|
export declare function topoContiguity(topo: Topo): any;
|
|
8
8
|
export declare function topoToFeature(topo: Topo, geoid: string): any;
|
|
9
|
-
export type TopoSpliceEntry = {
|
|
9
|
+
export declare type TopoSpliceEntry = {
|
|
10
10
|
topology: Topo;
|
|
11
11
|
filterout?: any;
|
|
12
12
|
};
|
package/dist/util/bintrie.d.ts
CHANGED
|
@@ -15,10 +15,10 @@ interface Fragment {
|
|
|
15
15
|
s: string;
|
|
16
16
|
u8?: Uint8Array;
|
|
17
17
|
}
|
|
18
|
-
type FragmentTable = {
|
|
18
|
+
declare type FragmentTable = {
|
|
19
19
|
[frag: string]: Fragment;
|
|
20
20
|
};
|
|
21
|
-
type FragmentPair = {
|
|
21
|
+
declare type FragmentPair = {
|
|
22
22
|
f1: Fragment;
|
|
23
23
|
f2: Fragment;
|
|
24
24
|
offset?: number;
|
|
@@ -51,7 +51,7 @@ declare class ValueTableBuilder {
|
|
|
51
51
|
toOffset(s: string): number;
|
|
52
52
|
toBinary(): void;
|
|
53
53
|
}
|
|
54
|
-
export type StringMap = {
|
|
54
|
+
export declare type StringMap = {
|
|
55
55
|
[key: string]: string;
|
|
56
56
|
};
|
|
57
57
|
interface UnpackedNode {
|
package/dist/util/gradient.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export interface Stop {
|
|
|
8
8
|
stop: number;
|
|
9
9
|
rgb?: RGB;
|
|
10
10
|
}
|
|
11
|
-
export type GradientStops = Stop[];
|
|
11
|
+
export declare type GradientStops = Stop[];
|
|
12
12
|
export declare function execGradient(stops: GradientStops, value: number): string;
|
|
13
13
|
export declare function parseGradient(sStops: string): GradientStops;
|
|
14
14
|
export declare function asCSSGradient(stops: GradientStops): string;
|
package/dist/util/util.d.ts
CHANGED
package/docs/fsm.md
CHANGED
|
@@ -204,6 +204,28 @@ The class should override the `end` member function if it needs to do cleanup an
|
|
|
204
204
|
If a class internally is implemented with callbacks or promises, by convention it should check `if this.done`
|
|
205
205
|
when the callback or promise completes to check whether it may have been externally canceled while awaiting.
|
|
206
206
|
|
|
207
|
+
### waitOnCompletion
|
|
208
|
+
|
|
209
|
+
In some cases, a waiting `Fsm` wants to know immediately whether a dependent `Fsm` has completed.
|
|
210
|
+
For example, it might want to keep a queue filled rather than wait until all dependent state machines
|
|
211
|
+
have completed and it has transitioned to a ready state.
|
|
212
|
+
|
|
213
|
+
Additionally, entering the `tick()` function simply indicates _any_ `Fsm` may have completed and determining which
|
|
214
|
+
is `done` would normally require a linear walk through all dependents. This linear walk can risk introducing
|
|
215
|
+
O(N^2) behavior.
|
|
216
|
+
|
|
217
|
+
In these cases, an `Fsm` subclass may override the `waitOnCompletion` member function to get notified of
|
|
218
|
+
a completion. This gets called when any dependent machine completes with success or failure.
|
|
219
|
+
For example:
|
|
220
|
+
|
|
221
|
+
```javascript
|
|
222
|
+
waitOnCompletion(fsm: Fsm): void
|
|
223
|
+
{
|
|
224
|
+
// Some processing on child completion, e.g.
|
|
225
|
+
this.nFailures += fsm.iserror ? 1 : 0;
|
|
226
|
+
}
|
|
227
|
+
```
|
|
228
|
+
|
|
207
229
|
### FsmOnDone
|
|
208
230
|
|
|
209
231
|
A simple utility class `FsmOnDone` provides a way of integrating a callback with an Fsm-based infrastructor.
|
package/lib/ot-js/otsession.ts
CHANGED
|
@@ -24,8 +24,12 @@ export const FilterTrash: number = 4;
|
|
|
24
24
|
export const FilterPublic: number = 5;
|
|
25
25
|
export const FilterOfficial: number = 6;
|
|
26
26
|
export const FilterCOI: number = 7;
|
|
27
|
-
export const
|
|
28
|
-
export const
|
|
27
|
+
export const FilterMyGroupMaps: number = 8;
|
|
28
|
+
export const FilterMyGroups: number = 9;
|
|
29
|
+
export const FilterMyDatasets: number = 10;
|
|
30
|
+
export const FilterPublicDatasets: number = 11;
|
|
31
|
+
export const FilterMyGroupDatasets: number = 12;
|
|
32
|
+
export const FilterCount: number = 13;
|
|
29
33
|
export type Filter = number;
|
|
30
34
|
|
|
31
35
|
// Permissions
|