@uwdata/mosaic-core 0.16.1 → 0.17.0
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/package.json +7 -11
- package/src/Coordinator.js +0 -24
- package/src/index-types.ts +1 -0
- package/src/preagg/sufficient-statistics.js +1 -0
- package/tsconfig.json +6 -8
- package/LICENSE +0 -47
- package/dist/types/Coordinator.d.ts +0 -164
- package/dist/types/MosaicClient.d.ts +0 -143
- package/dist/types/Param.d.ts +0 -47
- package/dist/types/QueryConsolidator.d.ts +0 -9
- package/dist/types/QueryManager.d.ts +0 -91
- package/dist/types/Selection.d.ts +0 -235
- package/dist/types/SelectionClause.d.ts +0 -105
- package/dist/types/connectors/Connector.d.ts +0 -25
- package/dist/types/connectors/rest.d.ts +0 -13
- package/dist/types/connectors/socket.d.ts +0 -100
- package/dist/types/connectors/wasm.d.ts +0 -135
- package/dist/types/index-types.d.ts +0 -4
- package/dist/types/index.d.ts +0 -19
- package/dist/types/make-client.d.ts +0 -78
- package/dist/types/preagg/PreAggregator.d.ts +0 -180
- package/dist/types/preagg/preagg-columns.d.ts +0 -14
- package/dist/types/preagg/sufficient-statistics.d.ts +0 -13
- package/dist/types/types.d.ts +0 -63
- package/dist/types/util/AsyncDispatch.d.ts +0 -100
- package/dist/types/util/cache.d.ts +0 -17
- package/dist/types/util/decode-ipc.d.ts +0 -12
- package/dist/types/util/distinct.d.ts +0 -2
- package/dist/types/util/field-info.d.ts +0 -23
- package/dist/types/util/hash.d.ts +0 -1
- package/dist/types/util/is-activatable.d.ts +0 -6
- package/dist/types/util/is-arrow-table.d.ts +0 -8
- package/dist/types/util/js-type.d.ts +0 -7
- package/dist/types/util/priority-queue.d.ts +0 -37
- package/dist/types/util/query-result.d.ts +0 -44
- package/dist/types/util/selection-types.d.ts +0 -114
- package/dist/types/util/synchronizer.d.ts +0 -29
- package/dist/types/util/throttle.d.ts +0 -13
- package/dist/types/util/to-data-columns.d.ts +0 -29
- package/dist/types/util/void-logger.d.ts +0 -10
- package/jsconfig.json +0 -11
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
import { ExprNode } from '@uwdata/mosaic-sql';
|
|
2
|
-
import { MosaicClient } from '../MosaicClient.js';
|
|
3
|
-
/**
|
|
4
|
-
* Selection clause metadata to guide possible query optimizations.
|
|
5
|
-
* Sub-interfaces provide more information about the specifics of a
|
|
6
|
-
* given selection based on the selection type.
|
|
7
|
-
*/
|
|
8
|
-
export interface ClauseMetadata {
|
|
9
|
-
/**
|
|
10
|
-
* The selection type, such as `'point'`, `'interval'`, or `'match'`.
|
|
11
|
-
*/
|
|
12
|
-
type: string;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Selection clause metadata indicating selection of one or more discrete
|
|
16
|
-
* point values, typically based on equality or is distinctiveness checks.
|
|
17
|
-
*/
|
|
18
|
-
export interface PointMetadata extends ClauseMetadata {
|
|
19
|
-
type: 'point';
|
|
20
|
-
}
|
|
21
|
-
/** Text search matching methods. */
|
|
22
|
-
export type MatchMethod = 'contains' | 'prefix' | 'suffix' | 'regexp' | (string & {});
|
|
23
|
-
/**
|
|
24
|
-
* Selection clause metadata indicating text search matching.
|
|
25
|
-
*/
|
|
26
|
-
export interface MatchMetadata extends ClauseMetadata {
|
|
27
|
-
type: MatchMethod;
|
|
28
|
-
/** The text search matching method used. */
|
|
29
|
-
method?: 'contains' | 'prefix' | 'suffix' | 'regexp' | (string & {});
|
|
30
|
-
}
|
|
31
|
-
/** Quantitative scale types. */
|
|
32
|
-
export type ScaleType = 'identity' | 'linear' | 'log' | 'sqrt' | 'pow' | 'symlog' | 'time' | 'utc';
|
|
33
|
-
/** A data value interval extent. */
|
|
34
|
-
export type Extent = [number, number] | [Date, Date];
|
|
35
|
-
/**
|
|
36
|
-
* Descriptor for a scale that maps a data domain to screen pixels.
|
|
37
|
-
*/
|
|
38
|
-
export interface Scale {
|
|
39
|
-
/** The scale type, such as `'linear'`, `'log'`, etc. */
|
|
40
|
-
type: ScaleType;
|
|
41
|
-
/** The scale domain, as an array of start and end data values. */
|
|
42
|
-
domain: Extent;
|
|
43
|
-
/**
|
|
44
|
-
* The scale range, as an array of start and end screen pixels.
|
|
45
|
-
* The range may be omitted for *identity* scales.
|
|
46
|
-
*/
|
|
47
|
-
range?: [number, number];
|
|
48
|
-
/** The base of the logarithm. For `'log'` scales only. */
|
|
49
|
-
base?: number;
|
|
50
|
-
/** The constant parameter. For `'symlog'` scales only. */
|
|
51
|
-
constant?: number;
|
|
52
|
-
/** The exponent parameter. For `'pow'` scales only. */
|
|
53
|
-
exponent?: number;
|
|
54
|
-
}
|
|
55
|
-
/** A binning method name. */
|
|
56
|
-
export type BinMethod = 'floor' | 'ceil' | 'round';
|
|
57
|
-
/**
|
|
58
|
-
* Selection clause metadata for one or more selected intervals. This
|
|
59
|
-
* metadata can be used to determine appropriate data-space binning
|
|
60
|
-
* schemes that correspond to pixel-level bins in screen space.
|
|
61
|
-
*/
|
|
62
|
-
export interface IntervalMetadata extends ClauseMetadata {
|
|
63
|
-
type: 'interval';
|
|
64
|
-
/**
|
|
65
|
-
* The interactive pixel size used by the generating component.
|
|
66
|
-
* Values larger than one indicate intervals that "snap-to" values
|
|
67
|
-
* greater than a single pixel. If unspecified, assumed to be `1`.
|
|
68
|
-
*/
|
|
69
|
-
pixelSize?: number;
|
|
70
|
-
/**
|
|
71
|
-
* An array of one or more scale descriptors that describe the
|
|
72
|
-
* mapping from data values to screen pixels.
|
|
73
|
-
*/
|
|
74
|
-
scales?: Scale[];
|
|
75
|
-
/**
|
|
76
|
-
* A hint for the binning method to use when discretizing the
|
|
77
|
-
* interval domain. If unspecified, the default is `'floor'`.
|
|
78
|
-
*/
|
|
79
|
-
bin?: BinMethod;
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* A selection clause representing filtering criteria
|
|
83
|
-
* to apply within a Mosiac Selection.
|
|
84
|
-
*/
|
|
85
|
-
export interface SelectionClause {
|
|
86
|
-
/**
|
|
87
|
-
* A unique identifier (according to object equality) for the source
|
|
88
|
-
* component that generated this clause. In many cases, this is a
|
|
89
|
-
* reference to the originating component itself.
|
|
90
|
-
*/
|
|
91
|
-
source: any;
|
|
92
|
-
/**
|
|
93
|
-
* A set of Mosaic clients associated with this clause that should not
|
|
94
|
-
* be updated when this clause is applied in a cross-filtering context.
|
|
95
|
-
*/
|
|
96
|
-
clients?: Set<MosaicClient>;
|
|
97
|
-
/**
|
|
98
|
-
* A selected value associated with this clause. For example, for a 1D
|
|
99
|
-
* interval selection clause the value may be a [lo, hi] array.
|
|
100
|
-
*/
|
|
101
|
-
value: any;
|
|
102
|
-
/**
|
|
103
|
-
* A predicate SQL expression suitable for use in a query WHERE clause.
|
|
104
|
-
* The predicate should apply filtering criteria consistent with this
|
|
105
|
-
* clause's *value* property.
|
|
106
|
-
*/
|
|
107
|
-
predicate: ExprNode | null;
|
|
108
|
-
/**
|
|
109
|
-
* Optional clause metadata that varies based on the selection type.
|
|
110
|
-
* The metadata can be used to optimize selection queries, for example
|
|
111
|
-
* by creating materialized views of pre-aggregated data when applicable.
|
|
112
|
-
*/
|
|
113
|
-
meta?: ClauseMetadata;
|
|
114
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Create a new synchronizer instance to aid synchronization
|
|
3
|
-
* of updates on multiple pending operations.
|
|
4
|
-
*/
|
|
5
|
-
export function synchronizer(): {
|
|
6
|
-
/**
|
|
7
|
-
* Mark an item as pending.
|
|
8
|
-
* @param {*} item An item to synchronize on.
|
|
9
|
-
*/
|
|
10
|
-
pending(item: any): void;
|
|
11
|
-
/**
|
|
12
|
-
* Mark a pending item as ready, indicating it is
|
|
13
|
-
* ready for a synchronized update.
|
|
14
|
-
* @param {*} item An item to synchronize on.
|
|
15
|
-
* @returns {boolean} True if the synchronizer is ready to
|
|
16
|
-
* resolve, false otherwise.
|
|
17
|
-
*/
|
|
18
|
-
ready(item: any): boolean;
|
|
19
|
-
/**
|
|
20
|
-
* Resolve the current synchronization cycle, causing the synchronize
|
|
21
|
-
* promise to resolve and thereby trigger downstream updates.
|
|
22
|
-
*/
|
|
23
|
-
resolve(): void;
|
|
24
|
-
/**
|
|
25
|
-
* The promise for the current synchronization cycle.
|
|
26
|
-
* @return {Promise} The synchronization promise.
|
|
27
|
-
*/
|
|
28
|
-
readonly promise: Promise<any>;
|
|
29
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Throttle invocations of a callback function. The callback must return
|
|
3
|
-
* a Promise. Upon repeated invocation, the callback will not be invoked
|
|
4
|
-
* until a prior Promise resolves. If multiple invocations occurs while
|
|
5
|
-
* waiting, only the most recent invocation will be pending.
|
|
6
|
-
* @template E, T
|
|
7
|
-
* @param {(event: E) => Promise<T>} callback The callback function.
|
|
8
|
-
* @param {boolean} [debounce=true] Flag indicating if invocations
|
|
9
|
-
* should also be debounced within the current animation frame.
|
|
10
|
-
* @returns {(event: E) => void} A new function that throttles
|
|
11
|
-
* access to the callback.
|
|
12
|
-
*/
|
|
13
|
-
export function throttle<E, T>(callback: (event: E) => Promise<T>, debounce?: boolean): (event: E) => void;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @typedef {Array | Int8Array | Uint8Array | Uint8ClampedArray
|
|
3
|
-
* | Int16Array | Uint16Array | Int32Array | Uint32Array
|
|
4
|
-
* | Float32Array | Float64Array
|
|
5
|
-
* } Arrayish - an Array or TypedArray
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* @typedef {
|
|
9
|
-
* | { numRows: number, columns: Record<string,Arrayish> }
|
|
10
|
-
* | { numRows: number, values: Arrayish; }
|
|
11
|
-
* } DataColumns
|
|
12
|
-
*/
|
|
13
|
-
/**
|
|
14
|
-
* Convert input data to a set of column arrays.
|
|
15
|
-
* @param {any} data The input data.
|
|
16
|
-
* @returns {DataColumns} An object with named column arrays.
|
|
17
|
-
*/
|
|
18
|
-
export function toDataColumns(data: any): DataColumns;
|
|
19
|
-
/**
|
|
20
|
-
* - an Array or TypedArray
|
|
21
|
-
*/
|
|
22
|
-
export type Arrayish = any[] | Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array;
|
|
23
|
-
export type DataColumns = any | {
|
|
24
|
-
numRows: number;
|
|
25
|
-
columns: Record<string, Arrayish>;
|
|
26
|
-
} | {
|
|
27
|
-
numRows: number;
|
|
28
|
-
values: Arrayish;
|
|
29
|
-
};
|