@dataelvisliang/embedding-atlas 0.15.0-highlight.2 → 0.16.1-highlight.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/dist/{chunk-CNWfCa2H.js → chunk-CQWmKO2N.js} +20427 -19062
- package/dist/{chunk-tn9RgvOq.js → chunk-DZZQiXk1.js} +557 -553
- package/dist/{chunk-ssRSlsnF.js → chunk-DoyQAvDN.js} +103 -86
- package/dist/component.js +1 -1
- package/dist/index.d.ts +52 -8
- package/dist/index.js +4 -4
- package/dist/react.d.ts +52 -8
- package/dist/react.js +10 -10
- package/dist/viewer.d.ts +52 -8
- package/dist/viewer.js +1 -1
- package/package.json +92 -92
package/dist/component.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { Coordinator } from '@uwdata/mosaic-core';
|
|
2
|
+
import { JSONSchema7 } from 'json-schema';
|
|
3
|
+
import { Readable } from 'svelte/store';
|
|
2
4
|
import { Selection as Selection_2 } from '@uwdata/mosaic-core';
|
|
3
5
|
|
|
4
6
|
declare type AdditionalHeaderContentClass = new (node: HTMLElement, props: AdditionalHeaderContentProps) => {
|
|
@@ -38,7 +40,7 @@ declare interface Axis {
|
|
|
38
40
|
labelMaxWidth?: number;
|
|
39
41
|
}
|
|
40
42
|
|
|
41
|
-
declare type BuiltinChartSpec = ChartSpec | ContentViewerSpec | CountPlotSpec | EmbeddingSpec | MarkdownSpec | PredicatesSpec | TableSpec;
|
|
43
|
+
export declare type BuiltinChartSpec = ChartSpec | ContentViewerSpec | CountPlotSpec | EmbeddingSpec | MarkdownSpec | PredicatesSpec | TableSpec;
|
|
42
44
|
|
|
43
45
|
declare interface Cache_2 {
|
|
44
46
|
/** Gets an object from the cache with the given key. Returns `null` if the entry is not found. */
|
|
@@ -247,7 +249,7 @@ export declare interface DataPoint {
|
|
|
247
249
|
|
|
248
250
|
export declare type DataPointID = string | number | bigint;
|
|
249
251
|
|
|
250
|
-
/** Data value */
|
|
252
|
+
/** Data value (a value in the data domain, which can be mapped to the visual domain through a scale) */
|
|
251
253
|
declare type DataValue = string | number | [number, number];
|
|
252
254
|
|
|
253
255
|
export declare function defaultCategoryColors(count: number): string[];
|
|
@@ -349,6 +351,8 @@ export declare interface EmbeddingAtlasProps {
|
|
|
349
351
|
onExportApplication?: (() => Promise<void>) | null;
|
|
350
352
|
/** A callback when the state of the viewer changes. You may serialize the state to JSON and load it back. */
|
|
351
353
|
onStateChange?: ((state: EmbeddingAtlasState) => void) | null;
|
|
354
|
+
/** Model context API where the component will register its tools to. */
|
|
355
|
+
modelContext?: ModelContextAPI | null;
|
|
352
356
|
/** A cache to speed up initialization of the viewer. */
|
|
353
357
|
cache?: Cache_2 | null;
|
|
354
358
|
/**
|
|
@@ -380,7 +384,7 @@ export declare interface EmbeddingAtlasState {
|
|
|
380
384
|
|
|
381
385
|
declare interface EmbeddingSpec {
|
|
382
386
|
type: "embedding";
|
|
383
|
-
title
|
|
387
|
+
title?: string;
|
|
384
388
|
data: {
|
|
385
389
|
x: string;
|
|
386
390
|
y: string;
|
|
@@ -635,7 +639,7 @@ export declare interface EmbeddingViewTheme {
|
|
|
635
639
|
|
|
636
640
|
/** Encoding */
|
|
637
641
|
declare type Encoding = {
|
|
638
|
-
/** The data field */
|
|
642
|
+
/** The data field to encode */
|
|
639
643
|
field: SQLField;
|
|
640
644
|
bin?: {
|
|
641
645
|
/** Desired bin count */
|
|
@@ -653,6 +657,7 @@ declare type Encoding = {
|
|
|
653
657
|
/** Normalize the value by x or y */
|
|
654
658
|
normalize?: "x" | "y";
|
|
655
659
|
} | {
|
|
660
|
+
/** The data value to encode */
|
|
656
661
|
value: DataValue;
|
|
657
662
|
};
|
|
658
663
|
|
|
@@ -716,7 +721,7 @@ export declare interface Label {
|
|
|
716
721
|
declare interface Layer {
|
|
717
722
|
/** Data source, default to the main data table */
|
|
718
723
|
from?: SQLTable;
|
|
719
|
-
/** Filter the data. Use $filter to refer to the shared filter */
|
|
724
|
+
/** Filter the data. Use $filter to refer to the shared filter (a cross-filter) */
|
|
720
725
|
filter?: "$filter";
|
|
721
726
|
/** Mark type */
|
|
722
727
|
mark: MarkType;
|
|
@@ -735,6 +740,8 @@ declare interface Layer {
|
|
|
735
740
|
width?: Dimension;
|
|
736
741
|
/** Height of bar / rect marks */
|
|
737
742
|
height?: Dimension;
|
|
743
|
+
/** Size (area) of point marks, default 100. */
|
|
744
|
+
size?: number;
|
|
738
745
|
/** Encoding */
|
|
739
746
|
encoding?: Partial<Record<Attribute, Encoding>>;
|
|
740
747
|
}
|
|
@@ -760,9 +767,9 @@ declare interface MarkStyle {
|
|
|
760
767
|
/** Stroke cap */
|
|
761
768
|
strokeCap?: "butt" | "round" | "square";
|
|
762
769
|
/** Stroke join */
|
|
763
|
-
strokeJoin?: "round" | "miter
|
|
764
|
-
/** Paint order */
|
|
765
|
-
paintOrder?:
|
|
770
|
+
strokeJoin?: "round" | "miter" | "bevel";
|
|
771
|
+
/** Paint order, default is `fill stroke`, fill first, then stroke. */
|
|
772
|
+
paintOrder?: "fill stroke" | "stroke fill";
|
|
766
773
|
/** Opacity */
|
|
767
774
|
opacity?: number;
|
|
768
775
|
}
|
|
@@ -772,6 +779,32 @@ declare type MarkType = "bar" | "rect" | "line" | "area" | "point" | "rule";
|
|
|
772
779
|
|
|
773
780
|
export declare function maxDensityModeCategories(): number;
|
|
774
781
|
|
|
782
|
+
declare interface MCPContext {
|
|
783
|
+
tools?: MCPTool[];
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
/** Tool definition interface */
|
|
787
|
+
declare interface MCPTool {
|
|
788
|
+
/** Unique name for the tool */
|
|
789
|
+
name: string;
|
|
790
|
+
/** The title of the tool */
|
|
791
|
+
title?: string;
|
|
792
|
+
/** Natural language description of what the tool does */
|
|
793
|
+
description: string;
|
|
794
|
+
/** JSON Schema defining the input parameters */
|
|
795
|
+
inputSchema: JSONSchema7;
|
|
796
|
+
/** JSON Schema defining the output parameters */
|
|
797
|
+
outputSchema?: JSONSchema7;
|
|
798
|
+
/** Function that implements the tool and returns a result */
|
|
799
|
+
execute: (input: any, agent: unknown) => Promise<ToolResponse>;
|
|
800
|
+
}
|
|
801
|
+
|
|
802
|
+
/** A type that mirrors the current design in the upcoming navigator.modelContext API */
|
|
803
|
+
declare interface ModelContextAPI {
|
|
804
|
+
provideContext(context: MCPContext): void;
|
|
805
|
+
readonly connectionStatus?: Readable<"connecting" | "connected" | "closed" | "error">;
|
|
806
|
+
}
|
|
807
|
+
|
|
775
808
|
export declare interface OverlayProxy {
|
|
776
809
|
location: (x: number, y: number) => {
|
|
777
810
|
x: number;
|
|
@@ -1016,6 +1049,17 @@ declare interface ThemeConfig_2 {
|
|
|
1016
1049
|
rowHoverColor?: string;
|
|
1017
1050
|
}
|
|
1018
1051
|
|
|
1052
|
+
/** Tool response format */
|
|
1053
|
+
declare interface ToolResponse {
|
|
1054
|
+
content: Array<{
|
|
1055
|
+
type: "text" | "image" | "video";
|
|
1056
|
+
text?: string;
|
|
1057
|
+
url?: string;
|
|
1058
|
+
[key: string]: any;
|
|
1059
|
+
}>;
|
|
1060
|
+
isError?: boolean;
|
|
1061
|
+
}
|
|
1062
|
+
|
|
1019
1063
|
export declare interface UMAP {
|
|
1020
1064
|
/** The current epoch number */
|
|
1021
1065
|
get epoch(): number;
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { l as s, s as r, Z as o, u as t } from "./chunk-
|
|
2
|
-
import { J as i, f } from "./chunk-
|
|
3
|
-
import {
|
|
1
|
+
import { l as s, s as r, Z as o, u as t } from "./chunk-DZZQiXk1.js";
|
|
2
|
+
import { J as i, f } from "./chunk-DoyQAvDN.js";
|
|
3
|
+
import { l as m, W as g } from "./chunk-CQWmKO2N.js";
|
|
4
4
|
import { createKNN as x, createUMAP as C } from "./umap.js";
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as EmbeddingAtlas,
|
|
7
7
|
s as EmbeddingView,
|
|
8
8
|
r as EmbeddingViewMosaic,
|
|
9
9
|
i as Table,
|
package/dist/react.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { Coordinator } from '@uwdata/mosaic-core';
|
|
2
|
+
import { JSONSchema7 } from 'json-schema';
|
|
3
|
+
import { Readable } from 'svelte/store';
|
|
2
4
|
import { Selection as Selection_3 } from '@uwdata/mosaic-core';
|
|
3
5
|
|
|
4
6
|
declare type AdditionalHeaderContentClass = new (node: HTMLElement, props: AdditionalHeaderContentProps) => {
|
|
@@ -38,7 +40,7 @@ declare interface Axis {
|
|
|
38
40
|
labelMaxWidth?: number;
|
|
39
41
|
}
|
|
40
42
|
|
|
41
|
-
declare type BuiltinChartSpec = ChartSpec | ContentViewerSpec | CountPlotSpec | EmbeddingSpec | MarkdownSpec | PredicatesSpec | TableSpec;
|
|
43
|
+
export declare type BuiltinChartSpec = ChartSpec | ContentViewerSpec | CountPlotSpec | EmbeddingSpec | MarkdownSpec | PredicatesSpec | TableSpec;
|
|
42
44
|
|
|
43
45
|
declare interface Cache_2 {
|
|
44
46
|
/** Gets an object from the cache with the given key. Returns `null` if the entry is not found. */
|
|
@@ -247,7 +249,7 @@ export declare interface DataPoint {
|
|
|
247
249
|
|
|
248
250
|
export declare type DataPointID = string | number | bigint;
|
|
249
251
|
|
|
250
|
-
/** Data value */
|
|
252
|
+
/** Data value (a value in the data domain, which can be mapped to the visual domain through a scale) */
|
|
251
253
|
declare type DataValue = string | number | [number, number];
|
|
252
254
|
|
|
253
255
|
export declare function defaultCategoryColors(count: number): string[];
|
|
@@ -342,6 +344,8 @@ export declare interface EmbeddingAtlasProps {
|
|
|
342
344
|
onExportApplication?: (() => Promise<void>) | null;
|
|
343
345
|
/** A callback when the state of the viewer changes. You may serialize the state to JSON and load it back. */
|
|
344
346
|
onStateChange?: ((state: EmbeddingAtlasState) => void) | null;
|
|
347
|
+
/** Model context API where the component will register its tools to. */
|
|
348
|
+
modelContext?: ModelContextAPI | null;
|
|
345
349
|
/** A cache to speed up initialization of the viewer. */
|
|
346
350
|
cache?: Cache_2 | null;
|
|
347
351
|
/**
|
|
@@ -373,7 +377,7 @@ export declare interface EmbeddingAtlasState {
|
|
|
373
377
|
|
|
374
378
|
declare interface EmbeddingSpec {
|
|
375
379
|
type: "embedding";
|
|
376
|
-
title
|
|
380
|
+
title?: string;
|
|
377
381
|
data: {
|
|
378
382
|
x: string;
|
|
379
383
|
y: string;
|
|
@@ -616,7 +620,7 @@ export declare interface EmbeddingViewTheme {
|
|
|
616
620
|
|
|
617
621
|
/** Encoding */
|
|
618
622
|
declare type Encoding = {
|
|
619
|
-
/** The data field */
|
|
623
|
+
/** The data field to encode */
|
|
620
624
|
field: SQLField;
|
|
621
625
|
bin?: {
|
|
622
626
|
/** Desired bin count */
|
|
@@ -634,6 +638,7 @@ declare type Encoding = {
|
|
|
634
638
|
/** Normalize the value by x or y */
|
|
635
639
|
normalize?: "x" | "y";
|
|
636
640
|
} | {
|
|
641
|
+
/** The data value to encode */
|
|
637
642
|
value: DataValue;
|
|
638
643
|
};
|
|
639
644
|
|
|
@@ -697,7 +702,7 @@ export declare interface Label {
|
|
|
697
702
|
declare interface Layer {
|
|
698
703
|
/** Data source, default to the main data table */
|
|
699
704
|
from?: SQLTable;
|
|
700
|
-
/** Filter the data. Use $filter to refer to the shared filter */
|
|
705
|
+
/** Filter the data. Use $filter to refer to the shared filter (a cross-filter) */
|
|
701
706
|
filter?: "$filter";
|
|
702
707
|
/** Mark type */
|
|
703
708
|
mark: MarkType;
|
|
@@ -716,6 +721,8 @@ declare interface Layer {
|
|
|
716
721
|
width?: Dimension;
|
|
717
722
|
/** Height of bar / rect marks */
|
|
718
723
|
height?: Dimension;
|
|
724
|
+
/** Size (area) of point marks, default 100. */
|
|
725
|
+
size?: number;
|
|
719
726
|
/** Encoding */
|
|
720
727
|
encoding?: Partial<Record<Attribute, Encoding>>;
|
|
721
728
|
}
|
|
@@ -741,9 +748,9 @@ declare interface MarkStyle {
|
|
|
741
748
|
/** Stroke cap */
|
|
742
749
|
strokeCap?: "butt" | "round" | "square";
|
|
743
750
|
/** Stroke join */
|
|
744
|
-
strokeJoin?: "round" | "miter
|
|
745
|
-
/** Paint order */
|
|
746
|
-
paintOrder?:
|
|
751
|
+
strokeJoin?: "round" | "miter" | "bevel";
|
|
752
|
+
/** Paint order, default is `fill stroke`, fill first, then stroke. */
|
|
753
|
+
paintOrder?: "fill stroke" | "stroke fill";
|
|
747
754
|
/** Opacity */
|
|
748
755
|
opacity?: number;
|
|
749
756
|
}
|
|
@@ -753,6 +760,32 @@ declare type MarkType = "bar" | "rect" | "line" | "area" | "point" | "rule";
|
|
|
753
760
|
|
|
754
761
|
export declare function maxDensityModeCategories(): number;
|
|
755
762
|
|
|
763
|
+
declare interface MCPContext {
|
|
764
|
+
tools?: MCPTool[];
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
/** Tool definition interface */
|
|
768
|
+
declare interface MCPTool {
|
|
769
|
+
/** Unique name for the tool */
|
|
770
|
+
name: string;
|
|
771
|
+
/** The title of the tool */
|
|
772
|
+
title?: string;
|
|
773
|
+
/** Natural language description of what the tool does */
|
|
774
|
+
description: string;
|
|
775
|
+
/** JSON Schema defining the input parameters */
|
|
776
|
+
inputSchema: JSONSchema7;
|
|
777
|
+
/** JSON Schema defining the output parameters */
|
|
778
|
+
outputSchema?: JSONSchema7;
|
|
779
|
+
/** Function that implements the tool and returns a result */
|
|
780
|
+
execute: (input: any, agent: unknown) => Promise<ToolResponse>;
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
/** A type that mirrors the current design in the upcoming navigator.modelContext API */
|
|
784
|
+
declare interface ModelContextAPI {
|
|
785
|
+
provideContext(context: MCPContext): void;
|
|
786
|
+
readonly connectionStatus?: Readable<"connecting" | "connected" | "closed" | "error">;
|
|
787
|
+
}
|
|
788
|
+
|
|
756
789
|
export declare interface OverlayProxy {
|
|
757
790
|
location: (x: number, y: number) => {
|
|
758
791
|
x: number;
|
|
@@ -991,6 +1024,17 @@ declare interface ThemeConfig_2 {
|
|
|
991
1024
|
rowHoverColor?: string;
|
|
992
1025
|
}
|
|
993
1026
|
|
|
1027
|
+
/** Tool response format */
|
|
1028
|
+
declare interface ToolResponse {
|
|
1029
|
+
content: Array<{
|
|
1030
|
+
type: "text" | "image" | "video";
|
|
1031
|
+
text?: string;
|
|
1032
|
+
url?: string;
|
|
1033
|
+
[key: string]: any;
|
|
1034
|
+
}>;
|
|
1035
|
+
isError?: boolean;
|
|
1036
|
+
}
|
|
1037
|
+
|
|
994
1038
|
export declare interface UMAP {
|
|
995
1039
|
/** The current epoch number */
|
|
996
1040
|
get epoch(): number;
|
package/dist/react.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { useRef as n, useEffect as a, createElement as
|
|
2
|
-
import { l, s as d } from "./chunk-
|
|
3
|
-
import { Z as A, u as J } from "./chunk-
|
|
4
|
-
import { J as u } from "./chunk-
|
|
5
|
-
import { f as R } from "./chunk-
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
import { useRef as n, useEffect as a, createElement as l } from "react";
|
|
2
|
+
import { l as m, s as d } from "./chunk-DZZQiXk1.js";
|
|
3
|
+
import { Z as A, u as J } from "./chunk-DZZQiXk1.js";
|
|
4
|
+
import { J as u } from "./chunk-DoyQAvDN.js";
|
|
5
|
+
import { f as R } from "./chunk-DoyQAvDN.js";
|
|
6
|
+
import { l as p } from "./chunk-CQWmKO2N.js";
|
|
7
|
+
import { W } from "./chunk-CQWmKO2N.js";
|
|
8
8
|
import { createKNN as D, createUMAP as K } from "./umap.js";
|
|
9
9
|
function e(s, f = "div", i = { display: "flex" }) {
|
|
10
10
|
return (t) => {
|
|
@@ -16,14 +16,14 @@ function e(s, f = "div", i = { display: "flex" }) {
|
|
|
16
16
|
};
|
|
17
17
|
}, []), a(() => {
|
|
18
18
|
r.current?.update(t);
|
|
19
|
-
}, [t]),
|
|
19
|
+
}, [t]), l(f, { ref: o, style: i });
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
22
|
const E = e(p, "div", {
|
|
23
23
|
display: "flex",
|
|
24
24
|
width: "100%",
|
|
25
25
|
height: "100%"
|
|
26
|
-
}), b = e(
|
|
26
|
+
}), b = e(m), h = e(d), w = e(u);
|
|
27
27
|
export {
|
|
28
28
|
E as EmbeddingAtlas,
|
|
29
29
|
b as EmbeddingView,
|
|
@@ -32,7 +32,7 @@ export {
|
|
|
32
32
|
D as createKNN,
|
|
33
33
|
K as createUMAP,
|
|
34
34
|
A as defaultCategoryColors,
|
|
35
|
-
|
|
35
|
+
W as defaultCharts,
|
|
36
36
|
R as findClusters,
|
|
37
37
|
J as maxDensityModeCategories
|
|
38
38
|
};
|
package/dist/viewer.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { Coordinator } from '@uwdata/mosaic-core';
|
|
2
|
+
import { JSONSchema7 } from 'json-schema';
|
|
3
|
+
import { Readable } from 'svelte/store';
|
|
2
4
|
|
|
3
5
|
declare type AggregateFn = "count" | "distinct" | "min" | "max" | "mean" | "average" | "median" | "stdev" | "stdevp" | "variance" | "variancep" | "sum" | "product" | "quantile" | "ecdf-value" | "ecdf-rank";
|
|
4
6
|
|
|
@@ -24,7 +26,7 @@ declare interface Axis {
|
|
|
24
26
|
labelMaxWidth?: number;
|
|
25
27
|
}
|
|
26
28
|
|
|
27
|
-
declare type BuiltinChartSpec = ChartSpec | ContentViewerSpec | CountPlotSpec | EmbeddingSpec | MarkdownSpec | PredicatesSpec | TableSpec;
|
|
29
|
+
export declare type BuiltinChartSpec = ChartSpec | ContentViewerSpec | CountPlotSpec | EmbeddingSpec | MarkdownSpec | PredicatesSpec | TableSpec;
|
|
28
30
|
|
|
29
31
|
declare interface Cache_2 {
|
|
30
32
|
/** Gets an object from the cache with the given key. Returns `null` if the entry is not found. */
|
|
@@ -142,7 +144,7 @@ declare interface CustomCellProps {
|
|
|
142
144
|
};
|
|
143
145
|
}
|
|
144
146
|
|
|
145
|
-
/** Data value */
|
|
147
|
+
/** Data value (a value in the data domain, which can be mapped to the visual domain through a scale) */
|
|
146
148
|
declare type DataValue = string | number | [number, number];
|
|
147
149
|
|
|
148
150
|
/** Returns a list of default charts for a given data table. */
|
|
@@ -242,6 +244,8 @@ export declare interface EmbeddingAtlasProps {
|
|
|
242
244
|
onExportApplication?: (() => Promise<void>) | null;
|
|
243
245
|
/** A callback when the state of the viewer changes. You may serialize the state to JSON and load it back. */
|
|
244
246
|
onStateChange?: ((state: EmbeddingAtlasState) => void) | null;
|
|
247
|
+
/** Model context API where the component will register its tools to. */
|
|
248
|
+
modelContext?: ModelContextAPI | null;
|
|
245
249
|
/** A cache to speed up initialization of the viewer. */
|
|
246
250
|
cache?: Cache_2 | null;
|
|
247
251
|
/**
|
|
@@ -273,7 +277,7 @@ export declare interface EmbeddingAtlasState {
|
|
|
273
277
|
|
|
274
278
|
declare interface EmbeddingSpec {
|
|
275
279
|
type: "embedding";
|
|
276
|
-
title
|
|
280
|
+
title?: string;
|
|
277
281
|
data: {
|
|
278
282
|
x: string;
|
|
279
283
|
y: string;
|
|
@@ -324,7 +328,7 @@ declare interface EmbeddingViewConfig {
|
|
|
324
328
|
|
|
325
329
|
/** Encoding */
|
|
326
330
|
declare type Encoding = {
|
|
327
|
-
/** The data field */
|
|
331
|
+
/** The data field to encode */
|
|
328
332
|
field: SQLField;
|
|
329
333
|
bin?: {
|
|
330
334
|
/** Desired bin count */
|
|
@@ -342,6 +346,7 @@ declare type Encoding = {
|
|
|
342
346
|
/** Normalize the value by x or y */
|
|
343
347
|
normalize?: "x" | "y";
|
|
344
348
|
} | {
|
|
349
|
+
/** The data value to encode */
|
|
345
350
|
value: DataValue;
|
|
346
351
|
};
|
|
347
352
|
|
|
@@ -364,7 +369,7 @@ declare interface Label {
|
|
|
364
369
|
declare interface Layer {
|
|
365
370
|
/** Data source, default to the main data table */
|
|
366
371
|
from?: SQLTable;
|
|
367
|
-
/** Filter the data. Use $filter to refer to the shared filter */
|
|
372
|
+
/** Filter the data. Use $filter to refer to the shared filter (a cross-filter) */
|
|
368
373
|
filter?: "$filter";
|
|
369
374
|
/** Mark type */
|
|
370
375
|
mark: MarkType;
|
|
@@ -383,6 +388,8 @@ declare interface Layer {
|
|
|
383
388
|
width?: Dimension;
|
|
384
389
|
/** Height of bar / rect marks */
|
|
385
390
|
height?: Dimension;
|
|
391
|
+
/** Size (area) of point marks, default 100. */
|
|
392
|
+
size?: number;
|
|
386
393
|
/** Encoding */
|
|
387
394
|
encoding?: Partial<Record<Attribute, Encoding>>;
|
|
388
395
|
}
|
|
@@ -408,9 +415,9 @@ declare interface MarkStyle {
|
|
|
408
415
|
/** Stroke cap */
|
|
409
416
|
strokeCap?: "butt" | "round" | "square";
|
|
410
417
|
/** Stroke join */
|
|
411
|
-
strokeJoin?: "round" | "miter
|
|
412
|
-
/** Paint order */
|
|
413
|
-
paintOrder?:
|
|
418
|
+
strokeJoin?: "round" | "miter" | "bevel";
|
|
419
|
+
/** Paint order, default is `fill stroke`, fill first, then stroke. */
|
|
420
|
+
paintOrder?: "fill stroke" | "stroke fill";
|
|
414
421
|
/** Opacity */
|
|
415
422
|
opacity?: number;
|
|
416
423
|
}
|
|
@@ -418,6 +425,32 @@ declare interface MarkStyle {
|
|
|
418
425
|
/** Mark type */
|
|
419
426
|
declare type MarkType = "bar" | "rect" | "line" | "area" | "point" | "rule";
|
|
420
427
|
|
|
428
|
+
declare interface MCPContext {
|
|
429
|
+
tools?: MCPTool[];
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
/** Tool definition interface */
|
|
433
|
+
declare interface MCPTool {
|
|
434
|
+
/** Unique name for the tool */
|
|
435
|
+
name: string;
|
|
436
|
+
/** The title of the tool */
|
|
437
|
+
title?: string;
|
|
438
|
+
/** Natural language description of what the tool does */
|
|
439
|
+
description: string;
|
|
440
|
+
/** JSON Schema defining the input parameters */
|
|
441
|
+
inputSchema: JSONSchema7;
|
|
442
|
+
/** JSON Schema defining the output parameters */
|
|
443
|
+
outputSchema?: JSONSchema7;
|
|
444
|
+
/** Function that implements the tool and returns a result */
|
|
445
|
+
execute: (input: any, agent: unknown) => Promise<ToolResponse>;
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
/** A type that mirrors the current design in the upcoming navigator.modelContext API */
|
|
449
|
+
declare interface ModelContextAPI {
|
|
450
|
+
provideContext(context: MCPContext): void;
|
|
451
|
+
readonly connectionStatus?: Readable<"connecting" | "connected" | "closed" | "error">;
|
|
452
|
+
}
|
|
453
|
+
|
|
421
454
|
declare interface PredicatesSpec {
|
|
422
455
|
type: "predicates";
|
|
423
456
|
title?: string;
|
|
@@ -499,6 +532,17 @@ declare interface TableSpec {
|
|
|
499
532
|
columns: string[];
|
|
500
533
|
}
|
|
501
534
|
|
|
535
|
+
/** Tool response format */
|
|
536
|
+
declare interface ToolResponse {
|
|
537
|
+
content: Array<{
|
|
538
|
+
type: "text" | "image" | "video";
|
|
539
|
+
text?: string;
|
|
540
|
+
url?: string;
|
|
541
|
+
[key: string]: any;
|
|
542
|
+
}>;
|
|
543
|
+
isError?: boolean;
|
|
544
|
+
}
|
|
545
|
+
|
|
502
546
|
/** Widget for editing a chart */
|
|
503
547
|
declare type Widget = {
|
|
504
548
|
type: "scale.type";
|
package/dist/viewer.js
CHANGED
package/package.json
CHANGED
|
@@ -1,92 +1,92 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@dataelvisliang/embedding-atlas",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"type": "module",
|
|
5
|
-
"license": "MIT",
|
|
6
|
-
"description": "Components for interactive embedding visualization (fork with highlight prop support)",
|
|
7
|
-
"keywords": [
|
|
8
|
-
"embedding",
|
|
9
|
-
"visualization",
|
|
10
|
-
"highlight"
|
|
11
|
-
],
|
|
12
|
-
"homepage": "https://github.com/dataelvisliang/embedding-atlas",
|
|
13
|
-
"repository": {
|
|
14
|
-
"type": "git",
|
|
15
|
-
"url": "git+https://github.com/dataelvisliang/embedding-atlas.git"
|
|
16
|
-
},
|
|
17
|
-
"author": {
|
|
18
|
-
"name": "Donghao Ren",
|
|
19
|
-
"email": "donghao.ren@gmail.com"
|
|
20
|
-
},
|
|
21
|
-
"contributors": [
|
|
22
|
-
{
|
|
23
|
-
"name": "Halden Lin",
|
|
24
|
-
"email": "halden.lin@gmail.com"
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
"name": "Fred Hohman",
|
|
28
|
-
"email": "fredhohman@apple.com"
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
"name": "Dominik Moritz",
|
|
32
|
-
"email": "domoritz@gmail.com"
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
"name": "Elvis Liang"
|
|
36
|
-
}
|
|
37
|
-
],
|
|
38
|
-
"scripts": {
|
|
39
|
-
"dev": "vite",
|
|
40
|
-
"build": "vite build",
|
|
41
|
-
"check": "svelte-check",
|
|
42
|
-
"package": "npm run build && publint",
|
|
43
|
-
"preview": "vite preview"
|
|
44
|
-
},
|
|
45
|
-
"files": [
|
|
46
|
-
"dist",
|
|
47
|
-
"svelte"
|
|
48
|
-
],
|
|
49
|
-
"exports": {
|
|
50
|
-
".": {
|
|
51
|
-
"types": "./dist/index.d.ts",
|
|
52
|
-
"default": "./dist/index.js"
|
|
53
|
-
},
|
|
54
|
-
"./react": {
|
|
55
|
-
"types": "./dist/react.d.ts",
|
|
56
|
-
"default": "./dist/react.js"
|
|
57
|
-
},
|
|
58
|
-
"./svelte": {
|
|
59
|
-
"types": "./svelte/index.d.ts",
|
|
60
|
-
"svelte": "./svelte/index.js",
|
|
61
|
-
"default": "./svelte/index.js"
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
"dependencies": {},
|
|
65
|
-
"peerDependencies": {
|
|
66
|
-
"@uwdata/mosaic-core": ">=0.19.0",
|
|
67
|
-
"@uwdata/mosaic-spec": ">=0.19.0",
|
|
68
|
-
"@uwdata/mosaic-sql": ">=0.19.0",
|
|
69
|
-
"@uwdata/vgplot": ">=0.19.0",
|
|
70
|
-
"react": ">=17.0.0",
|
|
71
|
-
"svelte": ">=5.0.0"
|
|
72
|
-
},
|
|
73
|
-
"peerDependenciesMeta": {
|
|
74
|
-
"react": {
|
|
75
|
-
"optional": true
|
|
76
|
-
},
|
|
77
|
-
"svelte": {
|
|
78
|
-
"optional": true
|
|
79
|
-
}
|
|
80
|
-
},
|
|
81
|
-
"devDependencies": {
|
|
82
|
-
"@embedding-atlas/component": "*",
|
|
83
|
-
"@embedding-atlas/viewer": "*",
|
|
84
|
-
"@embedding-atlas/table": "*",
|
|
85
|
-
"@embedding-atlas/umap-wasm": "*",
|
|
86
|
-
"tslib": "^2.8.1",
|
|
87
|
-
"typescript": "^5.9.2",
|
|
88
|
-
"vite": "^7.0.6",
|
|
89
|
-
"vite-plugin-dts": "^4.5.4",
|
|
90
|
-
"svelte-check": "^4.3.1"
|
|
91
|
-
}
|
|
92
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@dataelvisliang/embedding-atlas",
|
|
3
|
+
"version": "0.16.1-highlight.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"description": "Components for interactive embedding visualization (fork with highlight prop support)",
|
|
7
|
+
"keywords": [
|
|
8
|
+
"embedding",
|
|
9
|
+
"visualization",
|
|
10
|
+
"highlight"
|
|
11
|
+
],
|
|
12
|
+
"homepage": "https://github.com/dataelvisliang/embedding-atlas",
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "git+https://github.com/dataelvisliang/embedding-atlas.git"
|
|
16
|
+
},
|
|
17
|
+
"author": {
|
|
18
|
+
"name": "Donghao Ren",
|
|
19
|
+
"email": "donghao.ren@gmail.com"
|
|
20
|
+
},
|
|
21
|
+
"contributors": [
|
|
22
|
+
{
|
|
23
|
+
"name": "Halden Lin",
|
|
24
|
+
"email": "halden.lin@gmail.com"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"name": "Fred Hohman",
|
|
28
|
+
"email": "fredhohman@apple.com"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"name": "Dominik Moritz",
|
|
32
|
+
"email": "domoritz@gmail.com"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"name": "Elvis Liang"
|
|
36
|
+
}
|
|
37
|
+
],
|
|
38
|
+
"scripts": {
|
|
39
|
+
"dev": "vite",
|
|
40
|
+
"build": "vite build",
|
|
41
|
+
"check": "svelte-check",
|
|
42
|
+
"package": "npm run build && publint",
|
|
43
|
+
"preview": "vite preview"
|
|
44
|
+
},
|
|
45
|
+
"files": [
|
|
46
|
+
"dist",
|
|
47
|
+
"svelte"
|
|
48
|
+
],
|
|
49
|
+
"exports": {
|
|
50
|
+
".": {
|
|
51
|
+
"types": "./dist/index.d.ts",
|
|
52
|
+
"default": "./dist/index.js"
|
|
53
|
+
},
|
|
54
|
+
"./react": {
|
|
55
|
+
"types": "./dist/react.d.ts",
|
|
56
|
+
"default": "./dist/react.js"
|
|
57
|
+
},
|
|
58
|
+
"./svelte": {
|
|
59
|
+
"types": "./svelte/index.d.ts",
|
|
60
|
+
"svelte": "./svelte/index.js",
|
|
61
|
+
"default": "./svelte/index.js"
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"dependencies": {},
|
|
65
|
+
"peerDependencies": {
|
|
66
|
+
"@uwdata/mosaic-core": ">=0.19.0",
|
|
67
|
+
"@uwdata/mosaic-spec": ">=0.19.0",
|
|
68
|
+
"@uwdata/mosaic-sql": ">=0.19.0",
|
|
69
|
+
"@uwdata/vgplot": ">=0.19.0",
|
|
70
|
+
"react": ">=17.0.0",
|
|
71
|
+
"svelte": ">=5.0.0"
|
|
72
|
+
},
|
|
73
|
+
"peerDependenciesMeta": {
|
|
74
|
+
"react": {
|
|
75
|
+
"optional": true
|
|
76
|
+
},
|
|
77
|
+
"svelte": {
|
|
78
|
+
"optional": true
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"devDependencies": {
|
|
82
|
+
"@embedding-atlas/component": "*",
|
|
83
|
+
"@embedding-atlas/viewer": "*",
|
|
84
|
+
"@embedding-atlas/table": "*",
|
|
85
|
+
"@embedding-atlas/umap-wasm": "*",
|
|
86
|
+
"tslib": "^2.8.1",
|
|
87
|
+
"typescript": "^5.9.2",
|
|
88
|
+
"vite": "^7.0.6",
|
|
89
|
+
"vite-plugin-dts": "^4.5.4",
|
|
90
|
+
"svelte-check": "^4.3.1"
|
|
91
|
+
}
|
|
92
|
+
}
|