@vitessce/constants 2.0.3 → 3.0.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/index.js +357 -0
- package/dist-tsc/constants-merged.d.ts +5 -0
- package/dist-tsc/constants-merged.d.ts.map +1 -0
- package/dist-tsc/constants-merged.js +26 -0
- package/dist-tsc/constants-old.d.ts +44 -0
- package/dist-tsc/constants-old.d.ts.map +1 -0
- package/dist-tsc/constants-old.js +163 -0
- package/dist-tsc/index.d.ts +3 -0
- package/dist-tsc/index.d.ts.map +1 -0
- package/dist-tsc/index.js +3 -1
- package/package.json +13 -4
- package/src/constants-merged.js +2 -1
- package/src/constants-old.js +31 -25
- package/src/index.js +3 -1
- package/dist/index.mjs +0 -697
package/dist/index.js
ADDED
|
@@ -0,0 +1,357 @@
|
|
|
1
|
+
const ViewType$2 = {
|
|
2
|
+
DESCRIPTION: "description",
|
|
3
|
+
STATUS: "status",
|
|
4
|
+
SCATTERPLOT: "scatterplot",
|
|
5
|
+
SPATIAL: "spatial",
|
|
6
|
+
HEATMAP: "heatmap",
|
|
7
|
+
LAYER_CONTROLLER: "layerController",
|
|
8
|
+
GENOMIC_PROFILES: "genomicProfiles",
|
|
9
|
+
GATING: "gating",
|
|
10
|
+
FEATURE_LIST: "featureList",
|
|
11
|
+
OBS_SETS: "obsSets",
|
|
12
|
+
OBS_SET_SIZES: "obsSetSizes",
|
|
13
|
+
OBS_SET_FEATURE_VALUE_DISTRIBUTION: "obsSetFeatureValueDistribution",
|
|
14
|
+
FEATURE_VALUE_HISTOGRAM: "featureValueHistogram"
|
|
15
|
+
};
|
|
16
|
+
const DataType$2 = {
|
|
17
|
+
OBS_LABELS: "obsLabels",
|
|
18
|
+
OBS_EMBEDDING: "obsEmbedding",
|
|
19
|
+
OBS_LOCATIONS: "obsLocations",
|
|
20
|
+
OBS_FEATURE_MATRIX: "obsFeatureMatrix",
|
|
21
|
+
OBS_SETS: "obsSets",
|
|
22
|
+
FEATURE_LABELS: "featureLabels",
|
|
23
|
+
IMAGE: "image",
|
|
24
|
+
OBS_SEGMENTATIONS: "obsSegmentations",
|
|
25
|
+
NEIGHBORHOODS: "neighborhoods",
|
|
26
|
+
GENOMIC_PROFILES: "genomic-profiles"
|
|
27
|
+
};
|
|
28
|
+
const FileType$2 = {
|
|
29
|
+
// Joint file types
|
|
30
|
+
ANNDATA_ZARR: "anndata.zarr",
|
|
31
|
+
// Atomic file types
|
|
32
|
+
OBS_EMBEDDING_CSV: "obsEmbedding.csv",
|
|
33
|
+
OBS_LOCATIONS_CSV: "obsLocations.csv",
|
|
34
|
+
OBS_LABELS_CSV: "obsLabels.csv",
|
|
35
|
+
FEATURE_LABELS_CSV: "featureLabels.csv",
|
|
36
|
+
OBS_FEATURE_MATRIX_CSV: "obsFeatureMatrix.csv",
|
|
37
|
+
OBS_SEGMENTATIONS_JSON: "obsSegmentations.json",
|
|
38
|
+
OBS_SETS_CSV: "obsSets.csv",
|
|
39
|
+
OBS_SETS_JSON: "obsSets.json",
|
|
40
|
+
IMAGE_OME_ZARR: "image.ome-zarr",
|
|
41
|
+
// AnnData
|
|
42
|
+
OBS_FEATURE_MATRIX_ANNDATA_ZARR: "obsFeatureMatrix.anndata.zarr",
|
|
43
|
+
OBS_SETS_ANNDATA_ZARR: "obsSets.anndata.zarr",
|
|
44
|
+
OBS_EMBEDDING_ANNDATA_ZARR: "obsEmbedding.anndata.zarr",
|
|
45
|
+
OBS_LOCATIONS_ANNDATA_ZARR: "obsLocations.anndata.zarr",
|
|
46
|
+
OBS_SEGMENTATIONS_ANNDATA_ZARR: "obsSegmentations.anndata.zarr",
|
|
47
|
+
OBS_LABELS_ANNDATA_ZARR: "obsLabels.anndata.zarr",
|
|
48
|
+
FEATURE_LABELS_ANNDATA_ZARR: "featureLabels.anndata.zarr",
|
|
49
|
+
// MuData
|
|
50
|
+
OBS_FEATURE_MATRIX_MUDATA_ZARR: "obsFeatureMatrix.mudata.zarr",
|
|
51
|
+
OBS_SETS_MUDATA_ZARR: "obsSets.mudata.zarr",
|
|
52
|
+
OBS_EMBEDDING_MUDATA_ZARR: "obsEmbedding.mudata.zarr",
|
|
53
|
+
OBS_LOCATIONS_MUDATA_ZARR: "obsLocations.mudata.zarr",
|
|
54
|
+
OBS_SEGMENTATIONS_MUDATA_ZARR: "obsSegmentations.mudata.zarr",
|
|
55
|
+
OBS_LABELS_MUDATA_ZARR: "obsLabels.mudata.zarr",
|
|
56
|
+
FEATURE_LABELS_MUDATA_ZARR: "featureLabels.mudata.zarr",
|
|
57
|
+
GENOMIC_PROFILES_ZARR: "genomic-profiles.zarr",
|
|
58
|
+
NEIGHBORHOODS_JSON: "neighborhoods.json",
|
|
59
|
+
// OME-TIFF
|
|
60
|
+
IMAGE_OME_TIFF: "image.ome-tiff",
|
|
61
|
+
OBS_SEGMENTATIONS_OME_TIFF: "obsSegmentations.ome-tiff",
|
|
62
|
+
// New file types to support old file types:
|
|
63
|
+
// - cells.json
|
|
64
|
+
OBS_EMBEDDING_CELLS_JSON: "obsEmbedding.cells.json",
|
|
65
|
+
OBS_SEGMENTATIONS_CELLS_JSON: "obsSegmentations.cells.json",
|
|
66
|
+
OBS_LOCATIONS_CELLS_JSON: "obsLocations.cells.json",
|
|
67
|
+
OBS_LABELS_CELLS_JSON: "obsLabels.cells.json",
|
|
68
|
+
// - cell-sets.json
|
|
69
|
+
OBS_SETS_CELL_SETS_JSON: "obsSets.cell-sets.json",
|
|
70
|
+
// - genes.json
|
|
71
|
+
OBS_FEATURE_MATRIX_GENES_JSON: "obsFeatureMatrix.genes.json",
|
|
72
|
+
// - clusters.json
|
|
73
|
+
OBS_FEATURE_MATRIX_CLUSTERS_JSON: "obsFeatureMatrix.clusters.json",
|
|
74
|
+
// - expression-matrix.zarr
|
|
75
|
+
OBS_FEATURE_MATRIX_EXPRESSION_MATRIX_ZARR: "obsFeatureMatrix.expression-matrix.zarr",
|
|
76
|
+
// - raster.json
|
|
77
|
+
IMAGE_RASTER_JSON: "image.raster.json",
|
|
78
|
+
OBS_SEGMENTATIONS_RASTER_JSON: "obsSegmentations.raster.json",
|
|
79
|
+
// - molecules.json
|
|
80
|
+
OBS_LOCATIONS_MOLECULES_JSON: "obsLocations.molecules.json",
|
|
81
|
+
OBS_LABELS_MOLECULES_JSON: "obsLabels.molecules.json",
|
|
82
|
+
// Legacy joint file types
|
|
83
|
+
CELLS_JSON: "cells.json",
|
|
84
|
+
CELL_SETS_JSON: "cell-sets.json",
|
|
85
|
+
ANNDATA_CELL_SETS_ZARR: "anndata-cell-sets.zarr",
|
|
86
|
+
ANNDATA_CELLS_ZARR: "anndata-cells.zarr",
|
|
87
|
+
EXPRESSION_MATRIX_ZARR: "expression-matrix.zarr",
|
|
88
|
+
MOLECULES_JSON: "molecules.json",
|
|
89
|
+
RASTER_JSON: "raster.json",
|
|
90
|
+
RASTER_OME_ZARR: "raster.ome-zarr",
|
|
91
|
+
CLUSTERS_JSON: "clusters.json",
|
|
92
|
+
GENES_JSON: "genes.json",
|
|
93
|
+
ANNDATA_EXPRESSION_MATRIX_ZARR: "anndata-expression-matrix.zarr"
|
|
94
|
+
};
|
|
95
|
+
const CoordinationType$2 = {
|
|
96
|
+
DATASET: "dataset",
|
|
97
|
+
// Entity types
|
|
98
|
+
OBS_TYPE: "obsType",
|
|
99
|
+
FEATURE_TYPE: "featureType",
|
|
100
|
+
FEATURE_VALUE_TYPE: "featureValueType",
|
|
101
|
+
OBS_LABELS_TYPE: "obsLabelsType",
|
|
102
|
+
// Other types
|
|
103
|
+
EMBEDDING_TYPE: "embeddingType",
|
|
104
|
+
EMBEDDING_ZOOM: "embeddingZoom",
|
|
105
|
+
EMBEDDING_ROTATION: "embeddingRotation",
|
|
106
|
+
EMBEDDING_TARGET_X: "embeddingTargetX",
|
|
107
|
+
EMBEDDING_TARGET_Y: "embeddingTargetY",
|
|
108
|
+
EMBEDDING_TARGET_Z: "embeddingTargetZ",
|
|
109
|
+
EMBEDDING_OBS_SET_POLYGONS_VISIBLE: "embeddingObsSetPolygonsVisible",
|
|
110
|
+
EMBEDDING_OBS_SET_LABELS_VISIBLE: "embeddingObsSetLabelsVisible",
|
|
111
|
+
EMBEDDING_OBS_SET_LABEL_SIZE: "embeddingObsSetLabelSize",
|
|
112
|
+
EMBEDDING_OBS_RADIUS: "embeddingObsRadius",
|
|
113
|
+
EMBEDDING_OBS_RADIUS_MODE: "embeddingObsRadiusMode",
|
|
114
|
+
EMBEDDING_OBS_OPACITY: "embeddingObsOpacity",
|
|
115
|
+
EMBEDDING_OBS_OPACITY_MODE: "embeddingObsOpacityMode",
|
|
116
|
+
SPATIAL_ZOOM: "spatialZoom",
|
|
117
|
+
SPATIAL_ROTATION: "spatialRotation",
|
|
118
|
+
SPATIAL_TARGET_X: "spatialTargetX",
|
|
119
|
+
SPATIAL_TARGET_Y: "spatialTargetY",
|
|
120
|
+
SPATIAL_TARGET_Z: "spatialTargetZ",
|
|
121
|
+
SPATIAL_ROTATION_X: "spatialRotationX",
|
|
122
|
+
SPATIAL_ROTATION_Y: "spatialRotationY",
|
|
123
|
+
SPATIAL_ROTATION_Z: "spatialRotationZ",
|
|
124
|
+
SPATIAL_ROTATION_ORBIT: "spatialRotationOrbit",
|
|
125
|
+
SPATIAL_ORBIT_AXIS: "spatialOrbitAxis",
|
|
126
|
+
SPATIAL_AXIS_FIXED: "spatialAxisFixed",
|
|
127
|
+
HEATMAP_ZOOM_X: "heatmapZoomX",
|
|
128
|
+
HEATMAP_ZOOM_Y: "heatmapZoomY",
|
|
129
|
+
HEATMAP_TARGET_X: "heatmapTargetX",
|
|
130
|
+
HEATMAP_TARGET_Y: "heatmapTargetY",
|
|
131
|
+
OBS_FILTER: "obsFilter",
|
|
132
|
+
OBS_HIGHLIGHT: "obsHighlight",
|
|
133
|
+
OBS_SET_SELECTION: "obsSetSelection",
|
|
134
|
+
OBS_SET_HIGHLIGHT: "obsSetHighlight",
|
|
135
|
+
OBS_SET_EXPANSION: "obsSetExpansion",
|
|
136
|
+
OBS_SET_COLOR: "obsSetColor",
|
|
137
|
+
FEATURE_FILTER: "featureFilter",
|
|
138
|
+
FEATURE_HIGHLIGHT: "featureHighlight",
|
|
139
|
+
FEATURE_SELECTION: "featureSelection",
|
|
140
|
+
FEATURE_VALUE_COLORMAP: "featureValueColormap",
|
|
141
|
+
FEATURE_VALUE_TRANSFORM: "featureValueTransform",
|
|
142
|
+
FEATURE_VALUE_COLORMAP_RANGE: "featureValueColormapRange",
|
|
143
|
+
OBS_COLOR_ENCODING: "obsColorEncoding",
|
|
144
|
+
SPATIAL_IMAGE_LAYER: "spatialImageLayer",
|
|
145
|
+
SPATIAL_SEGMENTATION_LAYER: "spatialSegmentationLayer",
|
|
146
|
+
SPATIAL_POINT_LAYER: "spatialPointLayer",
|
|
147
|
+
SPATIAL_NEIGHBORHOOD_LAYER: "spatialNeighborhoodLayer",
|
|
148
|
+
GENOMIC_ZOOM_X: "genomicZoomX",
|
|
149
|
+
GENOMIC_ZOOM_Y: "genomicZoomY",
|
|
150
|
+
GENOMIC_TARGET_X: "genomicTargetX",
|
|
151
|
+
GENOMIC_TARGET_Y: "genomicTargetY",
|
|
152
|
+
ADDITIONAL_OBS_SETS: "additionalObsSets",
|
|
153
|
+
// TODO: use obsHighlight rather than moleculeHighlight.
|
|
154
|
+
MOLECULE_HIGHLIGHT: "moleculeHighlight",
|
|
155
|
+
GATING_FEATURE_SELECTION_X: "gatingFeatureSelectionX",
|
|
156
|
+
GATING_FEATURE_SELECTION_Y: "gatingFeatureSelectionY",
|
|
157
|
+
FEATURE_VALUE_TRANSFORM_COEFFICIENT: "featureValueTransformCoefficient",
|
|
158
|
+
TOOLTIPS_VISIBLE: "tooltipsVisible"
|
|
159
|
+
};
|
|
160
|
+
const ViewType$1 = {
|
|
161
|
+
GENES: [
|
|
162
|
+
"genes",
|
|
163
|
+
"This view type was renamed to featureList in schema version 1.0.15."
|
|
164
|
+
],
|
|
165
|
+
CELL_SETS: [
|
|
166
|
+
"cellSets",
|
|
167
|
+
"This view type was renamed to obsSets in schema version 1.0.15."
|
|
168
|
+
],
|
|
169
|
+
CELL_SET_SIZES: [
|
|
170
|
+
"cellSetSizes",
|
|
171
|
+
"This view type was renamed to obsSetSizes in schema version 1.0.15."
|
|
172
|
+
],
|
|
173
|
+
CELL_SET_EXPRESSION: [
|
|
174
|
+
"cellSetExpression",
|
|
175
|
+
"This view type was renamed to obsSetFeatureValueDistribution in schema version 1.0.15."
|
|
176
|
+
],
|
|
177
|
+
EXPRESSION_HISTOGRAM: [
|
|
178
|
+
"expressionHistogram",
|
|
179
|
+
"This view type was renamed to featureValueHistogram in schema version 1.0.15."
|
|
180
|
+
]
|
|
181
|
+
};
|
|
182
|
+
const DataType$1 = {
|
|
183
|
+
CELLS: [
|
|
184
|
+
"cells",
|
|
185
|
+
"This data type was removed. Associated file types were re-implemented as joint file types. See obsEmbedding instead."
|
|
186
|
+
],
|
|
187
|
+
CELL_SETS: [
|
|
188
|
+
"cell-sets",
|
|
189
|
+
"This data type was removed. Associated file types were re-implemented as joint file types. See obsSets instead."
|
|
190
|
+
],
|
|
191
|
+
EXPRESSION_MATRIX: [
|
|
192
|
+
"expression-matrix",
|
|
193
|
+
"This data type was removed. Associated file types were re-implemented as joint file types. See obsFeatureMatrix instead."
|
|
194
|
+
],
|
|
195
|
+
MOLECULES: [
|
|
196
|
+
"molecules",
|
|
197
|
+
"This data type was removed. Associated file types were re-implemented as joint file types. See obsLocations instead."
|
|
198
|
+
],
|
|
199
|
+
RASTER: [
|
|
200
|
+
"raster",
|
|
201
|
+
"This data type was removed. Associated file types were re-implemented as joint file types. See image and obsSegmentations instead."
|
|
202
|
+
]
|
|
203
|
+
};
|
|
204
|
+
const FileType$1 = {};
|
|
205
|
+
function makeChangeMessage(newTypeName, newVersion) {
|
|
206
|
+
return [
|
|
207
|
+
`This coordination type was changed to ${newTypeName} in view config schema version ${newVersion}`,
|
|
208
|
+
newVersion,
|
|
209
|
+
newTypeName
|
|
210
|
+
];
|
|
211
|
+
}
|
|
212
|
+
const CoordinationType$1 = {
|
|
213
|
+
SPATIAL_LAYERS: [
|
|
214
|
+
"spatialLayers",
|
|
215
|
+
"This coordination type was split into multiple coordination types in view config schema version 1.0.1",
|
|
216
|
+
"1.0.1",
|
|
217
|
+
"multiple"
|
|
218
|
+
// Not used for spatialLayers (since it was split into multiple).
|
|
219
|
+
],
|
|
220
|
+
// Spatial layers
|
|
221
|
+
SPATIAL_RASTER_LAYERS: [
|
|
222
|
+
"spatialRasterLayers",
|
|
223
|
+
...makeChangeMessage("spatialImageLayer", "1.0.11")
|
|
224
|
+
],
|
|
225
|
+
SPATIAL_CELLS_LAYER: [
|
|
226
|
+
"spatialCellsLayer",
|
|
227
|
+
...makeChangeMessage("spatialSegmentationLayer", "1.0.11")
|
|
228
|
+
],
|
|
229
|
+
SPATIAL_MOLECULES_LAYER: [
|
|
230
|
+
"spatialMoleculesLayer",
|
|
231
|
+
...makeChangeMessage("spatialPointLayer", "1.0.11")
|
|
232
|
+
],
|
|
233
|
+
SPATIAL_NEIGHBORHOODS_LAYER: [
|
|
234
|
+
"spatialNeighborhoodsLayer",
|
|
235
|
+
...makeChangeMessage("spatialNeighborhoodLayer", "1.0.11")
|
|
236
|
+
],
|
|
237
|
+
// Cell -> Obs
|
|
238
|
+
EMBEDDING_CELL_SET_POLYGONS_VISIBLE: [
|
|
239
|
+
"embeddingCellSetPolygonsVisible",
|
|
240
|
+
...makeChangeMessage("embeddingObsSetPolygonsVisible", "1.0.11")
|
|
241
|
+
],
|
|
242
|
+
EMBEDDING_CELL_SET_LABELS_VISIBLE: [
|
|
243
|
+
"embeddingCellSetLabelsVisible",
|
|
244
|
+
...makeChangeMessage("embeddingObsSetLabelsVisible", "1.0.11")
|
|
245
|
+
],
|
|
246
|
+
EMBEDDING_CELL_SET_LABEL_SIZE: [
|
|
247
|
+
"embeddingCellSetLabelSize",
|
|
248
|
+
...makeChangeMessage("embeddingObsSetLabelSize", "1.0.11")
|
|
249
|
+
],
|
|
250
|
+
EMBEDDING_CELL_RADIUS: [
|
|
251
|
+
"embeddingCellRadius",
|
|
252
|
+
...makeChangeMessage("embeddingObsRadius", "1.0.11")
|
|
253
|
+
],
|
|
254
|
+
EMBEDDING_CELL_RADIUS_MODE: [
|
|
255
|
+
"embeddingCellRadiusMode",
|
|
256
|
+
...makeChangeMessage("embeddingObsRadiusMode", "1.0.11")
|
|
257
|
+
],
|
|
258
|
+
EMBEDDING_CELL_OPACITY: [
|
|
259
|
+
"embeddingCellOpacity",
|
|
260
|
+
...makeChangeMessage("embeddingObsOpacity", "1.0.11")
|
|
261
|
+
],
|
|
262
|
+
EMBEDDING_CELL_OPACITY_MODE: [
|
|
263
|
+
"embeddingCellOpacityMode",
|
|
264
|
+
...makeChangeMessage("embeddingObsOpacityMode", "1.0.11")
|
|
265
|
+
],
|
|
266
|
+
CELL_FILTER: [
|
|
267
|
+
"cellFilter",
|
|
268
|
+
...makeChangeMessage("obsFilter", "1.0.11")
|
|
269
|
+
],
|
|
270
|
+
CELL_HIGHLIGHT: [
|
|
271
|
+
"cellHighlight",
|
|
272
|
+
...makeChangeMessage("obsHighlight", "1.0.11")
|
|
273
|
+
],
|
|
274
|
+
CELL_SET_SELECTION: [
|
|
275
|
+
"cellSetSelection",
|
|
276
|
+
...makeChangeMessage("obsSetSelection", "1.0.11")
|
|
277
|
+
],
|
|
278
|
+
CELL_SET_HIGHLIGHT: [
|
|
279
|
+
"cellSetHighlight",
|
|
280
|
+
...makeChangeMessage("obsSetHighlight", "1.0.11")
|
|
281
|
+
],
|
|
282
|
+
CELL_SET_COLOR: [
|
|
283
|
+
"cellSetColor",
|
|
284
|
+
...makeChangeMessage("obsSetColor", "1.0.11")
|
|
285
|
+
],
|
|
286
|
+
CELL_COLOR_ENCODING: [
|
|
287
|
+
"cellColorEncoding",
|
|
288
|
+
...makeChangeMessage("obsColorEncoding", "1.0.11")
|
|
289
|
+
],
|
|
290
|
+
ADDITIONAL_CELL_SETS: [
|
|
291
|
+
"additionalCellSets",
|
|
292
|
+
...makeChangeMessage("additionalObsSets", "1.0.11")
|
|
293
|
+
],
|
|
294
|
+
// Gene -> Feature
|
|
295
|
+
GENE_FILTER: [
|
|
296
|
+
"geneFilter",
|
|
297
|
+
...makeChangeMessage("featureFilter", "1.0.11")
|
|
298
|
+
],
|
|
299
|
+
GENE_HIGHLIGHT: [
|
|
300
|
+
"geneHighlight",
|
|
301
|
+
...makeChangeMessage("featureHighlight", "1.0.11")
|
|
302
|
+
],
|
|
303
|
+
GENE_SELECTION: [
|
|
304
|
+
"geneSelection",
|
|
305
|
+
...makeChangeMessage("featureSelection", "1.0.11")
|
|
306
|
+
],
|
|
307
|
+
GENE_EXPRESSION_COLORMAP: [
|
|
308
|
+
"geneExpressionColormap",
|
|
309
|
+
...makeChangeMessage("featureValueColormap", "1.0.11")
|
|
310
|
+
],
|
|
311
|
+
GENE_EXPRESSION_TRANSFORM: [
|
|
312
|
+
"geneExpressionTransform",
|
|
313
|
+
...makeChangeMessage("featureValueTransform", "1.0.11")
|
|
314
|
+
],
|
|
315
|
+
GENE_EXPRESSION_COLORMAP_RANGE: [
|
|
316
|
+
"geneExpressionColormapRange",
|
|
317
|
+
...makeChangeMessage("featureValueColormapRange", "1.0.11")
|
|
318
|
+
]
|
|
319
|
+
};
|
|
320
|
+
function makeConstantWithDeprecationMessage(currObj, oldObj) {
|
|
321
|
+
const handler = {
|
|
322
|
+
get(obj, prop) {
|
|
323
|
+
const oldKeys = Object.keys(oldObj);
|
|
324
|
+
if (oldKeys.includes(prop)) {
|
|
325
|
+
console.warn(`Notice about the constant mapping ${prop}: '${oldObj[prop][0]}':
|
|
326
|
+
${oldObj[prop][1]}`);
|
|
327
|
+
return oldObj[prop];
|
|
328
|
+
}
|
|
329
|
+
return obj[prop];
|
|
330
|
+
}
|
|
331
|
+
};
|
|
332
|
+
const objWithMessage = new Proxy(currObj, handler);
|
|
333
|
+
return objWithMessage;
|
|
334
|
+
}
|
|
335
|
+
const ViewType = makeConstantWithDeprecationMessage(
|
|
336
|
+
ViewType$2,
|
|
337
|
+
ViewType$1
|
|
338
|
+
);
|
|
339
|
+
const DataType = makeConstantWithDeprecationMessage(
|
|
340
|
+
DataType$2,
|
|
341
|
+
DataType$1
|
|
342
|
+
);
|
|
343
|
+
const FileType = makeConstantWithDeprecationMessage(
|
|
344
|
+
FileType$2,
|
|
345
|
+
FileType$1
|
|
346
|
+
);
|
|
347
|
+
const CoordinationType = makeConstantWithDeprecationMessage(
|
|
348
|
+
CoordinationType$2,
|
|
349
|
+
CoordinationType$1
|
|
350
|
+
);
|
|
351
|
+
export {
|
|
352
|
+
CoordinationType,
|
|
353
|
+
DataType,
|
|
354
|
+
FileType,
|
|
355
|
+
CoordinationType$1 as OldCoordinationType,
|
|
356
|
+
ViewType
|
|
357
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants-merged.d.ts","sourceRoot":"","sources":["../src/constants-merged.js"],"names":[],"mappings":"AAkCA,2BAGE;AACF,2BAGE;AACF,2BAGE;AACF,mCAGE"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The exports from this file are not intended to be used for internal development.
|
|
3
|
+
* They are only meant to be exported from the package's main index.js to enable
|
|
4
|
+
* backwards compatibility.
|
|
5
|
+
*/
|
|
6
|
+
import { ViewType as ViewTypeCurr, DataType as DataTypeCurr, FileType as FileTypeCurr, CoordinationType as CoordinationTypeCurr, } from '@vitessce/constants-internal';
|
|
7
|
+
import { ViewType as ViewTypeOld, DataType as DataTypeOld, FileType as FileTypeOld, CoordinationType as CoordinationTypeOld, } from './constants-old.js';
|
|
8
|
+
function makeConstantWithDeprecationMessage(currObj, oldObj) {
|
|
9
|
+
const handler = {
|
|
10
|
+
get(obj, prop) {
|
|
11
|
+
const oldKeys = Object.keys(oldObj);
|
|
12
|
+
if (oldKeys.includes(prop)) {
|
|
13
|
+
console.warn(`Notice about the constant mapping ${prop}: '${oldObj[prop][0]}':\n${oldObj[prop][1]}`);
|
|
14
|
+
return oldObj[prop];
|
|
15
|
+
}
|
|
16
|
+
return obj[prop];
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
// eslint-disable-next-line no-undef
|
|
20
|
+
const objWithMessage = new Proxy(currObj, handler);
|
|
21
|
+
return objWithMessage;
|
|
22
|
+
}
|
|
23
|
+
export const ViewType = makeConstantWithDeprecationMessage(ViewTypeCurr, ViewTypeOld);
|
|
24
|
+
export const DataType = makeConstantWithDeprecationMessage(DataTypeCurr, DataTypeOld);
|
|
25
|
+
export const FileType = makeConstantWithDeprecationMessage(FileTypeCurr, FileTypeOld);
|
|
26
|
+
export const CoordinationType = makeConstantWithDeprecationMessage(CoordinationTypeCurr, CoordinationTypeOld);
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export namespace ViewType {
|
|
2
|
+
const GENES: string[];
|
|
3
|
+
const CELL_SETS: string[];
|
|
4
|
+
const CELL_SET_SIZES: string[];
|
|
5
|
+
const CELL_SET_EXPRESSION: string[];
|
|
6
|
+
const EXPRESSION_HISTOGRAM: string[];
|
|
7
|
+
}
|
|
8
|
+
export namespace DataType {
|
|
9
|
+
export const CELLS: string[];
|
|
10
|
+
const CELL_SETS_1: string[];
|
|
11
|
+
export { CELL_SETS_1 as CELL_SETS };
|
|
12
|
+
export const EXPRESSION_MATRIX: string[];
|
|
13
|
+
export const MOLECULES: string[];
|
|
14
|
+
export const RASTER: string[];
|
|
15
|
+
}
|
|
16
|
+
export const FileType: {};
|
|
17
|
+
export namespace CoordinationType {
|
|
18
|
+
const SPATIAL_LAYERS: string[];
|
|
19
|
+
const SPATIAL_RASTER_LAYERS: any[];
|
|
20
|
+
const SPATIAL_CELLS_LAYER: any[];
|
|
21
|
+
const SPATIAL_MOLECULES_LAYER: any[];
|
|
22
|
+
const SPATIAL_NEIGHBORHOODS_LAYER: any[];
|
|
23
|
+
const EMBEDDING_CELL_SET_POLYGONS_VISIBLE: any[];
|
|
24
|
+
const EMBEDDING_CELL_SET_LABELS_VISIBLE: any[];
|
|
25
|
+
const EMBEDDING_CELL_SET_LABEL_SIZE: any[];
|
|
26
|
+
const EMBEDDING_CELL_RADIUS: any[];
|
|
27
|
+
const EMBEDDING_CELL_RADIUS_MODE: any[];
|
|
28
|
+
const EMBEDDING_CELL_OPACITY: any[];
|
|
29
|
+
const EMBEDDING_CELL_OPACITY_MODE: any[];
|
|
30
|
+
const CELL_FILTER: any[];
|
|
31
|
+
const CELL_HIGHLIGHT: any[];
|
|
32
|
+
const CELL_SET_SELECTION: any[];
|
|
33
|
+
const CELL_SET_HIGHLIGHT: any[];
|
|
34
|
+
const CELL_SET_COLOR: any[];
|
|
35
|
+
const CELL_COLOR_ENCODING: any[];
|
|
36
|
+
const ADDITIONAL_CELL_SETS: any[];
|
|
37
|
+
const GENE_FILTER: any[];
|
|
38
|
+
const GENE_HIGHLIGHT: any[];
|
|
39
|
+
const GENE_SELECTION: any[];
|
|
40
|
+
const GENE_EXPRESSION_COLORMAP: any[];
|
|
41
|
+
const GENE_EXPRESSION_TRANSFORM: any[];
|
|
42
|
+
const GENE_EXPRESSION_COLORMAP_RANGE: any[];
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=constants-old.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants-old.d.ts","sourceRoot":"","sources":["../src/constants-old.js"],"names":[],"mappings":";;;;;;;;;;;;;;;AAkDA,0BAA2B"}
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Old constant values with deprecation log messages.
|
|
3
|
+
* Values should be tuples like [oldValue, deprecationMessage].
|
|
4
|
+
*/
|
|
5
|
+
export const ViewType = {
|
|
6
|
+
GENES: [
|
|
7
|
+
'genes',
|
|
8
|
+
'This view type was renamed to featureList in schema version 1.0.15.',
|
|
9
|
+
],
|
|
10
|
+
CELL_SETS: [
|
|
11
|
+
'cellSets',
|
|
12
|
+
'This view type was renamed to obsSets in schema version 1.0.15.',
|
|
13
|
+
],
|
|
14
|
+
CELL_SET_SIZES: [
|
|
15
|
+
'cellSetSizes',
|
|
16
|
+
'This view type was renamed to obsSetSizes in schema version 1.0.15.',
|
|
17
|
+
],
|
|
18
|
+
CELL_SET_EXPRESSION: [
|
|
19
|
+
'cellSetExpression',
|
|
20
|
+
'This view type was renamed to obsSetFeatureValueDistribution in schema version 1.0.15.',
|
|
21
|
+
],
|
|
22
|
+
EXPRESSION_HISTOGRAM: [
|
|
23
|
+
'expressionHistogram',
|
|
24
|
+
'This view type was renamed to featureValueHistogram in schema version 1.0.15.',
|
|
25
|
+
],
|
|
26
|
+
};
|
|
27
|
+
export const DataType = {
|
|
28
|
+
CELLS: [
|
|
29
|
+
'cells',
|
|
30
|
+
'This data type was removed. Associated file types were re-implemented as joint file types. See obsEmbedding instead.',
|
|
31
|
+
],
|
|
32
|
+
CELL_SETS: [
|
|
33
|
+
'cell-sets',
|
|
34
|
+
'This data type was removed. Associated file types were re-implemented as joint file types. See obsSets instead.',
|
|
35
|
+
],
|
|
36
|
+
EXPRESSION_MATRIX: [
|
|
37
|
+
'expression-matrix',
|
|
38
|
+
'This data type was removed. Associated file types were re-implemented as joint file types. See obsFeatureMatrix instead.',
|
|
39
|
+
],
|
|
40
|
+
MOLECULES: [
|
|
41
|
+
'molecules',
|
|
42
|
+
'This data type was removed. Associated file types were re-implemented as joint file types. See obsLocations instead.',
|
|
43
|
+
],
|
|
44
|
+
RASTER: [
|
|
45
|
+
'raster',
|
|
46
|
+
'This data type was removed. Associated file types were re-implemented as joint file types. See image and obsSegmentations instead.',
|
|
47
|
+
],
|
|
48
|
+
};
|
|
49
|
+
export const FileType = {};
|
|
50
|
+
function makeChangeMessage(newTypeName, newVersion) {
|
|
51
|
+
return [
|
|
52
|
+
`This coordination type was changed to ${newTypeName} in view config schema version ${newVersion}`,
|
|
53
|
+
newVersion,
|
|
54
|
+
newTypeName,
|
|
55
|
+
];
|
|
56
|
+
}
|
|
57
|
+
export const CoordinationType = {
|
|
58
|
+
SPATIAL_LAYERS: [
|
|
59
|
+
'spatialLayers',
|
|
60
|
+
'This coordination type was split into multiple coordination types in view config schema version 1.0.1',
|
|
61
|
+
'1.0.1',
|
|
62
|
+
'multiple', // Not used for spatialLayers (since it was split into multiple).
|
|
63
|
+
],
|
|
64
|
+
// Spatial layers
|
|
65
|
+
SPATIAL_RASTER_LAYERS: [
|
|
66
|
+
'spatialRasterLayers',
|
|
67
|
+
...makeChangeMessage('spatialImageLayer', '1.0.11'),
|
|
68
|
+
],
|
|
69
|
+
SPATIAL_CELLS_LAYER: [
|
|
70
|
+
'spatialCellsLayer',
|
|
71
|
+
...makeChangeMessage('spatialSegmentationLayer', '1.0.11'),
|
|
72
|
+
],
|
|
73
|
+
SPATIAL_MOLECULES_LAYER: [
|
|
74
|
+
'spatialMoleculesLayer',
|
|
75
|
+
...makeChangeMessage('spatialPointLayer', '1.0.11'),
|
|
76
|
+
],
|
|
77
|
+
SPATIAL_NEIGHBORHOODS_LAYER: [
|
|
78
|
+
'spatialNeighborhoodsLayer',
|
|
79
|
+
...makeChangeMessage('spatialNeighborhoodLayer', '1.0.11'),
|
|
80
|
+
],
|
|
81
|
+
// Cell -> Obs
|
|
82
|
+
EMBEDDING_CELL_SET_POLYGONS_VISIBLE: [
|
|
83
|
+
'embeddingCellSetPolygonsVisible',
|
|
84
|
+
...makeChangeMessage('embeddingObsSetPolygonsVisible', '1.0.11'),
|
|
85
|
+
],
|
|
86
|
+
EMBEDDING_CELL_SET_LABELS_VISIBLE: [
|
|
87
|
+
'embeddingCellSetLabelsVisible',
|
|
88
|
+
...makeChangeMessage('embeddingObsSetLabelsVisible', '1.0.11'),
|
|
89
|
+
],
|
|
90
|
+
EMBEDDING_CELL_SET_LABEL_SIZE: [
|
|
91
|
+
'embeddingCellSetLabelSize',
|
|
92
|
+
...makeChangeMessage('embeddingObsSetLabelSize', '1.0.11'),
|
|
93
|
+
],
|
|
94
|
+
EMBEDDING_CELL_RADIUS: [
|
|
95
|
+
'embeddingCellRadius',
|
|
96
|
+
...makeChangeMessage('embeddingObsRadius', '1.0.11'),
|
|
97
|
+
],
|
|
98
|
+
EMBEDDING_CELL_RADIUS_MODE: [
|
|
99
|
+
'embeddingCellRadiusMode',
|
|
100
|
+
...makeChangeMessage('embeddingObsRadiusMode', '1.0.11'),
|
|
101
|
+
],
|
|
102
|
+
EMBEDDING_CELL_OPACITY: [
|
|
103
|
+
'embeddingCellOpacity',
|
|
104
|
+
...makeChangeMessage('embeddingObsOpacity', '1.0.11'),
|
|
105
|
+
],
|
|
106
|
+
EMBEDDING_CELL_OPACITY_MODE: [
|
|
107
|
+
'embeddingCellOpacityMode',
|
|
108
|
+
...makeChangeMessage('embeddingObsOpacityMode', '1.0.11'),
|
|
109
|
+
],
|
|
110
|
+
CELL_FILTER: [
|
|
111
|
+
'cellFilter',
|
|
112
|
+
...makeChangeMessage('obsFilter', '1.0.11'),
|
|
113
|
+
],
|
|
114
|
+
CELL_HIGHLIGHT: [
|
|
115
|
+
'cellHighlight',
|
|
116
|
+
...makeChangeMessage('obsHighlight', '1.0.11'),
|
|
117
|
+
],
|
|
118
|
+
CELL_SET_SELECTION: [
|
|
119
|
+
'cellSetSelection',
|
|
120
|
+
...makeChangeMessage('obsSetSelection', '1.0.11'),
|
|
121
|
+
],
|
|
122
|
+
CELL_SET_HIGHLIGHT: [
|
|
123
|
+
'cellSetHighlight',
|
|
124
|
+
...makeChangeMessage('obsSetHighlight', '1.0.11'),
|
|
125
|
+
],
|
|
126
|
+
CELL_SET_COLOR: [
|
|
127
|
+
'cellSetColor',
|
|
128
|
+
...makeChangeMessage('obsSetColor', '1.0.11'),
|
|
129
|
+
],
|
|
130
|
+
CELL_COLOR_ENCODING: [
|
|
131
|
+
'cellColorEncoding',
|
|
132
|
+
...makeChangeMessage('obsColorEncoding', '1.0.11'),
|
|
133
|
+
],
|
|
134
|
+
ADDITIONAL_CELL_SETS: [
|
|
135
|
+
'additionalCellSets',
|
|
136
|
+
...makeChangeMessage('additionalObsSets', '1.0.11'),
|
|
137
|
+
],
|
|
138
|
+
// Gene -> Feature
|
|
139
|
+
GENE_FILTER: [
|
|
140
|
+
'geneFilter',
|
|
141
|
+
...makeChangeMessage('featureFilter', '1.0.11'),
|
|
142
|
+
],
|
|
143
|
+
GENE_HIGHLIGHT: [
|
|
144
|
+
'geneHighlight',
|
|
145
|
+
...makeChangeMessage('featureHighlight', '1.0.11'),
|
|
146
|
+
],
|
|
147
|
+
GENE_SELECTION: [
|
|
148
|
+
'geneSelection',
|
|
149
|
+
...makeChangeMessage('featureSelection', '1.0.11'),
|
|
150
|
+
],
|
|
151
|
+
GENE_EXPRESSION_COLORMAP: [
|
|
152
|
+
'geneExpressionColormap',
|
|
153
|
+
...makeChangeMessage('featureValueColormap', '1.0.11'),
|
|
154
|
+
],
|
|
155
|
+
GENE_EXPRESSION_TRANSFORM: [
|
|
156
|
+
'geneExpressionTransform',
|
|
157
|
+
...makeChangeMessage('featureValueTransform', '1.0.11'),
|
|
158
|
+
],
|
|
159
|
+
GENE_EXPRESSION_COLORMAP_RANGE: [
|
|
160
|
+
'geneExpressionColormapRange',
|
|
161
|
+
...makeChangeMessage('featureValueColormapRange', '1.0.11'),
|
|
162
|
+
],
|
|
163
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.js"],"names":[],"mappings":""}
|
package/dist-tsc/index.js
CHANGED
|
@@ -1 +1,3 @@
|
|
|
1
|
-
export { ViewType, DataType, FileType, CoordinationType, } from './constants-merged';
|
|
1
|
+
export { ViewType, DataType, FileType, CoordinationType, } from './constants-merged.js';
|
|
2
|
+
// For internal usage:
|
|
3
|
+
export { CoordinationType as OldCoordinationType } from './constants-old.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitessce/constants",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"author": "Gehlenborg Lab",
|
|
5
5
|
"homepage": "http://vitessce.io",
|
|
6
6
|
"repository": {
|
|
@@ -8,15 +8,24 @@
|
|
|
8
8
|
"url": "git+https://github.com/vitessce/vitessce.git"
|
|
9
9
|
},
|
|
10
10
|
"license": "MIT",
|
|
11
|
-
"
|
|
11
|
+
"type": "module",
|
|
12
|
+
"main": "dist/index.js",
|
|
12
13
|
"files": [
|
|
14
|
+
"src",
|
|
13
15
|
"dist",
|
|
14
|
-
"
|
|
16
|
+
"dist-tsc"
|
|
15
17
|
],
|
|
16
18
|
"dependencies": {
|
|
17
|
-
"@vitessce/constants-internal": "
|
|
19
|
+
"@vitessce/constants-internal": "3.0.0"
|
|
18
20
|
},
|
|
19
21
|
"scripts": {
|
|
20
22
|
"bundle": "pnpm exec vite build -c ../../scripts/vite.config.js"
|
|
23
|
+
},
|
|
24
|
+
"module": "dist/index.js",
|
|
25
|
+
"exports": {
|
|
26
|
+
".": {
|
|
27
|
+
"types": "./dist-tsc/index.d.ts",
|
|
28
|
+
"import": "./dist/index.js"
|
|
29
|
+
}
|
|
21
30
|
}
|
|
22
31
|
}
|
package/src/constants-merged.js
CHANGED
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
DataType as DataTypeOld,
|
|
15
15
|
FileType as FileTypeOld,
|
|
16
16
|
CoordinationType as CoordinationTypeOld,
|
|
17
|
-
} from './constants-old';
|
|
17
|
+
} from './constants-old.js';
|
|
18
18
|
|
|
19
19
|
function makeConstantWithDeprecationMessage(currObj, oldObj) {
|
|
20
20
|
const handler = {
|
|
@@ -27,6 +27,7 @@ function makeConstantWithDeprecationMessage(currObj, oldObj) {
|
|
|
27
27
|
return obj[prop];
|
|
28
28
|
},
|
|
29
29
|
};
|
|
30
|
+
// eslint-disable-next-line no-undef
|
|
30
31
|
const objWithMessage = new Proxy(currObj, handler);
|
|
31
32
|
return objWithMessage;
|
|
32
33
|
}
|