@uwdata/mosaic-core 0.16.2 → 0.18.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.
Files changed (206) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +0 -1
  3. package/dist/src/Coordinator.d.ts +147 -0
  4. package/dist/src/Coordinator.d.ts.map +1 -0
  5. package/dist/src/Coordinator.js +269 -0
  6. package/dist/src/Coordinator.js.map +1 -0
  7. package/dist/{types → src}/MosaicClient.d.ts +37 -42
  8. package/dist/src/MosaicClient.d.ts.map +1 -0
  9. package/dist/src/MosaicClient.js +213 -0
  10. package/dist/src/MosaicClient.js.map +1 -0
  11. package/dist/src/Param.d.ts +56 -0
  12. package/dist/src/Param.d.ts.map +1 -0
  13. package/dist/src/Param.js +89 -0
  14. package/dist/src/Param.js.map +1 -0
  15. package/dist/src/QueryConsolidator.d.ts +11 -0
  16. package/dist/src/QueryConsolidator.d.ts.map +1 -0
  17. package/dist/src/QueryConsolidator.js +249 -0
  18. package/dist/src/QueryConsolidator.js.map +1 -0
  19. package/dist/src/QueryManager.d.ts +77 -0
  20. package/dist/src/QueryManager.d.ts.map +1 -0
  21. package/dist/src/QueryManager.js +174 -0
  22. package/dist/src/QueryManager.js.map +1 -0
  23. package/dist/src/Selection.d.ts +222 -0
  24. package/dist/src/Selection.d.ts.map +1 -0
  25. package/dist/src/Selection.js +319 -0
  26. package/dist/src/Selection.js.map +1 -0
  27. package/dist/src/SelectionClause.d.ts +192 -0
  28. package/dist/src/SelectionClause.d.ts.map +1 -0
  29. package/dist/src/SelectionClause.js +126 -0
  30. package/dist/src/SelectionClause.js.map +1 -0
  31. package/dist/{types → src}/connectors/Connector.d.ts +6 -5
  32. package/dist/src/connectors/Connector.d.ts.map +1 -0
  33. package/dist/src/connectors/Connector.js +2 -0
  34. package/dist/src/connectors/Connector.js.map +1 -0
  35. package/dist/src/connectors/rest.d.ts +24 -0
  36. package/dist/src/connectors/rest.d.ts.map +1 -0
  37. package/dist/src/connectors/rest.js +37 -0
  38. package/dist/src/connectors/rest.js.map +1 -0
  39. package/dist/src/connectors/socket.d.ts +40 -0
  40. package/dist/src/connectors/socket.d.ts.map +1 -0
  41. package/dist/src/connectors/socket.js +115 -0
  42. package/dist/src/connectors/socket.js.map +1 -0
  43. package/dist/src/connectors/wasm.d.ts +53 -0
  44. package/dist/src/connectors/wasm.d.ts.map +1 -0
  45. package/dist/src/connectors/wasm.js +113 -0
  46. package/dist/src/connectors/wasm.js.map +1 -0
  47. package/dist/src/index.d.ts +28 -0
  48. package/dist/src/index.d.ts.map +1 -0
  49. package/dist/src/index.js +25 -0
  50. package/dist/src/index.js.map +1 -0
  51. package/dist/src/make-client.d.ts +35 -0
  52. package/dist/src/make-client.d.ts.map +1 -0
  53. package/dist/src/make-client.js +52 -0
  54. package/dist/src/make-client.js.map +1 -0
  55. package/dist/{types → src}/preagg/PreAggregator.d.ts +64 -94
  56. package/dist/src/preagg/PreAggregator.d.ts.map +1 -0
  57. package/dist/src/preagg/PreAggregator.js +382 -0
  58. package/dist/src/preagg/PreAggregator.js.map +1 -0
  59. package/dist/{types → src}/preagg/preagg-columns.d.ts +10 -8
  60. package/dist/src/preagg/preagg-columns.d.ts.map +1 -0
  61. package/dist/src/preagg/preagg-columns.js +95 -0
  62. package/dist/src/preagg/preagg-columns.js.map +1 -0
  63. package/dist/src/preagg/sufficient-statistics.d.ts +14 -0
  64. package/dist/src/preagg/sufficient-statistics.d.ts.map +1 -0
  65. package/dist/src/preagg/sufficient-statistics.js +446 -0
  66. package/dist/src/preagg/sufficient-statistics.js.map +1 -0
  67. package/dist/{types → src}/types.d.ts +23 -9
  68. package/dist/src/types.d.ts.map +1 -0
  69. package/dist/src/types.js +2 -0
  70. package/dist/src/types.js.map +1 -0
  71. package/dist/{types → src}/util/AsyncDispatch.d.ts +53 -32
  72. package/dist/src/util/AsyncDispatch.d.ts.map +1 -0
  73. package/dist/src/util/AsyncDispatch.js +188 -0
  74. package/dist/src/util/AsyncDispatch.js.map +1 -0
  75. package/dist/src/util/cache.d.ts +19 -0
  76. package/dist/src/util/cache.d.ts.map +1 -0
  77. package/dist/src/util/cache.js +66 -0
  78. package/dist/src/util/cache.js.map +1 -0
  79. package/dist/src/util/decode-ipc.d.ts +12 -0
  80. package/dist/src/util/decode-ipc.d.ts.map +1 -0
  81. package/{src → dist/src}/util/decode-ipc.js +5 -6
  82. package/dist/src/util/decode-ipc.js.map +1 -0
  83. package/dist/src/util/distinct.d.ts +3 -0
  84. package/dist/src/util/distinct.d.ts.map +1 -0
  85. package/dist/src/util/distinct.js +16 -0
  86. package/dist/src/util/distinct.js.map +1 -0
  87. package/dist/src/util/field-info.d.ts +26 -0
  88. package/dist/src/util/field-info.d.ts.map +1 -0
  89. package/dist/src/util/field-info.js +91 -0
  90. package/dist/src/util/field-info.js.map +1 -0
  91. package/dist/src/util/hash.d.ts +2 -0
  92. package/dist/src/util/hash.d.ts.map +1 -0
  93. package/dist/src/util/hash.js +26 -0
  94. package/dist/src/util/hash.js.map +1 -0
  95. package/dist/src/util/is-activatable.d.ts +8 -0
  96. package/dist/src/util/is-activatable.d.ts.map +1 -0
  97. package/dist/src/util/is-activatable.js +10 -0
  98. package/dist/src/util/is-activatable.js.map +1 -0
  99. package/dist/src/util/is-arrow-table.d.ts +9 -0
  100. package/dist/src/util/is-arrow-table.d.ts.map +1 -0
  101. package/dist/src/util/is-arrow-table.js +11 -0
  102. package/dist/src/util/is-arrow-table.js.map +1 -0
  103. package/dist/src/util/js-type.d.ts +9 -0
  104. package/dist/src/util/js-type.d.ts.map +1 -0
  105. package/dist/src/util/js-type.js +59 -0
  106. package/dist/src/util/js-type.js.map +1 -0
  107. package/dist/{types → src}/util/priority-queue.d.ts +12 -14
  108. package/dist/src/util/priority-queue.d.ts.map +1 -0
  109. package/dist/src/util/priority-queue.js +81 -0
  110. package/dist/src/util/priority-queue.js.map +1 -0
  111. package/dist/src/util/query-result.d.ts +47 -0
  112. package/dist/src/util/query-result.d.ts.map +1 -0
  113. package/dist/src/util/query-result.js +83 -0
  114. package/dist/src/util/query-result.js.map +1 -0
  115. package/dist/src/util/synchronizer.d.ts +36 -0
  116. package/dist/src/util/synchronizer.d.ts.map +1 -0
  117. package/dist/src/util/synchronizer.js +52 -0
  118. package/dist/src/util/synchronizer.js.map +1 -0
  119. package/dist/src/util/throttle.d.ts +12 -0
  120. package/dist/src/util/throttle.d.ts.map +1 -0
  121. package/dist/src/util/throttle.js +51 -0
  122. package/dist/src/util/throttle.js.map +1 -0
  123. package/dist/src/util/to-data-columns.d.ts +22 -0
  124. package/dist/src/util/to-data-columns.d.ts.map +1 -0
  125. package/dist/src/util/to-data-columns.js +51 -0
  126. package/dist/src/util/to-data-columns.js.map +1 -0
  127. package/dist/src/util/void-logger.d.ts +13 -0
  128. package/dist/src/util/void-logger.d.ts.map +1 -0
  129. package/dist/src/util/void-logger.js +13 -0
  130. package/dist/src/util/void-logger.js.map +1 -0
  131. package/package.json +15 -13
  132. package/src/Coordinator.ts +367 -0
  133. package/src/{MosaicClient.js → MosaicClient.ts} +49 -43
  134. package/src/{Param.js → Param.ts} +29 -28
  135. package/src/{QueryConsolidator.js → QueryConsolidator.ts} +81 -58
  136. package/src/{QueryManager.js → QueryManager.ts} +61 -54
  137. package/src/Selection.ts +388 -0
  138. package/src/SelectionClause.ts +275 -0
  139. package/src/connectors/Connector.ts +6 -6
  140. package/src/connectors/rest.ts +56 -0
  141. package/src/connectors/{socket.js → socket.ts} +53 -42
  142. package/src/connectors/{wasm.js → wasm.ts} +46 -62
  143. package/src/{index.js → index.ts} +13 -1
  144. package/src/make-client.ts +93 -0
  145. package/src/preagg/{PreAggregator.js → PreAggregator.ts} +164 -145
  146. package/src/preagg/{preagg-columns.js → preagg-columns.ts} +27 -24
  147. package/src/preagg/{sufficient-statistics.js → sufficient-statistics.ts} +161 -110
  148. package/src/types.ts +24 -9
  149. package/src/util/{AsyncDispatch.js → AsyncDispatch.ts} +62 -43
  150. package/src/util/{cache.js → cache.ts} +25 -15
  151. package/src/util/decode-ipc.ts +15 -0
  152. package/src/util/{distinct.js → distinct.ts} +3 -3
  153. package/src/util/{field-info.js → field-info.ts} +31 -32
  154. package/src/util/{hash.js → hash.ts} +4 -4
  155. package/src/util/is-activatable.ts +11 -0
  156. package/src/util/is-arrow-table.ts +12 -0
  157. package/src/util/{js-type.js → js-type.ts} +7 -5
  158. package/src/util/{priority-queue.js → priority-queue.ts} +32 -20
  159. package/src/util/{query-result.js → query-result.ts} +24 -17
  160. package/src/util/synchronizer.ts +56 -0
  161. package/src/util/throttle.ts +59 -0
  162. package/src/util/to-data-columns.ts +65 -0
  163. package/src/util/void-logger.ts +23 -0
  164. package/dist/types/Coordinator.d.ts +0 -164
  165. package/dist/types/Param.d.ts +0 -47
  166. package/dist/types/QueryConsolidator.d.ts +0 -9
  167. package/dist/types/QueryManager.d.ts +0 -91
  168. package/dist/types/Selection.d.ts +0 -235
  169. package/dist/types/SelectionClause.d.ts +0 -105
  170. package/dist/types/connectors/rest.d.ts +0 -13
  171. package/dist/types/connectors/socket.d.ts +0 -100
  172. package/dist/types/connectors/wasm.d.ts +0 -135
  173. package/dist/types/index-types.d.ts +0 -4
  174. package/dist/types/index.d.ts +0 -19
  175. package/dist/types/make-client.d.ts +0 -78
  176. package/dist/types/preagg/sufficient-statistics.d.ts +0 -13
  177. package/dist/types/util/cache.d.ts +0 -17
  178. package/dist/types/util/decode-ipc.d.ts +0 -12
  179. package/dist/types/util/distinct.d.ts +0 -2
  180. package/dist/types/util/field-info.d.ts +0 -23
  181. package/dist/types/util/hash.d.ts +0 -1
  182. package/dist/types/util/is-activatable.d.ts +0 -6
  183. package/dist/types/util/is-arrow-table.d.ts +0 -8
  184. package/dist/types/util/js-type.d.ts +0 -7
  185. package/dist/types/util/query-result.d.ts +0 -44
  186. package/dist/types/util/selection-types.d.ts +0 -114
  187. package/dist/types/util/synchronizer.d.ts +0 -29
  188. package/dist/types/util/throttle.d.ts +0 -13
  189. package/dist/types/util/to-data-columns.d.ts +0 -29
  190. package/dist/types/util/void-logger.d.ts +0 -10
  191. package/jsconfig.json +0 -11
  192. package/src/Coordinator.js +0 -337
  193. package/src/Selection.js +0 -380
  194. package/src/SelectionClause.js +0 -159
  195. package/src/connectors/rest.js +0 -38
  196. package/src/index-types.ts +0 -4
  197. package/src/make-client.js +0 -101
  198. package/src/util/is-activatable.js +0 -8
  199. package/src/util/is-arrow-table.js +0 -10
  200. package/src/util/selection-types.ts +0 -137
  201. package/src/util/synchronizer.js +0 -47
  202. package/src/util/throttle.js +0 -54
  203. package/src/util/to-data-columns.js +0 -60
  204. package/src/util/void-logger.js +0 -13
  205. package/tsconfig.json +0 -11
  206. package/vitest.config.ts +0 -3
@@ -1,78 +0,0 @@
1
- /**
2
- * @typedef {Object} MakeClientOptions
3
- * @property {Coordinator} [coordinator] Mosaic coordinator.
4
- * Defaults to the global coordinator.
5
- * @property {Selection|null} [selection] A selection whose predicates are
6
- * fed into the query function to produce the SQL query.
7
- * @property {boolean} [enabled] A flag (default `true`) indicating if the
8
- * client should initially be enabled or not.
9
- * @property {boolean} [filterStable] A flag (default `true`) indicating if the
10
- * if client queries can be sped up using pre-aggregated data. Should be set
11
- * to `false` if filtering changes the groupby domain of the query.
12
- * @property {function(): Promise<void>} [prepare]
13
- * An async function to prepare the client before running queries.
14
- * @property {function(any): any} [query]
15
- * A function that returns a query from a list of selection predicates.
16
- * @property {function(any): void} [queryResult]
17
- * Called by the coordinator to return a query result.
18
- * @property {function(): void} [queryPending]
19
- * Called by the coordinator to report a query execution error.
20
- * @property {function(any): void} [queryError]
21
- * Called by the coordinator to inform the client that a query is pending.
22
- */
23
- /**
24
- * Make a new client with the given options, and connect the client to the
25
- * provided coordinator.
26
- * @param {MakeClientOptions} options The options for making the client.
27
- * @returns {MosaicClient & { destroy: () => void }} The resulting client,
28
- * along with a method to destroy the client when no longer needed.
29
- */
30
- export function makeClient(options: MakeClientOptions): MosaicClient & {
31
- destroy: () => void;
32
- };
33
- export type MakeClientOptions = {
34
- /**
35
- * Mosaic coordinator.
36
- * Defaults to the global coordinator.
37
- */
38
- coordinator?: Coordinator;
39
- /**
40
- * A selection whose predicates are
41
- * fed into the query function to produce the SQL query.
42
- */
43
- selection?: Selection | null;
44
- /**
45
- * A flag (default `true`) indicating if the
46
- * client should initially be enabled or not.
47
- */
48
- enabled?: boolean;
49
- /**
50
- * A flag (default `true`) indicating if the
51
- * if client queries can be sped up using pre-aggregated data. Should be set
52
- * to `false` if filtering changes the groupby domain of the query.
53
- */
54
- filterStable?: boolean;
55
- /**
56
- * An async function to prepare the client before running queries.
57
- */
58
- prepare?: () => Promise<void>;
59
- /**
60
- * A function that returns a query from a list of selection predicates.
61
- */
62
- query?: (arg0: any) => any;
63
- /**
64
- * Called by the coordinator to return a query result.
65
- */
66
- queryResult?: (arg0: any) => void;
67
- /**
68
- * Called by the coordinator to report a query execution error.
69
- */
70
- queryPending?: () => void;
71
- /**
72
- * Called by the coordinator to inform the client that a query is pending.
73
- */
74
- queryError?: (arg0: any) => void;
75
- };
76
- import { MosaicClient } from './MosaicClient.js';
77
- import type { Coordinator } from './Coordinator.js';
78
- import type { Selection } from './Selection.js';
@@ -1,13 +0,0 @@
1
- /**
2
- * Determine sufficient statistics to preaggregate the given node. This
3
- * method populates the *preagg* and *aggrs* arguments with necessary
4
- * information for preaggregation optimization.
5
- * @param {AggregateNode} node An aggregate function.
6
- * @param {Record<string, ExprNode>} preagg Map of column names to
7
- * expressions to include in the preaggregation table.
8
- * @returns {ExprNode} Output aggregate expression that uses preaggregated
9
- * sufficient statistics to service updates.
10
- */
11
- export function sufficientStatistics(node: AggregateNode, preagg: Record<string, ExprNode>, avg: any): ExprNode;
12
- import type { AggregateNode } from '@uwdata/mosaic-sql';
13
- import type { ExprNode } from '@uwdata/mosaic-sql';
@@ -1,17 +0,0 @@
1
- /**
2
- * Create a new cache that ignores all values.
3
- * @returns {Cache}
4
- */
5
- export function voidCache(): Cache;
6
- /**
7
- * Create a new cache that uses an LRU eviction policy.
8
- * @param {object} [options] Cache options.
9
- * @param {number} [options.max] Maximum number of cache entries.
10
- * @param {number} [options.ttl] Time-to-live for cache entries.
11
- * @returns {Cache}
12
- */
13
- export function lruCache({ max, ttl }?: {
14
- max?: number;
15
- ttl?: number;
16
- }): Cache;
17
- import type { Cache } from '../types.js';
@@ -1,12 +0,0 @@
1
- /**
2
- * Decode Arrow IPC bytes to a table instance.
3
- * The default options map date and timestamp values to JS Date objects.
4
- * @param {ArrayBuffer | Uint8Array} data Arrow IPC bytes.
5
- * @param {ExtractionOptions} [options] Arrow IPC extraction options.
6
- * If unspecified, the default options will extract date and timestamp
7
- * values to JS Date objects.
8
- * @returns {Table} A table instance.
9
- */
10
- export function decodeIPC(data: ArrayBuffer | Uint8Array, options?: ExtractionOptions): Table;
11
- import type { ExtractionOptions } from '@uwdata/flechette';
12
- import type { Table } from '@uwdata/flechette';
@@ -1,2 +0,0 @@
1
- export function distinct(a: any, b: any): boolean;
2
- export function distinctArray(a: any, b: any): boolean;
@@ -1,23 +0,0 @@
1
- /**
2
- * Queries information about fields of a table.
3
- * If the `fields` array contains a single field with the column set to '*',
4
- * the function will retrieve and return the table information using `getTableInfo`.
5
- * Otherwise, it will query individual field information using `getFieldInfo`
6
- * for each field in the `fields` array.
7
- * @param {import('../Coordinator.js').Coordinator} mc A Mosaic coordinator.
8
- * @param {import('../types.js').FieldInfoRequest[]} fields
9
- * @returns {Promise<import('../types.js').FieldInfo[]>}
10
- */
11
- export function queryFieldInfo(mc: import("../Coordinator.js").Coordinator, fields: import("../types.js").FieldInfoRequest[]): Promise<import("../types.js").FieldInfo[]>;
12
- export const Count: "count";
13
- export const Nulls: "nulls";
14
- export const Max: "max";
15
- export const Min: "min";
16
- export const Distinct: "distinct";
17
- export namespace Stats {
18
- export { Count };
19
- export { Nulls };
20
- export { Max };
21
- export { Min };
22
- export { Distinct };
23
- }
@@ -1 +0,0 @@
1
- export function fnv_hash(v: any): number;
@@ -1,6 +0,0 @@
1
- /**
2
- * Test if a value implements the Activatable interface.
3
- * @param {*} value The value to test.
4
- * @returns {value is import('../types.js').Activatable}
5
- */
6
- export function isActivatable(value: any): value is import("../types.js").Activatable;
@@ -1,8 +0,0 @@
1
- /**
2
- * Test if a value is a Flechette Arrow table.
3
- * We use a "duck typing" approach and check for a getChild function.
4
- * @param {*} values The value to test
5
- * @returns {values is import('@uwdata/flechette').Table}
6
- * true if the value duck types as Arrow data
7
- */
8
- export function isArrowTable(values: any): values is import("@uwdata/flechette").Table;
@@ -1,7 +0,0 @@
1
- /**
2
- * Maps a SQL data type to its corresponding JavaScript type.
3
- * @param {string} type The name of a SQL data type
4
- * @returns {import('../types.js').JSType} The corresponding JavaScript type name
5
- * @throws {Error} Throws an error if the given SQL type name is unsupported or unrecognized.
6
- */
7
- export function jsType(type: string): import("../types.js").JSType;
@@ -1,44 +0,0 @@
1
- export const QueryState: Readonly<{
2
- pending: symbol;
3
- ready: symbol;
4
- error: symbol;
5
- done: symbol;
6
- }>;
7
- /**
8
- * A query result Promise that can allows external callers
9
- * to resolve or reject the Promise.
10
- */
11
- export class QueryResult extends Promise<any> {
12
- /**
13
- * Create a new query result Promise.
14
- */
15
- constructor();
16
- _resolve: any;
17
- _reject: any;
18
- _state: symbol;
19
- _value: any;
20
- /**
21
- * Resolve the result Promise with a prepared value or the provided value.
22
- * This method will only succeed if either a value is provided or the promise is ready.
23
- * @param {*} value The result value.
24
- * @returns {this}
25
- */
26
- fulfill(value: any): this;
27
- /**
28
- * Prepare to resolve with the provided value.
29
- * @param {*} value The result value.
30
- * @returns {this}
31
- */
32
- ready(value: any): this;
33
- /**
34
- * Rejects the result Promise with the provided error.
35
- * @param {*} error The error value.
36
- * @returns {this}
37
- */
38
- reject(error: any): this;
39
- /**
40
- * Returns the state of this query result.
41
- * @returns {symbol}
42
- */
43
- get state(): symbol;
44
- }
@@ -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
- };
@@ -1,10 +0,0 @@
1
- export function voidLogger(): {
2
- debug(..._: any[]): void;
3
- info(..._: any[]): void;
4
- log(..._: any[]): void;
5
- warn(..._: any[]): void;
6
- error(..._: any[]): void;
7
- group(label: any): void;
8
- groupCollapsed(label: any): void;
9
- groupEnd(): void;
10
- };
package/jsconfig.json DELETED
@@ -1,11 +0,0 @@
1
- {
2
- "include": ["src/**/*"],
3
- "compilerOptions": {
4
- "checkJs": true,
5
- "noEmit": true,
6
- "noImplicitAny": false,
7
- "module": "node16",
8
- "skipLibCheck": true,
9
- "types": []
10
- }
11
- }