@vitessce/csv 3.3.2 → 3.3.3
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 +2865 -2764
- package/dist-tsc/csv-loaders/ObsPointsCsv.d.ts.map +1 -1
- package/dist-tsc/csv-loaders/ObsPointsCsv.js +27 -0
- package/dist-tsc/csv-loaders/ObsSpotsCsv.d.ts.map +1 -1
- package/dist-tsc/csv-loaders/ObsSpotsCsv.js +28 -0
- package/package.json +5 -4
- package/src/csv-loaders/ObsPointsCsv.js +34 -0
- package/src/csv-loaders/ObsSpotsCsv.js +35 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ObsPointsCsv.d.ts","sourceRoot":"","sources":["../../src/csv-loaders/ObsPointsCsv.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ObsPointsCsv.d.ts","sourceRoot":"","sources":["../../src/csv-loaders/ObsPointsCsv.js"],"names":[],"mappings":"AAIA;IACE;;;;;;MAcC;IAFC;;;;;;kBAA2C;CAmC9C"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { CoordinationLevel as CL } from '@vitessce/config';
|
|
2
|
+
import { AbstractLoaderError, LoaderResult } from '@vitessce/vit-s';
|
|
1
3
|
import CsvLoader from './CsvLoader.js';
|
|
2
4
|
export default class ObsPointsCsvLoader extends CsvLoader {
|
|
3
5
|
loadFromCache(data) {
|
|
@@ -15,4 +17,29 @@ export default class ObsPointsCsvLoader extends CsvLoader {
|
|
|
15
17
|
this.cachedResult = { obsIndex, obsPoints };
|
|
16
18
|
return this.cachedResult;
|
|
17
19
|
}
|
|
20
|
+
async load() {
|
|
21
|
+
const payload = await this.getSourceData().catch(reason => Promise.resolve(reason));
|
|
22
|
+
if (payload instanceof AbstractLoaderError) {
|
|
23
|
+
return Promise.reject(payload);
|
|
24
|
+
}
|
|
25
|
+
const coordinationValues = {
|
|
26
|
+
pointLayer: CL({
|
|
27
|
+
obsType: 'point',
|
|
28
|
+
// obsColorEncoding: 'spatialLayerColor',
|
|
29
|
+
// spatialLayerColor: [255, 255, 255],
|
|
30
|
+
spatialLayerVisible: true,
|
|
31
|
+
spatialLayerOpacity: 1.0,
|
|
32
|
+
// TODO: support a point radius?
|
|
33
|
+
// featureValueColormapRange: [0, 1],
|
|
34
|
+
// obsHighlight: null,
|
|
35
|
+
// obsSetColor: null,
|
|
36
|
+
// obsSetSelection: null,
|
|
37
|
+
// additionalObsSets: null,
|
|
38
|
+
// obsLabelsType: null,
|
|
39
|
+
}),
|
|
40
|
+
};
|
|
41
|
+
const { data, url } = payload;
|
|
42
|
+
const result = this.loadFromCache(data);
|
|
43
|
+
return Promise.resolve(new LoaderResult(result, url, coordinationValues));
|
|
44
|
+
}
|
|
18
45
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ObsSpotsCsv.d.ts","sourceRoot":"","sources":["../../src/csv-loaders/ObsSpotsCsv.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ObsSpotsCsv.d.ts","sourceRoot":"","sources":["../../src/csv-loaders/ObsSpotsCsv.js"],"names":[],"mappings":"AAIA;IACE;;;;;;MAcC;IAFC;;;;;;kBAA0C;CAoC7C"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { CoordinationLevel as CL } from '@vitessce/config';
|
|
2
|
+
import { AbstractLoaderError, LoaderResult } from '@vitessce/vit-s';
|
|
1
3
|
import CsvLoader from './CsvLoader.js';
|
|
2
4
|
export default class ObsSpotsCsvLoader extends CsvLoader {
|
|
3
5
|
loadFromCache(data) {
|
|
@@ -15,4 +17,30 @@ export default class ObsSpotsCsvLoader extends CsvLoader {
|
|
|
15
17
|
this.cachedResult = { obsIndex, obsSpots };
|
|
16
18
|
return this.cachedResult;
|
|
17
19
|
}
|
|
20
|
+
async load() {
|
|
21
|
+
const payload = await this.getSourceData().catch(reason => Promise.resolve(reason));
|
|
22
|
+
if (payload instanceof AbstractLoaderError) {
|
|
23
|
+
return Promise.reject(payload);
|
|
24
|
+
}
|
|
25
|
+
const coordinationValues = {
|
|
26
|
+
spotLayer: CL({
|
|
27
|
+
obsType: 'spot',
|
|
28
|
+
// obsColorEncoding: 'spatialLayerColor',
|
|
29
|
+
// spatialLayerColor: [255, 255, 255],
|
|
30
|
+
spatialLayerVisible: true,
|
|
31
|
+
spatialLayerOpacity: 1.0,
|
|
32
|
+
spatialSpotRadius: 10.0,
|
|
33
|
+
// TODO: spatialSpotRadiusUnit: 'µm' or 'um'
|
|
34
|
+
// after resolving https://github.com/vitessce/vitessce/issues/1760
|
|
35
|
+
// featureValueColormapRange: [0, 1],
|
|
36
|
+
// obsHighlight: null,
|
|
37
|
+
// obsSetColor: null,
|
|
38
|
+
// obsSetSelection: null,
|
|
39
|
+
// additionalObsSets: null,
|
|
40
|
+
}),
|
|
41
|
+
};
|
|
42
|
+
const { data, url } = payload;
|
|
43
|
+
const result = this.loadFromCache(data);
|
|
44
|
+
return Promise.resolve(new LoaderResult(result, url, coordinationValues));
|
|
45
|
+
}
|
|
18
46
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitessce/csv",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.3",
|
|
4
4
|
"author": "Gehlenborg Lab",
|
|
5
5
|
"homepage": "http://vitessce.io",
|
|
6
6
|
"repository": {
|
|
@@ -18,9 +18,10 @@
|
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"d3-array": "^2.4.0",
|
|
20
20
|
"d3-dsv": "^1.1.1",
|
|
21
|
-
"@vitessce/constants-internal": "3.3.
|
|
22
|
-
"@vitessce/sets-utils": "3.3.
|
|
23
|
-
"@vitessce/vit-s": "3.3.
|
|
21
|
+
"@vitessce/constants-internal": "3.3.3",
|
|
22
|
+
"@vitessce/sets-utils": "3.3.3",
|
|
23
|
+
"@vitessce/vit-s": "3.3.3",
|
|
24
|
+
"@vitessce/config": "3.3.3"
|
|
24
25
|
},
|
|
25
26
|
"scripts": {
|
|
26
27
|
"bundle": "pnpm exec vite build -c ../../../scripts/vite.config.js",
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { CoordinationLevel as CL } from '@vitessce/config';
|
|
2
|
+
import { AbstractLoaderError, LoaderResult } from '@vitessce/vit-s';
|
|
1
3
|
import CsvLoader from './CsvLoader.js';
|
|
2
4
|
|
|
3
5
|
export default class ObsPointsCsvLoader extends CsvLoader {
|
|
@@ -16,4 +18,36 @@ export default class ObsPointsCsvLoader extends CsvLoader {
|
|
|
16
18
|
this.cachedResult = { obsIndex, obsPoints };
|
|
17
19
|
return this.cachedResult;
|
|
18
20
|
}
|
|
21
|
+
|
|
22
|
+
async load() {
|
|
23
|
+
const payload = await this.getSourceData().catch(reason => Promise.resolve(reason));
|
|
24
|
+
if (payload instanceof AbstractLoaderError) {
|
|
25
|
+
return Promise.reject(payload);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const coordinationValues = {
|
|
29
|
+
pointLayer: CL({
|
|
30
|
+
obsType: 'point',
|
|
31
|
+
// obsColorEncoding: 'spatialLayerColor',
|
|
32
|
+
// spatialLayerColor: [255, 255, 255],
|
|
33
|
+
spatialLayerVisible: true,
|
|
34
|
+
spatialLayerOpacity: 1.0,
|
|
35
|
+
// TODO: support a point radius?
|
|
36
|
+
// featureValueColormapRange: [0, 1],
|
|
37
|
+
// obsHighlight: null,
|
|
38
|
+
// obsSetColor: null,
|
|
39
|
+
// obsSetSelection: null,
|
|
40
|
+
// additionalObsSets: null,
|
|
41
|
+
// obsLabelsType: null,
|
|
42
|
+
}),
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
const { data, url } = payload;
|
|
46
|
+
const result = this.loadFromCache(data);
|
|
47
|
+
return Promise.resolve(new LoaderResult(
|
|
48
|
+
result,
|
|
49
|
+
url,
|
|
50
|
+
coordinationValues,
|
|
51
|
+
));
|
|
52
|
+
}
|
|
19
53
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { CoordinationLevel as CL } from '@vitessce/config';
|
|
2
|
+
import { AbstractLoaderError, LoaderResult } from '@vitessce/vit-s';
|
|
1
3
|
import CsvLoader from './CsvLoader.js';
|
|
2
4
|
|
|
3
5
|
export default class ObsSpotsCsvLoader extends CsvLoader {
|
|
@@ -16,4 +18,37 @@ export default class ObsSpotsCsvLoader extends CsvLoader {
|
|
|
16
18
|
this.cachedResult = { obsIndex, obsSpots };
|
|
17
19
|
return this.cachedResult;
|
|
18
20
|
}
|
|
21
|
+
|
|
22
|
+
async load() {
|
|
23
|
+
const payload = await this.getSourceData().catch(reason => Promise.resolve(reason));
|
|
24
|
+
if (payload instanceof AbstractLoaderError) {
|
|
25
|
+
return Promise.reject(payload);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const coordinationValues = {
|
|
29
|
+
spotLayer: CL({
|
|
30
|
+
obsType: 'spot',
|
|
31
|
+
// obsColorEncoding: 'spatialLayerColor',
|
|
32
|
+
// spatialLayerColor: [255, 255, 255],
|
|
33
|
+
spatialLayerVisible: true,
|
|
34
|
+
spatialLayerOpacity: 1.0,
|
|
35
|
+
spatialSpotRadius: 10.0,
|
|
36
|
+
// TODO: spatialSpotRadiusUnit: 'µm' or 'um'
|
|
37
|
+
// after resolving https://github.com/vitessce/vitessce/issues/1760
|
|
38
|
+
// featureValueColormapRange: [0, 1],
|
|
39
|
+
// obsHighlight: null,
|
|
40
|
+
// obsSetColor: null,
|
|
41
|
+
// obsSetSelection: null,
|
|
42
|
+
// additionalObsSets: null,
|
|
43
|
+
}),
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
const { data, url } = payload;
|
|
47
|
+
const result = this.loadFromCache(data);
|
|
48
|
+
return Promise.resolve(new LoaderResult(
|
|
49
|
+
result,
|
|
50
|
+
url,
|
|
51
|
+
coordinationValues,
|
|
52
|
+
));
|
|
53
|
+
}
|
|
19
54
|
}
|