@dra2020/baseclient 1.0.10 → 1.0.13

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.
Files changed (120) hide show
  1. package/package.json +16 -15
  2. package/LICENSE +0 -21
  3. package/README.md +0 -26
  4. package/dist/all/all.d.ts +0 -20
  5. package/dist/baseclient.js +0 -10103
  6. package/dist/baseclient.js.map +0 -1
  7. package/dist/context/all.d.ts +0 -1
  8. package/dist/context/context.d.ts +0 -13
  9. package/dist/filterexpr/all.d.ts +0 -1
  10. package/dist/filterexpr/filterexpr.d.ts +0 -67
  11. package/dist/fsm/all.d.ts +0 -1
  12. package/dist/fsm/fsm.d.ts +0 -119
  13. package/dist/geo/all.d.ts +0 -2
  14. package/dist/geo/geo.d.ts +0 -67
  15. package/dist/geo/vfeature.d.ts +0 -4
  16. package/dist/logabstract/all.d.ts +0 -1
  17. package/dist/logabstract/log.d.ts +0 -26
  18. package/dist/logclient/all.d.ts +0 -1
  19. package/dist/logclient/log.d.ts +0 -6
  20. package/dist/ot-editutil/all.d.ts +0 -2
  21. package/dist/ot-editutil/oteditutil.d.ts +0 -14
  22. package/dist/ot-editutil/otmaputil.d.ts +0 -21
  23. package/dist/ot-js/all.d.ts +0 -9
  24. package/dist/ot-js/otarray.d.ts +0 -111
  25. package/dist/ot-js/otclientengine.d.ts +0 -38
  26. package/dist/ot-js/otcomposite.d.ts +0 -37
  27. package/dist/ot-js/otcounter.d.ts +0 -17
  28. package/dist/ot-js/otengine.d.ts +0 -22
  29. package/dist/ot-js/otmap.d.ts +0 -19
  30. package/dist/ot-js/otserverengine.d.ts +0 -38
  31. package/dist/ot-js/otsession.d.ts +0 -113
  32. package/dist/ot-js/ottypes.d.ts +0 -29
  33. package/dist/poly/all.d.ts +0 -15
  34. package/dist/poly/blend.d.ts +0 -1
  35. package/dist/poly/boundbox.d.ts +0 -16
  36. package/dist/poly/cartesian.d.ts +0 -5
  37. package/dist/poly/graham-scan.d.ts +0 -8
  38. package/dist/poly/hash.d.ts +0 -1
  39. package/dist/poly/matrix.d.ts +0 -24
  40. package/dist/poly/minbound.d.ts +0 -1
  41. package/dist/poly/poly.d.ts +0 -52
  42. package/dist/poly/polybin.d.ts +0 -5
  43. package/dist/poly/polylabel.d.ts +0 -7
  44. package/dist/poly/polypack.d.ts +0 -30
  45. package/dist/poly/polyround.d.ts +0 -1
  46. package/dist/poly/polysimplify.d.ts +0 -1
  47. package/dist/poly/quad.d.ts +0 -48
  48. package/dist/poly/selfintersect.d.ts +0 -1
  49. package/dist/poly/shamos.d.ts +0 -1
  50. package/dist/poly/simplify.d.ts +0 -2
  51. package/dist/poly/topo.d.ts +0 -46
  52. package/dist/poly/union.d.ts +0 -49
  53. package/dist/util/all.d.ts +0 -5
  54. package/dist/util/bintrie.d.ts +0 -93
  55. package/dist/util/countedhash.d.ts +0 -19
  56. package/dist/util/gradient.d.ts +0 -15
  57. package/dist/util/indexedarray.d.ts +0 -15
  58. package/dist/util/util.d.ts +0 -68
  59. package/docs/context.md +0 -2
  60. package/docs/filterexpr.md +0 -22
  61. package/docs/fsm.md +0 -243
  62. package/docs/logabstract.md +0 -2
  63. package/docs/logclient.md +0 -2
  64. package/docs/ot-editutil.md +0 -2
  65. package/docs/ot-js.md +0 -95
  66. package/docs/poly.md +0 -103
  67. package/docs/util.md +0 -2
  68. package/lib/all/all.ts +0 -21
  69. package/lib/context/all.ts +0 -1
  70. package/lib/context/context.ts +0 -82
  71. package/lib/filterexpr/all.ts +0 -1
  72. package/lib/filterexpr/filterexpr.ts +0 -699
  73. package/lib/fsm/all.ts +0 -1
  74. package/lib/fsm/fsm.ts +0 -559
  75. package/lib/geo/all.ts +0 -2
  76. package/lib/geo/geo.ts +0 -452
  77. package/lib/geo/vfeature.ts +0 -34
  78. package/lib/logabstract/all.ts +0 -1
  79. package/lib/logabstract/log.ts +0 -55
  80. package/lib/logclient/all.ts +0 -1
  81. package/lib/logclient/log.ts +0 -105
  82. package/lib/ot-editutil/all.ts +0 -2
  83. package/lib/ot-editutil/oteditutil.ts +0 -180
  84. package/lib/ot-editutil/otmaputil.ts +0 -209
  85. package/lib/ot-js/all.ts +0 -9
  86. package/lib/ot-js/otarray.ts +0 -1168
  87. package/lib/ot-js/otclientengine.ts +0 -327
  88. package/lib/ot-js/otcomposite.ts +0 -247
  89. package/lib/ot-js/otcounter.ts +0 -145
  90. package/lib/ot-js/otengine.ts +0 -71
  91. package/lib/ot-js/otmap.ts +0 -144
  92. package/lib/ot-js/otserverengine.ts +0 -329
  93. package/lib/ot-js/otsession.ts +0 -201
  94. package/lib/ot-js/ottypes.ts +0 -98
  95. package/lib/poly/all.ts +0 -15
  96. package/lib/poly/blend.ts +0 -27
  97. package/lib/poly/boundbox.ts +0 -102
  98. package/lib/poly/cartesian.ts +0 -130
  99. package/lib/poly/graham-scan.ts +0 -401
  100. package/lib/poly/hash.ts +0 -15
  101. package/lib/poly/matrix.ts +0 -309
  102. package/lib/poly/minbound.ts +0 -211
  103. package/lib/poly/poly.ts +0 -767
  104. package/lib/poly/polybin.ts +0 -218
  105. package/lib/poly/polylabel.ts +0 -204
  106. package/lib/poly/polypack.ts +0 -458
  107. package/lib/poly/polyround.ts +0 -30
  108. package/lib/poly/polysimplify.ts +0 -24
  109. package/lib/poly/quad.ts +0 -272
  110. package/lib/poly/selfintersect.ts +0 -87
  111. package/lib/poly/shamos.ts +0 -297
  112. package/lib/poly/simplify.ts +0 -119
  113. package/lib/poly/topo.ts +0 -499
  114. package/lib/poly/union.ts +0 -388
  115. package/lib/util/all.ts +0 -5
  116. package/lib/util/bintrie.ts +0 -603
  117. package/lib/util/countedhash.ts +0 -83
  118. package/lib/util/gradient.ts +0 -108
  119. package/lib/util/indexedarray.ts +0 -80
  120. package/lib/util/util.ts +0 -695
@@ -1,113 +0,0 @@
1
- export declare const ESuccess: number;
2
- export declare const EFail: number;
3
- export declare const EFull: number;
4
- export declare const ERetry: number;
5
- export declare const ENoSession: number;
6
- export declare const EClockSeen: number;
7
- export declare const EClockFailure: number;
8
- export declare const EClockReset: number;
9
- export declare const ENoUser: number;
10
- export declare const EBadRequest: number;
11
- export declare const ELoadFailed: number;
12
- export declare const ENoPerm: number;
13
- export declare const ENoAccess: number;
14
- export declare const EMaintenance: number;
15
- export declare const EClockAnomaly: number;
16
- export declare const FilterMyMaps: number;
17
- export declare const FilterSharedWithMe: number;
18
- export declare const FilterMyPublic: number;
19
- export declare const FilterRecent: number;
20
- export declare const FilterTrash: number;
21
- export declare const FilterPublic: number;
22
- export declare const FilterOfficial: number;
23
- export declare const FilterCount: number;
24
- export declare type Filter = number;
25
- export declare const PermNone: number;
26
- export declare const PermRead: number;
27
- export declare const PermWrite: number;
28
- export declare const PermOwner: number;
29
- export declare const PermAdmin: number;
30
- export declare const PermEdit: number;
31
- export declare const PermAll: number;
32
- export declare type Permission = number;
33
- export declare const ServerStateRunning: number;
34
- export declare const ServerStateMaintenance: number;
35
- export declare type ServerState = number;
36
- export interface AccessSessionMap {
37
- [key: string]: string;
38
- }
39
- export interface AccessMap {
40
- [key: string]: Access;
41
- }
42
- export interface Access {
43
- userIDs: string[];
44
- perm: Permission;
45
- }
46
- export interface Revision {
47
- id: string;
48
- modifyTime: any;
49
- label?: string;
50
- }
51
- export declare type RevisionList = Revision[];
52
- export interface SessionUser {
53
- id: string;
54
- name: string;
55
- }
56
- export interface ActiveUser {
57
- id: string;
58
- name: string;
59
- active: number;
60
- }
61
- export interface SessionUserIndex {
62
- [key: string]: SessionUser;
63
- }
64
- export interface SessionUserList {
65
- [key: string]: number;
66
- }
67
- export interface SessionProps {
68
- id: string;
69
- name: string;
70
- type: string;
71
- description: string;
72
- labels: string[];
73
- createdBy: string;
74
- lastActive: any;
75
- createTime: any;
76
- modifyTime: any;
77
- clientCount: number;
78
- maxClients: number;
79
- requestCount: number;
80
- deleted: boolean;
81
- published?: string;
82
- official: boolean;
83
- loadFailed: boolean;
84
- accessMap: AccessMap;
85
- revisions: RevisionList;
86
- expunged?: boolean;
87
- expungeDate?: string;
88
- xprops?: {
89
- [prop: string]: string;
90
- };
91
- }
92
- export declare type LabelUpdate = {
93
- [name: string]: boolean | null;
94
- };
95
- export interface SessionUpdateProps {
96
- id: string;
97
- deleted?: boolean;
98
- published?: boolean;
99
- official?: boolean;
100
- name?: string;
101
- description?: string;
102
- labelupdate?: LabelUpdate;
103
- access?: Access;
104
- accessUpdate?: AccessMap;
105
- restore?: string;
106
- revision?: Revision;
107
- }
108
- export interface SessionsIndex {
109
- [key: string]: SessionProps;
110
- }
111
- export declare function accessFindUser(a: Access, uid: string): Permission;
112
- export declare function accessMapFindUser(accessMap: AccessMap, uid: string, aid?: string): Permission;
113
- export declare function SessionFilterFunction(p: SessionProps, uid: string, f: number): boolean;
@@ -1,29 +0,0 @@
1
- export interface IOTResource {
2
- resourceName: string;
3
- underlyingType: string;
4
- edits: any[];
5
- length: number;
6
- empty(): void;
7
- isEmpty(): boolean;
8
- copy(): IOTResource;
9
- effectivelyEqual(rhs: IOTResource): boolean;
10
- transform(rhs: IOTResource, bPriorIsService: boolean): void;
11
- compose(rhs: IOTResource): void;
12
- apply(startValue: any): any;
13
- minimize(): void;
14
- }
15
- export declare class OTResourceBase implements IOTResource {
16
- resourceName: string;
17
- underlyingType: string;
18
- edits: any[];
19
- constructor(rname: string, utype: string);
20
- get length(): number;
21
- empty(): void;
22
- isEmpty(): boolean;
23
- copy(): OTResourceBase;
24
- effectivelyEqual(rhs: OTResourceBase): boolean;
25
- transform(rhs: OTResourceBase, bPriorIsService: boolean): void;
26
- compose(rhs: OTResourceBase): void;
27
- apply(startValue: any): any;
28
- minimize(): void;
29
- }
@@ -1,15 +0,0 @@
1
- export * from './poly';
2
- export * from './union';
3
- export * from './quad';
4
- export * from './polylabel';
5
- export * from './polysimplify';
6
- export * from './polypack';
7
- export * from './polybin';
8
- export * from './boundbox';
9
- export * from './blend';
10
- export * from './cartesian';
11
- export * from './minbound';
12
- export * from './polyround';
13
- export * from './topo';
14
- export * from './selfintersect';
15
- export * from './shamos';
@@ -1 +0,0 @@
1
- export declare function blend(polys: any[]): any;
@@ -1,16 +0,0 @@
1
- export interface BoundBox {
2
- left?: number;
3
- top?: number;
4
- right?: number;
5
- bottom?: number;
6
- }
7
- export declare function boundboxWidth(bb: BoundBox): number;
8
- export declare function boundboxHeight(bb: BoundBox): number;
9
- export declare function boundboxCX(bb: BoundBox): number;
10
- export declare function boundboxCY(bb: BoundBox): number;
11
- export declare function clipLon(lon: number): number;
12
- export declare function boundboxExtend(bbox: BoundBox, x: number, y: number): void;
13
- export declare function boundbox(poly: any, bbox?: BoundBox): BoundBox;
14
- export declare function boundboxPoly(bb: BoundBox): any;
15
- export declare function boundboxArea(poly: any): number;
16
- export declare function boundboxIntersects(bb1: BoundBox, bb2: BoundBox): boolean;
@@ -1,5 +0,0 @@
1
- import * as GeoJSON from 'geojson';
2
- export declare function polyParts(poly: any): GeoJSON.FeatureCollection;
3
- export declare function polyAreaFlat(poly: any): number;
4
- export declare function polyPerimeterFlat(poly: any): number;
5
- export declare function polyDiameterFlat(poly: any): number;
@@ -1,8 +0,0 @@
1
- import { PolyOptions } from './poly';
2
- export declare function makeConvexHullGrahamScan(poly: any, options?: PolyOptions): any;
3
- /**
4
- * Graham's Scan Convex Hull Algorithm
5
- * @desc An implementation of the Graham's Scan Convex Hull algorithm in JavaScript.
6
- * @author Brian Barnett, brian@3kb.co.uk, http://brianbar.net/ || http://3kb.co.uk/
7
- * @version 1.0.5
8
- */
@@ -1 +0,0 @@
1
- export declare function qhash(o: any, keys?: any): any;
@@ -1,24 +0,0 @@
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
- export declare const enum Dim {
7
- Rows = 0,
8
- Columns = 1
9
- }
10
- export declare function matrix(a: Matrix): Matrix;
11
- export declare function multiply(a: Matrix, b: Matrix): Matrix;
12
- export declare function transpose(a: Matrix): Matrix;
13
- export declare function apply(a: Matrix, over: Dim, cb: applyCB): Vector;
14
- export declare function min(v: Vector): number;
15
- export declare function max(v: Vector): number;
16
- export declare function concat(a: Matrix, b: Matrix, by: Dim): Matrix;
17
- export declare function row(a: Matrix, i: number): Vector;
18
- export declare function column(a: Matrix, j: number): Vector;
19
- export declare function subtract(a: Vector, b: Vector): Vector;
20
- export declare function dotMultiply(a: Vector, b: Vector): Vector;
21
- export declare function index(a: Range, b: Range): Index;
22
- export declare function range(start: number, end: number, includeEnd?: boolean): Vector;
23
- export declare function subset(a: Matrix, select: Index): Matrix;
24
- export declare function dotProduct(a: Vector, b: Vector): number;
@@ -1 +0,0 @@
1
- export declare function minimumBoundingRectangle(poly: any): any;
@@ -1,52 +0,0 @@
1
- import * as PP from './polypack';
2
- export interface TickOptions {
3
- maxLeafCount?: number;
4
- maxDepth?: number;
5
- tickStep?: number;
6
- }
7
- export declare const DefaultTickOptions: {
8
- maxLeafCount: number;
9
- maxDepth: number;
10
- tickStep: number;
11
- };
12
- export declare const EARTH_RADIUS = 6371000;
13
- export interface PolyOptions {
14
- noLatitudeCorrection?: boolean;
15
- }
16
- export declare const DefaultOptions: PolyOptions;
17
- export declare function polySimpleArea(b: Float64Array, iOffset: number, n: number): number;
18
- export declare function polyNormalize(poly: any): PP.PolyPack;
19
- export declare function polyNull(poly: any): boolean;
20
- export declare function polyArea(poly: any): number;
21
- export declare function polyDiameter(poly: any, options?: PolyOptions): number;
22
- export declare function polyPerimeter(poly: any, options?: PolyOptions): number;
23
- export declare class Circle {
24
- x: number;
25
- y: number;
26
- r: number;
27
- constructor(x: number, y: number, r: number);
28
- }
29
- export declare function polyToCircle(poly: any): Circle | null;
30
- export declare function polyToPolsbyPopperCircle(poly: any, options?: PolyOptions): Circle | null;
31
- export declare function polyFromCircle(c: Circle, nSegments?: number): any;
32
- export declare function polyToExteriorPoints(poly: any): any;
33
- export declare function polyConvexHull(poly: any, altAlgorithm?: any): any;
34
- export declare function makeConvexHullMonotoneChain2D(poly: any): any;
35
- export interface CompactnessDescription {
36
- value: number;
37
- reock: number;
38
- polsby_popper: number;
39
- convex_hull: number;
40
- schwartzberg: number;
41
- }
42
- export declare function polyCompactness(poly: any, options?: PolyOptions): CompactnessDescription;
43
- export interface PolyDescription {
44
- npoly: number;
45
- nhole: number;
46
- npoint: number;
47
- }
48
- export declare function polyDescribe(poly: any): PolyDescription;
49
- export declare function npoints(poly: any): number;
50
- export declare function polyTransform(poly: any, transformFn: any): any;
51
- export declare function featureRewind(poly: any): any;
52
- export declare function polyRewindRings(pp: any, bLog?: boolean): any;
@@ -1,5 +0,0 @@
1
- import * as Util from '../util/all';
2
- export declare function packCollection(coder: Util.Coder, col: any): ArrayBuffer;
3
- export declare function unpackCollection(coder: Util.Coder, ab: ArrayBuffer): any;
4
- export declare function topoToBuffer(coder: Util.Coder, topo: any): ArrayBuffer;
5
- export declare function topoFromBuffer(coder: Util.Coder, ab: ArrayBuffer): any;
@@ -1,7 +0,0 @@
1
- interface PolyLabelResult {
2
- x: number;
3
- y: number;
4
- d: number;
5
- }
6
- export declare function polyLabel(poly: any, precision?: number, debug?: boolean): PolyLabelResult;
7
- export {};
@@ -1,30 +0,0 @@
1
- export interface PolyPack {
2
- offset: number;
3
- length: number;
4
- buffer: any;
5
- }
6
- export declare function polyPackSize(coords: any): number;
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
- export declare function polyPackEachRing(pack: PolyPack, cb: EachRingCB): void;
10
- export declare function polyPackEachPoint(pack: PolyPack, cb: EachPointCB): void;
11
- export declare function polyPackCountPoints(pack: PolyPack): number;
12
- export declare function polyPacked(f: any): boolean;
13
- export declare function normalizeArcs(arcs: any): any;
14
- export declare function countArcPolygons(arcs: any): number;
15
- export declare function countArcRings(arcs: any, iPoly?: number): number;
16
- export declare function countOneArcPoints(topo: any, ring: any): number;
17
- export declare function countArcPoints(topo: any, arcs: any, iPoly?: number): number;
18
- export declare function polyPackTopoArcs(topo: any, arcs: any, iPoly?: number): PolyPack;
19
- export declare function polyPack(coords: any, prepack?: PolyPack): PolyPack;
20
- export declare function polyPackCopy(coords: any): PolyPack;
21
- export declare function polyUnpack(prepack: any): any;
22
- export declare function featurePackSize(f: any): number;
23
- export declare function featurePack(f: any, prepack?: PolyPack): any;
24
- export declare function featureUnpack(f: any): any;
25
- export declare type SavePack = WeakMap<any, any>;
26
- export declare function featureUnpackTemporarily(f: any, save?: SavePack): SavePack;
27
- export declare function featureRepack(f: any, save: SavePack): any;
28
- export declare function featurePackString(f: any): string;
29
- export declare function featureUnpackString(s: string): any;
30
- export {};
@@ -1 +0,0 @@
1
- export declare function polyRound(o: any): any;
@@ -1 +0,0 @@
1
- export declare function polySimplify(poly: any, tolerance?: number): void;
@@ -1,48 +0,0 @@
1
- import * as FSM from '../fsm/all';
2
- import * as Poly from './poly';
3
- import * as BB from './boundbox';
4
- export interface WrappedPoly {
5
- box: BB.BoundBox;
6
- p: any;
7
- }
8
- export interface WorkDone {
9
- nUnion: number;
10
- nDifference: number;
11
- ms: number;
12
- }
13
- export declare function unionPolys(polys: any[]): any;
14
- export interface QuadOptions {
15
- maxLeafCount?: number;
16
- maxDepth?: number;
17
- tickStep?: number;
18
- }
19
- export declare const DefaultQuadOptions: QuadOptions;
20
- export interface TickCounter {
21
- ticks: number;
22
- }
23
- declare class QuadLevel {
24
- options: QuadOptions;
25
- level: number;
26
- children: QuadLevel[];
27
- features: any[];
28
- box: BB.BoundBox;
29
- asyncUnion: any;
30
- constructor(options: QuadOptions, level: number, box: BB.BoundBox, features: WrappedPoly[]);
31
- private featureInBox;
32
- union(): any;
33
- get isempty(): boolean;
34
- tickUnion(tickCounter: TickCounter): void;
35
- }
36
- export declare class FsmQuadTree extends FSM.Fsm {
37
- quad: QuadLevel;
38
- asyncUnion: any;
39
- isempty: boolean;
40
- options: Poly.TickOptions;
41
- work: WorkDone;
42
- constructor(env: FSM.FsmEnvironment, options?: Poly.TickOptions, col?: any);
43
- initialize(col: any): void;
44
- cancel(): any;
45
- get result(): any;
46
- tick(): void;
47
- }
48
- export {};
@@ -1 +0,0 @@
1
- export declare function selfIntersect(poly: any): boolean;
@@ -1 +0,0 @@
1
- export declare function selfIntersectFast(poly: any): boolean;
@@ -1,2 +0,0 @@
1
- export declare type Point = [number, number];
2
- export declare function simplify(points: Point[], tolerance?: number, highestQuality?: boolean): Point[];
@@ -1,46 +0,0 @@
1
- import * as FSM from '../fsm/all';
2
- import * as P from './poly';
3
- import * as Q from './quad';
4
- export declare type Topo = any;
5
- export declare function topoFromCollection(col: any): Topo;
6
- export declare function topoContiguity(topo: Topo): any;
7
- export declare function topoToFeature(topo: Topo, geoid: string): any;
8
- export declare function topoToCollection(topo: Topo): any;
9
- export interface SimplifyOptions {
10
- minArea?: number;
11
- }
12
- export declare function topoSimplifyCollection(col: any, options?: SimplifyOptions): any;
13
- export declare function topoMerge(topo: Topo, geoids: string[]): any;
14
- export declare function topoMergeFeatures(topo: Topo, features: any[]): any;
15
- declare class FsmIncrementalUnion extends FSM.Fsm {
16
- options: P.TickOptions;
17
- key: any;
18
- map: any;
19
- result: any;
20
- work: Q.WorkDone;
21
- constructor(env: FSM.FsmEnvironment, options: P.TickOptions, key: any, map?: any);
22
- matches(key: any): boolean;
23
- recompute(map: any): void;
24
- cancel(): void;
25
- tick(): void;
26
- }
27
- export interface TopoUnionResult {
28
- key: any;
29
- poly: any;
30
- work: Q.WorkDone;
31
- }
32
- export declare class FsmTopoUnion extends FSM.Fsm {
33
- options: P.TickOptions;
34
- unions: FsmIncrementalUnion[];
35
- work: Q.WorkDone;
36
- constructor(env: FSM.FsmEnvironment, options?: P.TickOptions);
37
- get result(): TopoUnionResult[];
38
- cancel(): void;
39
- cancelOne(key: any): void;
40
- recompute(key: any, map: any): void;
41
- tick(): void;
42
- }
43
- export declare function topoPacked(topo: any): boolean;
44
- export declare function topoPack(topo: any): any;
45
- export declare function topoUnpack(topo: any): any;
46
- export {};
@@ -1,49 +0,0 @@
1
- import * as FSM from '../fsm/all';
2
- import * as Poly from './poly';
3
- import * as Q from './quad';
4
- export declare function polyIntersects(p1: any, p2: any): boolean;
5
- export declare function polyDifference(main: any, parts: any[]): any;
6
- declare class FsmDifference extends FSM.Fsm {
7
- accum: any;
8
- polys: any[];
9
- work: Q.WorkDone;
10
- constructor(env: FSM.FsmEnvironment, accum?: any, polys?: any[]);
11
- initialize(accum: any, polys: any[]): void;
12
- cancel(): void;
13
- get result(): any;
14
- tick(): void;
15
- }
16
- declare class FsmIncrementalUnion extends FSM.Fsm {
17
- options: Poly.TickOptions;
18
- key: any;
19
- map: any;
20
- result: any;
21
- lastCompleteMap: any;
22
- lastCompleteResult: any;
23
- toSub: any[];
24
- fsmUnion: Q.FsmQuadTree;
25
- fsmDifference: FsmDifference;
26
- work: Q.WorkDone;
27
- constructor(env: FSM.FsmEnvironment, options: Poly.TickOptions, key: any, map?: any);
28
- matches(key: any): boolean;
29
- recompute(map: any): void;
30
- cancel(): void;
31
- tick(): void;
32
- }
33
- export interface UnionResult {
34
- key: any;
35
- poly: any;
36
- work: Q.WorkDone;
37
- }
38
- export declare class FsmUnion extends FSM.Fsm {
39
- options: Poly.TickOptions;
40
- unions: FsmIncrementalUnion[];
41
- work: Q.WorkDone;
42
- constructor(env: FSM.FsmEnvironment, options?: Poly.TickOptions);
43
- get result(): UnionResult[];
44
- cancel(): void;
45
- cancelOne(key: any): void;
46
- recompute(key: any, map: any): void;
47
- tick(): void;
48
- }
49
- export {};
@@ -1,5 +0,0 @@
1
- export * from './util';
2
- export * from './countedhash';
3
- export * from './indexedarray';
4
- export * from './gradient';
5
- export * from './bintrie';
@@ -1,93 +0,0 @@
1
- export interface Coder {
2
- encoder: {
3
- encode: (s: string) => Uint8Array;
4
- };
5
- decoder: {
6
- decode: (u8: Uint8Array) => string;
7
- };
8
- }
9
- export declare function s2u8(coder: Coder, s: string): Uint8Array;
10
- export declare function u82s(coder: Coder, u8: Uint8Array, offset: number, n: number): string;
11
- interface Fragment {
12
- count: number;
13
- used: number;
14
- offset: number;
15
- s: string;
16
- u8?: Uint8Array;
17
- }
18
- declare type FragmentTable = {
19
- [frag: string]: Fragment;
20
- };
21
- declare type FragmentPair = {
22
- f1: Fragment;
23
- f2: Fragment;
24
- offset?: number;
25
- };
26
- declare class ValueTable {
27
- coder: Coder;
28
- ab: ArrayBuffer;
29
- u8: Uint8Array;
30
- u32: Uint32Array;
31
- constructor(coder: Coder);
32
- static fromBuffer(coder: Coder, ab: ArrayBuffer, offset: number, length: number): ValueTable;
33
- fromOffset(offset: number): string;
34
- }
35
- declare class ValueTableBuilder {
36
- coder: Coder;
37
- values: string[];
38
- fragments: FragmentTable;
39
- pairs: {
40
- [value: string]: FragmentPair;
41
- };
42
- ab: ArrayBuffer;
43
- u8: Uint8Array;
44
- u32: Uint32Array;
45
- constructor(coder: Coder);
46
- static fromStrings(coder: Coder, values: string[]): ValueTableBuilder;
47
- validateStrings(values: string[]): void;
48
- addFragment(s: string): void;
49
- extractFragments(s: string): void;
50
- pickFragments(s: string): void;
51
- toOffset(s: string): number;
52
- toBinary(): void;
53
- }
54
- export declare type StringMap = {
55
- [key: string]: string;
56
- };
57
- interface UnpackedNode {
58
- suffix: Uint8Array;
59
- value: number;
60
- bytes: number[] | null;
61
- nodes: UnpackedNode[] | null;
62
- }
63
- export declare class BinTrie {
64
- coder: Coder;
65
- ab: ArrayBuffer;
66
- vt: ValueTable;
67
- u8: Uint8Array;
68
- i32: Int32Array;
69
- constructor(coder: Coder);
70
- static fromBuffer(coder: Coder, ab: ArrayBuffer): BinTrie;
71
- get(key: string): string;
72
- }
73
- export declare class BinTrieBuilder {
74
- coder: Coder;
75
- root: UnpackedNode;
76
- vtb: ValueTableBuilder;
77
- vt: ValueTable;
78
- ab: ArrayBuffer;
79
- u8: Uint8Array;
80
- i32: Int32Array;
81
- constructor(coder: Coder);
82
- nodeCount(node: UnpackedNode): number;
83
- nodeBranching(node: UnpackedNode, counts: number[]): number;
84
- nodeValueCount(node: UnpackedNode): number;
85
- nodeByteLength(node: UnpackedNode): number;
86
- addString(s: string, value: number): void;
87
- dedup(node: UnpackedNode): void;
88
- getUnpacked(key: string): string;
89
- packNode(node: UnpackedNode, byteOffset: number): number;
90
- toBinary(): void;
91
- static fromMap(coder: Coder, o: StringMap): BinTrie;
92
- }
93
- export {};
@@ -1,19 +0,0 @@
1
- export declare class CountedHash {
2
- n: number;
3
- val: {
4
- [id: string]: true | null;
5
- };
6
- constructor();
7
- get length(): number;
8
- indeterminate(id: string): boolean;
9
- test(id: string): boolean;
10
- set(id: string, val?: true | null): void;
11
- clear(id: string): void;
12
- apply(vals: {
13
- [id: string]: boolean | null;
14
- }): void;
15
- empty(): void;
16
- asArray(): string[];
17
- asString(): string;
18
- forEach(f: (id: string) => void): void;
19
- }
@@ -1,15 +0,0 @@
1
- interface RGB {
2
- r: number;
3
- g: number;
4
- b: number;
5
- }
6
- export interface Stop {
7
- color: string;
8
- stop: number;
9
- rgb?: RGB;
10
- }
11
- export declare type GradientStops = Stop[];
12
- export declare function execGradient(stops: GradientStops, value: number): string;
13
- export declare function parseGradient(sStops: string): GradientStops;
14
- export declare function asCSSGradient(stops: GradientStops): string;
15
- export {};
@@ -1,15 +0,0 @@
1
- export declare class IndexedArray {
2
- o: any;
3
- a: any[];
4
- constructor();
5
- ensure(): void;
6
- asArray(): any[];
7
- get length(): number;
8
- test(s: string): boolean;
9
- set(s: string): void;
10
- setAll(a: string[]): void;
11
- clear(s: string): void;
12
- at(i: number): string;
13
- empty(): void;
14
- forEach(f: (s: string) => void): void;
15
- }