@genome-spy/app 0.74.0 → 0.76.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/AbortablePromiseCache-beUIcZcW.js +96 -0
- package/dist/agentApi-CzdacisO.js +25226 -0
- package/dist/agentApi.es.js +9460 -0
- package/dist/agentShared.es.js +4742 -0
- package/dist/{blosc-oa0DlI6G.js → blosc-BX4BJ8sR.js} +1 -1
- package/dist/componentStyles-CIXoKEp0.js +2182 -0
- package/dist/dialog.es.js +377 -0
- package/dist/{esm-n0auOe11.js → esm-BH0wx5y-.js} +1 -1
- package/dist/esm-BLfLaJtE.js +121 -0
- package/dist/{esm-D-WfYOx7.js → esm-BWsx1OJ2.js} +25 -25
- package/dist/{browser-Dvlo92rx.js → esm-BY4T8YoD.js} +38 -22
- package/dist/esm-CZvS2Ldm.js +155 -0
- package/dist/esm-CdIesJ1z.js +461 -0
- package/dist/{esm-DCCYNvaz.js → esm-Cr7pLUfG.js} +50 -50
- package/dist/esm-D-y0Ce1M.js +573 -0
- package/dist/esm-DHOMWRoL.js +1426 -0
- package/dist/{esm-Cmo4qEPr.js → esm-DJUb6vy0.js} +5 -5
- package/dist/esm-DPS6pYKF.js +1248 -0
- package/dist/esm-DRZ5LLNH.js +142 -0
- package/dist/esm-DjF6pKy5.js +369 -0
- package/dist/esm-PDPkTR1_.js +1015 -0
- package/dist/esm-s_SlArJ8.js +298 -0
- package/dist/index.es.js +7910 -28759
- package/dist/index.js +1135 -736
- package/dist/lit-ymUSmGBw.js +510 -0
- package/dist/{lz4-jZ0zyLBa.js → lz4-BSYl80V8.js} +1 -1
- package/dist/parquetRead-m8-8_SpH.js +1609 -0
- package/dist/schema.json +665 -97
- package/dist/style.css +1 -1
- package/dist/viewUtils-C5htqZCm.js +14147 -0
- package/dist/{zstd-C6ksIG9r.js → zstd-BAfRM3IH.js} +1 -1
- package/package.json +30 -5
- package/src/agentApi/index.d.ts +123 -0
- package/src/agentShared/index.d.ts +97 -0
- package/src/agentShared/types.d.ts +8 -0
- package/src/appTypes.d.ts +75 -0
- package/src/bookmark/databaseSchema.d.ts +33 -0
- package/src/charts/boxplotTypes.d.ts +15 -0
- package/src/charts/sampleAttributePlotTypes.d.ts +149 -0
- package/src/coreSpecAugmentation.d.ts +29 -0
- package/src/dialog/index.d.ts +5 -0
- package/src/embedTypes.d.ts +9 -0
- package/src/index.d.ts +16 -0
- package/src/sampleView/sampleViewTypes.d.ts +174 -0
- package/src/sampleView/state/payloadTypes.d.ts +400 -0
- package/src/sampleView/state/sampleState.d.ts +76 -0
- package/src/sampleView/types.d.ts +125 -0
- package/src/spec/appSpec.d.ts +54 -0
- package/src/spec/sampleView.d.ts +487 -0
- package/src/spec/view.d.ts +124 -0
- package/src/state/paramProvenanceTypes.d.ts +215 -0
- package/src/state/selectionExpansionTypes.d.ts +77 -0
- package/src/state.d.ts +97 -0
- package/src/types/lz-string.d.ts +24 -0
- package/src/types/vega-loader.d.ts +1 -0
- package/src/utils/colorScaleSummary.d.ts +15 -0
- package/src/utils/statistics/fieldSummary.d.ts +49 -0
- package/src/vite-env.d.ts +6 -0
- package/LICENSE +0 -21
- /package/dist/{AbortablePromiseCache-3gHJdF3E.js → AbortablePromiseCache-BDH1cqFl.js} +0 -0
- /package/dist/{chunk-INHXZS53-fPMmEwMt.js → chunk-INHXZS53-DwEV9sMh.js} +0 -0
- /package/dist/{esm-BygJiwh0.js → esm-BL9SNSnj.js} +0 -0
- /package/dist/{esm-B8-vSu-c.js → esm-BwW--bVV.js} +0 -0
- /package/dist/{esm-CGX-qz1d.js → esm-Bz_92nH0.js} +0 -0
- /package/dist/{esm-CuMSzCHy.js → esm-D2_c7lXY.js} +0 -0
- /package/dist/{parquetRead-CJe1UPsz.js → parquetRead-BuEN-6yG.js} +0 -0
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ConcatSpec as CoreConcatSpec,
|
|
3
|
+
HConcatSpec as CoreHConcatSpec,
|
|
4
|
+
ImportSpec,
|
|
5
|
+
LayerSpec as CoreLayerSpec,
|
|
6
|
+
MultiscaleSpec as CoreMultiscaleSpec,
|
|
7
|
+
UnitSpec as CoreUnitSpec,
|
|
8
|
+
VConcatSpec as CoreVConcatSpec,
|
|
9
|
+
} from "@genome-spy/core/spec/view.js";
|
|
10
|
+
import { SampleSpec } from "./sampleView.js";
|
|
11
|
+
|
|
12
|
+
// App has two view unions:
|
|
13
|
+
// - AppNestedViewSpec: legal in recursive positions (templates, children)
|
|
14
|
+
// - AppViewSpec: root-level union that can additionally include SampleSpec
|
|
15
|
+
//
|
|
16
|
+
// This prevents nested SampleSpecs while still allowing a SampleSpec under
|
|
17
|
+
// app-level concat roots.
|
|
18
|
+
export type AggregatingSpec = AppUnitSpec | AppLayerSpec;
|
|
19
|
+
|
|
20
|
+
export interface AggregateSamplesSpec {
|
|
21
|
+
/**
|
|
22
|
+
* Specifies views that [aggregate](https://genomespy.app/docs/sample-collections/visualizing/#aggregation)
|
|
23
|
+
* multiple samples within the GenomeSpy App.
|
|
24
|
+
*/
|
|
25
|
+
aggregateSamples?: AggregatingSpec[];
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* App-only visibility setting exposed in the view visibility menu.
|
|
30
|
+
*/
|
|
31
|
+
export interface AppVisibilityGroupSpec {
|
|
32
|
+
/**
|
|
33
|
+
* Name of a mutually exclusive visibility group.
|
|
34
|
+
*
|
|
35
|
+
* Views with the same group name in the same import scope are controlled
|
|
36
|
+
* with radio buttons in the view visibility menu.
|
|
37
|
+
*/
|
|
38
|
+
group: string;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* App-only visibility setting exposed in the view visibility menu.
|
|
43
|
+
*/
|
|
44
|
+
export interface AppConfigurableVisibilitySpec {
|
|
45
|
+
/**
|
|
46
|
+
* Is the visibility configurable from the GenomeSpy App view visibility menu.
|
|
47
|
+
*
|
|
48
|
+
* Configurability requires an explicit view name that is unique in its import
|
|
49
|
+
* scope.
|
|
50
|
+
*
|
|
51
|
+
* Set to an object with `group` to make configurable views mutually
|
|
52
|
+
* exclusive in the menu (radio buttons) within the same import scope.
|
|
53
|
+
*
|
|
54
|
+
* __Default value:__ `false` for children of `layer`, `true` for others
|
|
55
|
+
*/
|
|
56
|
+
configurableVisibility?: boolean | AppVisibilityGroupSpec;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export type AppUnitSpec = Omit<CoreUnitSpec, "aggregateSamples" | "templates"> &
|
|
60
|
+
AppConfigurableVisibilitySpec &
|
|
61
|
+
AggregateSamplesSpec & {
|
|
62
|
+
// Re-thread templates to the app union so nested views can use app-only
|
|
63
|
+
// fields (e.g. aggregateSamples), but still exclude nested SampleSpec.
|
|
64
|
+
templates?: Record<string, AppNestedViewSpec>;
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
export type AppLayerSpec = Omit<
|
|
68
|
+
CoreLayerSpec,
|
|
69
|
+
"layer" | "aggregateSamples" | "templates"
|
|
70
|
+
> &
|
|
71
|
+
AppConfigurableVisibilitySpec &
|
|
72
|
+
AggregateSamplesSpec & {
|
|
73
|
+
templates?: Record<string, AppNestedViewSpec>;
|
|
74
|
+
|
|
75
|
+
layer: (AppLayerSpec | AppUnitSpec | AppMultiscaleSpec | ImportSpec)[];
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
export type AppMultiscaleSpec = Omit<
|
|
79
|
+
CoreMultiscaleSpec,
|
|
80
|
+
"multiscale" | "aggregateSamples" | "templates"
|
|
81
|
+
> &
|
|
82
|
+
AppConfigurableVisibilitySpec &
|
|
83
|
+
AggregateSamplesSpec & {
|
|
84
|
+
templates?: Record<string, AppNestedViewSpec>;
|
|
85
|
+
|
|
86
|
+
multiscale: (
|
|
87
|
+
| AppLayerSpec
|
|
88
|
+
| AppUnitSpec
|
|
89
|
+
| AppMultiscaleSpec
|
|
90
|
+
| ImportSpec
|
|
91
|
+
)[];
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
export type AppVConcatSpec = Omit<CoreVConcatSpec, "templates" | "vconcat"> &
|
|
95
|
+
AppConfigurableVisibilitySpec & {
|
|
96
|
+
templates?: Record<string, AppNestedViewSpec>;
|
|
97
|
+
|
|
98
|
+
vconcat: (AppViewSpec | ImportSpec)[];
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
export type AppHConcatSpec = Omit<CoreHConcatSpec, "templates" | "hconcat"> &
|
|
102
|
+
AppConfigurableVisibilitySpec & {
|
|
103
|
+
templates?: Record<string, AppNestedViewSpec>;
|
|
104
|
+
|
|
105
|
+
hconcat: (AppViewSpec | ImportSpec)[];
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
export type AppConcatSpec = Omit<CoreConcatSpec, "templates" | "concat"> &
|
|
109
|
+
AppConfigurableVisibilitySpec & {
|
|
110
|
+
templates?: Record<string, AppNestedViewSpec>;
|
|
111
|
+
|
|
112
|
+
concat: (AppViewSpec | ImportSpec)[];
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
export type AppNestedViewSpec =
|
|
116
|
+
| AppUnitSpec
|
|
117
|
+
| AppLayerSpec
|
|
118
|
+
| AppMultiscaleSpec
|
|
119
|
+
| AppVConcatSpec
|
|
120
|
+
| AppHConcatSpec
|
|
121
|
+
| AppConcatSpec;
|
|
122
|
+
|
|
123
|
+
// App root may contain SampleSpec, but recursive descendants cannot.
|
|
124
|
+
export type AppViewSpec = AppNestedViewSpec | SampleSpec;
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
import type { Scalar } from "@genome-spy/core/spec/channel.js";
|
|
2
|
+
import type { ChromosomalLocus } from "@genome-spy/core/spec/genome.js";
|
|
3
|
+
import type {
|
|
4
|
+
ParamSelector,
|
|
5
|
+
ViewSelector,
|
|
6
|
+
} from "@genome-spy/core/view/viewUtilTypes.d.ts";
|
|
7
|
+
import type {
|
|
8
|
+
SelectionExpansionPredicate,
|
|
9
|
+
SelectionExpansionRule,
|
|
10
|
+
} from "./selectionExpansionTypes.d.ts";
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Shared type aliases for param provenance payloads.
|
|
14
|
+
*
|
|
15
|
+
* These types describe the bookmarkable selection state that can be replayed
|
|
16
|
+
* and surfaced to the agent.
|
|
17
|
+
*/
|
|
18
|
+
export type ParamValueLiteral = {
|
|
19
|
+
/**
|
|
20
|
+
* Literal param value.
|
|
21
|
+
*/
|
|
22
|
+
type: "value";
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Stored literal value.
|
|
26
|
+
*/
|
|
27
|
+
value: any;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export type ParamValueInterval = {
|
|
31
|
+
/**
|
|
32
|
+
* Interval selection value.
|
|
33
|
+
*/
|
|
34
|
+
type: "interval";
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Interval endpoints keyed by encoding channel.
|
|
38
|
+
*/
|
|
39
|
+
intervals: Partial<
|
|
40
|
+
Record<
|
|
41
|
+
"x" | "y",
|
|
42
|
+
[number, number] | [ChromosomalLocus, ChromosomalLocus] | null
|
|
43
|
+
>
|
|
44
|
+
>;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export type ParamValuePoint = {
|
|
48
|
+
/**
|
|
49
|
+
* Point selection value.
|
|
50
|
+
*/
|
|
51
|
+
type: "point";
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Fields used to identify selected points.
|
|
55
|
+
*/
|
|
56
|
+
keyFields: string[];
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Selected key tuples.
|
|
60
|
+
*/
|
|
61
|
+
keys: Scalar[][];
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Origin of a param value derived from a datum or interval lookup.
|
|
66
|
+
*/
|
|
67
|
+
export type ParamOrigin = {
|
|
68
|
+
/**
|
|
69
|
+
* Origin type.
|
|
70
|
+
*/
|
|
71
|
+
type: "datum";
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* View that contributed the value.
|
|
75
|
+
*/
|
|
76
|
+
view: ViewSelector;
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Field that supplied the value.
|
|
80
|
+
*/
|
|
81
|
+
keyField: string;
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Scalar value captured from the source datum.
|
|
85
|
+
*/
|
|
86
|
+
key: Scalar;
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Optional interval sources used for replay and diagnostics.
|
|
90
|
+
*/
|
|
91
|
+
intervalSources?: Record<string, { start?: string; end?: string }>;
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Back-reference for point selection expansion.
|
|
96
|
+
*/
|
|
97
|
+
export type PointExpandOrigin = {
|
|
98
|
+
/**
|
|
99
|
+
* View that produced the point selection.
|
|
100
|
+
*/
|
|
101
|
+
view: ViewSelector;
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Selected tuple captured at expansion time.
|
|
105
|
+
*/
|
|
106
|
+
keyTuple: Scalar[];
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Legacy support: older bookmarks may include these.
|
|
110
|
+
* New payloads should omit them.
|
|
111
|
+
*/
|
|
112
|
+
keyFields?: string[];
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Legacy datum marker retained for old bookmarks.
|
|
116
|
+
*/
|
|
117
|
+
type?: "datum";
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Matcher used to expand a point selection either by rule or predicate.
|
|
122
|
+
*/
|
|
123
|
+
export type PointExpandMatcher =
|
|
124
|
+
| { rule: SelectionExpansionRule; predicate?: never }
|
|
125
|
+
| { predicate: SelectionExpansionPredicate; rule?: never };
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Expanded point selection value stored in provenance.
|
|
129
|
+
*/
|
|
130
|
+
export type ParamValuePointExpand = {
|
|
131
|
+
/**
|
|
132
|
+
* Expanded point-selection value.
|
|
133
|
+
*/
|
|
134
|
+
type: "pointExpand";
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Operation applied to the current selection.
|
|
138
|
+
*/
|
|
139
|
+
operation: "replace" | "add" | "remove" | "toggle";
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Optional partitioning fields used during expansion.
|
|
143
|
+
*/
|
|
144
|
+
partitionBy?: string[];
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Original point selection that was expanded.
|
|
148
|
+
*/
|
|
149
|
+
origin: PointExpandOrigin;
|
|
150
|
+
} & PointExpandMatcher;
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Bookmarkable param value stored in provenance.
|
|
154
|
+
*/
|
|
155
|
+
export type ParamValue =
|
|
156
|
+
| ParamValueLiteral
|
|
157
|
+
| ParamValueInterval
|
|
158
|
+
| ParamValuePoint
|
|
159
|
+
| ParamValuePointExpand;
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Payload for creating or updating a reactive selection or parameter value,
|
|
163
|
+
* including point selections, interval selections, and genomic-region
|
|
164
|
+
* selections.
|
|
165
|
+
*/
|
|
166
|
+
export interface ParamProvenanceEntry {
|
|
167
|
+
/**
|
|
168
|
+
* Structured selector for the parameter.
|
|
169
|
+
*/
|
|
170
|
+
selector: ParamSelector;
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Serialized parameter value.
|
|
174
|
+
*/
|
|
175
|
+
value: ParamValue;
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* Optional datum origin for replayable values.
|
|
179
|
+
*/
|
|
180
|
+
origin?: ParamOrigin;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* Payload for expanding a point selection.
|
|
185
|
+
*/
|
|
186
|
+
export type ExpandPointSelectionActionPayload = {
|
|
187
|
+
/**
|
|
188
|
+
* Target param selector.
|
|
189
|
+
*/
|
|
190
|
+
selector: ParamSelector;
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* Expansion operation.
|
|
194
|
+
*/
|
|
195
|
+
operation: "replace" | "add" | "remove" | "toggle";
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* Optional partitioning fields for the expansion.
|
|
199
|
+
*/
|
|
200
|
+
partitionBy?: string[];
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* Back-reference to the point selection origin.
|
|
204
|
+
*/
|
|
205
|
+
origin: PointExpandOrigin;
|
|
206
|
+
// TODO(app): Consider optional replay-drift diagnostics here, for example
|
|
207
|
+
// expectedMatchCount/sourceDataFingerprint, if semantic replay warnings are needed.
|
|
208
|
+
} & PointExpandMatcher;
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Param provenance map keyed by selector key.
|
|
212
|
+
*/
|
|
213
|
+
export type ParamProvenanceState = {
|
|
214
|
+
entries: Record<string, ParamProvenanceEntry>;
|
|
215
|
+
};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import type { Scalar } from "@genome-spy/core/spec/channel.js";
|
|
2
|
+
|
|
3
|
+
export type SelectionLeafValue = Scalar | null;
|
|
4
|
+
|
|
5
|
+
export type SelectionExpansionLeafPredicate =
|
|
6
|
+
| {
|
|
7
|
+
field: string;
|
|
8
|
+
op: "eq";
|
|
9
|
+
value: SelectionLeafValue;
|
|
10
|
+
}
|
|
11
|
+
| {
|
|
12
|
+
field: string;
|
|
13
|
+
op: "eq";
|
|
14
|
+
valueFromField: string;
|
|
15
|
+
}
|
|
16
|
+
| {
|
|
17
|
+
field: string;
|
|
18
|
+
op: "in";
|
|
19
|
+
values: SelectionLeafValue[];
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export type LogicalAnd = {
|
|
23
|
+
and: SelectionExpansionPredicate[];
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export type LogicalOr = {
|
|
27
|
+
or: SelectionExpansionPredicate[];
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export type LogicalNot = {
|
|
31
|
+
not: SelectionExpansionPredicate;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export type SelectionExpansionPredicate =
|
|
35
|
+
| SelectionExpansionLeafPredicate
|
|
36
|
+
| LogicalAnd
|
|
37
|
+
| LogicalOr
|
|
38
|
+
| LogicalNot;
|
|
39
|
+
|
|
40
|
+
export type SelectionExpansionRule = {
|
|
41
|
+
kind: "sameFieldValue";
|
|
42
|
+
field: string;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export type SelectionExpansionMatcher =
|
|
46
|
+
| SelectionExpansionPredicate
|
|
47
|
+
| SelectionExpansionRule;
|
|
48
|
+
|
|
49
|
+
export type ResolvedSelectionExpansionLeafPredicate =
|
|
50
|
+
| {
|
|
51
|
+
field: string;
|
|
52
|
+
op: "eq";
|
|
53
|
+
value: SelectionLeafValue;
|
|
54
|
+
}
|
|
55
|
+
| {
|
|
56
|
+
field: string;
|
|
57
|
+
op: "in";
|
|
58
|
+
values: SelectionLeafValue[];
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
export type ResolvedLogicalAnd = {
|
|
62
|
+
and: ResolvedSelectionExpansionPredicate[];
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
export type ResolvedLogicalOr = {
|
|
66
|
+
or: ResolvedSelectionExpansionPredicate[];
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
export type ResolvedLogicalNot = {
|
|
70
|
+
not: ResolvedSelectionExpansionPredicate;
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
export type ResolvedSelectionExpansionPredicate =
|
|
74
|
+
| ResolvedSelectionExpansionLeafPredicate
|
|
75
|
+
| ResolvedLogicalAnd
|
|
76
|
+
| ResolvedLogicalOr
|
|
77
|
+
| ResolvedLogicalNot;
|
package/src/state.d.ts
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { StateWithHistory } from "redux-undo";
|
|
2
|
+
import { SampleHierarchy } from "./sampleView/state/sampleState.js";
|
|
3
|
+
import {
|
|
4
|
+
ParamSelector,
|
|
5
|
+
ViewSelector,
|
|
6
|
+
} from "@genome-spy/core/view/viewUtilTypes.d.ts";
|
|
7
|
+
import { Scalar } from "@genome-spy/core/spec/channel.js";
|
|
8
|
+
import { ChromosomalLocus } from "@genome-spy/core/spec/genome.js";
|
|
9
|
+
|
|
10
|
+
export interface ParamValueLiteral {
|
|
11
|
+
type: "value";
|
|
12
|
+
value: any;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface ParamValueInterval {
|
|
16
|
+
type: "interval";
|
|
17
|
+
intervals: Partial<
|
|
18
|
+
Record<
|
|
19
|
+
"x" | "y",
|
|
20
|
+
[number, number] | [ChromosomalLocus, ChromosomalLocus] | null
|
|
21
|
+
>
|
|
22
|
+
>;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface ParamValuePoint {
|
|
26
|
+
type: "point";
|
|
27
|
+
keyFields: string[];
|
|
28
|
+
keys: Scalar[][];
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export type ParamValue =
|
|
32
|
+
| ParamValueLiteral
|
|
33
|
+
| ParamValueInterval
|
|
34
|
+
| ParamValuePoint;
|
|
35
|
+
|
|
36
|
+
export interface ParamOrigin {
|
|
37
|
+
type: "datum";
|
|
38
|
+
view: ViewSelector;
|
|
39
|
+
keyField: string;
|
|
40
|
+
key: Scalar;
|
|
41
|
+
intervalSources?: Record<string, { start?: string; end?: string }>;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export interface ParamProvenanceEntry {
|
|
45
|
+
selector: ParamSelector;
|
|
46
|
+
value: ParamValue;
|
|
47
|
+
origin?: ParamOrigin;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export interface ParamProvenanceState {
|
|
51
|
+
entries: Record<string, ParamProvenanceEntry>;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export interface ViewSettings {
|
|
55
|
+
/**
|
|
56
|
+
* Visibilities of views keyed by selector keys. The keys are derived from
|
|
57
|
+
* view selectors and may also include legacy view names from old bookmarks.
|
|
58
|
+
*/
|
|
59
|
+
visibilities: Record<string, boolean>;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export interface ViewVisibilityEntry {
|
|
63
|
+
scope: string[];
|
|
64
|
+
view: string;
|
|
65
|
+
visible: boolean;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export type ViewVisibilityWire =
|
|
69
|
+
| ViewVisibilityEntry[]
|
|
70
|
+
| Record<string, boolean>;
|
|
71
|
+
|
|
72
|
+
export interface ViewSettingsPayload {
|
|
73
|
+
visibilities?: ViewVisibilityWire;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export interface State {
|
|
77
|
+
viewSettings: ViewSettings;
|
|
78
|
+
/**
|
|
79
|
+
* Tracks async intent status and records provenance indices for rollback.
|
|
80
|
+
*/
|
|
81
|
+
intentStatus?: {
|
|
82
|
+
status: "idle" | "running" | "error" | "canceled";
|
|
83
|
+
submissionKind?: "user" | "agent" | "bookmark";
|
|
84
|
+
startIndex?: number;
|
|
85
|
+
lastSuccessfulIndex?: number;
|
|
86
|
+
totalActions?: number;
|
|
87
|
+
currentIndex?: number;
|
|
88
|
+
currentAction?: import("@reduxjs/toolkit").Action;
|
|
89
|
+
failedAction?: import("@reduxjs/toolkit").Action;
|
|
90
|
+
error?: string;
|
|
91
|
+
};
|
|
92
|
+
provenance?: StateWithHistory<{
|
|
93
|
+
sampleView: SampleHierarchy;
|
|
94
|
+
paramProvenance: ParamProvenanceState;
|
|
95
|
+
lastAction: import("@reduxjs/toolkit").Action;
|
|
96
|
+
}>;
|
|
97
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Source: https://github.com/pieroxy/lz-string/blob/master/typings/lz-string.d.ts
|
|
3
|
+
|
|
4
|
+
* The original typings didn't resolve for some reason
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
declare module "lz-string" {
|
|
8
|
+
export function compressToBase64(input: string): string;
|
|
9
|
+
export function decompressFromBase64(input: string): string;
|
|
10
|
+
|
|
11
|
+
export function compressToUTF16(input: string): string;
|
|
12
|
+
export function decompressFromUTF16(compressed: string): string;
|
|
13
|
+
|
|
14
|
+
export function compressToUint8Array(uncompressed: string): Uint8Array;
|
|
15
|
+
export function decompressFromUint8Array(compressed: Uint8Array): string;
|
|
16
|
+
|
|
17
|
+
export function compressToEncodedURIComponent(input: string): string;
|
|
18
|
+
export function decompressFromEncodedURIComponent(
|
|
19
|
+
compressed: string
|
|
20
|
+
): string;
|
|
21
|
+
|
|
22
|
+
export function compress(input: string): string;
|
|
23
|
+
export function decompress(compressed: string): string;
|
|
24
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
declare module "vega-loader";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface ConcreteColorScale {
|
|
2
|
+
domain: unknown[];
|
|
3
|
+
range: string[];
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export declare function getConcreteColorScale(
|
|
7
|
+
scale: unknown
|
|
8
|
+
): ConcreteColorScale | undefined;
|
|
9
|
+
|
|
10
|
+
export declare function addValueColors<T>(
|
|
11
|
+
items: T[],
|
|
12
|
+
getValue: (item: T) => unknown,
|
|
13
|
+
domain: unknown,
|
|
14
|
+
range: unknown
|
|
15
|
+
): Array<T & { color?: string }>;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export interface QuantitativeFieldSummary {
|
|
2
|
+
nonMissingCount: number;
|
|
3
|
+
missingCount: number;
|
|
4
|
+
min?: number;
|
|
5
|
+
max?: number;
|
|
6
|
+
mean?: number;
|
|
7
|
+
median?: number;
|
|
8
|
+
p05?: number;
|
|
9
|
+
p95?: number;
|
|
10
|
+
q1?: number;
|
|
11
|
+
q3?: number;
|
|
12
|
+
iqr?: number;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface CategoryCountSummary {
|
|
16
|
+
value: unknown;
|
|
17
|
+
count: number;
|
|
18
|
+
share: number;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface CategoricalFieldSummary {
|
|
22
|
+
nonMissingCount: number;
|
|
23
|
+
missingCount: number;
|
|
24
|
+
distinctCount: number;
|
|
25
|
+
categories: CategoryCountSummary[];
|
|
26
|
+
truncated: boolean;
|
|
27
|
+
otherCount?: number;
|
|
28
|
+
otherShare?: number;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export declare function buildQuantitativeFieldSummary(
|
|
32
|
+
values: unknown[]
|
|
33
|
+
): QuantitativeFieldSummary;
|
|
34
|
+
|
|
35
|
+
export declare function buildCategoricalFieldSummary(
|
|
36
|
+
values: unknown[]
|
|
37
|
+
): CategoricalFieldSummary;
|
|
38
|
+
|
|
39
|
+
export declare function buildCategoricalCountsSummary(
|
|
40
|
+
counts: Map<unknown, number>,
|
|
41
|
+
nonMissingCount: number,
|
|
42
|
+
missingCount: number,
|
|
43
|
+
maxCategories?: number
|
|
44
|
+
): CategoricalFieldSummary;
|
|
45
|
+
|
|
46
|
+
export declare function buildTopCategorySummary(
|
|
47
|
+
counts: Map<unknown, number>,
|
|
48
|
+
nonMissingCount: number
|
|
49
|
+
): CategoryCountSummary | undefined;
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2018-2026 Kari Lavikka
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|