@kanzo-tech/mosaic 0.13.1 → 0.15.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/README.md +2 -5
- package/dist/arrow.d.ts +0 -18
- package/dist/arrow.d.ts.map +1 -1
- package/dist/arrow.js +0 -35
- package/dist/arrow.js.map +1 -1
- package/dist/index.d.ts +1 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/id-set-client.d.ts +0 -43
- package/dist/id-set-client.d.ts.map +0 -1
- package/dist/id-set-client.js +0 -35
- package/dist/id-set-client.js.map +0 -1
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@ Mosaic are two coordinators, and two coordinators are two crossfilters that neve
|
|
|
14
14
|
|
|
15
15
|
```ts
|
|
16
16
|
import { Coordinator, Selection, MosaicClient, clausePoints } from "@kanzo-tech/mosaic";
|
|
17
|
-
import { column,
|
|
17
|
+
import { column, numbers } from "@kanzo-tech/mosaic";
|
|
18
18
|
import { engine } from "@kanzo-tech/mosaic";
|
|
19
19
|
```
|
|
20
20
|
|
|
@@ -47,7 +47,7 @@ import { engine } from "@kanzo-tech/mosaic";
|
|
|
47
47
|
- **Re-exports** of the coordinator, the clients, the five clause builders and the loaders — so a
|
|
48
48
|
consumer never needs a direct `@uwdata` import. The DuckDB-WASM connector is not among them:
|
|
49
49
|
`engine()` is the only boot.
|
|
50
|
-
- **`column` / `
|
|
50
|
+
- **`column` / `numbers`** — the half of the client protocol the protocol does not
|
|
51
51
|
give you. The coordinator answers with an Arrow table, and Arrow offers a typed column only when
|
|
52
52
|
the type allows one: an integer id gives an array, a dictionary-encoded label gives nothing
|
|
53
53
|
usable. Every call site was writing `as { getChild(name: string): … }`, which asserts Arrow's
|
|
@@ -55,9 +55,6 @@ import { engine } from "@kanzo-tech/mosaic";
|
|
|
55
55
|
- **`TableExpr`** — what a `table` takes, here and in the charts: a string is one identifier in the
|
|
56
56
|
default catalog, a mosaic-sql node is a relation named in SQL — `verbatim(relation.sql)` for a
|
|
57
57
|
fossil corpus's catalog-qualified relation.
|
|
58
|
-
- **`IdSetClient`** — the crossfilter adapter for a view whose positions are not in the database.
|
|
59
|
-
A GPU canvas or a map cannot publish `weight BETWEEN …`; there is no column to write the
|
|
60
|
-
predicate over. It can only enumerate what was hit.
|
|
61
58
|
|
|
62
59
|
## Why it is not part of `@kanzo-tech/ui`
|
|
63
60
|
|
package/dist/arrow.d.ts
CHANGED
|
@@ -16,22 +16,4 @@
|
|
|
16
16
|
export declare function column(data: unknown, field: string): unknown[];
|
|
17
17
|
/** The same, coerced — Arrow hands back `BigInt` for some integer widths. */
|
|
18
18
|
export declare function numbers(data: unknown, field: string): number[];
|
|
19
|
-
/** A pre-sized destination `fillColumn` can write into. */
|
|
20
|
-
export type NumericArray = Float32Array | Float64Array | Uint32Array | Uint16Array | Int32Array;
|
|
21
|
-
/**
|
|
22
|
-
* One numeric column, written straight into a typed array the caller already owns.
|
|
23
|
-
*
|
|
24
|
-
* `numbers()` is the wrong tool once a result is large: `toArray()` already hands back a typed
|
|
25
|
-
* buffer, and `Array.from(...).map(Number)` turns it into two full-length boxed `number[]` on the
|
|
26
|
-
* way to a third array that was the actual destination. Three allocations to move nothing. This is
|
|
27
|
-
* the same pass with none of them — which is what lets a caller size once against its own limit and
|
|
28
|
-
* fill from the Arrow batches as they arrive.
|
|
29
|
-
*
|
|
30
|
-
* `stride` and `offset` are how interleaving is expressed: `x` at `(0, 2)` and `y` at `(1, 2)` fill
|
|
31
|
-
* one `[x0, y0, x1, y1, …]` buffer with no seam between them.
|
|
32
|
-
*
|
|
33
|
-
* Returns how many rows were written, which is `min(rows, capacity)` — a caller that sized against
|
|
34
|
-
* a `LIMIT` uses it to `subarray` down to what actually came back.
|
|
35
|
-
*/
|
|
36
|
-
export declare function fillColumn(data: unknown, field: string, into: NumericArray, offset?: number, stride?: number): number;
|
|
37
19
|
//# sourceMappingURL=arrow.d.ts.map
|
package/dist/arrow.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arrow.d.ts","sourceRoot":"","sources":["../src/arrow.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAMH,4CAA4C;AAC5C,wBAAgB,MAAM,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,EAAE,CAI9D;AAED,6EAA6E;AAC7E,wBAAgB,OAAO,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAE9D
|
|
1
|
+
{"version":3,"file":"arrow.d.ts","sourceRoot":"","sources":["../src/arrow.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAMH,4CAA4C;AAC5C,wBAAgB,MAAM,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,EAAE,CAI9D;AAED,6EAA6E;AAC7E,wBAAgB,OAAO,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAE9D"}
|
package/dist/arrow.js
CHANGED
|
@@ -23,39 +23,4 @@ export function column(data, field) {
|
|
|
23
23
|
export function numbers(data, field) {
|
|
24
24
|
return column(data, field).map(Number);
|
|
25
25
|
}
|
|
26
|
-
/**
|
|
27
|
-
* One numeric column, written straight into a typed array the caller already owns.
|
|
28
|
-
*
|
|
29
|
-
* `numbers()` is the wrong tool once a result is large: `toArray()` already hands back a typed
|
|
30
|
-
* buffer, and `Array.from(...).map(Number)` turns it into two full-length boxed `number[]` on the
|
|
31
|
-
* way to a third array that was the actual destination. Three allocations to move nothing. This is
|
|
32
|
-
* the same pass with none of them — which is what lets a caller size once against its own limit and
|
|
33
|
-
* fill from the Arrow batches as they arrive.
|
|
34
|
-
*
|
|
35
|
-
* `stride` and `offset` are how interleaving is expressed: `x` at `(0, 2)` and `y` at `(1, 2)` fill
|
|
36
|
-
* one `[x0, y0, x1, y1, …]` buffer with no seam between them.
|
|
37
|
-
*
|
|
38
|
-
* Returns how many rows were written, which is `min(rows, capacity)` — a caller that sized against
|
|
39
|
-
* a `LIMIT` uses it to `subarray` down to what actually came back.
|
|
40
|
-
*/
|
|
41
|
-
export function fillColumn(data, field, into, offset = 0, stride = 1) {
|
|
42
|
-
const capacity = Math.max(0, Math.ceil((into.length - offset) / stride));
|
|
43
|
-
const values = data.getChild?.(field)?.toArray();
|
|
44
|
-
if (values) {
|
|
45
|
-
const n = Math.min(values.length, capacity);
|
|
46
|
-
// `Number` is identity on the numeric widths and the conversion on the BigInt ones; either way
|
|
47
|
-
// it reads an element rather than allocating one.
|
|
48
|
-
for (let i = 0; i < n; i++)
|
|
49
|
-
into[offset + i * stride] = Number(values[i]);
|
|
50
|
-
return n;
|
|
51
|
-
}
|
|
52
|
-
let i = 0;
|
|
53
|
-
for (const row of data) {
|
|
54
|
-
if (i >= capacity)
|
|
55
|
-
break;
|
|
56
|
-
into[offset + i * stride] = Number(row[field]);
|
|
57
|
-
i++;
|
|
58
|
-
}
|
|
59
|
-
return i;
|
|
60
|
-
}
|
|
61
26
|
//# sourceMappingURL=arrow.js.map
|
package/dist/arrow.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arrow.js","sourceRoot":"","sources":["../src/arrow.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAMH,4CAA4C;AAC5C,MAAM,UAAU,MAAM,CAAC,IAAa,EAAE,KAAa;IACjD,MAAM,KAAK,GAAI,IAAkB,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,CAAC;IACpD,IAAI,KAAK;QAAE,OAAO,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;IAC9C,OAAO,KAAK,CAAC,IAAI,CAAC,IAAyC,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC;AACpF,CAAC;AAED,6EAA6E;AAC7E,MAAM,UAAU,OAAO,CAAC,IAAa,EAAE,KAAa;IAClD,OAAO,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACzC,CAAC
|
|
1
|
+
{"version":3,"file":"arrow.js","sourceRoot":"","sources":["../src/arrow.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAMH,4CAA4C;AAC5C,MAAM,UAAU,MAAM,CAAC,IAAa,EAAE,KAAa;IACjD,MAAM,KAAK,GAAI,IAAkB,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,CAAC;IACpD,IAAI,KAAK;QAAE,OAAO,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;IAC9C,OAAO,KAAK,CAAC,IAAI,CAAC,IAAyC,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC;AACpF,CAAC;AAED,6EAA6E;AAC7E,MAAM,UAAU,OAAO,CAAC,IAAa,EAAE,KAAa;IAClD,OAAO,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACzC,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -23,11 +23,9 @@
|
|
|
23
23
|
export { Coordinator, MosaicClient, Selection, makeClient, clausePoint, clausePoints, clauseInterval, clauseIntervals, clauseMatch, type SelectionClause, } from "@uwdata/mosaic-core";
|
|
24
24
|
export { Query, asc, desc, loadCSV, loadJSON, loadObjects, loadParquet, loadSpatial, loadExtension, type ExprValue, type FilterExpr, } from "@uwdata/mosaic-sql";
|
|
25
25
|
/** Ours: turning an Arrow answer into values, which the client protocol does not do for you. */
|
|
26
|
-
export { column,
|
|
26
|
+
export { column, numbers } from "./arrow.js";
|
|
27
27
|
/** Ours: what every `table` here and in the charts takes — one identifier, or a relation named in SQL. */
|
|
28
28
|
export { type TableExpr } from "./table.js";
|
|
29
|
-
/** Ours: the crossfilter adapter for a view whose positions are not in the database. */
|
|
30
|
-
export { IdSetClient, type IdSetClientOptions } from "./id-set-client.js";
|
|
31
29
|
/**
|
|
32
30
|
* Ours: the page's one DuckDB-WASM engine — the coordinator and the file registry beside it. It is
|
|
33
31
|
* the only door to `wasmConnector`, which is why that is no longer re-exported: a second boot is a
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EACL,WAAW,EACX,YAAY,EACZ,SAAS,EACT,UAAU,EACV,WAAW,EACX,YAAY,EACZ,cAAc,EACd,eAAe,EACf,WAAW,EACX,KAAK,eAAe,GACrB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,KAAK,EACL,GAAG,EACH,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,WAAW,EACX,WAAW,EACX,WAAW,EACX,aAAa,EACb,KAAK,SAAS,EACd,KAAK,UAAU,GAChB,MAAM,oBAAoB,CAAC;AAE5B,gGAAgG;AAChG,OAAO,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EACL,WAAW,EACX,YAAY,EACZ,SAAS,EACT,UAAU,EACV,WAAW,EACX,YAAY,EACZ,cAAc,EACd,eAAe,EACf,WAAW,EACX,KAAK,eAAe,GACrB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,KAAK,EACL,GAAG,EACH,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,WAAW,EACX,WAAW,EACX,WAAW,EACX,aAAa,EACb,KAAK,SAAS,EACd,KAAK,UAAU,GAChB,MAAM,oBAAoB,CAAC;AAE5B,gGAAgG;AAChG,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE7C,0GAA0G;AAC1G,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C;;;;GAIG;AACH,OAAO,EAAE,MAAM,EAAE,KAAK,MAAM,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -23,11 +23,9 @@
|
|
|
23
23
|
export { Coordinator, MosaicClient, Selection, makeClient, clausePoint, clausePoints, clauseInterval, clauseIntervals, clauseMatch, } from "@uwdata/mosaic-core";
|
|
24
24
|
export { Query, asc, desc, loadCSV, loadJSON, loadObjects, loadParquet, loadSpatial, loadExtension, } from "@uwdata/mosaic-sql";
|
|
25
25
|
/** Ours: turning an Arrow answer into values, which the client protocol does not do for you. */
|
|
26
|
-
export { column,
|
|
26
|
+
export { column, numbers } from "./arrow.js";
|
|
27
27
|
/** Ours: what every `table` here and in the charts takes — one identifier, or a relation named in SQL. */
|
|
28
28
|
export {} from "./table.js";
|
|
29
|
-
/** Ours: the crossfilter adapter for a view whose positions are not in the database. */
|
|
30
|
-
export { IdSetClient } from "./id-set-client.js";
|
|
31
29
|
/**
|
|
32
30
|
* Ours: the page's one DuckDB-WASM engine — the coordinator and the file registry beside it. It is
|
|
33
31
|
* the only door to `wasmConnector`, which is why that is no longer re-exported: a second boot is a
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EACL,WAAW,EACX,YAAY,EACZ,SAAS,EACT,UAAU,EACV,WAAW,EACX,YAAY,EACZ,cAAc,EACd,eAAe,EACf,WAAW,GAEZ,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,KAAK,EACL,GAAG,EACH,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,WAAW,EACX,WAAW,EACX,WAAW,EACX,aAAa,GAGd,MAAM,oBAAoB,CAAC;AAE5B,gGAAgG;AAChG,OAAO,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EACL,WAAW,EACX,YAAY,EACZ,SAAS,EACT,UAAU,EACV,WAAW,EACX,YAAY,EACZ,cAAc,EACd,eAAe,EACf,WAAW,GAEZ,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,KAAK,EACL,GAAG,EACH,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,WAAW,EACX,WAAW,EACX,WAAW,EACX,aAAa,GAGd,MAAM,oBAAoB,CAAC;AAE5B,gGAAgG;AAChG,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE7C,0GAA0G;AAC1G,OAAO,EAAkB,MAAM,YAAY,CAAC;AAE5C;;;;GAIG;AACH,OAAO,EAAE,MAAM,EAAe,MAAM,aAAa,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kanzo-tech/mosaic",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.0",
|
|
4
4
|
"description": "The Mosaic conversation, without React — coordinator, clients and clauses re-exported as one surface, plus the Arrow column reader and the id-set client that every consumer of them was writing by hand.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
package/dist/id-set-client.d.ts
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { MosaicClient, type Selection } from "@uwdata/mosaic-core";
|
|
2
|
-
import { type FilterExpr } from "@uwdata/mosaic-sql";
|
|
3
|
-
import type { TableExpr } from "./table.js";
|
|
4
|
-
/**
|
|
5
|
-
* The crossfilter adapter for a view whose positions are not in the database.
|
|
6
|
-
*
|
|
7
|
-
* A `MosaicClient` asks for two things, and this is both:
|
|
8
|
-
*
|
|
9
|
-
* `query(filter)` — which rows survive the page's filters? The coordinator answers with a column
|
|
10
|
-
* of ids, and the view fades everything else. The **observable** half.
|
|
11
|
-
* `publish(ids)` — the user selected these. A points clause, `id IN (…)`, which every other chart
|
|
12
|
-
* on the page filters by. The **controllable** half.
|
|
13
|
-
*
|
|
14
|
-
* The id list is not a shortcut, it is the only thing such a view can say. A Plot brush publishes
|
|
15
|
-
* `weight BETWEEN …`, an interval in data space, because Plot's `x` IS a column. A GPU simulation's
|
|
16
|
-
* `x` exists nowhere in the database, so no predicate over columns can describe the loop the user
|
|
17
|
-
* drew. Enumerating what was hit is the honest translation — and its cost is the length of the `IN`
|
|
18
|
-
* list, which is the real ceiling on the whole approach.
|
|
19
|
-
*
|
|
20
|
-
* Nothing here knows what draws. It is named for what it exchanges rather than for the renderer it
|
|
21
|
-
* was first written against, because a canvas, a map and an imperative widget all reach the
|
|
22
|
-
* crossfilter through exactly this shape.
|
|
23
|
-
*/
|
|
24
|
-
export interface IdSetClientOptions {
|
|
25
|
-
/** The relation. Its `idField` column is what gets published and matched. */
|
|
26
|
-
table: TableExpr;
|
|
27
|
-
idField: string;
|
|
28
|
-
/** What the view fades by. */
|
|
29
|
-
filterBy: Selection;
|
|
30
|
-
/** Where the selection publishes. */
|
|
31
|
-
as: Selection;
|
|
32
|
-
/** The surviving ids, in relation order, on every filter change. */
|
|
33
|
-
onSurvivors: (ids: readonly unknown[]) => void;
|
|
34
|
-
}
|
|
35
|
-
export declare class IdSetClient extends MosaicClient {
|
|
36
|
-
#private;
|
|
37
|
-
constructor(options: IdSetClientOptions);
|
|
38
|
-
query(filter?: FilterExpr): import("@uwdata/mosaic-sql").SelectQuery;
|
|
39
|
-
queryResult(data: unknown): this;
|
|
40
|
-
/** `null` retracts the selection: an empty clause has a null predicate, which the resolver drops. */
|
|
41
|
-
publish(ids: readonly unknown[] | null): void;
|
|
42
|
-
}
|
|
43
|
-
//# sourceMappingURL=id-set-client.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"id-set-client.d.ts","sourceRoot":"","sources":["../src/id-set-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAgB,KAAK,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACjF,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAE5D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,MAAM,WAAW,kBAAkB;IACjC,6EAA6E;IAC7E,KAAK,EAAE,SAAS,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,8BAA8B;IAC9B,QAAQ,EAAE,SAAS,CAAC;IACpB,qCAAqC;IACrC,EAAE,EAAE,SAAS,CAAC;IACd,oEAAoE;IACpE,WAAW,EAAE,CAAC,GAAG,EAAE,SAAS,OAAO,EAAE,KAAK,IAAI,CAAC;CAChD;AAED,qBAAa,WAAY,SAAQ,YAAY;;gBAM/B,OAAO,EAAE,kBAAkB;IAQ9B,KAAK,CAAC,MAAM,GAAE,UAAe;IAI7B,WAAW,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI;IAKzC,qGAAqG;IACrG,OAAO,CAAC,GAAG,EAAE,SAAS,OAAO,EAAE,GAAG,IAAI,GAAG,IAAI;CAY9C"}
|
package/dist/id-set-client.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { MosaicClient, clausePoints } from "@uwdata/mosaic-core";
|
|
2
|
-
import { Query } from "@uwdata/mosaic-sql";
|
|
3
|
-
import { column } from "./arrow.js";
|
|
4
|
-
export class IdSetClient extends MosaicClient {
|
|
5
|
-
#table;
|
|
6
|
-
#idField;
|
|
7
|
-
#as;
|
|
8
|
-
#emit;
|
|
9
|
-
constructor(options) {
|
|
10
|
-
super(options.filterBy);
|
|
11
|
-
this.#table = options.table;
|
|
12
|
-
this.#idField = options.idField;
|
|
13
|
-
this.#as = options.as;
|
|
14
|
-
this.#emit = options.onSurvivors;
|
|
15
|
-
}
|
|
16
|
-
query(filter = []) {
|
|
17
|
-
return Query.from(this.#table).select({ id: this.#idField }).where(filter);
|
|
18
|
-
}
|
|
19
|
-
queryResult(data) {
|
|
20
|
-
this.#emit(column(data, "id"));
|
|
21
|
-
return this;
|
|
22
|
-
}
|
|
23
|
-
/** `null` retracts the selection: an empty clause has a null predicate, which the resolver drops. */
|
|
24
|
-
publish(ids) {
|
|
25
|
-
this.#as.update(clausePoints([this.#idField], ids?.map((id) => [id]), {
|
|
26
|
-
source: this,
|
|
27
|
-
// A crossfilter normally exempts a client from its own clause, so a brush can be widened
|
|
28
|
-
// after it has collapsed the chart under it. A view that FADES an excluded row instead of
|
|
29
|
-
// removing it does not need the exemption: the row is still on screen and still
|
|
30
|
-
// selectable. Declining it is what makes the selection visible — the fade is the brush.
|
|
31
|
-
clients: new Set(),
|
|
32
|
-
}));
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
//# sourceMappingURL=id-set-client.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"id-set-client.js","sourceRoot":"","sources":["../src/id-set-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAkB,MAAM,qBAAqB,CAAC;AACjF,OAAO,EAAE,KAAK,EAAmB,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAoCpC,MAAM,OAAO,WAAY,SAAQ,YAAY;IAC3C,MAAM,CAAY;IAClB,QAAQ,CAAS;IACjB,GAAG,CAAY;IACf,KAAK,CAAoC;IAEzC,YAAY,OAA2B;QACrC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QACxB,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC;QAC5B,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC;QAChC,IAAI,CAAC,GAAG,GAAG,OAAO,CAAC,EAAE,CAAC;QACtB,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,WAAW,CAAC;IACnC,CAAC;IAEQ,KAAK,CAAC,SAAqB,EAAE;QACpC,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAC7E,CAAC;IAEQ,WAAW,CAAC,IAAa;QAChC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;QAC/B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,qGAAqG;IACrG,OAAO,CAAC,GAA8B;QACpC,IAAI,CAAC,GAAG,CAAC,MAAM,CACb,YAAY,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE;YACpD,MAAM,EAAE,IAAI;YACZ,yFAAyF;YACzF,0FAA0F;YAC1F,gFAAgF;YAChF,wFAAwF;YACxF,OAAO,EAAE,IAAI,GAAG,EAAgB;SACjC,CAAC,CACH,CAAC;IACJ,CAAC;CACF"}
|